-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support Fedora 42 #17242
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
Comments
Looks like F42 is giving us some compiler errors:
|
This makes it build again, I'll put together a PR: diff --git a/cmd/zpool/os/linux/zpool_vdev_os.c b/cmd/zpool/os/linux/zpool_vdev_os.c
index 8da9aece4..36f0e46e7 100644
--- a/cmd/zpool/os/linux/zpool_vdev_os.c
+++ b/cmd/zpool/os/linux/zpool_vdev_os.c
@@ -88,7 +88,7 @@
typedef struct vdev_disk_db_entry
{
- char id[24];
+ char id[24] __attribute__ ((nonstring));
int sector_size;
} vdev_disk_db_entry_t;
diff --git a/module/zcommon/zfs_valstr.c b/module/zcommon/zfs_valstr.c
index 546de63c8..e8ea6a294 100644
--- a/module/zcommon/zfs_valstr.c
+++ b/module/zcommon/zfs_valstr.c
@@ -39,7 +39,7 @@
*/
typedef struct {
const char vb_bit;
- const char vb_pair[2];
+ const char vb_pair[2] __attribute__ ((nonstring));
const char *vb_name;
} valstr_bit_t;
diff --git a/tests/zfs-tests/cmd/file/largest_file.c b/tests/zfs-tests/cmd/file/largest_file.c
index 82b795601..a876d8327 100644
--- a/tests/zfs-tests/cmd/file/largest_file.c
+++ b/tests/zfs-tests/cmd/file/largest_file.c
@@ -62,7 +62,7 @@ main(int argc, char **argv)
offset_t llseek_ret = 0;
int write_ret = 0;
int err = 0;
- char mybuf[5] = "aaaa\0";
+ char mybuf[5] = "aaaa";
char *testfile;
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
struct sigaction sa; |
Fix build errors on Fedora 42 like: module/zcommon/zfs_valstr.c:193:16: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (3 chars into 2 available) The arrays in zpool_vdev_os.c and zfs_valstr.c are not meant to be NULL terminated. Closes: openzfs#17242 Signed-off-by: Tony Hutter <[email protected]>
Fix build errors on Fedora 42 like: module/zcommon/zfs_valstr.c:193:16: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (3 chars into 2 available) The arrays in zpool_vdev_os.c and zfs_valstr.c don't need to be NULL terminated, but we do so to make GCC happy. Closes: openzfs#17242 Signed-off-by: Tony Hutter <[email protected]>
Missing arch, and |
A bigger wrench in the works: Fedora 42 ships with kernel 6.14 and ZFS 2.3.1 supports only up to 6.13:
|
Fix build errors on Fedora 42 like: module/zcommon/zfs_valstr.c:193:16: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (3 chars into 2 available) The arrays in zpool_vdev_os.c and zfs_valstr.c don't need to be NULL terminated, but we do so to make GCC happy. Closes: openzfs#17242 Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]>
@tonyhutter How is this completed (=F42 supported) when F42 ships with 6.14 which is not supported by ZFS 2.3.1? |
@no-usernames-left it got closed when 155847c was merged. I just re-opened the issue though. We'll support Fedora 42 in our upcoming 2.3.2 release (#17214) which builds under the 6.14 kernel. Also related: #17249 |
Thank you for all your hard work! |
@tonyhutter - If you want me to create a separate issue for this I will, but the changes to how DNF dependencies work in Fedora in the 2.3 release are awful and (on my system at least) arent doing what you had intended them to do. I dont remember the exact issue, but shortly before the 2.3 release there was a comment chain about what the changes to DNF dependencies in the 2.3 release was supposed to accomplish. From what I recall, it was basically supposed to make DNF stop installing kernels at the last officially supported kernel but otherwise remain fully functional. It would be great if it actually did this, but it doesnt (not on my system at least). What it does is make DNF stop installing kernel-devel at the last officially supported kernel but otherwise remain fully functional. Meaning it will still happily install the kernel / kernel-core / kernel-modules / all the rest of the kernel packages EXCEPT for kernel-devel for unsupported kernels. Which DNF does without so much as giving you a warning. everything appears to be going well when all of a sudden the kernel postinst script that builds the zfs modules for the new kernel fails (since, surprise, it silently decided it wasnt going to install the updated kernel-devel package), which makes the whole postinstall error out and leaves you with out one of your old working kernels and with a partially-installed, not fully setup new kernel that is probably set to be used as the default boot kernel and that you CANT build the zfs modules for since DNF will straight refuse to install the kernel-devel package alongside a not-officially-compatible zfs package version. If you use ZFS on root, at this point you either have another compatible kernel (beyond the one DNF just removed) or you rebuild the zfs package using a modified spec file that doesnt prevent you from installing kernel-devel. And to make matters worse, this "unexpectedly dropping you in a terrible situation that isnt easily fixable without warning or any indication that something isnt right" behavior is virtually guaranteed to happen every few months, since the zfs release that supports a new kernel almost always lags Fedora first using that kernel by at least a couple of weeks. Which is completely understandable, but also pretty much means you get to go through this before every new zfs 2.3.x release. <\rant> Seriously though, its pretty bad (assuming it is working this way for everyone on Fedora, not just me). I have to believe this is actively preventing most/all "casual" users from using ZFs on Fedora... The fix seems easy enough at least though....in the spec file repeat the existing kernel-devel dependencies for all the various kernel packages. |
As a workaround for now: You can either exclude the kernel via the dnf update --exclude=kernel* Or append it to the [main] section of
You can exclude specific kernel versions, which allows updates of minor updates of the current kernel while avoiding update to an incompatible kernel: dnf update --exclude=kernel*6.13*,kernel*6.14*,kernel*6.15* When you update to a new version of ZFS, you can adjust your
This workaround is definitely inconvenient, basically requiring the micromanagement of kernel updates.
Depending on the size of your boot partition, you may be able to increase the number of kernels that are preserved by adding " |
this is great, and i look forward to the day that i can just however, in the meantime, i opened an issue about improving the docs to teach users how to prevent this from happening and how to recover if it does happen: openzfs/openzfs-docs#542 |
@WillJDunn - I appreciate the info. Ive actually been using To be honest, the "rant" really wasnt intended as "I dont know what to do and am frustrated". To give perspective, my Fedora system is setup (for 5+ years now) to use zfs on luks on root, to do grub-less booting by directly booting UKI's from my UEFI, and uses secure boot exclusively with personal self-signed x509 keys. Figuring that all out from scratch involved learning how to fix my system from far worse than a half installed kernel lol. But I imagine this makes me the exception, not the rule. Hense, the "rant" was more "Fedora and ZFS are 2 of my absolute favorite projects in the Linux space and its frustrating that a bunch of people's only experience combining these two awesome things might be 'I tried combining them and DNF broke everything'". Side note: by far the easiest way to fix things ive found is, after you get ZFS updated and the required kernel-devel installed, just run |
Fix build errors on Fedora 42 like: module/zcommon/zfs_valstr.c:193:16: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (3 chars into 2 available) The arrays in zpool_vdev_os.c and zfs_valstr.c don't need to be NULL terminated, but we do so to make GCC happy. Closes: openzfs#17242 Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]>
ZFS 2.3.2 has been release with Fedora 42 support. This includes correctly holding back kernel upgrades (81dec43) so an incompatible kernel doesn't get installed. |
Hey, thanks I was able to install the package zfs-release for fedora 42. However I cant install anything ZFS as 42 is not available yet on http://download.zfsonlinux.org/fedora/ (YUM repos installed by I'm wondering what is missing for it to be available. Could it simply be an oversight? |
@PACordonnier the RPMs are there (for example: http://download.zfsonlinux.org/fedora/42/x86_64/zfs-2.3.2-1.fc42.x86_64.rpm), but I suspect the index.html files for the webpage needs to be refreshed. I'll do that today. You should still be able to install on Fedora 42 as per our instructions (make sure you are using zfs-release-2-8 for Fedora 42):
https://openzfs.github.io/openzfs-docs/Getting%20Started/Fedora/index.html |
@PACordonnier website refreshed with Fedora 42 indexes: http://download.zfsonlinux.org/fedora/42 |
Very eloquently put. (And I agree, too!) |
perfect @tonyhutter, I had to manually enable the repo (dnf is not being cooperative to enable ZFS repo for some reasons) but was able to install zfs on fedora 42, thank you for your work ! |
Fix build errors on Fedora 42 like: module/zcommon/zfs_valstr.c:193:16: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (3 chars into 2 available) The arrays in zpool_vdev_os.c and zfs_valstr.c don't need to be NULL terminated, but we do so to make GCC happy. Closes: openzfs#17242 Signed-off-by: Tony Hutter <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]>
Describe the feature would like to see added to OpenZFS
Placeholder issue to support Fedora 42 for when it comes out April 15 2025.
How will this feature improve OpenZFS?
Additional context
We can't really do anything until Fedora releases their cloud images for our CI to use:
https://download.fedoraproject.org/pub/fedora/linux/releases/42/cloud/images
The text was updated successfully, but these errors were encountered: