Your message dated Fri, 11 Dec 2020 20:48:44 +0000
with message-id <[email protected]>
and subject line Bug#970213: fixed in systemd 247.1-4
has caused the Debian Bug report #970213,
regarding systemd: kernel/install.d/85-initrd.install: Please don't duplicate 
initrd in ESP when an explicit one was passed
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 [email protected]
immediately.)


-- 
970213: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970213
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 246.4-1
Severity: wishlist
Tags: patch

Dear Maintainer,

kernel/install.d/85-initrd.install installs /boot/initrd.img-$VER
to ESP/$MID/$VER/initrd unconditionally, even when an explicit path was
passed.

However, upstream's 90-loaderentry.install already does this,
and installs the initrds it gets to their basenames under ESP/$MID/$VER/

This means, that by default, when running
  kernel-install add $(uname -r) /boot/vmlinuz-$(uname -r) 
/boot/initrd.img-$(uname -r)
a new installation produced
  /boot/efi/62dd03a4928c412180b3024ac6c03a90/5.8.0-1-amd64/linux
  /boot/efi/62dd03a4928c412180b3024ac6c03a90/5.8.0-1-amd64/initrd
  
/boot/efi/62dd03a4928c412180b3024ac6c03a90/5.8.0-1-amd64/initrd.img-5.8.0-1-amd64
with a configuration pointing to the latter initrd,
this is wasteful at best and confusing at worst.

This doesn't break the case of no initrd being specified,
since 90-loaderentry.install falls back to ESP/$MID/$VER/initrd,
and that's the point of this.

Attached is patch for this and another one to match the installation
process and (partially) messages to 90-loaderentry.install's.

Best,
наб

-- Package-specific info:

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 5.7.0-3-686-pae (SMP w/2 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd depends on:
ii  adduser                          3.118
ii  libacl1                          2.2.53-8
ii  libapparmor1                     2.13.4-3
ii  libaudit1                        1:2.8.5-3+b1
ii  libblkid1                        2.36-3
ii  libc6                            2.31-3
ii  libcap2                          1:2.43-1
ii  libcrypt1                        1:4.4.17-1
ii  libcryptsetup12                  2:2.3.4-1
ii  libgcrypt20                      1.8.6-2
ii  libgnutls30                      3.6.14-2+b1
ii  libgpg-error0                    1.38-2
ii  libidn2-0                        2.3.0-1
ii  libip4tc2                        1.8.5-3
ii  libkmod2                         27+20200310-2
ii  liblz4-1                         1.9.2-2
ii  liblzma5                         5.2.4-1+b1
ii  libmount1                        2.36-3
ii  libpam0g                         1.3.1-5
ii  libpcre2-8-0                     10.34-7
ii  libseccomp2                      2.4.3-1+b1
ii  libselinux1                      3.1-2
ii  libsystemd0                      246.4-1
ii  libzstd1                         1.4.5+dfsg-4
ii  mount                            2.36-3
ii  systemd-timesyncd [time-daemon]  246.4-1
ii  util-linux                       2.36-3

Versions of packages systemd recommends:
ii  dbus  1.12.20-1

Versions of packages systemd suggests:
ii  policykit-1        0.105-29
ii  systemd-container  246.4-1

Versions of packages systemd is related to:
ii  dracut           050+65-1
pn  initramfs-tools  <none>
ii  libnss-systemd   246.4-1
ii  libpam-systemd   246.4-1
ii  udev             246.4-1

-- Configuration Files:
/etc/systemd/journald.conf changed [not included]
/etc/systemd/logind.conf changed [not included]
/etc/systemd/sleep.conf changed [not included]

-- no debconf information
From 1ce2bb6e8b7f80c19969a59c3dd8ca7869816d82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Sun, 13 Sep 2020 04:18:17 +0200
Subject: [PATCH 1/2] debian/extra/kernel-install.d/85-initrd.install: Don't
 install initrd when an explicit path was passed
X-Mutt-PGP: OS

---
 debian/extra/kernel-install.d/85-initrd.install | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/extra/kernel-install.d/85-initrd.install b/debian/extra/kernel-install.d/85-initrd.install
index ee6974d..8868ff9 100755
--- a/debian/extra/kernel-install.d/85-initrd.install
+++ b/debian/extra/kernel-install.d/85-initrd.install
@@ -20,6 +20,12 @@ if [ "$COMMAND" != add ]; then
     exit 1
 fi
 
+if [ "$#" -ge 5 ]; then
+    # An explicit initrd path was passed, 90-loaderentry.install knows how to handle this;
+    # copying here would just duplicate the file, since the basename is very likely different
+    exit 0
+fi
+
 if [ -e "$INITRD_SRC" ];then
     cp "$INITRD_SRC" "$INITRD_DEST"
 else
-- 
2.28.0

From 9d71179646651ce14ae8a0e4cf523743f0886f19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Sun, 13 Sep 2020 04:44:15 +0200
Subject: [PATCH 2/2] debian/extra/kernel-install.d/85-initrd.install: match
 initrd (un)installation to 90-loaderentry.install
X-Mutt-PGP: OS

---
 debian/extra/kernel-install.d/85-initrd.install | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/debian/extra/kernel-install.d/85-initrd.install b/debian/extra/kernel-install.d/85-initrd.install
index 8868ff9..e82e510 100755
--- a/debian/extra/kernel-install.d/85-initrd.install
+++ b/debian/extra/kernel-install.d/85-initrd.install
@@ -11,8 +11,7 @@ INITRD_SRC="/boot/initrd.img-$KERNEL_VERSION"
 INITRD_DEST="$BOOT_DIR_ABS/initrd"
 
 if [ "$COMMAND" = remove ]; then
-    rm -f "$INITRD_DEST"
-    exit 0
+    exec rm -f "$INITRD_DEST"
 fi
 
 if [ "$COMMAND" != add ]; then
@@ -26,8 +25,14 @@ if [ "$#" -ge 5 ]; then
     exit 0
 fi
 
-if [ -e "$INITRD_SRC" ];then
-    cp "$INITRD_SRC" "$INITRD_DEST"
+if [ -e "$INITRD_SRC" ]; then
+    [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing '$INITRD_SRC' as '$INITRD_DEST'"
+    cp "$INITRD_SRC" "$INITRD_DEST" &&
+    chown root:root "$INITRD_DEST" &&
+    chmod 0644 "$INITRD_DEST" || {
+        echo "Could not copy '$INITRD_SRC' to '$INITRD_DEST'." >&2
+        exit 1
+    }
 else
     echo "$INITRD_SRC does not exist, not installing an initrd"
 fi
-- 
2.28.0

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: systemd
Source-Version: 247.1-4
Done: Michael Biebl <[email protected]>

We believe that the bug you reported is fixed in the latest version of
systemd, which is due to be installed in the Debian FTP archive.

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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Biebl <[email protected]> (supplier of updated systemd 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 11 Dec 2020 20:25:31 +0100
Source: systemd
Architecture: source
Version: 247.1-4
Distribution: unstable
Urgency: medium
Maintainer: Debian systemd Maintainers 
<[email protected]>
Changed-By: Michael Biebl <[email protected]>
Closes: 970213 976699
Changes:
 systemd (247.1-4) unstable; urgency=medium
 .
   [ наб ]
   * debian/extra/kernel-install.d/85-initrd.install: Don't install initrd when
     an explicit path was passed (Closes: #970213)
   * debian/extra/kernel-install.d/85-initrd.install: Match initrd installation
     messages and uninstallation to 90-loaderentry.install
 .
   [ Michael Biebl ]
   * sd-device: keep escaped strings in DEVLINK= property (Closes: #976699)
Checksums-Sha1:
 a85a2e8aad92087f3d76be1caaf8c3fe2112ccec 5167 systemd_247.1-4.dsc
 1a3ff1e111efdfe4042f95bb23f475127fd2f963 153008 systemd_247.1-4.debian.tar.xz
 c6e36532d9e58d3ef7ed287544cd1f661a248d5e 9469 systemd_247.1-4_source.buildinfo
Checksums-Sha256:
 db903391f0bedc02f69ee338a515ff7b51ac98fe17a7ced47f8ddbed81018b99 5167 
systemd_247.1-4.dsc
 01b6960ac03a9c1837522cd5fe279be4124d13ec65975f9928ef3332d5a45b73 153008 
systemd_247.1-4.debian.tar.xz
 53a230d9d26a3a5490ca0468550c59f676b3ffc316c9c6c9e03a25a2fdab6923 9469 
systemd_247.1-4_source.buildinfo
Files:
 9f42bdad5e653732aa075741366a0457 5167 admin optional systemd_247.1-4.dsc
 635abd2e3b1ba58a702a2a56c9408c20 153008 admin optional 
systemd_247.1-4.debian.tar.xz
 90cdbd8d23c4f741f6a005b2ce15ac58 9469 admin optional 
systemd_247.1-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEECbOsLssWnJBDRcxUauHfDWCPItwFAl/T0TMACgkQauHfDWCP
Itx4Yw//YgKKBBGBiUQ0YNg25eAW0SVtp74xVQxEgkJas2ms1uqaMhlrQzZzg0wZ
70hcOaw6yRJtQ2VThxHqeKppY4hVUW3+TU1wGhYGUSb6tL48adMfcxulVpJn0uu3
KmH9yvJd/5og8HjMBkl1rbiGuBGjJUKRTf8nbtzOvT9m8nB6rXfySYOO9oviadnD
7PpjKC1oc/RWpZCEszyWAGuMJj4Jd34aK1H7Jc+BSTlNhOvlV+2tzZtkXyhL+aUA
FT85poogkiIjXx1w45xtJM2lqSVuAqRuOktR1SDnHXnp/g/msbyCd/bFsHcpserU
CWWWmjBJxw4EQqFw+G0ZGUpblNxBCl0fpU/o56bjw2o8/Y/reI8uqPyq2qb4DgI8
lrvsrgNnYJtGU5rsqyoRsK4ktFDmOqDqlieswheXQUingpqRu7tD8lqS+lrvrpY9
lsE5IFMH+x5pXsPYLYGrohDZqisG2KP8Wi/XcbpD/4PZCr9aZFewIPgaSxE6Z+s6
4ObvErfKdim68a7JU55wTtWbZYn8Yzrw1qLEoZj920sE68+l0ITyDbFrI2JSuFG1
taNhLUyssKXmM917VFCYkMPFbGmWKfp75mC+AMJSWiDXZX9DiFdLNcikEqF7nQ6Z
QHNLWLK4/SJhLhjYWJ2pGhcHdqifTzWMck7qXV3NfRw1sNupcGI=
=YGWj
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to