Skip to contentSkip to conversation

Bug#804255: Please update initramfs in postinst

DISCUSSION Steve McIntyre 2 participants 4 messages Nov 6, 2015 – Nov 10, 2015

lore
Share & tools
lore
#0 lore raw

Package: xfsprogs
Version: 3.2.1
Severity: important
Tags: d-i

Hi!

Since the move to systemd as the default init system, the initramfs will attempt to fsck and mount both / and /usr (where applicable). To aid this, initramfs-tools will copy necessary filesystem tools into the initramfs when it is generated.

To make this work well, all filesystem tools packages for filesystems that are likely to be used for / and/or /usr should call "update-initramfs -u" in their postinst. This will

(a) ensure that necesssary fsck tools are included in the initramfs generated by debian-installer (see #801961 for an example failure here); and
(b) ensure that bug fixes to fsck tools get included immediately in the initramfs

I've checked your package and I don't see any update-initramfs calls. Please add one. If you'd like help doing that postinst work, I can supply a patch - just ask!

-- System Information:
Debian Release: 8.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages xfsprogs depends on:

ii  libblkid1     2.25.2-6
ii  libc6         2.19-18+deb8u1
ii  libreadline5  5.2+dfsg-2
ii  libuuid1      2.25.2-6

xfsprogs recommends no packages.

Versions of packages xfsprogs suggests:

ii  acl      2.2.52-2
ii  attr     1:2.4.47-2
pn  quota    <none>
pn  xfsdump  <none>

-- no debconf information

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw

Hi Steve,

----- Original Message -----

Quoted 8 lines

Package: xfsprogs
Version: 3.2.1
Severity: important
Tags: d-i

To make this work well, all filesystem tools packages for filesystems that are likely to be used for / and/or /usr should call "update-initramfs -u" in their postinst. This will

OK.

Quoted 2 lines

I've checked your package and I don't see any update-initramfs calls.

(yep, xfsprogs has no postinst at all IIRC)

Quoted 2 lines

Please add one. If you'd like help doing that postinst work, I can supply a patch - just ask!

That would be great, if you don't mind Steve? Many thanks!

cheers.

--
Nathan

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw

Control: tag -1 +patch

Quoted 17 lines · Nathan Scott

Hi Steve,

----- Original Message -----

Quoted 8 lines

Package: xfsprogs
Version: 3.2.1
Severity: important
Tags: d-i

To make this work well, all filesystem tools packages for filesystems that are likely to be used for / and/or /usr should call "update-initramfs -u" in their postinst. This will

OK.

Quoted 2 lines

I've checked your package and I don't see any update-initramfs calls.

Quoted 6 lines

(yep, xfsprogs has no postinst at all IIRC)

Quoted 2 lines

Please add one. If you'd like help doing that postinst work, I can supply a patch - just ask!

That would be great, if you don't mind Steve? Many thanks!

Here's a debdiff of what I've just built. Ignore the NMU version in the changelog...

Signature · 5 lines
Steve McIntyre, Cambridge, UK.                                [email protected]
The two hard things in computing:
 * naming things
 * cache invalidation
 * off-by-one errors                  -- Stig Sandbeck Mathisen
debian/changelog +8 -0
diff -Nru xfsprogs-4.2.0/debian/changelog xfsprogs-4.2.0.1/debian/changelog
@@ -1,3 +1,11 @@
+xfsprogs (4.2.0.1) unstable; urgency=low
+
+  * NMU
+  * * Add a postinst to update the initramfs on install/upgrade.
+    (Closes: #804255)
+
+ -- Steve McIntyre <[email protected]>  Tue, 10 Nov 2015 16:33:59 +0000
+
 xfsprogs (4.2.0) unstable; urgency=low
 
   * New upstream release
debian/postinst +25 -0
diff -Nru xfsprogs-4.2.0/debian/postinst xfsprogs-4.2.0.1/debian/postinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+	configure)
+		if [ -x /usr/sbin/update-initramfs ] && [ -e /etc/initramfs-tools/initramfs.conf ]
+		then
+			update-initramfs -u
+		fi
+		;;
+
+	abort-upgrade|abort-remove|abort-deconfigure)
+
+		;;
+
+	*)
+		echo "postinst called with unknown argument \`${1}'" >&2
+		exit 1
+		;;
+esac
+
+#DEBHELPER#
+
+exit 0

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw

----- Original Message -----

Quoted 5 lines
Quoted 2 lines

[...]
That would be great, if you don't mind Steve? Many thanks!

Here's a debdiff of what I've just built. Ignore the NMU version in the changelog...

Thanks Steve - I believe there's an upstream xfsprogs release pending, so we'll get this uploaded shortly.

cheers.

--
Nathan

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs