From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH zfsonlinux 1/5] cherry-pick usr-merge fix for libzfs6linux
Date: Tue, 27 May 2025 18:12:39 +0200 [thread overview]
Message-ID: <20250527161243.918116-2-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20250527161243.918116-1-s.ivanov@proxmox.com>
moving file canonical locations from e.g. /lib to /usr/lib (usr-merge)
while renaming a package (libzfs4linux -> libzfs6linux) could result
in file deletions during upgrades. The following workaround has been
used in debian upstream.
see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092598 for the
details.
based on commit 0431247714965007bc156fd57852689b395b2bae
https://salsa.debian.org/zfsonlinux-team/zfs/
Originally-by: Shengqi Chen <harry-chen@outlook.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
debian/libzfs6linux.postrm | 15 +++++++++++++++
debian/libzfs6linux.preinst | 16 ++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 debian/libzfs6linux.postrm
create mode 100644 debian/libzfs6linux.preinst
diff --git a/debian/libzfs6linux.postrm b/debian/libzfs6linux.postrm
new file mode 100644
index 000000000..ae6478653
--- /dev/null
+++ b/debian/libzfs6linux.postrm
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = remove; then
+ # DEP17 P1 M8. Clean up after libzfs6linux.preinst. This code should be
+ # removed once the diversions are deleted via postinst.
+ for lib in zfs_core.so.3 zfs_core.so.3.0.0; do
+ dpkg-divert --package libzfs6linux --no-rename --divert "/lib/#DEB_HOST_MULTIARCH#/lib$lib.usr-is-merged" --remove "/lib/#DEB_HOST_MULTIARCH#/lib$lib"
+ done
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libzfs6linux.preinst b/debian/libzfs6linux.preinst
new file mode 100644
index 000000000..6d1870785
--- /dev/null
+++ b/debian/libzfs6linux.preinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = install -o "$1" = upgrade; then
+ # DEP17 P1 M8: Divert aliased files to avoid their removal deleting the
+ # moved ones. These diversions should be removed via postinst once
+ # trixie is released.
+ for lib in zfs_core.so.3 zfs_core.so.3.0.0; do
+ dpkg-divert --package libzfs6linux --no-rename --divert "/lib/#DEB_HOST_MULTIARCH#/lib$lib.usr-is-merged" --add "/lib/#DEB_HOST_MULTIARCH#/lib$lib"
+ done
+fi
+
+#DEBHELPER#
+
+exit 0
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-27 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 16:12 [pve-devel] [PATCH zfsonlinux 0/5] port some changes from salsa.d.o Stoiko Ivanov
2025-05-27 16:12 ` Stoiko Ivanov [this message]
2025-05-27 16:12 ` [pve-devel] [PATCH zfsonlinux 2/5] d/: move some tools out of /usr/sbin and add links for compatibility Stoiko Ivanov
2025-05-27 16:12 ` [pve-devel] [PATCH zfsonlinux 3/5] usr-merge: synchronize debian/ with upstream Stoiko Ivanov
2025-05-27 16:12 ` [pve-devel] [PATCH zfsonlinux 4/5] d/control: record conflict with nordugrid-arc-client Stoiko Ivanov
2025-05-27 16:12 ` [pve-devel] [PATCH zfsonlinux 5/5] d/lintian-overrides: adapt to renamed tags Stoiko Ivanov
2025-06-02 14:24 ` [pve-devel] applied-series: [PATCH zfsonlinux 0/5] port some changes from salsa.d.o Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250527161243.918116-2-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal