import redhat-rpm-config-128-1.el8
This commit is contained in:
parent
9d6b9d2cc2
commit
ddbf84ed13
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#! /bin/bash -efu
|
||||||
|
|
||||||
# heavily based upon find-suggests.ksyms by Andreas Gruenbacher <agruen@suse.de>.
|
# heavily based upon find-suggests.ksyms by Andreas Gruenbacher <agruen@suse.de>.
|
||||||
# with modifications by Michael Brown <Michael_E_Brown@dell.com>
|
# with modifications by Michael Brown <Michael_E_Brown@dell.com>
|
||||||
|
@ -14,7 +14,8 @@ IFS=$'\n'
|
||||||
# completeness, so that we can determine when drivers are folded into
|
# completeness, so that we can determine when drivers are folded into
|
||||||
# mainline kernel.
|
# mainline kernel.
|
||||||
#
|
#
|
||||||
case "$1" in
|
is_kernel_package=""
|
||||||
|
case "${1:-}" in
|
||||||
kernel-module-*) ;; # Fedora kernel module package names start with
|
kernel-module-*) ;; # Fedora kernel module package names start with
|
||||||
# kernel-module.
|
# kernel-module.
|
||||||
kernel*) is_kernel_package=1 ;;
|
kernel*) is_kernel_package=1 ;;
|
||||||
|
@ -25,6 +26,11 @@ if ! [ -z "$is_kernel_package" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check for presence of the commands used
|
||||||
|
which /sbin/modinfo >/dev/null || exit 0
|
||||||
|
which sed >/dev/null || exit 0
|
||||||
|
which sort >/dev/null || exit 0
|
||||||
|
|
||||||
print_modaliases() {
|
print_modaliases() {
|
||||||
declare class=$1 variants=$2 pos=$3
|
declare class=$1 variants=$2 pos=$3
|
||||||
if [ -n "$variants" ]; then
|
if [ -n "$variants" ]; then
|
||||||
|
@ -35,7 +41,7 @@ print_modaliases() {
|
||||||
}
|
}
|
||||||
|
|
||||||
combine_modaliases() {
|
combine_modaliases() {
|
||||||
declare tag class variants pos n
|
declare tag class variants="" pos="" n
|
||||||
read class
|
read class
|
||||||
while read tag; do
|
while read tag; do
|
||||||
for ((n=0; n<${#class}; n++)); do
|
for ((n=0; n<${#class}; n++)); do
|
||||||
|
@ -58,19 +64,15 @@ combine_modaliases() {
|
||||||
print_modaliases "$class" "$variants" "$pos"
|
print_modaliases "$class" "$variants" "$pos"
|
||||||
}
|
}
|
||||||
|
|
||||||
for module in $(grep -E '/lib/modules/.+\.ko$') $*; do
|
for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz)?$') "$@"; do
|
||||||
# | head -n1 because some modules have *two* version tags. *cough*b44*cough*
|
# | head -n1 because some modules have *two* version tags. *cough*b44*cough*
|
||||||
modver=$(/sbin/modinfo -F version "$module"| head -n1)
|
modver=$(/sbin/modinfo -F version "$module"| head -n1)
|
||||||
modver=${modver// /_}
|
modver=${modver//[^0-9a-zA-Z._]/_}
|
||||||
|
|
||||||
# only add version tag if it has a version
|
# only add version tag if it has a version
|
||||||
if [ -n "$modver" ]; then
|
[ -z "$modver" ] || modver=" = $modver"
|
||||||
/sbin/modinfo -F alias "$module" \
|
|
||||||
| sed -nre "s,(.+),modalias(\\1) = $modver,p"
|
/sbin/modinfo -F alias "$module" \
|
||||||
else
|
| sed -nre "s,[^][0-9a-zA-Z._:*?/-],_,g; s,(.+),modalias(\\1)$modver,p"
|
||||||
/sbin/modinfo -F alias "$module" \
|
|
||||||
| sed -nre "s,(.+),modalias(\\1),p"
|
|
||||||
fi
|
|
||||||
done \
|
done \
|
||||||
| sort -u \
|
| sort -u \
|
||||||
| combine_modaliases
|
| combine_modaliases
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: 127
|
Version: 128
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
# No version specified.
|
# No version specified.
|
||||||
License: GPL+
|
License: GPL+
|
||||||
|
@ -210,6 +210,10 @@ install -p -m 755 %{SOURCE21} %{buildroot}%{_rpmconfigdir}/kabi.sh
|
||||||
%{_rpmconfigdir}/macros.d/macros.kmp
|
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 05 2022 Eugene Syromiatnikov <esyr@redhat.com> - 128-1
|
||||||
|
- modalias.prov: handle compressed kmods, sanitise alias/version strings
|
||||||
|
(#1976000)
|
||||||
|
|
||||||
* Mon Dec 13 2021 Michal Domonkos <mdomonko@redhat.com> - 127-1
|
* Mon Dec 13 2021 Michal Domonkos <mdomonko@redhat.com> - 127-1
|
||||||
- Add Requires: glibc-gconv-extras to cover for the split (#2013328)
|
- Add Requires: glibc-gconv-extras to cover for the split (#2013328)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue