From: Holger Levsen Date: Mon, 31 Oct 2011 17:36:21 +0000 (+0100) Subject: also use make-kpkg when building oot-modules outside the kernel build X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=9c759396e50568767711dd940cea5cb88a1b4a21;p=profitbricks%2Fjenkins-build-scripts.git also use make-kpkg when building oot-modules outside the kernel build --- diff --git a/build-oot.sh b/build-oot.sh index a085726..2d9a6ee 100755 --- a/build-oot.sh +++ b/build-oot.sh @@ -35,6 +35,12 @@ else export PB_SUITE=$4 fi +cat > /etc/kernel-pkg.conf << EOF +maintainer := Profitbricks GmbH +email := support@profitbricks.com +priority := Low +EOF + TMPFILE=$(mktemp) echo "Building $OOT_MODULE for kernel profitbricks-$PB_FLAVOUR for $DIST and $PB_SUITE using script in $TMPFILE which has this content:" @@ -47,19 +53,28 @@ cat > $TMPFILE << EOF set -e apt-get update apt-get -y upgrade - apt-get -y install openssh-client linux-source-profitbricks-$PB_FLAVOUR $OOT_MODULE-source linux-image-profitbricks-$PB_FLAVOUR - m-a unpack $OOT_MODULE + apt-get -y install openssh-client linux-source-profitbricks-$PB_FLAVOUR $OOT_MODULE-source linux-image-profitbricks-$PB_FLAVOUR dctrl-tools cd /usr/src/ - sed -i -s "s#_KVERS_#_KVERS_-profitbricks-$PB_FLAVOUR#g" modules/$OOT_MODULE/debian/control.modules.in - sed -i -s "s#^Provides: $OOT_MODULE-modules#Provides: $OOT_MODULE-modules, $OOT_MODULE-modules-profitbrick-$PB_FLAVOUR#g" modules/$OOT_MODULE/debian/control.modules.in tar xjf linux-source-*-$PB_FLAVOUR.tar.bz2 - KDIR=\$(find /usr/src -name "*profitbricks-$PB_FLAVOUR*" -type d) - KVERS=\$(echo \$KDIR |cut -d "-" -f3-) + export KDIR=\$(find /usr/src -maxdepth 1 -name "linux-source-*profitbricks-$PB_FLAVOUR*" -type d) + export KVERS=\$(echo \$KDIR |cut -d "-" -f3-) + + cd /usr/share/doc/linux-image-*profitbricks-$PB_FLAVOUR + zcat changelog.Debian.gz > changelog + our_version=\$(dpkg-parsechangelog -l./changelog|grep-dctrl -n -s Version ''|cut -d "-" -f4) + echo "debian = \\\$(version)-\$our_version" >> /etc/kernel-pkg.conf + + cd /usr/src/ + tar xjvf $OOT_MODULE.tar.bz2 + # the next line is only useful if its also applied to jenkins_build_script.git/kernel_inpbuilder.py:install_extra_modules() + # sed -i -s "s#^Provides: $OOT_MODULE-modules#Provides: $OOT_MODULE-modules, $OOT_MODULE-modules-profitbrick-$PB_FLAVOUR#g" modules/$OOT_MODULE/debian/control.modules.in + cd \$KDIR cp /boot/config-*-$PB_FLAVOUR .config make prepare make modules_prepare - m-a -k \$KDIR build -l\$KVERS --not-unpack $OOT_MODULE + /usr/bin/make-kpkg -j 25 --arch amd64 --rootcmd fakeroot --append-to-version -profitbricks-gw --initrd --arch_in_name modules + cd /usr/src/ ls *deb # FIXME: this is soooo just wrong...