- Import Suse depmod/kmod patches - https://github.com/SUSE/kernel-source/tree/master/patches.rpmify
- Tweak mkspec to respect Suse /usr usage
- Run grub2-mkconfig post-install
- Get rid of the undesired test tweak in 0013-fedora-rpm.patch added with e0c74e5e15
We may have some additional work to do as my limited testing with Arch's defconfig + _kernel_on_diet="true" didn't boot. It might actually work with the full defconfig or using Suse's using _configfile="running-kernel". I'll run more tests as needed on my main machine as it was a PITA working on this with a dualcore broadwell laptop 🐸
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
|
|
index 8049f0e2c..de170760d 100755
|
|
--- a/scripts/package/mkspec
|
|
+++ b/scripts/package/mkspec
|
|
@@ -53,2 +53,3 @@ $S Source2: diff.patch
|
|
Provides: kernel-$KERNELRELEASE
|
|
+ Provides: kernel-uname-r = %{version}
|
|
$S BuildRequires: bc binutils bison dwarves
|
|
@@ -69,4 +70,4 @@ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
|
|
Group: Development/System
|
|
- Obsoletes: kernel-headers
|
|
Provides: kernel-headers = %{version}
|
|
+ Provides: installonlypkg(kernel) = %{version}
|
|
%description headers
|
|
@@ -81,2 +82,5 @@ $S$M Summary: Development package for building kernel modules to match the $__KE
|
|
$S$M Group: System Environment/Kernel
|
|
+$S$M Provides: kernel-devel = %{version}
|
|
+$S$M Provides: kernel-devel-uname-r = %{version}
|
|
+$S$M Provides: installonlypkg(kernel) = %{version}
|
|
$S$M AutoReqProv: no
|
|
@@ -86,2 +90,18 @@ $S$M against the $__KERNELRELEASE kernel package.
|
|
$S$M
|
|
+$S # Opt out of a lot of Fedora hardening flags etc...
|
|
+$S # See https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md
|
|
+$S %undefine _package_note_file
|
|
+$S %undefine _auto_set_build_flags
|
|
+$S %undefine _include_frame_pointers
|
|
+$S %define _build_id_flags -Wl,--build-id=none
|
|
+$S %undefine _annotated_build
|
|
+$S %undefine _fortify_level
|
|
+$S %undefine _hardened_build
|
|
+$S %global _lto_cflags %{nil}
|
|
+$S %global _configure_gnuconfig_hack 0
|
|
+$S %global _configure_libtool_hardening_hack 0
|
|
+$S # Nearly had to go to the deep web to find documentation on this one... Gosh
|
|
+$S # See https://github.com/rpm-software-management/rpm/blob/master/macros.in#L471
|
|
+$S %define _build_id_links none
|
|
+$S
|
|
$S %prep
|