--- Begin Message ---
Subject: |
[PATCH] gnu: inetutils: Drop "vmunix: " prefix for messages read from /dev/kmsg in syslogd. |
Date: |
Tue, 6 Mar 2018 09:27:15 +0100 |
* gnu/packages/patches/inetutils-syslogd-disable-vmunix.patch: New file.
* gnu/local.mk: Add it.
* gnu/packages/admin.scm (inetutils)[source]: Add it.
---
gnu/local.mk | 1 +
gnu/packages/admin.scm | 7 +++++--
gnu/packages/patches/inetutils-syslogd-disable-vmunix.patch | 12 ++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/inetutils-syslogd-disable-vmunix.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index d091a89b8..f231900e4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -781,6 +781,7 @@ dist_patch_DATA =
\
%D%/packages/patches/icecat-use-system-harfbuzz.patch \
%D%/packages/patches/id3lib-CVE-2007-4460.patch \
%D%/packages/patches/ilmbase-fix-tests.patch \
+ %D%/packages/patches/inetutils-syslogd-disable.vmunix.patch \
%D%/packages/patches/intltool-perl-compatibility.patch \
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
%D%/packages/patches/jacal-fix-texinfo.patch \
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 554c1679e..805faa638 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -326,7 +326,9 @@ re-executing them as necessary.")
version ".tar.gz"))
(sha256
(base32
- "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
+ "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))
+ (patches
+ (search-patches "inetutils-syslogd-disable-vmunix.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--localstatedir=/var"
@@ -341,7 +343,8 @@ re-executing them as necessary.")
#:parallel-tests? #f))
(inputs `(("ncurses" ,ncurses)
("readline" ,readline))) ;for 'ftp'
- (native-inputs `(("netstat" ,net-tools))) ;for tests
+ (native-inputs `(("help2man" ,help2man)
+ ("netstat" ,net-tools))) ;for tests
(home-page "https://www.gnu.org/software/inetutils/")
(synopsis "Basic networking utilities")
(description
diff --git a/gnu/packages/patches/inetutils-syslogd-disable-vmunix.patch
b/gnu/packages/patches/inetutils-syslogd-disable-vmunix.patch
new file mode 100644
index 000000000..e21f87a05
--- /dev/null
+++ b/gnu/packages/patches/inetutils-syslogd-disable-vmunix.patch
@@ -0,0 +1,12 @@
+diff -ru o/inetutils-1.9.4/src/syslogd.c inetutils-1.9.4/src/syslogd.c
+--- o/inetutils-1.9.4/src/syslogd.c 2015-05-12 14:13:25.000000000 +0200
++++ inetutils-1.9.4/src/syslogd.c 2018-03-06 09:19:41.394046776 +0100
+@@ -1108,7 +1108,7 @@
+ char *lp, *q, line[MAXLINE + 1];
+ const char *p;
+
+- strcpy (line, "vmunix: ");
++ strcpy (line, "");
+ lp = line + strlen (line);
+ for (p = msg; *p != '\0';)
+ {
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#30727] [PATCH] gnu: inetutils: Drop "vmunix: " prefix for messages read from /dev/kmsg in syslogd. |
Date: |
Wed, 7 Mar 2018 20:10:21 +0100 |
Hi Ludo,
On Wed, 07 Mar 2018 13:40:55 +0100
address@hidden (Ludovic Courtès) wrote:
> I’d rather not do that. :-)
>
> I think it’s good that syslogd distinguishes between “real” syslog
> messages and messages coming from the kernel. It’s also useful if one
> is to filter messages.
Yeah, I wasn't 100% serious ;-)
It would be possible to do the patch - but I think there are vastly better
syslog daemons that already do all those things correctly (and also
parse the kmsg timestamps) (syslog-ng etc).
But I figured out how to do it - and I don't actually want to do it on
my system, so now we have an archived version.
I'd just go the UNIX way and ignore the problem and hope it goes away ;-)
We can already filter via vmunix.*shepherd as-is, that should work anyhow.
pgpvenJqpZlTk.pgp
Description: OpenPGP digital signature
--- End Message ---