[arch-commits] Commit in kmod/repos (7 files)
Christian Hesse
eworm at gemini.archlinux.org
Thu Jun 30 20:19:57 UTC 2022
Date: Thursday, June 30, 2022 @ 20:19:56
Author: eworm
Revision: 449695
archrelease: copy trunk to testing-x86_64
Added:
kmod/repos/testing-x86_64/
kmod/repos/testing-x86_64/0001-master.patch
(from rev 449694, kmod/trunk/0001-master.patch)
kmod/repos/testing-x86_64/PKGBUILD
(from rev 449694, kmod/trunk/PKGBUILD)
kmod/repos/testing-x86_64/depmod-search.conf
(from rev 449694, kmod/trunk/depmod-search.conf)
kmod/repos/testing-x86_64/depmod.hook
(from rev 449694, kmod/trunk/depmod.hook)
kmod/repos/testing-x86_64/depmod.script
(from rev 449694, kmod/trunk/depmod.script)
kmod/repos/testing-x86_64/keys/
--------------------+
0001-master.patch | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 91 +++++++++++++++++++++++++++++++++++++++++++++++
depmod-search.conf | 5 ++
depmod.hook | 13 ++++++
depmod.script | 13 ++++++
5 files changed, 219 insertions(+)
Copied: kmod/repos/testing-x86_64/0001-master.patch (from rev 449694, kmod/trunk/0001-master.patch)
===================================================================
--- testing-x86_64/0001-master.patch (rev 0)
+++ testing-x86_64/0001-master.patch 2022-06-30 20:19:56 UTC (rev 449695)
@@ -0,0 +1,97 @@
+From 16c086f48c2270ad6412ad7226df53079f825270 Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh at inai.de>
+Date: Thu, 30 Jun 2022 18:47:25 +0200
+Subject: [PATCH 1/3] testsuite: repair read of uninitialized memory
+
+Function ``test_backoff_time`` does not initialize ``delta``, and
+``get_backoff_delta_msec`` then performs a read from uninitialized
+memory with the ``!*delta`` expression.
+
+Signed-off-by: Jan Engelhardt <jengelh at inai.de>
+Signed-off-by: Lucas De Marchi <lucas.de.marchi at gmail.com>
+---
+ testsuite/test-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testsuite/test-util.c b/testsuite/test-util.c
+index fb8c9ef..5766584 100644
+--- a/testsuite/test-util.c
++++ b/testsuite/test-util.c
+@@ -231,7 +231,7 @@ DEFINE_TEST(test_addu64_overflow,
+
+ static int test_backoff_time(const struct test *t)
+ {
+- unsigned long long delta;
++ unsigned long long delta = 0;
+
+ /* Check exponential increments */
+ get_backoff_delta_msec(now_msec(), now_msec() + 10, &delta);
+
+From 09ad8605520c87e799cb89e2bcdf2f36e21f77ba Mon Sep 17 00:00:00 2001
+From: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
+Date: Thu, 24 Jun 2021 14:53:56 +0100
+Subject: [PATCH 2/3] build: enable building & running tests from a subdir
+
+During dpkg build, in a subdir, it is currently not possible to run
+tests. Building testsuite/modules due to non-existance of the
+testsuite directory under the build dir. Thus create it, when it is
+not there.
+
+Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0e48770..b0a654c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -255,6 +255,7 @@ CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) &
+ build-module-playground:
+ $(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ $(RM) -rf testsuite/module-playground && \
++ mkdir -p testsuite/ && \
+ cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
+ find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
+ fi
+
+From c1fb98a30dae051ab69d23624d1e062d0527527e Mon Sep 17 00:00:00 2001
+From: Quentin Armitage <quentin at armitage.org.uk>
+Date: Fri, 19 Nov 2021 18:33:49 +0000
+Subject: [PATCH 3/3] modprobe: Write error messages to syslog if stderr is
+ unavailable
+
+The man page modprobe(8) states for the --syslog option:
+"This is also automatically enabled when stderr is unavailable."
+but it wasn't happening.
+
+This commit now makes modprobe write to syslog if stderr is closed.
+---
+ tools/modprobe.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tools/modprobe.c b/tools/modprobe.c
+index 2a2ae21..3240c2b 100644
+--- a/tools/modprobe.c
++++ b/tools/modprobe.c
+@@ -819,6 +819,7 @@ static int do_modprobe(int argc, char **orig_argv)
+ int do_show_modversions = 0;
+ int do_show_exports = 0;
+ int err;
++ struct stat stat_buf;
+
+ argv = prepend_options_from_env(&argc, orig_argv);
+ if (argv == NULL) {
+@@ -947,6 +948,12 @@ static int do_modprobe(int argc, char **orig_argv)
+ args = argv + optind;
+ nargs = argc - optind;
+
++ if (!use_syslog &&
++ (!stderr ||
++ fileno(stderr) == -1 ||
++ fstat(fileno(stderr), &stat_buf)))
++ use_syslog = 1;
++
+ log_open(use_syslog);
+
+ if (!do_show_config) {
Copied: kmod/repos/testing-x86_64/PKGBUILD (from rev 449694, kmod/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2022-06-30 20:19:56 UTC (rev 449695)
@@ -0,0 +1,91 @@
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+
+pkgname=kmod
+pkgver=30
+pkgrel=1
+pkgdesc="Linux kernel module management tools and library"
+arch=('x86_64')
+url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'
+license=('GPL2')
+depends=('glibc' 'zlib' 'openssl' 'xz' 'zstd')
+checkdepends=('linux-headers' 'libelf')
+options=('strip' 'debug')
+provides=('module-init-tools=3.16' 'libkmod.so')
+conflicts=('module-init-tools')
+replaces=('module-init-tools')
+validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi
+source=("https://www.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign}
+ '0001-master.patch'
+ 'depmod-search.conf'
+ 'depmod.hook'
+ 'depmod.script')
+md5sums=('85202f0740a75eb52f2163c776f9b564'
+ 'SKIP'
+ '109042785e725717fe6a6d545c51a090'
+ 'dd62cbf62bd8f212f51ef8c43bec9a77'
+ 'e179ace75721e92b04b2e145b69dab29'
+ 'b00253ca0d4ebfb2414e4596597bdebd')
+sha256sums=('f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f'
+ 'SKIP'
+ '99a02347c809307675a9a643ec34704ec5289b754d53dd4d319b32849b299c60'
+ '1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8'
+ 'c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1'
+ 'd2cd04a09feba30e1376144a8110ec7521892acb0940c3c4ba459aeecf0452ed')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 < ../0001-master.patch
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ ./configure \
+ --sysconfdir=/etc \
+ --with-xz \
+ --with-zlib \
+ --with-zstd \
+ --with-openssl
+
+ make
+}
+
+check() {
+ # As of kmod v20, the test suite needs to build some kernel modules, and thus
+ # needs headers available in order to run. We depend on linux-headers, but
+ # this is really only to try and make sure that *some* useable tree of kernel
+ # headers exist. The first useable tree we find is good enough, as these
+ # modules will never be loaded by tests.
+
+ local kdirs=(/usr/lib/modules/*/build/Makefile)
+ if [[ ! -f ${kdirs[0]} ]]; then
+ printf '==> Unable to find kernel headers to build modules for tests\n' >&2
+ return 1
+ fi
+
+ local kver kdir=${kdirs[0]%/Makefile}
+ IFS=/ read _ _ _ kver _ <<<"$kdir"
+
+ make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver"
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+ # extra directories
+ install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d
+
+ for tool in {ins,ls,rm,dep}mod mod{probe,info}; do
+ ln -s kmod "$pkgdir/usr/bin/$tool"
+ done
+
+ # install depmod.d file for search/ dir
+ install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
+
+ # hook
+ install -Dm644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook"
+ install -Dm755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod"
+}
+
+# vim: ft=sh syn=sh et
Copied: kmod/repos/testing-x86_64/depmod-search.conf (from rev 449694, kmod/trunk/depmod-search.conf)
===================================================================
--- testing-x86_64/depmod-search.conf (rev 0)
+++ testing-x86_64/depmod-search.conf 2022-06-30 20:19:56 UTC (rev 449695)
@@ -0,0 +1,5 @@
+#
+# /usr/lib/depmod.d/search.conf
+#
+
+search updates extramodules built-in
Copied: kmod/repos/testing-x86_64/depmod.hook (from rev 449694, kmod/trunk/depmod.hook)
===================================================================
--- testing-x86_64/depmod.hook (rev 0)
+++ testing-x86_64/depmod.hook 2022-06-30 20:19:56 UTC (rev 449695)
@@ -0,0 +1,13 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/modules/*/
+Target = !usr/lib/modules/*/?*
+
+[Action]
+Description = Updating module dependencies...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/depmod
+NeedsTargets
Copied: kmod/repos/testing-x86_64/depmod.script (from rev 449694, kmod/trunk/depmod.script)
===================================================================
--- testing-x86_64/depmod.script (rev 0)
+++ testing-x86_64/depmod.script 2022-06-30 20:19:56 UTC (rev 449695)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+while read -r f; do
+ if [[ -e ${f}modules.order ]]; then
+ depmod $(basename "$f")
+ elif [[ -d $f ]]; then
+ rm -f "${f}"modules.{alias,alias.bin,builtin.alias.bin,builtin.bin} \
+ "${f}"modules.{dep,dep.bin,devname,softdep,symbols,symbols.bin}
+ rmdir --ignore-fail-on-non-empty "$f"
+ fi
+done
+
+# vim:set ft=sh sw=2 et:
More information about the arch-commits
mailing list