[kernel] r12828 - in dists/trunk/linux-2.6/debian: . config templates/temp.image.plain
Maximilian Attems
maks at alioth.debian.org
Wed Feb 18 01:35:40 UTC 2009
Author: maks
Date: Wed Feb 18 01:35:38 2009
New Revision: 12828
Log:
initramfs-tools: update-initramfs
don't use mkinitramfs-kpkg vestiges.
preinst and postinst needed a bit of surge to not call
the old mkinitramfs-kpkg interfaces. just check which initramfs
binary is around and call them.
they support all relevant linux-2.6 versions.
Modified:
dists/trunk/linux-2.6/debian/changelog
dists/trunk/linux-2.6/debian/config/defines
dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst
Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog (original)
+++ dists/trunk/linux-2.6/debian/changelog Wed Feb 18 01:35:38 2009
@@ -70,6 +70,9 @@
* [x86_64] set NR_CPUS to 512. (closes: #491309)
* [686-bigmem] set modular XEN_FBDEV_FRONTEND.
* Newer Standards-Version 3.8.0 without changes.
+ * Use update-initramfs for initramfs-tools.
+ * Fix preinst and postinst call to not use deprecated mkinitramfs-kpkg
+ interfaces.
[ Martin Michlmayr ]
* [mips/r4k-ip22, mips/sb1-bcm91250a] Don't build in ISO9660.
Modified: dists/trunk/linux-2.6/debian/config/defines
==============================================================================
--- dists/trunk/linux-2.6/debian/config/defines (original)
+++ dists/trunk/linux-2.6/debian/config/defines Wed Feb 18 01:35:38 2009
@@ -43,7 +43,7 @@
3.2-1
[commands-image-initramfs-generators]
-initramfs-tools: mkinitramfs-kpkg
+initramfs-tools: update-initramfs
yaird: mkinitrd.yaird
[relations]
Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst (original)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/postinst Wed Feb 18 01:35:38 2009
@@ -956,27 +956,24 @@
sub find_inird_tool {
- my $hostversion = shift;
- my $version = shift;
- my @ramdisks =
- grep {
- my $args =
- "$_ " .
- "--supported-host-version=$hostversion " .
- "--supported-target-version=$version " .
- "1>/dev/null 2>&1"
- ;
- system($args) == 0;
- }
- split (/[:,\s]+/, $ramdisk);
+ my $ramdisk = shift;
+ my (@ramdisks, $initramfs_cmd);
+
+ foreach $initramfs_cmd (split(/[:,\s]+/, $ramdisk)) {
+ if (system("test -x \"\$(command -v $initramfs_cmd)\"") == 0) {
+ push(@ramdisks, $initramfs_cmd);
+ }
+ }
+ return @ramdisks;
}
+
# The initrd symlink should probably be in the same dir that the
# symlinks are in
if ($initrd) {
chomp (my $hostversion = `uname -r`);
my @ramdisklist;
- @ramdisklist = find_inird_tool($hostversion, $version, $ramdisk) if $ramdisk;
+ @ramdisklist = find_inird_tool($ramdisk) if $ramdisk;
die "Failed to find suitable ramdisk generation tool for kernel version \n" .
"$version on running kernel $hostversion in $ramdisk\n"
if $#ramdisklist < 0;
@@ -988,15 +985,12 @@
my $initrd_path = $realimageloc . "initrd.img-$version";
my $ret = system("$ramdisk_cmd " .
($mkimage ? "-m '$mkimage' " : "") .
- "-o $initrd_path.new $modules_base/$version");
+ "-c -t -k $version");
if ($ret) {
warn "$ramdisk_cmd failed to create initrd image.\n";
- }
- else {
- rename("$initrd_path.new", "$initrd_path")
- or die("Failed to rename initrd ($initrd_path)\n");
- $success = 1;
- last;
+ } else {
+ $success = 1;
+ last;
}
}
die "Failed to create initrd image.\n" unless $success;
Modified: dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst
==============================================================================
--- dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst (original)
+++ dists/trunk/linux-2.6/debian/templates/temp.image.plain/preinst Wed Feb 18 01:35:38 2009
@@ -178,19 +178,15 @@
# this package.
sub find_inird_tool {
- my $hostversion = shift;
- my $version = shift;
- my @ramdisks =
- grep {
- my $args =
- "$_ " .
- "--supported-host-version=$hostversion " .
- "--supported-target-version=$version " .
- "1>/dev/null 2>&1"
- ;
- system($args) == 0;
- }
- split (/[:,\s]+/, $ramdisk);
+ my $ramdisk = shift;
+ my (@ramdisks, $initramfs_cmd);
+
+ foreach $initramfs_cmd (split(/[:,\s]+/, $ramdisk)) {
+ if (system("test -x \"\$(command -v $initramfs_cmd)\"") == 0) {
+ push(@ramdisks, $initramfs_cmd);
+ }
+ }
+ return @ramdisks;
}
# For some versions of kernel-package, we had this warning in the
@@ -202,7 +198,7 @@
if ($initrd) {
chomp (my $hostversion = `uname -r`);
my @ramdisklist;
- @ramdisklist = find_inird_tool($hostversion, $version, $ramdisk) if $ramdisk;
+ @ramdisklist = find_inird_tool($ramdisk) if $ramdisk;
if ($#ramdisklist < 0) {
my $ret;
my $seen;
More information about the Kernel-svn-changes
mailing list