From d89e043e74d8928d66efa5f4f907a22edca8ff66 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Sun, 19 Oct 2025 08:16:09 +0300 Subject: [PATCH] spec: make DKMS package actually work on SUSE Also while there, add the explicit kernel package version deps. --- bcachefs-tools.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bcachefs-tools.spec b/bcachefs-tools.spec index fb598528..09756672 100644 --- a/bcachefs-tools.spec +++ b/bcachefs-tools.spec @@ -67,6 +67,7 @@ BuildRequires: rust >= %{MSRV} BuildRequires: rustc >= %{MSRV} %endif +BuildRequires: kernel-headers >= 6.11.3 BuildRequires: libaio-devel >= 0.3.111 BuildRequires: libattr-devel BuildRequires: pkgconfig(blkid) @@ -127,6 +128,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: gcc Requires: make Requires: perl @@ -153,14 +155,22 @@ filesystem. %preun -n %{dkmsname} if [ "$(dkms status -m %{kmodname} -v %{version})" ]; then dkms remove -m %{kmodname} -v %{version} --all --rpm_safe_upgrade + exit $? fi %post -n %{dkmsname} if [ "$1" -ge "1" ]; then +%if "%{_vendor}" == "suse" + if [ -f %{_libexecdir}/dkms/common.postinst ]; then + %{_libexecdir}/dkms/common.postinst %{kmodname} %{version} + exit $? + fi +%else if [ -f /usr/lib/dkms/common.postinst ]; then /usr/lib/dkms/common.postinst %{kmodname} %{version} exit $? fi +%endif fi %files -n %{dkmsname} @@ -202,6 +212,8 @@ rm -rfv %{buildroot}/%{_datadir}/initramfs-tools %changelog +* Sun Oct 19 2025 Roman Lebedev +- Fix DKMS support on SUSE * Sun Oct 12 2025 Roman Lebedev - OBS support * Sat Sep 27 2025 Neal Gompa