Subject: [PATCH] gnu: inetutils: Drop "vmunix: " prefix for messages read from /dev/kmsg in syslogd.
From: Danny Milosavljevic <[email-masked]>
To: [email-masked]
Cc: Danny Milosavljevic <[email-masked]>
Date: Tue, 6 Mar 2018 09:27:15 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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';)
+     {