Createrepo behavior

Jacek N jacek99 at nykis.net
Tue Mar 22 10:41:02 UTC 2011


Hi,

I am setting up koji to build my custom RPMs and I have some problems
understanding what happens with newRepo tasks.

Here is what I have and what I want to achieve:
I maintain my own CentOS mirror on dedicated host. It is available
over HTTP (used by my linux servers). I want to use this repo as
source of packages for mock.
I also want to use koji only to build my custom non-CentOS packages
and maintain separate repo containing only packages build by koji.
I configured my tags in koji in the following way:

# tag for my internal rpms
koji add-tag internal-software
koji edit-tag --arches=x86_64 internal-software

# My build tag which I wanted to keep separated
koji add-tag install-tree
koji edit-tag --arches=x86_64 install-tree

# Attached my local CentOS mirror to build tag
koji add-external-repo -t install-tree internal-repo-el5
http://my.local.repo/trees/CentOS-5.5-x86_64/

# Added new build target using install-tree as build root building to
my internal-software tag
koji add-target internal-software install-tree internal-software

Next I added "build" and "srpm-build" groups to my install-tree tag
and populated it with packages.

I am having 2 problems when repos are created:
1. When my install-tree repo is created koji runs:
/usr/bin/createrepo -vd -o /tmp/koji/tasks/xxxx -u
http:/my.local.repo/trees/CentOS-5.5-x86_64 -g
/mnt/koji/repos/xxxxxx/groups/comps.xml /tmp/koji/tasks/xxxx
And next it executes mergerepos command:
/usr/libexec/kojid/mergerepos -a x86_64 -b
/mnt/koji/repos/xxxx/blocklist -o /tmp/koji/tasks/xxxx/repo -g
/mnt/koji/repos/xxxx/groups/comps.xml -r
file:///tmp/koji/tasks/xxxx/repo_16_premerge/ -r
http://my.local.repo/trees/CentOS-5.5-x86_64/
Adding repo: file:///tmp/koji/tasks/xxxx/repo_16_premerge/
Adding repo: http://my.local.repo/trees/CentOS-5.5-x86_64/
<my package list from internal mirror follows>

Once task is finished however repo does not work (mock can download
repodata but then it cannot download rpms). I traced this problem to
invalid content of primary.xml and primary.sqlite files which do not
contain full path to my external repo. Instead of this in baseurl:
"http://my.local.repo/trees/CentOS-5.5-x86_64/CentOS"
there is only:
"CentOS"
and since mock uses "/mnt/koji/xxxx" as repo packages are not there.
Once I manually change content of primary.* files mock works fine and
I can build RPMs

2. Second problem is with my internal-software repo. First of all when
a package (noarch in this case) is built newRepo task it not triggered
automatically. When I trigger internal-software repo rebuild using
koji command line my builder executes:
/usr/bin/createrepo -vd -o /tmp/koji/tasks/xxxx/repo -u
http://my.local.repo/trees/CentOS-5.5-x86_64 -i
/mnt/koji/repos/xxxx/pkglist -g /mnt/koji/xxxx/groups/comps.xml
/mnt/koji/packages/
<my internal rpms follow>

This does not seem correct because "my.local.repo" is added to command
line which then means that my primary.xml and primary.sqlite files
contain full URL to my external repo. Of course this brakes the repo
because my mirror has only CentOS rpms. In this case I would expect
baseurl not to contain URL.



Could somebody explain to me if above behaviour is to be expected and
if so if there is any way to achieve what I want?


Regards
Jacek N


More information about the buildsys mailing list