Hi, Here's 2 patches to apply to the Git. The first one ACK the last NMU (I did a debdiff and just applied the result), and the 2nd one is the actual fix for this bug.
Could you please review the patch and let me know if you think it's ok, apply to the git, and allow me to upload? Cheers, Thomas Goirand (zigo)
>From d8b192c4fee504c0334ee632bc0a631ae26ca0ec Mon Sep 17 00:00:00 2001 From: Thomas Goirand <z...@debian.org> Date: Mon, 4 Dec 2017 15:34:35 +0100 Subject: [PATCH 1/2] ACK nmu: 20151214+nmu1 --- debian/changelog | 16 ++++++++++++++++ debian/control | 2 ++ debian/live-tools.init | 6 ++++-- debian/live-tools.service | 14 ++++++++++++++ debian/rules | 2 +- 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 debian/live-tools.service diff --git a/debian/changelog b/debian/changelog index cd25a7c..69a1b46 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +live-tools (1:20151214+nmu1) unstable; urgency=medium + + * Non-maintainer upload. + * Add a native live-tools.service unit (Closes: #796627) + * Add dh-systemd build-dependency and use "--with systemd" for above. + * Source /lib/lsb/init-functions in init script + - fixes lintian warning: init.d-script-does-not-source-init-functions + which means if someone directly invokes the init script under + systemd then the systemd LSB hooks will redirect to systemctl. + * Add lsb-base dependency because of the above. + * Fix up path in init script to make it actually do something + (/bin/live-media-eject -> /bin/live-medium-eject) + Thanks to Felipe Sateler for spotting this. + + -- Andreas Henriksson <andr...@fatal.se> Thu, 09 Jun 2016 16:07:07 +0200 + live-tools (1:20151214) unstable; urgency=medium [ Carlos Zuferri ] diff --git a/debian/control b/debian/control index ea8d408..03983c6 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Maintainer: Live Systems Maintainers <debian-l...@lists.debian.org> Uploaders: Iain R. Learmonth <i...@debian.org> Build-Depends: debhelper (>= 9), + dh-systemd (>= 1.5), Standards-Version: 3.9.6 Homepage: https://debian-live.alioth.debian.org/live-tools/ Vcs-Browser: http://anonscm.debian.org/cgit/debian-live/live-tools.git @@ -13,6 +14,7 @@ Vcs-Git: http://anonscm.debian.org/git/debian-live/live-tools.git Package: live-tools Architecture: all Depends: + lsb-base, initramfs-tools, ${misc:Depends}, Suggests: diff --git a/debian/live-tools.init b/debian/live-tools.init index 1b22e35..3afc682 100644 --- a/debian/live-tools.init +++ b/debian/live-tools.init @@ -16,11 +16,13 @@ # X-Interactive: true ### END INIT INFO +. /lib/lsb/init-functions + case "${1}" in stop) - if [ -e /bin/live-media-eject ] + if [ -e /bin/live-medium-eject ] then - /bin/live-media-eject ${@} + /bin/live-medium-eject ${@} fi ;; diff --git a/debian/live-tools.service b/debian/live-tools.service new file mode 100644 index 0000000..53499b7 --- /dev/null +++ b/debian/live-tools.service @@ -0,0 +1,14 @@ +[Unit] +Documentation=man:live-tools(7) +Description=live-tools - System Support Scripts +DefaultDependencies=no +Before=shutdown.target +Conflicts=shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStop=/bin/live-medium-eject + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index 1ef2425..5761e15 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh ${@} --parallel + dh ${@} --parallel --with systemd override_dh_auto_install: dh_auto_install -- 2.11.0
>From 47e1efc42f15f2ade829e7f84a12fe2cbf8eb669 Mon Sep 17 00:00:00 2001 From: Thomas Goirand <z...@debian.org> Date: Mon, 4 Dec 2017 15:34:08 +0100 Subject: [PATCH 2/2] Fix crashing update-initramfs when upgrading the live system. (Closes: #882769). --- bin/live-update-initramfs | 22 +++++++++++++++------- debian/changelog | 8 ++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/bin/live-update-initramfs b/bin/live-update-initramfs index 3cdbed3..93dfdbd 100755 --- a/bin/live-update-initramfs +++ b/bin/live-update-initramfs @@ -63,21 +63,29 @@ case "${_READ_WRITE}" in for _INITRD in /boot/initrd.img-* do _VERSION="$(basename ${_INITRD} | sed -e 's|initrd.img-||')" - - cp /boot/vmlinuz-${_VERSION} /lib/live/mount/medium/live/vmlinuz${_NUMBER}.new cp /boot/initrd.img-${_VERSION} /lib/live/mount/medium/live/initrd${_NUMBER}.img.new - - mv /lib/live/mount/medium/live/vmlinuz${_NUMBER}.new /lib/live/mount/medium/live/vmlinuz${_NUMBER} mv /lib/live/mount/medium/live/initrd${_NUMBER}.img.new /lib/live/mount/medium/live/initrd${_NUMBER}.img - _NUMBER="$((${_NUMBER} + 1))" done else - cp /boot/vmlinuz-* /lib/live/mount/medium/live/vmlinuz.new cp /boot/initrd.img-* /lib/live/mount/medium/live/initrd.img.new + mv /lib/live/mount/medium/live/initrd.img.new /lib/live/mount/medium/live/initrd.img + fi + if [ "$(ls /boot/vmlinuz-* | wc -l)" -gt 1 ] + then + _NUMBER="1" + + for _VMLINUZ in /boot/vmlinuz-* + do + _VERSION="$(basename ${_VMLINUZ} | sed -e 's|vmlinuz-||')" + cp /boot/vmlinuz-${_VERSION} /lib/live/mount/medium/live/vmlinuz${_NUMBER}.new + mv /lib/live/mount/medium/live/vmlinuz${_NUMBER}.new /lib/live/mount/medium/live/vmlinuz${_NUMBER} + _NUMBER="$((${_NUMBER} + 1))" + done + else + cp /boot/vmlinuz-* /lib/live/mount/medium/live/vmlinuz.new mv /lib/live/mount/medium/live/vmlinuz.new /lib/live/mount/medium/live/vmlinuz - mv /lib/live/mount/medium/live/initrd.img.new /lib/live/mount/medium/live/initrd.img fi ;; diff --git a/debian/changelog b/debian/changelog index 69a1b46..eb23afa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +live-tools (1:20151214+nmu2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix crashing update-initramfs when upgrading the live system. + (Closes: #882769). + + -- Thomas Goirand <z...@debian.org> Mon, 04 Dec 2017 15:35:27 +0100 + live-tools (1:20151214+nmu1) unstable; urgency=medium * Non-maintainer upload. -- 2.11.0