[smithj@dhcp219 kernel]$ cat kernel.recipe # # Copyright (c) 2005-2007 rPath, Inc. # This file is distributed under the terms of the MIT License. # A copy is available at http://www.rpath.com/permanent/mit-license.html # loadSuperClass('kernelpackage') class Kernel(KernelPackageRecipe): name = 'kernel' version = '2.6.21_rc2_mm1' # override this function so we can have r.macros.version set to the correct # thing so modules will be installed in the correct place... def unpackBase(r): r.macros.upver = r.version[:r.version.rindex('_')].replace('_', '-') r.addArchive('http://ftp2.kernel.org/pub/linux/kernel/v%(majorversion)s/testing/linux-%(upver)s.tar.bz2', keyid='517D0F0E') r.addAction('chmod -R go-w .') r.addPatch('linux-2.4.0-nonintconfig.patch') def unpack(r): r.macros.version = r.version.replace('_', '-') r.addPatch('http://www2.kernel.org/pub/linux/kernel/people/akpm/patches/%(major_version)s/%(upver)s/%(version)s/%(version)s.bz2', keyid='517D0F0E') # we need this so we can undo a few of the nastier patches r.addArchive('http://www2.kernel.org/pub/linux/kernel/people/akpm/patches/%(major_version)s/%(upver)s/%(version)s/%(version)s-broken-out.tar.bz2', keyid='517D0F0E') r.addAction('patch -p1 -R < ../broken-out/detect-atomic-counter-underflows.patch') # for this mm kernel, we don't really care what the other options are, so # long as we get unionfs, so we override configure def configure(r): #FIXME: should be r.extraSource(addConfigs(r))... see CNY-1369 r.extraSource(globals()['kernelpackage-recipe'].module.addConfigs(r)) r.Make('oldconfig < /dev/null') r.Replace('# CONFIG_UNION_FS is not set', 'CONFIG_UNION_FS=m\n# CONFIG_UNION_FS_XATTR is not set', '.config')