Date: Thursday, October 30, 2014 @ 00:32:10 Author: dreisner Revision: 225459
upgpkg: systemd 217-1 - use Arch NTP server pool - drop --with-firmware-path (since udev fw loader is gone) - add libidn as a dependency for systemd-resolved - add arch=('any') for systemd-sysvcompat - backport fix for systemd-nspawn failures with --bind Added: systemd/trunk/0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch Modified: systemd/trunk/PKGBUILD Deleted: systemd/trunk/0001-networkd-properly-track-addresses-when-first-added.patch ---------------------------------------------------------------+ 0001-networkd-properly-track-addresses-when-first-added.patch | 104 ---------- 0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch | 33 +++ PKGBUILD | 26 +- 3 files changed, 52 insertions(+), 111 deletions(-) Deleted: 0001-networkd-properly-track-addresses-when-first-added.patch =================================================================== --- 0001-networkd-properly-track-addresses-when-first-added.patch 2014-10-29 23:30:40 UTC (rev 225458) +++ 0001-networkd-properly-track-addresses-when-first-added.patch 2014-10-29 23:32:10 UTC (rev 225459) @@ -1,104 +0,0 @@ -From 4958aee4977f325be19f0e1e4b424922c3cada5f Mon Sep 17 00:00:00 2001 -From: Tom Gundersen <t...@jklm.no> -Date: Thu, 3 Jul 2014 22:47:51 +0200 -Subject: [PATCH] networkd: properly track addresses when first added - -When doing a NEWADDR, the reply we get back is the NEWADDR itself, rather -than just an empty ack (unlike how NEWLINK works). For this reason, the -process that did the NEWADDR does not get the broadcast message. - -We were only listening for broadcast messages, and hence not tracking the -addresses we added ourselves. This went unnoticed as the kernel will usually -send NEWADDR messages from time to time anyway, so things would mostly work, -but in the worst case we would not notice that a routable address was available -and consider ourselves offline. ---- - src/network/networkd-link.c | 54 +++++++++++++++++++++++++-------------------- - 1 file changed, 30 insertions(+), 24 deletions(-) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 961c1ab..6257372 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -599,10 +599,35 @@ static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) - return 0; - } - -+static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { -+ _cleanup_link_unref_ Link *link = userdata; -+ int r; -+ -+ assert(rtnl); -+ assert(m); -+ assert(link); -+ assert(link->manager); -+ -+ for (; m; m = sd_rtnl_message_next(m)) { -+ r = sd_rtnl_message_get_errno(m); -+ if (r < 0) { -+ log_debug_link(link, "getting address failed: %s", strerror(-r)); -+ continue; -+ } -+ -+ r = link_rtnl_process_address(rtnl, m, link->manager); -+ if (r < 0) -+ log_warning_link(link, "could not process address: %s", strerror(-r)); -+ } -+ -+ return 1; -+} -+ - static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { - _cleanup_link_unref_ Link *link = userdata; - int r; - -+ assert(rtnl); - assert(m); - assert(link); - assert(link->ifname); -@@ -623,6 +648,11 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { - link->ifname, strerror(-r), - "ERRNO=%d", -r, - NULL); -+ if (r >= 0) { -+ /* calling handler directly so take a ref */ -+ link_ref(link); -+ link_get_address_handler(rtnl, m, link); -+ } - - if (link->addr_messages == 0) { - log_debug_link(link, "addresses set"); -@@ -2233,30 +2263,6 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use - return 1; - } - --static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { -- _cleanup_link_unref_ Link *link = userdata; -- int r; -- -- assert(rtnl); -- assert(m); -- assert(link); -- assert(link->manager); -- -- for (; m; m = sd_rtnl_message_next(m)) { -- r = sd_rtnl_message_get_errno(m); -- if (r < 0) { -- log_debug_link(link, "getting address failed: %s", strerror(-r)); -- continue; -- } -- -- r = link_rtnl_process_address(rtnl, m, link->manager); -- if (r < 0) -- log_warning_link(link, "could not process address: %s", strerror(-r)); -- } -- -- return 1; --} -- - int link_add(Manager *m, sd_rtnl_message *message, Link **ret) { - Link *link; - _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL; --- -2.0.1 - Added: 0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch =================================================================== --- 0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch (rev 0) +++ 0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch 2014-10-29 23:32:10 UTC (rev 225459) @@ -0,0 +1,33 @@ +From 1ab19cb167b32967556eefd8f6d3df0e3de7d67d Mon Sep 17 00:00:00 2001 +From: Dave Reisner <dreis...@archlinux.org> +Date: Wed, 29 Oct 2014 13:32:43 -0400 +Subject: [PATCH] nspawn: ignore EEXIST when creating mount point + +A combination of commits f3c80515c and 79d80fc14 cause nspawn to +silently fail with a commandline such as: + + # systemd-nspawn -D /build/extra-x86_64 --bind=/usr + +strace shows the culprit: + + [pid 27868] writev(2, [{"Failed to create mount point /build/extra-x86_64/usr: File exists", 82}, {"\n", 1}], 2) = 83 +--- + src/nspawn/nspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index b6d9bc6..d88987a 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -758,7 +758,7 @@ static int mount_binds(const char *dest, char **l, bool ro) { + * and char devices. */ + if (S_ISDIR(source_st.st_mode)) { + r = mkdir_label(where, 0755); +- if (r < 0) { ++ if (r < 0 && errno != EEXIST) { + log_error("Failed to create mount point %s: %s", where, strerror(-r)); + + return r; +-- +2.1.2 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2014-10-29 23:30:40 UTC (rev 225458) +++ PKGBUILD 2014-10-29 23:32:10 UTC (rev 225459) @@ -3,27 +3,38 @@ pkgbase=systemd pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat') -pkgver=216 -pkgrel=3 +pkgver=217 +pkgrel=1 arch=('i686' 'x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gobject-introspection' 'gperf' - 'gtk-doc' 'intltool' 'kmod' 'libcap' 'libgcrypt' 'libmicrohttpd' 'libxslt' - 'util-linux' 'linux-api-headers' 'pam' 'python' 'python-lxml' + 'gtk-doc' 'intltool' 'kmod' 'libcap' 'libidn' 'libgcrypt' 'libmicrohttpd' + 'libxslt' 'util-linux' 'linux-api-headers' 'pam' 'python' 'python-lxml' 'quota-tools' 'shadow' 'xz') options=('strip' 'debug') source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz" + '0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch' 'initcpio-hook-udev' 'initcpio-install-systemd' 'initcpio-install-udev') -md5sums=('04fda588a04f549da0f397dce3ae6a39' +md5sums=('e68dbff3cc19f66e341572d9fb2ffa89' + 'ca9e33118fd8d456563854d95512a577' '29245f7a240bfba66e2b1783b63b6b40' '66cca7318e13eaf37c5b7db2efa69846' 'bde43090d4ac0ef048e3eaee8202a407') + +prepare() { + cd "$pkgname-$pkgver" + + patch -Np1 <../0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch +} + build() { cd "$pkgname-$pkgver" + local timeservers=({0..3}.arch.pool.ntp.org) + ./configure \ --libexecdir=/usr/lib \ --localstatedir=/var \ @@ -36,7 +47,7 @@ --disable-kdbus \ --with-sysvinit-path= \ --with-sysvrcnd-path= \ - --with-firmware-path="/usr/lib/firmware/updates:/usr/lib/firmware" + --with-ntp-servers="${timeservers[*]}" make } @@ -45,7 +56,7 @@ pkgdesc="system and service manager" license=('GPL2' 'LGPL2.1' 'MIT') depends=('acl' 'bash' 'dbus' 'glib2' 'kbd' 'kmod' 'hwids' 'libcap' 'libgcrypt' - 'libsystemd' 'pam' 'libseccomp' 'util-linux' 'xz') + 'libsystemd' 'libidn' 'pam' 'libseccomp' 'util-linux' 'xz') provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver") replaces=('nss-myhostname' 'systemd-tools' 'udev') conflicts=('nss-myhostname' 'systemd-tools' 'udev') @@ -147,6 +158,7 @@ groups=('base') conflicts=('sysvinit') depends=('systemd') + arch=('any') mv "$srcdir/_sysvcompat"/* "$pkgdir"