summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/upstream')
-rw-r--r--debian/patches/upstream/0002-usr-move.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/debian/patches/upstream/0002-usr-move.patch b/debian/patches/upstream/0002-usr-move.patch
new file mode 100644
index 0000000..0c61fac
--- /dev/null
+++ b/debian/patches/upstream/0002-usr-move.patch
@@ -0,0 +1,73 @@
+diff -Naurp open-infrastructure-system-tools.orig/system-build/scripts/build/chroot_dpkg open-infrastructure-system-tools/system-build/scripts/build/chroot_dpkg
+--- open-infrastructure-system-tools.orig/system-build/scripts/build/chroot_dpkg
++++ open-infrastructure-system-tools/system-build/scripts/build/chroot_dpkg
+@@ -41,9 +41,15 @@ case "${1}" in
+ Create_lockfile .lock
+
+ # Create custom start-stop-daemon program
+- Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon
++ Chroot chroot dpkg-divert --rename --quiet --add /usr/sbin/start-stop-daemon
++ # begin-remove-after: released:trixie
++ # In the bookworm to trixie upgrade, dpkg moves
++ # start-stop-daemon from /sbin to /usr/sbin. Duplicate the
++ # diversion to cover both. DEP17 P3 M18
++ Chroot chroot dpkg-divert --rename --quiet --add --divert /sbin/start-stop-daemon.distrib.usr-is-merged
++ # end-remove-after
+
+-cat > chroot/sbin/start-stop-daemon << EOF
++cat > chroot/usr/sbin/start-stop-daemon << EOF
+ #!/bin/sh
+
+ exit 0
+@@ -89,8 +95,11 @@ EOF
+ Chroot chroot dpkg-divert --rename --quiet --remove /usr/sbin/flash-kernel
+
+ # Remove custom start-stop-daemon program
+- rm -f chroot/sbin/start-stop-daemon
++ rm -f chroot/usr/sbin/start-stop-daemon
++ # begin-remove-after: released:trixie
+ Chroot chroot dpkg-divert --rename --quiet --remove /sbin/start-stop-daemon
++ # end-remove-after
++ Chroot chroot dpkg-divert --rename --quiet --remove /usr/sbin/start-stop-daemon
+
+ # Remove dpkg sync configuration
+ rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build
+diff -Naurp open-infrastructure-system-tools.orig/system-build/scripts/build/chroot_hostname open-infrastructure-system-tools/system-build/scripts/build/chroot_hostname
+--- open-infrastructure-system-tools.orig/system-build/scripts/build/chroot_hostname
++++ open-infrastructure-system-tools/system-build/scripts/build/chroot_hostname
+@@ -46,15 +46,21 @@ case "${1}" in
+ # Create custom hostname
+ Echo_message "Configuring file /bin/hostname"
+
+- Chroot chroot dpkg-divert --rename --quiet --add /bin/hostname
++ Chroot chroot dpkg-divert --rename --quiet --add /usr/bin/hostname
++ # begin-remove-after: released:trixie
++ # In the bookworm to trixie upgrade, hostname moves hostname
++ # from /bin to /usr/bin. Duplicate the diversion to cover both.
++ # DEP17 P3 M18
++ Chroot chroot dpkg-divert --rename --quiet --add --divert /bin/hostname.distrib.usr-is-merged /bin/hostname
++ # end-remove-after
+
+-cat > chroot/bin/hostname << EOF
++cat > chroot/usr/bin/hostname << EOF
+ #!/bin/sh
+
+ echo "localhost.localdomain"
+ EOF
+
+- chmod 755 chroot/bin/hostname
++ chmod 755 chroot/usr/bin/hostname
+
+ # Creating stage file
+ Create_stagefile .build/chroot_hostname
+@@ -79,7 +85,10 @@ EOF
+
+ # Remove custom hostname
+ rm -f chroot/bin/hostname
++ # begin-remove-after: released:trixie
+ Chroot chroot dpkg-divert --rename --quiet --remove /bin/hostname
++ # end-remove-after
++ Chroot chroot dpkg-divert --rename --quiet --remove /usr/bin/hostname
+
+ # Removing stage file
+ rm -f .build/chroot_hostname