[arch-commits] Commit in systemd/trunk (2 files)
Dave Reisner
dreisner at archlinux.org
Wed May 30 16:36:44 UTC 2012
Date: Wednesday, May 30, 2012 @ 12:36:43
Author: dreisner
Revision: 160193
upgpkg: systemd 183-6
- remove systemd prefixes from some manpages
- backport journald and bash completion fixes
Added:
systemd/trunk/0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch
Modified:
systemd/trunk/PKGBUILD
-----------------------------------------------------------------+
0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch | 57 ++++++++++
PKGBUILD | 8 +
2 files changed, 65 insertions(+)
Added: 0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch
===================================================================
--- 0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch (rev 0)
+++ 0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch 2012-05-30 16:36:43 UTC (rev 160193)
@@ -0,0 +1,57 @@
+From 6c3569e11aa1f658a9ef3f3c6efda4ae696e5aa8 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 30 May 2012 15:42:35 +0200
+Subject: [PATCH] journald: ignore messages read from /proc/kmsg that we
+ generated via /dev/kmsg
+
+Avoid a busy loop.
+---
+ TODO | 2 --
+ src/journal/journald.c | 17 +++++++++++++++++
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/journal/journald.c b/src/journal/journald.c
+index 7776c2a..5ecb7f7 100644
+--- a/src/journal/journald.c
++++ b/src/journal/journald.c
+@@ -1768,6 +1768,17 @@ static int parse_kernel_timestamp(char **_p, usec_t *t) {
+ return 1;
+ }
+
++static bool is_us(const char *pid) {
++ pid_t t;
++
++ assert(pid);
++
++ if (parse_pid(pid, &t) < 0)
++ return false;
++
++ return t == getpid();
++}
++
+ static void proc_kmsg_line(Server *s, const char *p) {
+ struct iovec iovec[N_IOVEC_META_FIELDS + 7];
+ char *message = NULL, *syslog_priority = NULL, *syslog_pid = NULL, *syslog_facility = NULL, *syslog_identifier = NULL, *source_time = NULL;
+@@ -1807,6 +1818,11 @@ static void proc_kmsg_line(Server *s, const char *p) {
+ } else {
+ read_identifier(&p, &identifier, &pid);
+
++ /* Avoid any messages we generated ourselves via
++ * log_info() and friends. */
++ if (is_us(pid))
++ goto finish;
++
+ if (s->forward_to_syslog)
+ forward_syslog(s, priority, identifier, p, NULL, NULL);
+
+@@ -1832,6 +1848,7 @@ static void proc_kmsg_line(Server *s, const char *p) {
+
+ dispatch_message(s, iovec, n, ELEMENTSOF(iovec), NULL, NULL, NULL, 0, priority);
+
++finish:
+ free(message);
+ free(syslog_priority);
+ free(syslog_identifier);
+--
+1.7.10.2
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-05-30 15:34:46 UTC (rev 160192)
+++ PKGBUILD 2012-05-30 16:36:43 UTC (rev 160193)
@@ -15,6 +15,7 @@
'initcpio-install-udev'
'initcpio-install-timestamp'
'0001-Reinstate-TIMEOUT-handling.patch'
+ '0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch'
'os-release'
'locale.sh')
md5sums=('e1e5e0f376fa2a4cb4bc31a2161c09f2'
@@ -22,6 +23,7 @@
'59e91c4d7a69b7bf12c86a9982e37ced'
'df69615503ad293c9ddf9d8b7755282d'
'5543be25f205f853a21fa5ee68e03f0d'
+ '146d5e5cce55b1b7c6115aaf5ca7770a'
'752636def0db3c03f121f8b4f44a63cd'
'f15956945052bb911e5df81cf5e7e5dc')
@@ -31,9 +33,15 @@
# still waiting on ipw2x00 to get fixed...
patch -Np1 <"$srcdir/0001-Reinstate-TIMEOUT-handling.patch"
+ # fix busy loop in journal (upstream 6c3569e11aa1f658a9ef3f3c6efda4ae696e5aa8)
+ patch -Np1 <"$srcdir/0001-journald-ignore-messages-read-from-proc-kmsg-that-we.patch"
+
# fix udev rules dir (upstream 392f9c8404e42f7dd6e5b5adf488d87838515981)
sed -i 's/pkglibexecdir/udevlibexecdir/' src/udev/udev.pc.in
+ # fix bash completion (upstream 80d37ae7b9d2c471e89e018a8f1e7cab8cd53123)
+ sed -i 's/systemd-loginctl/loginctl/' bash-completion/systemd-bash-completion.sh
+
./configure \
--libexecdir=/usr/lib \
--localstatedir=/var \
More information about the arch-commits
mailing list