[Yum] basearch, bestarch, exactarch, repo setup questions
James Antill
james-yum at And.org
Mon Dec 14 19:38:38 UTC 2009
John Dennis <jdennis at redhat.com> writes:
> 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 source/SRPM.
>
> The canonical repo config files under /etc/yum.repos.d select a tree
> based on $releasever and $basearch.
Ok.
> This leaves the following questions:
>
> * what are the canonical basearch's? For x86 apparently it's i386, how
> about other arch's?
x86_64, ppc are the two common ones.
You can run:
% python -c 'import rpmUtils.arch; print rpmUtils.arch.getBaseArch("ppc64")'
ppc
> * 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.
That's not a requirement, but that's common best practice. There's
nothing stopping you using $arch.
> * 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?
Yum should choose the best arch for the local machine, however at
this point in time I'd just follow Fedora and say "the whole world is
i686".
> * 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?
From man yum.conf ...
exactarch Either ‘1’ or ‘0’. Set to ‘1’ to make yum update only
update the architectures of packages that you have installed.
ie: with this enabled yum will not install an i686 package to
update an i386 package. Default is ‘1’.
> * 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)
I don't understand the question.
> Is there any documentation on:
>
> * how to populate a repo tree
Copy files into the directory.
> * how arch's are interpreted and resolved
I guess see the above python, maybe even read that file ... I'm not
sure what you want/need to know.
> * what are the available variables for use in a repo configuration
> file and what their usage semantics are? (e.g. $releasever, $basearch,
> etc.)
The bottom of "man yum.conf" has a section titled "VARIABLES".
--
James Antill -- james at and.org
More information about the Yum
mailing list