diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-03-15 00:29:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-03-15 00:29:11 +0000 |
commit | bcdfc870ecd1de7eea04df21ec3a069328b2e29f (patch) | |
tree | 9d01787ebec0b4f31b72866fbd078d3f0b27fa11 /sys-apps/kmod | |
parent | 37185a5f2fd3d3e821d63ca90dffe9629d147da1 (diff) |
gentoo auto-resync : 15:03:2025 - 00:29:11
Diffstat (limited to 'sys-apps/kmod')
-rw-r--r-- | sys-apps/kmod/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/kmod/files/kmod-31-musl-basename.patch | 113 | ||||
-rw-r--r-- | sys-apps/kmod/kmod-32-r2.ebuild | 149 |
3 files changed, 0 insertions, 265 deletions
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest index 2dbcf9f903d9..333f967615ba 100644 --- a/sys-apps/kmod/Manifest +++ b/sys-apps/kmod/Manifest @@ -1,8 +1,5 @@ -AUX kmod-31-musl-basename.patch 3352 BLAKE2B 3fc8fa107d22de1806b40ea2c52110952813877cb98798f15a76aafb900b3cf7382d5ca7d5c6acc0ca540099cc1eaf575d61a3ec0aa71a4a46d0dab61b1f963f SHA512 4349ac247039aed1015a14e6eda5ac479edaff97804d251adf2f48ff492706c0bc55a5258b1e37c38f6fefe9069589693ad66b99bf21eeec18c87ec296f8bd72 AUX kmod-static-nodes-r1 500 BLAKE2B 44ae03377e6cc7b5a271063828fcb39ec6925d82e52207771e1b6b4f921d0a07e51e97a8e6f432b542d88fb0195e1298cd54ba92d462a828ddd94dab7f924eb3 SHA512 8210d90f5d0702aea626b6db00adbabbd550009d8275fe430c8b113fcb0593a4dfb9efb22c061dde259e1bd94390be49823415d3fd99909e22a2bbf7ae349f63 -DIST kmod-32.tar.xz 511988 BLAKE2B 5b5dac4639406549b23bb1da44bedd86a42885304ef4c7c67344dc8fd70b9e0ca3f83d033c6b80f6e00371d7188e205f4b68fadc56a9ddbf9d6a9d28e9b1e9a4 SHA512 29162135aabd025dff178a4147a754b5da5964855dbeee65ca867dec3b84437f35c1c97f0f027e974a021d3ee9a4940309a716859cc3cfe93c7ed0aada338f24 DIST kmod-33.tar.xz 514428 BLAKE2B 5fb4ea9d96217f8c94cba752b07a1b53228c6ae79dbaa605030cd84e3c6ca8d9c1a703a0253cea1d6c78a78f1507e2a1d9c6215d28dcb01b9e7f8b98a9fde425 SHA512 32d79d0bb7e89012f18458d4e88325f8e19a7dba6e1d5cff01aec3e618d1757b0f7c119735bf38d02e0d056a14273fd7522fca7c61a4d12a3ea5854bb662fff8 -EBUILD kmod-32-r2.ebuild 3950 BLAKE2B e03748b29007b8bdb0aa03587f5193a475d06a60e5e1b86d2d7e34a579ea8355de328a410939877dcd6635c66657e623d0ea840b0fc9f1aac98c944fa150e3fd SHA512 9118b0cdbb93cef9af9022b42ed71a2642b7c09a7db7692a4b825e21880fec4dd8ab3824f480eeee4db9e5e6826cff293609429f3a668552d777d61c92d1877f EBUILD kmod-33.ebuild 4265 BLAKE2B 80d0e0cf1c749e6ee473d2de218fb25a9a700d97f19535127f0c2ca03ec0799c399ae157e0c754ed992ad33eae28ed754b1ef7b53b9a750f0a21b079e2e9325a SHA512 e57ddf9fc6449364516d6cfc69cd53652146bc7553d2dfa91db6a987f2ff6f183b79eed7f5e7384e64a35430306d0020c5831be42905881ac077bbf2ea67b747 EBUILD kmod-9999.ebuild 4273 BLAKE2B cb91951eb3ab13904b1349432ce9260106bd19af975283f3d7502939f6d0dbfc355f2c15c4d99d81d367266f8d22f00b2528c74858a110df464ff03baf7d7fdc SHA512 5a36d94341addf334b1f6a4b34838348c9415cadb9221d89a18cdeb027b8354b335c1c72369d6f48a9bf3ccae17e09e0644cbbba3cb29696337b205dd4e54e06 MISC metadata.xml 681 BLAKE2B d99a380ff37258528d263ede7c4752ffbb9abfb458674e884504a3618d574cffd0cad0da260e9bca208c5bdce1878ce7b3bf26e48fe883e812c5221c6ae38a53 SHA512 032d9a89779ae60a3e34f4d5cdb6b89c6f07bec68dc23b063e1b06f57825cb071ea89322f3bd9408b2503dab423fef3bac42ab5c8a9ae899849f51e38e0ecef3 diff --git a/sys-apps/kmod/files/kmod-31-musl-basename.patch b/sys-apps/kmod/files/kmod-31-musl-basename.patch deleted file mode 100644 index f4839dad2474..000000000000 --- a/sys-apps/kmod/files/kmod-31-musl-basename.patch +++ /dev/null @@ -1,113 +0,0 @@ -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-32-r2.ebuild b/sys-apps/kmod/kmod-32-r2.ebuild deleted file mode 100644 index ba1675a4d321..000000000000 --- a/sys-apps/kmod/kmod-32-r2.ebuild +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools libtool bash-completion-r1 - -DESCRIPTION="Library and tools for managing linux kernel modules" -HOMEPAGE="https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git" - -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://mirrors.edge.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -LICENSE="LGPL-2" -SLOT="0" -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. -# 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 ) - 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-build/gtk-doc-am - ) - lzma? ( virtual/pkgconfig ) - zlib? ( virtual/pkgconfig ) -" -if [[ ${PV} == 9999* ]]; then - BDEPEND+=" dev-libs/libxslt" -fi - -PATCHES=( - "${FILESDIR}"/${PN}-31-musl-basename.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, 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" - --sbindir="${EPREFIX}/sbin" - --enable-shared - --with-bashcompletiondir="$(get_bashcompdir)" - $(use_enable debug) - $(usev 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) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - find "${ED}" -type f -name "*.la" -delete || die - - if use tools; then - local cmd - for cmd in depmod insmod modprobe rmmod; do - rm "${ED}"/bin/${cmd} || die - dosym ../bin/kmod /sbin/${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 -} |