[Yum] basearch, bestarch, exactarch, repo setup questions
skvidal at fedoraproject.org
Mon Dec 14 19:30:38 UTC 2009
On Mon, 14 Dec 2009, John Dennis wrote:
> I'm trying to set up a development repo for a development team. I'll be
> receiving a variety of rpm's built by others which I'll then populate the
> team's repo with. But I've found myself quite confused over arch handling.
> Initially the repo will only support Fedora, but eventually I'll want to also
> support RHEL.
> Using the fedora repos as a guide I've constructed a tree with each arch
> under a distribution along with a directory for SRPM's. Each arch has an "os"
> and a "debug" directory. I run createrepo in $arch/os, $arch/debug, and
> The canonical repo config files under /etc/yum.repos.d select a tree based on
> $releasever and $basearch.
> This leaves the following questions:
> * what are the canonical basearch's? For x86 apparently it's i386, how about
> other arch's?
python -c "import rpmUtils.arch; print rpmUtils.arch.getBaseArch(myarch='athlon')"
replace 'athlon' with whatever you want.
> * it seems a little odd to populate a directory labeled i386 with i686 rpm's,
> but apparently that's what's required because the directory is selected with
> $basearch and not $bestarch.
$bestarch doesn't exist. Never has.
> * what happens if you've got i386, i586, and i686 rpms's for a given NVR? do
> you place each under the i386 basearch directory? Do you pick the highest
> arch? What does yum do when it sees more that one arch for a given NVR?
It figures it out by sorting the arch for the system it is running on and
returning the arch which has the shortest distance from its own.
> * my /etc/yum.conf has exactarch=1, my CPU is i686 and basearch is i386, the
> current fedora yum repo for F-12 has only i386 (e.g. basearch) which is
> populated only with i686 (bestarch) and noarch rpms. So what's the meaning of
> exactarch and how does it interact?
exactarch existed when we had problems with pkgs being released at the
same time. then it existed so no one would arbitrarily move from
glibc.i686->glibc.i586 and for kernels. The default set of pkgs it acts on
was made an empty list in the f12 build of yum.
> * is there any defined behavior between yum and Fedora's default arch's (e.g.
> F-12 is supposed to build for i686, F-11 for i586, and earlier for i386)
> Is there any documentation on:
> * how to populate a repo tree
> * how arch's are interpreted and resolved
The source, mostly.
> * what are the available variables for use in a repo configuration file and
> what their usage semantics are? (e.g. $releasever, $basearch, etc.)
search for the variables section.
More information about the Yum