diff -Nru open-infrastructure-system-tools-20190301-lts1/debian/changelog open-infrastructure-system-tools-20190301-lts1/debian/changelog
--- open-infrastructure-system-tools-20190301-lts1/debian/changelog	2023-01-30 17:44:04.000000000 +0100
+++ open-infrastructure-system-tools-20190301-lts1/debian/changelog	2024-05-30 19:49:14.000000000 +0200
@@ -1,3 +1,13 @@
+open-infrastructure-system-tools (20190301-lts1-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Helmut Grohne ]
+  * Fix ineffective diversions due to /usr-move (DEP17)
+    (Closes: #1064449)
+
+ -- Chris Hofstaedtler <zeha@debian.org>  Thu, 30 May 2024 19:49:14 +0200
+
 open-infrastructure-system-tools (20190301-lts1-3) sid; urgency=medium
 
   * Uploading to sid.
diff -Nru open-infrastructure-system-tools-20190301-lts1/debian/patches/fixusrmerge.patch open-infrastructure-system-tools-20190301-lts1/debian/patches/fixusrmerge.patch
--- open-infrastructure-system-tools-20190301-lts1/debian/patches/fixusrmerge.patch	1970-01-01 01:00:00.000000000 +0100
+++ open-infrastructure-system-tools-20190301-lts1/debian/patches/fixusrmerge.patch	2024-05-30 19:48:55.000000000 +0200
@@ -0,0 +1,71 @@
+--- open-infrastructure-system-tools-20190301-lts1.orig/system-build/scripts/build/chroot_dpkg
++++ open-infrastructure-system-tools-20190301-lts1/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
+--- open-infrastructure-system-tools-20190301-lts1.orig/system-build/scripts/build/chroot_hostname
++++ open-infrastructure-system-tools-20190301-lts1/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
diff -Nru open-infrastructure-system-tools-20190301-lts1/debian/patches/series open-infrastructure-system-tools-20190301-lts1/debian/patches/series
--- open-infrastructure-system-tools-20190301-lts1/debian/patches/series	2023-01-25 12:37:41.000000000 +0100
+++ open-infrastructure-system-tools-20190301-lts1/debian/patches/series	2024-05-30 19:49:05.000000000 +0200
@@ -1 +1,2 @@
 upstream/0001-ftbfs-asciidoc.patch
+fixusrmerge.patch
