[arch-commits] Commit in systemd/trunk (3 files)

Dave Reisner dreisner at archlinux.org
Sat Jan 14 21:33:27 UTC 2012


    Date: Saturday, January 14, 2012 @ 16:33:26
  Author: dreisner
Revision: 146630

upgpkg: systemd 38-2

backport bugfixes:
- fix parsing of /proc/net/unix on 32-bit
- fix dep cycle on shutdown with rsyslog

Added:
  systemd/trunk/0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch
  systemd/trunk/0001-units-make-sure-syslog-socket-goes-away-early-during.patch
Modified:
  systemd/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch |   87 ++++++++++
 0001-units-make-sure-syslog-socket-goes-away-early-during.patch |   26 ++
 PKGBUILD                                                        |   19 +-
 3 files changed, 125 insertions(+), 7 deletions(-)

Added: 0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch
===================================================================
--- 0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch	                        (rev 0)
+++ 0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch	2012-01-14 21:33:26 UTC (rev 146630)
@@ -0,0 +1,87 @@
+From fdcad0c25579a60061b1fda956686e878a80faef Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 11 Jan 2012 22:07:35 +0100
+Subject: [PATCH] tmpfiles: fix parsing of /proc/net/unix on 32Bit machines
+
+Tracked down by Michael Meeks
+---
+ src/tmpfiles.c |   30 ++++++++++++++++++++----------
+ 1 files changed, 20 insertions(+), 10 deletions(-)
+
+diff --git a/src/tmpfiles.c b/src/tmpfiles.c
+index 19a7c08..44e5c9d 100644
+--- a/src/tmpfiles.c
++++ b/src/tmpfiles.c
+@@ -117,41 +117,50 @@ static void load_unix_sockets(void) {
+         /* We maintain a cache of the sockets we found in
+          * /proc/net/unix to speed things up a little. */
+ 
+-        if (!(unix_sockets = set_new(string_hash_func, string_compare_func)))
++        unix_sockets = set_new(string_hash_func, string_compare_func);
++        if (!unix_sockets)
+                 return;
+ 
+-        if (!(f = fopen("/proc/net/unix", "re")))
++        f = fopen("/proc/net/unix", "re");
++        if (!f)
+                 return;
+ 
+-        if (!(fgets(line, sizeof(line), f)))
++        /* Skip header */
++        if (!fgets(line, sizeof(line), f))
+                 goto fail;
+ 
+         for (;;) {
+                 char *p, *s;
+                 int k;
+ 
+-                if (!(fgets(line, sizeof(line), f)))
++                if (!fgets(line, sizeof(line), f))
+                         break;
+ 
+                 truncate_nl(line);
+ 
+-                if (strlen(line) < 53)
++                p = strchr(line, ':');
++                if (!p)
++                        continue;
++
++                if (strlen(p) < 37)
+                         continue;
+ 
+-                p = line + 53;
++                p += 37;
+                 p += strspn(p, WHITESPACE);
+-                p += strcspn(p, WHITESPACE);
++                p += strcspn(p, WHITESPACE); /* skip one more word */
+                 p += strspn(p, WHITESPACE);
+ 
+                 if (*p != '/')
+                         continue;
+ 
+-                if (!(s = strdup(p)))
++                s = strdup(p);
++                if (!s)
+                         goto fail;
+ 
+                 path_kill_slashes(s);
+ 
+-                if ((k = set_put(unix_sockets, s)) < 0) {
++                k = set_put(unix_sockets, s);
++                if (k < 0) {
+                         free(s);
+ 
+                         if (k != -EEXIST)
+@@ -1059,7 +1068,8 @@ int main(int argc, char *argv[]) {
+         Item *i;
+         Iterator iterator;
+ 
+-        if ((r = parse_argv(argc, argv)) <= 0)
++        r = parse_argv(argc, argv);
++        if (r <= 0)
+                 return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+ 
+         log_set_target(LOG_TARGET_AUTO);
+-- 
+1.7.8.3
+

Added: 0001-units-make-sure-syslog-socket-goes-away-early-during.patch
===================================================================
--- 0001-units-make-sure-syslog-socket-goes-away-early-during.patch	                        (rev 0)
+++ 0001-units-make-sure-syslog-socket-goes-away-early-during.patch	2012-01-14 21:33:26 UTC (rev 146630)
@@ -0,0 +1,26 @@
+From ead51eb4ed55981f290e40a871ffbca6480c4cd3 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 12 Jan 2012 04:34:50 +0100
+Subject: [PATCH] units: make sure syslog socket goes away early during
+ shutdown
+
+---
+ units/syslog.socket |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/units/syslog.socket b/units/syslog.socket
+index 323fa86..657e791 100644
+--- a/units/syslog.socket
++++ b/units/syslog.socket
+@@ -11,6 +11,8 @@
+ Description=Syslog Socket
+ DefaultDependencies=no
+ Before=sockets.target syslog.target
++Conflicts=shutdown.target
++Before=shutdown.target
+ 
+ # Pull in syslog.target to tell people that /dev/log is now accessible
+ Wants=syslog.target
+-- 
+1.7.8.3
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-01-14 19:29:29 UTC (rev 146629)
+++ PKGBUILD	2012-01-14 21:33:26 UTC (rev 146630)
@@ -3,13 +3,13 @@
 
 pkgname=systemd
 pkgver=38
-pkgrel=1
+pkgrel=2
 pkgdesc="Session and Startup manager"
 arch=('i686' 'x86_64')
 url="http://www.freedesktop.org/wiki/Software/systemd"
 license=('GPL2')
-depends=('dbus-core' 'kbd' 'libcap' 'util-linux>=2.19' 'udev>=172' 'xz')
-makedepends=('acl' 'gperf' 'cryptsetup' 'intltool' 'linux-api-headers')
+depends=('acl' 'dbus-core' 'kbd' 'libcap' 'util-linux>=2.19' 'udev>=172' 'xz')
+makedepends=('gperf' 'cryptsetup' 'intltool' 'linux-api-headers')
 optdepends=('cryptsetup: required for encrypted block devices'
             'dbus-python: systemd-analyze'
             'initscripts: legacy support for hostname and vconsole setup'
@@ -28,9 +28,13 @@
         etc/systemd/systemd-logind.conf)
 install=systemd.install
 source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
-        "os-release")
+        "os-release"
+        '0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch'
+        '0001-units-make-sure-syslog-socket-goes-away-early-during.patch')
 md5sums=('68c66dce5a28c0efd7c210af5d11efed'
-         '752636def0db3c03f121f8b4f44a63cd')
+         '752636def0db3c03f121f8b4f44a63cd'
+         '07437e70be65ef14fd4f13c5ec5bd1fe'
+         'c567ce597f68c07b9bc5b7e835f80f7d')
 
 build() {
   cd "$pkgname-$pkgver"
@@ -40,13 +44,14 @@
   sed -i -e '/^Environ.*LANG/s/^/#/' \
          -e '/^ExecStart/s/agetty/& -8/' units/getty at .service.m4
 
+  patch -Np1 < "$srcdir/0001-tmpfiles-fix-parsing-of-proc-net-unix-on-32Bit-machi.patch"
+  patch -Np1 < "$srcdir/0001-units-make-sure-syslog-socket-goes-away-early-during.patch"
 
   ./configure --sysconfdir=/etc \
               --libexecdir=/usr/lib \
               --libdir=/usr/lib \
               --localstatedir=/var \
-              --with-rootprefix= \
-              --with-rootlibdir=/lib
+              --with-rootprefix=
 
   make
 




More information about the arch-commits mailing list