zfs-2.2.5 is looking for kernel-devel when Asahi Linux 40 (Server Edition) uses kernel-16k-devel leading to failed installation
System information
| Type | Version/Name |
|---|---|
| Distribution Name | Fedora Linux |
| Distribution Version | Asahi Remix 40 (Server Edition) |
| Kernel Version | 6.9.12-401.asahi.fc40.aarch64+16k |
| Architecture | arm64 |
| OpenZFS Version | 2.2.5 |
Describe the problem you're observing
I cannot install ZFS 2.2.5 in Asahi Linux 40 (Server Edition) due to a conflict regarding kernel-devel. I installed Asahi Linux 40 bare metal on an Apple M1 Mac mini. Asahi Linux on Mac uses kernel-16k-devel instead of kernel-devel. There is a whole discussion about Apple silicon Macs using 16k pages HERE.
I spoke with the Asahi Devs (Hector Martin and Neal Gompa) and they gave me a solution HERE.
This is a problem with the dependencies of the dkms package. It is asking explicitly for the kernel-devel package, but for Asahi we use kernel-16k-devel.
I’m not sure how you built that rpm, but you should be able to find a spec file if you built it from source. Look inside, find any references to kernel-devel, and replace them with kernel-16k-devel.
That solution worked. I went into the directories /zfs-2.2.5/rpm/generic and /zfs-2.2.5/rpm/redhat and opened every file with "spec" in the name and indiscriminately changed kernel-devel to kernel-16k-devel wherever I found it. After that ZFS installed.
The Asahi Devs I spoke to didn't seem to think they could come up with a more elegant solution on their end. They thought a more reasonable fix would have to come from the zfs community. I'm surprised this issue hasn't come up before. Surely, I can't be the only person contemplating hooking up a USB JBOD solution to an Apple silicon Mac and then running bare metal Linux on it and using ZFS for software RAID.
Is there any way to make this so the compile and install "just works"? I'm sure this has already tripped up other people and the current solution is clumsy and opaque to the uninitiated.
Describe how to reproduce the problem
I downloaded the source code from https://github.com/openzfs/zfs/releases/download/zfs-2.2.5/zfs-2.2.5.tar.gz
I then compiled it on an M1 Mac mini running Asahi Linux bare metal without altering anything...
$ ./configure
$ make -j1 rpm-utils rpm-dkms
And then tried to install zfs-dkms-2.2.5-1.fc40.noarch.rpm
The output below shows things did not go well.
Include any warning/errors/backtraces from the system logs
sudo dnf install --skip-broken zfs-dkms-2.2.5-1.fc40.noarch.rpm
Last metadata expiration check: 3:06:58 ago on Wed 07 Aug 2024 12:08:30 PM CDT.
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Dependencies resolved.
Problem: package zfs-dkms-2.2.5-1.fc40.noarch from @commandline requires kernel-devel >= 3.10, but none of the providers can be installed
- package zfs-dkms-2.2.5-1.fc40.noarch from @commandline requires kernel-devel <= 6.9.999, but none of the providers can be installed
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.6.3-413.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.6.3-414.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.10-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.7-402.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.8-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.9-402.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.9-403.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.9-404.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.9-405.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.9-406.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.11-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.12-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.12-401.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.6-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.9-401.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.9-402.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.9-403.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.8.5-301.fc40.aarch64 from fedora
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts conflicts with kernel-devel provided by kernel-devel-6.9.12-200.fc40.aarch64 from updates
- problem with installed package asahi-platform-metapackage-core-0-12.fc40.aarch64
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.6.3-413.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.6.3-414.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.10-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.7-402.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.8-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.9-402.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.9-403.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.9-404.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.9-405.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.9-406.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.11-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.12-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.12-401.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.6-400.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.9-401.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.9-402.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.9-403.asahi.fc40.aarch64 from copr:copr.fedorainfracloud.org:group_asahi:kernel
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.8.5-301.fc40.aarch64 from fedora
- package asahi-platform-metapackage-core-0-12.fc40.aarch64 from @System conflicts with kernel-devel provided by kernel-devel-6.9.12-200.fc40.aarch64 from updates
- conflicting requests
==================================================================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================================================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
kernel-devel aarch64 6.6.3-413.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.6.3-414.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.5-301.fc40 fedora 20 M
kernel-devel aarch64 6.8.7-402.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.8-400.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.9-402.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.9-403.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.9-404.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.9-405.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.9-406.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.8.10-400.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.6-400.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.9-401.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.9-402.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.9-403.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.11-400.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.12-200.fc40 updates 20 M
kernel-devel aarch64 6.9.12-400.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
kernel-devel aarch64 6.9.12-401.asahi.fc40 copr:copr.fedorainfracloud.org:group_asahi:kernel 17 M
Skipping packages with broken dependencies:
zfs-dkms noarch 2.2.5-1.fc40 @commandline 31 M
Transaction Summary
==================================================================================================================================================================================================================================================================================================
Skip 20 Packages
Nothing to do.
Complete!
Totally untested since I don't know what RPM macros Asahi defines:
diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in
index cd85dd28c..a3d6a78ee 100644
--- a/rpm/generic/zfs-dkms.spec.in
+++ b/rpm/generic/zfs-dkms.spec.in
@@ -34,6 +34,13 @@ Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_K
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
Obsoletes: spl-dkms <= %{version}
%endif
+
+%if 0%{?asahi}
+Requires: kernel-16k-devel >= @ZFS_META_KVER_MIN@, kernel-16k-devel <= @[email protected]
+Requires(post): kernel-16k-devel >= @ZFS_META_KVER_MIN@, kernel-16k-devel <= @[email protected]
+Obsoletes: spl-dkms <= %{version}
+%endif
+
Provides: %{module}-kmod = %{version}
AutoReqProv: no
Totally untested since I don't know what RPM macros Asahi defines:
diff --git a/rpm/generic/zfs-dkms.spec.in b/rpm/generic/zfs-dkms.spec.in index cd85dd28c..a3d6a78ee 100644 --- a/rpm/generic/zfs-dkms.spec.in +++ b/rpm/generic/zfs-dkms.spec.in @@ -34,6 +34,13 @@ Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_K Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected] Obsoletes: spl-dkms <= %{version} %endif + +%if 0%{?asahi} +Requires: kernel-16k-devel >= @ZFS_META_KVER_MIN@, kernel-16k-devel <= @[email protected] +Requires(post): kernel-16k-devel >= @ZFS_META_KVER_MIN@, kernel-16k-devel <= @[email protected] +Obsoletes: spl-dkms <= %{version} +%endif + Provides: %{module}-kmod = %{version} AutoReqProv: no
Thanks!
I am a total noob and definitely not a programmer. I have no idea how to use github, and I created this account a couple of days ago just to ask about this issue.
I didn't quite understand what you wanted me to do. This is what I did. I copied this...
%if 0%{?asahi}
Requires: kernel-16k-devel >= @ZFS_META_KVER_MIN@, kernel-16k-devel <= @[email protected]
Requires(post): kernel-16k-devel >= @ZFS_META_KVER_MIN@, kernel-16k-devel <= @[email protected]
Obsoletes: spl-dkms <= %{version}
%endif
Then I opened /rpm/generic/zfs-dkms.spec.in
And pasted it just after this section...
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @[email protected]
Obsoletes: spl-dkms <= %{version}
%endif
That didn't work. I thought with both if statements in there the system would pick the most appropriate one and ignore the other. It didn't. The "kernel-devel" vs "kernel-16k-devel" issue persisted.
So I just deleted the original if statement and left your new "asahi" specific one in its place, and everything compiled and installed fine as far as my novice eyes can tell. sudo modprobe zfs worked. zpool list worked returning "no pools available" which is true. The Cockpit ZFS Manager from 45Drives seems to be working... Although I haven't created a pool with it yet.
$ modinfo zfs
filename: /lib/modules/6.9.12-401.asahi.fc40.aarch64+16k/extra/zfs.ko.xz
version: 2.2.5-1
license: CDDL
license: Dual BSD/GPL
license: Dual MIT/GPL
author: OpenZFS
description: ZFS
alias: zzstd
alias: zcommon
alias: zunicode
alias: znvpair
alias: zlua
alias: icp
alias: zavl
alias: devname:zfs
alias: char-major-10-249
srcversion: 0F0151C7EF4997E5E49B844
depends: spl
name: zfs
vermagic: 6.9.12-401.asahi.fc40.aarch64+16k SMP preempt mod_unload aarch64
sig_id: PKCS#7
signer: DKMS module signing key
Something else. There are a couple of other if statements in /rpm/generic/zfs-dkms.spec.in that reference various flavors of rhel (ie rhel, fedora, suse, etc) but don't mention "asahi." Is this a potential problem?
I hope I did what you wanted me to do.
Totally untested since I don't know what RPM macros Asahi defines:
I don't know if this helps, but I went to the /usr/lib/rpm/platform directory on my Asahi Remix 40 (Server Edition) install and found this...
$ ls
aarch64-linux alphapca56-linux armv5tel-linux armv7l-linux i486-linux m68k-linux mips-linux ppc32dy4-linux ppc8260-linux s390-linux sparc64-linux x86_64-linux
alphaev56-linux amd64-linux armv5tl-linux armv8hl-linux i586-linux mips64el-linux mipsr6el-linux ppc64iseries-linux ppc8560-linux s390x-linux sparc64v-linux x86_64_v2-linux
alphaev5-linux armv3l-linux armv6hl-linux armv8l-linux i686-linux mips64-linux mipsr6-linux ppc64le-linux ppciseries-linux sh3-linux sparc-linux x86_64_v3-linux
alphaev67-linux armv4b-linux armv6l-linux athlon-linux ia32e-linux mips64r6el-linux noarch-linux ppc64-linux ppc-linux sh4a-linux sparcv8-linux x86_64_v4-linux
alphaev6-linux armv4l-linux armv7hl-linux geode-linux ia64-linux mips64r6-linux pentium3-linux ppc64p7-linux ppcpseries-linux sh4-linux sparcv9-linux
alpha-linux armv5tejl-linux armv7hnl-linux i386-linux loongarch64-linux mipsel-linux pentium4-linux ppc64pseries-linux riscv64-linux sh-linux sparcv9v-linux
I compressed the whole "platform" directory and attached it with the file name "rpmplatform."
There is an aarch64-linux and a noarch-linux directory that both contain a "macros" file. I'm not sure if either of those contain what you seek... or if it is in any of those other subdirectories.
I also explored the /usr/lib/rpm/macros.d/ directory...
$ ls
macros.aaa-pyproject-srpm macros.efi-srpm macros.fpc-srpm macros.kernel-srpm macros.nodejs-srpm macros.perl-srpm macros.python-srpm macros.selinux-policy macros.vpath
macros.ansible-srpm macros.fedora-misc macros.gap-srpm macros.kmp macros.ocaml-srpm macros.pkgconf macros.qt5-srpm macros.shell-completions macros.zig-srpm
macros.build-constraints macros.fedora-misc-srpm macros.ghc-srpm macros.ldconfig macros.openblas-srpm macros.pybytecompile macros.qt6-srpm macros.systemd
macros.dist macros.firewalld macros.gnat-srpm macros.ldc-srpm macros.package-notes-srpm macros.pyproject macros.rpmautospec macros.systemtap
macros.dotnet-srpm macros.fonts-srpm macros.go-srpm macros.lua-srpm macros.pam macros.python macros.rust macros.sysusers
macros.dwz macros.forge macros.java-srpm macros.mono-srpm macros.perl macros.python3 macros.rust-srpm macros.valgrind-srpm
I compressed and attached it as well with the file name "rpmmacros."
I forget what conditionals you get in rpmspec, but something like (kernel && kernel-devel) || (kernel-16k && kernel-16k-devel) seems reasonable here, without requiring a platform-specific macro check...
I'll probably also play with this on my Asahi machine when I get back from vacation in a week and get something working if nobody else beats me to it.
I am running asahi and had some similar troubles with missing headers during the build. This fixed it for me
dnf install kernel-16k-devel
I am running asahi and had some similar troubles with missing headers during the build. This fixed it for me
dnf install kernel-16k-devel
Unfortunately kernel headers were already installed for me. I actually tried installing them just in case...
sudo dnf install “kernel-devel-uname-r == $(uname -r)”
Package kernel-16k-devel-6.9.12-401.asahi.fc40.aarch64 is already installed.
The issue persists in zfs-2.2.7.
I once again went in and edited every spec file and added "{?asahi}" everywhere I found "{?fedora}." Then I replaced "kernel-devel" with "kernel-16k-devel" in every spec file.
Everything seems to work as expected...
$ modinfo zfs | grep version
version: 2.2.7-1
srcversion: E21EBDAA367BFF5E64F690A
$ hostnamectl
Operating System: Fedora Linux Asahi Remix 40 (Server Edition)
Kernel: Linux 6.12.1-404.asahi.fc40.aarch64+16k
Architecture: arm64
@tonyhutter @JMOdero
Looking at the rpm macros, it seems to me there is no %asahi macro. grep '%asahi' * returns nothing.
The file macros.dist though defines a %fedora macro (guess that's why it fails with both if statements):
# dist macros.
%__bootstrap ~bootstrap
%fedora 40
%fc40 1
%distcore .fc%{fedora}
%dist %{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}%{distcore}%{?with_bootstrap:%{__bootstrap}}
%dist_vendor Fedora Asahi
%dist_name Fedora Linux Asahi Remix
%dist_home_url https://fedora-asahi-remix.org/
%dist_bug_report_url https://bugzilla.redhat.com/
%dist_debuginfod_url https://debuginfod.fedoraproject.org/
So some more conditional magic, maybe looking for %dist_vendor, would be required.
@tonyhutter @JMOdero
Looking at the rpm macros, it seems to me there is no
%asahimacro.grep '%asahi' *returns nothing. The file macros.dist though defines a%fedoramacro (guess that's why it fails with bothifstatements):
kernel-devel vs kernel-16k-devel seems to be the only issue. I experimented and only changed that and it worked.
To post in the correct issue:
I don't know. There seems like there is something there with the boolean operation. I just need to figure out the right syntax.
I slightly misread https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html.
Examples:
Requires: (pkgA or pkgB or pkgC)
So only one pair of parenthesis should be needed.
Could you try?
So only one pair of parenthesis should be needed.
Could you try?
This worked for me...
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
Requires: (kernel-devel >= 4.18 or kernel-longterm-devel >= 4.18 or kernel-16k-devel >= 4.18) (kernel-devel <= 6.12.999 or kernel-longterm-devel <= 6.12.999 or kernel-16k-devel <= 6.12.999)
Requires(post): (kernel-devel >= 4.18 or kernel-longterm-devel >= 4.18 or kernel-16k-devel >= 4.18) (kernel-devel <= 6.12.999 or kernel-longterm-devel <= 6.12.999 or kernel-16k-devel <= 6.12.999)
Obsoletes: spl-dkms <= %{version}
%endif
No "and" or "," needed between the (or booleans).
Those two "requires" lines in zfs-dkms.spec.in in the redhat and generic folders under the rpm directory is all it took. Four lines total, should end our pain.
I did not use the "Conflict:" line. I'll try it some other time. It is nice weather here, and I don't want to compile anymore today.