Package: kexec-tools
Version: 1:2.0.27-1.1
Severity: important
Tags: patch

Hi,

kexec-tools is part of the /usr-move (DEP17) migration due to installing
files into /sbin, which is an aliased location. We want to eliminate
(bad) aliasing effects by not installing any aliased files anymore.
Hence, kexec-tools also needs to move and since it doesn't use dh, it
cannot be moved using dh-sequence-movetousr. Therefore, I'm attaching a
patch to perform the move manualy. Note that this patch must not be
backported to bookworm-backports or earlier. kexec-tools isn't usually
backported, so this likely is not a problem.

Helmut
diff --minimal -Nru kexec-tools-2.0.27/debian/changelog 
kexec-tools-2.0.27/debian/changelog
--- kexec-tools-2.0.27/debian/changelog 2024-04-27 14:49:56.000000000 +0200
+++ kexec-tools-2.0.27/debian/changelog 2024-05-03 12:35:57.000000000 +0200
@@ -1,3 +1,10 @@
+kexec-tools (1:2.0.27-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move files to /usr for DEP17. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 03 May 2024 12:35:57 +0200
+
 kexec-tools (1:2.0.27-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru kexec-tools-2.0.27/debian/kexec-tools.dirs 
kexec-tools-2.0.27/debian/kexec-tools.dirs
--- kexec-tools-2.0.27/debian/kexec-tools.dirs  2023-08-22 18:53:02.000000000 
+0200
+++ kexec-tools-2.0.27/debian/kexec-tools.dirs  2024-05-03 12:34:38.000000000 
+0200
@@ -1,2 +1,2 @@
-sbin
+usr/sbin
 etc/default/kexec.d
diff --minimal -Nru kexec-tools-2.0.27/debian/patches/coldreboot.patch 
kexec-tools-2.0.27/debian/patches/coldreboot.patch
--- kexec-tools-2.0.27/debian/patches/coldreboot.patch  2023-09-17 
19:09:53.000000000 +0200
+++ kexec-tools-2.0.27/debian/patches/coldreboot.patch  2024-05-03 
12:35:21.000000000 +0200
@@ -57,7 +57,7 @@
 +
 +/bin/rm -f $NOKEXECFILE
 +touch $NOKEXECFILE
-+/sbin/reboot $*
++/usr/sbin/reboot $*
 --- /dev/null
 +++ b/kexec/coldreboot.8
 @@ -0,0 +1,25 @@
diff --minimal -Nru kexec-tools-2.0.27/debian/patches/systemd-support.patch 
kexec-tools-2.0.27/debian/patches/systemd-support.patch
--- kexec-tools-2.0.27/debian/patches/systemd-support.patch     2023-10-04 
18:22:02.000000000 +0200
+++ kexec-tools-2.0.27/debian/patches/systemd-support.patch     2024-05-03 
12:35:38.000000000 +0200
@@ -121,7 +121,7 @@
 +}
 +
 +load_kernel () {
-+      test -x /sbin/kexec || exit 0
++      test -x /usr/sbin/kexec || exit 0
 +      test "x`cat /sys/kernel/kexec_loaded`y" = "x1y" && exit 0
 +
 +      if [ -f $NOKEXECFILE ]
@@ -138,9 +138,9 @@
 +      echo "Loading new kernel image into memory"
 +      if [ -z "$INITRD" ]
 +      then
-+              /sbin/kexec -l "$KERNEL_IMAGE" --append="$REAL_APPEND"
++              /usr/sbin/kexec -l "$KERNEL_IMAGE" --append="$REAL_APPEND"
 +      else
-+              /sbin/kexec -l "$KERNEL_IMAGE" --initrd="$INITRD" 
--append="$REAL_APPEND"
++              /usr/sbin/kexec -l "$KERNEL_IMAGE" --initrd="$INITRD" 
--append="$REAL_APPEND"
 +      fi
 +      echo "kexec kernel loaded"
 +}
diff --minimal -Nru kexec-tools-2.0.27/debian/rules 
kexec-tools-2.0.27/debian/rules
--- kexec-tools-2.0.27/debian/rules     2023-10-04 19:59:38.000000000 +0200
+++ kexec-tools-2.0.27/debian/rules     2024-05-03 12:34:51.000000000 +0200
@@ -27,7 +27,7 @@
        dh_testdir
        dh_update_autotools_config
        dh_autoreconf
-       CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" CFLAGS="$(shell 
dpkg-buildflags --get CFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" 
dh_auto_configure -- --prefix=/usr --exec-prefix=/ --sbindir=/sbin 
--mandir=/usr/share/man --datadir=/usr/share
+       CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" CFLAGS="$(shell 
dpkg-buildflags --get CFLAGS)" LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" 
dh_auto_configure -- --prefix=/usr --exec-prefix=/ --sbindir=/usr/sbin 
--mandir=/usr/share/man --datadir=/usr/share
        touch configure-stamp
 
 build: build-arch build-indep
@@ -63,7 +63,7 @@
        [ ! -f 
$(CURDIR)/debian/kexec-tools/usr/lib/kexec-tools-testing/kexec_test.static ] || 
strip $(CURDIR)/debian/kexec-tools/usr/lib/kexec-tools-testing/kexec_test.static
 endif
 
-       install -D -m 0755 debian/kexec-tools/sbin/kexec 
debian/kexec-tools-udeb/sbin/kexec
+       install -D -m 0755 debian/kexec-tools/usr/sbin/kexec 
debian/kexec-tools-udeb/usr/sbin/kexec
 
 binary-indep: build install
 

Reply via email to