[Parted-maintainers] Bug#1067772: parted: move files to /usr for DEP17
Helmut Grohne
helmut at subdivi.de
Tue Mar 26 14:47:33 GMT 2024
Package: parted,libparted2t64,libparted-fs-resize0t64
Version: 3.6-3.1
Severity: important
Tags: patch
User: helmutg at debian.org
Usertags: dep17p1 dep17m2
Control: affects -1 + libparted2 libparted-fs-resize0
Hi Colin,
I'm sending you a /usr-move conversion patch for parted, because it is
one ofthe packages where the interference with the time64 transition is
causing a DEP17 P1 problem. This is not a problem just yet in unstable,
but enabling dh-sequence-movetousr without mitigation would render
parted rc-buggy. The attached patch includes both the conversion and the
mitigation. Please remember that if you want to backport parted to
bookworm-backports or earlier, you must revert both this patch and the
time64 transition.
I looked into whether the time64 transition was avoidable for either
library and concluded that it is necessary for both. I tested the patch
both with piuparts and with a custom upgrade test exercising the
particular /usr-move problem.
mmdebstrap trixie /dev/null --variant=apt --include libparted-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 libparted2t64_3.6-3.2_amd64.deb /l1.deb" --customize-hook="upload libparted-fs-resize0t64_3.6-3.2_amd64.deb /l2.deb" --customize-hook="upload libparted-dev_3.6-3.2_amd64.deb /d.deb" --chrooted-customize-hook="dpkg --auto-deconfigure --unpack /l1.deb /l2.deb /d.deb; apt-get -y install /l1.deb /l2.deb /d.deb" --chrooted-customize-hook="dpkg --verify"
Helmut
-------------- next part --------------
diff -Nru parted-3.6/debian/changelog parted-3.6/debian/changelog
--- parted-3.6/debian/changelog 2024-02-29 20:58:31.000000000 +0100
+++ parted-3.6/debian/changelog 2024-03-26 15:00:20.000000000 +0100
@@ -1,3 +1,10 @@
+parted (3.6-3.2) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Move files to /usr and mitigate loss (DEP17) (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Tue, 26 Mar 2024 15:00:20 +0100
+
parted (3.6-3.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru parted-3.6/debian/control parted-3.6/debian/control
--- parted-3.6/debian/control 2024-02-29 20:58:31.000000000 +0100
+++ parted-3.6/debian/control 2024-03-26 15:00:14.000000000 +0100
@@ -62,7 +62,7 @@
Package: libparted2t64
Replaces: libparted2
-Breaks: libparted2 (<< ${source:Version})
+Conflicts: libparted2 (<< ${source:Version})
Architecture: any
Section: libs
Pre-Depends: ${misc:Pre-Depends}
@@ -81,7 +81,7 @@
Package: libparted-fs-resize0t64
Provides: ${t64:Provides}
Replaces: libparted-fs-resize0
-Breaks: libparted-fs-resize0 (<< ${source:Version})
+Conflicts: libparted-fs-resize0 (<< ${source:Version})
Architecture: any
Section: libs
Pre-Depends: ${misc:Pre-Depends}
diff -Nru parted-3.6/debian/libparted-dev.links parted-3.6/debian/libparted-dev.links
--- parted-3.6/debian/libparted-dev.links 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/libparted-dev.links 2024-03-26 15:00:20.000000000 +0100
@@ -1,2 +1,2 @@
-lib/${DEB_HOST_MULTIARCH}/libparted.so.2 usr/lib/${DEB_HOST_MULTIARCH}/libparted.so
-lib/${DEB_HOST_MULTIARCH}/libparted-fs-resize.so.0 usr/lib/${DEB_HOST_MULTIARCH}/libparted-fs-resize.so
+usr/lib/${DEB_HOST_MULTIARCH}/libparted.so.2 usr/lib/${DEB_HOST_MULTIARCH}/libparted.so
+usr/lib/${DEB_HOST_MULTIARCH}/libparted-fs-resize.so.0 usr/lib/${DEB_HOST_MULTIARCH}/libparted-fs-resize.so
diff -Nru parted-3.6/debian/libparted-fs-resize0-udeb.install parted-3.6/debian/libparted-fs-resize0-udeb.install
--- parted-3.6/debian/libparted-fs-resize0-udeb.install 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/libparted-fs-resize0-udeb.install 2024-03-26 15:00:20.000000000 +0100
@@ -1 +1 @@
-lib/libparted-fs-resize.so.*
+usr/lib/libparted-fs-resize.so.*
diff -Nru parted-3.6/debian/libparted-fs-resize0t64.install parted-3.6/debian/libparted-fs-resize0t64.install
--- parted-3.6/debian/libparted-fs-resize0t64.install 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/libparted-fs-resize0t64.install 2024-03-26 15:00:20.000000000 +0100
@@ -1 +1 @@
-usr/lib/${DEB_HOST_MULTIARCH}/libparted-fs-resize.so.* lib/${DEB_HOST_MULTIARCH}
+usr/lib/${DEB_HOST_MULTIARCH}/libparted-fs-resize.so.*
diff -Nru parted-3.6/debian/libparted-fs-resize0t64.postinst parted-3.6/debian/libparted-fs-resize0t64.postinst
--- parted-3.6/debian/libparted-fs-resize0t64.postinst 1970-01-01 01:00:00.000000000 +0100
+++ parted-3.6/debian/libparted-fs-resize0t64.postinst 2024-03-26 15:00:20.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = configure; then
+ for f in libparted-fs-resize.so.0 libparted-fs-resize.so.0.0.5; do
+ dpkg-divert --no-rename --package libparted-fs-resize0t64 --divert "/lib/#DEB_HOST_MULTIARCH#/$f.usr-is-merged" --remove "/lib/#DEB_HOST_MULTIARCH#/$f"
+ done
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru parted-3.6/debian/libparted-fs-resize0t64.preinst parted-3.6/debian/libparted-fs-resize0t64.preinst
--- parted-3.6/debian/libparted-fs-resize0t64.preinst 1970-01-01 01:00:00.000000000 +0100
+++ parted-3.6/debian/libparted-fs-resize0t64.preinst 2024-03-26 15:00:20.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = upgrade || test "$1" = install; then
+ for f in libparted-fs-resize.so.0 libparted-fs-resize.so.0.0.5; do
+ dpkg-divert --no-rename --package libparted-fs-resize0t64 --divert "/lib/#DEB_HOST_MULTIARCH#/$f.usr-is-merged" --add "/lib/#DEB_HOST_MULTIARCH#/$f"
+ done
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru parted-3.6/debian/libparted2-udeb.install parted-3.6/debian/libparted2-udeb.install
--- parted-3.6/debian/libparted2-udeb.install 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/libparted2-udeb.install 2024-03-26 15:00:20.000000000 +0100
@@ -1 +1 @@
-lib/libparted.so.*
+usr/lib/libparted.so.*
diff -Nru parted-3.6/debian/libparted2t64.install parted-3.6/debian/libparted2t64.install
--- parted-3.6/debian/libparted2t64.install 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/libparted2t64.install 2024-03-26 15:00:20.000000000 +0100
@@ -1 +1 @@
-usr/lib/${DEB_HOST_MULTIARCH}/libparted.so.* lib/${DEB_HOST_MULTIARCH}
+usr/lib/${DEB_HOST_MULTIARCH}/libparted.so.*
diff -Nru parted-3.6/debian/libparted2t64.postinst parted-3.6/debian/libparted2t64.postinst
--- parted-3.6/debian/libparted2t64.postinst 1970-01-01 01:00:00.000000000 +0100
+++ parted-3.6/debian/libparted2t64.postinst 2024-03-26 15:00:20.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = configure; then
+ for f in libparted.so.2 libparted.so.2.0.5; do
+ dpkg-divert --no-rename --package libparted2t64 --divert "/lib/#DEB_HOST_MULTIARCH#/$f.usr-is-merged" --remove "/lib/#DEB_HOST_MULTIARCH#/$f"
+ done
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru parted-3.6/debian/libparted2t64.preinst parted-3.6/debian/libparted2t64.preinst
--- parted-3.6/debian/libparted2t64.preinst 1970-01-01 01:00:00.000000000 +0100
+++ parted-3.6/debian/libparted2t64.preinst 2024-03-26 15:00:20.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = upgrade || test "$1" = install; then
+ for f in libparted.so.2 libparted.so.2.0.5; do
+ dpkg-divert --no-rename --package libparted2t64 --divert "/lib/#DEB_HOST_MULTIARCH#/$f.usr-is-merged" --add "/lib/#DEB_HOST_MULTIARCH#/$f"
+ done
+fi
+# end-remove-after
+
+#DEBHELPER#
diff -Nru parted-3.6/debian/parted-udeb.install parted-3.6/debian/parted-udeb.install
--- parted-3.6/debian/parted-udeb.install 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/parted-udeb.install 2024-03-26 15:00:20.000000000 +0100
@@ -1 +1 @@
-sbin
+usr/sbin
diff -Nru parted-3.6/debian/parted.install parted-3.6/debian/parted.install
--- parted-3.6/debian/parted.install 2023-06-27 00:34:57.000000000 +0200
+++ parted-3.6/debian/parted.install 2024-03-26 15:00:20.000000000 +0100
@@ -1,3 +1,3 @@
-sbin
+usr/sbin
usr/share/man/man8/parted.8
usr/share/man/man8/partprobe.8
diff -Nru parted-3.6/debian/rules parted-3.6/debian/rules
--- parted-3.6/debian/rules 2024-02-29 20:58:29.000000000 +0100
+++ parted-3.6/debian/rules 2024-03-26 15:00:20.000000000 +0100
@@ -12,7 +12,7 @@
export DEB_BUILD_MAINT_OPTIONS := hardening=+all
-CONFFLAGS := --sbindir=/sbin --enable-mtrace --enable-shared
+CONFFLAGS := --sbindir=/usr/sbin --enable-mtrace --enable-shared
CONFFLAGS += --disable-gcc-warnings
# Enable device-mapper only on Linux
@@ -26,7 +26,7 @@
CONFFLAGS_UDEB := $(CONFFLAGS)
# Options specific to the udeb build.
-CONFFLAGS_UDEB += ac_cv_header_execinfo_h=no --libdir=/lib
+CONFFLAGS_UDEB += ac_cv_header_execinfo_h=no --libdir=/usr/lib
CONFFLAGS_UDEB += --disable-static --without-readline
%:
@@ -62,7 +62,7 @@
$(MAKE) -C build-udeb/libparted install DESTDIR=$(CURDIR)/debian/tmp-udeb
$(MAKE) -C build-udeb/parted install DESTDIR=$(CURDIR)/debian/tmp-udeb
rm -f debian/tmp/usr/lib/*/*.la
- rm -f debian/tmp-udeb/lib/*.la debian/tmp-udeb/lib/*.so
+ rm -f debian/tmp-udeb/usr/lib/*.la debian/tmp-udeb/usr/lib/*.so
override_dh_install:
dh_install -Nparted-udeb -Nlibparted2-udeb -Nlibparted-fs-resize0-udeb
More information about the Parted-maintainers
mailing list