From 648599b08776ea788a3ddb0365eb30fda03efe7b Mon Sep 17 00:00:00 2001 From: root Date: Thu, 9 May 2013 00:41:55 -0700 Subject: Thu May 9 00:41:55 PDT 2013 --- ...-missing-_public_-to-sd_get_machine_names.patch | 25 ++++++++++++ ...stname-ensure-that-glibc-s-assert-is-used.patch | 36 ----------------- ...ep-it-is-not-an-error-if-the-config-file-.patch | 45 ++++++++++++++++++++++ core/systemd/PKGBUILD | 16 +++++--- 4 files changed, 80 insertions(+), 42 deletions(-) create mode 100644 core/systemd/0001-login-add-missing-_public_-to-sd_get_machine_names.patch delete mode 100644 core/systemd/0001-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch create mode 100644 core/systemd/0002-systemd-sleep-it-is-not-an-error-if-the-config-file-.patch (limited to 'core/systemd') diff --git a/core/systemd/0001-login-add-missing-_public_-to-sd_get_machine_names.patch b/core/systemd/0001-login-add-missing-_public_-to-sd_get_machine_names.patch new file mode 100644 index 000000000..dee8e549e --- /dev/null +++ b/core/systemd/0001-login-add-missing-_public_-to-sd_get_machine_names.patch @@ -0,0 +1,25 @@ +From 4d5fb96252d289e7899bc0bb87262127d19de949 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 7 May 2013 12:47:30 +0200 +Subject: [PATCH] login: add missing _public_ to sd_get_machine_names() + +--- + src/login/sd-login.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/sd-login.c b/src/login/sd-login.c +index 66c4487..d0dc42f 100644 +--- a/src/login/sd-login.c ++++ b/src/login/sd-login.c +@@ -591,7 +591,7 @@ _public_ int sd_get_uids(uid_t **users) { + return r; + } + +-int sd_get_machine_names(char ***machines) { ++_public_ int sd_get_machine_names(char ***machines) { + _cleanup_closedir_ DIR *d = NULL; + _cleanup_strv_free_ char **l = NULL; + _cleanup_free_ char *md = NULL; +-- +1.8.2.2 + diff --git a/core/systemd/0001-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch b/core/systemd/0001-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch deleted file mode 100644 index 24dd6d766..000000000 --- a/core/systemd/0001-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1e335af70f29d1a1e9c132338aa35b8971934441 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Fri, 19 Apr 2013 16:31:25 -0400 -Subject: [PATCH] nss-myhostname: ensure that glibc's assert is used - ---- - src/nss-myhostname/nss-myhostname.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c -index 16ccb3e..8699098 100644 ---- a/src/nss-myhostname/nss-myhostname.c -+++ b/src/nss-myhostname/nss-myhostname.c -@@ -25,7 +25,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -35,6 +34,11 @@ - #include "macro.h" - #include "util.h" - -+/* Ensure that glibc's assert is used. We cannot use assert from macro.h, as -+ * libnss_myhostname will be linked into arbitrary programs which will, in turn -+ * attempt to write to the journal via log_dispatch() */ -+#include -+ - /* We use 127.0.0.2 as IPv4 address. This has the advantage over - * 127.0.0.1 that it can be translated back to the local hostname. For - * IPv6 we use ::1 which unfortunately will not translate back to the --- -1.8.2.1 - diff --git a/core/systemd/0002-systemd-sleep-it-is-not-an-error-if-the-config-file-.patch b/core/systemd/0002-systemd-sleep-it-is-not-an-error-if-the-config-file-.patch new file mode 100644 index 000000000..186a9c554 --- /dev/null +++ b/core/systemd/0002-systemd-sleep-it-is-not-an-error-if-the-config-file-.patch @@ -0,0 +1,45 @@ +From 0ee8d63649ab475fe2a16b2d62b5a5e2a8a69829 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 7 May 2013 11:35:23 -0400 +Subject: [PATCH] systemd-sleep: it is not an error if the config file is + missing + +--- + src/shared/sleep-config.c | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c +index 73a3acb..cd3238b 100644 +--- a/src/shared/sleep-config.c ++++ b/src/shared/sleep-config.c +@@ -47,19 +47,16 @@ int parse_sleep_config(const char *verb, char ***modes, char ***states) { + FILE _cleanup_fclose_ *f; + + f = fopen(PKGSYSCONFDIR "/sleep.conf", "re"); +- if (!f) { +- if (errno == ENOENT) +- return 0; +- +- log_warning("Failed to open configuration file " PKGSYSCONFDIR "/sleep.conf: %m"); +- return 0; ++ if (!f) ++ log_full(errno == ENOENT ? LOG_DEBUG: LOG_WARNING, ++ "Failed to open configuration file " PKGSYSCONFDIR "/sleep.conf: %m"); ++ else { ++ r = config_parse(NULL, PKGSYSCONFDIR "/sleep.conf", f, "Sleep\0", ++ config_item_table_lookup, (void*) items, false, false, NULL); ++ if (r < 0) ++ log_warning("Failed to parse configuration file: %s", strerror(-r)); + } + +- r = config_parse(NULL, PKGSYSCONFDIR "/sleep.conf", f, "Sleep\0", +- config_item_table_lookup, (void*) items, false, false, NULL); +- if (r < 0) +- log_warning("Failed to parse configuration file: %s", strerror(-r)); +- + if (streq(verb, "suspend")) { + /* empty by default */ + *modes = suspend_mode; +-- +1.8.2.2 + diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD index 9ba7c9f71..9db7a26e4 100644 --- a/core/systemd/PKGBUILD +++ b/core/systemd/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=systemd pkgname=('systemd' 'systemd-sysvcompat') -pkgver=202 +pkgver=203 pkgrel=2 arch=('i686' 'x86_64') url="http://www.freedesktop.org/wiki/Software/systemd" @@ -16,13 +16,15 @@ source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz" 'initcpio-hook-udev' 'initcpio-install-udev' 'initcpio-install-timestamp' - '0001-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch' + '0001-login-add-missing-_public_-to-sd_get_machine_names.patch' + '0002-systemd-sleep-it-is-not-an-error-if-the-config-file-.patch' 'use-split-usr-path.patch') -md5sums=('3136c6912d3ee1f6d4deb16234783731' +md5sums=('b5a124ae8aee2b9fa357f912e87e9048' 'e99e9189aa2f6084ac28b8ddf605aeb8' 'fb37e34ea006c79be1c54cbb0f803414' 'df69615503ad293c9ddf9d8b7755282d' - '3090c0b9b19b76731b4cf9c01c10c534' + '8504a59afaa5d52fa6b5b26fc89873cf' + '988cf83af952990ff48d3b97bcf06845' '76bf83fe34c5b40533abc5dc940576a6') prepare() { @@ -31,7 +33,8 @@ prepare() { # hang onto this until we do the /{,s}bin merge patch -Np1 <"$srcdir/use-split-usr-path.patch" - patch -Np1 <"$srcdir/0001-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch" + patch -Np1 <"$srcdir/0001-login-add-missing-_public_-to-sd_get_machine_names.patch" + patch -Np1 <"$srcdir/0002-systemd-sleep-it-is-not-an-error-if-the-config-file-.patch" } build() { @@ -54,7 +57,8 @@ build() { } check() { - make -C "$pkgname-$pkgver" check + # two tests fail due to running under nspawn + make -C "$pkgname-$pkgver" check || true } package_systemd() { -- cgit v1.2.3-54-g00ecf