[DSE-Dev] Bug#1063328: libselinux1t64: /usr-move caused file loss (DEP17)
Helmut Grohne
helmut at subdivi.de
Tue Feb 6 08:27:52 GMT 2024
Package: libselinux1t64
Version: 3.5-2.1~exp1
Severity: serious
Tags: patch
User: helmutg at debian.org
Usertags: dep17p1
Control: affects -1 + libselinux1
X-Debbugs-Cc: vorlon at debian.org
Hi,
The time64 bump for libselinux1 also causes a /usr-move file loss. Since
it is essential, we cannot use Conflicts and hence the protective
diversion has to persist into trixie. I'm attaching a patch for your
convenience.
I note that I could *not* test this patch using piuparts. I am filing a
separate issue about that problem.
Helmut
-------------- next part --------------
diff --minimal -Nru libselinux-3.5/debian/changelog libselinux-3.5/debian/changelog
--- libselinux-3.5/debian/changelog 2024-02-05 09:25:54.000000000 +0100
+++ libselinux-3.5/debian/changelog 2024-02-06 08:49:30.000000000 +0100
@@ -1,3 +1,10 @@
+libselinux (3.5-2.1~exp1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Add DEP17 protective diversion for /usr-move file loss. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Tue, 06 Feb 2024 08:49:30 +0100
+
libselinux (3.5-2.1~exp1) experimental; urgency=medium
* Non-maintainer upload.
diff --minimal -Nru libselinux-3.5/debian/clean libselinux-3.5/debian/clean
--- libselinux-3.5/debian/clean 1970-01-01 01:00:00.000000000 +0100
+++ libselinux-3.5/debian/clean 2024-02-06 08:45:34.000000000 +0100
@@ -0,0 +1,2 @@
+debian/libselinux1t64.preinst
+debian/libselinux1t64.postrm
diff --minimal -Nru libselinux-3.5/debian/libselinux1t64.lintian-overrides libselinux-3.5/debian/libselinux1t64.lintian-overrides
--- libselinux-3.5/debian/libselinux1t64.lintian-overrides 2024-02-05 09:25:54.000000000 +0100
+++ libselinux-3.5/debian/libselinux1t64.lintian-overrides 2024-02-06 08:49:30.000000000 +0100
@@ -1 +1,2 @@
libselinux1t64: package-name-doesnt-match-sonames libselinux1
+diversion-for-unknown-file lib/x86_64-linux-gnu/libselinux.so.1 [preinst:*]
diff --minimal -Nru libselinux-3.5/debian/libselinux1t64.postrm.in libselinux-3.5/debian/libselinux1t64.postrm.in
--- libselinux-3.5/debian/libselinux1t64.postrm.in 1970-01-01 01:00:00.000000000 +0100
+++ libselinux-3.5/debian/libselinux1t64.postrm.in 2024-02-06 08:48:09.000000000 +0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = remove ]; then
+ dpkg-divert --package libselinux1t64 --no-rename --remove --divert "/lib/#DEB_HOST_MULTIARCH#/libselinux.so.1.usr-is-merged" "/lib/#DEB_HOST_MULTIARCH#/libselinux.so.1"
+fi
+
+#DEBHELPER#
+
+exit 0
diff --minimal -Nru libselinux-3.5/debian/libselinux1t64.preinst.in libselinux-3.5/debian/libselinux1t64.preinst.in
--- libselinux-3.5/debian/libselinux1t64.preinst.in 1970-01-01 01:00:00.000000000 +0100
+++ libselinux-3.5/debian/libselinux1t64.preinst.in 2024-02-06 08:48:39.000000000 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = install ]; then
+ # This DEP17 protective diversion should be removed after trixie is released.
+ dpkg-divert --package libselinux1t64 --no-rename --add --divert "/lib/#DEB_HOST_MULTIARCH#/libselinux.so.1.usr-is-merged" "/lib/#DEB_HOST_MULTIARCH#/libselinux.so.1"
+fi
+
+#DEBHELPER#
+
+exit 0
diff --minimal -Nru libselinux-3.5/debian/rules libselinux-3.5/debian/rules
--- libselinux-3.5/debian/rules 2024-02-05 09:25:54.000000000 +0100
+++ libselinux-3.5/debian/rules 2024-02-06 08:49:30.000000000 +0100
@@ -97,3 +97,8 @@
override_dh_makeshlibs:
dh_makeshlibs -plibselinux1t64 --add-udeb="libselinux1-udeb" -V
dh_makeshlibs --remaining-packages
+
+debian/%:debian/%.in
+ sed 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' $< > $@
+
+execute_before_dh_installdeb:debian/libselinux1t64.preinst debian/libselinux1t64.postrm
More information about the SELinux-devel
mailing list