diff --git a/SOURCES/man-rmmod-explain-why-modprobe-r-is-more-useful.patch b/SOURCES/man-rmmod-explain-why-modprobe-r-is-more-useful.patch new file mode 100644 index 0000000..b659bf7 --- /dev/null +++ b/SOURCES/man-rmmod-explain-why-modprobe-r-is-more-useful.patch @@ -0,0 +1,58 @@ +From 06fadcc6b17c3b9a534540dd6d74b0c5fb1d948d Mon Sep 17 00:00:00 2001 +From: Yauheni Kaliuta +Date: Thu, 2 Feb 2023 15:47:36 +0200 +Subject: [PATCH] man/rmmod: explain why modprobe -r is more useful + +Improve user experience by explaining the option so the user may +not search explanations in other manpages (modprobe). + +Signed-off-by: Yauheni Kaliuta +Reviewed-by: Luis Chamberlain +Signed-off-by: Lucas De Marchi +--- + man/rmmod.xml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/man/rmmod.xml b/man/rmmod.xml +index e7c7e5f9e7dc..67bcbedd972b 100644 +--- a/man/rmmod.xml ++++ b/man/rmmod.xml +@@ -52,7 +52,8 @@ + want to use + + modprobe8 +- with the option instead. ++ with the option instead ++ since it removes unused dependent modules as well. + + + +--- a/man/rmmod.8 2020-12-28 02:58:30.085851136 +0200 ++++ b/man/rmmod.8 2023-02-09 16:55:55.967128297 +0200 +@@ -2,12 +2,12 @@ + .\" Title: rmmod + .\" Author: Jon Masters + .\" Generator: DocBook XSL Stylesheets vsnapshot +-.\" Date: 12/27/2020 ++.\" Date: 02/09/2023 + .\" Manual: rmmod + .\" Source: kmod + .\" Language: English + .\" +-.TH "RMMOD" "8" "12/27/2020" "kmod" "rmmod" ++.TH "RMMOD" "8" "02/09/2023" "kmod" "rmmod" + .\" ----------------------------------------------------------------- + .\" * Define some portability stuff + .\" ----------------------------------------------------------------- +@@ -39,7 +39,7 @@ + \fBmodprobe\fR(8) + with the + \fB\-r\fR +-option instead\&. ++option instead since it removes unused dependent modules as well\&. + .SH "OPTIONS" + .PP + \fB\-v\fR, \fB\-\-verbose\fR +-- +2.39.1 + diff --git a/SOURCES/weak-modules b/SOURCES/weak-modules index 65806d0..5852894 100644 --- a/SOURCES/weak-modules +++ b/SOURCES/weak-modules @@ -520,26 +520,31 @@ finish_sandbox() { # Auxiliary functions to find symvers file make_kernel_file_names() { local krel="$1" - local file="$2" - local suffix="$3" + shift + local file="$1" + shift - echo "${BASEDIR}/boot/${file}-${krel}${suffix}" - echo "${BASEDIR}/lib/modules/${krel}/${file}${suffix}" + for suffix in "$@"; do + echo "${BASEDIR}/boot/${file}-${krel}${suffix}" + echo "${BASEDIR}/lib/modules/${krel}/${file}${suffix}" + done } find_kernel_file() { local krel="$1" - local file="$2" - local suffix="$3" - local print="$4" + shift + local file="$1" + shift + local print="$1" + shift local i if [[ "$print" != "" ]]; then - make_kernel_file_names "$krel" "$file" "$suffix" + make_kernel_file_names "$krel" "$file" "$@" return 0 fi - for i in $(make_kernel_file_names "$krel" "$file" "$suffix"); do + for i in $(make_kernel_file_names "$krel" "$file" "$@"); do if [[ -r "$i" ]]; then echo "$i" return 0 @@ -563,7 +568,7 @@ find_symvers_file() { local krel="$1" local print="$2" - find_kernel_file "$krel" symvers .gz "$print" + find_kernel_file "$krel" symvers "$print" .xz .gz } # find_systemmap_file: @@ -573,7 +578,7 @@ find_systemmap_file() { local print="$2" local no_suffix="" - find_kernel_file "$krel" System.map "$no_suffix" "$print" + find_kernel_file "$krel" System.map "$print" "$no_suffix" } #### Main logic diff --git a/SPECS/kmod.spec b/SPECS/kmod.spec index a8b902b..65ea6cd 100644 --- a/SPECS/kmod.spec +++ b/SPECS/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 28 -Release: 7%{?dist} +Release: 9%{?dist} Summary: Linux kernel module management utilities License: GPLv2+ @@ -10,6 +10,8 @@ Source1: weak-modules Source2: depmod.conf.dist Exclusiveos: Linux +Patch01: man-rmmod-explain-why-modprobe-r-is-more-useful.patch + BuildRequires: gcc BuildRequires: chrpath BuildRequires: zlib-devel @@ -109,6 +111,14 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Thu May 11 2023 Eugene Syromiatnikov - 28-9 +- Add symvers.xz support to weak-modules +- Resolves: rhbz#2192895 + +* Thu Feb 9 2023 Yauheni Kaliuta - 28-8 +- man/rmmod: explain why modprobe -r is more useful + Resolves: rhbz#2164253 + * Thu Oct 21 2021 Yauheni Kaliuta - 28-7 - Add RHEL gating configuration. Related: rhbz#1985100