From 3708f1f20a21f58674d268963e7e27092bec4d0d Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 18 Sep 2025 03:02:15 +0300 Subject: [PATCH] Debian: split DKMS into separate binary package The package deps seems to be correct, and the mod does seem to get built and placed into initramfs. ``` $ eatmydata sudo dpkg -i bcachefs-tools_1.31.3_amd64.deb ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. (Reading database ... 534575 files and directories currently installed.) Preparing to unpack bcachefs-tools_1.31.3_amd64.deb ... Unpacking bcachefs-tools (1:1.31.3) over (1:1.31.3) ... Setting up bcachefs-tools (1:1.31.3) ... Processing triggers for man-db (2.13.1-1) ... $ eatmydata sudo dpkg -i bcachefs-kernel-dkms_1.31.3_amd64.deb ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. (Reading database ... 552274 files and directories currently installed.) Preparing to unpack bcachefs-kernel-dkms_1.31.3_amd64.deb ... Unpacking bcachefs-kernel-dkms (1:1.31.3) ... Setting up bcachefs-kernel-dkms (1:1.31.3) ... Loading new bcachefs/1.31.1 DKMS files... Building for 6.16.7+deb14-amd64 Building initial module bcachefs/1.31.1 for 6.16.7+deb14-amd64 Sign command: /lib/modules/6.16.7+deb14-amd64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Certificate or key are missing, generating self signed certificate for MOK... Building module(s)...... done. Signing module /var/lib/dkms/bcachefs/1.31.1/build/src/fs/bcachefs/bcachefs.ko Found pre-existing /lib/modules/6.16.7+deb14-amd64/kernel/fs/bcachefs/bcachefs.ko.xz, archiving for uninstallation Installing /lib/modules/6.16.7+deb14-amd64/updates/dkms/bcachefs.ko.xz Running depmod.... done. Processing triggers for initramfs-tools (0.150) ... update-initramfs: Generating /boot/initrd.img-6.16.7+deb14-amd64 update-initramfs: Generating /boot/initrd.img-6.12.38+deb13-amd64 $ lsinitramfs -l /boot/initrd.img-6.16.7+deb14-amd64 | grep bcachefs -rw-r--r-- 1 root root 1027492 Sep 18 04:15 usr/lib/modules/6.16.7+deb14-amd64/updates/dkms/bcachefs.ko.xz -rwxr-xr-x 1 root root 2042 Sep 18 03:01 scripts/local-premount/bcachefs -rwxr-xr-x 1 root root 3791344 Sep 18 03:01 usr/sbin/bcachefs lrwxrwxrwx 1 root root 8 Sep 18 04:15 usr/sbin/mount.bcachefs -> bcachefs ``` Signed-off-by: Roman Lebedev --- debian/{dkms => bcachefs-kernel-dkms.dkms} | 0 debian/bcachefs-kernel-dkms.install | 3 ++ debian/bcachefs-tools.install | 9 ++++ debian/bcachefs-tools.postinst | 14 ------ debian/bcachefs-tools.postrm | 14 ------ debian/bcachefs.triggers | 1 - debian/changelog | 8 +++- debian/control | 54 ++++++++++++++++++++-- 8 files changed, 68 insertions(+), 35 deletions(-) rename debian/{dkms => bcachefs-kernel-dkms.dkms} (100%) create mode 100644 debian/bcachefs-kernel-dkms.install create mode 100644 debian/bcachefs-tools.install delete mode 100644 debian/bcachefs-tools.postinst delete mode 100644 debian/bcachefs-tools.postrm delete mode 100644 debian/bcachefs.triggers diff --git a/debian/dkms b/debian/bcachefs-kernel-dkms.dkms similarity index 100% rename from debian/dkms rename to debian/bcachefs-kernel-dkms.dkms diff --git a/debian/bcachefs-kernel-dkms.install b/debian/bcachefs-kernel-dkms.install new file mode 100644 index 00000000..954cc1b3 --- /dev/null +++ b/debian/bcachefs-kernel-dkms.install @@ -0,0 +1,3 @@ +usr/share/initramfs-tools/hooks/bcachefs +usr/share/initramfs-tools/scripts/local-premount/bcachefs +usr/src/bcachefs-* diff --git a/debian/bcachefs-tools.install b/debian/bcachefs-tools.install new file mode 100644 index 00000000..c2d883de --- /dev/null +++ b/debian/bcachefs-tools.install @@ -0,0 +1,9 @@ +usr/lib/udev/rules.d/64-bcachefs.rules +usr/sbin/bcachefs +usr/sbin/fsck.bcachefs +usr/sbin/fsck.fuse.bcachefs +usr/sbin/mkfs.bcachefs +usr/sbin/mkfs.fuse.bcachefs +usr/sbin/mount.bcachefs +usr/sbin/mount.fuse.bcachefs +usr/share/man/man8/bcachefs.8 diff --git a/debian/bcachefs-tools.postinst b/debian/bcachefs-tools.postinst deleted file mode 100644 index 56dd8905..00000000 --- a/debian/bcachefs-tools.postinst +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -#DEBHELPER# - -case "$1" in - configure) - if which update-initramfs >/dev/null; then - update-initramfs -u - fi - ;; -esac - diff --git a/debian/bcachefs-tools.postrm b/debian/bcachefs-tools.postrm deleted file mode 100644 index 2d913367..00000000 --- a/debian/bcachefs-tools.postrm +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -#DEBHELPER# - -case "$1" in - remove) - if which update-initramfs >/dev/null; then - update-initramfs -u - fi - ;; -esac - diff --git a/debian/bcachefs.triggers b/debian/bcachefs.triggers deleted file mode 100644 index 6c9f4543..00000000 --- a/debian/bcachefs.triggers +++ /dev/null @@ -1 +0,0 @@ -activate update-initramfs diff --git a/debian/changelog b/debian/changelog index ae21498f..01295893 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ +bcachefs-tools (1:1.31.1~1) unstable; urgency=medium + + * Split DKMS into separate binary package + + -- Roman Lebedev Thu, 18 Sep 2025 03:01:17 +0300 + bcachefs-tools (1:1.31.1) unstable; urgency=medium * DKMS support - -- Kent Overstreet Wed Sep 17 06:31:34 PM EDT 2025 + -- Kent Overstreet Wed, 17 Sep 2025 18:31:34 -0400 bcachefs-tools (1:1.31.0) unstable; urgency=medium diff --git a/debian/control b/debian/control index 1ba91942..4afd99f0 100644 --- a/debian/control +++ b/debian/control @@ -26,17 +26,61 @@ Build-Depends: debhelper-compat (= 13), uuid-dev, zlib1g-dev, Homepage: https://bcachefs.org/ -Vcs-Git: https://salsa.debian.org/debian/bcachefs-tools.git -Vcs-Browser: https://salsa.debian.org/debian/bcachefs-tools +Vcs-Git: git://evilpiepirate.org/bcachefs-tools.git +Vcs-Browser: https://evilpiepirate.org/git/bcachefs-tools.git Package: bcachefs-tools Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends}, python3:any -Recommends: initramfs-tools | linux-initramfs-tool +Recommends: bcachefs-kernel-dkms (= ${binary:Version}), + initramfs-tools | linux-initramfs-tool, +Breaks: bcachefs-kernel-dkms (<< ${binary:Version}), + bcachefs-kernel-dkms (>> ${binary:Version}), Description: bcachefs userspace tools Userspace tools for bcachefs, a modern copy on write, checksumming, multi device filesystem. . Note: The current Debian kernels do not come with bcachefs support, you - will have to use your own kernel or one provided by a 3rd party that - contains bcachefs support. + will have to install bcachefs-kernel-dkms package or build your own kernel + or one provided by a 3rd party that contains bcachefs support. + +Package: bcachefs-kernel-dkms +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends}, + initramfs-tools | linux-initramfs-tool, + linux-headers-amd64 [amd64], + linux-headers-arm64 [arm64], +Pre-Depends: bcachefs-tools (= ${binary:Version}), +Provides: bcachefs-kernel +Description: bcachefs kernel module DKMS source + "The COW filesystem for Linux that won't eat your data". + . + Bcachefs is an advanced new filesystem for Linux, with an emphasis + on reliability and robustness and the complete set of features + one would expect from a modern filesystem. + . + * Copy on write (COW) - like zfs + * Full data and metadata checksumming, for full data integrity: + the filesystem should always detect (and where possible, + recover from) damage; it should never return incorrect data. + * Multiple devices + * Replication + * Erasure coding (incomplete) High performance: doesn't fragment + your writes (like ZFS), no RAID hole + * Caching, data placement + * Compression + * Encryption + * Snapshots + * Nocow mode + * Reflink + * Extended attributes, ACLs, quotas + * Petabyte scalability + * Full online fsck, check and repair (in progress) + * Robustness and rock solid repair. Damage and breakage are a fact of life, + it's not a matter of if, but when. It doesn't matter what happened + to the filesystem: bad hardware, lightning strikes, an errant dd, + you can expect that bcachefs will repair the damage and keep going, + usually with no user intervention required. + . + It's the job of the filesystem to never lose your data: + anything that can be repaired, will be.