[PATCH 03/23] debian: create new package for fuse4fs

Darrick J. Wong
2025-11-06T22:43:52Z

Create a new package for fuse4fs.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
debian/control | 12 +++++++++++-
debian/fuse4fs.install | 2 ++
debian/fuse4fs.links | 3 +++
debian/rules | 11 +++++++++++
4 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 debian/fuse4fs.install
create mode 100644 debian/fuse4fs.links

diff --git a/debian/control b/debian/control
index fb3487cd32b99a..04df691d81b230 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: e2fsprogs
Section: admin
Priority: important
Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
-Build-Depends: dpkg-dev (>= 1.22.5), gettext, texinfo, pkgconf, libarchive-dev <!nocheck>, libfuse3-dev [linux-any kfreebsd-any] <!pkg.e2fsprogs.no-fuse2fs>, debhelper-compat (= 12), dh-exec, libblkid-dev, uuid-dev, m4, udev [linux-any], systemd [linux-any], systemd-dev [linux-any], cron [linux-any], dh-sequence-movetousr
+Build-Depends: dpkg-dev (>= 1.22.5), gettext, texinfo, pkgconf, libarchive-dev <!nocheck>, libfuse3-dev [linux-any kfreebsd-any] <!pkg.e2fsprogs.no-fuse2fs> <!pkg.e2fsprogs.no-fuse4fs>, debhelper-compat (= 12), dh-exec, libblkid-dev, uuid-dev, m4, udev [linux-any], systemd [linux-any], systemd-dev [linux-any], cron [linux-any], dh-sequence-movetousr
Rules-Requires-Root: no
Standards-Version: 4.7.2
Homepage: http://e2fsprogs.sourceforge.net
@@ -21,6 +21,16 @@ Description: ext2 / ext3 / ext4 file system driver for FUSE
writing from devices or image files containing ext2, ext3, and ext4
file systems.

+Package: fuse4fs
+Build-Profiles: <!pkg.e2fsprogs.no-fuse4fs>
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}, fuse3
+Architecture: linux-any kfreebsd-any
+Description: ext2 / ext3 / ext4 file system driver for FUSE
+ fuse4fs is a faster FUSE file system client that supports reading and
+ writing from devices or image files containing ext2, ext3, and ext4
+ file systems.
+
Package: fuseext2
Build-Profiles: <!pkg.e2fsprogs.no-fuse2fs>
Depends: fuse2fs (>= 1.47.1-2), ${misc:Depends}
diff --git a/debian/fuse4fs.install b/debian/fuse4fs.install
new file mode 100644
index 00000000000000..17bdc90e33cb67
--- /dev/null
+++ b/debian/fuse4fs.install
@@ -0,0 +1,2 @@
+usr/bin/fuse4fs
+usr/share/man/man1/fuse4fs.1
diff --git a/debian/fuse4fs.links b/debian/fuse4fs.links
new file mode 100644
index 00000000000000..825017e11b951e
--- /dev/null
+++ b/debian/fuse4fs.links
@@ -0,0 +1,3 @@
+/usr/bin/fuse4fs /usr/bin/ext4
+/usr/bin/fuse4fs /usr/bin/ext3
+/usr/bin/fuse4fs /usr/bin/ext2
diff --git a/debian/rules b/debian/rules
index c88675c9228bd0..b680eb33ceac9e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,7 @@ export LC_ALL ?= C

ifeq ($(DEB_HOST_ARCH_OS), hurd)
SKIP_FUSE2FS=yes
+SKIP_FUSE4FS=yes
endif

ifeq ($(DEB_HOST_ARCH_OS), linux)
@@ -22,6 +23,9 @@ endif
ifneq ($(filter pkg.e2fsprogs.no-fuse2fs,$(DEB_BUILD_PROFILES)),)
SKIP_FUSE2FS=yes
endif
+ifneq ($(filter pkg.e2fsprogs.no-fuse4fs,$(DEB_BUILD_PROFILES)),)
+SKIP_FUSE4FS=yes
+endif

ifneq (,$(filter-out parallel=1,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -60,6 +64,9 @@ COMMON_CONF_FLAGS = --enable-elf-shlibs --disable-ubsan \
ifneq ($(SKIP_FUSE2FS),)
COMMON_CONF_FLAGS += --disable-fuse2fs
endif
+ifneq ($(SKIP_FUSE4FS),)
+COMMON_CONF_FLAGS += --disable-fuse4fs
+endif

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CC ?= $(DEB_HOST_GNU_TYPE)-gcc
@@ -189,6 +196,10 @@ endif
ifeq ($(SKIP_FUSE2FS),)
dh_shlibdeps -pfuse2fs -l${stdbuilddir}/lib \
-- -Ldebian/e2fsprogs.shlibs.local
+endif
+ifeq ($(SKIP_FUSE4FS),)
+ dh_shlibdeps -pfuse4fs -l${stdbuilddir}/lib \
+ -- -Ldebian/e2fsprogs.shlibs.local
endif
dh_shlibdeps --remaining-packages -l${stdbuilddir}/lib