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

Bug#547365: marked as done ("initramfs-tools -d -k foo" is not idempotent)



Your message dated Mon, 05 Apr 2010 22:12:53 +0000
with message-id <E1NyuXN-00082T-Dk@ries.debian.org>
and subject line Bug#547365: fixed in initramfs-tools 0.94
has caused the Debian Bug report #547365,
regarding "initramfs-tools -d -k foo" is not idempotent
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
immediately.)


-- 
547365: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547365
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.93.4

Hi,

The command 'update-initramfs -d -k "$version"' can be used (and is used)
in maintainer scripts to delete a kernel's initrd.  Unfortunately, it is
not idempotent: it exits with nonzero status if the initrd file is
missing from a previous successful run.  So a maintainer script has to
use something like 'update-initramfs -d -k "$version" || :', which is
both counterintuitive and less safe.

Would it be possible to make this command (possibly with another option)
quietly do nothing if no initrd is found?  I understand one wants to
catch typos, but scripts don't make typos. :)  Alternatively, could the
default /etc/kernel/postrm.d/initramfs-tools be changed in some other
way to be idempotent?

Thanks,
Jonathan

Here's how I ran into this problem: The last few times I tried to
purge old kernel packages (different versions each time), I received
messages like the following:

| Removing linux-image-2.6.31-01336-g6a1e85e ...
| update-initramfs: Deleting /boot/initrd.img-2.6.31-01336-g6a1e85e
| Purging configuration files for linux-image-2.6.31-01336-g6a1e85e ...
| Cannot delete /boot/initrd.img-2.6.31-01336-g6a1e85e, doesn't exist.
| run-parts: /etc/kernel/postrm.d/initramfs-tools exited with return code 1
| dpkg: error processing linux-image-2.6.31-01336-g6a1e85e (--purge):
|  subprocess installed post-removal script returned error exit status 1

These kernel packages are built with "make; fakeroot make deb-pkg" from
vanilla upstream kernels.  The linux-image postrm is as follows:

| #!/bin/sh
|
| set -e
| 
| # Pass maintainer script parameters to hook scripts
| export DEB_MAINT_PARAMS="$*"
|
| test -d /etc/kernel/postrm.d && run-parts --arg="2.6.31-01336-g6a1e85e" /etc/kernel/postrm.d
| exit 0

which invokes the only file in postrm.d, /etc/kernel/postrm.d/initramfs-tools:

| #!/bin/sh
|
| # passing the kernel version is required
| [ -z "$1" ] && exit 0
|
| # kernel-package passes an extra arg; hack to not run under kernel-package
| [ -z "$2" ] || exit 0
|
| # delete initramfs
| update-initramfs -d -k "$1"

from initramfs-tools.  It's not clear to me why the initrd is always
missing before this command gets run, but the command should be able to
handle a missing initrd anyway.

update-initramfs bugscript output attached.
-- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.31-05316-g3bada4b root=UUID=9dd1f668-ec78-4bd3-9bc3-b6f6073468f7 ro quiet quiet

-- /proc/filesystems
	ext3

-- lsmod
Module                  Size  Used by
binfmt_misc             7876  1 
microcode               7860  0 
loop                   14684  0 
arc4                    1740  2 
ecb                     2752  2 
ath5k                 135064  0 
mac80211              157104  1 ath5k
ath                     8056  1 ath5k
snd_maestro3           17864  0 
cfg80211              117600  3 ath5k,mac80211,ath
snd_ac97_codec         97748  1 snd_maestro3
rfkill                 19336  1 cfg80211
ac97_bus                1648  1 snd_ac97_codec
led_class               4356  1 ath5k
snd_pcm                69016  2 snd_maestro3,snd_ac97_codec
snd_timer              19540  1 snd_pcm
pcmcia                 25344  0 
snd                    48524  4 snd_maestro3,snd_ac97_codec,snd_pcm,snd_timer
snd_page_alloc          8852  1 snd_pcm
i2c_piix4               9728  0 
shpchp                 29856  0 
video                  19896  0 
yenta_socket           22512  3 
rsrc_nonstatic          9376  1 yenta_socket
parport_pc             30088  0 
dcdbas                  7396  0 
pcspkr                  2536  0 
psmouse                41576  0 
evdev                   9648  15 
i2c_core               22036  1 i2c_piix4
pcmcia_core            34456  3 pcmcia,yenta_socket,rsrc_nonstatic
pci_hotplug            27588  1 shpchp
soundcore               1592  1 snd
button                  5540  0 
output                  2940  1 video
parport                34876  1 parport_pc
processor              32796  1 
ac                      3156  0 
battery                 6628  0 
ext3                  112968  1 
jbd                    45684  1 ext3
mbcache                 7856  1 ext3
sg                     21648  0 
sr_mod                 14732  0 
cdrom                  31364  1 sr_mod
sd_mod                 32296  3 
crc_t10dif              1732  1 sd_mod
uhci_hcd               20604  0 
ata_piix               22920  2 
ehci_hcd               31488  0 
libata                147660  1 ata_piix
scsi_mod              140564  4 sg,sr_mod,sd_mod,libata
usbcore               137280  2 uhci_hcd,ehci_hcd
nls_base                7304  1 usbcore
intel_agp              25644  1 
agpgart                33656  1 intel_agp
floppy                 52140  0 
thermal                13904  0 
fan                     3424  0 
thermal_sys            15176  4 video,processor,thermal,fan
hwmon                   2828  1 thermal_sys

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
postinst_hook = update-grub
postrm_hook   = update-grub

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
BOOT=local
DEVICE=eth0
NFSROOT=auto


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

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:

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



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

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

Debian distribution maintenance software
pp.
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)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 05 Apr 2010 05:25:48 +0200
Source: initramfs-tools
Binary: initramfs-tools
Architecture: source all
Version: 0.94
Distribution: unstable
Urgency: low
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: maximilian attems <maks@debian.org>
Description: 
 initramfs-tools - tools for generating an initramfs
Closes: 415474 433708 465760 487409 506533 519800 523735 524534 525606 533903 534201 535008 536195 541864 543568 545728 547365 548711 554873 559535 559619 560266 561289 562561 565386 565416 567065 567189 568527 569033 570678 572858 573761 574553 575154 575157 576429
Changes: 
 initramfs-tools (0.94) unstable; urgency=low
 .
   * The "Litte Bang" release
 .
   [ maximilian attems ]
   * Nuke kernelextras hooks.
   * Create a klibc hook script.
   * Redefinde MODULES=most to not carry any fb driver per default.
   * Nuke framebuffer boot script.
   * Revert "hook-functions: Add hid_* modules."
   * Move busybox addition to a hook script.
   * mkinitramfs fix comment.
   * hook-functions: Fix mounted /sys check for openvz container.
   * initramfs-tools.8: fix boot example script to execute.
     scripts/functions. (closes: #545728)
   * Fix out-of-date-standards-version.
   * /etc/kernel hook script support for make deb-pkg generated linux-images
     and kernel-package. (closes: #523735, #561289)
   * update-initramfs: allow -t takeover on delete.
   * /etc/kernel/postrm.d/i-t: use now takeover on delete.
     (closes: #524534, #547365, #559619)
   * Nuke useless unused dir.
   * kernel hook scripts: Fix typo, add comments.
   * hook-funcitions: Only warn about missing firmware if /proc/modules
     exists. (closes: #560266, #575154)
   * mkinitramfs: Be opportunistic when calling modprobe thus showing
     errors. (closes: #554873)
   * copy_exec: Check if ldd is around.
   * scripts/local: Use blkid as backup fstype detection. (closes: #568527)
   * mkinitramfs: only copy modprobe conf files. (closes: #506533)
   * blacklist earlier at init-top stage.
   * scripts/local: fix blkid invocation.
   * init: export and unset BOOTIF.
   * init: rexport resume to reallow it's hardcoded usage. (closes: #572858)
   * update-initramfs: -d delete .bak file. (closes: #559535)
   * control: bump standards version without changes.
   * control: Clean up Uploaders field.
   * switch from cdbs to debhelper 7.
   * update-initramfs: Stop second guessing lilo usage. (closes: #574553)
   * mkinitramfs: allow to build initramfs for unmodular linux images.
     (closes: #415474, #433708)
   * initramfs.conf.5: document UMASK variable for sensitive initramfs.
     (closes: #536195)
   * update-initramfs: only run elilo if configured. (closes: #534201)
   * update-initramfs: fix previous elilo commit.
   * MODULES=DEP Use driver/module syfs attribute. (closes: #567189)
   * panic: quote variable.
   * MODULES=DEP: Check rootfs on mkinitramfs. (closes: #519800)
   * Use ata_generic driver on all_generic_ide bootarg
   * scripts/functions: add get_fstype() from scripts/local. (closes: #487409)
   * mkinitramfs.8: update date.
   * Keep acpi modules in initramfs so that udev can load them early.
   * mkinitramfs: no longer copy depmod.
   * init: Silence "Loading essential drivers..." on quiet boot.
   * hook-functions: Add btrfs to base modules.
   * init: export BOOT for casper and friends.
   * hooks/klibc: Keep gzip in initramfs.
   * modernize docs to todays standards.
   * examples: shipp old framebuffer boot script.
   * initramfs.conf.5, update-initramfs.conf.5: Add FILES section.
     (closes: #565386)
   * mkinitramfs: be silent if no modules.map was generated in first place.
   * debian/control: Add a breaks cryptsetup.
 .
   [ Tormod Volden ]
   * blacklist boot hook write to /etc/modprobe.d/initramfs.conf.
     (closes: #541864)
 .
   [ Michael Prokop ]
   * Fix path to nfsroot.txt in documentation.
   * hook-functions: Avoid firmware copy error. (closes: #570678)
 .
   [ Joey Hess ]
   * scripts/local: avoid mount -t unknown. (closes: #567065)
 .
   [ Avi Rozen ]
   * mkinitramfs: add all usb storage devices. (closes: #543568)
 .
   [ Ferenc Wagner ]
   * initramfs-tools: make the panic argument available in the rescue
     shell. (closes: #569033)
 .
   [ Maximilian Gass ]
   * mkinitramfs: KEYMAP option fails to work due to missing keymap.
     (closes: #565416)
 .
   [ Vagrant Cascadian ]
   * configure_networking: support BOOTIF variable set by pxelinux.
     (closes: #535008)
 .
   [ Ben Hutchings ]
   * copy_modules_dir: Take a list of exclusions after the base directory.
   * auto_add_modules: Copy all modules from net, excluding some
     subdirectories.
 .
   [ Scott James Remnant ]
   * init: Mount devtmpfs on /dev.
   * mkinitramfs: Call depmod before packing the initramfs.
     (closes: #465760, #562561)
   * init: load the netconsole module with netconsole bootarg
   * init: mount /dev/pts as well as /dev.
 .
   [ Ben Collins ]
   * update-initramfs: Default to not keep .bak backups.
 .
   [ Piotr Lewandowski ]
   * update-initramfs breaks if /etc/mtab is a symlink to /proc/mounts.
     (closes: #525606)
 .
   [ Martin Michlmayr ]
   * MODULES=dep fix boot with MMC. (closes: #548711)
 .
   [ Nikolaus Schulz ]
   * hook-functions: let dep_add_modules() recurse into lvm slave devices.
     (closes: 573761)
 .
   [ Anna Jonna Armannsdottir ]
   * configure_networking: Try repeatedly ipconfig with increasing
     timeout.
 .
   [ Colin Watson ]
   * mkinitramfs: Filter out looping or broken symlinks from the
     initramfs. (closes: #575157)
   * mkinitramfs: set initramfs root to 755.
 .
   [ Bert Schulze ]
   * initramfs-tools: support different compression tools in mkinitramfs.
     (closes: #533903)
   * mkinitramfs: -c compression support / commandline override.
     (closes: #576429)
Checksums-Sha1: 
 5afd5d57aa19a5c0209eaecc9b1b1f9465753318 922 initramfs-tools_0.94.dsc
 509fb16736997ecba36f641127ceab5bea18f68d 71586 initramfs-tools_0.94.tar.gz
 02aca8c6e29acf625100c1551faf1dbc5b4a17d0 78974 initramfs-tools_0.94_all.deb
Checksums-Sha256: 
 aee9a553dd3844532c464d9f649cbff02928568d037415dc8126bb6591e2b817 922 initramfs-tools_0.94.dsc
 25580b8f761e154cfa4efe6d4657b69b8a6403f7097dcfe2d50c2e64cc6f4e9b 71586 initramfs-tools_0.94.tar.gz
 a8abc65bdbf74bedb0bb77a8079d34b0b0ef8b41adde923e4748a673af770f3c 78974 initramfs-tools_0.94_all.deb
Files: 
 c1dbcaa6efb98082c45257309ba20312 922 utils optional initramfs-tools_0.94.dsc
 0295a063638ef0e44a38ef9fa3d7f93f 71586 utils optional initramfs-tools_0.94.tar.gz
 c66b55ac5c3d7e19cb57057489defa1d 78974 utils optional initramfs-tools_0.94_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAku6RlIACgkQeW7Lc5tEHqh9MgCaAwfEx8qpBHws+lusrsXjVDTP
OTMAmwU4vowqNyQHgtoTdNywtdHts2q5
=MCMB
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: