[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 3/3] install-files: Include modules.{builtin,order} in Linux kernel-image udebs



---
libkmod expects these files to be present.  However they are not
being installed in the s390 tape image packages, so this probably
should be made conditional.  That might be a bug in the linux package
though.  Bastian?

Ben.

 commands/install-files |   31 ++++++++++++++++++++++---------
 debian/changelog       |    1 +
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/commands/install-files b/commands/install-files
index 2241b1b..eddd5d2 100755
--- a/commands/install-files
+++ b/commands/install-files
@@ -11,6 +11,8 @@ sub doit {
 
 my $hostarch=`dpkg-architecture -qDEB_HOST_ARCH`;
 chomp $hostarch;
+my $hostos=`dpkg-architecture -qDEB_HOST_ARCH_OS`;
+chomp $hostos;
 
 my $configdir = ($ENV{KW_CONFIG_DIR} || '.');
 my $fixsourcedir = $ENV{SOURCEDIR};
@@ -84,15 +86,26 @@ while (<KVERS>) {
 	if (! -e "$modlistdir/kernel-image") {
 		# copy no kernel
 	}
-	elsif (-e "$sourcedir/boot/vmlinux-$installedname") {
-		doit("install", "-D", "-m", 644,
-			"$sourcedir/boot/vmlinux-$installedname",
-			"debian/kernel-image-$kernelversion-$flavour-di/boot/vmlinux$extraname");
-	}
-	elsif (-e "$sourcedir/boot/vmlinuz-$installedname") {
-		doit("install", "-D", "-m", 644,
-			"$sourcedir/boot/vmlinuz-$installedname",
-			"debian/kernel-image-$kernelversion-$flavour-di/boot/vmlinuz$extraname");
+	elsif ($hostos eq 'linux') {
+		if (-e "$sourcedir/boot/vmlinux-$installedname") {
+			doit("install", "-D", "-m", 644,
+			     "$sourcedir/boot/vmlinux-$installedname",
+			     "debian/kernel-image-$kernelversion-$flavour-di/boot/vmlinux$extraname");
+		}
+		elsif (-e "$sourcedir/boot/vmlinuz-$installedname") {
+			doit("install", "-D", "-m", 644,
+			     "$sourcedir/boot/vmlinuz-$installedname",
+			     "debian/kernel-image-$kernelversion-$flavour-di/boot/vmlinuz$extraname");
+		}
+		else {
+			die "could not find kernel image";
+		}
+		doit("install", "-d",
+		     "debian/kernel-image-$kernelversion-$flavour-di/lib/modules/$installedname/");
+		doit("install", "-m", 644,
+		     "$sourcedir/lib/modules/$installedname/modules.builtin",
+		     "$sourcedir/lib/modules/$installedname/modules.order",
+		     "debian/kernel-image-$kernelversion-$flavour-di/lib/modules/$installedname/");
 	}
 	elsif (-e "$sourcedir/boot/kfreebsd-$installedname.gz") {
 		doit("install", "-D", "-m", 644,
diff --git a/debian/changelog b/debian/changelog
index 1959853..3fb4257 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ kernel-wedge (2.85) UNRELEASED; urgency=low
     overridden by the architecture package-list (Closes: #678587)
   * find-unpackaged: New sub-command lists modules not packaged in a udeb
   * install-files: Call find-unpackaged
+  * install-files: Include modules.{builtin,order} in Linux kernel-image udebs
 
  -- Ben Hutchings <ben@decadent.org.uk>  Sun, 24 Jun 2012 19:34:25 +0100
 

Attachment: signature.asc
Description: Digital signature


Reply to: