summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2020-03-12 11:41:51 -0400
committerJeremy Cline <jcline@redhat.com>2020-03-12 11:41:51 -0400
commit2027ad30fb0780518e9113815eea9601f49e1fe8 (patch)
tree60ebf4dc1b556129061c21dbda5c6a2b687db100 /kernel.spec
parentfc7e20c59ee70306a2d2204d02c0b114ed4ffb98 (diff)
downloadkernel-2027ad30fb0780518e9113815eea9601f49e1fe8.tar.gz
kernel-2027ad30fb0780518e9113815eea9601f49e1fe8.tar.xz
kernel-2027ad30fb0780518e9113815eea9601f49e1fe8.zip
Add weak-modules packaging back for not-Fedora
The weak-module scripts are used in EL, but have been problematic for Fedora, so only include them if the build target isn't Fedora. Signed-off-by: Jeremy Cline <jcline@redhat.com>
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 1f99f3962..4353b3c04 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1883,6 +1883,9 @@ BuildKernel() {
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/internal
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
+%if 0%{!?fedora:1}
+ mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/weak-updates
+%endif
# CONFIG_KERNEL_HEADER_TEST generates some extra files in the process of
# testing so just delete
find . -name *.h.s -delete
@@ -2677,6 +2680,12 @@ fi\
#
%define kernel_variant_posttrans() \
%{expand:%%posttrans %{?1:%{1}-}core}\
+%if 0%{!?fedora:1}\
+if [ -x %{_sbindir}/weak-modules ]\
+then\
+ %{_sbindir}/weak-modules --add-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
+fi\
+%endif\
/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
%{nil}
@@ -2706,6 +2715,12 @@ fi}\
%define kernel_variant_preun() \
%{expand:%%preun %{?1:%{1}-}core}\
/bin/kernel-install remove %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
+%if 0%{!?fedora:1}\
+if [ -x %{_sbindir}/weak-modules ]\
+then\
+ %{_sbindir}/weak-modules --remove-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
+fi\
+%endif\
%{nil}
%kernel_variant_preun
@@ -2913,6 +2928,9 @@ fi
/lib/modules/%{KVERREL}%{?3:+%{3}}/source\
/lib/modules/%{KVERREL}%{?3:+%{3}}/updates\
/lib/modules/%{KVERREL}%{?3:+%{3}}/bls.conf\
+%if 0%{!?fedora:1}\
+/lib/modules/%{KVERREL}%{?3:+%{3}}/weak-updates\
+%endif\
%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}/kernel-signing-ca.cer\
%ifarch s390x ppc64le\
%if 0%{!?4:1}\