r4455 - in dists/trunk/utils/initramfs-tools: . debian

Sven Luther luther at costa.debian.org
Fri Oct 14 08:08:59 UTC 2005


Author: luther
Date: 2005-10-14 08:08:58 +0000 (Fri, 14 Oct 2005)
New Revision: 4455

Modified:
   dists/trunk/utils/initramfs-tools/debian/changelog
   dists/trunk/utils/initramfs-tools/debian/control
   dists/trunk/utils/initramfs-tools/mkinitramfs
   dists/trunk/utils/initramfs-tools/mkinitramfs.8
Log:
Added --supported-(host|target)-version support for the new post-2.6.13
ramdisk-tool policy. Added linux-ramdisk-tool virtual package too.  (Closes: #333856)


Modified: dists/trunk/utils/initramfs-tools/debian/changelog
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/changelog	2005-10-14 08:06:29 UTC (rev 4454)
+++ dists/trunk/utils/initramfs-tools/debian/changelog	2005-10-14 08:08:58 UTC (rev 4455)
@@ -4,8 +4,13 @@
   * Use new busybox. (closes: #333755)
   * Use mklibs-small.
 
- -- Bastian Blank <waldi at debian.org>  Mon, 10 Oct 2005 18:27:12 +0000
+  [ Sven Luther ]
+  * Added --supported-(host|target)-version support for the new post-2.6.13
+    ramdisk-tool policy. Added linux-ramdisk-tool virtual package too.
+    (Closes: #333856)
 
+ -- Sven Luther <luther at debian.org>  Fri, 14 Oct 2005 08:03:44 +0000
+
 initramfs-tools (0.30) unstable; urgency=low
 
   Apparition Octobre Rouge

Modified: dists/trunk/utils/initramfs-tools/debian/control
===================================================================
--- dists/trunk/utils/initramfs-tools/debian/control	2005-10-14 08:06:29 UTC (rev 4454)
+++ dists/trunk/utils/initramfs-tools/debian/control	2005-10-14 08:08:58 UTC (rev 4455)
@@ -9,6 +9,7 @@
 Package: initramfs-tools
 Architecture: all
 Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-3), mklibs-small
+Provides: linux-ramdisk-tool
 Description: tools for generating an initramfs
  This package contains tools to create and boot an initramfs for prepackaged
  2.6 Linux kernel. The initramfs is an cpio archive. At boot time, the kernel

Modified: dists/trunk/utils/initramfs-tools/mkinitramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-14 08:06:29 UTC (rev 4454)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-14 08:08:58 UTC (rev 4455)
@@ -10,7 +10,7 @@
 # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/"
 BUSYBOXDIR="/bin" 
 
-while getopts "d:ko:r:" flag; do
+while getopts "d:ko:r:-:" flag; do
 	case $flag in
 	d)
 		CONFDIR="${OPTAGS}"
@@ -26,11 +26,34 @@
 	k)
 		keep="y"
 		;;
+	-)
+		case ${OPTARG%=*} in
+			supported-host-version)
+				supported_host_version=${OPTARG#*=}
+				;;
+			supported-target-version)
+				supported_target_version=${OPTARG#*=}
+				;;
+		esac
+		;;
 	esac
 done
 
 shift $((${OPTIND} - 1))
 
+if [ "$supported_host_version" ] || [ "$supported_target_version" ]; then
+	if [ "$supported_host_version" ]; then
+		host_upstream_version=${supported_host_version%%-*}
+	fi
+	if [ "$supported_target_version" ]; then
+		target_upstream_version=${supported_target_version%%-*}
+		if dpkg --compare-versions "$target_upstream_version" lt "2.6.12"; then
+			exit 1
+		fi
+	fi
+	exit 0
+fi
+
 # For dependency ordered mkinitramfs hook scripts.
 . /usr/share/initramfs-tools/scripts/functions
 . /usr/share/initramfs-tools/hook-functions

Modified: dists/trunk/utils/initramfs-tools/mkinitramfs.8
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs.8	2005-10-14 08:06:29 UTC (rev 4454)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs.8	2005-10-14 08:08:58 UTC (rev 4455)
@@ -13,6 +13,13 @@
 .RB [ \-r 
 .IR root ] 
 .RI [ version ]
+
+.B mkinitramfs
+.RB [ \-\-supported-host-version=
+.IR hversion ]
+.RB [ \-\-supported-target-version=
+.IR tversion ]
+
 .SH DESCRIPTION
 The
 .B mkinitramfs 
@@ -20,7 +27,16 @@
 At boot time, the kernel unpacks that archive into ram disk, mounts and 
 uses it as initial root file system. All finding of the root device 
 happens in this early userspace.
+ 
+.PP
 
+The second syntax returns 0 if mkinitramfs can create a ramdisk running on a kernel
+of the given host version (
+.IR hversion
+) and for a kernel of the given target version (
+.IR tversions
+), and 1 otherwise.
+
 .SH OPTIONS
 .TP
 \fB \-d \fI confdir
@@ -42,6 +58,16 @@
 setting in 
 .IR mkinitramfs.conf .
 
+.TP
+\fB\-\-supported-host-version=\fIhversion
+This option queries if mkinitramfs can create ramdisks on a running kernel of version
+.IR hversion .
+
+.TP
+\fB\-\-supported-target-version=\fItversion
+This option queries if mkinitramfs can create ramdisks for kernel version
+.IR tversion .
+
 .SH FILES
 .TP
 .I /etc/mkinitramfs/initramfs.conf




More information about the Kernel-svn-changes mailing list