Package: openrc,libeinfo1,libeinfo1t64,librc1t64
Version: 0.53-1.1
Severity: serious
Tags: patch
User: helm...@debian.org
Usertags: dep17p1 dep17m2
Control: affects -1 librc1

Hi,

I am sending you a patch for moving files to /usr for DEP17, because
doing so requires mitigations due to time64 having renamed libraries. In
particular, I verified that libeinfo did not actually break ABI.
Therefore, I am proposing to revert the time64 transition for libeinfo.
As a consequence of the reversion, we need fewer /usr-move mitigations.
We still need the mitigation for librc though. I have set the severity
of this bug to serious to prevent libeinfo1t64 from migrating to trixie.
It should either be reverted before migration or it should not be
reverted. If you disagree with the reversion, please lower the severity
of this bug and I'll send a patch that extends the mitigation to
libeinfo. That said, fewer library renames make upgrades less painful.

I've tested the patch using piuparts and with a manual test case
precisely triggering the DEP17 P1 file loss scenario:

mmdebstrap trixie /dev/null --variant=apt --include librc-dev 
--customize-hook='echo "deb http://deb.debian.org/debian sid main" > 
"$1/etc/apt/sources.list.d/sid.list"' --chrooted-customize-hook="apt-get 
update" --customize-hook="upload librc1t64_0.53-1.2_amd64.deb /l.deb" 
--customize-hook="upload librc-dev_0.53-1.2_amd64.deb /d.deb" 
--chrooted-customize-hook="dpkg --auto-deconfigure --unpack /l.deb /d.deb; 
apt-get -y install /l.deb /d.deb" --chrooted-customize-hook="dpkg --verify"

Do note that this patch must not be backported to bookworm-backports or
earlier. If you intend to backport, you must revert both this patch and
the time64 transition for your backport.

I recommend uploading this sooner rather than later, because the
reversion helps people who have not yet upgraded libeinfo to unstable.

Helmut
diff -Nru openrc-0.53/debian/changelog openrc-0.53/debian/changelog
--- openrc-0.53/debian/changelog        2024-02-29 13:48:11.000000000 +0100
+++ openrc-0.53/debian/changelog        2024-03-26 15:56:35.000000000 +0100
@@ -1,3 +1,11 @@
+openrc (0.53-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Revert unnecessary time64 transition for libeinfo
+  * Move files to /usr and mitigate file loss (DEP17) (Closes: #-1).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 26 Mar 2024 15:56:35 +0100
+
 openrc (0.53-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru openrc-0.53/debian/control openrc-0.53/debian/control
--- openrc-0.53/debian/control  2024-02-29 13:48:11.000000000 +0100
+++ openrc-0.53/debian/control  2024-03-26 15:56:35.000000000 +0100
@@ -47,7 +47,7 @@
 Package: librc1t64
 Provides: ${t64:Provides}
 Replaces: librc1
-Breaks: librc1 (<< ${source:Version})
+Conflicts: librc1 (<< ${source:Version})
 Architecture: any
 Section: libs
 Depends: ${misc:Depends},
@@ -84,10 +84,10 @@
  .
  This package provides development files for the runtime library.
 
-Package: libeinfo1t64
-Provides: ${t64:Provides}
-Replaces: libeinfo1
-Breaks: libeinfo1 (<< ${source:Version})
+Package: libeinfo1
+Provides: libeinfo1t64
+Replaces: libeinfo1t64
+Breaks: libeinfo1t64 (<< ${source:Version})
 Architecture: any
 Section: libs
 Depends: ${misc:Depends},
@@ -110,7 +110,7 @@
 Package: libeinfo-dev
 Architecture: any
 Section: libdevel
-Depends: libeinfo1t64 (=${binary:Version}),
+Depends: libeinfo1 (=${binary:Version}),
          ${misc:Depends},
 Multi-Arch: same
 Description: dependency based service manager (pretty console display 
development)
diff -Nru openrc-0.53/debian/libeinfo-dev.links 
openrc-0.53/debian/libeinfo-dev.links
--- openrc-0.53/debian/libeinfo-dev.links       2024-01-22 18:18:38.000000000 
+0100
+++ openrc-0.53/debian/libeinfo-dev.links       2024-03-26 15:56:35.000000000 
+0100
@@ -1,3 +1,3 @@
 #! /usr/bin/dh-exec
 
-lib/${DEB_HOST_MULTIARCH}/libeinfo.so.1 
usr/lib/${DEB_HOST_MULTIARCH}/libeinfo.so
+usr/lib/${DEB_HOST_MULTIARCH}/libeinfo.so.1 
usr/lib/${DEB_HOST_MULTIARCH}/libeinfo.so
diff -Nru openrc-0.53/debian/libeinfo1.install 
openrc-0.53/debian/libeinfo1.install
--- openrc-0.53/debian/libeinfo1.install        1970-01-01 01:00:00.000000000 
+0100
+++ openrc-0.53/debian/libeinfo1.install        2024-03-26 15:56:35.000000000 
+0100
@@ -0,0 +1 @@
+usr/lib/*/libeinfo.so.*
diff -Nru openrc-0.53/debian/libeinfo1t64.install 
openrc-0.53/debian/libeinfo1t64.install
--- openrc-0.53/debian/libeinfo1t64.install     2024-01-22 18:18:38.000000000 
+0100
+++ openrc-0.53/debian/libeinfo1t64.install     1970-01-01 01:00:00.000000000 
+0100
@@ -1 +0,0 @@
-lib/*/libeinfo.so.*
diff -Nru openrc-0.53/debian/libeinfo1t64.lintian-overrides 
openrc-0.53/debian/libeinfo1t64.lintian-overrides
--- openrc-0.53/debian/libeinfo1t64.lintian-overrides   2024-02-29 
13:48:06.000000000 +0100
+++ openrc-0.53/debian/libeinfo1t64.lintian-overrides   1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-libeinfo1t64: package-name-doesnt-match-sonames libeinfo1
diff -Nru openrc-0.53/debian/librc-dev.links openrc-0.53/debian/librc-dev.links
--- openrc-0.53/debian/librc-dev.links  2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/librc-dev.links  2024-03-26 15:56:35.000000000 +0100
@@ -1,3 +1,3 @@
 #! /usr/bin/dh-exec
 
-lib/${DEB_HOST_MULTIARCH}/librc.so.1 usr/lib/${DEB_HOST_MULTIARCH}/librc.so
+usr/lib/${DEB_HOST_MULTIARCH}/librc.so.1 usr/lib/${DEB_HOST_MULTIARCH}/librc.so
diff -Nru openrc-0.53/debian/librc1t64.install 
openrc-0.53/debian/librc1t64.install
--- openrc-0.53/debian/librc1t64.install        2024-01-22 18:18:38.000000000 
+0100
+++ openrc-0.53/debian/librc1t64.install        2024-03-26 15:56:35.000000000 
+0100
@@ -1 +1 @@
-/lib/*/librc.so.*
+/usr/lib/*/librc.so.*
diff -Nru openrc-0.53/debian/librc1t64.lintian-overrides 
openrc-0.53/debian/librc1t64.lintian-overrides
--- openrc-0.53/debian/librc1t64.lintian-overrides      2024-02-29 
13:48:06.000000000 +0100
+++ openrc-0.53/debian/librc1t64.lintian-overrides      2024-03-26 
15:56:35.000000000 +0100
@@ -1 +1,5 @@
 librc1t64: package-name-doesnt-match-sonames librc1
+# begin-remove-after: released:trixie
+# DEP17
+diversion-for-unknown-file lib/*/librc.so.1 [*]
+# end-remove-after
diff -Nru openrc-0.53/debian/librc1t64.postinst 
openrc-0.53/debian/librc1t64.postinst
--- openrc-0.53/debian/librc1t64.postinst       1970-01-01 01:00:00.000000000 
+0100
+++ openrc-0.53/debian/librc1t64.postinst       2024-03-26 15:56:35.000000000 
+0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = configure; then
+       dpkg-divert --no-rename --package librc1t64 --divert 
"/lib/#DEB_HOST_MULTIARCH#/librc.so.1.usr-is-merged" --remove 
"/lib/#DEB_HOST_MULTIARCH#/librc.so.1"
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru openrc-0.53/debian/librc1t64.preinst 
openrc-0.53/debian/librc1t64.preinst
--- openrc-0.53/debian/librc1t64.preinst        1970-01-01 01:00:00.000000000 
+0100
+++ openrc-0.53/debian/librc1t64.preinst        2024-03-26 15:56:35.000000000 
+0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = upgrade || test "$1" = install; then
+       dpkg-divert --no-rename --package librc1t64 --divert 
"/lib/#DEB_HOST_MULTIARCH#/librc.so.1.usr-is-merged" --add 
"/lib/#DEB_HOST_MULTIARCH#/librc.so.1"
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru openrc-0.53/debian/not-installed openrc-0.53/debian/not-installed
--- openrc-0.53/debian/not-installed    2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/not-installed    2024-03-26 15:56:35.000000000 +0100
@@ -1,3 +1,3 @@
-lib/*/librc.so
-lib/*/libeinfo.so
+usr/lib/*/librc.so
+usr/lib/*/libeinfo.so
 usr/share/openrc/support/*
diff -Nru openrc-0.53/debian/openrc.install openrc-0.53/debian/openrc.install
--- openrc-0.53/debian/openrc.install   2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/openrc.install   2024-03-26 15:56:35.000000000 +0100
@@ -1,9 +1,9 @@
 debian/rc              /etc/init.d
 debian/rcS             /etc/init.d
-debian/tmp/bin                /
+debian/tmp/usr/bin            /usr
 debian/tmp/etc                /
-debian/tmp/lib/rc             /lib
-debian/tmp/sbin               /
+debian/tmp/usr/lib/rc         /usr/lib
+debian/tmp/usr/sbin           /usr
 debian/tmp/usr/share/man/man8 /usr/share/man
 usr/share/bash-completion/completions /usr/share/bash-completion/completions/
 usr/share/zsh/site-functions  /usr/share/zsh/site-functions
diff -Nru openrc-0.53/debian/openrc.postrm openrc-0.53/debian/openrc.postrm
--- openrc-0.53/debian/openrc.postrm    2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/openrc.postrm    2024-03-26 15:56:35.000000000 +0100
@@ -3,7 +3,7 @@
 set -e
 
 if [ "${1}" = "purge" ] ; then
-       rm -rf /lib/rc /etc/runlevels
+       rm -rf /lib/rc /usr/lib/rc /etc/runlevels
        rm -f /etc/init.d/transit
 fi
 
diff -Nru openrc-0.53/debian/rc openrc-0.53/debian/rc
--- openrc-0.53/debian/rc       2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/rc       2024-03-26 15:56:35.000000000 +0100
@@ -6,17 +6,17 @@
 # map numbered to named runlevel
 case $1 in
        0 )
-               /sbin/openrc off && /sbin/openrc shutdown && \
+               /usr/sbin/openrc off && /usr/sbin/openrc shutdown && \
                        /etc/init.d/halt stop
                ;;
        1 )
-               exec /sbin/openrc recovery
+               exec /usr/sbin/openrc recovery
                ;;
        6 )
-               /sbin/openrc off && /sbin/openrc reboot && \
+               /usr/sbin/openrc off && /usr/sbin/openrc reboot && \
                        /etc/init.d/reboot stop
                ;;
        * )
-               exec /sbin/openrc default
+               exec /usr/sbin/openrc default
                ;;
 esac
diff -Nru openrc-0.53/debian/rcS openrc-0.53/debian/rcS
--- openrc-0.53/debian/rcS      2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/rcS      2024-03-26 15:56:35.000000000 +0100
@@ -2,4 +2,4 @@
 # Wrapper of OpenRC called from inittab
 
 set -e
-exec /sbin/openrc sysinit
+exec /usr/sbin/openrc sysinit
diff -Nru openrc-0.53/debian/rules openrc-0.53/debian/rules
--- openrc-0.53/debian/rules    2024-01-22 18:18:38.000000000 +0100
+++ openrc-0.53/debian/rules    2024-03-26 15:56:35.000000000 +0100
@@ -4,7 +4,7 @@
 %:
        dh $@
 
-CONFIG_ARGS = --libexecdir=lib -Drootprefix=/
+CONFIG_ARGS = --libexecdir=lib -Drootprefix=/usr
 ifeq ($(DEB_HOST_ARCH_OS),linux)
         CONFIG_ARGS += -Dpam=true
 else
@@ -19,7 +19,7 @@
        # These are symlinks for compatibility reasons, and we don't want
        # them in Debian.
        for file in start-stop-daemon runscript rc service ; do \
-               rm -f $(CURDIR)/debian/openrc/sbin/$${file} ; \
+               rm -f $(CURDIR)/debian/openrc/usr/sbin/$${file} ; \
        done
 
        # As openrc start-stop-daemon executable is removed above, we don't

Reply via email to