Arch policy for i386

Mike McLean mikem at redhat.com
Tue Feb 9 18:54:54 UTC 2010


On 02/09/2010 11:38 AM, Michael Cronenworth wrote:
> What's the correct way to configure koji and friends to build i386 arch
> packages to an i686 target such as Fedora 12? I don't see any
> documentation on the Wiki and I don't see anything obvious to configure
> this.

The koji build task determines the arches to build from:
  - the srpm headers
  - the build tag
  - the package entry ("extra" arches)
  - the --arch-override option (for scratch builds)

The details are in the getArchList function, and they are a little 
detailed. Let me try to sum up:

1) We start with the arch list for the build tag and adding any extra 
arches for the package. This is the base arch list.

2) If the srpm has buildarchs data, this /replaces/ the base arch list.

3) excludesivearch and excludearch data from the srpm are used to filter 
the base arch list (with a little bit of magic to make noarch work right).

4) At this point, if an arch override applies, it replaces the current 
filtered list.

5) The list is filtered against the build tag's arch list. Any arches 
whose canonical* arch do not match a canonical entry from the tag's arch 
list are removed. Also, any duplicates are removed. This is the final 
result.

* The canonical arch is a mapping that koji performs to group like 
arches. For the most part, the canonical arch is the arch of a 
buildroot. Anytime you need to figure out which arch-dir of a buildroot 
use, that arch is canonicalized. i686 packages go into the i386 
buildroot, so the canonical arch of i686 is i386.

So, if your build tag has i686 in the arch list and you want to build 
for i386, you can either:
   - Set the Buildarchs macro to override the base arch list
   - for scratch builds, just use --arch-override
Your i386 arch won't be filtered out in step 5 because it does match the 
tag's arch list, modulo canonicalization.



More information about the buildsys mailing list