* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kmod/files/, sys-apps/kmod/
@ 2021-01-08 14:15 Lars Wendler
0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2021-01-08 14:15 UTC (permalink / raw
To: gentoo-commits
commit: abe3c527bd51c009f61e85e2a86fca60ea3c4f20
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 8 14:12:00 2021 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Jan 8 14:15:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abe3c527
sys-apps/kmod: Removed old
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-apps/kmod/Manifest | 1 -
sys-apps/kmod/files/kmod-26-libressl.patch | 143 --------------------
sys-apps/kmod/kmod-26-r5.ebuild | 201 -----------------------------
3 files changed, 345 deletions(-)
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest
index 010ee9f2330..29b9d69a8f0 100644
--- a/sys-apps/kmod/Manifest
+++ b/sys-apps/kmod/Manifest
@@ -1,3 +1,2 @@
-DIST kmod-26.tar.xz 552032 BLAKE2B 3e596d06b48599bf4919346475a036b058fb18a7b19d39953e24fa943b95fdbe34a29a5062f6b4fe3510e667ae873d3b9ae03b72350fa85ddbb40ca6a7730b34 SHA512 3ca276c6fc13c2dd2220ec528b8dc4ab4edee5d2b22e16b6f945c552e51f74342c01c33a53740e6af8c893d42bd4d6f629cd8fa6e15ef8bd8da30cb003ef0865
DIST kmod-27.tar.xz 548924 BLAKE2B 9f12bf5792d4c867e28e0776c279369c063e84269212e3f699ae6e5e69b8b2b466b5033e43e17ac64d6101592edcf3c34881916afb6ae676b49dc8838dfe1396 SHA512 e0513094935333fca1fb4c3e3493b232507a579ab00a6457cc9ed3e928363d05aad80634fb65a8287a336bf9895194c7be8ddc41bb088a6c2cca44fc1bfbdb6c
DIST kmod-28.tar.xz 552448 BLAKE2B af41a0c5681fb94eb5264f46ed2ae666d171d4e2d0dc21419a3c2f4b12a783350a06b408fb02a7afb00fcea1cd994ee35864c1ec8b7a8cc58a8c9dcdeffaf1b3 SHA512 50646dc72675a5e17b01e327e3d41b972f18aaeac20c8b00983c4d099c6218f35c32c184a833a2d7f716755d6a86851c90913d2835874cef933bdc4a9722df9a
diff --git a/sys-apps/kmod/files/kmod-26-libressl.patch b/sys-apps/kmod/files/kmod-26-libressl.patch
deleted file mode 100644
index cb36ab401c2..00000000000
--- a/sys-apps/kmod/files/kmod-26-libressl.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 628677e066198d8658d7edd5511a5bb27cd229f5 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <steils@gentoo.org>
-Date: Sun, 19 May 2019 03:42:01 +0300
-Subject: [PATCH] libkmod-signature: use PKCS#7 instead of CMS
-
-Linux uses either PKCS #7 or CMS for signing modules (see
-scripts/sign-file.c). CMS is not supported by LibreSSL or older OpenSSL,
-so PKCS #7 is used on systems with these libcrypto providers.
-
-CMS and PKCS #7 formats are very similar. CMS is newer but is as much as
-possible backward compatible with PKCS #7 [1]. PKCS #7 is supported in
-the latest OpenSSL as well as CMS. The fields used for signing kernel
-modules are supported both in PKCS #7 and CMS.
-
-For now modinfo uses CMS with no alternative requiring OpenSSL 1.1.0 or
-newer.
-
-Use PKCS #7 for parsing module signature information, so that modinfo
-could be used both with OpenSSL and LibreSSL.
-
-[1] https://tools.ietf.org/html/rfc5652#section-1.1
-
-Changes v1->v2:
-- Don't use ifdefs for keeping redundant CMS code, just use PKCS #7 both
-with OpenSSL and LibreSSL.
-
-Upstream-Status: Accepted
-[https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=628677e066198d8658d7edd5511a5bb27cd229f5]
-Signed-off-by: Stefan Strogin <steils@gentoo.org>
----
- libkmod/libkmod-signature.c | 37 +++++++++++++++++++------------------
- 1 file changed, 19 insertions(+), 18 deletions(-)
-
-diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
-index 48d0145..4e8748c 100644
---- a/libkmod/libkmod-signature.c
-+++ b/libkmod/libkmod-signature.c
-@@ -20,7 +20,7 @@
- #include <endian.h>
- #include <inttypes.h>
- #ifdef ENABLE_OPENSSL
--#include <openssl/cms.h>
-+#include <openssl/pkcs7.h>
- #include <openssl/ssl.h>
- #endif
- #include <stdio.h>
-@@ -122,7 +122,7 @@ static bool fill_default(const char *mem, off_t size,
- #ifdef ENABLE_OPENSSL
-
- struct pkcs7_private {
-- CMS_ContentInfo *cms;
-+ PKCS7 *pkcs7;
- unsigned char *key_id;
- BIGNUM *sno;
- };
-@@ -132,7 +132,7 @@ static void pkcs7_free(void *s)
- struct kmod_signature_info *si = s;
- struct pkcs7_private *pvt = si->private;
-
-- CMS_ContentInfo_free(pvt->cms);
-+ PKCS7_free(pvt->pkcs7);
- BN_free(pvt->sno);
- free(pvt->key_id);
- free(pvt);
-@@ -197,11 +197,10 @@ static bool fill_pkcs7(const char *mem, off_t size,
- struct kmod_signature_info *sig_info)
- {
- const char *pkcs7_raw;
-- CMS_ContentInfo *cms;
-- STACK_OF(CMS_SignerInfo) *sis;
-- CMS_SignerInfo *si;
-- int rc;
-- ASN1_OCTET_STRING *key_id;
-+ PKCS7 *pkcs7;
-+ STACK_OF(PKCS7_SIGNER_INFO) *sis;
-+ PKCS7_SIGNER_INFO *si;
-+ PKCS7_ISSUER_AND_SERIAL *is;
- X509_NAME *issuer;
- ASN1_INTEGER *sno;
- ASN1_OCTET_STRING *sig;
-@@ -220,31 +219,33 @@ static bool fill_pkcs7(const char *mem, off_t size,
-
- in = BIO_new_mem_buf(pkcs7_raw, sig_len);
-
-- cms = d2i_CMS_bio(in, NULL);
-- if (cms == NULL) {
-+ pkcs7 = d2i_PKCS7_bio(in, NULL);
-+ if (pkcs7 == NULL) {
- BIO_free(in);
- return false;
- }
-
- BIO_free(in);
-
-- sis = CMS_get0_SignerInfos(cms);
-+ sis = PKCS7_get_signer_info(pkcs7);
- if (sis == NULL)
- goto err;
-
-- si = sk_CMS_SignerInfo_value(sis, 0);
-+ si = sk_PKCS7_SIGNER_INFO_value(sis, 0);
- if (si == NULL)
- goto err;
-
-- rc = CMS_SignerInfo_get0_signer_id(si, &key_id, &issuer, &sno);
-- if (rc == 0)
-+ is = si->issuer_and_serial;
-+ if (is == NULL)
- goto err;
-+ issuer = is->issuer;
-+ sno = is->serial;
-
-- sig = CMS_SignerInfo_get0_signature(si);
-+ sig = si->enc_digest;
- if (sig == NULL)
- goto err;
-
-- CMS_SignerInfo_get0_algs(si, NULL, NULL, &dig_alg, &sig_alg);
-+ PKCS7_SIGNER_INFO_get0_algs(si, NULL, &dig_alg, &sig_alg);
-
- sig_info->sig = (const char *)ASN1_STRING_get0_data(sig);
- sig_info->sig_len = ASN1_STRING_length(sig);
-@@ -277,7 +278,7 @@ static bool fill_pkcs7(const char *mem, off_t size,
- if (pvt == NULL)
- goto err3;
-
-- pvt->cms = cms;
-+ pvt->pkcs7 = pkcs7;
- pvt->key_id = key_id_str;
- pvt->sno = sno_bn;
- sig_info->private = pvt;
-@@ -290,7 +291,7 @@ err3:
- err2:
- BN_free(sno_bn);
- err:
-- CMS_ContentInfo_free(cms);
-+ PKCS7_free(pkcs7);
- return false;
- }
-
---
-2.21.0
-
diff --git a/sys-apps/kmod/kmod-26-r5.ebuild b/sys-apps/kmod/kmod-26-r5.ebuild
deleted file mode 100644
index 53000bb3deb..00000000000
--- a/sys-apps/kmod/kmod-26-r5.ebuild
+++ /dev/null
@@ -1,201 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit bash-completion-r1 multilib python-r1
-
-if [[ ${PV} == 9999* ]]; then
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
- inherit autotools git-r3
-else
- SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
- inherit libtool
-fi
-
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug doc libressl lzma pkcs7 python static-libs +tools zlib"
-
-# Upstream does not support running the test suite with custom configure flags.
-# I was also told that the test suite is intended for kmod developers.
-# So we have to restrict it.
-# See bug #408915.
-RESTRICT="test"
-
-# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
-RDEPEND="!sys-apps/module-init-tools
- !sys-apps/modutils
- !<sys-apps/openrc-0.13.8
- !<sys-apps/systemd-216-r3
- lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
- python? ( ${PYTHON_DEPS} )
- pkcs7? (
- !libressl? ( >=dev-libs/openssl-1.1.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
-DEPEND="${RDEPEND}
- doc? ( dev-util/gtk-doc )
- lzma? ( virtual/pkgconfig )
- python? (
- dev-python/cython[${PYTHON_USEDEP}]
- virtual/pkgconfig
- )
- zlib? ( virtual/pkgconfig )"
-if [[ ${PV} == 9999* ]]; then
- DEPEND="${DEPEND}
- dev-libs/libxslt"
-fi
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS="NEWS README TODO"
-
-PATCHES=(
- "${FILESDIR}/${P}-libressl.patch" # bug 677960
-)
-
-src_prepare() {
- default
-
- if [[ ! -e configure ]] ; then
- if use doc; then
- gtkdocize --copy --docdir libkmod/docs || die
- else
- touch libkmod/docs/gtk-doc.make
- fi
- eautoreconf
- else
- elibtoolize
- fi
-
- # Restore possibility of running --enable-static wrt #472608
- sed -i \
- -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
- configure || die
-}
-
-src_configure() {
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --enable-shared
- --with-bashcompletiondir="$(get_bashcompdir)"
- --with-rootlibdir="${EPREFIX}/$(get_libdir)"
- $(use_enable debug)
- $(use_enable doc gtk-doc)
- $(use_enable static-libs static)
- $(use_enable tools)
- $(use_with lzma xz)
- $(use_with pkcs7 openssl)
- $(use_with zlib)
- )
-
- local ECONF_SOURCE="${S}"
-
- kmod_configure() {
- mkdir -p "${BUILD_DIR}" || die
- run_in_build_dir econf "${myeconfargs[@]}" "$@"
- }
-
- BUILD_DIR="${WORKDIR}/build"
- kmod_configure --disable-python
-
- if use python; then
- python_foreach_impl kmod_configure --enable-python
- fi
-}
-
-src_compile() {
- emake -C "${BUILD_DIR}"
-
- if use python; then
- local native_builddir=${BUILD_DIR}
-
- python_compile() {
- emake -C "${BUILD_DIR}" -f Makefile -f - python \
- VPATH="${native_builddir}:${S}" \
- native_builddir="${native_builddir}" \
- libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
- <<< 'python: $(pkgpyexec_LTLIBRARIES)'
- }
-
- python_foreach_impl python_compile
- fi
-}
-
-src_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
- einstalldocs
-
- if use python; then
- local native_builddir=${BUILD_DIR}
-
- python_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
- python_optimize
- }
-
- python_foreach_impl python_install
- fi
-
- find "${ED}" -name "*.la" -delete || die
-
- if use tools; then
- local cmd
- for cmd in depmod insmod modprobe rmmod; do
- dosym ../bin/kmod /sbin/${cmd}
- done
-
- # These are also usable as normal user
- for cmd in lsmod modinfo; do
- dosym kmod /bin/${cmd}
- done
- fi
-
- cat <<-EOF > "${T}"/usb-load-ehci-first.conf
- softdep uhci_hcd pre: ehci_hcd
- softdep ohci_hcd pre: ehci_hcd
- EOF
-
- insinto /lib/modprobe.d
- doins "${T}"/usb-load-ehci-first.conf #260139
-
- newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
-}
-
-pkg_postinst() {
- if [[ -L ${EROOT%/}/etc/runlevels/boot/static-nodes ]]; then
- ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
- rm -f "${EROOT%/}"/etc/runlevels/boot/static-nodes
- fi
-
- # Add kmod to the runlevel automatically if this is the first install of this package.
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- if [[ ! -d ${EROOT%/}/etc/runlevels/sysinit ]]; then
- mkdir -p "${EROOT%/}"/etc/runlevels/sysinit
- fi
- if [[ -x ${EROOT%/}/etc/init.d/kmod-static-nodes ]]; then
- ln -s /etc/init.d/kmod-static-nodes "${EROOT%/}"/etc/runlevels/sysinit/kmod-static-nodes
- fi
- fi
-
- if [[ -e ${EROOT%/}/etc/runlevels/sysinit ]]; then
- if ! has_version sys-apps/systemd && [[ ! -e ${EROOT%/}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
- ewarn
- ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
- ewarn "kernel modules to have required static nodes!"
- ewarn "Run this command:"
- ewarn "\trc-update add kmod-static-nodes sysinit"
- fi
- fi
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kmod/files/, sys-apps/kmod/
@ 2021-05-21 7:06 Lars Wendler
0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2021-05-21 7:06 UTC (permalink / raw
To: gentoo-commits
commit: 874fc0b17dd30cf7c7221f74cf557c4c7e535585
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri May 21 06:49:28 2021 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri May 21 07:06:12 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=874fc0b1
sys-apps/kmod: Removed old
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-apps/kmod/Manifest | 1 -
...od-27-depmod-do-not-output-.bin-to-stdout.patch | 53 ------
sys-apps/kmod/kmod-27-r2.ebuild | 202 ---------------------
3 files changed, 256 deletions(-)
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest
index 43d7af8f39e..9ad5f1386be 100644
--- a/sys-apps/kmod/Manifest
+++ b/sys-apps/kmod/Manifest
@@ -1,3 +1,2 @@
-DIST kmod-27.tar.xz 548924 BLAKE2B 9f12bf5792d4c867e28e0776c279369c063e84269212e3f699ae6e5e69b8b2b466b5033e43e17ac64d6101592edcf3c34881916afb6ae676b49dc8838dfe1396 SHA512 e0513094935333fca1fb4c3e3493b232507a579ab00a6457cc9ed3e928363d05aad80634fb65a8287a336bf9895194c7be8ddc41bb088a6c2cca44fc1bfbdb6c
DIST kmod-28.tar.xz 552448 BLAKE2B af41a0c5681fb94eb5264f46ed2ae666d171d4e2d0dc21419a3c2f4b12a783350a06b408fb02a7afb00fcea1cd994ee35864c1ec8b7a8cc58a8c9dcdeffaf1b3 SHA512 50646dc72675a5e17b01e327e3d41b972f18aaeac20c8b00983c4d099c6218f35c32c184a833a2d7f716755d6a86851c90913d2835874cef933bdc4a9722df9a
DIST kmod-29.tar.xz 560160 BLAKE2B 1362b6e7c07f66594074f07239d0f7a64e6efeb928483ed027b22a4ac77b916c631d1c03780b0515714a87847a716c35341edb1ced04a1795b4c7f8942d3207a SHA512 557cdcaec75e5a1ceea2d10862c944e9a65ef54f6ee9da6dc98ce4582418fdc9958aab2e14a84807db61daf36ec4fcdc23a36376c39d5dc31d1823ca7cd47998
diff --git a/sys-apps/kmod/files/kmod-27-depmod-do-not-output-.bin-to-stdout.patch b/sys-apps/kmod/files/kmod-27-depmod-do-not-output-.bin-to-stdout.patch
deleted file mode 100644
index dc776b515bc..00000000000
--- a/sys-apps/kmod/files/kmod-27-depmod-do-not-output-.bin-to-stdout.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 53b30aeba2dedae9f5558f560231d9462e063dfc Mon Sep 17 00:00:00 2001
-From: Lucas De Marchi <lucas.demarchi@intel.com>
-Date: Thu, 5 Mar 2020 13:33:10 -0800
-Subject: depmod: do not output .bin to stdout
-
-index_write() relies on fseek/ftell to manage the position to which we
-are write and thus needs the file stream to support it.
-
-Right now when trying to write the index to stdout we fail with:
-
- depmod: tools/depmod.c:416: index_write: Assertion `initial_offset >= 0' failed.
- Aborted (core dumped)
-
-We have no interest in outputting our index to stdout, so just skip it
-like is done with other indexes.
-
-While at it, add/remove some newlines to improve readability.
-
-Reported-by: Yanko Kaneti <yaneti@declera.com>
-Fix: b866b2165ae6 ("Lookup aliases in the modules.builtin.modinfo")
----
- tools/depmod.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/tools/depmod.c b/tools/depmod.c
-index fbbce10..875e314 100644
---- a/tools/depmod.c
-+++ b/tools/depmod.c
-@@ -2408,8 +2408,10 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out)
- struct index_node *idx;
- struct kmod_list *l, *builtin = NULL;
-
-- idx = index_create();
-+ if (out == stdout)
-+ return 0;
-
-+ idx = index_create();
- if (idx == NULL) {
- ret = -ENOMEM;
- goto fail;
-@@ -2456,7 +2458,9 @@ static int output_builtin_alias_bin(struct depmod *depmod, FILE *out)
-
- if (count)
- index_write(idx, out);
-+
- index_destroy(idx);
-+
- fail:
- if (builtin)
- kmod_module_unref_list(builtin);
---
-cgit 1.2.3-1.el7
-
diff --git a/sys-apps/kmod/kmod-27-r2.ebuild b/sys-apps/kmod/kmod-27-r2.ebuild
deleted file mode 100644
index 1f01479f150..00000000000
--- a/sys-apps/kmod/kmod-27-r2.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-
-inherit autotools bash-completion-r1 multilib python-r1
-
-if [[ ${PV} == 9999* ]]; then
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
- #inherit libtool
-fi
-
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
-
-LICENSE="LGPL-2"
-SLOT="0"
-IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib"
-
-# Upstream does not support running the test suite with custom configure flags.
-# I was also told that the test suite is intended for kmod developers.
-# So we have to restrict it.
-# See bug #408915.
-RESTRICT="test"
-
-# Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
-RDEPEND="!sys-apps/module-init-tools
- !sys-apps/modutils
- !<sys-apps/openrc-0.13.8
- !<sys-apps/systemd-216-r3
- lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
- python? ( ${PYTHON_DEPS} )
- pkcs7? ( >=dev-libs/openssl-1.1.0:0= )
- zlib? ( >=sys-libs/zlib-1.2.6 )" #427130
-DEPEND="${RDEPEND}"
-BDEPEND="
- doc? (
- dev-util/gtk-doc
- dev-util/gtk-doc-am
- )
- lzma? ( virtual/pkgconfig )
- python? (
- dev-python/cython[${PYTHON_USEDEP}]
- virtual/pkgconfig
- )
- zlib? ( virtual/pkgconfig )
-"
-if [[ ${PV} == 9999* ]]; then
- DEPEND="${DEPEND}
- dev-libs/libxslt"
-fi
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS="NEWS README TODO"
-
-PATCHES=( "${FILESDIR}"/${P}-depmod-do-not-output-.bin-to-stdout.patch )
-
-src_prepare() {
- default
-
- if [[ ! -e configure ]] || use doc ; then
- if use doc; then
- cp "${BROOT}"/usr/share/aclocal/gtk-doc.m4 m4 || die
- gtkdocize --copy --docdir libkmod/docs || die
- else
- touch libkmod/docs/gtk-doc.make
- fi
- eautoreconf
- else
- elibtoolize
- fi
-
- # Restore possibility of running --enable-static wrt #472608
- sed -i \
- -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
- configure || die
-}
-
-src_configure() {
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --enable-shared
- --with-bashcompletiondir="$(get_bashcompdir)"
- --with-rootlibdir="${EPREFIX}/$(get_libdir)"
- $(use_enable debug)
- $(usex doc '--enable-gtk-doc' '')
- $(use_enable static-libs static)
- $(use_enable tools)
- $(use_with lzma xz)
- $(use_with pkcs7 openssl)
- $(use_with zlib)
- )
-
- local ECONF_SOURCE="${S}"
-
- kmod_configure() {
- mkdir -p "${BUILD_DIR}" || die
- run_in_build_dir econf "${myeconfargs[@]}" "$@"
- }
-
- BUILD_DIR="${WORKDIR}/build"
- kmod_configure --disable-python
-
- if use python; then
- python_foreach_impl kmod_configure --enable-python
- fi
-}
-
-src_compile() {
- emake -C "${BUILD_DIR}"
-
- if use python; then
- local native_builddir=${BUILD_DIR}
-
- python_compile() {
- emake -C "${BUILD_DIR}" -f Makefile -f - python \
- VPATH="${native_builddir}:${S}" \
- native_builddir="${native_builddir}" \
- libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
- <<< 'python: $(pkgpyexec_LTLIBRARIES)'
- }
-
- python_foreach_impl python_compile
- fi
-}
-
-src_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
- einstalldocs
-
- if use python; then
- local native_builddir=${BUILD_DIR}
-
- python_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
- python_optimize
- }
-
- python_foreach_impl python_install
- fi
-
- find "${ED}" -type f -name "*.la" -delete || die
-
- if use tools; then
- local cmd
- for cmd in depmod insmod modprobe rmmod; do
- dosym ../bin/kmod /sbin/${cmd}
- done
-
- # These are also usable as normal user
- for cmd in lsmod modinfo; do
- dosym kmod /bin/${cmd}
- done
- fi
-
- cat <<-EOF > "${T}"/usb-load-ehci-first.conf
- softdep uhci_hcd pre: ehci_hcd
- softdep ohci_hcd pre: ehci_hcd
- EOF
-
- insinto /lib/modprobe.d
- doins "${T}"/usb-load-ehci-first.conf #260139
-
- newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
-}
-
-pkg_postinst() {
- if [[ -L ${EROOT}/etc/runlevels/boot/static-nodes ]]; then
- ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
- rm -f "${EROOT}"/etc/runlevels/boot/static-nodes
- fi
-
- # Add kmod to the runlevel automatically if this is the first install of this package.
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- if [[ ! -d ${EROOT}/etc/runlevels/sysinit ]]; then
- mkdir -p "${EROOT}"/etc/runlevels/sysinit
- fi
- if [[ -x ${EROOT}/etc/init.d/kmod-static-nodes ]]; then
- ln -s /etc/init.d/kmod-static-nodes "${EROOT}"/etc/runlevels/sysinit/kmod-static-nodes
- fi
- fi
-
- if [[ -e ${EROOT}/etc/runlevels/sysinit ]]; then
- if ! has_version sys-apps/systemd && [[ ! -e ${EROOT}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
- ewarn
- ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
- ewarn "kernel modules to have required static nodes!"
- ewarn "Run this command:"
- ewarn "\trc-update add kmod-static-nodes sysinit"
- fi
- fi
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kmod/files/, sys-apps/kmod/
@ 2023-01-04 4:32 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-01-04 4:32 UTC (permalink / raw
To: gentoo-commits
commit: 930f5a77702f60fa65b27e71f6ddd214eb2ed1a4
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 4 03:46:22 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 4 04:31:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=930f5a77
sys-apps/kmod: fix configure w/ clang 16
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../kmod/files/kmod-30-configure-clang16.patch | 26 +++
sys-apps/kmod/kmod-30-r1.ebuild | 212 +++++++++++++++++++++
2 files changed, 238 insertions(+)
diff --git a/sys-apps/kmod/files/kmod-30-configure-clang16.patch b/sys-apps/kmod/files/kmod-30-configure-clang16.patch
new file mode 100644
index 000000000000..a9e1093aecff
--- /dev/null
+++ b/sys-apps/kmod/files/kmod-30-configure-clang16.patch
@@ -0,0 +1,26 @@
+https://github.com/kmod-project/kmod/commit/035e6667d1ace2fd77ef36f5e5d93cd4b1e128a2
+
+From 035e6667d1ace2fd77ef36f5e5d93cd4b1e128a2 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Sat, 17 Dec 2022 17:52:34 +0100
+Subject: [PATCH] kmod: configure.ac: In _Noreturn check, include <stdlib.h>
+ for exit
+
+Otherwise, an implicit functiona declaration is used, causing
+a C99 compatibility issue.
+
+Signed-off-by: Florian Weimer <fweimer@redhat.com>
+Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,7 +68,8 @@ AC_COMPILE_IFELSE(
+
+ AC_MSG_CHECKING([whether _Noreturn is supported])
+ AC_COMPILE_IFELSE(
+- [AC_LANG_SOURCE([[_Noreturn int foo(void) { exit(0); }]])],
++ [AC_LANG_SOURCE([[#include <stdlib.h>
++ _Noreturn int foo(void) { exit(0); }]])],
+ [AC_DEFINE([HAVE_NORETURN], [1], [Define if _Noreturn is available])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+
diff --git a/sys-apps/kmod/kmod-30-r1.ebuild b/sys-apps/kmod/kmod-30-r1.ebuild
new file mode 100644
index 000000000000..745848fed41f
--- /dev/null
+++ b/sys-apps/kmod/kmod-30-r1.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit autotools libtool bash-completion-r1 python-r1
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
+
+# Upstream does not support running the test suite with custom configure flags.
+# I was also told that the test suite is intended for kmod developers.
+# So we have to restrict it.
+# See bug #408915.
+RESTRICT="test"
+
+# - >=zlib-1.2.6 required because of bug #427130
+# - Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
+# - >=zstd-1.5.2-r1 required for bug #771078
+RDEPEND="!sys-apps/module-init-tools
+ !sys-apps/modutils
+ !<sys-apps/openrc-0.13.8
+ !<sys-apps/systemd-216-r3
+ lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
+ python? ( ${PYTHON_DEPS} )
+ pkcs7? ( >=dev-libs/openssl-1.1.0:= )
+ zlib? ( >=sys-libs/zlib-1.2.6 )
+ zstd? ( >=app-arch/zstd-1.5.2-r1:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? (
+ dev-util/gtk-doc
+ dev-util/gtk-doc-am
+ )
+ lzma? ( virtual/pkgconfig )
+ python? (
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ )
+ zlib? ( virtual/pkgconfig )
+"
+if [[ ${PV} == 9999* ]]; then
+ BDEPEND="${BDEPEND}
+ dev-libs/libxslt"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DOCS=( NEWS README.md TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-configure-clang16.patch
+)
+
+src_prepare() {
+ default
+
+ if [[ ! -e configure ]] || use doc ; then
+ if use doc; then
+ cp "${BROOT}"/usr/share/aclocal/gtk-doc.m4 m4 || die
+ gtkdocize --copy --docdir libkmod/docs || die
+ else
+ touch libkmod/docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ #elibtoolize
+ # TODO: restore to elibtoolize in next release after 30
+ # autoreconf only here for clang patch.
+ eautoreconf
+ fi
+
+ # Restore possibility of running --enable-static, bug #472608
+ sed -i \
+ -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
+ configure || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --enable-shared
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ $(use_enable debug)
+ $(usex doc '--enable-gtk-doc' '')
+ $(use_enable static-libs static)
+ $(use_enable tools)
+ $(use_with lzma xz)
+ $(use_with pkcs7 openssl)
+ $(use_with zlib)
+ $(use_with zstd)
+ )
+
+ local ECONF_SOURCE="${S}"
+
+ kmod_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+ run_in_build_dir econf "${myeconfargs[@]}" "$@"
+ }
+
+ BUILD_DIR="${WORKDIR}/build"
+ kmod_configure --disable-python
+
+ if use python; then
+ python_foreach_impl kmod_configure --enable-python
+ fi
+}
+
+src_compile() {
+ emake -C "${BUILD_DIR}"
+
+ if use python; then
+ local native_builddir="${BUILD_DIR}"
+
+ python_compile() {
+ emake -C "${BUILD_DIR}" -f Makefile -f - python \
+ VPATH="${native_builddir}:${S}" \
+ native_builddir="${native_builddir}" \
+ libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
+ <<< 'python: $(pkgpyexec_LTLIBRARIES)'
+ }
+
+ python_foreach_impl python_compile
+ fi
+}
+
+src_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" install
+
+ einstalldocs
+
+ if use python; then
+ local native_builddir="${BUILD_DIR}"
+
+ python_install() {
+ emake -C "${BUILD_DIR}" DESTDIR="${D}" \
+ VPATH="${native_builddir}:${S}" \
+ install-pkgpyexecLTLIBRARIES \
+ install-dist_pkgpyexecPYTHON
+ python_optimize
+ }
+
+ python_foreach_impl python_install
+ fi
+
+ find "${ED}" -type f -name "*.la" -delete || die
+
+ if use tools; then
+ local cmd
+ for cmd in depmod insmod modprobe rmmod; do
+ dosym ../bin/kmod /sbin/${cmd}
+ done
+
+ # These are also usable as normal user
+ for cmd in lsmod modinfo; do
+ dosym kmod /bin/${cmd}
+ done
+ fi
+
+ cat <<-EOF > "${T}"/usb-load-ehci-first.conf
+ softdep uhci_hcd pre: ehci_hcd
+ softdep ohci_hcd pre: ehci_hcd
+ EOF
+
+ insinto /lib/modprobe.d
+ # bug #260139
+ doins "${T}"/usb-load-ehci-first.conf
+
+ newinitd "${FILESDIR}"/kmod-static-nodes-r1 kmod-static-nodes
+}
+
+pkg_postinst() {
+ if [[ -L ${EROOT}/etc/runlevels/boot/static-nodes ]]; then
+ ewarn "Removing old conflicting static-nodes init script from the boot runlevel"
+ rm -f "${EROOT}"/etc/runlevels/boot/static-nodes
+ fi
+
+ # Add kmod to the runlevel automatically if this is the first install of this package.
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ ! -d ${EROOT}/etc/runlevels/sysinit ]]; then
+ mkdir -p "${EROOT}"/etc/runlevels/sysinit
+ fi
+ if [[ -x ${EROOT}/etc/init.d/kmod-static-nodes ]]; then
+ ln -s /etc/init.d/kmod-static-nodes "${EROOT}"/etc/runlevels/sysinit/kmod-static-nodes
+ fi
+ fi
+
+ if [[ -e ${EROOT}/etc/runlevels/sysinit ]]; then
+ if ! has_version sys-apps/systemd && [[ ! -e ${EROOT}/etc/runlevels/sysinit/kmod-static-nodes ]]; then
+ ewarn
+ ewarn "You need to add kmod-static-nodes to the sysinit runlevel for"
+ ewarn "kernel modules to have required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add kmod-static-nodes sysinit"
+ fi
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kmod/files/, sys-apps/kmod/
@ 2024-03-02 0:15 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-03-02 0:15 UTC (permalink / raw
To: gentoo-commits
commit: 7e18d8b8c3d468754790010cc157cc8eaff3d5b5
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 2 00:13:33 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 2 00:14:43 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e18d8b8
sys-apps/kmod: drop Python bindings, fix musl-1.2.5 compat (modern C porting)
* Drop Python bindings for weird double install issue (bug #925568).
This is a somewhat extreme response, but it turns out upstream have dropped
the bindings upstream anyway in https://github.com/kmod-project/kmod/commit/594f102cf575b0d5c01ebff22aae450c8a204d45
for the next release.
* Fix musl-1.2.5 compat wrt POSIX vs GNU basename.
Would segfault at runtime otherwise on a non-strict C compiler.
Closes: https://bugs.gentoo.org/925568
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/kmod/files/kmod-31-musl-basename.patch | 113 +++++++++++++++++++++
.../kmod/{kmod-9999.ebuild => kmod-31-r1.ebuild} | 102 +++----------------
sys-apps/kmod/kmod-9999.ebuild | 102 +++----------------
3 files changed, 145 insertions(+), 172 deletions(-)
diff --git a/sys-apps/kmod/files/kmod-31-musl-basename.patch b/sys-apps/kmod/files/kmod-31-musl-basename.patch
new file mode 100644
index 000000000000..f4839dad2474
--- /dev/null
+++ b/sys-apps/kmod/files/kmod-31-musl-basename.patch
@@ -0,0 +1,113 @@
+https://github.com/kmod-project/kmod/pull/32
+
+From 721ed6040c7aa47070faf6378c433089e178bd43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Dec 2023 17:35:59 -0800
+Subject: [PATCH] Use portable implementation for basename API
+
+musl has removed the non-prototype declaration of basename from
+string.h [1] which now results in build errors with clang-17+ compiler
+
+Implement GNU basename behavior using strchr which is portable across libcs
+
+Fixes
+../git/tools/kmod.c:71:19: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+71 | "Commands:\n", basename(argv[0]));
+| ^
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Suggested-by: Rich Felker
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/libkmod/libkmod-config.c
++++ b/libkmod/libkmod-config.c
+@@ -794,7 +794,7 @@ static int conf_files_insert_sorted(struct kmod_ctx *ctx,
+ bool is_single = false;
+
+ if (name == NULL) {
+- name = basename(path);
++ name = gnu_basename(path);
+ is_single = true;
+ }
+
+--- a/shared/util.c
++++ b/shared/util.c
+@@ -172,9 +172,9 @@ char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *
+
+ char *path_to_modname(const char *path, char buf[static PATH_MAX], size_t *len)
+ {
+- char *modname;
++ const char *modname;
+
+- modname = basename(path);
++ modname = gnu_basename(path);
+ if (modname == NULL || modname[0] == '\0')
+ return NULL;
+
+--- a/shared/util.h
++++ b/shared/util.h
+@@ -5,6 +5,7 @@
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <time.h>
+@@ -76,6 +77,12 @@ do { \
+ __p->__v = (val); \
+ } while(0)
+
++static _always_inline_ const char *gnu_basename(const char *s)
++{
++ const char *p = strrchr(s, '/');
++ return p ? p+1 : s;
++}
++
+ static _always_inline_ unsigned int ALIGN_POWER2(unsigned int u)
+ {
+ return 1 << ((sizeof(u) * 8) - __builtin_clz(u - 1));
+--- a/testsuite/testsuite.c
++++ b/testsuite/testsuite.c
+@@ -70,7 +70,7 @@ static void help(void)
+
+ printf("Usage:\n"
+ "\t%s [options] <test>\n"
+- "Options:\n", basename(progname));
++ "Options:\n", gnu_basename(progname));
+
+ for (itr = options, itr_short = options_short;
+ itr->name != NULL; itr++, itr_short++)
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -762,7 +762,7 @@ static int cfg_files_insert_sorted(struct cfg_file ***p_files, size_t *p_n_files
+ if (name != NULL)
+ namelen = strlen(name);
+ else {
+- name = basename(dir);
++ name = gnu_basename(dir);
+ namelen = strlen(name);
+ dirlen -= namelen + 1;
+ }
+--- a/tools/kmod.c
++++ b/tools/kmod.c
+@@ -68,7 +68,7 @@ static int kmod_help(int argc, char *argv[])
+ "Options:\n"
+ "\t-V, --version show version\n"
+ "\t-h, --help show this help\n\n"
+- "Commands:\n", basename(argv[0]));
++ "Commands:\n", gnu_basename(argv[0]));
+
+ for (i = 0; i < ARRAY_SIZE(kmod_cmds); i++) {
+ if (kmod_cmds[i]->help != NULL) {
+@@ -156,7 +156,7 @@ static int handle_kmod_compat_commands(int argc, char *argv[])
+ const char *cmd;
+ size_t i;
+
+- cmd = basename(argv[0]);
++ cmd = gnu_basename(argv[0]);
+
+ for (i = 0; i < ARRAY_SIZE(kmod_compat_cmds); i++) {
+ if (streq(kmod_compat_cmds[i]->name, cmd))
+
diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-31-r1.ebuild
similarity index 61%
copy from sys-apps/kmod/kmod-9999.ebuild
copy to sys-apps/kmod/kmod-31-r1.ebuild
index a67cecf3e9af..d0de1d663e3e 100644
--- a/sys-apps/kmod/kmod-9999.ebuild
+++ b/sys-apps/kmod/kmod-31-r1.ebuild
@@ -3,9 +3,10 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+inherit autotools libtool bash-completion-r1
-inherit autotools libtool bash-completion-r1 python-r1
+DESCRIPTION="Library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
@@ -15,12 +16,9 @@ else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
-
LICENSE="LGPL-2"
SLOT="0"
-IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
+IUSE="debug doc +lzma pkcs7 static-libs +tools +zlib +zstd"
# Upstream does not support running the test suite with custom configure flags.
# I was also told that the test suite is intended for kmod developers.
@@ -31,15 +29,16 @@ IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
# - >=zlib-1.2.6 required because of bug #427130
# - Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
# - >=zstd-1.5.2-r1 required for bug #771078
-RDEPEND="!sys-apps/module-init-tools
+RDEPEND="
+ !sys-apps/module-init-tools
!sys-apps/modutils
!<sys-apps/openrc-0.13.8
!<sys-apps/systemd-216-r3
lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
- python? ( ${PYTHON_DEPS} )
pkcs7? ( >=dev-libs/openssl-1.1.0:= )
zlib? ( >=sys-libs/zlib-1.2.6 )
- zstd? ( >=app-arch/zstd-1.5.2-r1:= )"
+ zstd? ( >=app-arch/zstd-1.5.2-r1:= )
+"
DEPEND="${RDEPEND}"
BDEPEND="
doc? (
@@ -47,20 +46,15 @@ BDEPEND="
dev-build/gtk-doc-am
)
lzma? ( virtual/pkgconfig )
- python? (
- dev-python/cython[${PYTHON_USEDEP}]
- virtual/pkgconfig
- )
zlib? ( virtual/pkgconfig )
"
if [[ ${PV} == 9999* ]]; then
- BDEPEND="${BDEPEND}
- dev-libs/libxslt"
+ BDEPEND+=" dev-libs/libxslt"
fi
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( NEWS README.md TODO )
+PATCHES=(
+ "${FILESDIR}"/${PN}-31-musl-basename.patch
+)
src_prepare() {
default
@@ -89,8 +83,9 @@ src_configure() {
--enable-shared
--with-bashcompletiondir="$(get_bashcompdir)"
--with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ --disable-python
$(use_enable debug)
- $(usex doc '--enable-gtk-doc' '')
+ $(usev doc '--enable-gtk-doc')
$(use_enable static-libs static)
$(use_enable tools)
$(use_with lzma xz)
@@ -99,76 +94,11 @@ src_configure() {
$(use_with zstd)
)
- local ECONF_SOURCE="${S}"
-
- kmod_configure() {
- mkdir -p "${BUILD_DIR}" || die
- run_in_build_dir econf "${myeconfargs[@]}" "$@"
- }
-
- BUILD_DIR="${WORKDIR}/build"
- kmod_configure --disable-python
-
- if use python; then
- python_foreach_impl kmod_configure --enable-python
- fi
-}
-
-src_compile() {
- emake -C "${BUILD_DIR}"
-
- if use python; then
- local native_builddir="${BUILD_DIR}"
-
- python_compile() {
- emake -C "${BUILD_DIR}" -f Makefile -f - python \
- VPATH="${native_builddir}:${S}" \
- native_builddir="${native_builddir}" \
- libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
- <<< 'python: $(pkgpyexec_LTLIBRARIES)'
- }
-
- python_foreach_impl python_compile
- fi
-}
-
-src_test() {
- python_test() {
- mkdir "${T}/test-${EPYTHON}" || die
- emake -C "${BUILD_DIR}" DESTDIR="${T}/test-${EPYTHON}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
-
- # Smoke test based on https://bugs.gentoo.org/891975#c5
- local -x PYTHONPATH="${T}/test-${EPYTHON}/usr/lib/${EPYTHON}/site-packages:${PYTHONPATH}"
- ${EPYTHON} -c 'import kmod; km = kmod.Kmod(); print([(m.name, m.size) for m in km.loaded()])' || die
- rm -r "${T}/test-${EPYTHON}" || die
- }
-
- if use python; then
- python_foreach_impl python_test
- fi
+ econf "${myeconfargs[@]}"
}
src_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
-
- einstalldocs
-
- if use python; then
- local native_builddir="${BUILD_DIR}"
-
- python_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
- python_optimize
- }
-
- python_foreach_impl python_install
- fi
+ default
find "${ED}" -type f -name "*.la" -delete || die
diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild
index a67cecf3e9af..d0de1d663e3e 100644
--- a/sys-apps/kmod/kmod-9999.ebuild
+++ b/sys-apps/kmod/kmod-9999.ebuild
@@ -3,9 +3,10 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+inherit autotools libtool bash-completion-r1
-inherit autotools libtool bash-completion-r1 python-r1
+DESCRIPTION="Library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
@@ -15,12 +16,9 @@ else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
-
LICENSE="LGPL-2"
SLOT="0"
-IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
+IUSE="debug doc +lzma pkcs7 static-libs +tools +zlib +zstd"
# Upstream does not support running the test suite with custom configure flags.
# I was also told that the test suite is intended for kmod developers.
@@ -31,15 +29,16 @@ IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
# - >=zlib-1.2.6 required because of bug #427130
# - Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
# - >=zstd-1.5.2-r1 required for bug #771078
-RDEPEND="!sys-apps/module-init-tools
+RDEPEND="
+ !sys-apps/module-init-tools
!sys-apps/modutils
!<sys-apps/openrc-0.13.8
!<sys-apps/systemd-216-r3
lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
- python? ( ${PYTHON_DEPS} )
pkcs7? ( >=dev-libs/openssl-1.1.0:= )
zlib? ( >=sys-libs/zlib-1.2.6 )
- zstd? ( >=app-arch/zstd-1.5.2-r1:= )"
+ zstd? ( >=app-arch/zstd-1.5.2-r1:= )
+"
DEPEND="${RDEPEND}"
BDEPEND="
doc? (
@@ -47,20 +46,15 @@ BDEPEND="
dev-build/gtk-doc-am
)
lzma? ( virtual/pkgconfig )
- python? (
- dev-python/cython[${PYTHON_USEDEP}]
- virtual/pkgconfig
- )
zlib? ( virtual/pkgconfig )
"
if [[ ${PV} == 9999* ]]; then
- BDEPEND="${BDEPEND}
- dev-libs/libxslt"
+ BDEPEND+=" dev-libs/libxslt"
fi
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( NEWS README.md TODO )
+PATCHES=(
+ "${FILESDIR}"/${PN}-31-musl-basename.patch
+)
src_prepare() {
default
@@ -89,8 +83,9 @@ src_configure() {
--enable-shared
--with-bashcompletiondir="$(get_bashcompdir)"
--with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ --disable-python
$(use_enable debug)
- $(usex doc '--enable-gtk-doc' '')
+ $(usev doc '--enable-gtk-doc')
$(use_enable static-libs static)
$(use_enable tools)
$(use_with lzma xz)
@@ -99,76 +94,11 @@ src_configure() {
$(use_with zstd)
)
- local ECONF_SOURCE="${S}"
-
- kmod_configure() {
- mkdir -p "${BUILD_DIR}" || die
- run_in_build_dir econf "${myeconfargs[@]}" "$@"
- }
-
- BUILD_DIR="${WORKDIR}/build"
- kmod_configure --disable-python
-
- if use python; then
- python_foreach_impl kmod_configure --enable-python
- fi
-}
-
-src_compile() {
- emake -C "${BUILD_DIR}"
-
- if use python; then
- local native_builddir="${BUILD_DIR}"
-
- python_compile() {
- emake -C "${BUILD_DIR}" -f Makefile -f - python \
- VPATH="${native_builddir}:${S}" \
- native_builddir="${native_builddir}" \
- libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
- <<< 'python: $(pkgpyexec_LTLIBRARIES)'
- }
-
- python_foreach_impl python_compile
- fi
-}
-
-src_test() {
- python_test() {
- mkdir "${T}/test-${EPYTHON}" || die
- emake -C "${BUILD_DIR}" DESTDIR="${T}/test-${EPYTHON}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
-
- # Smoke test based on https://bugs.gentoo.org/891975#c5
- local -x PYTHONPATH="${T}/test-${EPYTHON}/usr/lib/${EPYTHON}/site-packages:${PYTHONPATH}"
- ${EPYTHON} -c 'import kmod; km = kmod.Kmod(); print([(m.name, m.size) for m in km.loaded()])' || die
- rm -r "${T}/test-${EPYTHON}" || die
- }
-
- if use python; then
- python_foreach_impl python_test
- fi
+ econf "${myeconfargs[@]}"
}
src_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
-
- einstalldocs
-
- if use python; then
- local native_builddir="${BUILD_DIR}"
-
- python_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
- python_optimize
- }
-
- python_foreach_impl python_install
- fi
+ default
find "${ED}" -type f -name "*.la" -delete || die
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-02 0:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-08 14:15 [gentoo-commits] repo/gentoo:master commit in: sys-apps/kmod/files/, sys-apps/kmod/ Lars Wendler
-- strict thread matches above, loose matches on Subject: below --
2021-05-21 7:06 Lars Wendler
2023-01-04 4:32 Sam James
2024-03-02 0:15 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox