From e1c991185c594db7cc8978ed0239ebca4d37560e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Jan 2013 00:05:27 -0800 Subject: Wed Jan 16 00:05:27 PST 2013 --- ...dbus-fix-serialization-of-calendar-timers.patch | 62 ++++++++++++++++++++++ core/systemd/PKGBUILD | 36 +++++++------ core/systemd/systemd.install | 34 +++++++++--- 3 files changed, 108 insertions(+), 24 deletions(-) create mode 100644 core/systemd/0001-dbus-fix-serialization-of-calendar-timers.patch (limited to 'core/systemd') diff --git a/core/systemd/0001-dbus-fix-serialization-of-calendar-timers.patch b/core/systemd/0001-dbus-fix-serialization-of-calendar-timers.patch new file mode 100644 index 000000000..0d9f1251d --- /dev/null +++ b/core/systemd/0001-dbus-fix-serialization-of-calendar-timers.patch @@ -0,0 +1,62 @@ +From 3761902e2e120849c283106fd4b78b6adec7367e Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 8 Jan 2013 20:00:01 +0100 +Subject: [PATCH] dbus: fix serialization of calendar timers + +--- + src/core/dbus-timer.c | 25 +++++++++++++++---------- + 1 file changed, 15 insertions(+), 10 deletions(-) + +diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c +index 11d18cb..b22fcb5 100644 +--- a/src/core/dbus-timer.c ++++ b/src/core/dbus-timer.c +@@ -69,22 +69,28 @@ static int bus_timer_append_timers(DBusMessageIter *i, const char *property, voi + return -ENOMEM; + + LIST_FOREACH(value, k, p->values) { +- char *buf; ++ _cleanup_free_ char *buf = NULL; + const char *t; + size_t l; + bool b; + + t = timer_base_to_string(k->base); +- assert(endswith(t, "Sec")); + +- /* s/Sec/USec/ */ +- l = strlen(t); +- buf = new(char, l+2); +- if (!buf) +- return -ENOMEM; ++ if (endswith(t, "Sec")) { ++ ++ /* s/Sec/USec/ */ ++ l = strlen(t); ++ buf = new(char, l+2); ++ if (!buf) ++ return -ENOMEM; + +- memcpy(buf, t, l-3); +- memcpy(buf+l-3, "USec", 5); ++ memcpy(buf, t, l-3); ++ memcpy(buf+l-3, "USec", 5); ++ } else { ++ buf = strdup(t); ++ if (!buf) ++ return -ENOMEM; ++ } + + b = dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) && + dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &buf) && +@@ -92,7 +98,6 @@ static int bus_timer_append_timers(DBusMessageIter *i, const char *property, voi + dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &k->next_elapse) && + dbus_message_iter_close_container(&sub, &sub2); + +- free(buf); + if (!b) + return -ENOMEM; + } +-- +1.8.1 + diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD index 14a6f7910..8bae20a2b 100644 --- a/core/systemd/PKGBUILD +++ b/core/systemd/PKGBUILD @@ -3,8 +3,8 @@ pkgbase=systemd pkgname=('systemd' 'systemd-sysvcompat') -pkgver=196 -pkgrel=2 +pkgver=197 +pkgrel=4 arch=('i686' 'x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" license=('GPL2' 'LGPL2.1' 'MIT') @@ -13,11 +13,13 @@ makedepends=('acl' 'cryptsetup' 'dbus-core' 'docbook-xsl' 'gobject-introspection 'linux-api-headers' 'pam' 'python' 'quota-tools' 'xz') options=('!libtool') source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz" + '0001-dbus-fix-serialization-of-calendar-timers.patch' 'initcpio-hook-udev' 'initcpio-install-udev' 'initcpio-install-timestamp' 'use-split-usr-path.patch') -md5sums=('05ebd7f108e420e2b4e4810ea4b3c810' +md5sums=('56a860dceadfafe59f40141eb5223743' + '0341d680d5ab16bab3978bac96bf8797' 'e99e9189aa2f6084ac28b8ddf605aeb8' 'fb37e34ea006c79be1c54cbb0f803414' 'df69615503ad293c9ddf9d8b7755282d' @@ -29,7 +31,13 @@ build() { # hang onto this until we do the /{,s}bin merge patch -Np1 <"$srcdir/use-split-usr-path.patch" + # fix assertion failure when using calendar timers + # upstream 3761902e2e120849c283106fd4b78b6adec7367e + patch -Np1 <"$srcdir/0001-dbus-fix-serialization-of-calendar-timers.patch" + ./configure \ + PYTHON=python2 \ + PYTHON_CONFIG=python2-config \ --libexecdir=/usr/lib \ --localstatedir=/var \ --sysconfdir=/etc \ @@ -37,7 +45,11 @@ build() { --enable-gtk-doc \ --disable-audit \ --disable-ima \ - --with-distro=arch + --with-sysvinit-path= \ + --with-sysvrcnd-path= + + # can't use py3k yet with systemd-analyze -- the 'plot' verb will not work. + # https://pokersource.info/show_bug.cgi?id=50989 make } @@ -50,9 +62,9 @@ package_systemd() { pkgdesc="system and service manager" depends=('acl' 'bash' 'dbus-core' 'glib2' 'kbd' 'kmod' 'hwids' 'libcap' 'libgcrypt' 'pam' 'util-linux' 'xz') - provides=("libsystemd=$pkgver" "systemd-tools=$pkgver" "udev=$pkgver") - replaces=('libsystemd' 'systemd-tools' 'udev') - conflicts=('libsystemd' 'systemd-tools' 'udev') + provides=("libsystemd=$pkgver" 'nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver") + replaces=('libsystemd' 'nss-myhostname' 'systemd-tools' 'udev') + conflicts=('libsystemd' 'nss-myhostname' 'systemd-tools' 'udev') optdepends=('cryptsetup: required for encrypted block devices' 'libmicrohttpd: systemd-journal-gatewayd' 'quota-tools: kernel-level quota management' @@ -87,12 +99,6 @@ package_systemd() { done rm -rf "$pkgdir/etc/bash_completion.d" - # zsh completion isn't installed as part of 196 - # http://i.imgur.com/hMJgX.jpg - # TODO(dreisner): remove this for 197 - install -Dm644 "$pkgname-$pkgver/shell-completion/systemd-zsh-completion.zsh" \ - "$pkgdir/usr/share/zsh/site-functions/_systemd" - # don't write units to /etc by default -- we'll enable this on post_install # as a sane default rm "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1.service" @@ -101,10 +107,6 @@ package_systemd() { # get rid of RPM macros rm -r "$pkgdir/etc/rpm" - # can't use py3k yet with systemd-analyze -- the 'plot' verb will not work. - # https://pokersource.info/show_bug.cgi?id=50989 - sed -i '1s/python$/python2/' "$pkgdir/usr/bin/systemd-analyze" - # the path to udevadm is hardcoded in some places install -d "$pkgdir/sbin" ln -s ../usr/bin/udevadm "$pkgdir/sbin/udevadm" diff --git a/core/systemd/systemd.install b/core/systemd/systemd.install index 457c81cf2..53cd4b4af 100644 --- a/core/systemd/systemd.install +++ b/core/systemd/systemd.install @@ -24,14 +24,28 @@ post_common() { fi } +mask_net_naming() { + if [ ! -e etc/udev/rules.d/80-net-name-slot.rules ]; then + printf >etc/udev/rules.d/80-net-name-slot.rules '# %s\n' \ + "This file masks persistent renaming rules for network devices. If you" \ + "delete this file, /usr/lib/udev/rules.d/80-net-name-slot.rules may" \ + "rename network devices according to ID_NET_NAME_{ONBOARD,SLOT,PATH}" \ + "properties of your network devices, with priority in that order. See" \ + "the output of 'udevadm test-builtin net_id /sys/class/net/\$interface'" \ + "for details on what that new name might be." \ + "" \ + "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" + fi +} + post_install() { post_common # enable getty@tty1 by default, but don't track the file systemctl enable getty@.service - echo ":: Append 'init=/bin/systemd' to your kernel command line in your" - echo " bootloader to replace sysvinit with systemd" + echo ":: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your" + echo " bootloader to replace sysvinit with systemd, or install systemd-sysvcompat" } post_upgrade() { @@ -50,11 +64,6 @@ post_upgrade() { printf ' controlled with the Storage setting in /etc/systemd/journald.conf\n' fi - if [ "$(vercmp 196-1 "$2")" -eq 1 ]; then - printf '==> The legacy configuration options are no longer supported in rc.conf,\n' - printf ' convert your rc.conf to the new configuration formats.\n' - fi - # logind's protocol changed. kindly restart the daemon to avoid locking # out further logins. if [ "$(vercmp 195 "$2")" -eq 1 ]; then @@ -62,6 +71,17 @@ post_upgrade() { systemctl restart systemd-logind.service fi fi + + if [ "$(vercmp 196-1 "$2")" -eq 1 ]; then + printf '==> The legacy configuration options are no longer supported in rc.conf,\n' + printf ' convert your rc.conf to the new configuration formats.\n' + fi + + if [ "$(vercmp 197-1 "$2")" -eq 1 ]; then + mask_net_naming + printf '==> Persistent net naming rules have been shipped as disabled.\n' + printf ' See /etc/udev/rules.d/80-net-name-slot.rules for more detail\n' + fi } # vim:set ts=2 sw=2 et: -- cgit v1.2.3-54-g00ecf