Add dependency generator for kABI provides
The only difference from RHEL 7 is that we're looking for symvers file in /lib/modules now, per #1609695[1]. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1609695 - Add dependency generator for kABI provides Resolves: #1942563 Resolves: #2008554 Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
parent
334cc382a9
commit
fa3dd2ca59
2
kabi.attr
Normal file
2
kabi.attr
Normal file
@ -0,0 +1,2 @@
|
||||
%__kabi_provides %{_rpmconfigdir}/kabi.sh
|
||||
%__kabi_path ^/lib/modules/[1-9].*/symvers.gz$
|
13
kabi.sh
Normal file
13
kabi.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash +x
|
||||
#
|
||||
# kabi.sh - Automatically extract any kernel symbol checksum from the
|
||||
# symvers file and add to RPM deps. This is used to move the
|
||||
# checksum checking from modprobe to rpm install for 3rd party
|
||||
# modules (so they can fail during install and not at load).
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
for symvers in $(grep -E '/lib/modules/[1-9].*/symvers\.gz') "$@";
|
||||
do
|
||||
zcat $symvers | awk ' {print "kernel(" $2 ") = " $1 }'
|
||||
done
|
@ -30,6 +30,10 @@ Source300: kmodtool
|
||||
Source301: rpmsort
|
||||
Source302: symset-table
|
||||
|
||||
# kabi provides generator
|
||||
Source400: kabi.attr
|
||||
Source401: kabi.sh
|
||||
|
||||
%global rrcdir /usr/lib/rpm/redhat
|
||||
|
||||
|
||||
@ -74,13 +78,17 @@ install -p -m 644 -t %{buildroot}%{rrcdir}/find-provides.d firmware.prov modalia
|
||||
install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.kmp
|
||||
install -p -m 644 -t %{buildroot}%{_fileattrsdir} kmod.attr
|
||||
|
||||
install -p -m 644 -t "%{buildroot}%{_fileattrsdir}" kabi.attr
|
||||
install -p -m 755 -t "%{buildroot}%{_rpmconfigdir}" kabi.sh
|
||||
|
||||
%files
|
||||
%{_rpmconfigdir}/macros.d/macros.kernel-srpm
|
||||
%{_fileattrsdir}/kmod.attr
|
||||
|
||||
%files -n kernel-rpm-macros
|
||||
%{_rpmconfigdir}/kabi.sh
|
||||
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||
%{_fileattrsdir}/kabi.attr
|
||||
%dir %{rrcdir}/find-provides.d
|
||||
%{rrcdir}/kmodtool
|
||||
%{rrcdir}/rpmsort
|
||||
|
Loading…
Reference in New Issue
Block a user