Package: open-infrastructure-system-build
Version: 20190301-lts1-3
User: [email protected]
Usertags: dep17m3
Tags: patch trixie sid
Control: affects -1 + dpkg hostname
Some of the scripts contained in open-infrastructure-systemd-build
divert /sbin/start-stop-daemon and /bin/hostname. These files have been
moved to /usr in unstable to remove aliasing effects arising from the
/usr-merge transition. As a result, these diversions have become
ineffective. I'm attaching a patch that duplicates them to temporarily
cover both locations until we can remove the diversions for aliased
locations post trixie.
Helmut
--- 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