2023-12-07 08:44:14 +01:00
|
|
|
From ecef7c131618bbd9c559924ecae55764089db0dd Mon Sep 17 00:00:00 2001
|
2023-07-24 12:29:19 +02:00
|
|
|
From: Michal Suchanek <msuchanek@suse.de>
|
2023-12-07 08:44:14 +01:00
|
|
|
Date: Tue, 18 Jul 2023 14:01:55 +0200
|
|
|
|
Subject: [PATCH 4/9] kmod: Add pkgconfig file with kmod compile time
|
2023-07-24 12:29:19 +02:00
|
|
|
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>
|
2023-12-07 08:44:14 +01:00
|
|
|
Link: https://lore.kernel.org/r/468b3f572d3b84f25bb53ec8fcb15ed4871914d4.1689681454.git.msuchanek@suse.de
|
|
|
|
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
|
2023-07-24 12:29:19 +02:00
|
|
|
---
|
2023-10-18 03:25:56 +02:00
|
|
|
Makefile.am | 2 +-
|
|
|
|
configure.ac | 11 +++++++++++
|
|
|
|
tools/kmod.pc.in | 9 +++++++++
|
|
|
|
3 files changed, 21 insertions(+), 1 deletion(-)
|
2023-07-24 12:29:19 +02:00
|
|
|
create mode 100644 tools/kmod.pc.in
|
|
|
|
|
2023-10-18 03:25:56 +02:00
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
|
|
index e6630a36e18c..2a54c25bd631 100644
|
|
|
|
--- a/Makefile.am
|
|
|
|
+++ b/Makefile.am
|
|
|
|
@@ -96,7 +96,7 @@ libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES)
|
2023-07-24 12:29:19 +02:00
|
|
|
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 = \
|
2023-10-18 03:25:56 +02:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index fd88d1fbdbf7..7bf8d78ca747 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2023-07-24 12:29:19 +02:00
|
|
|
@@ -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
|
|
|
|
#####################################################################
|
2023-09-30 02:22:25 +02:00
|
|
|
@@ -94,6 +97,7 @@ AC_ARG_WITH([zstd],
|
2023-07-24 12:29:19 +02:00
|
|
|
AS_IF([test "x$with_zstd" != "xno"], [
|
2023-09-30 02:22:25 +02:00
|
|
|
PKG_CHECK_MODULES([libzstd], [libzstd >= 1.4.4], [LIBS="$LIBS $libzstd_LIBS"])
|
2023-07-24 12:29:19 +02:00
|
|
|
AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard for modules.])
|
|
|
|
+ module_compressions="zstd $module_compressions"
|
|
|
|
], [
|
|
|
|
AC_MSG_NOTICE([Zstandard support not requested])
|
|
|
|
])
|
2023-09-30 02:22:25 +02:00
|
|
|
@@ -105,6 +109,7 @@ AC_ARG_WITH([xz],
|
2023-07-24 12:29:19 +02:00
|
|
|
AS_IF([test "x$with_xz" != "xno"], [
|
2023-09-30 02:22:25 +02:00
|
|
|
PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99], [LIBS="$LIBS $liblzma_LIBS"])
|
2023-07-24 12:29:19 +02:00
|
|
|
AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.])
|
|
|
|
+ module_compressions="xz $module_compressions"
|
|
|
|
], [
|
|
|
|
AC_MSG_NOTICE([Xz support not requested])
|
|
|
|
])
|
2023-09-30 02:22:25 +02:00
|
|
|
@@ -116,6 +121,7 @@ AC_ARG_WITH([zlib],
|
2023-07-24 12:29:19 +02:00
|
|
|
AS_IF([test "x$with_zlib" != "xno"], [
|
2023-09-30 02:22:25 +02:00
|
|
|
PKG_CHECK_MODULES([zlib], [zlib], [LIBS="$LIBS $zlib_LIBS"])
|
2023-07-24 12:29:19 +02:00
|
|
|
AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.])
|
|
|
|
+ module_compressions="gzip $module_compressions"
|
|
|
|
], [
|
|
|
|
AC_MSG_NOTICE([zlib support not requested])
|
|
|
|
])
|
2023-10-18 03:25:56 +02:00
|
|
|
@@ -134,6 +140,7 @@ AS_IF([test "x$with_openssl" != "xno"], [
|
|
|
|
AC_MSG_NOTICE([openssl sm3 support not detected])
|
|
|
|
CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3"
|
|
|
|
])
|
2023-07-24 12:29:19 +02:00
|
|
|
+ module_signatures="PKCS7 $module_signatures"
|
|
|
|
], [
|
|
|
|
AC_MSG_NOTICE([openssl support not requested])
|
|
|
|
])
|
2023-10-18 03:25:56 +02:00
|
|
|
@@ -298,6 +305,9 @@ AC_DEFINE_UNQUOTED(KMOD_FEATURES, ["$with_features"], [Features in this build])
|
2023-07-24 12:29:19 +02:00
|
|
|
# Generate files from *.in
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
+AC_SUBST([module_compressions], $module_compressions)
|
|
|
|
+AC_SUBST([module_signatures], $module_signatures)
|
|
|
|
+
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
man/Makefile
|
2023-10-18 03:25:56 +02:00
|
|
|
@@ -305,6 +315,7 @@ AC_CONFIG_FILES([
|
2023-07-24 12:29:19 +02:00
|
|
|
libkmod/docs/version.xml
|
2023-09-30 02:22:25 +02:00
|
|
|
libkmod/libkmod.pc
|
|
|
|
libkmod/python/kmod/version.py
|
2023-07-24 12:29:19 +02:00
|
|
|
+ tools/kmod.pc
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2023-10-18 03:25:56 +02:00
|
|
|
diff --git a/tools/kmod.pc.in b/tools/kmod.pc.in
|
|
|
|
new file mode 100644
|
|
|
|
index 000000000000..2595980a6b35
|
2023-07-24 12:29:19 +02:00
|
|
|
--- /dev/null
|
2023-10-18 03:25:56 +02:00
|
|
|
+++ b/tools/kmod.pc.in
|
2023-07-24 12:29:19 +02:00
|
|
|
@@ -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@
|
2023-10-18 03:25:56 +02:00
|
|
|
--
|
|
|
|
2.42.0
|
|
|
|
|