Subject: Bug#1023127: zfs-linux: please make zfs-{initramfs,dracut} Depend on their respective -core packages

From: наб <[email-masked]>
Date: Sun, 30 Oct 2022 14:40:31 +0100

Source: zfs-linux
Version: 2.1.6-2
Severity: wishlist
Tags: patch

Dear Maintainer,

Currently, zfs-initramfs and zfs-dracut are not co-installable,
because they have Depends: initramfs-tools and dracut, respectively,
and those conflict.

initramfs-tools and dracut are the "please use
initramfs-tools-core/dracut-core to generate system initrds"
integration-only packages.

The actual generation program and plugins are provided in the
-core packages. Please consider the attached patches, based on recent
Salsa, to make them co-installable.

Best,
наб

-- System Information:
Debian Release: 11.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-17-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
From 879ae6c680ee245f1b1daf60991e887993839f1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email-masked]>
Date: Sun, 30 Oct 2022 13:37:46 +0100
Subject: [PATCH 1/2] d/control: zfs-dracut Depends: dracut-core instead of
 dracut

dracut-core contains dracut proper, dracut is the "please use dracut to
generate system initrds" package
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index ba2dbb7d2..571e984e9 100644
--- a/debian/control
+++ b/debian/control
@@ -217,7 +217,7 @@ Description: OpenZFS root filesystem capabilities for Linux - initramfs
 
 Package: zfs-dracut
 Architecture: all
-Depends: dracut,
+Depends: dracut-core,
          zfs-modules | zfs-dkms,
          zfsutils-linux (>= ${source:Version}),
          ${misc:Depends}
-- 
2.37.2

From 4c51ef2fea5097350b4ac3c4933efc1b69cb87ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email-masked]>
Date: Sun, 30 Oct 2022 14:32:52 +0100
Subject: [PATCH 2/2] d/control: zfs-initramfs-tools Depends:
 initramfs-tools-core instead of initramfs-tools

initramfs-tools-core contains initramfs-tools proper, initramfs-tools
is the "please use initramfs-tools to generate system initrds" package
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 571e984e9..297c4ced3 100644
--- a/debian/control
+++ b/debian/control
@@ -201,7 +201,7 @@ Description: OpenZFS filesystem kernel modules for Linux
 Package: zfs-initramfs
 Architecture: all
 Depends: busybox-initramfs | busybox-static | busybox,
-         initramfs-tools,
+         initramfs-tools-core,
          zfs-modules | zfs-dkms,
          zfsutils-linux (>= ${source:Version}),
          ${misc:Depends}
-- 
2.37.2

---

From: Yurii Kolesnykov <[email-masked]>
Date: Sun, 30 Oct 2022 16:03:24 +0200

Dear наб,

I don’t think that proposed patches have a practical value, in fact, they make things worse. 
E.g. I expect to have a working initrd by installing a kernel and zfs-initramfs when I bootstrap a Debian ZFS install.
And I barely imagine a situation when a user uses one of initrd generators and needs to have *-core package of second one installed at the same time.

---

From: наб <[email-masked]>
Date: Sun, 30 Oct 2022 16:36:45 +0100

> E.g. I expect to have a working initrd by installing a kernel and zfs-initramfs when I bootstrap a Debian ZFS install.
You will be delighted to know, then, that this continues to work.

> And I barely imagine a situation when a user uses one of initrd generators and needs to have *-core package of second one installed at the same time.
Conversely, imagining (and being in) such a situation is very easy to me.
This is the reason why they are made co-installable, and only the "bare"
dracut/initramfs-tools packages aren't.

наб

---

From: Aron Xu <[email-masked]>
Date: Fri, 13 Jan 2023 01:20:37 +0800

Hi,

> Salsa, to make them co-installable.

If I understand correctly, the -core packages provide the tools for
generating initramfs, but they'll not automatically update the actual
initramfs image. Depending only on the -core packages looks a bit
unusual for integration packages like zfs-initramfs and zfs-dracut,
for example cryptsetup,dropbear (they do not provide -dracut package,
though), and clevis.

Regards,
Aron

---

From: 陈 晟祺 <[email-masked]>
Date: Fri, 5 Jan 2024 06:46:11 +0000

Control: tag -1 + wontfix

The package is intended for normal users, for whom installing both dracut
and initramfs-tools seems really rare and weird. Also your patch will even render
the system not usable because now initramfs no more updates when zfs upgrades.

> dracut/initramfs-tools packages aren't.

It is possible to further split packages into, e.g., zfs-{initramfs,dracut}-core
that depends on their corresponding underlying -core packages, and make
zfs-{initramfs,dracut} depend on them. However I haven't heard similar
use cases from any other users.

Thanks,
Shengqi Chen