From 7648e1a704a4aefe5a2926e4825d0b54087be1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 11 Apr 2024 10:47:32 +0200 Subject: [PATCH 01/18] Prepare for bin-sbin merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin Create symlinks use 'ln --relative' so that we don't get /usr/bin/foo → ../bin/bar, but instead /usr/bin/foo → bar. Create compat provides for the old file locations to satisfy Requires in other packages. --- kmod.spec | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/kmod.spec b/kmod.spec index e3ffcd3..5971c8b 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 31 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -89,6 +89,18 @@ Provides: module-init-tools = 4.0-1 Obsoletes: module-init-tools < 4.0-1 Provides: /sbin/modprobe +%if "%{_sbindir}" == "%{_bindir}" +# Compat symlinks for Requires in other packages. +# We rely on filesystem to create the symlinks for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/modprobe +Provides: /usr/sbin/modinfo +Provides: /usr/sbin/insmod +Provides: /usr/sbin/rmmod +Provides: /usr/sbin/lsmod +Provides: /usr/sbin/depmod +%endif + %description The kmod package provides various programs needed for automatic loading and unloading of modules under 2.6, 3.x, and later kernels, as well @@ -139,12 +151,9 @@ popd find %{buildroot} -type f -name "*.la" -delete mkdir -p $RPM_BUILD_ROOT%{_sbindir} -ln -sf ../bin/kmod $RPM_BUILD_ROOT%{_sbindir}/modprobe -ln -sf ../bin/kmod $RPM_BUILD_ROOT%{_sbindir}/modinfo -ln -sf ../bin/kmod $RPM_BUILD_ROOT%{_sbindir}/insmod -ln -sf ../bin/kmod $RPM_BUILD_ROOT%{_sbindir}/rmmod -ln -sf ../bin/kmod $RPM_BUILD_ROOT%{_sbindir}/depmod -ln -sf ../bin/kmod $RPM_BUILD_ROOT%{_sbindir}/lsmod +for i in modprobe modinfo insmod rmmod depmod lsmod; do + ln -sf --relative $RPM_BUILD_ROOT%{_bindir}/kmod $RPM_BUILD_ROOT%{_sbindir}/$i +done mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d @@ -193,6 +202,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Thu Apr 11 2024 Zbigniew Jedrzejewski-Szmek - 31-6 +- Prepare for %%_bindir==%%_sbindir + * Thu Jan 25 2024 Fedora Release Engineering - 31-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 486394f8b7dc812cb158ffaef8cf39a03ffbb439 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 12:29:07 +0000 Subject: [PATCH 02/18] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- kmod.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index 5971c8b..3b532d0 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 31 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -202,6 +202,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 31-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Apr 11 2024 Zbigniew Jedrzejewski-Szmek - 31-6 - Prepare for %%_bindir==%%_sbindir From 5baad98a23cd1503639538bf649b0ea9d05b2138 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Mon, 12 Aug 2024 15:59:22 +0200 Subject: [PATCH 03/18] weak-modules: use a proper program for dumping symvers Previously it was assumed that symvers is in gzip format, which is no longer the case, so zcat was used. Dispatch based on the symvers file extension. References: RHEL-39388 Signed-off-by: Eugene Syromiatnikov --- kmod.spec | 5 ++++- weak-modules | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/kmod.spec b/kmod.spec index 3b532d0..fed1427 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 31 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -202,6 +202,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Mon Aug 12 20234 Eugene Syromiatnikov - 31-8 +- weak-modules: use either zcat or xzcat based on symvers file extension + * Thu Jul 18 2024 Fedora Release Engineering - 31-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/weak-modules b/weak-modules index d4ac171..76523a7 100644 --- a/weak-modules +++ b/weak-modules @@ -758,6 +758,7 @@ validate_weak_links() { # to return to caller that original proposal is not valid # here 0 is true, 1 is false, since it will be the return code local is_configuration_valid=0 + local cat_prog tmp=$(mktemp -p $tmpdir) compatible_modules=() @@ -766,7 +767,12 @@ validate_weak_links() { local symvers_path=$(find_symvers_file "$krel") [[ -n "$symvers_path" ]] || return - zcat "$symvers_path" > $tmpdir/symvers-$krel + cat_prog="cat" + case "$symvers" in + *.gz) cat_prog="zcat" ;; + *.xz) cat_prog="xzcat" ;; + esac + "$cat_prog" "$symvers_path" > $tmpdir/symvers-$krel fi while ((is_updates_changed)); do From 73d6e056b5127a939e3ef6c0440056ac6f1dbd3a Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Mon, 12 Aug 2024 16:11:02 +0200 Subject: [PATCH 04/18] kmod.spec: fix a typo in date in changelog entry Signed-off-by: Eugene Syromiatnikov --- kmod.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index fed1427..c01dc48 100644 --- a/kmod.spec +++ b/kmod.spec @@ -202,7 +202,7 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog -* Mon Aug 12 20234 Eugene Syromiatnikov - 31-8 +* Mon Aug 12 2024 Eugene Syromiatnikov - 31-8 - weak-modules: use either zcat or xzcat based on symvers file extension * Thu Jul 18 2024 Fedora Release Engineering - 31-7 From de9195aa3e41469bb6b51f0788fecd9c57d60f6f Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Thu, 15 Aug 2024 20:40:57 +0200 Subject: [PATCH 05/18] New upstream v33 * .gitignore: Add /kmod-33.tar.xz, * kmod-tip.patch: Remove. * kmod.spec (Version): Bump to 33. (Release): Reset to 1. (Patch1): Remove. (BuildRequires): Remove libxslt and docbook-style-xsl, add scdoc; upstream switched to scdoc-based man pages in commt v33~46. (%install): Remove symlinks installed by make install since v32~3. (%files): kmod.pc is moved to %{_datadir} and is moved to be a part of the main package and not kmod-devel, as it should be; TODO file has been removed in v33~2. (%chanelog): Add a record. * sources: Replace the kmod-31.tar.xz with kmod-33.tar.xz. Resolves: rhbz#2268030 Signed-off-by: Eugene Syromiatnikov --- .gitignore | 1 + kmod-tip.patch | 561 ------------------------------------------------- kmod.spec | 17 +- sources | 2 +- 4 files changed, 13 insertions(+), 568 deletions(-) delete mode 100644 kmod-tip.patch diff --git a/.gitignore b/.gitignore index b19ddb5..b486f98 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /kmod-30.tar.gz /kmod-30.tar.xz /kmod-31.tar.xz +/kmod-33.tar.xz diff --git a/kmod-tip.patch b/kmod-tip.patch deleted file mode 100644 index d57d9f4..0000000 --- a/kmod-tip.patch +++ /dev/null @@ -1,561 +0,0 @@ -From 1bb23d7f19d888fbdd96ae0fe929b7086713ef33 Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Tue, 18 Jul 2023 14:01:52 +0200 -Subject: [PATCH 1/6] configure: Detect openssl sm3 support - -Older openssl versions do not support sm3. The code has an option to -disable the sm3 hash but the lack of openssl support is not detected -automatically. - -Signed-off-by: Michal Suchanek -Link: https://lore.kernel.org/r/b97e20faa07e9e31c6eaf96683011aa24e80760c.1689681454.git.msuchanek@suse.de -Signed-off-by: Lucas De Marchi ---- - configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 82a8532..e5bceea 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -123,6 +123,13 @@ AC_ARG_WITH([openssl], - AS_IF([test "x$with_openssl" != "xno"], [ - PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"]) - AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.]) -+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include -+ int nid = NID_sm3;]])], [ -+ AC_MSG_NOTICE([openssl supports sm3]) -+ ], [ -+ AC_MSG_NOTICE([openssl sm3 support not detected]) -+ CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3" -+ ]) - ], [ - AC_MSG_NOTICE([openssl support not requested]) - ]) --- -2.41.0 - - -From 4e7effbdc00307d0d1e83115e0d00cc75aae5cc6 Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Tue, 18 Jul 2023 14:01:53 +0200 -Subject: [PATCH 2/6] man/depmod.d: Fix incorrect /usr/lib search path - -depmod searches /lib/depmod.d but the man page says /usr/lib/depmod.d is -searched. Align the documentation with the code. - -Signed-off-by: Michal Suchanek -Link: https://lore.kernel.org/r/9c5a6356b1a111eb6e17ddb110494b7f1d1b44c0.1689681454.git.msuchanek@suse.de -Signed-off-by: Lucas De Marchi ---- - man/depmod.d.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/depmod.d.xml b/man/depmod.d.xml -index 76548e9..8d3d821 100644 ---- a/man/depmod.d.xml -+++ b/man/depmod.d.xml -@@ -39,7 +39,7 @@ - - - -- /usr/lib/depmod.d/*.conf -+ /lib/depmod.d/*.conf - /usr/local/lib/depmod.d/*.conf - /run/depmod.d/*.conf - /etc/depmod.d/*.conf --- -2.41.0 - - -From 8463809f8a29b254b2cab2ce755641bc690f07c9 Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Tue, 18 Jul 2023 14:01:54 +0200 -Subject: [PATCH 3/6] libkmod, depmod: Load modprobe.d, depmod.d from - ${prefix}/lib. - -There is an ongoing effort to limit use of files outside of /usr (or -${prefix} on general). Currently all modprobe.d paths are hardcoded to -outside of $prefix. Teach kmod to load modprobe.d from ${prefix}/lib. - -On some distributions /usr/lib and /lib are the same directory because -of a compatibility symlink, and it is possible to craft configuration -files with sideeffects that would behave differently when loaded twice. -However, the override semantic ensures that one 'overrides' the other, -and only one configuration file of the same name is loaded from any of -the search directories. - -Signed-off-by: Michal Suchanek -Link: https://lore.kernel.org/r/a290343ce32e2a3c25b134e4f27c13b26e06c9e0.1689681454.git.msuchanek@suse.de -Signed-off-by: Lucas De Marchi ---- - Makefile.am | 1 + - configure.ac | 5 +++++ - libkmod/libkmod.c | 7 ++++--- - man/Makefile.am | 9 +++++++-- - man/depmod.d.xml | 1 + - man/modprobe.d.xml | 1 + - tools/depmod.c | 1 + - 7 files changed, 20 insertions(+), 5 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 5b7abfe..e6630a3 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -19,6 +19,7 @@ AM_CPPFLAGS = \ - -include $(top_builddir)/config.h \ - -I$(top_srcdir) \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ -+ -DDISTCONFDIR=\""$(distconfdir)"\" \ - ${zlib_CFLAGS} - - AM_CFLAGS = $(OUR_CFLAGS) -diff --git a/configure.ac b/configure.ac -index e5bceea..fd88d1f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -79,6 +79,10 @@ AC_COMPILE_IFELSE( - # --with- - ##################################################################### - -+AC_ARG_WITH([distconfdir], AS_HELP_STRING([--with-distconfdir=DIR], [directory to search for distribution configuration files]), -+ [], [with_distconfdir='${prefix}/lib']) -+AC_SUBST([distconfdir], [$with_distconfdir]) -+ - AC_ARG_WITH([rootlibdir], - AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), - [], [with_rootlibdir=$libdir]) -@@ -313,6 +317,7 @@ AC_MSG_RESULT([ - - prefix: ${prefix} - sysconfdir: ${sysconfdir} -+ distconfdir: ${distconfdir} - libdir: ${libdir} - rootlibdir: ${rootlibdir} - includedir: ${includedir} -diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c -index 1b8773c..57fac1c 100644 ---- a/libkmod/libkmod.c -+++ b/libkmod/libkmod.c -@@ -65,6 +65,7 @@ static const char *const default_config_paths[] = { - SYSCONFDIR "/modprobe.d", - "/run/modprobe.d", - "/usr/local/lib/modprobe.d", -+ DISTCONFDIR "/modprobe.d", - "/lib/modprobe.d", - NULL - }; -@@ -272,9 +273,9 @@ static enum kmod_file_compression_type get_kernel_compression(struct kmod_ctx *c - * to load from user-defined configuration parameters such as - * alias, blacklists, commands (install, remove). If NULL - * defaults to /etc/modprobe.d, /run/modprobe.d, -- * /usr/local/lib/modprobe.d and /lib/modprobe.d. Give an empty -- * vector if configuration should not be read. This array must -- * be null terminated. -+ * /usr/local/lib/modprobe.d, DISTCONFDIR/modprobe.d, and -+ * /lib/modprobe.d. Give an empty vector if configuration should -+ * not be read. This array must be null terminated. - * - * Create kmod library context. This reads the kmod configuration - * and fills in the default values. -diff --git a/man/Makefile.am b/man/Makefile.am -index 11514d5..2fea8e4 100644 ---- a/man/Makefile.am -+++ b/man/Makefile.am -@@ -17,9 +17,14 @@ EXTRA_DIST = $(MAN5:%.5=%.xml) $(MAN8:%.8=%.xml) - CLEANFILES = $(dist_man_MANS) - - %.5 %.8: %.xml -- $(AM_V_XSLT)$(XSLT) \ -+ $(AM_V_XSLT)if [ '$(distconfdir)' != '/lib' ] ; then \ -+ sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' $< ; \ -+ else \ -+ sed -e '/@DISTCONFDIR@/d' $< ; \ -+ fi | \ -+ $(XSLT) \ - -o $@ \ - --nonet \ - --stringparam man.output.quietly 1 \ - --param funcsynopsis.style "'ansi'" \ -- http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< -+ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl - -diff --git a/man/depmod.d.xml b/man/depmod.d.xml -index 8d3d821..f282a39 100644 ---- a/man/depmod.d.xml -+++ b/man/depmod.d.xml -@@ -40,6 +40,7 @@ - - - /lib/depmod.d/*.conf -+ @DISTCONFDIR@/depmod.d/*.conf - /usr/local/lib/depmod.d/*.conf - /run/depmod.d/*.conf - /etc/depmod.d/*.conf -diff --git a/man/modprobe.d.xml b/man/modprobe.d.xml -index 0ab3e91..2bf6537 100644 ---- a/man/modprobe.d.xml -+++ b/man/modprobe.d.xml -@@ -41,6 +41,7 @@ - - - /lib/modprobe.d/*.conf -+ @DISTCONFDIR@/modprobe.d/*.conf - /usr/local/lib/modprobe.d/*.conf - /run/modprobe.d/*.conf - /etc/modprobe.d/*.conf -diff --git a/tools/depmod.c b/tools/depmod.c -index 1d1d41d..630fef9 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c -@@ -54,6 +54,7 @@ static const char *const default_cfg_paths[] = { - SYSCONFDIR "/depmod.d", - "/run/depmod.d", - "/usr/local/lib/depmod.d", -+ DISTCONFDIR "/depmod.d", - "/lib/depmod.d", - NULL - }; --- -2.41.0 - - -From ecef7c131618bbd9c559924ecae55764089db0dd Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Tue, 18 Jul 2023 14:01:55 +0200 -Subject: [PATCH 4/6] kmod: Add pkgconfig file with kmod compile time - configuration - -Show distconfdir (where system configuration files are searched/to be -installed), sysconfdir (where user configuration files are searched), -module compressions, and module signatures supported. - -Signed-off-by: Michal Suchanek -Link: https://lore.kernel.org/r/468b3f572d3b84f25bb53ec8fcb15ed4871914d4.1689681454.git.msuchanek@suse.de -Signed-off-by: Lucas De Marchi ---- - Makefile.am | 2 +- - configure.ac | 11 +++++++++++ - tools/kmod.pc.in | 9 +++++++++ - 3 files changed, 21 insertions(+), 1 deletion(-) - create mode 100644 tools/kmod.pc.in - -diff --git a/Makefile.am b/Makefile.am -index e6630a3..2a54c25 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -96,7 +96,7 @@ libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES) - libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD) - - pkgconfigdir = $(libdir)/pkgconfig --pkgconfig_DATA = libkmod/libkmod.pc -+pkgconfig_DATA = libkmod/libkmod.pc tools/kmod.pc - - bashcompletiondir=@bashcompletiondir@ - dist_bashcompletion_DATA = \ -diff --git a/configure.ac b/configure.ac -index fd88d1f..7bf8d78 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -21,6 +21,9 @@ LT_INIT([disable-static pic-only]) - AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])]) - AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by kmod])]) - -+module_compressions="" -+module_signatures="legacy" -+ - ##################################################################### - # Program checks and configurations - ##################################################################### -@@ -94,6 +97,7 @@ AC_ARG_WITH([zstd], - AS_IF([test "x$with_zstd" != "xno"], [ - PKG_CHECK_MODULES([libzstd], [libzstd >= 1.4.4], [LIBS="$LIBS $libzstd_LIBS"]) - AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard for modules.]) -+ module_compressions="zstd $module_compressions" - ], [ - AC_MSG_NOTICE([Zstandard support not requested]) - ]) -@@ -105,6 +109,7 @@ AC_ARG_WITH([xz], - AS_IF([test "x$with_xz" != "xno"], [ - PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99], [LIBS="$LIBS $liblzma_LIBS"]) - AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.]) -+ module_compressions="xz $module_compressions" - ], [ - AC_MSG_NOTICE([Xz support not requested]) - ]) -@@ -116,6 +121,7 @@ AC_ARG_WITH([zlib], - AS_IF([test "x$with_zlib" != "xno"], [ - PKG_CHECK_MODULES([zlib], [zlib], [LIBS="$LIBS $zlib_LIBS"]) - AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.]) -+ module_compressions="gzip $module_compressions" - ], [ - AC_MSG_NOTICE([zlib support not requested]) - ]) -@@ -134,6 +140,7 @@ AS_IF([test "x$with_openssl" != "xno"], [ - AC_MSG_NOTICE([openssl sm3 support not detected]) - CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3" - ]) -+ module_signatures="PKCS7 $module_signatures" - ], [ - AC_MSG_NOTICE([openssl support not requested]) - ]) -@@ -298,6 +305,9 @@ AC_DEFINE_UNQUOTED(KMOD_FEATURES, ["$with_features"], [Features in this build]) - # Generate files from *.in - ##################################################################### - -+AC_SUBST([module_compressions], $module_compressions) -+AC_SUBST([module_signatures], $module_signatures) -+ - AC_CONFIG_FILES([ - Makefile - man/Makefile -@@ -305,6 +315,7 @@ AC_CONFIG_FILES([ - libkmod/docs/version.xml - libkmod/libkmod.pc - libkmod/python/kmod/version.py -+ tools/kmod.pc - ]) - - -diff --git a/tools/kmod.pc.in b/tools/kmod.pc.in -new file mode 100644 -index 0000000..2595980 ---- /dev/null -+++ b/tools/kmod.pc.in -@@ -0,0 +1,9 @@ -+prefix=@prefix@ -+sysconfdir=@sysconfdir@ -+distconfdir=@distconfdir@ -+module_compressions=@module_compressions@ -+module_signatures=@module_signatures@ -+ -+Name: kmod -+Description: Tools to deal with kernel modules -+Version: @VERSION@ --- -2.41.0 - - -From 3af2f475b0b729f20279f2ce488cc9f727f0b763 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Sun, 5 Nov 2023 22:02:25 +0000 -Subject: [PATCH 5/6] tools: depmod: fix -Walloc-size -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GCC 14 introduces a new -Walloc-size included in -Wextra which gives: -``` -tools/depmod.c:192:14: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size] -tools/depmod.c:255:11: warning: allocation of insufficient size ‘1’ for type ‘struct index_value’ with size ‘16’ [-Walloc-size] -tools/depmod.c:286:35: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size] -tools/depmod.c:315:44: warning: allocation of insufficient size ‘1’ for type ‘struct index_node’ with size ‘1048’ [-Walloc-size] -``` - -The calloc prototype is: -``` -void *calloc(size_t nmemb, size_t size); -``` - -So, just swap the number of members and size arguments to match the prototype, as -we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not -doing anything wrong. - -Signed-off-by: Sam James ---- - tools/depmod.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tools/depmod.c b/tools/depmod.c -index 630fef9..ab8513b 100644 ---- a/tools/depmod.c -+++ b/tools/depmod.c -@@ -190,7 +190,7 @@ static struct index_node *index_create(void) - { - struct index_node *node; - -- node = NOFAIL(calloc(sizeof(struct index_node), 1)); -+ node = NOFAIL(calloc(1, sizeof(struct index_node))); - node->prefix = NOFAIL(strdup("")); - node->first = INDEX_CHILDMAX; - -@@ -253,7 +253,7 @@ static int index_add_value(struct index_value **values, - values = &(*values)->next; - - len = strlen(value); -- v = NOFAIL(calloc(sizeof(struct index_value) + len + 1, 1)); -+ v = NOFAIL(calloc(1, sizeof(struct index_value) + len + 1)); - v->next = *values; - v->priority = priority; - memcpy(v->value, value, len + 1); -@@ -284,7 +284,7 @@ static int index_insert(struct index_node *node, const char *key, - struct index_node *n; - - /* New child is copy of node with prefix[j+1..N] */ -- n = NOFAIL(calloc(sizeof(struct index_node), 1)); -+ n = NOFAIL(calloc(1, sizeof(struct index_node))); - memcpy(n, node, sizeof(struct index_node)); - n->prefix = NOFAIL(strdup(&prefix[j+1])); - -@@ -313,7 +313,7 @@ static int index_insert(struct index_node *node, const char *key, - node->first = ch; - if (ch > node->last) - node->last = ch; -- node->children[ch] = NOFAIL(calloc(sizeof(struct index_node), 1)); -+ node->children[ch] = NOFAIL(calloc(1, sizeof(struct index_node))); - - child = node->children[ch]; - child->prefix = NOFAIL(strdup(&key[i+1])); --- -2.41.0 - - -From 510c8b7f7455c6613dd1706e5e41ec7b09cf6703 Mon Sep 17 00:00:00 2001 -From: Dimitri John Ledkov -Date: Sun, 29 Oct 2023 03:03:19 +0200 -Subject: [PATCH 6/6] libkmod: remove pkcs7 obj_to_hash_algo() - -Switch to using OBJ_obj2txt() to calculate and print the pkcs7 -signature hash name. This eliminates the need to duplicate libcrypto -NID to name mapping, detect SM3 openssl compile-time support, and -enables using any hashes that openssl and kernel know about. For -example SHA3 are being added for v6.7 and with this patch are -automatically supported. - -Signed-off-by: Dimitri John Ledkov -Link: https://lore.kernel.org/r/20231029010319.157390-1-dimitri.ledkov@canonical.com ---- - configure.ac | 7 ----- - libkmod/libkmod-signature.c | 59 +++++++++++++------------------------ - 2 files changed, 20 insertions(+), 46 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7bf8d78..a6b8fa0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -133,13 +133,6 @@ AC_ARG_WITH([openssl], - AS_IF([test "x$with_openssl" != "xno"], [ - PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"]) - AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.]) -- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include -- int nid = NID_sm3;]])], [ -- AC_MSG_NOTICE([openssl supports sm3]) -- ], [ -- AC_MSG_NOTICE([openssl sm3 support not detected]) -- CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3" -- ]) - module_signatures="PKCS7 $module_signatures" - ], [ - AC_MSG_NOTICE([openssl support not requested]) -diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c -index b749a81..80f6447 100644 ---- a/libkmod/libkmod-signature.c -+++ b/libkmod/libkmod-signature.c -@@ -127,6 +127,7 @@ struct pkcs7_private { - PKCS7 *pkcs7; - unsigned char *key_id; - BIGNUM *sno; -+ char *hash_algo; - }; - - static void pkcs7_free(void *s) -@@ -137,42 +138,11 @@ static void pkcs7_free(void *s) - PKCS7_free(pvt->pkcs7); - BN_free(pvt->sno); - free(pvt->key_id); -+ free(pvt->hash_algo); - free(pvt); - si->private = NULL; - } - --static int obj_to_hash_algo(const ASN1_OBJECT *o) --{ -- int nid; -- -- nid = OBJ_obj2nid(o); -- switch (nid) { -- case NID_md4: -- return PKEY_HASH_MD4; -- case NID_md5: -- return PKEY_HASH_MD5; -- case NID_sha1: -- return PKEY_HASH_SHA1; -- case NID_ripemd160: -- return PKEY_HASH_RIPE_MD_160; -- case NID_sha256: -- return PKEY_HASH_SHA256; -- case NID_sha384: -- return PKEY_HASH_SHA384; -- case NID_sha512: -- return PKEY_HASH_SHA512; -- case NID_sha224: -- return PKEY_HASH_SHA224; --# ifndef OPENSSL_NO_SM3 -- case NID_sm3: -- return PKEY_HASH_SM3; --# endif -- default: -- return -1; -- } -- return -1; --} -- - static const char *x509_name_to_str(X509_NAME *name) - { - int i; -@@ -219,7 +189,8 @@ static bool fill_pkcs7(const char *mem, off_t size, - unsigned char *key_id_str; - struct pkcs7_private *pvt; - const char *issuer_str; -- int hash_algo; -+ char *hash_algo; -+ int hash_algo_len; - - size -= sig_len; - pkcs7_raw = mem + size; -@@ -278,27 +249,37 @@ static bool fill_pkcs7(const char *mem, off_t size, - - X509_ALGOR_get0(&o, NULL, NULL, dig_alg); - -- hash_algo = obj_to_hash_algo(o); -- if (hash_algo < 0) -+ // Use OBJ_obj2txt to calculate string length -+ hash_algo_len = OBJ_obj2txt(NULL, 0, o, 0); -+ if (hash_algo_len < 0) - goto err3; -- sig_info->hash_algo = pkey_hash_algo[hash_algo]; -- // hash algo has not been recognized -- if (sig_info->hash_algo == NULL) -+ hash_algo = malloc(hash_algo_len + 1); -+ if (hash_algo == NULL) - goto err3; -+ hash_algo_len = OBJ_obj2txt(hash_algo, hash_algo_len + 1, o, 0); -+ if (hash_algo_len < 0) -+ goto err4; -+ -+ // Assign libcrypto hash algo string or number -+ sig_info->hash_algo = hash_algo; -+ - sig_info->id_type = pkey_id_type[modsig->id_type]; - - pvt = malloc(sizeof(*pvt)); - if (pvt == NULL) -- goto err3; -+ goto err4; - - pvt->pkcs7 = pkcs7; - pvt->key_id = key_id_str; - pvt->sno = sno_bn; -+ pvt->hash_algo = hash_algo; - sig_info->private = pvt; - - sig_info->free = pkcs7_free; - - return true; -+err4: -+ free(hash_algo); - err3: - free(key_id_str); - err2: --- -2.41.0 - diff --git a/kmod.spec b/kmod.spec index c01dc48..05ddde2 100644 --- a/kmod.spec +++ b/kmod.spec @@ -15,8 +15,8 @@ %bcond_without zstd Name: kmod -Version: 31 -Release: 8%{?dist} +Version: 33 +Release: 1%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -67,7 +67,6 @@ URL: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz Source1: weak-modules Source2: depmod.conf.dist -Patch1: kmod-tip.patch Exclusiveos: Linux BuildRequires: gcc @@ -78,7 +77,7 @@ BuildRequires: zlib-devel %if %{with xz} BuildRequires: xz-devel %endif -BuildRequires: libxslt docbook-style-xsl +BuildRequires: scdoc BuildRequires: openssl-devel BuildRequires: make automake %if %{with zstd} @@ -152,6 +151,8 @@ find %{buildroot} -type f -name "*.la" -delete mkdir -p $RPM_BUILD_ROOT%{_sbindir} for i in modprobe modinfo insmod rmmod depmod lsmod; do + # kmod now installs the links into bindir by itself + rm $RPM_BUILD_ROOT%{_bindir}/$i ln -sf --relative $RPM_BUILD_ROOT%{_bindir}/kmod $RPM_BUILD_ROOT%{_sbindir}/$i done @@ -185,11 +186,12 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %if %{with dist_conf} %{_sysconfdir}/depmod.d/dist.conf %endif +%{_datadir}/pkgconfig/kmod.pc %attr(0644,root,root) %{_mandir}/man5/mod*.d*.5* %attr(0644,root,root) %{_mandir}/man5/depmod.d.5* %{_mandir}/man5/modprobe.conf.5* %attr(0644,root,root) %{_mandir}/man8/*.8* -%doc NEWS README.md TODO +%doc NEWS README.md %files libs %license COPYING @@ -197,11 +199,14 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %files devel %{_includedir}/libkmod.h -%{_libdir}/pkgconfig/kmod.pc %{_libdir}/pkgconfig/libkmod.pc %{_libdir}/libkmod.so %changelog +* Thu Aug 15 2024 Eugene Syromiatnikov - 33-1 +- New upstream v33 +- Resolves: rhbz#2268030 + * Mon Aug 12 2024 Eugene Syromiatnikov - 31-8 - weak-modules: use either zcat or xzcat based on symvers file extension diff --git a/sources b/sources index d97b132..0c06f7c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kmod-31.tar.xz) = 05ca70381808bec5f262b94db625662c385408988178a35e4aaf4960ee0716dc0cbfc327160ea4b61098d0c2130ab1b5142ea8156bea8e06ded7f4d288b6d085 +SHA512 (kmod-33.tar.xz) = 32d79d0bb7e89012f18458d4e88325f8e19a7dba6e1d5cff01aec3e618d1757b0f7c119735bf38d02e0d056a14273fd7522fca7c61a4d12a3ea5854bb662fff8 From 0a2caa79e2880b25a791b1130827d1dd8c643c60 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 28 Oct 2024 16:09:50 +0000 Subject: [PATCH 06/18] cleanup gitignore --- .gitignore | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index b486f98..4e53c68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1 @@ -/kmod-7.tar.xz -/kmod-8.tar.xz -/kmod-9.tar.xz -/kmod-10.tar.xz -/kmod-11.tar.xz -/kmod-12.tar.xz -/kmod-13.tar.xz -/kmod-14.tar.xz -/kmod-15.tar.xz -/kmod-16.tar.xz -/kmod-17.tar.xz -/kmod-18.tar.xz -/kmod-19.tar.xz -/kmod-20.tar.xz -/kmod-21.tar.xz -/kmod-22.tar.xz -/kmod-23.tar.xz -/kmod-24.tar.xz -/kmod-25.tar.xz -/kmod-26.tar.xz -/kmod-27.tar.xz -/kmod-28.tar.xz -/kmod-29.tar.gz -/kmod-29.tar.xz -/kmod-30.tar.gz -/kmod-30.tar.xz -/kmod-31.tar.xz -/kmod-33.tar.xz +/kmod-*.tar.xz From 26240b4bb3f9a4199c4aa8213ce585780bd540a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:32:51 +0100 Subject: [PATCH 07/18] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- kmod.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index 05ddde2..e171cbf 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 33 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -203,6 +203,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 33-2 +- Rebuilt for the bin-sbin merge (2nd attempt) + * Thu Aug 15 2024 Eugene Syromiatnikov - 33-1 - New upstream v33 - Resolves: rhbz#2268030 From 35b018985525206e6d7a67dcfe3be70aafae8766 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 09:35:58 +0000 Subject: [PATCH 08/18] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- kmod.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index e171cbf..7a935b4 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 33 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -203,6 +203,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 33-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 33-2 - Rebuilt for the bin-sbin merge (2nd attempt) From c6eaf81e4cb61123c4ee84a7da4b64e9b8d5036c Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 24 Feb 2025 12:13:48 -0500 Subject: [PATCH 09/18] New upstream release --- kmod.spec | 10 +++++++--- sources | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kmod.spec b/kmod.spec index 7a935b4..d88670a 100644 --- a/kmod.spec +++ b/kmod.spec @@ -15,8 +15,8 @@ %bcond_without zstd Name: kmod -Version: 33 -Release: 3%{?dist} +Version: 34 +Release: 1%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -79,7 +79,7 @@ BuildRequires: xz-devel %endif BuildRequires: scdoc BuildRequires: openssl-devel -BuildRequires: make automake +BuildRequires: make automake libtool %if %{with zstd} BuildRequires: libzstd-devel %endif @@ -203,6 +203,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Mon Feb 24 2025 Josh Boyer +- New upstream v34 +- Resolves: rhbz#2347049 + * Fri Jan 17 2025 Fedora Release Engineering - 33-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 0c06f7c..b9ece1c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kmod-33.tar.xz) = 32d79d0bb7e89012f18458d4e88325f8e19a7dba6e1d5cff01aec3e618d1757b0f7c119735bf38d02e0d056a14273fd7522fca7c61a4d12a3ea5854bb662fff8 +SHA512 (kmod-34.tar.xz) = 214ef8ea78da059a1dd8cce66267690f27ee47e22398e7b0e0b68834c42eb94f2b77cf99ef9c4bdb3f0aee103abda1d9bc9dfc414051e9ad47a72e063802fdbf From 46456317d7f14ae2ef2fd7b5142e800cd61b16b5 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 24 Feb 2025 12:26:43 -0500 Subject: [PATCH 10/18] Add gtk-doc BR --- kmod.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index d88670a..5497eaf 100644 --- a/kmod.spec +++ b/kmod.spec @@ -77,7 +77,7 @@ BuildRequires: zlib-devel %if %{with xz} BuildRequires: xz-devel %endif -BuildRequires: scdoc +BuildRequires: scdoc gtk-doc BuildRequires: openssl-devel BuildRequires: make automake libtool %if %{with zstd} From 56b12983a2a52fcc2e8291af771b7bddf4f43f61 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 24 Feb 2025 13:16:51 -0500 Subject: [PATCH 11/18] Last changes for -34 --- kmod.spec | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/kmod.spec b/kmod.spec index 5497eaf..9f22611 100644 --- a/kmod.spec +++ b/kmod.spec @@ -125,6 +125,7 @@ applications that wish to load or unload Linux kernel modules. %autosetup -p1 %build +autoreconf --install %configure \ --with-openssl \ %if %{with zlib} @@ -149,13 +150,6 @@ popd find %{buildroot} -type f -name "*.la" -delete -mkdir -p $RPM_BUILD_ROOT%{_sbindir} -for i in modprobe modinfo insmod rmmod depmod lsmod; do - # kmod now installs the links into bindir by itself - rm $RPM_BUILD_ROOT%{_bindir}/$i - ln -sf --relative $RPM_BUILD_ROOT%{_bindir}/kmod $RPM_BUILD_ROOT%{_sbindir}/$i -done - mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d @@ -183,6 +177,8 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_sbindir}/weak-modules %endif %{_datadir}/bash-completion/ +%{_datadir}/fish/vendor_functions.d/* +%{_datadir}/zsh/site-functions/* %if %{with dist_conf} %{_sysconfdir}/depmod.d/dist.conf %endif From bd7db8fb025ec5567a796bd2e1b9c734ee71b1bc Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 8 Mar 2025 13:05:24 -0500 Subject: [PATCH 12/18] New upstream v34.1 Resolves: rhbz#2350269 --- kmod.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kmod.spec b/kmod.spec index 9f22611..19192eb 100644 --- a/kmod.spec +++ b/kmod.spec @@ -15,7 +15,7 @@ %bcond_without zstd Name: kmod -Version: 34 +Version: 34.1 Release: 1%{?dist} Summary: Linux kernel module management utilities @@ -199,6 +199,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Sat Mar 08 2025 Josh Boyer - 34.1-1 +- New upstream v34.1 +- Resolves: rhbz#2350269 + * Mon Feb 24 2025 Josh Boyer - New upstream v34 - Resolves: rhbz#2347049 diff --git a/sources b/sources index b9ece1c..eca3a3b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kmod-34.tar.xz) = 214ef8ea78da059a1dd8cce66267690f27ee47e22398e7b0e0b68834c42eb94f2b77cf99ef9c4bdb3f0aee103abda1d9bc9dfc414051e9ad47a72e063802fdbf +SHA512 (kmod-34.1.tar.xz) = f1f5026f31747270aea8b65df9eca95cc253e48622bfdb87e016e272a79ad1e90c0026cdf83a947fd53d8cbc1be1c546a5116db9617b690ab1b80f9792b6f5b2 From c41da9ae87a643a5fbc77a9b67af2d543371353b Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 31 Mar 2025 07:41:52 -0400 Subject: [PATCH 13/18] New upstream v34.2 Resolves: rhbz#2355680 --- kmod.spec | 6 +++++- sources | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kmod.spec b/kmod.spec index 19192eb..bc28ee9 100644 --- a/kmod.spec +++ b/kmod.spec @@ -15,7 +15,7 @@ %bcond_without zstd Name: kmod -Version: 34.1 +Version: 34.2 Release: 1%{?dist} Summary: Linux kernel module management utilities @@ -199,6 +199,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Mon Mar 31 2025 Josh Boyer - 34.2-1 +- New upstream v34.2 +- Resolves: rhbz#2355680 + * Sat Mar 08 2025 Josh Boyer - 34.1-1 - New upstream v34.1 - Resolves: rhbz#2350269 diff --git a/sources b/sources index eca3a3b..0390a92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (kmod-34.1.tar.xz) = f1f5026f31747270aea8b65df9eca95cc253e48622bfdb87e016e272a79ad1e90c0026cdf83a947fd53d8cbc1be1c546a5116db9617b690ab1b80f9792b6f5b2 +SHA512 (kmod-34.2.tar.xz) = 0e095c45ad61a6c61ce1ad61b9aa10cf5040e688b749f9a933b0e7d12de493c58027a5068b459cbbce05576fc564a22b83a3dbef1e6511b2a3e27034c88afd33 From d1dc8b58a874162dd3d0e0004d0f6172ac090f4e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 18:50:59 +0000 Subject: [PATCH 14/18] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- kmod.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index bc28ee9..ce3b8be 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 34.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -199,6 +199,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 34.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Mar 31 2025 Josh Boyer - 34.2-1 - New upstream v34.2 - Resolves: rhbz#2355680 From b64bf8be07c2fe54ca79009218e72161de636a89 Mon Sep 17 00:00:00 2001 From: "Ziqian SUN (Zamir)" Date: Thu, 20 Mar 2025 16:50:10 +0800 Subject: [PATCH 15/18] Convert gating to restraint and tmt Signed-off-by: Ziqian SUN (Zamir) --- .fmf/version | 1 + tests/libkmod/Makefile | 46 ----------------------- tests/libkmod/libkmod.fmf | 6 +++ tests/libkmod/metadata | 14 +++++++ tests/libkmod/runtest.sh | 1 + tests/plan.fmf | 4 ++ tests/sanity/Makefile | 79 --------------------------------------- tests/sanity/metadata | 12 ++++++ tests/sanity/sanity.fmf | 1 + tests/tests.yml | 2 +- 10 files changed, 40 insertions(+), 126 deletions(-) create mode 100644 .fmf/version delete mode 100644 tests/libkmod/Makefile create mode 100644 tests/libkmod/libkmod.fmf create mode 100644 tests/libkmod/metadata create mode 100644 tests/plan.fmf delete mode 100644 tests/sanity/Makefile create mode 100644 tests/sanity/metadata create mode 100644 tests/sanity/sanity.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/libkmod/Makefile b/tests/libkmod/Makefile deleted file mode 100644 index cc53a81..0000000 --- a/tests/libkmod/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1+ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/libkmod -# Description: Test if libkmod working ok -# Author: Susant Sahani -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export TEST=/CoreOS/libkmod -export TESTVERSION=1.0 - -OBJS = test-libkmod.c -CFLAG = -Wall -g3 -CC = gcc -LIBS = -lkmod -lcmocka - -test-libkmod:${OBJ} - ${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS} - -run: test-libkmod - ./runtest.sh -clean: - -rm -f test-libkmod - -.c.o: - ${CC} ${CFLAGS} ${INCLUDES} -c $< - -CC = gcc - -include /usr/share/rhts/lib/rhts-make.include -$(METADATA): Makefile - @echo "Owner: Susant Sahani" > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test libkmod works ok" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: libkmod" >> $(METADATA) - @echo "Requires: libkmod libkmod-devel" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -Fedora 29" >> $(METADATA) - rhts-lint $(METADATA) diff --git a/tests/libkmod/libkmod.fmf b/tests/libkmod/libkmod.fmf new file mode 100644 index 0000000..d796b57 --- /dev/null +++ b/tests/libkmod/libkmod.fmf @@ -0,0 +1,6 @@ +test: bash ./runtest.sh +require: + - libcmocka-devel + - kmod-devel + - make + - gcc diff --git a/tests/libkmod/metadata b/tests/libkmod/metadata new file mode 100644 index 0000000..455987a --- /dev/null +++ b/tests/libkmod/metadata @@ -0,0 +1,14 @@ +[General] +name=libkmod gating test +owner=Susant Sahani +description=libkmod gating test +license=GPLv2 +confidential=no +destructive=no + +[restraint] +entry_point=./runtest.sh +max_time=15m +use_pty=false +dependencies=gcc,make,libcmocka-devel,kmod-devel + diff --git a/tests/libkmod/runtest.sh b/tests/libkmod/runtest.sh index 1ef013c..d86b2e2 100755 --- a/tests/libkmod/runtest.sh +++ b/tests/libkmod/runtest.sh @@ -18,6 +18,7 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlAssertExists "$IPIP" + rlRun "gcc -o test-libkmod test-libkmod.c -lkmod -lcmocka" rlRun "cp test-libkmod /usr/bin/" rlPhaseEnd diff --git a/tests/plan.fmf b/tests/plan.fmf new file mode 100644 index 0000000..e6427de --- /dev/null +++ b/tests/plan.fmf @@ -0,0 +1,4 @@ +discover: + how: fmf +execute: + how: tmt diff --git a/tests/sanity/Makefile b/tests/sanity/Makefile deleted file mode 100644 index e422f7f..0000000 --- a/tests/sanity/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of general/kmod/sanity -# Description: kmod test -# -# 2016-07-31 -# Author: Chunyu Hu -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2016 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -TENV=_env -ifeq ($(PKG_TOP_DIR),) - export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ - [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) - export _TOP_DIR := $(shell p=$$PWD; while :; do \ - [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) - -include $(PKG_TOP_DIR)/env.mk -endif -include $(TENV) -ifeq ($(_TOP_DIR),) - _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) -endif - -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(TENV) $(METADATA) _env runtest.sh Makefile PURPOSE lib.sh - -.PHONY: all install download clean - -run: $(FILES) build - ( set +o posix; . /usr/bin/rhts_environment.sh; \ - . /usr/share/beakerlib/beakerlib.sh; \ - . runtest.sh ) - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -fr *~ $(BUILT_FILES) - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Chunyu Hu " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: kmod kernel module check from kernel modules tools">> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 1h" >> $(METADATA) - @echo "RunFor: kernel" >> $(METADATA) - @echo "Requires: kernel" >> $(METADATA) - @echo "Requires: sysstat perf trace-cmd" >> $(METADATA) - @echo "Requires: $(PACKAGE_NAME) python rpm wget" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - rhts-lint $(METADATA) diff --git a/tests/sanity/metadata b/tests/sanity/metadata new file mode 100644 index 0000000..6c68b4b --- /dev/null +++ b/tests/sanity/metadata @@ -0,0 +1,12 @@ +[General] +name=kmod gating test +owner=Ziqian SUN +description=kmod gating test +license=GPLv2 +confidential=no +destructive=no + +[restraint] +entry_point=./runtest.sh +max_time=15m +use_pty=false diff --git a/tests/sanity/sanity.fmf b/tests/sanity/sanity.fmf new file mode 100644 index 0000000..e9c6959 --- /dev/null +++ b/tests/sanity/sanity.fmf @@ -0,0 +1 @@ +test: bash ./runtest.sh diff --git a/tests/tests.yml b/tests/tests.yml index 828a27a..c8bd0fd 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -2,7 +2,7 @@ tags: - classic roles: - - role: standard-test-beakerlib + - role: standard-test-basic tests: - sanity - libkmod From b4bcf63353f3da600ec5a48b0cf60873f9d313ea Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Wed, 13 Aug 2025 15:11:26 +0800 Subject: [PATCH 16/18] Tests: Fix fmf files for gating Signed-off-by: Zamir SUN --- tests/libkmod/libkmod.fmf | 7 ++----- tests/plan.fmf | 6 ++++++ tests/sanity/sanity.fmf | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/libkmod/libkmod.fmf b/tests/libkmod/libkmod.fmf index d796b57..8733518 100644 --- a/tests/libkmod/libkmod.fmf +++ b/tests/libkmod/libkmod.fmf @@ -1,6 +1,3 @@ test: bash ./runtest.sh -require: - - libcmocka-devel - - kmod-devel - - make - - gcc +framework: beakerlib +duration: 15m diff --git a/tests/plan.fmf b/tests/plan.fmf index e6427de..160239c 100644 --- a/tests/plan.fmf +++ b/tests/plan.fmf @@ -1,3 +1,9 @@ +prepare: + how: install + package: + - libcmocka-devel + - make + - gcc discover: how: fmf execute: diff --git a/tests/sanity/sanity.fmf b/tests/sanity/sanity.fmf index e9c6959..8733518 100644 --- a/tests/sanity/sanity.fmf +++ b/tests/sanity/sanity.fmf @@ -1 +1,3 @@ test: bash ./runtest.sh +framework: beakerlib +duration: 15m From 91014e42d6e32377371d118a529f2295357f552c Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Wed, 13 Aug 2025 15:11:51 +0800 Subject: [PATCH 17/18] Tests: Remove tests.yml STI entrypoint to make tmt work Signed-off-by: Zamir SUN --- tests/tests.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 tests/tests.yml diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index c8bd0fd..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,18 +0,0 @@ -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-basic - tests: - - sanity - - libkmod - required_packages: - - kernel - - perf - - sysstat - - trace-cmd - - kmod - - kmod-devel - - gcc - - libcmocka - - libcmocka-devel From 2ce6b84eca9864e2d1286ffa184c728bd2ecc75f Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: Wed, 13 Aug 2025 15:14:36 +0800 Subject: [PATCH 18/18] Bump to 34.2-3 to build and run new gating Signed-off-by: Zamir SUN --- kmod.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kmod.spec b/kmod.spec index ce3b8be..8d0b67b 100644 --- a/kmod.spec +++ b/kmod.spec @@ -16,7 +16,7 @@ Name: kmod Version: 34.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Linux kernel module management utilities # https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_license_analysis @@ -199,6 +199,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Wed Aug 13 2025 Zamir SUN - 34.2-3 +- Rebuild to switch gating to TMT. +- Resolves: rhbz#2382934 + * Thu Jul 24 2025 Fedora Release Engineering - 34.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild