Skip to content
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

Linux 6.10 compat: fix rpm-kmod and builtin #16450

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

tonyhutter
Copy link
Contributor

@tonyhutter tonyhutter commented Aug 14, 2024

Motivation and Context

Fixes: #16439. This will allow Fedora 39-40 buildbot to work again.

Description

The 6.10 kernel broke our rpm-kmod builds. The 6.10 kernel really wants the source files in the same directory as the object files. This workaround makes rpm-kmod work again. It also updates the builtin kernel codepath to work correctly with 6.10.

See kernel commits:

b1992c3772e6 kbuild: use $(src) instead of $(srctree)/$(src) for source directory
9a0ebe5011f4 kbuild: use $(obj)/ instead of $(src)/ for common pattern rules

Marking as draft until I can test builtin.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@tonyhutter tonyhutter added the Status: Work in Progress Not yet ready for general review label Aug 14, 2024
@tonyhutter tonyhutter changed the title Draft: Linux 6.10 compat: fix rpm-kmod and builtin WIP: Linux 6.10 compat: fix rpm-kmod and builtin Aug 14, 2024
@tonyhutter
Copy link
Contributor Author

I started building this PR into the 6.10.5 kernel with copy-builtin, and hit an unrelated bug (#16433). The build did get far enough to build icp and zstd though (this PR changed their build scripts), so I'm going to call that good enough.

@tonyhutter tonyhutter removed the Status: Work in Progress Not yet ready for general review label Aug 14, 2024
@tonyhutter tonyhutter changed the title WIP: Linux 6.10 compat: fix rpm-kmod and builtin Linux 6.10 compat: fix rpm-kmod and builtin Aug 14, 2024
@tonyhutter
Copy link
Contributor Author

Removing WIP tag since I was able to build icp & zstd with builtin using the 6.10.5 kernel.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me as a workaround. We may just want to consider switching to always making a copy and not doing a VPATH build.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Aug 15, 2024
The 6.10 kernel broke our rpm-kmod builds.  The 6.10 kernel really
wants the source files in the same directory as the object files.
This workaround makes rpm-kmod work again.  It also updates
the builtin kernel codepath to work correctly with 6.10.

See kernel commits:

b1992c3772e6 kbuild: use $(src) instead of $(srctree)/$(src) for source
                     directory
9a0ebe5011f4 kbuild: use $(obj)/ instead of $(src)/ for common pattern
                     rules

Fixes: openzfs#16439
Signed-off-by: Tony Hutter <[email protected]>
@tonyhutter
Copy link
Contributor Author

It turns out my workaround is less a hack than I thought, as kmodtool just copies over the source code into each kernel-build directory

%setup -q -c -T -a 0
# pushd foo-%{version}
# #patch0 -p1
# popd
for kernel_version in %{?kernel_versions} ; do
    cp -a foo-%{version} _kmod_build_${kernel_version%%___*}
done

https://rpmfusion.org/Packaging/KernelModules/Kmods2

I've updated my comment in the code to reflect this.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Aug 15, 2024
@behlendorf behlendorf merged commit f2f4ada into openzfs:master Aug 15, 2024
15 of 22 checks passed
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 4, 2024
The 6.10 kernel broke our rpm-kmod builds.  The 6.10 kernel really
wants the source files in the same directory as the object files.
This workaround makes rpm-kmod work again.  It also updates
the builtin kernel codepath to work correctly with 6.10.

See kernel commits:

b1992c3772e6 kbuild: use $(src) instead of $(srctree)/$(src) for source
                     directory
9a0ebe5011f4 kbuild: use $(obj)/ instead of $(src)/ for common pattern
                     rules

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tony Hutter <[email protected]>
Closes openzfs#16439
Closes openzfs#16450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fedora 40: 'make rpm-kmod' broken
2 participants