Accepting request 1103710 from home:michals
- Remove compatibility patches, add README.usrmerge (boo#1212835). * Delete Provide-fallback-for-successfully-running-make-modules_install.patch * Delete compat-module_directory-module_prefix.patch OBS-URL: https://build.opensuse.org/request/show/1103710 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=229
This commit is contained in:
parent
5666eb5429
commit
2c6f4a5b52
@ -1,33 +0,0 @@
|
|||||||
From e15c268ba92d53dbb97fa0211696226656780713 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jan Engelhardt <jengelh@inai.de>
|
|
||||||
Date: Sun, 16 Jul 2023 15:55:38 +0000
|
|
||||||
Subject: [PATCH 6/7] Provide fallback for successfully running `make
|
|
||||||
modules_install` in pristine tarballs.
|
|
||||||
|
|
||||||
---
|
|
||||||
tools/depmod.c | 9 +++++++++
|
|
||||||
1 file changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tools/depmod.c b/tools/depmod.c
|
|
||||||
index 5ef490473186..70cfefb81005 100644
|
|
||||||
--- a/tools/depmod.c
|
|
||||||
+++ b/tools/depmod.c
|
|
||||||
@@ -3030,6 +3030,15 @@ static int do_depmod(int argc, char *argv[])
|
|
||||||
cfg.outdirnamelen = snprintf(cfg.outdirname, PATH_MAX,
|
|
||||||
"%s" MODULE_DIRECTORY "/%s",
|
|
||||||
out_root ?: (root ?: ""), cfg.kversion);
|
|
||||||
+ struct stat sb;
|
|
||||||
+ if (stat(cfg.dirname, &sb) != 0) {
|
|
||||||
+ cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX,
|
|
||||||
+ "%s/lib/modules/%s",
|
|
||||||
+ root ?: "", cfg.kversion);
|
|
||||||
+ cfg.outdirnamelen = snprintf(cfg.outdirname, PATH_MAX,
|
|
||||||
+ "%s/lib/modules/%s",
|
|
||||||
+ out_root ?: (root ?: ""), cfg.kversion);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (optind == argc)
|
|
||||||
all = 1;
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
9
README.usrmerge
Normal file
9
README.usrmerge
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
The Tumbleweed kmod and kernel are patched to install modules into
|
||||||
|
/usr/lib/modules (the --with-module-directory configure argument.)
|
||||||
|
|
||||||
|
This is not compatible with upstream kernel, and upstream rejected patch to
|
||||||
|
make the kernel build system detect this. Suggested solution is to use
|
||||||
|
|
||||||
|
make MODLIB='$(INSTALL_MOD_PATH)/usr/lib/modules/$(KERNELRELEASE)'
|
||||||
|
|
||||||
|
when building the upstream kernel.
|
@ -1,91 +0,0 @@
|
|||||||
From 004a365112b56402cca5d0097fccb74d38490aeb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Suchanek <msuchanek@suse.de>
|
|
||||||
Date: Mon, 17 Jul 2023 12:56:45 +0200
|
|
||||||
Subject: [PATCH 7/7] compat: module_directory -> module_prefix
|
|
||||||
|
|
||||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
|
||||||
---
|
|
||||||
Makefile.am | 1 +
|
|
||||||
configure.ac | 10 ++++++++++
|
|
||||||
tools/kmod.c | 15 +++++++++++++++
|
|
||||||
3 files changed, 26 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 1d51a43d68ba..e0df13c589bc 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -20,6 +20,7 @@ AM_CPPFLAGS = \
|
|
||||||
-I$(top_srcdir) \
|
|
||||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
|
||||||
-DDISTCONFDIR=\""$(distconfdir)"\" \
|
|
||||||
+ -DMODULE_PREFIX=\""$(module_prefix)"\" \
|
|
||||||
-DMODULE_DIRECTORY=\""$(module_directory)"\" \
|
|
||||||
${zlib_CFLAGS}
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 602d3d3dbdf1..a1e64e190d2f 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -96,6 +96,15 @@ AC_ARG_WITH([module_directory],
|
|
||||||
[], [with_module_directory=/lib/modules])
|
|
||||||
AC_SUBST([module_directory], [$with_module_directory])
|
|
||||||
|
|
||||||
+case $module_directory in
|
|
||||||
+ /lib/modules)
|
|
||||||
+ with_module_prefix=""
|
|
||||||
+ AC_SUBST([module_prefix], [$with_module_prefix]);;
|
|
||||||
+ */lib/modules) with_module_prefix=$(dirname $with_module_directory)
|
|
||||||
+ with_module_prefix=$(dirname $with_module_prefix)
|
|
||||||
+ AC_SUBST([module_prefix], [$with_module_prefix]);;
|
|
||||||
+esac
|
|
||||||
+
|
|
||||||
AC_ARG_WITH([zstd],
|
|
||||||
AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]),
|
|
||||||
[], [with_zstd=no])
|
|
||||||
@@ -324,6 +333,7 @@ AC_MSG_RESULT([
|
|
||||||
|
|
||||||
module_directory: ${module_directory}
|
|
||||||
prefix: ${prefix}
|
|
||||||
+ module_prefix: ${module_prefix}
|
|
||||||
sysconfdir: ${sysconfdir}
|
|
||||||
distconfdir: ${distconfdir}
|
|
||||||
libdir: ${libdir}
|
|
||||||
diff --git a/tools/kmod.c b/tools/kmod.c
|
|
||||||
index 55689c075ab1..1ab62e86116e 100644
|
|
||||||
--- a/tools/kmod.c
|
|
||||||
+++ b/tools/kmod.c
|
|
||||||
@@ -37,9 +37,11 @@ static const struct option options[] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct kmod_cmd kmod_cmd_help;
|
|
||||||
+static const struct kmod_cmd kmod_cmd_config;
|
|
||||||
|
|
||||||
static const struct kmod_cmd *kmod_cmds[] = {
|
|
||||||
&kmod_cmd_help,
|
|
||||||
+ &kmod_cmd_config,
|
|
||||||
&kmod_cmd_list,
|
|
||||||
&kmod_cmd_static_nodes,
|
|
||||||
|
|
||||||
@@ -95,6 +97,19 @@ static const struct kmod_cmd kmod_cmd_help = {
|
|
||||||
.help = "Show help message",
|
|
||||||
};
|
|
||||||
|
|
||||||
+static int kmod_config(int argc, char *argv[])
|
|
||||||
+{
|
|
||||||
+ printf("{\"module_prefix\":\"" MODULE_PREFIX "\"}\n");
|
|
||||||
+
|
|
||||||
+ return EXIT_SUCCESS;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct kmod_cmd kmod_cmd_config = {
|
|
||||||
+ .name = "config",
|
|
||||||
+ .cmd = kmod_config,
|
|
||||||
+ .help = "Show compile time options in JSON",
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
static int handle_kmod_commands(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
const char *cmd;
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
@ -50,9 +50,7 @@ Patch13: testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch
|
|||||||
Patch14: kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch
|
Patch14: kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch
|
||||||
Patch15: usr-lib-modules.patch
|
Patch15: usr-lib-modules.patch
|
||||||
Patch16: no-stylesheet-download.patch
|
Patch16: no-stylesheet-download.patch
|
||||||
Patch17: Provide-fallback-for-successfully-running-make-modules_install.patch
|
Patch17: configure-Detect-openssl-sm3-support.patch
|
||||||
Patch18: compat-module_directory-module_prefix.patch
|
|
||||||
Patch19: configure-Detect-openssl-sm3-support.patch
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 24 12:50:23 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
||||||
|
|
||||||
|
- Remove compatibility patches, add README.usrmerge (boo#1212835).
|
||||||
|
* Delete Provide-fallback-for-successfully-running-make-modules_install.patch
|
||||||
|
* Delete compat-module_directory-module_prefix.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 17 17:54:54 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
Mon Jul 17 17:54:54 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ URL: https://www.kernel.org/pub/linux/utils/kernel/kmod/
|
|||||||
Source: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.xz
|
Source: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.xz
|
||||||
Source2: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.sign
|
Source2: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%version.tar.sign
|
||||||
Source3: %name.keyring
|
Source3: %name.keyring
|
||||||
|
Source4: README.usrmerge
|
||||||
Patch1: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
Patch1: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
||||||
Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
Patch2: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
||||||
Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
|
Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
|
||||||
@ -50,9 +51,7 @@ Patch13: testsuite-depmod-use-defines-for-the-rootfs-lib_modu.patch
|
|||||||
Patch14: kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch
|
Patch14: kmod-Add-pkgconfig-file-with-kmod-compile-time-confi.patch
|
||||||
Patch15: usr-lib-modules.patch
|
Patch15: usr-lib-modules.patch
|
||||||
Patch16: no-stylesheet-download.patch
|
Patch16: no-stylesheet-download.patch
|
||||||
Patch17: Provide-fallback-for-successfully-running-make-modules_install.patch
|
Patch17: configure-Detect-openssl-sm3-support.patch
|
||||||
Patch18: compat-module_directory-module_prefix.patch
|
|
||||||
Patch19: configure-Detect-openssl-sm3-support.patch
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
@ -124,6 +123,7 @@ in %lname.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
cp %{SOURCE4} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
GTKDOCIZE=/bin/true autoreconf -fi
|
GTKDOCIZE=/bin/true autoreconf -fi
|
||||||
@ -175,6 +175,9 @@ done
|
|||||||
%postun -n %lname -p /sbin/ldconfig
|
%postun -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%doc README.usrmerge
|
||||||
|
%endif
|
||||||
%_bindir/kmod
|
%_bindir/kmod
|
||||||
%_bindir/lsmod
|
%_bindir/lsmod
|
||||||
%_sbindir/depmod
|
%_sbindir/depmod
|
||||||
|
Loading…
Reference in New Issue
Block a user