<br><tt><font size=2>DW> Dan Williams <dcbw@redhat.com> wrote
on 07/17/2006 06:11:34 AM:<br>
</font></tt>
<br><tt><font size=2>JT> > On Sun, 2006-07-16 at 12:18 -0400, Joe
Todaro wrote:</font></tt>
<br>
<br><tt><font size=2>JT> > Regardless, though, I still don't see
any variable<br>
JT> > in /usr/bin/plague-server that has *anything* to </font></tt>
<br><tt><font size=2>JT> > with "optional arches" or "base
arches", which<br>
JT> > is what the patch was for right? <br>
DW> <br>
DW> The patch would actually have been<br>
DW> against /usr/share/plague/server/Config.py.  </font></tt>
<br>
<br><tt><font size=2>And indeed was successfully applied against </font></tt>
<br><tt><font size=2>/usr/share/plague/server/Config.py on July 15; </font></tt>
<br><tt><font size=2>one line got updated.    </font></tt>
<br>
<br><tt><font size=2>DW> That's where it gets<br>
DW> somewhat confusing, since in the build directory everything is together,<br>
DW> but during RPM creation and install the server's main.py file gets<br>
DW> renamed to /usr/bin/plague-server.  What I've said 'plague-server',
I've<br>
DW> generally been referring to the server process as a whole, not specific<br>
DW> files.  Sorry for that.<br>
DW></font></tt>
<br>
<br><tt><font size=2>No apology necessary - my misunderstanding. Also,
thanks for the </font></tt>
<br><tt><font size=2>excellent clarification/insight.</font></tt>
<br>
<br><tt><font size=2>DW> and on the server, which has _no_ architecture
at all, you'd have<br>
DW> in /etc/plague/server/targets:<br>
DW> <br>
DW> fedora-devel-core.cfg<br>
DW> fedora-5-core.cfg<br>
DW> fedora-4-core.cfg<br>
DW> fedora-devel-extras.cfg<br>
DW> fedora-5-extras.cfg<br>
DW> fedora-4-extras.cfg<br>
DW> <br>
DW> and on the server, if you care about depsolving (ie if you have
the<br>
DW> "depsolve_jobs = yes" set in /etc/plague/server/plague-server.cfg)
then<br>
DW> you actually do need mock target configs for everything too,</font></tt>
<br><tt><font size=2>DW> because the server will use those to depsolve.</font></tt>
<br>
<br><tt><font size=2>Absolutely, we do care about depsolving..</font></tt>
<br>
<br><tt><font size=2>So, when you say "everything", does that
also include (for example) </font></tt>
<br><tt><font size=2>'i686' now, too, regardless of the fact that i686
is still only a </font></tt>
<br><tt><font size=2>sub-architecture? </font></tt>
<br>
<br><tt><font size=2>(Hmm, I wouldn't think so..but I just need to be clear
on this.) </font></tt>
<br>
<br><tt><font size=2>JT> > ======================== <br>
JT> > Excerpt from WhoAmI.spec <br>
JT> > ======================== <br>
JT> > <br>
JT> > -----------<snip>------------   <br>
JT> > %define rversion 4.00 <br>
JT> > %define rel      9 <br>
JT> > %define pkgname  WhoAmI <br>
JT> > <br>
JT> > Summary         : %{__distribution_long}
system information <br>
JT> > Name            : %{pkgname}
<br>
JT> > Version         : %{rversion} <br>
JT> > Release         : %{rel}_%{__build_distribution}%{__build_release}
<br>
JT> > License         : %__spec_internal_license
<br>
JT> > Group           : System Environment/Base
<br>
JT> > Url             : %__repository_url
<br>
JT> > <br>
JT> > Packager        : %{packager} <br>
JT> > <br>
JT> > Source0         : %{pkgname}.tar.gz <br>
JT> > <br>
JT> > %if %__build_rhel <br>
JT> > Requires        : coreutils, bash, python,
grep, rpm <br>
JT> > %endif <br>
JT> > <br>
JT> > %if %__build_suse <br>
JT> > Requires        : coreutils, bash, aaa_base,
python, grep, rpm <br>
JT> > %endif <br>
JT> > <br>
JT> > BuildArch       : noarch </font></tt>
<br><tt><font size=2>JT> ></font></tt>
<br>
<br><tt><font size=2>DW> I'm getting slightly confused here. </font></tt>
<br>
<br><tt><font size=2>Sorry for that - my fault.</font></tt>
<br>
<br><tt><font size=2>DW> Plague 0.4.3 was building this<br>
DW> package correctly as an i686 package?</font></tt>
<br>
<br><tt><font size=2>No, plague 0.4.3 was building this package correctly
as </font></tt>
<br><tt><font size=2>a 'noarch'; it never tried building as an 'i686' package</font></tt>
<br><tt><font size=2>until *after* I applied the one-liner patch to </font></tt>
<br><tt><font size=2>/usr/share/plague/server/Config.py on July 15;  Moreover,</font></tt>
<br><tt><font size=2>it started doing so (building i686) automatically,
because</font></tt>
<br><tt><font size=2>PackageJob.py is now setting </font></tt>
<br><tt><font size=2>"archlist = ['i386', 'i686']" rather than</font></tt>
<br><tt><font size=2>just "archlist = ['i386'] which it has always
done in </font></tt>
<br><tt><font size=2>the past using plague-0.4.</font></tt>
<br>
<br><tt><font size=2>DW> Do you really _want_ this to<br>
DW> build as an i686 package?  </font></tt>
<br>
<br><tt><font size=2>No, of course not - this is a noarch only package,
and always</font></tt>
<br><tt><font size=2>has been. </font></tt>
<br>
<br><tt><font size=2>DW> If so, I think the "BuildArch: noarch"
is<br>
DW> wrong then.  Typically, if you want a package to build noarch,
you<br>
DW> specify "BuildArch: noarch" and it will then only build
on noarch.  What<br>
DW> arch is this package supposed to be for, exactly?</font></tt>
<br>
<br><tt><font size=2>'noarch' as is specified in the specfile. </font></tt>
<br>
<br><tt><font size=2>JT> > ======================================
<br>
JT> > Excerpt from lnxaddons-100-install.cfg <br>
JT> > ====================================== <br>
JT> > <br>
JT> > -----------<snip>------------   <br>
JT> > [Arches] <br>
JT> > base_arches=i386 <br>
JT> > optional_arches=i686 noarch </font></tt>
<br><tt><font size=2>JT> ><br>
<br>
GW> Ok; I think this is the cause of the noarch problem.  Since
'noarch' is<br>
GW> a base architecture in itself, you don't need it in optional_arches.
 If<br>
GW> you remove it, I think things will work as you expect.  </font></tt>
<br>
<br><tt><font size=2>Nope - no such luck; I have removed 'noarch' from
'optional_arches', </font></tt>
<br><tt><font size=2>re-tested, and am still seeing that same error.. </font></tt>
<br>
<br><tt><font size=2>(Jeez, I feel like we're soo close..I can taste it.)</font></tt>
<br>
<br><tt><font size=2>And now I have a design-related question if I may:
</font></tt>
<br><tt><font size=2>Why is the PackageJob.py module appending 'optional_arches'</font></tt>
<br><tt><font size=2>onto the 'archlist' list (lines 574-576), and later
trying </font></tt>
<br><tt><font size=2>to process those "optional" arches as is
they were "base" </font></tt>
<br><tt><font size=2>arches?  </font></tt>
<br>
<br><tt><font size=2>Hmm, *I* don't get it.. just when I thought </font></tt>
<br><tt><font size=2>things were starting to make sense too. (:  
</font></tt>
<br>
<br><tt><font size=2>CW> Every builder<br>
GW> can build a 'noarch' package, so that architecture is essentially
added<br>
GW> by default and you don't need to do anything explicit for it.  Yay
for<br>
GW> documentation (or complete lack of it).<br>
GW> <br>
GW> However, this does expose a bug.  If an architecture is listed
in<br>
GW> optional_arches, it shouldn't actually be used by a package build
unless<br>
GW> the package was going to build for noarch already.<br>
GW> <br>
</font></tt>
<br><tt><font size=2>I think we're *real* close..  </font></tt>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br><font size=2 face="sans-serif">Joe</font>
<br><font size=2 face="sans-serif">====================== COMPLETE THREAD
=============================</font>
<br>
<br><tt><font size=2>Dan Williams <dcbw@redhat.com> wrote on 07/17/2006
06:11:34 AM:<br>
<br>
> On Sun, 2006-07-16 at 12:18 -0400, Joe Todaro wrote:<br>
> > <br>
> > Dan Williams <dcbw@redhat.com> wrote on 07/16/2006 10:41:55
AM:<br>
> > <br>
> > > On Sun, 2006-07-16 at 09:48 -0400, Joe Todaro wrote:<br>
> > > > <br>
> > > > Thanks Dan. <br>
> > > > <br>
> > > > So I ran a quick regression test, just to make sure
that *i386* is<br>
> > > > still working, but, it *failed* ... (also note that
i686 gave<br>
> > > > basically the same errors..) <br>
> > > > <br>
> > > > SEE BELOW for *regression* test results, both BEFORE
and AFTER<br>
> > > > applying patch 'plague-opt-arches-fix.patch' to server/Config.py.<br>
> >  I<br>
> > > > repeated that test sequence several times, by the way.
 Also, I<br>
> > was<br>
> > > > surprised to see that 'WhoAmI' was trying to build
as an 'i686'<br>
> > rpm<br>
> > > > rather than a 'noarch' which is what it really is.
So, since I<br>
> > can't <br>
> > > <br>
> > > Hmm... Building an i386 package worked for me when I tested
it with<br>
> > > current CVS HEAD, as did an i686 package. <br>
> > <br>
> > Do you think that re-installing plague-0.5 from scratch (rpm
-e/rpm<br>
> > -ivh) might help?  <br>
> > If so, are there any "gotchas" I need to be aware of?
<br>
> > But hopefully this won't be necessary.<br>
> <br>
> Hmm, this likely wouldn't change much.<br>
> <br>
> > But also I have a question: Since i686 is a "subarch"
of i386, do I<br>
> > need <br>
> > to create any target config files specicially for i686, such
as in<br>
> > the <br>
> > following directories: <br>
> > - /etc/plague/server/targets <br>
> > - /etc/plague/builder/targets <br>
> > - /etc/mock  <br>
> <br>
> No, you shouldn't need to create target configs for that.  Only
for<br>
> 'base' architectures like i386, ppc, ppc64, x86_64, sparc, sparc64,
etc.<br>
> Sub-architectures like i686, em64t, sparcv9, etc, don't need their
own<br>
> target configs.<br>
> <br>
> For the builder, you need one target config for every "repository"
that<br>
> builder will be able to support.  For example, if the machine
were an<br>
> x86-64-class machine able to build Fedora Core and Fedora Extras,
you'd<br>
> have in /etc/plague/builder/targets:<br>
> <br>
> fedora-devel-i386-core.cfg<br>
> fedora-5-i386-core.cfg<br>
> fedora-4-i386-core.cfg<br>
> fedora-devel-i386-extras.cfg<br>
> fedora-5-i386-extras.cfg<br>
> fedora-4-i386-extras.cfg<br>
> fedora-devel-x86_64-core.cfg<br>
> fedora-5-x86_64-core.cfg<br>
> ...<br>
> <br>
> and on the server, which has _no_ architecture at all, you'd have<br>
> in /etc/plague/server/targets:<br>
> <br>
> fedora-devel-core.cfg<br>
> fedora-5-core.cfg<br>
> fedora-4-core.cfg<br>
> fedora-devel-extras.cfg<br>
> fedora-5-extras.cfg<br>
> fedora-4-extras.cfg<br>
> <br>
> and on the server, if you care about depsolving (ie if you have the<br>
> "depsolve_jobs = yes" set in /etc/plague/server/plague-server.cfg)
then<br>
> you actually do need mock target configs for everything too, because
the<br>
> server will use those to depsolve.<br>
> <br>
> > > Coming back to the original question, optional_arches gives<br>
> > buildsystem<br>
> > > administrators a filter on arches to build.  For example,
Fedora<br>
> > Extras<br>
> > > doesn't necessarily want to allow packages to be built for
i486,<br>
> > even if<br>
> > > the RPM requests it, because we don't support i486.  So
if you add<br>
> > i686<br>
> > > to 'optional_arches', then packages that request to be built
for<br>
> > i686<br>
> > > with ExclusiveArch will be allowed to build for i686, otherwise
not.<br>
> > >  <br>
> > <br>
> > I'm also really clear on this, too, now.  Well, at least
this proves,<br>
> > to  <br>
> > me anyway, that I've had a pretty decent understanding of how
things<br>
> > work <br>
> > all along -- thanks to the great description you gave above,
of<br>
> > course. <br>
> <br>
> No problem.  There's so many options to stuff like RPM and apt/dpkg
that<br>
> it's hard to keep straight.<br>
> <br>
> > > > Also, could you please explain/elaborate when you say:
"Patch<br>
> > attached<br>
> > > > that should apply against an installed copy of plague-server
as<br>
> > > > well."    <br>
> > > > Um, your patch is clearly intended to update file server/Config.py<br>
> > > > file, so I really don't understand how I can also use
*it* to<br>
> > update<br>
> > > > file *plague-server* (/usr/bin/plague-server?) as well,
which<br>
> > appears<br>
> > > > to be a start-up script -- am I missing something here?
<br>
> > > <br>
> > > I had meant to change the paths such that you could apply
the patch<br>
> > > from / using patch -p0 or such; I did that and then re-diffed
and<br>
> > likely<br>
> > > forgot to update the patch bits again.  Since the 'cvs
diff' is<br>
> > rooted<br>
> > > at a different directory than the installed plague server
directory,<br>
> > I<br>
> > > was trying to make life simpler for you.  My bad.<br>
> > >  <br>
> > <br>
> > Oh, cool, I've never done that before - thanks.   <br>
> > <br>
> > Regardless, though, I still don't see any variable<br>
> > in /usr/bin/plague-server <br>
> > that has *anything* to with "optional arches" or "base
arches", which<br>
> > is  <br>
> > what the patch was for right? <br>
> <br>
> The patch would actually have been<br>
> against /usr/share/plague/server/Config.py.  That's where it
gets<br>
> somewhat confusing, since in the build directory everything is together,<br>
> but during RPM creation and install the server's main.py file gets<br>
> renamed to /usr/bin/plague-server.  What I've said 'plague-server',
I've<br>
> generally been referring to the server process as a whole, not specific<br>
> files.  Sorry for that.<br>
> <br>
> > > > For the good news (for me anyway), I'm also trying
to learn Python<br>
> > > > (Diving Into Python) on my own time, so that hopefully
one day I<br>
> > might<br>
> > > > be able help squash some of these bugs.. However, in
the meantime,<br>
> > > > I/we very much appreciate your help and expertise..
 <br>
> > > > <br>
> > > > REGRESSION TEST RESULTS ARE BELOW... <br>
> > > > <br>
> > > > Dan Williams <dcbw@redhat.com> wrote on 07/15/2006
01:20:54 PM:<br>
> > > > <br>
> > > > > On Tue, 2006-07-04 at 09:58 -0400, Joe Todaro
wrote:<br>
> > > > > > <br>
> > > > > > Hi,  <br>
> > > > > > I'm having a problem *not* being able to
build 'i686' packages<br>
> > > > (i.e.<br>
> > > > > > optional_arches=i686) anymore *after* having
upgraded our<br>
> > plague<br>
> > > > > > server/builder (Opteron x86_64) a couple
of weeks ago from<br>
> > > > > > plague-0.4.3 to *plague-0.5.0*. The problem
happens only with<br>
> > i686<br>
> > > > > > (optional_arches=i686) -- not with i386 (base_arches=i386)<br>
> > which<br>
> > > > > > continues to work flawlessly.   <br>
> > > > > <br>
> > > > > Found and fixed in CVS HEAD.  Patch attached
that should apply<br>
> > > > against<br>
> > > > > an installed copy of plague-server as well.  Thanks
for the<br>
> > report,<br>
> > > > and<br>
> > > > > sorry for the lag.<br>
> > > > > <br>
> > > > > Cheers,<br>
> > > > > Dan<br>
> > > > > <br>
> > > > > <br>
> > > > > [attachment "plague-opt-arches-fix.patch"
deleted by Joe <br>
> > > > > Todaro/Poughkeepsie/IBM]  <br>
> > > > <br>
> > > > <br>
> > > > 626 (WhoAmI): Requesting depsolve... <br>
> > > > 626 (WhoAmI): Starting depsolve for arches: ['i386',
'i686',<br>
> > > > 'noarch']. <br>
> > > <br>
> > > Ok; what do you have in the 'optional_arches' for this target?
<br>
> > <br>
> > ====================================== <br>
> > Excerpt from lnxaddons-100-install.cfg <br>
> > ====================================== <br>
> > <br>
> > -----------<snip>------------   <br>
> > [Arches] <br>
> > base_arches=i386 <br>
> > optional_arches=i686 noarch <br>
> <br>
> Ok; I think this is the cause of the noarch problem.  Since 'noarch'
is<br>
> a base architecture in itself, you don't need it in optional_arches.
 If<br>
> you remove it, I think things will work as you expect.  Every
builder<br>
> can build a 'noarch' package, so that architecture is essentially
added<br>
> by default and you don't need to do anything explicit for it.  Yay
for<br>
> documentation (or complete lack of it).<br>
> <br>
> However, this does expose a bug.  If an architecture is listed
in<br>
> optional_arches, it shouldn't actually be used by a package build
unless<br>
> the package was going to build for noarch already.<br>
> <br>
> > ----------</snip>------------   <br>
> > > <br>
> > > What do the top bits of the specfile for WhoAmI look like?
 i.e.,<br>
> > are<br>
> > > there any of the following specfile tags, and what are their
values?<br>
> > > <br>
> > > BuildArch<br>
> > > ExclusiveArch<br>
> > > ExcludeArch<br>
> > >  <br>
> > <br>
> > ======================== <br>
> > Excerpt from WhoAmI.spec <br>
> > ======================== <br>
> > <br>
> > -----------<snip>------------   <br>
> > %define rversion 4.00 <br>
> > %define rel      9 <br>
> > %define pkgname  WhoAmI <br>
> > <br>
> > Summary         : %{__distribution_long}
system information <br>
> > Name            : %{pkgname} <br>
> > Version         : %{rversion} <br>
> > Release         : %{rel}_%{__build_distribution}%{__build_release}
<br>
> > License         : %__spec_internal_license
<br>
> > Group           : System Environment/Base
<br>
> > Url             : %__repository_url
<br>
> > <br>
> > Packager        : %{packager} <br>
> > <br>
> > Source0         : %{pkgname}.tar.gz <br>
> > <br>
> > %if %__build_rhel <br>
> > Requires        : coreutils, bash, python,
grep, rpm <br>
> > %endif <br>
> > <br>
> > %if %__build_suse <br>
> > Requires        : coreutils, bash, aaa_base,
python, grep, rpm <br>
> > %endif <br>
> > <br>
> > BuildArch       : noarch <br>
> <br>
> I'm getting slightly confused here.  Plague 0.4.3 was building
this<br>
> package correctly as an i686 package?  Do you really _want_ this
to<br>
> build as an i686 package?  If so, I think the "BuildArch:
noarch" is<br>
> wrong then.  Typically, if you want a package to build noarch,
you<br>
> specify "BuildArch: noarch" and it will then only build
on noarch.  What<br>
> arch is this package supposed to be for, exactly?<br>
> <br>
> Cheers,<br>
> Dan<br>
> <br>
> <br>
</font></tt>