From 0a9dd92e96d19c49603a53523870f1ab53cf4999 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: May 07 2013 00:20:50 +0000 Subject: new release --- diff --git a/0001-nspawn-create-empty-etc-resolv.conf-if-necessary.patch b/0001-nspawn-create-empty-etc-resolv.conf-if-necessary.patch deleted file mode 100644 index 6f9d99a..0000000 --- a/0001-nspawn-create-empty-etc-resolv.conf-if-necessary.patch +++ /dev/null @@ -1,58 +0,0 @@ -From f333fbb1efc2f32527f78cbdb003d59bae01aa07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Wed, 17 Apr 2013 14:13:09 -0400 -Subject: [PATCH] nspawn: create empty /etc/resolv.conf if necessary - -nspawn will overmount resolv.conf if it exists. Since e.g. -default install with yum doesn't create /etc/resolv.conf, -a container created with yum will not have network. This -seems undesirable, and since we overmount the file anyway, -let's create it too. - -Also, mounting a read-write /etc/resolv.conf in the container -is treated as a failure, since it makes it possible to -modify hosts /etc/resolv.conf from inside the container. ---- - src/nspawn/nspawn.c | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index f57c75f..5a43d5e 100644 ---- a/src/nspawn/nspawn.c -+++ b/src/nspawn/nspawn.c -@@ -492,7 +492,8 @@ static int setup_timezone(const char *dest) { - } - - static int setup_resolv_conf(const char *dest) { -- char *where; -+ char _cleanup_free_ *where = NULL; -+ _cleanup_close_ int fd = -1; - - assert(dest); - -@@ -504,12 +505,18 @@ static int setup_resolv_conf(const char *dest) { - if (!where) - return log_oom(); - -+ fd = open(where, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0644); -+ - /* We don't really care for the results of this really. If it - * fails, it fails, but meh... */ -- if (mount("/etc/resolv.conf", where, "bind", MS_BIND, NULL) >= 0) -- mount("/etc/resolv.conf", where, "bind", MS_BIND|MS_REMOUNT|MS_RDONLY, NULL); -- -- free(where); -+ if (mount("/etc/resolv.conf", where, "bind", MS_BIND, NULL) < 0) -+ log_warning("Failed to bind mount /etc/resolv.conf: %m"); -+ else -+ if (mount("/etc/resolv.conf", where, "bind", -+ MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) < 0) { -+ log_error("Failed to remount /etc/resolv.conf readonly: %m"); -+ return -errno; -+ } - - return 0; - } --- -1.8.2 - diff --git a/0002-systemd-python-wrap-sd_journal_add_conjunction.patch b/0002-systemd-python-wrap-sd_journal_add_conjunction.patch deleted file mode 100644 index 96ea821..0000000 --- a/0002-systemd-python-wrap-sd_journal_add_conjunction.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 7f876bc4281145e6c74e98de07c6648a5b51ed90 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Thu, 18 Apr 2013 19:37:26 -0400 -Subject: [PATCH] systemd-python: wrap sd_journal_add_conjunction - ---- - src/python-systemd/_reader.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c -index 05993b3..b836597 100644 ---- a/src/python-systemd/_reader.c -+++ b/src/python-systemd/_reader.c -@@ -567,7 +567,10 @@ static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds - - PyDoc_STRVAR(Reader_add_disjunction__doc__, - "add_disjunction() -> None\n\n" -- "Inserts a logical OR between matches added before and afterwards."); -+ "Inserts a logical OR between matches added since previous\n" -+ "add_disjunction() or add_conjunction() and the next\n" -+ "add_disjunction() or add_conjunction().\n\n" -+ "See man:sd_journal_add_disjunction(3) for explanation."); - static PyObject* Reader_add_disjunction(Reader *self, PyObject *args) - { - int r; -@@ -579,6 +582,23 @@ static PyObject* Reader_add_disjunction(Reader *self, PyObject *args) - } - - -+PyDoc_STRVAR(Reader_add_conjunction__doc__, -+ "add_conjunction() -> None\n\n" -+ "Inserts a logical AND between matches added since previous\n" -+ "add_disjunction() or add_conjunction() and the next\n" -+ "add_disjunction() or add_conjunction().\n\n" -+ "See man:sd_journal_add_disjunction(3) for explanation."); -+static PyObject* Reader_add_conjunction(Reader *self, PyObject *args) -+{ -+ int r; -+ r = sd_journal_add_conjunction(self->j); -+ set_error(r, NULL, NULL); -+ if (r < 0) -+ return NULL; -+ Py_RETURN_NONE; -+} -+ -+ - PyDoc_STRVAR(Reader_flush_matches__doc__, - "flush_matches() -> None\n\n" - "Clear all current match filters."); -@@ -980,6 +1000,7 @@ static PyMethodDef Reader_methods[] = { - {"_get_monotonic", (PyCFunction) Reader_get_monotonic, METH_NOARGS, Reader_get_monotonic__doc__}, - {"add_match", (PyCFunction) Reader_add_match, METH_VARARGS|METH_KEYWORDS, Reader_add_match__doc__}, - {"add_disjunction", (PyCFunction) Reader_add_disjunction, METH_NOARGS, Reader_add_disjunction__doc__}, -+ {"add_conjunction", (PyCFunction) Reader_add_conjunction, METH_NOARGS, Reader_add_conjunction__doc__}, - {"flush_matches", (PyCFunction) Reader_flush_matches, METH_NOARGS, Reader_flush_matches__doc__}, - {"seek_head", (PyCFunction) Reader_seek_head, METH_NOARGS, Reader_seek_head__doc__}, - {"seek_tail", (PyCFunction) Reader_seek_tail, METH_NOARGS, Reader_seek_tail__doc__}, --- -1.8.2 - diff --git a/0003-Update-NEWS.patch b/0003-Update-NEWS.patch deleted file mode 100644 index 5b8a85e..0000000 --- a/0003-Update-NEWS.patch +++ /dev/null @@ -1,30 +0,0 @@ -From cbeabcfbc5a5fa27385e5794780e8f034e090606 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Thu, 18 Apr 2013 19:59:12 -0400 -Subject: [PATCH] Update NEWS - ---- - NEWS | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/NEWS b/NEWS -index 2b46246..afaadf3 100644 ---- a/NEWS -+++ b/NEWS -@@ -53,6 +53,13 @@ CHANGES WITH 202: - found the tool will now automatically fall back to prompting - the user. - -+ * Python systemd.journal module was updated to wrap recently -+ added functions from libsystemd-journal. The interface was -+ changed to bring the low level interface in s.j._Reader -+ closer to the C API, and the high level interface in -+ s.j.Reader was updated to wrap and convert all data about -+ an entry. -+ - Contributions from: Anatol Pomozov, Auke Kok, Harald Hoyer, - Henrik Grindal Bakken, Josh Triplett, Kay Sievers, Lennart - Poettering, Lukas Nykryn, Mantas Mikulėnas Marius Vollmer, --- -1.8.2 - diff --git a/0004-Reintroduce-f_type-comparison-macro.patch b/0004-Reintroduce-f_type-comparison-macro.patch deleted file mode 100644 index 7741a67..0000000 --- a/0004-Reintroduce-f_type-comparison-macro.patch +++ /dev/null @@ -1,118 +0,0 @@ -From bdd29249a882e599e5e365536372d08dee398cd4 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 19 Apr 2013 13:44:56 +0200 -Subject: [PATCH] Reintroduce f_type comparison macro - -This reverts commit 4826f0b7b5c0aefa08b8cc7ef64d69027f84da2c. - -Because statfs.t_type can be int on some architecures, we have to cast -the const magic to the type, otherwise the compiler warns about -signed/unsigned comparison, because the magic can be 32 bit unsigned. - -statfs(2) man page is also wrong on some systems, because -f_type is not __SWORD_TYPE on some architecures. - -The following program: - -int main(int argc, char**argv) -{ - struct statfs s; - statfs(argv[1], &s); - - printf("sizeof(f_type) = %d\n", sizeof(s.f_type)); - printf("sizeof(__SWORD_TYPE) = %d\n", sizeof(__SWORD_TYPE)); - printf("sizeof(long) = %d\n", sizeof(long)); - printf("sizeof(int) = %d\n", sizeof(int)); - if (sizeof(s.f_type) == sizeof(int)) { - printf("f_type = 0x%x\n", s.f_type); - } else { - printf("f_type = 0x%lx\n", s.f_type); - } - return 0; -} - -executed on s390x gives for a btrfs: - -sizeof(f_type) = 4 -sizeof(__SWORD_TYPE) = 8 -sizeof(long) = 8 -sizeof(int) = 4 -f_type = 0x9123683e ---- - src/journal/sd-journal.c | 10 +++++----- - src/readahead/readahead-collect.c | 2 +- - src/shared/macro.h | 7 +++++++ - src/shared/util.c | 5 +++-- - 4 files changed, 16 insertions(+), 8 deletions(-) - -diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c -index e021d98..15239b5 100644 ---- a/src/journal/sd-journal.c -+++ b/src/journal/sd-journal.c -@@ -1251,11 +1251,11 @@ static void check_network(sd_journal *j, int fd) { - return; - - j->on_network = -- sfs.f_type == (__SWORD_TYPE) CIFS_MAGIC_NUMBER || -- sfs.f_type == (__SWORD_TYPE) CODA_SUPER_MAGIC || -- sfs.f_type == (__SWORD_TYPE) NCP_SUPER_MAGIC || -- sfs.f_type == (__SWORD_TYPE) NFS_SUPER_MAGIC || -- sfs.f_type == (__SWORD_TYPE) SMB_SUPER_MAGIC; -+ F_TYPE_CMP(sfs.f_type, CIFS_MAGIC_NUMBER) || -+ F_TYPE_CMP(sfs.f_type, CODA_SUPER_MAGIC) || -+ F_TYPE_CMP(sfs.f_type, NCP_SUPER_MAGIC) || -+ F_TYPE_CMP(sfs.f_type, NFS_SUPER_MAGIC) || -+ F_TYPE_CMP(sfs.f_type, SMB_SUPER_MAGIC); - } - - static int add_file(sd_journal *j, const char *prefix, const char *filename) { -diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c -index 02ecbe5..75ec5b7 100644 ---- a/src/readahead/readahead-collect.c -+++ b/src/readahead/readahead-collect.c -@@ -505,7 +505,7 @@ done: - on_ssd = fs_on_ssd(root) > 0; - log_debug("On SSD: %s", yes_no(on_ssd)); - -- on_btrfs = statfs(root, &sfs) >= 0 && sfs.f_type == (__SWORD_TYPE) BTRFS_SUPER_MAGIC; -+ on_btrfs = statfs(root, &sfs) >= 0 && F_TYPE_CMP(sfs.f_type, BTRFS_SUPER_MAGIC); - log_debug("On btrfs: %s", yes_no(on_btrfs)); - - if (asprintf(&pack_fn_new, "%s/.readahead.new", root) < 0) { -diff --git a/src/shared/macro.h b/src/shared/macro.h -index 9bf81dc..ac61b49 100644 ---- a/src/shared/macro.h -+++ b/src/shared/macro.h -@@ -264,6 +264,13 @@ do { \ - } \ - } while(false) - -+ /* Because statfs.t_type can be int on some architecures, we have to cast -+ * the const magic to the type, otherwise the compiler warns about -+ * signed/unsigned comparison, because the magic can be 32 bit unsigned. -+ */ -+#define F_TYPE_CMP(a, b) (a == (typeof(a)) b) -+ -+ - /* Returns the number of chars needed to format variables of the - * specified type as a decimal string. Adds in extra space for a - * negative '-' prefix. */ -diff --git a/src/shared/util.c b/src/shared/util.c -index 5d03272..1fc6c5a 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -2779,8 +2779,9 @@ int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct - - static int is_temporary_fs(struct statfs *s) { - assert(s); -- return s->f_type == (__SWORD_TYPE) TMPFS_MAGIC || -- s->f_type == (__SWORD_TYPE) RAMFS_MAGIC; -+ return -+ F_TYPE_CMP(s->f_type, TMPFS_MAGIC) || -+ F_TYPE_CMP(s->f_type, RAMFS_MAGIC); - } - - int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev) { --- -1.8.2 - diff --git a/0006-crypt-setup-generator-correctly-check-return-of-strd.patch b/0006-crypt-setup-generator-correctly-check-return-of-strd.patch deleted file mode 100644 index 4d5fa76..0000000 --- a/0006-crypt-setup-generator-correctly-check-return-of-strd.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 5a8e21785907df7466fef5e1cb54ce3bf99e5362 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 19 Apr 2013 13:58:57 +0200 -Subject: [PATCH] crypt-setup-generator: correctly check return of strdup - ---- - src/cryptsetup/cryptsetup-generator.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index ac0ed58..b31329d 100644 ---- a/src/cryptsetup/cryptsetup-generator.c -+++ b/src/cryptsetup/cryptsetup-generator.c -@@ -302,7 +302,7 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cm - - } else if (startswith(word, "luks.key=")) { - *arg_proc_cmdline_keyfile = strdup(word + 9); -- if (! arg_proc_cmdline_keyfile) -+ if (!*arg_proc_cmdline_keyfile) - return log_oom(); - - } else if (startswith(word, "rd.luks.key=")) { -@@ -311,7 +311,7 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cm - if (*arg_proc_cmdline_keyfile) - free(*arg_proc_cmdline_keyfile); - *arg_proc_cmdline_keyfile = strdup(word + 12); -- if (!arg_proc_cmdline_keyfile) -+ if (!*arg_proc_cmdline_keyfile) - return log_oom(); - } - --- -1.8.2.1 - diff --git a/0007-logind-dbus-initialize-result-variable.patch b/0007-logind-dbus-initialize-result-variable.patch deleted file mode 100644 index b9096d8..0000000 --- a/0007-logind-dbus-initialize-result-variable.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7f6437976d31fa772ccef9abedd152d6f5372303 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 19 Apr 2013 13:58:58 +0200 -Subject: [PATCH] logind-dbus: initialize result variable - ---- - src/login/logind-dbus.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 4176902..05cc1fd 100644 ---- a/src/login/logind-dbus.c -+++ b/src/login/logind-dbus.c -@@ -1137,7 +1137,7 @@ static int bus_manager_can_shutdown_or_sleep( - DBusMessage **_reply) { - - bool multiple_sessions, challenge, blocked, b; -- const char *result; -+ const char *result = NULL; - _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; - int r; - unsigned long ul; --- -1.8.2.1 - diff --git a/0008-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch b/0008-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch deleted file mode 100644 index 24dd6d7..0000000 --- a/0008-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/0009-build-sys-prevent-library-underlinking.patch b/0009-build-sys-prevent-library-underlinking.patch deleted file mode 100644 index 924e443..0000000 --- a/0009-build-sys-prevent-library-underlinking.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9d2d0fe1e3f28a639c26b62391f79cfd1450d91b Mon Sep 17 00:00:00 2001 -From: Evangelos Foutras -Date: Sat, 20 Apr 2013 00:17:08 +0300 -Subject: [PATCH] build-sys: prevent library underlinking - -Underlinking can cause subtle bugs like the recent issue with -libnss_myhostname (which was fixed in commit 1e335af7). ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure.ac b/configure.ac -index 5173783..ce02ff6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -144,6 +144,7 @@ AC_SUBST([OUR_CPPFLAGS], $with_cppflags) - - CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ - -Wl,--as-needed \ -+ -Wl,--no-undefined \ - -Wl,--gc-sections \ - -Wl,-z,relro \ - -Wl,-z,now]) --- -1.8.2.1 - diff --git a/sources b/sources index d637d52..1efff3d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3136c6912d3ee1f6d4deb16234783731 systemd-202.tar.xz +b5a124ae8aee2b9fa357f912e87e9048 systemd-203.tar.xz diff --git a/systemd.spec b/systemd.spec index 808b1e7..48632be 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,8 +12,8 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 202 -Release: 3%{?gitcommit:.git%{gitcommit}}%{?dist} +Version: 203 +Release: 1%{?gitcommit:.git%{gitcommit}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -34,17 +34,8 @@ Source4: listen.conf # Prevent accidental removal of the systemd package Source6: yum-protect-systemd.conf -Patch1: 0001-nspawn-create-empty-etc-resolv.conf-if-necessary.patch -Patch2: 0002-systemd-python-wrap-sd_journal_add_conjunction.patch -Patch3: 0003-Update-NEWS.patch -Patch4: 0004-Reintroduce-f_type-comparison-macro.patch -Patch6: 0006-crypt-setup-generator-correctly-check-return-of-strd.patch -Patch7: 0007-logind-dbus-initialize-result-variable.patch -Patch8: 0008-nss-myhostname-ensure-that-glibc-s-assert-is-used.patch -Patch9: 0009-build-sys-prevent-library-underlinking.patch - # kernel-install patch for grubby, drop if grubby is obsolete -Patch1000: kernel-install-grubby.patch +# Patch1000: kernel-install-grubby.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -646,6 +637,8 @@ fi %{_prefix}/lib/systemd/system-preset/90-default.preset %{_prefix}/lib/systemd/system-preset/90-display-manager.preset %{_prefix}/lib/systemd/catalog/systemd.catalog +%{_prefix}/lib/kernel/install.d/50-depmod.install +%{_prefix}/lib/kernel/install.d/90-loaderentry.install %{_sbindir}/init %{_sbindir}/reboot %{_sbindir}/halt @@ -685,6 +678,8 @@ fi %{_datadir}/bash-completion/completions/systemd-coredumpctl %{_datadir}/bash-completion/completions/timedatectl %{_datadir}/bash-completion/completions/udevadm +%{_datadir}/bash-completion/completions/systemd-analyze + # Make sure we don't remove runlevel targets from F14 alpha installs, # but make sure we don't create then anew. @@ -758,6 +753,9 @@ fi %{_libdir}/pkgconfig/gudev-1.0* %changelog +* Tue May 7 2013 Lennart Poettering - 203-1 +- New upstream release + * Wed Apr 24 2013 Harald Hoyer 202-3 - fix ENOENT for getaddrinfo Resolves: rhbz#954012 rhbz#956035