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

Bug#447611: marked as done (update-initramfs triggerisation)

Your message dated Wed, 09 Apr 2008 09:03:38 +0000
with message-id <E1JjWDS-0006Ba-J6@ries.debian.org>
and subject line Bug#447611: fixed in initramfs-tools 0.92
has caused the Debian Bug report #447611,
regarding update-initramfs triggerisation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

447611: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447611
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: initramfs-tools
Version: 0.91b
Severity: wishlist
Tags: patch

The attached patch triggerises the invocation of mkinitramfs by
package maintainer scripts via update-initramfs.

By `triggerises' I mean that the patch arranges for the formulaic
update-initramfs invocations by maintainer scripts (eg of udev, kernel
packages, etc.) to call dpkg-trigger instead of actually doing the
work of update-initramfs and mkinitramfs.  update-initramfs and hence
mkinitramfs will be actually run out of initramfs-tools's postinst
script during trigger processing.  The consequence is that all of the
initramfs updates during a dpkg run are deferred, and instead the
update is done once at the end.

This is achieved by new code in update-initramfs.  This detects the
formulaic invocation by a maintscript, and exec's dpkg-trigger instead
(if the conditions are favourable).  An alternative approach would be
to change all of the packages not to call update-initramfs but instead
to call a new script but this would involve a much more complicated
and lengthy transition for no significant benefit.

The patch is safe to use with a non-triggers-supporting dpkg and in
all transitional states: where the trigger system is not properly set
up yet, update-initramfs does its work as normal.  Note that sid's
dpkg does not yet have the triggers patch merged but there has been
extensive discussion of the design and interfaces for triggers and the
API should IMO be considered stable.

These changes have been tested and released as part of Ubuntu 7.10 aka
`gutsy gibbon'.  The patch below is the consilidation of the results
of our testing.

So we believe that this patch can and should be safely applied to
sid's initramfs-tools straight away.


diff -ruN ../orig/initramfs-tools-0.85eubuntu16/debian/changelog initramfs-tools-0.85eubuntu18/debian/changelog
--- ../orig/initramfs-tools-0.85eubuntu16/debian/changelog	2007-07-31 06:31:15.000000000 +0100
+++ initramfs-tools-0.85eubuntu18/debian/changelog	2007-08-24 15:45:43.000000000 +0100
@@ -1,3 +1,19 @@
+initramfs-tools (0.85eubuntu18) gutsy; urgency=low
+  * Use dpkg-trigger even in our own postinst, unless we're doing
+    trigger processing or the running dpkg version doesn't support
+    reflexive triggers.  This reduces update-initramfs runs from two per
+    upgrade batch to one per batch.
+ -- Ian Jackson <iwj@ubuntu.com>  Fri, 24 Aug 2007 15:45:38 +0100
+initramfs-tools (0.85eubuntu17) gutsy; urgency=low
+  * Use dpkg-trigger (if available and operational) to save on
+    calls to update-initramfs.
+ -- Ian Jackson <iwj@ubuntu.com>  Thu, 16 Aug 2007 16:03:52 +0100
 initramfs-tools (0.85eubuntu16) gutsy; urgency=low
   * Load thermal modules on lpia as well.  This may need to change in
diff -ruN ../orig/initramfs-tools-0.85eubuntu16/debian/initramfs-tools.postinst initramfs-tools-0.85eubuntu18/debian/initramfs-tools.postinst
--- ../orig/initramfs-tools-0.85eubuntu16/debian/initramfs-tools.postinst	2006-12-21 23:32:07.000000000 +0000
+++ initramfs-tools-0.85eubuntu18/debian/initramfs-tools.postinst	2007-08-24 15:45:02.000000000 +0100
@@ -25,9 +25,16 @@
-# Regenerate initramfs on upgrade
-if [ "$1" = "configure" ] && [ -n "$2" ]; then
+# Regenerate initramfs whenever we go to dpkg state `installed'
+if [ "x$1" != xtriggered ] && \
+   dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.5ubuntu10~~'
 	update-initramfs -u
+	# ... this activates the trigger, if triggers are working
+	DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs -u
+	# ... force it to actually happen
diff -ruN ../orig/initramfs-tools-0.85eubuntu16/debian/initramfs-tools.triggers initramfs-tools-0.85eubuntu18/debian/initramfs-tools.triggers
--- ../orig/initramfs-tools-0.85eubuntu16/debian/initramfs-tools.triggers	1970-01-01 01:00:00.000000000 +0100
+++ initramfs-tools-0.85eubuntu18/debian/initramfs-tools.triggers	2007-08-16 16:03:05.000000000 +0100
@@ -0,0 +1 @@
+interest update-initramfs
diff -ruN ../orig/initramfs-tools-0.85eubuntu16/debian/rules initramfs-tools-0.85eubuntu18/debian/rules
--- ../orig/initramfs-tools-0.85eubuntu16/debian/rules	2006-12-21 23:32:07.000000000 +0000
+++ initramfs-tools-0.85eubuntu18/debian/rules	2007-08-16 16:10:49.000000000 +0100
@@ -8,3 +8,7 @@
 	for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \
 	  chmod -R +x $$x; \
+	install -m 644 -o 0 -g 0 debian/initramfs-tools.triggers \
+		debian/initramfs-tools/DEBIAN/triggers
diff -ruN ../orig/initramfs-tools-0.85eubuntu16/update-initramfs initramfs-tools-0.85eubuntu18/update-initramfs
--- ../orig/initramfs-tools-0.85eubuntu16/update-initramfs	2007-04-10 16:07:41.000000000 +0100
+++ initramfs-tools-0.85eubuntu18/update-initramfs	2007-08-16 16:56:23.000000000 +0100
@@ -4,11 +4,24 @@
 set -e
 [ -r ${CONF} ] && . ${CONF}
+if	   $USETRIGGERS						\
+	&& test x"$DPKG_MAINTSCRIPT_PACKAGE" != x		\
+	&& test $# = 1						\
+	&& test x"$1" = x-u					\
+	&& dpkg-trigger --check-supported 2>/dev/null
+	if dpkg-trigger --no-await update-initramfs; then
+		echo "update-initramfs: deferring update (trigger activated)"
+		exit 0
+	fi	
 	if [ -n "${1}" ]; then

--- End Message ---
--- Begin Message ---
Source: initramfs-tools
Source-Version: 0.92

We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive:

  to pool/main/i/initramfs-tools/initramfs-tools_0.92.dsc
  to pool/main/i/initramfs-tools/initramfs-tools_0.92.tar.gz
  to pool/main/i/initramfs-tools/initramfs-tools_0.92_all.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 447611@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
maximilian attems <maks@debian.org> (supplier of updated initramfs-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Wed, 09 Apr 2008 10:42:49 +0200
Source: initramfs-tools
Binary: initramfs-tools
Architecture: source all
Version: 0.92
Distribution: unstable
Urgency: low
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: maximilian attems <maks@debian.org>
 initramfs-tools - tools for generating an initramfs
Closes: 447611 463607 465901 467078 467627 468112 468113 470869 474691
 initramfs-tools (0.92) unstable; urgency=low
   Release "Ogni contrada è patria del ribelle"
   [ maximilian attems ]
   * init: export ROOTFLAGS + ROOTFSTYPE.
   * debian/control: s/XS-Vcs/Vcs/
   * mkinitramfs: Drop gzip -9 option. (closes: #470869)
     Thanks Tollef Fog Heen <tfheen@err.no>.
   * Ignore lintian warnings about empty directories.
   * framebuffer: Let udev create fb devices.
   * framebuffer: Leave tty devices for udev too.
   * manpages: fix  hyphen-used-as-minus-sign
   * init: fix mkdir usage.
   * init: Set proper permissions of /dev/console mknod fallback.
   * scripts/function: Use mknod directly.
   * debian/control: Depend on latest klibc for mknod usage.
   * scripts/functions: fix configure_networking() for multiple interfaces.
     (closes: #467078) Thanks Michal Sojka <sojkam1@fel.cvut.cz>.
   * ps3 nuke useless hardcoded initramfs script. (closes: #468113)
   * resume: Add support for resume_offset swap file suspend to disk.
     (closes: #474691) Thanks Alan Jenkins <alan-jenkins@tuffmail.co.uk>.
   * update-initramfs: Rename function according to reliability fix.
   * hook-functions: Add atl1, cxgb3, e1000e, igb, ipg, niu, sky2 to
     net section of initramfs modules. (closes: #463607)
   * hook-functions: MODULES=dep fix ps3 support.
   * initramfs-tools.8: Small documentation fixes. (closes: #467627)
   [ debian@x.ray.net ]
   * configure_network(): do nothing if device already configured.
     (closes: #465901)
   [ Joey Hess ]
   * update-initramfs: use dpkg-trigger. (closes: #447611)
   [ Luke Yelavich ]
   * update-initramfs: Initramfs generation reliability fixes.
     (closes: #468112)
   [ Fabio M. Di Nitto ]
   *  hook-functions: Add support for sunvnet and sunvdc.
 331235c0dd9e0dfbc2ef8b4065a2c9a9 780 utils optional initramfs-tools_0.92.dsc
 66617c9ca31288fcadeb88e69af2c23d 65089 utils optional initramfs-tools_0.92.tar.gz
 e42742da43870f0544feacbbcd7bb832 71950 utils optional initramfs-tools_0.92_all.deb

Version: GnuPG v1.4.6 (GNU/Linux)


--- End Message ---

Reply to: