diff options
author | Nicolas Iooss | 2014-07-26 10:38:24 +0200 |
---|---|---|
committer | Nicolas Iooss | 2015-06-27 11:44:56 +0800 |
commit | 8bfcdfc3d277334a2debc59b3cfe30fa0961e718 (patch) | |
tree | 82b3fa70b00cbc0bb5c6b57e84e1ef7eb2125403 | |
parent | 9e55f3aa8f85fad087e903775febfc498a5e14d0 (diff) | |
download | aur-8bfcdfc3d277334a2debc59b3cfe30fa0961e718.tar.gz |
systemd-selinux 215-4 update
Assing pkgrel=4 instead of 1 because the install script use this number
to display relevant messages.
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | 0001-networkd-properly-track-addresses-when-first-added.patch | 104 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | systemd.install | 8 |
4 files changed, 140 insertions, 16 deletions
@@ -1,6 +1,6 @@ pkgbase = systemd-selinux - pkgver = 214 - pkgrel = 1 + pkgver = 215 + pkgrel = 4 url = http://www.freedesktop.org/wiki/Software/systemd arch = i686 arch = x86_64 @@ -28,14 +28,16 @@ pkgbase = systemd-selinux makedepends = libselinux options = strip options = debug - source = http://www.freedesktop.org/software/systemd/systemd-214.tar.xz + source = http://www.freedesktop.org/software/systemd/systemd-215.tar.xz source = initcpio-hook-udev source = initcpio-install-systemd source = initcpio-install-udev - md5sums = eac4f9fc5bd18a0efc3fc20858baacf3 + source = 0001-networkd-properly-track-addresses-when-first-added.patch + md5sums = d2603e9fffd8b18d242543e36f2e7d31 md5sums = 29245f7a240bfba66e2b1783b63b6b40 md5sums = 66cca7318e13eaf37c5b7db2efa69846 md5sums = bde43090d4ac0ef048e3eaee8202a407 + md5sums = 2d237a277a12b3801c88d159d64a7413 pkgname = systemd-selinux pkgdesc = system and service manager with SELinux support @@ -64,9 +66,9 @@ pkgname = systemd-selinux optdepends = quota-tools: kernel-level quota management optdepends = systemd-sysvcompat: symlink package to provide sysvinit binaries provides = nss-myhostname - provides = systemd-tools=214 - provides = udev=214 - provides = systemd=214-1 + provides = systemd-tools=215 + provides = udev=215 + provides = systemd=215-4 conflicts = nss-myhostname conflicts = systemd-tools conflicts = udev @@ -106,15 +108,15 @@ pkgname = libsystemd-selinux provides = libsystemd-journal.so provides = libsystemd-login.so provides = libudev.so - provides = libsystemd=214-1 + provides = libsystemd=215-4 conflicts = libsystemd pkgname = systemd-sysvcompat-selinux pkgdesc = sysvinit compat for systemd with SELinux support license = GPL2 depends = systemd-selinux - provides = systemd-sysvcompat=214-1 - provides = selinux-systemd-sysvcompat=214-1 + provides = systemd-sysvcompat=215-4 + provides = selinux-systemd-sysvcompat=215-4 conflicts = sysvinit conflicts = systemd-sysvcompat conflicts = selinux-systemd-sysvcompat diff --git a/0001-networkd-properly-track-addresses-when-first-added.patch b/0001-networkd-properly-track-addresses-when-first-added.patch new file mode 100644 index 000000000000..4f1af0741dd2 --- /dev/null +++ b/0001-networkd-properly-track-addresses-when-first-added.patch @@ -0,0 +1,104 @@ +From 4958aee4977f325be19f0e1e4b424922c3cada5f Mon Sep 17 00:00:00 2001 +From: Tom Gundersen <teg@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 + @@ -6,8 +6,8 @@ pkgbase=systemd-selinux pkgname=('systemd-selinux' 'libsystemd-selinux' 'systemd-sysvcompat-selinux') -pkgver=214 -pkgrel=1 +pkgver=215 +pkgrel=4 arch=('i686' 'x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" groups=('selinux') @@ -19,11 +19,19 @@ options=('strip' 'debug') source=("http://www.freedesktop.org/software/${pkgname/-selinux}/${pkgname/-selinux}-$pkgver.tar.xz" 'initcpio-hook-udev' 'initcpio-install-systemd' - 'initcpio-install-udev') -md5sums=('eac4f9fc5bd18a0efc3fc20858baacf3' + 'initcpio-install-udev' + '0001-networkd-properly-track-addresses-when-first-added.patch') +md5sums=('d2603e9fffd8b18d242543e36f2e7d31' '29245f7a240bfba66e2b1783b63b6b40' '66cca7318e13eaf37c5b7db2efa69846' - 'bde43090d4ac0ef048e3eaee8202a407') + 'bde43090d4ac0ef048e3eaee8202a407' + '2d237a277a12b3801c88d159d64a7413') + +prepare() { + cd "${pkgname/-selinux}-$pkgver" + + patch -Np1 <"$srcdir"/0001-networkd-properly-track-addresses-when-first-added.patch +} build() { cd "${pkgname/-selinux}-$pkgver" @@ -90,6 +98,7 @@ package_systemd-selinux() { rm "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1.service" \ "$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-networkd.service" \ "$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-resolved.service" \ + "$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service" \ "$pkgdir/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service" rmdir "$pkgdir/etc/systemd/system/getty.target.wants" \ "$pkgdir/etc/systemd/system/network-online.target.wants" @@ -107,6 +116,9 @@ package_systemd-selinux() { sed -i 's#GROUP="dialout"#GROUP="uucp"#g; s#GROUP="tape"#GROUP="storage"#g; s#GROUP="cdrom"#GROUP="optical"#g' "$pkgdir"/usr/lib/udev/rules.d/*.rules + sed -i 's/dialout/uucp/g; + s/tape/storage/g; + s/cdrom/optical/g' "$pkgdir"/usr/lib/sysusers.d/basic.conf # add mkinitcpio hooks install -Dm644 "$srcdir/initcpio-install-systemd" "$pkgdir/usr/lib/initcpio/install/systemd" diff --git a/systemd.install b/systemd.install index 062e9a97d20d..a075a28eef3b 100644 --- a/systemd.install +++ b/systemd.install @@ -137,6 +137,11 @@ _214_2_changes() { echo ' "kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e"' } +_215_2_changes() { + # create at least the symlink from /etc/os-release to /usr/lib/os-release + systemd-tmpfiles --create etc.conf +} + post_install() { post_common "$@" @@ -162,7 +167,8 @@ post_upgrade() { 209-1 210-1 213-4 - 214-2) + 214-2 + 215-2) for v in "${upgrades[@]}"; do if [[ $(vercmp "$v" "$2") -eq 1 ]]; then |