[Piuparts-commits] [piuparts] 03/06: *-dkms: install kernel headers so that a module gets built
Holger Levsen
holger at moszumanska.debian.org
Mon Feb 10 11:14:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 8e8a5d556acc4ce0b9f14503c30169c7c489feb2
Author: Andreas Beckmann <anbe at debian.org>
Date: Mon Feb 10 02:05:36 2014 +0100
*-dkms: install kernel headers so that a module gets built
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
custom-scripts/scripts/pre_install_extras | 36 +++++++++++++++++++++++++++++++
debian/changelog | 3 +++
2 files changed, 39 insertions(+)
diff --git a/custom-scripts/scripts/pre_install_extras b/custom-scripts/scripts/pre_install_extras
new file mode 100755
index 0000000..af38e77
--- /dev/null
+++ b/custom-scripts/scripts/pre_install_extras
@@ -0,0 +1,36 @@
+#!/bin/sh
+set -e
+
+log_debug() {
+ echo "Debug: piuparts extra for package $PIUPARTS_OBJECTS"
+}
+
+#
+# deal with extras:
+#
+if [ "$PIUPARTS_PHASE" = "install" ]; then
+case ${PIUPARTS_OBJECTS%%=*} in
+ *dkms)
+ log_debug
+ # Install kernel headers, so that dkms tries to build a module
+ HEADERS=linux-headers
+ FLAVOR=unknown
+ FLAVOR_i386=686-pae
+ case $PIUPARTS_DISTRIBUTION in
+ lenny*|squeeze*)
+ HEADERS=linux-headers-2.6
+ FLAVOR_i386=686
+ ;;
+ esac
+ case $(dpkg --print-architecture) in
+ amd64)
+ FLAVOR=amd64
+ ;;
+ i386)
+ FLAVOR=$FLAVOR_i386
+ ;;
+ esac
+ apt-get -y install $HEADERS-$FLAVOR
+ ;;
+esac
+fi
diff --git a/debian/changelog b/debian/changelog
index c8c3724..efd7d41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -54,6 +54,9 @@ piuparts (0.57) UNRELEASED; urgency=low
automatically enable dpkg --force-unsafe-io once that is supported.
Also divert /bin/sync and replace it with a link to /bin/true. Syncing a
throwaway chroot is useless, but affects on the host's performance.
+ * scripts/pre_install_extras: New custom script to install a linux-headers
+ package before testing a *-dkms package, s.t. dkms tries to build a
+ kernel module.
* Add more piuparts exceptions.
* Handle lib32nss-mdns like ia32-libs[-gtk].
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list