import CS kernel-srpm-macros-1.0-16.el9

This commit is contained in:
AlmaLinux RelEng Bot 2026-08-24 09:14:08 -04:00
parent 034fd18c66
commit 87df9a2a5e
2 changed files with 22 additions and 7 deletions

View File

@ -3,7 +3,7 @@
# This script is called during external module building to create dependencies
# both upon the RHEL kernel, and on additional external modules. Symbols that
# cannot be reconciled against those provided by the kernel are assumed to be
# provided by an external module and "ksym" replaces th regular "kernel" dep.
# provided by an external module and "ksym" replaces the regular "kernel" dep.
IFS=$'\n'
export LC_ALL=C
@ -174,21 +174,23 @@ if [ ${#modules[@]} -gt 0 ]; then
{ print $2 ":" $1 }
' \
| sed -r -e 's:$:\t'"$kernel"':' \
| sort -k1,1 -u > $symvers
| sort -k1,1 -u > "$symvers"
# Symbols matching with the kernel get a "kernel" dependency
mod_req=$(mktemp -t mod_req.XXXXX)
mod_requires "${modules[@]}" > "$mod_req"
join -t $'\t' -j 1 $symvers "$mod_req" | sort -u \
join -t $'\t' -j 1 "$symvers" "$mod_req" | sort -u \
| awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }'
# Symbols from elsewhere get a "ksym" dependency
join -t $'\t' -j 1 -v 2 $symvers "$mod_req" | sort -u \
join -t $'\t' -j 1 -v 2 "$symvers" "$mod_req" | sort -u \
| awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print "ksym(" $1 ") = " $2 }'
# Check kABI if the kabi-stablelists package is installed
# Do this last so we can try to output this error at the end
kabi_check_symbols=($(join -t $'\t' -j 1 $symvers "$mod_req" | sort -u \
kabi_check_symbols=($(join -t $'\t' -j 1 "$symvers" "$mod_req" | sort -u \
| awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print $1 }'))
check_kabi "${kabi_check_symbols[@]}"
rm -f -- "$symvers" "$mod_req"
fi

View File

@ -1,6 +1,7 @@
Name: kernel-srpm-macros
Version: 1.0
Release: 14%{?dist}
# when bumping version and resetting release, don't forget to bump version of kernel-rpm-macros as well
Release: 16%{?dist}
Summary: RPM macros that list arches the full kernel is built on
# This package only exist in Fedora repositories
# The license is the standard (MIT) specified in
@ -53,7 +54,7 @@ the full kernel is built on.
The variable to use is kernel_arches.
%package -n kernel-rpm-macros
Version: 185
Version: 186
Release: %{release}
Summary: Macros and scripts for building kernel module packages
Requires: redhat-rpm-config >= 13
@ -73,6 +74,10 @@ Requires: %{_bindir}/readelf
# for find-requires.ksyms
Requires: %{_sbindir}/modinfo
Requires: %{_sbindir}/modprobe
# for brp-kmod-set-exec-bit, brp-kmod-restore-perms, modalias.prov
# (probably can switch to using "type CMD1 CMD2 >/dev/null" instead,
# "type" is a shell builtin required by standards).
Requires: which
%description -n kernel-rpm-macros
Macros and scripts for building kernel module packages.
@ -134,6 +139,14 @@ install -p -m 644 -t "%{buildroot}%{_fileattrsdir}" modalias.attr
%{rrcdir}/find-provides.d/modalias.prov
%changelog
* Mon Jul 27 2026 Denys Vlasenko <dvlasenk@redhat.com> - 1.0-16
- kernel-srpm-macros.spec: kernel-rpm-macros requires "which"
Resolves: RHEL-111238
* Fri Jul 03 2026 Denys Vlasenko <dvlasenk@redhat.com> - 1.0-15
- find-requires.ksyms: remove /tmp/{find-requires.ksyms,mod_req}.* temporary files
Resolves: RHEL-87719
* Mon Aug 12 2025 Denys Vlasenko <dvlasenk@redhat.com> - 1.0-14
- macros.kmp: do not run `rpm -qa`
Resolves: RHEL-57823