Bug#1055509: diversions of /sbin/halt and friends

2023-12-22 Thread Daniel Baumann

On 12/22/23 12:30, Helmut Grohne wrote:

I am happy with all of these changes moving to
unstable and trixie.


applied and uploaded both p-l-metapackages and bfh-metapackages to unstable.


Thanks for your patience.


thank you for all your work and help!

Regards,
Daniel



Bug#1055509: diversions of /sbin/halt and friends

2023-12-22 Thread Helmut Grohne
On Fri, Dec 22, 2023 at 12:30:04PM +0100, Helmut Grohne wrote:
> My patch for progress-linux-container and bfh-container fails to remove
> /usr/lib/container on package removal. This probably breaks piuparts. I
> am attaching a followup patch. This defect is unrelated to the /usr-move
> as far as I can tell.

Chris kindly made me aware that I forgot to attach patches.

Helmut
diff --minimal -Nru bfh-metapackages-20211009/debian/bfh-container.postrm 
bfh-metapackages-20211009/debian/bfh-container.postrm
--- bfh-metapackages-20211009/debian/bfh-container.postrm   2023-12-20 
11:10:47.0 +0100
+++ bfh-metapackages-20211009/debian/bfh-container.postrm   2023-12-22 
11:29:03.0 +0100
@@ -13,6 +13,13 @@
do
dpkg-divert --package bfh-container --quiet --remove 
--rename --divert "/usr/lib/container/divert/${FILE}.orig" "/usr/sbin/${FILE}"
done
+
+   if test -d /usr/lib/container; then
+   if test -d /usr/lib/container/divert; then
+   rmdir --ignore-fail-on-non-empty 
/usr/lib/container/divert
+   fi
+   rmdir --ignore-fail-on-non-empty /usr/lib/container
+   fi
;;
 
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --minimal -Nru bfh-metapackages-20211009/debian/bfh-container.preinst 
bfh-metapackages-20211009/debian/bfh-container.preinst
--- bfh-metapackages-20211009/debian/bfh-container.preinst  2023-12-20 
11:10:47.0 +0100
+++ bfh-metapackages-20211009/debian/bfh-container.preinst  2023-12-22 
11:26:27.0 +0100
@@ -4,7 +4,7 @@
 
 case "${1}" in
install|upgrade)
-   mkdir -p /lib/container/divert
+   mkdir -p /usr/lib/container/divert
 
for FILE in halt poweroff reboot shutdown coldreboot
do
diff --minimal -Nru bfh-metapackages-20211009/debian/changelog 
bfh-metapackages-20211009/debian/changelog
--- bfh-metapackages-20211009/debian/changelog  2023-12-20 11:12:25.0 
+0100
+++ bfh-metapackages-20211009/debian/changelog  2023-12-22 11:29:03.0 
+0100
@@ -1,3 +1,10 @@
+bfh-metapackages (20211009-22.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Delete /usr/lib/container/divert on package removal.
+
+ -- Helmut Grohne   Fri, 22 Dec 2023 11:29:03 +0100
+
 bfh-metapackages (20211009-22) experimental; urgency=medium
 
   * Uploading to experimental.
diff --minimal -Nru progress-linux-metapackages-20221002/debian/changelog 
progress-linux-metapackages-20221002/debian/changelog
--- progress-linux-metapackages-20221002/debian/changelog   2023-12-20 
11:26:39.0 +0100
+++ progress-linux-metapackages-20221002/debian/changelog   2023-12-22 
11:44:44.0 +0100
@@ -1,3 +1,10 @@
+progress-linux-metapackages (20221002-11.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Delete /usr/lib/container/divert on package removal.
+
+ -- Helmut Grohne   Fri, 22 Dec 2023 11:44:44 +0100
+
 progress-linux-metapackages (20221002-11) experimental; urgency=medium
 
   * Uploading to experimental.
diff --minimal -Nru 
progress-linux-metapackages-20221002/debian/progress-linux-container.postrm 
progress-linux-metapackages-20221002/debian/progress-linux-container.postrm
--- progress-linux-metapackages-20221002/debian/progress-linux-container.postrm 
2023-12-20 11:25:47.0 +0100
+++ progress-linux-metapackages-20221002/debian/progress-linux-container.postrm 
2023-12-22 11:44:43.0 +0100
@@ -13,6 +13,13 @@
do
dpkg-divert --package progress-linux-container --quiet 
--remove --rename --divert "/usr/lib/container/divert/${FILE}.orig" 
"/usr/sbin/${FILE}"
done
+
+   if test -d /usr/lib/container; then
+   if test -d /usr/lib/container/divert; then
+   rmdir --ignore-fail-on-non-empty 
/usr/lib/container/divert
+   fi
+   rmdir --ignore-fail-on-non-empty /usr/lib/container
+   fi
;;
 
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --minimal -Nru 
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst 
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
--- 
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
2023-12-20 11:26:29.0 +0100
+++ 
progress-linux-metapackages-20221002/debian/progress-linux-container.preinst
2023-12-22 11:44:08.0 +0100
@@ -4,7 +4,7 @@
 
 case "${1}" in
install|upgrade)
-   mkdir -p /lib/container/divert
+   mkdir -p /usr/lib/container/divert
 
for FILE in halt poweroff reboot shutdown coldreboot
do