-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zfs-2.2.5 is looking for kernel-devel when Asahi Linux 40 (Server Edition) uses kernel-16k-devel leading to failed installation #16429
Comments
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...
Then I opened /rpm/generic/zfs-dkms.spec.in And pasted it just after this section...
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.
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. |
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...
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...
I compressed and attached it as well with the file name "rpmmacros." |
I forget what conditionals you get in rpmspec, but something like 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 |
Unfortunately kernel headers were already installed for me. I actually tried installing them just in case...
|
System information
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.
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...
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
The text was updated successfully, but these errors were encountered: