From a7cdaf34f5ad1f31fc896f0c00bd6ae639a360cd Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 18 Nov 2025 23:13:58 +0300 Subject: [PATCH 1/3] `apt.bcachefs.org` readme: mkdir needs sudo too --- doc/apt.bcachefs.org-README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/apt.bcachefs.org-README.md b/doc/apt.bcachefs.org-README.md index 947f583a..e4352db8 100644 --- a/doc/apt.bcachefs.org-README.md +++ b/doc/apt.bcachefs.org-README.md @@ -31,7 +31,7 @@ sudo add-apt-repository "deb https://apt.bcachefs.org/unstable bcachefs-tools-sn If you want to ensure that the packages from this repository are always preferred, do: ```bash -mkdir -p /etc/apt/preferences.d +sudo mkdir -p /etc/apt/preferences.d sudo tee /etc/apt/preferences.d/apt.bcachefs.org.pref > /dev/null < Date: Wed, 19 Nov 2025 02:16:09 +0300 Subject: [PATCH 2/3] RPM spec: fuse-bcachefs is noarch, contains no binaries --- bcachefs-tools.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bcachefs-tools.spec b/bcachefs-tools.spec index 09756672..f49d716d 100644 --- a/bcachefs-tools.spec +++ b/bcachefs-tools.spec @@ -112,6 +112,8 @@ check, modify and correct any inconsistencies in the bcachefs filesystem. Summary: FUSE implementation of bcachefs Requires: %{name}%{?_isa} = %{version}-%{release} +BuildArch: noarch + %description -n fuse-bcachefs This package is an experimental implementation of bcachefs leveraging FUSE to mount, create, check, modify and correct any inconsistencies in the bcachefs filesystem. From db2af22c69f3a8936010fafe580764e99f83dd39 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Wed, 19 Nov 2025 02:18:38 +0300 Subject: [PATCH 3/3] Spec: Implement KMP package for OpenSUSE Tumbleweed At least on OBS, opensuse leap <=16.1 come with linux 6.12, so no KMP for them... --- .github/workflows/obs.yml | 1 + bcachefs-kmp.spec-preambule | 6 +++++ bcachefs-tools.spec | 47 +++++++++++++++++++++++++++++++++---- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 bcachefs-kmp.spec-preambule diff --git a/.github/workflows/obs.yml b/.github/workflows/obs.yml index aaed489a..a1e407f5 100644 --- a/.github/workflows/obs.yml +++ b/.github/workflows/obs.yml @@ -280,6 +280,7 @@ jobs: addFilter("dkms-bcachefs.noarch: E: devel-file-in-non-devel-package") EOT tar -xvf *.tar.xz -C "$OBS_REPO_DIR" --wildcards '*/bcachefs-tools.spec' --strip-components=1 + tar -xvf *.tar.xz -C "$OBS_REPO_DIR" --wildcards '*/bcachefs-kmp.spec-preambule' --strip-components=1 tar -xvf *.tar.xz -C "$OBS_REPO_DIR" --wildcards '*/debian/cargo.config' --strip-components=2 patch "$OBS_REPO_DIR/bcachefs-tools.spec" <= 1690 +%global _with_kmp 1 +%endif +%endif + Name: bcachefs-tools # define with i.e. --define '_version 1.0' Version: 0%{?_version} Release: 0%{?dist} Summary: Userspace tools for bcachefs -%global MSRV 1.77 - # --- rust --- # Apache-2.0 # Apache-2.0 OR MIT @@ -43,6 +53,7 @@ Source: bcachefs-tools_%{version}.tar.xz Source1: bcachefs-tools_%{version}.tar.xz.sig Source2: apt.bcachefs.org.keyring Source3: cargo.config +Source4: bcachefs-kmp.spec-preambule Source99: %{dkmsname}.rpmlintrc %else Source: https://evilpiepirate.org/%{name}/%{name}-vendored-%{version}.tar.zst @@ -67,7 +78,7 @@ BuildRequires: rust >= %{MSRV} BuildRequires: rustc >= %{MSRV} %endif -BuildRequires: kernel-headers >= 6.11.3 +BuildRequires: kernel-headers >= %{MINIMAL_KERNEL_VERSION_FOR_TOOLS} BuildRequires: libaio-devel >= 0.3.111 BuildRequires: libattr-devel BuildRequires: pkgconfig(blkid) @@ -88,6 +99,13 @@ BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros +%if 0%{?_with_kmp} != 0 +BuildRequires: %kernel_module_package_buildreqs +BuildRequires: kernel-devel >= %{MINIMAL_KERNEL_VERSION_FOR_MODULE} +BuildRequires: kernel-syms >= %{MINIMAL_KERNEL_VERSION_FOR_MODULE} +%kernel_module_package -n %{kmodname} -x xen -p %_sourcedir/bcachefs-kmp.spec-preambule +%endif + # Rust parts FTBFS on 32-bit arches ExcludeArch: %{ix86} %{arm32} @@ -130,7 +148,7 @@ mount, create, check, modify and correct any inconsistencies in the bcachefs fil Summary: Bcachefs kernel module managed by DKMS Requires: diffutils Requires: dkms >= 3.2.1 -Requires: kernel-devel >= 6.16 +Requires: kernel-devel >= %{MINIMAL_KERNEL_VERSION_FOR_MODULE} Requires: gcc Requires: make Requires: perl @@ -197,6 +215,16 @@ cp %{_sourcedir}/cargo.config $PWD/.cargo/config.toml %set_build_flags %make_build %{make_opts} +%if 0%{?_with_kmp} != 0 +%make_build install_dkms DKMSDIR="%{_KMP_TMPDIR}/src" +for kmp_flavor in %{?flavors_to_build}; do + rm -Rf "%{_KMP_TMPDIR}/obj-$kmp_flavor" + cp -a "%{_KMP_TMPDIR}/src/." "%{_KMP_TMPDIR}/obj-$kmp_flavor" + %make_build \ + -C "%{_KMP_TMPDIR}/obj-$kmp_flavor" \ + KDIR="/usr/src/linux-obj/%_target_cpu/$kmp_flavor" +done +%endif %install %if 0%{?_version} == 0 @@ -212,8 +240,19 @@ cp %{_sourcedir}/cargo.config $PWD/.cargo/config.toml # Purge unneeded debian stuff rm -rfv %{buildroot}/%{_datadir}/initramfs-tools +%if 0%{?_with_kmp} != 0 +for kmp_flavor in %{?flavors_to_build}; do + %make_build \ + -C "/usr/src/linux-obj/%_target_cpu/$kmp_flavor" \ + M="%{_KMP_TMPDIR}/obj-$kmp_flavor" \ + INSTALL_MOD_PATH="%buildroot" \ + modules_install +done +%endif %changelog +* Sun Nov 19 2025 Roman Lebedev +- Implement KMP package for OpenSUSE Tumbleweed * Sun Oct 19 2025 Roman Lebedev - Fix DKMS support on SUSE * Sun Oct 12 2025 Roman Lebedev