Source: zfs-linux
Version: 2.4.3-2
Severity: normal
Tags: d-i patch
X-Debbugs-Cc: [email protected], [email protected]

Dear Maintainer,

I am working on debian-installer addon module which would make zfs
modules and tools available in Debian installer. This addon is building
zfs modules and tools from source in debootstraped chroot to avoid zfs
binaries bundling. For that I am using zfs-linux source package.

debian/README.Source documents building udeb packages with
BUILD_UDEB=true, but this is broken. Problems I found when trying it on
trixie with zfs 2.4.3 from backports:

- debian/rules still uses old package names (libzfs5-udeb,
  libzpool6-udeb) in the BUILD_UDEB blocks. control.udeb.in was
  updated to libzfs7/libzpool7, but rules was not, so dh_makeshlibs
  and dh_strip fail. rules also references libzfsbootenv1-udeb,
  which is not defined in control.udeb.in.

- the udeb install files are named libnvpair3linux-udeb.install.in
  and so on, but the packages are called libnvpair3-udeb etc., so
  dh_install ignores them and the library udebs are built empty.
  The files also point to .libs/ build tree paths that no longer
  exist in debian/tmp.

- appending control.udeb.in to debian/control fails with "duplicate
  field Package", because control has no blank line at the end.

- dh_makeshlibs --add-udeb=zfsutils-udeb fails, because
  zfsutils-linux has no shared libraries.

- libnvpair3-udeb gets a dependency on libtirpc3t64 instead of
  libtirpc3-udeb, because libtirpc's shlibs file has no udeb line.
  The installer cannot install a normal deb.

- zfs.ko in the zfs-modules-*-di udeb is not stripped (around 107 MB
  unpacked).

The same problems exist in 2.3.2-2 in trixie, only with the older
library names (rules uses libzfs5 there while control.udeb.in has
libzfs6).

I attach 6 patches against the packaging git (debian/2.4.3-2) that
fix these points. With them, BUILD_UDEB=true builds all the udebs.
They apply to master only; the trixie tree would need the same
changes with its own library names.

I tested the resulting udebs in the trixie debian-installer (netboot
initrd and netinst ISO, in QEMU): the modules load, and zpool/zfs
work in the installer (pool create, snapshot, scrub, export/import).

Regards,
Igor Krpanic

-- System Information:
Debian Release: 13.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.95+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Attachment: 0001-d-rules-fix-outdated-udeb-package-names.patch
Description: application/mbox

Attachment: 0002-d-rename-udeb-install-files-to-match-udeb-package-na.patch
Description: application/mbox

Attachment: 0003-d-rules-fix-appending-of-control.udeb.in.patch
Description: application/mbox

Attachment: 0004-d-rules-strip-modules-in-the-di-udeb.patch
Description: application/mbox

Attachment: 0005-d-shlibs.local-map-libtirpc-to-libtirpc3-udeb-for-ud.patch
Description: application/mbox

Attachment: 0006-d-rules-copy-DKMS-files-instead-of-moving-them.patch
Description: application/mbox

Reply via email to