From 8c13a6eb1fe8464b6615d781e9b39212000aa43d Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 12 Mar 2020 19:10:08 +0100 Subject: [PATCH] kmod: patch default output to /proc/self/fd/1 Fixes void-runit#38. --- srcpkgs/kmod/patches/stdout.patch | 14 ++++++++++++++ srcpkgs/kmod/template | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/kmod/patches/stdout.patch diff --git a/srcpkgs/kmod/patches/stdout.patch b/srcpkgs/kmod/patches/stdout.patch new file mode 100644 index 0000000000..eef8b2ba85 --- /dev/null +++ b/srcpkgs/kmod/patches/stdout.patch @@ -0,0 +1,14 @@ +Use /proc/self/fd/1 instead of /dev/stdout, so we can use +`kmod static-nodes` before udev is running. + +--- tools/static-nodes.c.orig ++++ tools/static-nodes.c +@@ -156,7 +156,7 @@ + { + struct utsname kernel; + char modules[PATH_MAX], buf[4096]; +- const char *output = "/dev/stdout"; ++ const char *output = "/proc/self/fd/1"; + FILE *in = NULL, *out = NULL; + const struct static_nodes_format *format = &static_nodes_format_human; + int r, ret = EXIT_SUCCESS; diff --git a/srcpkgs/kmod/template b/srcpkgs/kmod/template index d06ca8438c..4b96012b99 100644 --- a/srcpkgs/kmod/template +++ b/srcpkgs/kmod/template @@ -1,7 +1,7 @@ # Template file for 'kmod' pkgname=kmod version=27 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-zlib --with-xz" hostmakedepends="pkg-config"