summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2019-10-22 10:45:16 -0400
committerLaura Abbott <labbott@redhat.com>2019-10-29 15:28:51 -0400
commit8044841427b22ab04ec6dd8781fbe4be2be411df (patch)
treee8d21b5ec674add24b15d76cd598ea605f3d942c
parentc68fd73909c5522f3d58a8267c4a0e50b3d88a5a (diff)
downloadkernel-8044841427b22ab04ec6dd8781fbe4be2be411df.tar.gz
kernel-8044841427b22ab04ec6dd8781fbe4be2be411df.tar.xz
kernel-8044841427b22ab04ec6dd8781fbe4be2be411df.zip
Add some weak-updates
Fedora doesn't use this at the moment but we might want it later. Add support for weak module updates. This should have no affect.
-rw-r--r--kernel.spec10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 9ad95794c..fd3382ca9 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1374,6 +1374,7 @@ BuildKernel() {
# dirs for additional modules per module-init-tools, kbuild/modules.txt
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
+ mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/weak-updates
# first copy everything
cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@@ -1887,6 +1888,10 @@ fi\
#
%define kernel_variant_posttrans() \
%{expand:%%posttrans %{?1:%{1}-}core}\
+if [ -x %{_sbindir}/weak-modules ]\
+then\
+ %{_sbindir}/weak-modules --add-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
+fi\
/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
%{nil}
@@ -1915,6 +1920,10 @@ 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 [ -x %{_sbindir}/weak-modules ]\
+then\
+ %{_sbindir}/weak-modules --remove-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
+fi\
%{nil}
%kernel_variant_preun
@@ -2005,6 +2014,7 @@ fi
/lib/modules/%{KVERREL}%{?3:+%{3}}/source\
/lib/modules/%{KVERREL}%{?3:+%{3}}/updates\
/lib/modules/%{KVERREL}%{?3:+%{3}}/bls.conf\
+/lib/modules/%{KVERREL}%{?3:+%{3}}/weak-updates\
%if %{1}\
/lib/modules/%{KVERREL}%{?3:+%{3}}/vdso\
%endif\