Build a package against specific kernel
Automated procedure for new kernel
SLC5
Prerequisite
Build
buildmodules.sh -k 2.6.32-279.14.1.el5 -d slc5
copymodules.sh -k 2.6.32-279.14.1.el5 -d slc5
Check logs
Check the summary log:
tail -n 20 /mnt/data2/home/build/logs/summary.log
If it shows error then you can have a look to mock logs in :
cat /mnt/data2/home/build/logs/$arch/
And finally the details logs are in the result directory:
cat /mnt/data2/home/build/results/slc5/$kernel/$arch/$pkg
SLC6
Prerequisite
Build
buildmodules.sh -k 2.6.32-279.14.1.el6 -d slc6
copymodules.sh -k 2.6.32-279.14.1.el6 -d slc6
Check logs
Check the summary log:
tail -n 10 /mnt/data2/home/build/logs/summary.log
If it shows error then you can have a look to mock logs in :
cat /mnt/data2/home/build/logs/$arch/
And finally the details logs are in the result directory:
cat /mnt/data2/home/build/results/slc6/$kernel/$arch/$pkg
Build one specific package
./buildmodules.sh -k 2.6.32-279.14.1.el5 -d slc5 -p /fullpath/to/my/pkg.src.rpm
Advanced
Pass argument to mock/rpmbuild
You can pass argument to mock by creating a file in configs/extra/$pkg.extra
It can take two variables:
EXCLUSIVEARCH="i686" - package will be built only for i686
and/or
EXTRA_OPTS="--define 'build_userspace 0' --define 'build_modules 1'" - extra --define options
Clean buildroot and results
rm results/*
rm /var/cache/mock/*
Use templates
Template must follow the following name convention:
$DIST-$ARCH-template.cfg and available in configs/ directory
slc5-i686-template.cfg
The script does not need mofdification to add a new distribution, only this mock template.
Modify templates
Remember to clean the old generated template when you modify it.
rm configs/*el5.cfg
rm configs/*el6.cfg