Build a package against specific kernel

  • log in to ssh build@lxdist01
    usage: /mnt/data2/home/build/bin/buildmodules.sh [-n] -k kernel -d dist
    
    This script build packages against specific kernel.
    
    OPTIONS:
       -a arch	Build for specific arch only - default "x86_64 i686"
       -c           Do not run mash before executing
       -d dist      Distribution - slc5 slc6
       -e opts      Extra mock options - eg "--define 'dist .cern'" 
       -h           Show this message
       -k kernel    Kernel version e.g: 2.6.18-308.13.1.el5
       -n           Dry-run - Only show what will be built
       -p path      Build one package - Need full path
       -g           Only generate mock config for the specified kernel
    
       

Automated procedure for new kernel

SLC5

Prerequisite

  • New kernel has been built in Koji
  • Tag it as slc5-testing-updates (This step will disappear soon)
         koji tag-pkg slc5-testing-updates kernel-X-Y.Z.el5 
       

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

  • New kernel has been built in Koji
  • Tag it as slc6-testing-updates (This step will disappear soon)
         koji tag-pkg slc6-testing-updates kernel-X-Y.Z.el6
       

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
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2012-12-06 - ThomasOulevey
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LinuxSupport All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback