Select Git revision
lbuild-sles11
lbuild-sles11 4.96 KiB
# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
# increment this if you have made a change that should force a new kernel
# to build built for this distribution (only -- if you want to force a kernel
# build on all distributions, update the BUILD_GEN variable in build/lbuild)
BUILD_GEN+=".0"
# This distro does not support zfs, so define WITH_ZFS
# use words that make the bash log readable.
WITH_ZFS="Zfs Not Supported"
source ${LBUILD_DIR}/lbuild-sles
kernel_srpm_location() {
local PLEV=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
echo "https://nu.novell.com/repo/\$RCE/SLES11-SP${PLEV}-Updates/sle-11-$(resolve_arch $TARGET_ARCH)/rpm/src/"
}
edit_specs() {
# edit the SPECs with our changes
local spec
(cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
for spec in $RPMSMPTYPE source syms; do
#cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
-e '/^%setup /a\
cp %_sourcedir/linux-3.0-lustre.patch %_builddir/%{name}-%{version}/lustre.patch\
! grep -q lustre.patch %_sourcedir/series.conf && echo -e "\\n\\tlustre.patch" >> %_sourcedir/series.conf' \
SOURCES/kernel-${spec}.spec || \
fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
if $KERNEL_LUSTRE_NAMING; then
# these are all of the changes needed because we change the package names
# to kernel-lustre-*. these should all go away when we stop this insanity
sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \
-e "/^Provides: *kernel = /a\
Provides: kernel-$spec = %{version}-%{release}
" \
-e 's/^\([ ][ ]*-i %_builddir\/kernel-\)\(source-2.6.27.21\/\$patch; then\)/\1lustre-\2/' \
-e '/^%build/,/^%changelog/s/\(kernel-\)\(source\.files\)/\1lustre-\2/g' \
-e '/--no-backup-if-mismatch/,/fi/s/kernel-source-/kernel-lustre-source-/g' \
-e "s/^\(%package -n kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(%description -n kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(%files -n kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(Provides:.*kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(Requires:.*kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(Supplements:.*kernel-\)\(.*\)/\1lustre-\2/" \
SOURCES/kernel-${spec}.spec || \
fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
fi
# XXX - a building-on-Ubuntu hack
if grep -q "Ubuntu" /etc/issue; then
sed -i -e '/^%_sourcedir\/install-configs %_sourcedir .*/i\
curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm1/broken-out/i386-use-c-code-for-current_thread_info.patch | patch -p1' \
-e 's/^\(BuildRequires: .*\)$/#NOU \1/g' \
-e 's/%(\(chmod .*\))$/%(bash -c "\1")/' \
-e 's/ -a 109//' \
SOURCES/kernel-${spec}.spec || \
fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
fi
done
}
unpack_linux_devel_rpm-sles11() {
local callers_rpm="$1"