Merge ~tdaitx/ubuntu/+source/initramfs-tools:bionic-sru-lp-1667512-lp-1791959 into ubuntu/+source/initramfs-tools:ubuntu/bionic-updates

Proposed by Tiago Stürmer Daitx on 2018-09-18
Status: Superseded
Proposed branch: ~tdaitx/ubuntu/+source/initramfs-tools:bionic-sru-lp-1667512-lp-1791959
Merge into: ubuntu/+source/initramfs-tools:ubuntu/bionic-updates
Diff against target: 79 lines (+38/-2)
4 files modified
debian/changelog (+19/-0)
debian/control (+1/-1)
debian/initramfs-tools.postinst (+17/-0)
update-initramfs (+1/-1)
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre (community) 2018-09-18 Approve on 2018-09-18
Colin Watson optional 2018-09-18 Pending
Review via email: mp+355189@code.launchpad.net

This proposal has been superseded by a proposal from 2018-09-27.

Description of the change

Merge proposal for a Bionic SRU fixing bug 1667512 and bug 1791959.

To post a comment you must log in.
Mathieu Trudel-Lapierre (cyphermox) wrote :

lgtm

review: Approve
834f221... by Tiago Stürmer Daitx on 2018-09-27

fix version comparison

* debian/initramfs-tools.postinst: fix version comparison and
  so it will run for any version earlier than 0.130ubuntu3.5.

Signed-off-by: Tiago Stürmer Daitx <email address hidden>

Unmerged commits

834f221... by Tiago Stürmer Daitx on 2018-09-27

fix version comparison

* debian/initramfs-tools.postinst: fix version comparison and
  so it will run for any version earlier than 0.130ubuntu3.5.

Signed-off-by: Tiago Stürmer Daitx <email address hidden>

250946d... by Tiago Stürmer Daitx on 2018-09-18

Remove orphaned old-dkms initrd files in /boot. (LP: #1791959)

* debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files
  in /boot. (LP: #1791959)

Signed-off-by: Tiago Stürmer Daitx <email address hidden>

2411b06... by Tiago Stürmer Daitx on 2018-09-17

Only sync the filesystem containing the initramfs (LP: #1667512).

- debian/control: add dependency on coreutils >= 8.24.
- update-initramfs: use 'sync -f <initrd image file>'.
Original patch by Colin Watson.

Signed-off-by: Tiago Stürmer Daitx <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index db0465e..a500de1 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,22 @@
6+initramfs-tools (0.130ubuntu3.5) bionic; urgency=medium
7+
8+ * debian/initramfs-tools.postinst: fix version comparison and
9+ so it will run for any version earlier than 0.130ubuntu3.5.
10+
11+ -- Tiago Stürmer Daitx <tiago.daitx@ubuntu.com> Thu, 27 Sep 2018 16:21:37 +0000
12+
13+initramfs-tools (0.130ubuntu3.4) bionic; urgency=medium
14+
15+ [ Colin Watson ]
16+ * [b4804dd] Only sync the filesystem containing the initramfs
17+ (Closes: #882380) (LP: #1667512)
18+
19+ [ Tiago Stürmer Daitx ]
20+ * debian/initramfs-tools.postinst: remove orphaned old-dkms initrd files
21+ in /boot. (LP: #1791959)
22+
23+ -- Tiago Stürmer Daitx <tiago.daitx@ubuntu.com> Tue, 18 Sep 2018 09:18:47 +0000
24+
25 initramfs-tools (0.130ubuntu3.3) bionic; urgency=medium
26
27 [ Scott Moser ]
28diff --git a/debian/control b/debian/control
29index d6cbf21..f3daefd 100644
30--- a/debian/control
31+++ b/debian/control
32@@ -27,7 +27,7 @@ Description: generic modular initramfs generator (automation)
33 Package: initramfs-tools-core
34 Architecture: all
35 Multi-Arch: foreign
36-Depends: ${busybox:Depends}, initramfs-tools-bin (= ${binary:Version}), klibc-utils (>= 2.0.4-8~), cpio, kmod | module-init-tools, udev, ${misc:Depends}
37+Depends: ${busybox:Depends}, initramfs-tools-bin (= ${binary:Version}), klibc-utils (>= 2.0.4-8~), cpio, kmod | module-init-tools, udev, coreutils (>= 8.24), ${misc:Depends}
38 Suggests: bash-completion
39 Breaks: initramfs-tools (<< 0.121~), ${busybox:Breaks}
40 Replaces: initramfs-tools (<< 0.121~)
41diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst
42index 4e35c79..74029bd 100644
43--- a/debian/initramfs-tools.postinst
44+++ b/debian/initramfs-tools.postinst
45@@ -44,4 +44,21 @@ else
46 DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs -u
47 fi
48
49+# Remove all initrd old dkms files for which there is no
50+# corresponding initram image in /boot (LP: #1791959).
51+# One shot only:
52+# - bug only affected users that were upgrading packages
53+# - new users are not affected
54+# - LP: #1515513 took care of removing old dkms together with the kernel
55+if [ "x$1" = xconfigure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.130ubuntu3.5"; then
56+ for old_dkms_file in /boot/initrd-*.img.old-dkms \
57+ /boot/initramfs-*.img.old-dkms \
58+ /boot/initrd.img-*.old-dkms \
59+ /boot/initrd-*.old-dkms; do
60+ if [ ! -e "${old_dkms_file%%.old-dkms}" ]; then
61+ rm -fv "${old_dkms_file}"
62+ fi
63+ done
64+fi
65+
66 #DEBHELPER#
67diff --git a/update-initramfs b/update-initramfs
68index 93a49b2..cec8e62 100755
69--- a/update-initramfs
70+++ b/update-initramfs
71@@ -158,7 +158,7 @@ generate_initramfs()
72 mv -f "${initramfs}.new" "${initramfs}"
73 set_sha1
74 # Guard against an unclean shutdown
75- sync
76+ sync -f "${initramfs}"
77 else
78 mkinitramfs_return="$?"
79 remove_initramfs_bak

Subscribers

People subscribed via source and target branches