Dan Williams <[EMAIL PROTECTED]> wrote on 07/16/2006 10:41:55 AM:

> On Sun, 2006-07-16 at 09:48 -0400, Joe Todaro wrote:
> >
> > Thanks Dan.
> >
> > So I ran a quick regression test, just to make sure that *i386* is
> > still working, but, it *failed* ... (also note that i686 gave
> > basically the same errors..)
> >
> > SEE BELOW for *regression* test results, both BEFORE and AFTER
> > applying patch 'plague-opt-arches-fix.patch' to server/Config.py.  I
> > repeated that test sequence several times, by the way.  Also, I was
> > surprised to see that 'WhoAmI' was trying to build as an 'i686' rpm
> > rather than a 'noarch' which is what it really is. So, since I can't
>
> Hmm... Building an i386 package worked for me when I tested it with
> current CVS HEAD, as did an i686 package.


Do you think that re-installing plague-0.5 from scratch (rpm -e/rpm -ivh) might help?
If so, are there any "gotchas" I need to be aware of?
But hopefully this won't be necessary.

>
> > be exactly sure at this point how the "optional_arches" design is
> > supposed to tie-in with the  "base_arches" design, it doesn't make
> > much sense for me (with my limited Python skills) to try and dig in
> > any further..
>
> Ok; most distributions have a "base" architecture for any given
> architecture family.  For RHEL & FC, that's 'i386' for x86 processors,
> and for POWER, that's 'ppc'.  We only build specific RPMs as i686 since
> not every RPM requires it, and building many RPMs for i686 can actually
> _hurt_ performance.  In the same vein, we don't build both 'em64t' and
> x86-64 packages for everything either, because the difference between
> EM64T and x86-64 only matters for stuff like the kernel.


That was my understanding.

>
> Given a set of packages, you _don't_ want to build every package on
> every architecture the buildsystem supports, unless the package
> explicitly asks for it.  Given a specfile with _no_ ExcludeArch or
> IncludeArch, plague will build that package only for the "base"
> architecture, in this case i386.
>


That was my understanding too.
 
> So what happens when you want a package to explicitly build on i686 or
> i586 or em64t?  In this case, the specfile for the package must
> explicitly request to be built as such, using ExclusiveArch.
>


Ok, now I'm clear on this.

But also I have a question: Since i686 is a "subarch" of i386, do I need
to create any target config files specicially for i686, such as in the
following directories:
- /etc/plague/server/targets
- /etc/plague/builder/targets
- /etc/mock
?

> Coming back to the original question, optional_arches gives buildsystem
> administrators a filter on arches to build.  For example, Fedora Extras
> doesn't necessarily want to allow packages to be built for i486, even if
> the RPM requests it, because we don't support i486.  So if you add i686
> to 'optional_arches', then packages that request to be built for i686
> with ExclusiveArch will be allowed to build for i686, otherwise not.
>


I'm also really clear on this, too, now.  Well, at least this proves, to
me anyway, that I've had a pretty decent understanding of how things work
all along -- thanks to the great description you gave above, of course.

> > Also, could you please explain/elaborate when you say: "Patch attached
> > that should apply against an installed copy of plague-server as
> > well."    
> > Um, your patch is clearly intended to update file server/Config.py
> > file, so I really don't understand how I can also use *it* to update
> > file *plague-server* (/usr/bin/plague-server?) as well, which appears
> > to be a start-up script -- am I missing something here?
>
> I had meant to change the paths such that you could apply the patch
> from / using patch -p0 or such; I did that and then re-diffed and likely
> forgot to update the patch bits again.  Since the 'cvs diff' is rooted
> at a different directory than the installed plague server directory, I
> was trying to make life simpler for you.  My bad.
>


Oh, cool, I've never done that before - thanks.  

Regardless, though, I still don't see any variable in /usr/bin/plague-server
that has *anything* to with "optional arches" or "base arches", which is
what the patch was for right?

Anyway, here's a snippet from /usr/bin/plague-server script, which is the
one I've been assuming that you're referring to - is this the one?

===================================
Excerpt from /usr/bin/plague-server
===================================

------------<snip>------------  
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Copyright 2005 Dan Williams <[EMAIL PROTECTED]> and Red Hat, Inc.


import sys
import os
import socket
import signal
import time
from plague import AuthedXMLRPCServer
from plague import HTTPServer
from plague import daemonize
from plague import DebugUtils
import SimpleXMLRPCServer
from optparse import OptionParser
import threading

sys.path.append('/usr/share/plague/server')

import User
import BuildMaster
import BuilderManager
import DBManager
import Config
from UserInterface import UserInterfaceSSLAuth
from UserInterface import UserInterfaceNoAuth
-----------</snip>------------  

> > For the good news (for me anyway), I'm also trying to learn Python
> > (Diving Into Python) on my own time, so that hopefully one day I might
> > be able help squash some of these bugs.. However, in the meantime,
> > I/we very much appreciate your help and expertise..  
> >
> > REGRESSION TEST RESULTS ARE BELOW...
> >
> > Dan Williams <[EMAIL PROTECTED]> wrote on 07/15/2006 01:20:54 PM:
> >
> > > On Tue, 2006-07-04 at 09:58 -0400, Joe Todaro wrote:
> > > >
> > > > Hi,  
> > > > I'm having a problem *not* being able to build 'i686' packages
> > (i.e.
> > > > optional_arches=i686) anymore *after* having upgraded our plague
> > > > server/builder (Opteron x86_64) a couple of weeks ago from
> > > > plague-0.4.3 to *plague-0.5.0*. The problem happens only with i686
> > > > (optional_arches=i686) -- not with i386 (base_arches=i386) which
> > > > continues to work flawlessly.  
> > >
> > > Found and fixed in CVS HEAD.  Patch attached that should apply
> > against
> > > an installed copy of plague-server as well.  Thanks for the report,
> > and
> > > sorry for the lag.
> > >
> > > Cheers,
> > > Dan
> > >
> > >
> > > [attachment "plague-opt-arches-fix.patch" deleted by Joe
> > > Todaro/Poughkeepsie/IBM]  
> >
> >
> > 626 (WhoAmI): Requesting depsolve...
> > 626 (WhoAmI): Starting depsolve for arches: ['i386', 'i686',
> > 'noarch'].
>
> Ok; what do you have in the 'optional_arches' for this target?


======================================
Excerpt from lnxaddons-100-install.cfg
======================================

-----------<snip>------------  
[Arches]
base_arches=i386
optional_arches=i686 noarch
----------</snip>------------  
>
> What do the top bits of the specfile for WhoAmI look like?  i.e., are
> there any of the following specfile tags, and what are their values?
>
> BuildArch
> ExclusiveArch
> ExcludeArch
>


========================
Excerpt from WhoAmI.spec
========================

-----------<snip>------------  
%define rversion 4.00
%define rel      9
%define pkgname  WhoAmI

Summary         : %{__distribution_long} system information
Name            : %{pkgname}
Version         : %{rversion}
Release         : %{rel}_%{__build_distribution}%{__build_release}
License         : %__spec_internal_license
Group           : System Environment/Base
Url             : %__repository_url

Packager        : %{packager}

Source0         : %{pkgname}.tar.gz

%if %__build_rhel
Requires        : coreutils, bash, python, grep, rpm
%endif

%if %__build_suse
Requires        : coreutils, bash, aaa_base, python, grep, rpm
%endif

BuildArch       : noarch
BuildRoot       : %{_tmppath}/%{name}-%{version}-root
AutoReqProv     : no

%Description
%{__distribution_long} system information

%prep
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
-----------</snip>------------  

> > 626 (WhoAmI/i686): Depsolve Error: WARNING: bad yum config for arch
> > i686.
> > Exception in thread PackageJob: 626/WhoAmI:
> > Traceback (most recent call last):
> >   File "/usr/lib64/python2.3/threading.py", line 436, in __bootstrap
> >     self.run()
> >   File "/usr/share/plague/server/PackageJob.py", line 86, in run
> >     self._pkg_job.process()
> >   File "/usr/share/plague/server/PackageJob.py", line 719, in process
> >     if func():
> >   File "/usr/share/plague/server/PackageJob.py", line 587, in
> > _stage_depsolve
> >     if self._arch_deps_solved(arch) == False:
> >   File "/usr/share/plague/server/PackageJob.py", line 540, in
> > _arch_deps_solved
> >     if base:
> > UnboundLocalError: local variable 'base' referenced before assignment
>
> To get rid of this error, remove the marked line around line 490 of
> PackageJob.py:
>
>             base = yum.YumBase()
>             yum_config = self._write_yum_conf(arch)
>             if not yum_config:
> -               del base
>                 raise DepError("WARNING: bad yum config for arch %s." % arch)
>
>             depsolve_root = os.path.dirname(yum_config) + '/'
>             base.doConfigSetup(fn=yum_config, root=depsolve_root)
>
> That's a bug.  Hope we can get this fixed.


Me too.. your help is really appreciated.

>
> Dan
>
> > Thanks again,
> > -Joe
>

Joe
--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list

Reply via email to