Jan Engelhardt
58587a1382
OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=231
116 lines
4.1 KiB
Diff
116 lines
4.1 KiB
Diff
From 2e4eff4f252fe2a4c5bdb81e3ca2639b9b5f04c6 Mon Sep 17 00:00:00 2001
|
|
From: Michal Suchanek <msuchanek@suse.de>
|
|
Date: Fri, 30 Jun 2023 16:16:24 +0200
|
|
Subject: [PATCH 3/7] 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 <msuchanek@suse.de>
|
|
---
|
|
v2: mention module signature in commit message
|
|
v3: add sysconfdir
|
|
v5: add distconfdir, switch to pkgconfig
|
|
---
|
|
Makefile.am | 4 +++-
|
|
configure.ac | 11 +++++++++++
|
|
tools/kmod.pc.in | 9 +++++++++
|
|
3 files changed, 23 insertions(+), 1 deletion(-)
|
|
create mode 100644 tools/kmod.pc.in
|
|
|
|
Index: kmod-31/Makefile.am
|
|
===================================================================
|
|
--- kmod-31.orig/Makefile.am
|
|
+++ kmod-31/Makefile.am
|
|
@@ -98,7 +98,9 @@ libkmod_libkmod_internal_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
|
|
+EXTRA_DIST += libkmod/libkmod.pc.in tools/kmod.pc.in
|
|
+CLEANFILES += libkmod/libkmod.pc tools/kmod.pc
|
|
|
|
bashcompletiondir=@bashcompletiondir@
|
|
dist_bashcompletion_DATA = \
|
|
Index: kmod-31/configure.ac
|
|
===================================================================
|
|
--- kmod-31.orig/configure.ac
|
|
+++ kmod-31/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])
|
|
])
|
|
@@ -127,6 +133,7 @@ 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.])
|
|
+ module_signatures="PKCS7 $module_signatures"
|
|
], [
|
|
AC_MSG_NOTICE([openssl support not requested])
|
|
])
|
|
@@ -291,6 +298,9 @@ AC_DEFINE_UNQUOTED(KMOD_FEATURES, ["$wit
|
|
# Generate files from *.in
|
|
#####################################################################
|
|
|
|
+AC_SUBST([module_compressions], $module_compressions)
|
|
+AC_SUBST([module_signatures], $module_signatures)
|
|
+
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
man/Makefile
|
|
@@ -298,6 +308,7 @@ AC_CONFIG_FILES([
|
|
libkmod/docs/version.xml
|
|
libkmod/libkmod.pc
|
|
libkmod/python/kmod/version.py
|
|
+ tools/kmod.pc
|
|
])
|
|
|
|
|
|
Index: kmod-31/tools/kmod.pc.in
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ kmod-31/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@
|