Difference between revisions of "Koji Testbed"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 161: Line 161:
  
 
A Koji build will first do a <nowiki>buildSRPMFromSCM</nowiki> job, which will run mock to generate a buildroot, inside of which 'yum groupinstall srpm-build' is run. Later, a <nowiki>buildArch</nowiki> job does the actual building, and here mock runs 'yum groupinstall build'.
 
A Koji build will first do a <nowiki>buildSRPMFromSCM</nowiki> job, which will run mock to generate a buildroot, inside of which 'yum groupinstall srpm-build' is run. Later, a <nowiki>buildArch</nowiki> job does the actual building, and here mock runs 'yum groupinstall build'.
These groups must be created by us first, and populated with package names that we need to have available at this stage. Since these groups do not vary much between distributions, we create a separate tag and use inheritance to save work.  
+
These groups must be created by us first, and populated with package names that we need to have available at this stage.
 
  koji add-tag epel5-basedeps
 
  koji add-tag epel5-basedeps
 
  koji add-group epel5-basedeps build
 
  koji add-group epel5-basedeps build
 
  koji add-group epel5-basedeps srpm-build
 
  koji add-group epel5-basedeps srpm-build
  koji add-tag-inheritance epel5-build epel5-basedeps
+
   
 
They need to be populated. Clone from a typical value for the Fedora Koji systems, e.g.
 
They need to be populated. Clone from a typical value for the Fedora Koji systems, e.g.
  
  koji add-group-pkg epel5-basedeps build `koji -s http://koji.fedoraproject.org/kojihub/
+
  koji add-group-pkg epel5-build build `koji -s http://koji.fedoraproject.org/kojihub/
 
       list-groups dist-5E-epel-build build | tail -n +2 | cut -d: -f1`
 
       list-groups dist-5E-epel-build build | tail -n +2 | cut -d: -f1`
 
Be careful to exclude the fedpkg package in srpm-build which pulls in way too much! It includes mock which causes strange failures with conflicting (unix) group ids within the buildroot.
 
Be careful to exclude the fedpkg package in srpm-build which pulls in way too much! It includes mock which causes strange failures with conflicting (unix) group ids within the buildroot.
  koji add-group-pkg epel5-basedeps srpm-build `koji -s http://koji.fedoraproject.org/kojihub/
+
  koji add-group-pkg epel5-build srpm-build `koji -s http://koji.fedoraproject.org/kojihub/
 
       list-groups dist-5E-epel-build srpm-build | tail -n +2 | cut -d: -f1 | grep -v fedpkg`
 
       list-groups dist-5E-epel-build srpm-build | tail -n +2 | cut -d: -f1 | grep -v fedpkg`
  
Line 190: Line 190:
  
  
For epel6, we can take a few shortcuts thanks to the power of inheritance.
+
Since the srpm-build and build do not vary much between distributions,
 
+
we create a separate tag and use inheritance to save work for the Fedora branches.
Make epel6 a child of epel5 so it inherits all the packages.
+
This does not hold true for EPEL branches, which are not inheriting from one another.
koji add-tag --parent epel5 epel6
 
koji add-tag --parent epel6 --arches "i386 x86_64" epel6-build
 
koji add-tag --parent epel6 epel6-candidates
 
koji add-tag --parent epel6 epel6-testing
 
koji add-tag --parent epel6 epel6-release
 
koji add-tag --parent epel5-basedeps epel6-basedeps
 
 
 
The external repos are simpler:
 
koji add-external-repo -t epel6-build \
 
      dist-epel6-external-repo http://mirror.nl.leaseweb.net/epel/6/$arch/
 
koji add-external-repo -t epel6-build dist-centos6-repo \
 
      http://spiegel.nikhef.nl/mirror/centos/6/os/\$arch/
 
koji add-target epel6 epel6-build epel6-candidates
 
 
 
For Fedora. It starts to become a bit boring.
 
 
 
koji add-tag --parent epel5 f17
 
koji add-tag --parent f17 --arches "i386 x86_64" f17-build
 
for i in candidates testing release; do
 
    koji add-tag --parent f17 f17-$i
 
done
 
koji add-tag --parent epel5-basedeps f17-basedeps # may need adding/removing some group packages
 
koji add-external-repo -t f17-build dist-f17-base http://mirror.nl.leaseweb.net/fedora/linux/releases/17/Everything/\$arch/os/
 
koji add-target f17 f17-build f17-candidates
 
  
 
  for i in 18 19 20 ; do
 
  for i in 18 19 20 ; do

Revision as of 15:50, 26 September 2014