This commit is contained in:
joborun linux 2022-07-01 00:23:59 +03:00
parent 10dacb1b1e
commit 0dc6965c95
6 changed files with 135 additions and 16 deletions

View file

@ -3,5 +3,3 @@ gettext
automake
autoconf

97
kmod/0001-master.patch Normal file
View file

@ -0,0 +1,97 @@
From 16c086f48c2270ad6412ad7226df53079f825270 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@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@inai.de>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@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@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@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@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) {

View file

@ -1,12 +1,13 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=kmod
pkgver=29
pkgrel=03
pkgver=30
pkgrel=01
pkgdesc="Linux kernel module management tools and library"
arch=('x86_64')
url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'
@ -17,8 +18,16 @@ options=(strip)
provides=('module-init-tools=3.16' 'libkmod.so') conflicts=('module-init-tools')
replaces=('module-init-tools')
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')
'depmod.hook'
'depmod.script')
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 < ../0001-master.patch
}
build() {
cd "$pkgname-$pkgver"
@ -75,8 +84,10 @@ license=('GPL2')
validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi
sha256sums=(0b80eea7aa184ac6fd20cafa2a1fdf290ffecc70869a797079e2cc5c6225a52a # kmod-29.tar.xz
e98f09d07f63b25d4f9ac2c07cb683eeeef2a6c68202b1449cb01d4e94613dd7 # kmod-29.tar.sign
sha256sums=(f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f # kmod-30.tar.xz
4d92eeeb891374bcd1ac61de3868ab04e7057549e971348f18f73c2a525dfd07 # kmod-30.tar.sign
99a02347c809307675a9a643ec34704ec5289b754d53dd4d319b32849b299c60 # 0001-master.patch
1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8 # depmod-search.conf
c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1 # depmod.hook
d2cd04a09feba30e1376144a8110ec7521892acb0940c3c4ba459aeecf0452ed) # depmod.script

View file

@ -1,8 +1,8 @@
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=kmod
pkgver=29
pkgrel=3
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'
@ -15,19 +15,29 @@ 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=('e81e63acd80697d001c8d85c1acb38a0'
'depmod.hook'
'depmod.script')
md5sums=('85202f0740a75eb52f2163c776f9b564'
'SKIP'
'109042785e725717fe6a6d545c51a090'
'dd62cbf62bd8f212f51ef8c43bec9a77'
'e179ace75721e92b04b2e145b69dab29'
'b00253ca0d4ebfb2414e4596597bdebd')
sha256sums=('0b80eea7aa184ac6fd20cafa2a1fdf290ffecc70869a797079e2cc5c6225a52a'
sha256sums=('f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f'
'SKIP'
'99a02347c809307675a9a643ec34704ec5289b754d53dd4d319b32849b299c60'
'1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8'
'c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1'
'd2cd04a09feba30e1376144a8110ec7521892acb0940c3c4ba459aeecf0452ed')
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 < ../0001-master.patch
}
build() {
cd "$pkgname-$pkgver"

View file

@ -1 +1,4 @@
linux-lts-headers
automake
autoconf

View file

@ -1,5 +1,5 @@
real 0m18.417s
user 0m32.438s
sys 0m3.395s
real 0m22.024s
user 0m38.606s
sys 0m4.436s