From 9fc3254595072c355fa6d5395d6e71e3785ee09348721314ea39f54c1b61e6ed Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 30 Jun 2014 19:43:27 +0000 Subject: [PATCH] Accepting request 238853 from Base:System - Update of patch 0001-detect-s390-virt.patch (bnc#880438) - Shut up stupid check scripts crying for not mentioned systemd-mini-rpmlintrc - Add upstream patchs 0001-core-use-correct-format-string-for-UIDs.patch 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch - Add upstream patch 0001-units-order-network-online.target-after-network.targ.patch to make sure that etwork-online.target follows network.target - rules: re-enable dev_id conditionally in persistent rules (bnc#884403 and bnc#882714). Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch - Add upstream patches 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch 0005-man-fix-path-in-crypttab-5.patch - Add upstream patch 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch it fixes udevadm settle exit code which may had roken dracut scripts (bnc#884271 comment#18) - Temporary disable patch 1022 (bnc#884271 and bnc#882714). OBS-URL: https://build.opensuse.org/request/show/238853 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=190 --- ...ibc-s-xattr-support-instead-of-requi.patch | 215 +++ 0001-core-fix-invalid-free-in-killall.patch | 32 + ...network-should-be-equivalent-to-netw.patch | 51 + ...e-use-correct-format-string-for-UIDs.patch | 20 + 0001-detect-s390-virt.patch | 35 + 0001-hwdb-fix-case-sensitive-match.patch | 25 + ...nt-restore-correct-timeout-behaviour.patch | 37 + 0001-umount-modernizations.patch | 119 ++ ...ork-online.target-after-network.targ.patch | 20 + ...sctl.service.in-run-after-load-modul.patch | 29 + ...py-character-maps-not-just-fonts-fro.patch | 56 + ...irt-rework-container-detection-logic.patch | 159 ++ ...sd_bus_try_close-in-exit-on-idle-ser.patch | 59 + ...nvironment-fields-passed-in-for-tran.patch | 27 + ...-fix-cycle-break-attempts-outside-tr.patch | 42 + ...ice-name-in-the-message-about-missin.patch | 26 + ...etting-up-an-inaccessible-mount-poin.patch | 122 ++ ...g-caps-so-that-GetAddresses-can-work.patch | 18 + ...-put-the-cached-result-of-use_smack-.patch | 32 + 0003-core-allow-transient-mount-units.patch | 115 ++ ...fsck-implementation-linked-to-bin-tr.patch | 98 ++ ...l-fix-invalid-free-in-unit_file_mask.patch | 30 + ...emd-tmpfiles-clean.service-after-tim.patch | 26 + ...de-mixed-for-systemd-nspawn-.service.patch | 26 + ...-add-unit-dependency-on-dev-null-dev.patch | 53 + ...rator-properly-escape-instance-names.patch | 39 + ...d-detect-virt-only-discover-Xen-domU.patch | 79 + ...e-should-not-allow-files-ending-with.patch | 28 + ...ght-Do-not-clamp-brightness-for-LEDs.patch | 60 + 0005-man-fix-path-in-crypttab-5.patch | 26 + 0005-po-add-Greek-translation.patch | 436 +++++ ...base-of-Bluetooth-company-identifier.patch | 82 + ...-the-kernel-s-quiet-cmdline-argument.patch | 29 + ...-agent-Do-tell-what-directory-we-fai.patch | 26 + ...d-add-Plantronics-.Audio-mute-button.patch | 32 + 0007-po-add-German-translation.patch | 448 +++++ ...Reset-signal-mask-on-re-exec-to-init.patch | 37 +- ...an-up-signal-reset-logic-when-reexec.patch | 50 + ...t-fuse.sshfs-as-a-network-filesystem.patch | 25 + ...d-pthread-flag-for-libsystemd-shared.patch | 28 + ...-avoid-misleading-error-message-when.patch | 42 + 1021-udev-re-add-persistent-net-rules.patch | 532 ++++++ ...um-API-and-all-assumptions-about-seq.patch | 1445 +++++++++++++++++ ...board-do-tell-on-which-device-EVIOCS.patch | 31 + ...ev-always-close-lock-file-descriptor.patch | 41 + ...ice-mapper-from-block-device-ownersh.patch | 39 + 1026-udevd-inotify-modernizations.patch | 85 + ...change-events-for-partitions-when-to.patch | 84 + 1028-udev-link-config-fix-mem-leak.patch | 34 + ...first-re-reading-the-partition-table.patch | 94 ++ ...guard-REREADP-logic-with-open-O_ECXL.patch | 23 + ...re-we-always-get-change-for-the-disk.patch | 98 ++ ...DPT-by-exclusive-lock-instead-of-O_E.patch | 29 + ...lude-device-mapper-from-block-device.patch | 39 + ...eturn-value-from-udev_enumerate_scan.patch | 26 + ...-Ignore-devices-with-SYSTEMD_READY-0.patch | 32 + ...-usage-of-dev_id-in-persistent-rules.patch | 14 + ...dev-exclude-cd-dvd-from-block-device.patch | 14 + ...x-invalid-free-in-enable_name_policy.patch | 30 + ...le-fixed-return-code-for-empty-queue.patch | 34 + ...id-conditionally-in-persistent-rules.patch | 16 + apply-ACL-for-nvidia-uvm-device-node.patch | 26 + ...etup-after-md-dmraid-lvm-are-started.patch | 45 - ...e-started-before-local-fs-pre-target.patch | 17 - ...assword-wall-starts-after-getty-tty1.patch | 11 +- ...are-applied-after-modules-are-loaded.patch | 19 - getty-generator-with-serial-3270-tty.patch | 34 - insserv-generator.patch | 20 +- keep-crypt-password-prompt.patch | 2 +- systemd-detect-xendom.patch | 35 - systemd-mini.changes | 313 ++++ systemd-mini.spec | 441 ++++- systemd.changes | 313 ++++ systemd.spec | 441 ++++- ...s-do-not-clean-for-mandb-index-files.patch | 22 + 75 files changed, 7149 insertions(+), 269 deletions(-) create mode 100644 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch create mode 100644 0001-core-fix-invalid-free-in-killall.patch create mode 100644 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch create mode 100644 0001-core-use-correct-format-string-for-UIDs.patch create mode 100644 0001-detect-s390-virt.patch create mode 100644 0001-hwdb-fix-case-sensitive-match.patch create mode 100644 0001-sd-event-restore-correct-timeout-behaviour.patch create mode 100644 0001-umount-modernizations.patch create mode 100644 0001-units-order-network-online.target-after-network.targ.patch create mode 100644 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch create mode 100644 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch create mode 100644 0001-virt-rework-container-detection-logic.patch create mode 100644 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch create mode 100644 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch create mode 100644 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch create mode 100644 0002-fsck-include-device-name-in-the-message-about-missin.patch create mode 100644 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch create mode 100644 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch create mode 100644 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch create mode 100644 0003-core-allow-transient-mount-units.patch create mode 100644 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch create mode 100644 0003-install-fix-invalid-free-in-unit_file_mask.patch create mode 100644 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch create mode 100644 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch create mode 100644 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch create mode 100644 0004-getty-generator-properly-escape-instance-names.patch create mode 100644 0004-systemd-detect-virt-only-discover-Xen-domU.patch create mode 100644 0004-util-ignore_file-should-not-allow-files-ending-with.patch create mode 100644 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch create mode 100644 0005-man-fix-path-in-crypttab-5.patch create mode 100644 0005-po-add-Greek-translation.patch create mode 100644 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch create mode 100644 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch create mode 100644 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch create mode 100644 0007-keyboard-add-Plantronics-.Audio-mute-button.patch create mode 100644 0007-po-add-German-translation.patch rename 0001-systemd-empty-sigmask-on-reexec.patch => 0008-Reset-signal-mask-on-re-exec-to-init.patch (53%) create mode 100644 0009-core-clean-up-signal-reset-logic-when-reexec.patch create mode 100644 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch create mode 100644 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch create mode 100644 0012-core-transaction-avoid-misleading-error-message-when.patch create mode 100644 1021-udev-re-add-persistent-net-rules.patch create mode 100644 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch create mode 100644 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch create mode 100644 1024-udev-always-close-lock-file-descriptor.patch create mode 100644 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch create mode 100644 1026-udevd-inotify-modernizations.patch create mode 100644 1027-udev-synthesize-change-events-for-partitions-when-to.patch create mode 100644 1028-udev-link-config-fix-mem-leak.patch create mode 100644 1029-udev-try-first-re-reading-the-partition-table.patch create mode 100644 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch create mode 100644 1031-udev-make-sure-we-always-get-change-for-the-disk.patch create mode 100644 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch create mode 100644 1033-udev-really-exclude-device-mapper-from-block-device.patch create mode 100644 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch create mode 100644 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch create mode 100644 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch create mode 100644 1037-udev-exclude-cd-dvd-from-block-device.patch create mode 100644 1038-udev-fix-invalid-free-in-enable_name_policy.patch create mode 100644 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch create mode 100644 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch create mode 100644 apply-ACL-for-nvidia-uvm-device-node.patch delete mode 100644 delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch delete mode 100644 ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch delete mode 100644 ensure-sysctl-are-applied-after-modules-are-loaded.patch delete mode 100644 getty-generator-with-serial-3270-tty.patch delete mode 100644 systemd-detect-xendom.patch create mode 100644 tmpfiles-do-not-clean-for-mandb-index-files.patch diff --git a/0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch b/0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch new file mode 100644 index 00000000..f8632b99 --- /dev/null +++ b/0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch @@ -0,0 +1,215 @@ +Based on d2edfae0f9bdbecf6a8518e2a5bcf06f470e0d9e Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 28 May 2014 17:36:40 +0800 +Subject: [PATCH] build-sys: use glibc's xattr support instead of requiring + libattr + +--- + configure.ac | 53 ++----------------------------------------- + src/core/mount-setup.c | 2 - + src/core/socket.c | 4 --- + src/journal/journal-file.c | 7 ----- + src/journal/journal-vacuum.c | 10 -------- + src/shared/label.c | 2 - + src/shared/smack-util.c | 4 --- + 7 files changed, 7 insertions(+), 75 deletions(-) + +--- configure.ac ++++ configure.ac 2014-06-03 00:00:00.000000000 +0000 +@@ -526,44 +526,6 @@ AC_SUBST(ACL_LIBS) + AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno]) + + # ------------------------------------------------------------------------------ +-AC_ARG_ENABLE([xattr], +- AS_HELP_STRING([--disable-xattr],[Disable optional XATTR support]), +- [case "${enableval}" in +- yes) have_xattr=yes ;; +- no) have_xattr=no ;; +- *) AC_MSG_ERROR(bad value ${enableval} for --disable-xattr) ;; +- esac], +- [have_xattr=auto]) +- +-if test "x${have_xattr}" != xno ; then +- AC_CHECK_HEADERS( +- [attr/xattr.h], +- [have_xattr=yes], +- [if test "x$have_xattr" = xyes ; then +- AC_MSG_ERROR([*** XATTR headers not found.]) +- fi]) +- +- AC_CHECK_LIB( +- [attr], +- [fsetxattr], +- [have_xattr=yes], +- [if test "x$have_xattr" = xyes ; then +- AC_MSG_ERROR([*** libattr not found.]) +- fi]) +- +- if test "x$have_xattr" = xyes ; then +- XATTR_LIBS="-lattr" +- AC_DEFINE(HAVE_XATTR, 1, [XATTR available]) +- else +- have_xattr=no +- fi +-else +- XATTR_LIBS= +-fi +-AC_SUBST(XATTR_LIBS) +-AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno]) +- +-# ------------------------------------------------------------------------------ + AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]), + [case "${enableval}" in + yes) have_smack=yes ;; +@@ -572,17 +534,9 @@ AC_ARG_ENABLE([smack], AS_HELP_STRING([- + esac], + [have_smack=auto]) + +-if test "x${have_xattr}" = xno; then +- if test "x${have_smack}" = xyes; then +- AC_MSG_ERROR(SMACK requires xattr support) +- else +- have_smack=no +- fi +-else +- if test "x${have_smack}" = xauto; then +- M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" +- have_smack=yes +- fi ++if test "x${have_smack}" = xauto; then ++ M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" ++ have_smack=yes + fi + + AC_ARG_WITH(smack-run-label, +@@ -1131,7 +1085,6 @@ AC_MSG_RESULT([ + SMACK: ${have_smack} + XZ: ${have_xz} + ACL: ${have_acl} +- XATTR: ${have_xattr} + GCRYPT: ${have_gcrypt} + QRENCODE: ${have_qrencode} + MICROHTTPD: ${have_microhttpd} +--- src/core/mount-setup.c ++++ src/core/mount-setup.c 2014-06-03 00:00:00.000000000 +0000 +@@ -93,10 +93,8 @@ static const MountPoint mount_table[] = + NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, + NULL, MNT_IN_CONTAINER }, +-#ifdef HAVE_XATTR + { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_IN_CONTAINER }, +-#endif + { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_IN_CONTAINER }, + { "pstore", "/sys/fs/pstore", "pstore", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, +--- src/core/socket.c ++++ src/core/socket.c 2014-06-03 00:00:00.000000000 +0000 +@@ -29,9 +29,7 @@ + #include + #include + #include +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "sd-event.h" + #include "log.h" +--- src/journal/journal-file.c ++++ src/journal/journal-file.c 2014-06-03 00:00:00.000000000 +0000 +@@ -26,10 +26,7 @@ + #include + #include + #include +- +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "journal-def.h" + #include "journal-file.h" +@@ -2515,7 +2512,6 @@ int journal_file_open( + } + + if (f->last_stat.st_size == 0 && f->writable) { +-#ifdef HAVE_XATTR + uint64_t crtime; + + /* Let's attach the creation time to the journal file, +@@ -2530,7 +2526,6 @@ int journal_file_open( + + crtime = htole64((uint64_t) now(CLOCK_REALTIME)); + fsetxattr(f->fd, "user.crtime_usec", &crtime, sizeof(crtime), XATTR_CREATE); +-#endif + + #ifdef HAVE_GCRYPT + /* Try to load the FSPRG state, and if we can't, then +--- src/journal/journal-vacuum.c ++++ src/journal/journal-vacuum.c 2014-06-03 00:00:00.000000000 +0000 +@@ -24,10 +24,7 @@ + #include + #include + #include +- +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "journal-def.h" + #include "journal-file.h" +@@ -79,11 +76,8 @@ static void patch_realtime( + unsigned long long *realtime) { + + usec_t x; +- +-#ifdef HAVE_XATTR + uint64_t crtime; + _cleanup_free_ const char *path = NULL; +-#endif + + /* The timestamp was determined by the file name, but let's + * see if the file might actually be older than the file name +@@ -106,7 +100,6 @@ static void patch_realtime( + if (x > 0 && x != (usec_t) -1 && x < *realtime) + *realtime = x; + +-#ifdef HAVE_XATTR + /* Let's read the original creation time, if possible. Ideally + * we'd just query the creation time the FS might provide, but + * unfortunately there's currently no sane API to query +@@ -125,7 +118,6 @@ static void patch_realtime( + if (crtime > 0 && crtime != (uint64_t) -1 && crtime < *realtime) + *realtime = crtime; + } +-#endif + } + + static int journal_file_empty(int dir_fd, const char *name) { +--- src/shared/label.c ++++ src/shared/label.c 2014-06-03 00:00:00.000000000 +0000 +@@ -27,9 +27,7 @@ + #include + #include + #include +-#ifdef HAVE_XATTR + #include +-#endif + #ifdef HAVE_SELINUX + #include + #include +--- src/shared/smack-util.c ++++ src/shared/smack-util.c 2014-06-03 00:00:00.000000000 +0000 +@@ -23,9 +23,7 @@ + + #include + #include +-#ifdef HAVE_XATTR +-#include +-#endif ++#include + + #include "smack-util.h" + diff --git a/0001-core-fix-invalid-free-in-killall.patch b/0001-core-fix-invalid-free-in-killall.patch new file mode 100644 index 00000000..23d527e8 --- /dev/null +++ b/0001-core-fix-invalid-free-in-killall.patch @@ -0,0 +1,32 @@ +From 3e09eb5c83e56bc0184bd9d9c44f76047464f77c Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 13 Jun 2014 18:48:19 +0200 +Subject: [PATCH] core: fix invalid free() in killall() + +static int killall(....) in ./src/core/killall.c tries to get "s" +initialized by calling get_process_comm(...) which calls +read_one_line_file(...) which if it fails will mean it is left +uninitialized. +It is then used in argument to strna(s) call where it is +dereferenced(!), in addition to nothing else initializing it before +the scope it is in finishes. +--- + src/core/killall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/killall.c src/core/killall.c +index 57ed41c..eab48f7 100644 +--- src/core/killall.c ++++ src/core/killall.c +@@ -168,7 +168,7 @@ static int killall(int sig, Set *pids, bool send_sighup) { + continue; + + if (sig == SIGKILL) { +- _cleanup_free_ char *s; ++ _cleanup_free_ char *s = NULL; + + get_process_comm(pid, &s); + log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s)); +-- +1.7.9.2 + diff --git a/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch b/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch new file mode 100644 index 00000000..06371697 --- /dev/null +++ b/0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch @@ -0,0 +1,51 @@ +From 0404c609f399b2092a3de52eef9d75b0dc12e94c Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Mon, 12 May 2014 21:26:54 +0200 +Subject: [PATCH] core: sysvcompat - $network should be equivalent to + network-online, rather than network target +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Most likely the facility needed is actual connectivity, rather than whether or not the +network managment daemon is running. + +We also need to explicitly pull in the network-online.target, as it is not active by +default. + +This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default +as part of network-online.target, and only delay boot when some service actively pulls it in. + +See: + +Cc: Pavel Šimerda +Cc: Michal Sekletar +--- + TODO | 4 ---- + src/core/service.c | 8 ++++++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +Modified by Andrey Borzenkov for openSUSE. +Index: systemd-210/src/core/service.c +=================================================================== +--- systemd-210.orig/src/core/service.c ++++ systemd-210/src/core/service.c +@@ -404,7 +404,7 @@ static int sysv_translate_facility(const + static const char * const table[] = { + /* LSB defined facilities */ + "local_fs", NULL, +- "network", SPECIAL_NETWORK_TARGET, ++ "network", SPECIAL_NETWORK_ONLINE_TARGET, + "named", SPECIAL_NSS_LOOKUP_TARGET, + "portmap", SPECIAL_RPCBIND_TARGET, + "remote_fs", SPECIAL_REMOTE_FS_TARGET, +@@ -881,6 +881,9 @@ static int service_load_sysv_path(Servic + if (r == 0) + continue; + ++ if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET) && d == UNIT_AFTER && e == _UNIT_DEPENDENCY_INVALID) ++ e = UNIT_WANTS; ++ + if (e != _UNIT_DEPENDENCY_INVALID) + r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true); + else diff --git a/0001-core-use-correct-format-string-for-UIDs.patch b/0001-core-use-correct-format-string-for-UIDs.patch new file mode 100644 index 00000000..f0906df0 --- /dev/null +++ b/0001-core-use-correct-format-string-for-UIDs.patch @@ -0,0 +1,20 @@ +Based on d6239dc4b0cf55a953d6c40890859b85d504ef19 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20Bartoszkiewicz?= +Date: Wed, 25 Jun 2014 14:54:48 +0200 +Subject: [PATCH] core: use correct format string for UIDs + +--- + src/core/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- src/core/main.c ++++ src/core/main.c 2014-06-26 09:29:28.182235325 +0000 +@@ -1526,7 +1526,7 @@ int main(int argc, char *argv[]) { + + } else { + _cleanup_free_ char *t = uid_to_name(getuid()); +- log_debug(PACKAGE_STRING " running in user mode for user "PID_FMT"/%s. (" SYSTEMD_FEATURES ")", ++ log_debug(PACKAGE_STRING " running in user mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")", + getuid(), t); + } + diff --git a/0001-detect-s390-virt.patch b/0001-detect-s390-virt.patch new file mode 100644 index 00000000..3a437118 --- /dev/null +++ b/0001-detect-s390-virt.patch @@ -0,0 +1,35 @@ +bnc#880438 - systemd-detect-virt doesn't work on System z + +--- systemd-210/src/shared/virt.c ++++ systemd-210/src/shared/virt.c 2014-06-26 07:55:30.081608729 +0000 +@@ -196,6 +196,30 @@ + } else + return r; + ++#if defined(__s390x__) ++ /* First layer virtualization (PR/SM) is always present on s390x */ ++ _id = "PR/SM"; ++ r = 1; ++ ++ /* Check for second layer virtualization */ ++ _cleanup_fclose_ FILE *f = NULL; ++ char line[LINE_MAX]; ++ f = fopen("/proc/sysinfo", "re"); ++ if (f) { ++ FOREACH_LINE(line, f, return -errno) { ++ if (startswith(line, "VM00 Control Program:")) { ++ if (strstr(line,"z/VM")) ++ _id = "z/VM"; ++ else if (strstr(line,"KVM/Linux")) ++ _id = "KVM"; ++ break; ++ } ++ } ++ } ++ ++ goto finish; ++#endif ++ + /* this will set _id to "other" and return 0 for unknown hypervisors */ + r = detect_vm_cpuid(&_id); + if (r != 0) diff --git a/0001-hwdb-fix-case-sensitive-match.patch b/0001-hwdb-fix-case-sensitive-match.patch new file mode 100644 index 00000000..64642714 --- /dev/null +++ b/0001-hwdb-fix-case-sensitive-match.patch @@ -0,0 +1,25 @@ +From 4c02dd7153f970244950b5e00f7bdfea8d2ff0be Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 17:55:14 +0200 +Subject: [PATCH] hwdb: fix case-sensitive match + +--- + hwdb/60-keyboard.hwdb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb +index d053766..c7ff4e4 100644 +--- hwdb/60-keyboard.hwdb ++++ hwdb/60-keyboard.hwdb +@@ -870,7 +870,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr* + ########################################################### + + # Plantronics .Audio 626 DSP +-keyboard:usb:v047fpC006* ++keyboard:usb:v047FpC006* + KEYBOARD_KEY_b002f=f20 # Microphone mute button; should be micmute + + ########################################################### +-- +1.7.9.2 + diff --git a/0001-sd-event-restore-correct-timeout-behaviour.patch b/0001-sd-event-restore-correct-timeout-behaviour.patch new file mode 100644 index 00000000..8787f3f3 --- /dev/null +++ b/0001-sd-event-restore-correct-timeout-behaviour.patch @@ -0,0 +1,37 @@ +Based on eec6022cf039e62233139000b9e95db943959e48 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 13:43:30 +0200 +Subject: [PATCH] sd-event: restore correct timeout behaviour + +--- + src/libsystemd/sd-event/sd-event.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- src/libsystemd/sd-event/sd-event.c ++++ src/libsystemd/sd-event/sd-event.c 2014-06-06 10:26:51.422235695 +0000 +@@ -2047,6 +2047,7 @@ _public_ int sd_event_run(sd_event *e, u + unsigned ev_queue_max; + sd_event_source *p; + int r, i, m; ++ bool timedout; + + assert_return(e, -EINVAL); + assert_return(!event_pid_changed(e), -ECHILD); +@@ -2084,6 +2085,8 @@ _public_ int sd_event_run(sd_event *e, u + goto finish; + } + ++ timedout = m == 0; ++ + dual_timestamp_get(&e->timestamp); + + for (i = 0; i < m; i++) { +@@ -2123,7 +2126,7 @@ _public_ int sd_event_run(sd_event *e, u + + p = event_next_pending(e); + if (!p) { +- r = 1; ++ r = !timedout; + goto finish; + } + diff --git a/0001-umount-modernizations.patch b/0001-umount-modernizations.patch new file mode 100644 index 00000000..1397d155 --- /dev/null +++ b/0001-umount-modernizations.patch @@ -0,0 +1,119 @@ +From c3544e8d2c2d870a2aff0944aff4ab7824b9ae6b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 21:35:15 +0200 +Subject: [PATCH] umount: modernizations + +--- + src/core/umount.c | 65 ++++++++++++++++++++++------------------------------- + 1 file changed, 27 insertions(+), 38 deletions(-) + +diff --git src/core/umount.c src/core/umount.c +index d1258f0..a30f674 100644 +--- src/core/umount.c ++++ src/core/umount.c +@@ -61,52 +61,46 @@ static void mount_points_list_free(MountPoint **head) { + } + + static int mount_points_list_get(MountPoint **head) { +- FILE *proc_self_mountinfo; +- char *path, *p; ++ _cleanup_fclose_ FILE *proc_self_mountinfo = NULL; + unsigned int i; +- int r; + + assert(head); + +- if (!(proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"))) ++ proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); ++ if (!proc_self_mountinfo) + return -errno; + + for (i = 1;; i++) { +- int k; ++ _cleanup_free_ char *path = NULL; ++ char *p = NULL; + MountPoint *m; ++ int k; + +- path = p = NULL; +- +- if ((k = fscanf(proc_self_mountinfo, +- "%*s " /* (1) mount id */ +- "%*s " /* (2) parent id */ +- "%*s " /* (3) major:minor */ +- "%*s " /* (4) root */ +- "%ms " /* (5) mount point */ +- "%*s" /* (6) mount options */ +- "%*[^-]" /* (7) optional fields */ +- "- " /* (8) separator */ +- "%*s " /* (9) file system type */ +- "%*s" /* (10) mount source */ +- "%*s" /* (11) mount options 2 */ +- "%*[^\n]", /* some rubbish at the end */ +- &path)) != 1) { ++ k = fscanf(proc_self_mountinfo, ++ "%*s " /* (1) mount id */ ++ "%*s " /* (2) parent id */ ++ "%*s " /* (3) major:minor */ ++ "%*s " /* (4) root */ ++ "%ms " /* (5) mount point */ ++ "%*s" /* (6) mount options */ ++ "%*[^-]" /* (7) optional fields */ ++ "- " /* (8) separator */ ++ "%*s " /* (9) file system type */ ++ "%*s" /* (10) mount source */ ++ "%*s" /* (11) mount options 2 */ ++ "%*[^\n]", /* some rubbish at the end */ ++ &path); ++ if (k != 1) { + if (k == EOF) + break; + + log_warning("Failed to parse /proc/self/mountinfo:%u.", i); +- +- free(path); + continue; + } + + p = cunescape(path); +- free(path); +- +- if (!p) { +- r = -ENOMEM; +- goto finish; +- } ++ if (!p) ++ return -ENOMEM; + + /* Ignore mount points we can't unmount because they + * are API or because we are keeping them open (like +@@ -118,22 +112,17 @@ static int mount_points_list_get(MountPoint **head) { + continue; + } + +- if (!(m = new0(MountPoint, 1))) { ++ m = new0(MountPoint, 1); ++ if (!m) { + free(p); +- r = -ENOMEM; +- goto finish; ++ return -ENOMEM; + } + + m->path = p; + LIST_PREPEND(mount_point, *head, m); + } + +- r = 0; +- +-finish: +- fclose(proc_self_mountinfo); +- +- return r; ++ return 0; + } + + static int swap_list_get(MountPoint **head) { +-- +1.7.9.2 + diff --git a/0001-units-order-network-online.target-after-network.targ.patch b/0001-units-order-network-online.target-after-network.targ.patch new file mode 100644 index 00000000..d09fa29e --- /dev/null +++ b/0001-units-order-network-online.target-after-network.targ.patch @@ -0,0 +1,20 @@ +Based on 58e027023b47b32e42cf93dd4a629b869ee1ef25 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 11 Jun 2014 14:58:32 +0200 +Subject: [PATCH] units: order network-online.target after network.target + +There might be implementations around where the network-online logic +might not talk to any network configuration service (and thus not have +to wait for it), hence let's explicitly order network-online.target +after network.target to avoid any ambiguities. +--- + units/network-online.target | 1 + + 1 file changed, 1 insertion(+) + +--- units/network-online.target ++++ units/network-online.target 2014-06-26 00:00:00.000000000 +0000 +@@ -9,3 +9,4 @@ + Description=Network is Online + Documentation=man:systemd.special(7) + Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget ++After=network.target diff --git a/0001-units-systemd-sysctl.service.in-run-after-load-modul.patch b/0001-units-systemd-sysctl.service.in-run-after-load-modul.patch new file mode 100644 index 00000000..6c60f8b7 --- /dev/null +++ b/0001-units-systemd-sysctl.service.in-run-after-load-modul.patch @@ -0,0 +1,29 @@ +Based on 0b73eab7a2185ae0377650e3fdb8208347a8a575 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Sat, 23 Mar 2013 03:54:16 +0100 +Subject: [PATCH] units/systemd-sysctl.service.in: run after load-modules + +Modules might or will register new sysctl options. + +[zj: This mechanism of adding modules just to reliably set sysctl +attributes is not ideal. Nevertheless, sysctl for dynamically created +attributes is simply broken, and this is the easiest workaround.] + +https://bugzilla.redhat.com/show_bug.cgi?id=1022977 +https://bugzilla.novell.com/show_bug.cgi?id=725412 +--- + units/systemd-sysctl.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git units/systemd-sysctl.service.in units/systemd-sysctl.service.in +index 5c7c5d7..ade9dc3 100644 +--- units/systemd-sysctl.service.in ++++ units/systemd-sysctl.service.in +@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service + DefaultDependencies=no + Conflicts=shutdown.target + After=systemd-readahead-collect.service systemd-readahead-replay.service ++After=systemd-modules-load.service + Before=sysinit.target shutdown.target + ConditionPathIsReadWrite=/proc/sys/ + ConditionDirectoryNotEmpty=|/lib/sysctl.d diff --git a/0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch b/0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch new file mode 100644 index 00000000..bf379908 --- /dev/null +++ b/0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch @@ -0,0 +1,56 @@ +From ff452e76e2c0f89a32542b7179bb2fd538335933 Mon Sep 17 00:00:00 2001 +From: Carl Schaefer +Date: Mon, 23 Jun 2014 18:23:48 +0200 +Subject: [PATCH] vconsole: also copy character maps (not just fonts) from vt1 + to vt2, vt3, ... + +https://bugs.freedesktop.org/show_bug.cgi?id=78796 +--- + src/vconsole/vconsole-setup.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git src/vconsole/vconsole-setup.c src/vconsole/vconsole-setup.c +index 0f2b706..e0c4050 100644 +--- src/vconsole/vconsole-setup.c ++++ src/vconsole/vconsole-setup.c +@@ -180,6 +180,10 @@ static int font_load(const char *vc, const char *font, const char *map, const ch + */ + static void font_copy_to_all_vcs(int fd) { + struct vt_stat vcs = {}; ++ unsigned char map8[E_TABSZ]; ++ unsigned short map16[E_TABSZ]; ++ struct unimapdesc unimapd; ++ struct unipair unipairs[USHRT_MAX]; + int i, r; + + /* get active, and 16 bit mask of used VT numbers */ +@@ -209,6 +213,26 @@ static void font_copy_to_all_vcs(int fd) { + cfo.op = KD_FONT_OP_COPY; + cfo.height = vcs.v_active-1; /* tty1 == index 0 */ + ioctl(vcfd, KDFONTOP, &cfo); ++ ++ /* copy map of 8bit chars */ ++ if (ioctl(fd, GIO_SCRNMAP, map8) >= 0) ++ ioctl(vcfd, PIO_SCRNMAP, map8); ++ ++ /* copy map of 8bit chars -> 16bit Unicode values */ ++ if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0) ++ ioctl(vcfd, PIO_UNISCRNMAP, map16); ++ ++ /* copy unicode translation table */ ++ /* unimapd is a ushort count and a pointer to an ++ array of struct unipair { ushort, ushort } */ ++ unimapd.entries = unipairs; ++ unimapd.entry_ct = USHRT_MAX; ++ if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) { ++ struct unimapinit adv = { 0, 0, 0 }; ++ ++ ioctl(vcfd, PIO_UNIMAPCLR, &adv); ++ ioctl(vcfd, PIO_UNIMAP, &unimapd); ++ } + } + } + +-- +1.7.9.2 + diff --git a/0001-virt-rework-container-detection-logic.patch b/0001-virt-rework-container-detection-logic.patch new file mode 100644 index 00000000..4adc20a2 --- /dev/null +++ b/0001-virt-rework-container-detection-logic.patch @@ -0,0 +1,159 @@ +Based on fdd25311706bd32580ec4d43211cdf4665d2f9de Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 28 May 2014 18:37:11 +0800 +Subject: [PATCH] virt: rework container detection logic + +Instead of accessing /proc/1/environ directly, trying to read the +$container variable from it, let's make PID 1 save the contents of that +variable to /run/systemd/container. This allows us to detect containers +without the need for CAP_SYS_PTRACE, which allows us to drop it from a +number of daemons and from the file capabilities of systemd-detect-virt. + +Also, don't consider chroot a container technology anymore. After all, +we don't consider file system namespaces container technology anymore, +and hence chroot() should be considered a container even less. +--- + Makefile.am | 3 --- + configure.ac | 2 -- + src/core/main.c | 12 ++++++++++++ + src/shared/virt.c | 48 ++++++++++++++++++++++++++++++------------------ + 4 files changed, 42 insertions(+), 23 deletions(-) + +diff --git Makefile.am Makefile.am +index 5b26bc3..f66ef42 100644 +--- Makefile.am ++++ Makefile.am +@@ -1798,9 +1798,6 @@ systemd_detect_virt_SOURCES = \ + systemd_detect_virt_LDADD = \ + libsystemd-shared.la + +-systemd-detect-virt-install-hook: +- -$(SETCAP) cap_dac_override,cap_sys_ptrace=ep $(DESTDIR)$(bindir)/systemd-detect-virt +- + INSTALL_EXEC_HOOKS += \ + systemd-detect-virt-install-hook + +--- configure.ac ++++ configure.ac 2014-06-03 14:16:45.046237826 +0000 +@@ -68,8 +68,6 @@ AC_PATH_PROG([XSLTPROC], [xsltproc]) + AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon]) + AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck]) + +-AC_PATH_PROG([SETCAP], [setcap], [/usr/sbin/setcap]) +- + AC_PATH_PROG([KILL], [kill], [/usr/bin/kill]) + + AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod]) +diff --git src/core/main.c src/core/main.c +index 77cc2fb..d5d1ee2 100644 +--- src/core/main.c ++++ src/core/main.c +@@ -1261,6 +1261,16 @@ static int status_welcome(void) { + isempty(pretty_name) ? "Linux" : pretty_name); + } + ++static int write_container_id(void) { ++ const char *c; ++ ++ c = getenv("container"); ++ if (isempty(c)) ++ return 0; ++ ++ return write_string_file("/run/systemd/container", c); ++} ++ + int main(int argc, char *argv[]) { + Manager *m = NULL; + int r, retval = EXIT_FAILURE; +@@ -1544,6 +1554,8 @@ int main(int argc, char *argv[]) { + if (virtualization) + log_info("Detected virtualization '%s'.", virtualization); + ++ write_container_id(); ++ + log_info("Detected architecture '%s'.", architecture_to_string(uname_architecture())); + + if (in_initrd()) +diff --git src/shared/virt.c src/shared/virt.c +index 0db0514..1e227c5 100644 +--- src/shared/virt.c ++++ src/shared/virt.c +@@ -217,8 +217,8 @@ int detect_container(const char **id) { + static thread_local int cached_found = -1; + static thread_local const char *cached_id = NULL; + +- _cleanup_free_ char *e = NULL; +- const char *_id = NULL; ++ _cleanup_free_ char *m = NULL; ++ const char *_id = NULL, *e = NULL; + int r; + + if (_likely_(cached_found >= 0)) { +@@ -229,17 +229,6 @@ int detect_container(const char **id) { + return cached_found; + } + +- /* Unfortunately many of these operations require root access +- * in one way or another */ +- +- r = running_in_chroot(); +- if (r < 0) +- return r; +- if (r > 0) { +- _id = "chroot"; +- goto finish; +- } +- + /* /proc/vz exists in container and outside of the container, + * /proc/bc only outside of the container. */ + if (access("/proc/vz", F_OK) >= 0 && +@@ -249,11 +238,32 @@ int detect_container(const char **id) { + goto finish; + } + +- r = getenv_for_pid(1, "container", &e); +- if (r < 0) +- return r; +- if (r == 0) +- goto finish; ++ if (getpid() == 1) { ++ /* If we are PID 1 we can just check our own ++ * environment variable */ ++ ++ e = getenv("container"); ++ if (isempty(e)) { ++ r = 0; ++ goto finish; ++ } ++ } else { ++ ++ /* Otherwise, PID 1 dropped this information into a ++ * file in /run. This is better than accessing ++ * /proc/1/environ, since we don't need CAP_SYS_PTRACE ++ * for that. */ ++ ++ r = read_one_line_file("/run/systemd/container", &m); ++ if (r == -ENOENT) { ++ r = 0; ++ goto finish; ++ } ++ if (r < 0) ++ return r; ++ ++ e = m; ++ } + + /* We only recognize a selected few here, since we want to + * enforce a redacted namespace */ +@@ -266,6 +276,8 @@ int detect_container(const char **id) { + else + _id = "other"; + ++ r = 1; ++ + finish: + cached_found = r; + +-- +1.7.9.2 + diff --git a/0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch b/0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch new file mode 100644 index 00000000..3961c020 --- /dev/null +++ b/0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch @@ -0,0 +1,59 @@ +From b27adf354a83ad25f4a209c0a6f7989ecab7b4e2 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 13:31:25 +0200 +Subject: [PATCH] bus: make use of sd_bus_try_close() in exit-on-idle services + +--- + src/libsystemd/sd-bus/bus-util.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git src/libsystemd/sd-bus/bus-util.c src/libsystemd/sd-bus/bus-util.c +index 6bd21cc..6441c5b 100644 +--- src/libsystemd/sd-bus/bus-util.c ++++ src/libsystemd/sd-bus/bus-util.c +@@ -43,7 +43,9 @@ static int name_owner_change_callback(sd_bus *bus, sd_bus_message *m, void *user + assert(m); + assert(e); + ++ sd_bus_close(bus); + sd_event_exit(e, 0); ++ + return 1; + } + +@@ -121,11 +123,30 @@ int bus_event_loop_with_idle( + return r; + + if (r == 0 && !exiting) { +- r = bus_async_unregister_and_exit(e, bus, name); ++ ++ r = sd_bus_try_close(bus); ++ if (r == -EBUSY) ++ continue; ++ ++ if (r == -ENOTSUP) { ++ /* Fallback for dbus1 connections: we ++ * unregister the name and wait for ++ * the response to come through for ++ * it */ ++ ++ r = bus_async_unregister_and_exit(e, bus, name); ++ if (r < 0) ++ return r; ++ ++ exiting = true; ++ continue; ++ } ++ + if (r < 0) + return r; + +- exiting = true; ++ sd_event_exit(e, 0); ++ break; + } + } + +-- +1.7.9.2 + diff --git a/0002-core-make-sure-Environment-fields-passed-in-for-tran.patch b/0002-core-make-sure-Environment-fields-passed-in-for-tran.patch new file mode 100644 index 00000000..ec455770 --- /dev/null +++ b/0002-core-make-sure-Environment-fields-passed-in-for-tran.patch @@ -0,0 +1,27 @@ +From cdd7b7dfd44649b204c43e907f03d4294de4f28a Mon Sep 17 00:00:00 2001 +From: Hristo Venev +Date: Mon, 23 Jun 2014 18:53:04 +0200 +Subject: [PATCH] core: make sure Environment fields passed in for transient + units are properly written to unit files + +https://bugs.freedesktop.org/show_bug.cgi?id=76744 +--- + src/core/dbus-execute.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/dbus-execute.c src/core/dbus-execute.c +index cb9a077..ecbadd7 100644 +--- src/core/dbus-execute.c ++++ src/core/dbus-execute.c +@@ -848,7 +848,7 @@ int bus_exec_context_set_transient_property( + strv_free(c->environment); + c->environment = e; + +- joined = strv_join(c->environment, " "); ++ joined = strv_join_quoted(c->environment); + if (!joined) + return -ENOMEM; + +-- +1.7.9.2 + diff --git a/0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch b/0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch new file mode 100644 index 00000000..61888e5f --- /dev/null +++ b/0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch @@ -0,0 +1,42 @@ +From 375ae4aa4d2f89ae8afdd27e9f2b8336fcc2a046 Mon Sep 17 00:00:00 2001 +From: Uoti Urpala +Date: Mon, 23 Jun 2014 16:50:03 +0300 +Subject: [PATCH] core/transaction: fix cycle break attempts outside + transaction + +Patch fixes some incorrect-looking code in transaction.c. +It could fix cases where Debian users with bad package configurations +had systemd go into an infinite loop printing messages about breaking an +ordering cycle, though I have not reproduced that problem myself. + +transaction_verify_order_one() considers jobs/units outside current +transaction when checking whether ordering dependencies cause cycles. +It would also incorrectly try to break cycles at these jobs; this +cannot work, as the break action is to remove the job from the +transaction, which is a no-op if the job isn't part of the transaction +to begin with. The unit_matters_to_anchor() test also looks like it +would not work correctly for non-transaction jobs. Add a check to +verify that the unit is part of the transaction before considering a +job a candidate for deletion. + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752259 +--- + src/core/transaction.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/transaction.c src/core/transaction.c +index d23a45c..805d40a 100644 +--- src/core/transaction.c ++++ src/core/transaction.c +@@ -381,7 +381,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + "Found dependency on %s/%s", + k->unit->id, job_type_to_string(k->type)); + +- if (!delete && ++ if (!delete && hashmap_get(tr->jobs, k->unit) && + !unit_matters_to_anchor(k->unit, k)) { + /* Ok, we can drop this one, so let's + * do so. */ +-- +1.7.9.2 + diff --git a/0002-fsck-include-device-name-in-the-message-about-missin.patch b/0002-fsck-include-device-name-in-the-message-about-missin.patch new file mode 100644 index 00000000..7ec3506f --- /dev/null +++ b/0002-fsck-include-device-name-in-the-message-about-missin.patch @@ -0,0 +1,26 @@ +Based on 8d2a6145334257c8a9ceabc9dd52dff06cca818e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 26 May 2014 23:03:11 -0400 +Subject: [PATCH] fsck: include device name in the message about missing fsck + +--- + src/fsck/fsck.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- src/fsck/fsck.c ++++ src/fsck/fsck.c 2014-06-03 14:15:15.746235301 +0000 +@@ -284,10 +284,12 @@ int main(int argc, char *argv[]) { + r = access(checker, X_OK); + if (r < 0) { + if (errno == ENOENT) { +- log_info("%s doesn't exist, not checking file system.", checker); ++ log_info("%s doesn't exist, not checking file system on %s", ++ checker, device); + return EXIT_SUCCESS; + } else +- log_warning("%s cannot be used: %m", checker); ++ log_warning("%s cannot be used for %s: %m", ++ checker, device); + } + } + diff --git a/0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch b/0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch new file mode 100644 index 00000000..dfbf403c --- /dev/null +++ b/0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch @@ -0,0 +1,122 @@ +Based on 6d313367d9ef780560e117e886502a99fa220eac Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 5 Jun 2014 21:35:35 +0200 +Subject: [PATCH] namespace: when setting up an inaccessible mount point, + unmounting everything below + +This has the benefit of not triggering any autofs mount points +unnecessarily. + +--- + src/core/namespace.c | 6 ++++ + src/shared/util.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/shared/util.h | 2 + + 3 files changed, 76 insertions(+) + +--- src/core/namespace.c ++++ src/core/namespace.c 2014-06-11 00:00:00.000000000 +0000 +@@ -220,6 +220,12 @@ static int apply_mount( + return mount_dev(m); + + case INACCESSIBLE: ++ ++ /* First, get rid of everything that is below if there ++ * is anything... Then, overmount it with an ++ * inaccessible directory. */ ++ umount_recursive(m->path, 0); ++ + what = "/run/systemd/inaccessible"; + break; + +--- src/shared/util.c ++++ src/shared/util.c 2014-06-11 00:00:00.000000000 +0000 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -4635,6 +4636,73 @@ char *strjoin(const char *x, ...) { + return r; + } + ++int umount_recursive(const char *prefix, int flags) { ++ bool again; ++ int n = 0, r; ++ ++ /* Try to umount everything recursively below a ++ * directory. Also, take care of stacked mounts, and keep ++ * unmounting them until they are gone. */ ++ ++ do { ++ _cleanup_fclose_ FILE *proc_self_mountinfo = NULL; ++ ++ again = false; ++ r = 0; ++ ++ proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); ++ if (!proc_self_mountinfo) ++ return -errno; ++ ++ for (;;) { ++ _cleanup_free_ char *path = NULL, *p = NULL; ++ int k; ++ ++ k = fscanf(proc_self_mountinfo, ++ "%*s " /* (1) mount id */ ++ "%*s " /* (2) parent id */ ++ "%*s " /* (3) major:minor */ ++ "%*s " /* (4) root */ ++ "%ms " /* (5) mount point */ ++ "%*s" /* (6) mount options */ ++ "%*[^-]" /* (7) optional fields */ ++ "- " /* (8) separator */ ++ "%*s " /* (9) file system type */ ++ "%*s" /* (10) mount source */ ++ "%*s" /* (11) mount options 2 */ ++ "%*[^\n]", /* some rubbish at the end */ ++ &path); ++ ++ if (k != 1) { ++ if (k == EOF) ++ break; ++ ++ continue; ++ } ++ ++ p = cunescape(path); ++ if (!p) ++ return -ENOMEM; ++ ++ if (!path_startswith(p, prefix)) ++ continue; ++ ++ if (umount2(p, flags) < 0) { ++ r = -errno; ++ continue; ++ } ++ ++ again = true; ++ n++; ++ ++ break; ++ } ++ ++ } while (again); ++ ++ return r ? r : n; ++} ++ + bool is_main_thread(void) { + static thread_local int cached = 0; + +--- src/shared/util.h ++++ src/shared/util.h 2014-06-11 10:10:08.000000000 +0000 +@@ -890,3 +890,5 @@ union file_handle_union { + struct file_handle handle; + char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ]; + }; ++ ++int umount_recursive(const char *target, int flags); diff --git a/0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch b/0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch new file mode 100644 index 00000000..58189d0f --- /dev/null +++ b/0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch @@ -0,0 +1,18 @@ +Basedo n a55954297dade7b432fd3a4f328f23261621ff79 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 19 Jun 2014 19:53:16 +0200 +Subject: [PATCH] units: add missing caps so that GetAddresses() can work + +--- + units/systemd-machined.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- units/systemd-machined.service.in ++++ units/systemd-machined.service.in 2014-06-24 11:26:19.554235869 +0000 +@@ -15,5 +15,5 @@ After=machine.slice + [Service] + ExecStart=@rootlibexecdir@/systemd-machined + BusName=org.freedesktop.machine1 +-CapabilityBoundingSet=CAP_KILL ++CapabilityBoundingSet=CAP_KILL CAP_SYS_PTRACE CAP_SYS_ADMIN CAP_SETGID + WatchdogSec=1min diff --git a/0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch b/0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch new file mode 100644 index 00000000..8305035f --- /dev/null +++ b/0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch @@ -0,0 +1,32 @@ +From d1d8e5d49f3149d03ceb94d1d2f6c14e7abccb6f Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret +Date: Tue, 22 Apr 2014 10:33:25 +0200 +Subject: [PATCH] core: You can not put the cached result of use_smack fct, as + we are not sure the "/sys" is mounted. So we should mount + "sys" before "/proc" + +https://bugs.freedesktop.org/show_bug.cgi?id=77646 +--- + src/core/mount-setup.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git src/core/mount-setup.c src/core/mount-setup.c +index ae8447c..991bfdf 100644 +--- src/core/mount-setup.c ++++ src/core/mount-setup.c +@@ -67,10 +67,10 @@ typedef struct MountPoint { + #define N_EARLY_MOUNT 5 + + static const MountPoint mount_table[] = { +- { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, +- NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_FATAL|MNT_IN_CONTAINER }, ++ { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, ++ NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, + NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, +-- +1.7.9.2 + diff --git a/0003-core-allow-transient-mount-units.patch b/0003-core-allow-transient-mount-units.patch new file mode 100644 index 00000000..607bdaea --- /dev/null +++ b/0003-core-allow-transient-mount-units.patch @@ -0,0 +1,115 @@ +From 0e252f6b375af59eac9bd6d2fe8dd6ee2f51998d Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Fri, 6 Jun 2014 15:10:20 +0200 +Subject: [PATCH] core: allow transient mount units + +For now only What=, Options=, Type= are supported, and Where= is deduced +from the unit name. +--- + src/core/dbus-mount.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- + src/core/mount.c | 2 ++ + 2 files changed, 65 insertions(+), 1 deletion(-) + +diff --git src/core/dbus-mount.c src/core/dbus-mount.c +index e64d3ea..e27019d 100644 +--- src/core/dbus-mount.c ++++ src/core/dbus-mount.c +@@ -124,6 +124,47 @@ const sd_bus_vtable bus_mount_vtable[] = { + SD_BUS_VTABLE_END + }; + ++static int bus_mount_set_transient_property( ++ Mount *m, ++ const char *name, ++ sd_bus_message *message, ++ UnitSetPropertiesMode mode, ++ sd_bus_error *error) { ++ ++ const char *new_property; ++ char **property; ++ char *p; ++ int r; ++ ++ assert(m); ++ assert(name); ++ assert(message); ++ ++ if (streq(name, "What")) ++ property = &m->parameters_fragment.what; ++ else if (streq(name, "Options")) ++ property = &m->parameters_fragment.options; ++ else if (streq(name, "Type")) ++ property = &m->parameters_fragment.fstype; ++ else ++ return 0; ++ ++ r = sd_bus_message_read(message, "s", &new_property); ++ if (r < 0) ++ return r; ++ ++ if (mode != UNIT_CHECK) { ++ p = strdup(new_property); ++ if (!p) ++ return -ENOMEM; ++ ++ free(*property); ++ *property = p; ++ } ++ ++ return 1; ++} ++ + int bus_mount_set_property( + Unit *u, + const char *name, +@@ -132,12 +173,33 @@ int bus_mount_set_property( + sd_bus_error *error) { + + Mount *m = MOUNT(u); ++ int r; + + assert(m); + assert(name); + assert(message); + +- return bus_cgroup_set_property(u, &m->cgroup_context, name, message, mode, error); ++ r = bus_cgroup_set_property(u, &m->cgroup_context, name, message, mode, error); ++ if (r != 0) ++ return r; ++ ++ if (u->transient && u->load_state == UNIT_STUB) { ++ /* This is a transient unit, let's load a little more */ ++ ++ r = bus_mount_set_transient_property(m, name, message, mode, error); ++ if (r != 0) ++ return r; ++ ++ r = bus_exec_context_set_transient_property(u, &m->exec_context, name, message, mode, error); ++ if (r != 0) ++ return r; ++ ++ r = bus_kill_context_set_transient_property(u, &m->kill_context, name, message, mode, error); ++ if (r != 0) ++ return r; ++ } ++ ++ return 0; + } + + int bus_mount_commit_properties(Unit *u) { +diff --git src/core/mount.c src/core/mount.c +index a979837..14ac0a0 100644 +--- src/core/mount.c ++++ src/core/mount.c +@@ -1819,6 +1819,8 @@ const UnitVTable mount_vtable = { + + .get_timeout = mount_get_timeout, + ++ .can_transient = true, ++ + .enumerate = mount_enumerate, + .shutdown = mount_shutdown, + +-- +1.7.9.2 + diff --git a/0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch b/0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch new file mode 100644 index 00000000..8c53718c --- /dev/null +++ b/0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch @@ -0,0 +1,98 @@ +Based on 571d0134bd464444567cf4eb0d2ed8df40045f36 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 24 Jun 2014 19:37:22 +0200 +Subject: [PATCH] fsck: consider a fsck implementation linked to /bin/true + non-existant + +--- + src/fsck/fsck.c | 32 ++++++++++++++++++++++---------- + src/shared/path-util.c | 26 +++++++++++++++----------- + 2 files changed, 37 insertions(+), 21 deletions(-) + +--- src/fsck/fsck.c ++++ src/fsck/fsck.c 2014-06-26 09:19:58.591864710 +0000 +@@ -280,16 +280,28 @@ int main(int argc, char *argv[]) { + + type = udev_device_get_property_value(udev_device, "ID_FS_TYPE"); + if (type) { +- const char *checker = strappenda("/sbin/fsck.", type); +- r = access(checker, X_OK); +- if (r < 0) { +- if (errno == ENOENT) { +- log_info("%s doesn't exist, not checking file system on %s", +- checker, device); +- return EXIT_SUCCESS; +- } else +- log_warning("%s cannot be used for %s: %m", +- checker, device); ++ _cleanup_free_ char *p = NULL, *d = NULL; ++ const char *checker = strappenda("fsck.", type); ++ r = find_binary(checker, &p); ++ if (r == -ENOENT) { ++ log_info("fsck.%s doesn't exist, not checking file system on %s", ++ type, device); ++ return EXIT_SUCCESS; ++ } else if (r < 0) { ++ log_warning("fsck.%s cannot be used for %s: %m", ++ type, device); ++ return r; ++ } ++ ++ /* An fsck that is linked to /bin/true is a non-existant fsck */ ++ r = readlink_malloc(p, &d); ++ if (r >= 0 && ++ (path_equal(d, "/bin/true") || ++ path_equal(d, "/usr/bin/true") || ++ path_equal(d, "/dev/null"))) { ++ log_info("fsck.%s doesn't exist, not checking file system on %s", ++ type, device); ++ return EXIT_SUCCESS; + } + } + +--- src/shared/path-util.c ++++ src/shared/path-util.c 2014-06-26 09:14:15.651559638 +0000 +@@ -425,19 +425,21 @@ int path_is_os_tree(const char *path) { + + int find_binary(const char *name, char **filename) { + assert(name); +- assert(filename); + +- if (strchr(name, '/')) { +- char *p; ++ if (is_path(name)) { ++ if (access(name, X_OK) < 0) ++ return -errno; ++ ++ if (filename) { ++ char *p; + +- if (path_is_absolute(name)) +- p = strdup(name); +- else + p = path_make_absolute_cwd(name); +- if (!p) +- return -ENOMEM; ++ if (!p) ++ return -ENOMEM; ++ ++ *filename = p; ++ } + +- *filename = p; + return 0; + } else { + const char *path; +@@ -463,8 +465,10 @@ int find_binary(const char *name, char * + continue; + } + +- path_kill_slashes(p); +- *filename = p; ++ if (filename) { ++ path_kill_slashes(p); ++ *filename = p; ++ } + + return 0; + } diff --git a/0003-install-fix-invalid-free-in-unit_file_mask.patch b/0003-install-fix-invalid-free-in-unit_file_mask.patch new file mode 100644 index 00000000..0fe0581b --- /dev/null +++ b/0003-install-fix-invalid-free-in-unit_file_mask.patch @@ -0,0 +1,30 @@ +From 223217749e57996336d5730b0a28716cca56d45d Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 13 Jun 2014 18:48:18 +0200 +Subject: [PATCH] install: fix invalid free() in unit_file_mask() + +int unit_file_mask(...) in ./src/shared/install.c calls +get_config_path(...) which can in 4 error cases return without setting +"ret", and thus "prefix" can be uninitialized when unit_file_mask(...) +finishes (which it does directly after the error is returned from +get_config_path(...)). +--- + src/shared/install.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/shared/install.c src/shared/install.c +index 487d0f6..f562063 100644 +--- src/shared/install.c ++++ src/shared/install.c +@@ -563,7 +563,7 @@ int unit_file_mask( + unsigned *n_changes) { + + char **i; +- _cleanup_free_ char *prefix; ++ _cleanup_free_ char *prefix = NULL; + int r; + + assert(scope >= 0); +-- +1.7.9.2 + diff --git a/0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch b/0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch new file mode 100644 index 00000000..5f466ea6 --- /dev/null +++ b/0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch @@ -0,0 +1,26 @@ +Based on 497d1986c13032f1ef8f4592bb7ed8d3aa321a47 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 20 Jun 2014 00:15:39 +0200 +Subject: [PATCH] units: order systemd-tmpfiles-clean.service after + time-sync.target + +That way, on systems lacking an RTC we don't false start removing aged +files too early. +--- + units/systemd-tmpfiles-clean.service.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- units/systemd-tmpfiles-clean.service.in ++++ units/systemd-tmpfiles-clean.service.in 2014-06-24 10:47:57.398235644 +0000 +@@ -10,8 +10,9 @@ Description=Cleanup of Temporary Directo + Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) + DefaultDependencies=no + Wants=local-fs.target +-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target +-Before=sysinit.target shutdown.target ++Conflicts=shutdown.target ++After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target time-sync.target ++Before=shutdown.target + ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/etc/tmpfiles.d diff --git a/0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch b/0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch new file mode 100644 index 00000000..15c8d7f5 --- /dev/null +++ b/0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch @@ -0,0 +1,26 @@ +From d8e40d62ab871a87fde421c4b246bb45bc3cbe2d Mon Sep 17 00:00:00 2001 +From: Jonathan Liu +Date: Thu, 29 May 2014 01:17:25 +1000 +Subject: [PATCH] units: use KillMode=mixed for systemd-nspawn@.service + +This causes the container to shut down cleanly when the service is +stopped. +--- + units/systemd-nspawn@.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git units/systemd-nspawn@.service.in units/systemd-nspawn@.service.in +index ff36e90..e373628 100644 +--- units/systemd-nspawn@.service.in ++++ units/systemd-nspawn@.service.in +@@ -11,6 +11,7 @@ Documentation=man:systemd-nspawn(1) + + [Service] + ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i ++KillMode=mixed + Type=notify + + [Install] +-- +1.7.9.2 + diff --git a/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch b/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch new file mode 100644 index 00000000..4bed22a5 --- /dev/null +++ b/0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch @@ -0,0 +1,53 @@ +Based on bde29068aa3815c88190a91e9867605a0aeaf9c4 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 23 Jun 2014 19:18:44 +0200 +Subject: [PATCH] cryptsetup: don't add unit dependency on /dev/null devices + when it is listed as password file + +As special magic, don't create device dependencies for /dev/null. Of +course, there might be similar devices we might want to include, but +given that none of them really make sense to specify as password source +there's really no point in checking for anything else here. + +https://bugs.freedesktop.org/show_bug.cgi?id=75816 +--- + src/cryptsetup/cryptsetup-generator.c | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +--- src/cryptsetup/cryptsetup-generator.c ++++ src/cryptsetup/cryptsetup-generator.c 2014-06-25 17:24:14.338237375 +0000 +@@ -29,6 +29,7 @@ + #include "mkdir.h" + #include "strv.h" + #include "fileio.h" ++#include "path-util.h" + + static const char *arg_dest = "/tmp"; + static bool arg_enabled = true; +@@ -141,14 +142,18 @@ static int create_disk( + if (uu == NULL) + return log_oom(); + +- if (is_device_path(uu)) { +- _cleanup_free_ char *dd = unit_name_from_path(uu, ".device"); +- if (dd == NULL) +- return log_oom(); +- +- fprintf(f, "After=%1$s\nRequires=%1$s\n", dd); +- } else +- fprintf(f, "RequiresMountsFor=%s\n", password); ++ if (!path_equal(uu, "/dev/null")) { ++ if (is_device_path(uu)) { ++ _cleanup_free_ char *dd; ++ ++ dd = unit_name_from_path(uu, ".device"); ++ if (!dd) ++ return log_oom(); ++ ++ fprintf(f, "After=%1$s\nRequires=%1$s\n", dd); ++ } else ++ fprintf(f, "RequiresMountsFor=%s\n", password); ++ } + } + } + diff --git a/0004-getty-generator-properly-escape-instance-names.patch b/0004-getty-generator-properly-escape-instance-names.patch new file mode 100644 index 00000000..26feb694 --- /dev/null +++ b/0004-getty-generator-properly-escape-instance-names.patch @@ -0,0 +1,39 @@ +From a2ae516a25dafe41e0cd296ab7b5d022fa62b95f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 19 Jun 2014 22:02:55 -0400 +Subject: [PATCH] getty-generator: properly escape instance names + +Otherwise the add_symlink() function tries to make directories for +each slash even for the slash after the @ symbol in the final link +name, failing for /dev/3270/tty1. + +Based on a patch by Werner Fink . +--- + src/getty-generator/getty-generator.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git src/getty-generator/getty-generator.c src/getty-generator/getty-generator.c +index 35cd858..7d4b546 100644 +--- src/getty-generator/getty-generator.c ++++ src/getty-generator/getty-generator.c +@@ -67,7 +67,7 @@ static int add_serial_getty(const char *tty) { + + log_debug("Automatically adding serial getty for /dev/%s.", tty); + +- n = unit_name_replace_instance("serial-getty@.service", tty); ++ n = unit_name_from_path_instance("serial-getty", tty, ".service"); + if (!n) + return log_oom(); + +@@ -81,7 +81,7 @@ static int add_container_getty(const char *tty) { + + log_debug("Automatically adding container getty for /dev/pts/%s.", tty); + +- n = unit_name_replace_instance("container-getty@.service", tty); ++ n = unit_name_from_path_instance("container-getty", tty, ".service"); + if (!n) + return log_oom(); + +-- +1.7.9.2 + diff --git a/0004-systemd-detect-virt-only-discover-Xen-domU.patch b/0004-systemd-detect-virt-only-discover-Xen-domU.patch new file mode 100644 index 00000000..246e09b3 --- /dev/null +++ b/0004-systemd-detect-virt-only-discover-Xen-domU.patch @@ -0,0 +1,79 @@ +From 37287585b6ba9a55065c8f94458f6db3c0abe0af Mon Sep 17 00:00:00 2001 +From: Thomas Blume +Date: Fri, 6 Jun 2014 16:36:45 +0200 +Subject: [PATCH] systemd-detect-virt: only discover Xen domU + +The current vm detection lacks the distinction between Xen dom0 and Xen domU. +Both, dom0 and domU are running inside the hypervisor. +Therefore systemd-detect-virt and the ConditionVirtualization directive detect +dom0 as a virtual machine. + +dom0 is not using virtual devices but is accessing the real hardware. +Therefore dom0 should be considered the virtualisation host and not a virtual +machine. + +https://bugs.freedesktop.org/show_bug.cgi?id=77271 +--- + src/shared/virt.c | 34 +++++++++++++++++++++++++++------- + 1 file changed, 27 insertions(+), 7 deletions(-) + +diff --git src/shared/virt.c src/shared/virt.c +index 1e227c5..774915f 100644 +--- src/shared/virt.c ++++ src/shared/virt.c +@@ -148,7 +148,7 @@ static int detect_vm_dmi(const char **_id) { + + /* Returns a short identifier for the various VM implementations */ + int detect_vm(const char **id) { +- _cleanup_free_ char *hvtype = NULL, *cpuinfo_contents = NULL; ++ _cleanup_free_ char *domcap = NULL, *cpuinfo_contents = NULL; + static thread_local int cached_found = -1; + static thread_local const char *cached_id = NULL; + const char *_id = NULL; +@@ -162,17 +162,37 @@ int detect_vm(const char **id) { + return cached_found; + } + +- /* Try high-level hypervisor sysfs file first: ++ /* Try xen capabilities file first, if not found try high-level hypervisor sysfs file: + * +- * https://bugs.freedesktop.org/show_bug.cgi?id=61491 */ +- r = read_one_line_file("/sys/hypervisor/type", &hvtype); ++ * https://bugs.freedesktop.org/show_bug.cgi?id=77271 */ ++ r = read_one_line_file("/proc/xen/capabilities", &domcap); + if (r >= 0) { +- if (streq(hvtype, "xen")) { ++ char *cap, *i = domcap; ++ ++ while ((cap = strsep(&i, ","))) ++ if (streq(cap, "control_d")) ++ break; ++ ++ if (!i) { + _id = "xen"; + r = 1; +- goto finish; + } +- } else if (r != -ENOENT) ++ ++ goto finish; ++ ++ } else if (r == -ENOENT) { ++ _cleanup_free_ char *hvtype = NULL; ++ ++ r = read_one_line_file("/sys/hypervisor/type", &hvtype); ++ if (r >= 0) { ++ if (streq(hvtype, "xen")) { ++ _id = "xen"; ++ r = 1; ++ goto finish; ++ } ++ } else if (r != -ENOENT) ++ return r; ++ } else + return r; + + /* this will set _id to "other" and return 0 for unknown hypervisors */ +-- +1.7.9.2 + diff --git a/0004-util-ignore_file-should-not-allow-files-ending-with.patch b/0004-util-ignore_file-should-not-allow-files-ending-with.patch new file mode 100644 index 00000000..a30b4c4f --- /dev/null +++ b/0004-util-ignore_file-should-not-allow-files-ending-with.patch @@ -0,0 +1,28 @@ +From 93f1a06374e335e8508d89e1bdaadf45be6ab777 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Sat, 31 May 2014 21:36:23 +0200 +Subject: [PATCH] util: ignore_file should not allow files ending with '~' + +ignore_file currently allows any file ending with '~' while it +seems that the opposite was intended: +a228a22fda4faa9ecb7c5a5e499980c8ae5d2a08 +--- + src/shared/util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/shared/util.c src/shared/util.c +index 0c27394..17b0ae1 100644 +--- src/shared/util.c ++++ src/shared/util.c +@@ -1371,7 +1371,7 @@ bool ignore_file(const char *filename) { + assert(filename); + + if (endswith(filename, "~")) +- return false; ++ return true; + + return ignore_file_allow_backup(filename); + } +-- +1.7.9.2 + diff --git a/0005-backlight-Do-not-clamp-brightness-for-LEDs.patch b/0005-backlight-Do-not-clamp-brightness-for-LEDs.patch new file mode 100644 index 00000000..37c42d2e --- /dev/null +++ b/0005-backlight-Do-not-clamp-brightness-for-LEDs.patch @@ -0,0 +1,60 @@ +From 4cd2b2cf8ca585d15ebc859701b346658262b5bb Mon Sep 17 00:00:00 2001 +From: Denis Tikhomirov +Date: Thu, 5 Jun 2014 23:59:40 +0400 +Subject: [PATCH] backlight: Do not clamp brightness for LEDs + +https://bugs.freedesktop.org/show_bug.cgi?id=77092 + +On Thu, Jun 05, 2014 at 08:37:20AM +0200, Lennart Poettering wrote: +> The patch is line-broken, please send an uncorrupted patch! +I am very sorry, I forgot that my client limits line width. I will use +mutt now on. +> clamp_brightness() clamps the brightness value to the range of the +> actual device. This is a recent addition that was added to deal with +> driver updates where the resolution is changed. I don't think this part +> should be dropped for LED devices. The clamp_brightness() call hence +> should be called unconditionally, however, internally it should use a +> different min_brightness value if something is an !backlight devices... +Thank you for explanation, this sounds very reasonable to me. Please, +see updated patch: +--- + src/backlight/backlight.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git src/backlight/backlight.c src/backlight/backlight.c +index 691472c..4d94ebf 100644 +--- src/backlight/backlight.c ++++ src/backlight/backlight.c +@@ -225,11 +225,13 @@ static unsigned get_max_brightness(struct udev_device *device) { + + /* Some systems turn the backlight all the way off at the lowest levels. + * clamp_brightness clamps the saved brightness to at least 1 or 5% of +- * max_brightness. This avoids preserving an unreadably dim screen, which +- * would otherwise force the user to disable state restoration. */ ++ * max_brightness in case of 'backlight' subsystem. This avoids preserving ++ * an unreadably dim screen, which would otherwise force the user to ++ * disable state restoration. */ + static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) { + int r; + unsigned brightness, new_brightness, min_brightness; ++ const char *subsystem; + + r = safe_atou(*value, &brightness); + if (r < 0) { +@@ -237,7 +239,12 @@ static void clamp_brightness(struct udev_device *device, char **value, unsigned + return; + } + +- min_brightness = MAX(1U, max_brightness/20); ++ subsystem = udev_device_get_subsystem(device); ++ if (streq_ptr(subsystem, "backlight")) ++ min_brightness = MAX(1U, max_brightness/20); ++ else ++ min_brightness = 0; ++ + new_brightness = CLAMP(brightness, min_brightness, max_brightness); + if (new_brightness != brightness) { + char *old_value = *value; +-- +1.7.9.2 + diff --git a/0005-man-fix-path-in-crypttab-5.patch b/0005-man-fix-path-in-crypttab-5.patch new file mode 100644 index 00000000..d0aef604 --- /dev/null +++ b/0005-man-fix-path-in-crypttab-5.patch @@ -0,0 +1,26 @@ +From 9fcdf32294e66f91d2a177f73a77049832768311 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 23 Jun 2014 23:07:53 -0400 +Subject: [PATCH] man: fix path in crypttab(5) + +https://bugs.freedesktop.org/show_bug.cgi?id=75816 +--- + man/crypttab.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git man/crypttab.xml man/crypttab.xml +index 668e51d..9030015 100644 +--- man/crypttab.xml ++++ man/crypttab.xml +@@ -369,7 +369,7 @@ + luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b + swap /dev/sda7 /dev/urandom swap + truecrypt /dev/sda2 /etc/container_password tcrypt +-hidden /mnt/tc_hidden /null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile ++hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile + + + +-- +1.7.9.2 + diff --git a/0005-po-add-Greek-translation.patch b/0005-po-add-Greek-translation.patch new file mode 100644 index 00000000..029ce4fa --- /dev/null +++ b/0005-po-add-Greek-translation.patch @@ -0,0 +1,436 @@ +From 3d89c35c2ae08c3fbf1a037c4df54c8e5ae56faf Mon Sep 17 00:00:00 2001 +From: Dimitris Spingos +Date: Wed, 7 May 2014 18:27:02 +0200 +Subject: [PATCH] po: add Greek translation + +https://bugs.freedesktop.org/show_bug.cgi?id=78064 +--- + po/LINGUAS | 3 +- + po/el.po | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 406 insertions(+), 1 deletion(-) + create mode 100644 po/el.po + +diff --git po/LINGUAS po/LINGUAS +index 0301751..820ca82 100644 +--- po/LINGUAS ++++ po/LINGUAS +@@ -1,4 +1,5 @@ ++el + fr ++it + pl + ru +-it +diff --git po/el.po po/el.po +new file mode 100644 +index 0000000..1570565 +--- /dev/null ++++ po/el.po +@@ -0,0 +1,404 @@ ++# Greek translation for systemd. ++# Copyright (C) 2014 systemd's COPYRIGHT HOLDER ++# This file is distributed under the same license as the systemd package. ++# Dimitris Spingos , 2014. ++# Dimitris Spingos (Δημήτρης Σπίγγος) , 2014. ++msgid "" ++msgstr "" ++"Project-Id-Version: systemd master\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=sys" ++"temd&keywords=I18N+L10N&component=general\n" ++"POT-Creation-Date: 2014-04-25 15:51+0000\n" ++"PO-Revision-Date: 2014-04-29 09:17+0300\n" ++"Last-Translator: Dimitris Spingos (Δημήτρης Σπίγγος) \n" ++"Language-Team: team@lists.gnome.gr\n" ++"Language: el\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=2; plural=(n != 1);\n" ++"X-Generator: Virtaal 0.7.0\n" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:1 ++msgid "Set host name" ++msgstr "Ορισμός ονόματος οικοδεσπότη" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:2 ++msgid "Authentication is required to set the local host name." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε τοπικά όνομα οικοδεσπότη." ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:3 ++msgid "Set static host name" ++msgstr "Ορισμός στατικού ονόματος οικοδεσπότη" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:4 ++msgid "" ++"Authentication is required to set the statically configured local host name, " ++"as well as the pretty host name." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ορίσετε το στατικά ρυθμισμένο όνομα τοπικού " ++"οικοδεσπότη, καθώς και το pretty όνομα οικοδεσπότη." ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:5 ++msgid "Set machine information" ++msgstr "Ορισμός πληροφοριών μηχανής" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:6 ++msgid "Authentication is required to set local machine information." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε πληροφορίες τοπικής μηχανής." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:1 ++msgid "Set system locale" ++msgstr "Ορισμός τοπικών ρυθμίσεων συστήματος" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:2 ++msgid "Authentication is required to set the system locale." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ορίσετε τις τοπικές ρυθμίσεις του συστήματος." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:3 ++msgid "Set system keyboard settings" ++msgstr "Ορισμός ρυθμίσεων πληκτρολογίου συστήματος" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:4 ++msgid "Authentication is required to set the system keyboard settings." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ορίσετε τις ρυθμίσεις πληκτρολογίου του " ++"συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:1 ++msgid "Allow applications to inhibit system shutdown" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τον τερματισμό του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:2 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"shutdown." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει τον " ++"τερματισμό του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:3 ++msgid "Allow applications to delay system shutdown" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να καθυστερούν τον τερματισμό του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:4 ++msgid "" ++"Authentication is required to allow an application to delay system shutdown." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να καθυστερήσει " ++"τον τερματισμό του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:5 ++msgid "Allow applications to inhibit system sleep" ++msgstr "Να επιτρέπεται στις εφαρμογές να αποτρέπουν την ύπνωση του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:6 ++msgid "" ++"Authentication is required to allow an application to inhibit system sleep." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"ύπνωση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:7 ++msgid "Allow applications to delay system sleep" ++msgstr "Να επιτρέπεται στις εφαρμογές να καθυστερούν την ύπνωση του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:8 ++msgid "" ++"Authentication is required to allow an application to delay system sleep." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να καθυστερήσει " ++"την ύπνωση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:9 ++msgid "Allow applications to inhibit automatic system suspend" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν την αυτόματη αναστολή του " ++"συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:10 ++msgid "" ++"Authentication is required to allow an application to inhibit automatic " ++"system suspend." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"αυτόματη αναστολή του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:11 ++msgid "Allow applications to inhibit system handling of the power key" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου " ++"ενεργοποίησης του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:12 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the power key." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του πλήκτρου ενεργοποίησης του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:13 ++msgid "Allow applications to inhibit system handling of the suspend key" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου " ++"αναστολής του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:14 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the suspend key." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του πλήκτρου αναστολής του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:15 ++msgid "Allow applications to inhibit system handling of the hibernate key" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του πλήκτρου " ++"αδρανοποίησης του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:16 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the hibernate key." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του πλήκτρου αδρανοποίησης του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:17 ++msgid "Allow applications to inhibit system handling of the lid switch" ++msgstr "" ++"Να επιτρέπεται στις εφαρμογές να αποτρέπουν τη διαχείριση του διακόπτη " ++"καλύμματος του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:18 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the lid switch." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μια εφαρμογή να αποτρέψει την " ++"διαχείριση του διακόπτη καλύμματος του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:19 ++msgid "Allow non-logged-in users to run programs" ++msgstr "Να επιτρέπεται σε μη συνδεμένους χρήστες να εκτελούν προγράμματα" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:20 ++msgid "" ++"Authentication is required to allow a non-logged-in user to run programs." ++msgstr "" ++"Απαιτείται πιστοποίηση για να επιτρέπεται σε μη συνδεμένους χρήστες να " ++"εκτελούν προγράμματα." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:21 ++msgid "Allow attaching devices to seats" ++msgstr "Να επιτρέπεται η προσάρτηση συσκευών στους σταθμούς εργασίας" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:22 ++msgid "Authentication is required for attaching a device to a seat." ++msgstr "" ++"Απαιτείται πιστοποίηση για προσάρτηση μιας συσκευής σε έναν σταθμό εργασίας." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:23 ++msgid "Flush device to seat attachments" ++msgstr "Αφαίρεση συσκευής από προσαρτήσεις σταθμού εργασίας" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:24 ++msgid "" ++"Authentication is required for resetting how devices are attached to seats." ++msgstr "" ++"Απαιτείται πιστοποίηση για επαναφορά του τρόπου που οι συσκευές προσαρτώνται " ++"στους σταθμούς εργασίας." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:25 ++msgid "Power off the system" ++msgstr "Σβήσιμο του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:26 ++msgid "Authentication is required for powering off the system." ++msgstr "Απαιτείται πιστοποίηση για την σβήσιμο του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:27 ++msgid "Power off the system while other users are logged in" ++msgstr "Σβήσιμο του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:28 ++msgid "" ++"Authentication is required for powering off the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για σβήσιμο του συστήματος ενώ άλλοι χρήστες είναι " ++"συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:29 ++msgid "Power off the system while an application asked to inhibit it" ++msgstr "Απενεργοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:30 ++msgid "" ++"Authentication is required for powering off the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για απενεργοποίηση του συστήματος ενώ μια εφαρμογή " ++"ζήτησε να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:31 ++msgid "Reboot the system" ++msgstr "Επανεκκίνηση του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:32 ++msgid "Authentication is required for rebooting the system." ++msgstr "Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:33 ++msgid "Reboot the system while other users are logged in" ++msgstr "Επανεκκίνηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:34 ++msgid "" ++"Authentication is required for rebooting the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος ενώ άλλοι χρήστες " ++"είναι συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:35 ++msgid "Reboot the system while an application asked to inhibit it" ++msgstr "Επανεκκίνηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:36 ++msgid "" ++"Authentication is required for rebooting the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για επανεκκίνηση του συστήματος ενώ μια εφαρμογή " ++"ζήτησε να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:37 ++msgid "Suspend the system" ++msgstr "Αναστολή του συστήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:38 ++msgid "Authentication is required for suspending the system." ++msgstr "Απαιτείται πιστοποίηση για την αναστολή του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:39 ++msgid "Suspend the system while other users are logged in" ++msgstr "Αναστολή του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:40 ++msgid "" ++"Authentication is required for suspending the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για αναστολή του συστήματος ενώ άλλοι χρήστες είναι " ++"συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:41 ++msgid "Suspend the system while an application asked to inhibit it" ++msgstr "Αναστολή του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:42 ++msgid "" ++"Authentication is required for suspending the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για αναστολή του συστήματος ενώ μια εφαρμογή ζήτησε " ++"να αποτραπεί." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:43 ++msgid "Hibernate the system" ++msgstr "Αδρανοποίηση του συτήματος" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:44 ++msgid "Authentication is required for hibernating the system." ++msgstr "Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:45 ++msgid "Hibernate the system while other users are logged in" ++msgstr "Αδρανοποίηση του συστήματος ενώ άλλοι χρήστες είναι συνδεμένοι" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:46 ++msgid "" ++"Authentication is required for hibernating the system while other users are " ++"logged in." ++msgstr "" ++"Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος ενώ άλλοι χρήστες " ++"είναι συνδεμένοι." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:47 ++msgid "Hibernate the system while an application asked to inhibit it" ++msgstr "Αδρανοποίηση του συστήματος ενώ μια εφαρμογή ζήτησε να αποτραπεί" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:48 ++msgid "" ++"Authentication is required for hibernating the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Απαιτείται πιστοποίηση για αδρανοποίηση του συστήματος ενώ μια εφαρμογή " ++"ζήτησε να αποτραπεί." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1 ++msgid "Set system time" ++msgstr "Ορισμός ώρας συστήματος" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:2 ++msgid "Authentication is required to set the system time." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε την ώρα του συστήματος." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:3 ++msgid "Set system timezone" ++msgstr "Ορισμός ζώνης ώρας συστήματος" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:4 ++msgid "Authentication is required to set the system timezone." ++msgstr "Απαιτείται πιστοποίηση για να ορίσετε την ώρα ζώνης του συστήματος." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:5 ++msgid "Set RTC to local timezone or UTC" ++msgstr "Ορισμός RTC στην τοπική ζώνη ώρας ή UTC" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:6 ++msgid "" ++"Authentication is required to control whether the RTC stores the local or " ++"UTC time." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ελέγξετε αν το RTC αποθηκεύει την τοπική ή την " ++"ώρα UTC." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:7 ++msgid "Turn network time synchronization on or off" ++msgstr "Ενεργοποίηση/Απενεργοποίηση συγχρονισμού ώρας δικτύου" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:8 ++msgid "" ++"Authentication is required to control whether network time synchronization " ++"shall be enabled." ++msgstr "" ++"Απαιτείται πιστοποίηση για να ελέγξετε αν ο συγχρονισμός ώρας δικτύου θα " ++"ενεργοποιηθεί." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:1 ++msgid "Send passphrase back to system" ++msgstr "Αποστολή του συνθηματικού πίσω στο σύστημα" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:2 ++msgid "" ++"Authentication is required to send the entered passphrase back to the system." ++msgstr "" ++"Απαιτείται πιστοποίηση για αποστολή του εισερχόμενου συνθηματικού πίσω στο " ++"σύστημα." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3 ++msgid "Privileged system and service manager access" ++msgstr "Προνομιούχος πρόσβαση διαχειριστή συστήματος και υπηρεσίας" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4 ++msgid "Authentication is required to access the system and service manager." ++msgstr "" ++"Απαιτείται πιστοποίηση για να προσπελάσετε τον διαχειριστή συστήματος και " ++"υπηρεσιών." +-- +1.7.9.2 + diff --git a/0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch b/0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch new file mode 100644 index 00000000..c4e89bb1 --- /dev/null +++ b/0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch @@ -0,0 +1,82 @@ +From 7cfa80f07e94c3e48703d145ef03a73dd6e7b983 Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Wed, 18 Jun 2014 13:55:32 +0200 +Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers + +--- + hwdb/20-bluetooth-vendor-product.hwdb | 42 ++++++++++++++++++++++++++++++--- + 1 file changed, 39 insertions(+), 3 deletions(-) + +diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb +index a65c7db..377748a 100644 +--- hwdb/20-bluetooth-vendor-product.hwdb ++++ hwdb/20-bluetooth-vendor-product.hwdb +@@ -115,7 +115,7 @@ bluetooth:v0024* + ID_VENDOR_FROM_DATABASE=Alcatel + + bluetooth:v0025* +- ID_VENDOR_FROM_DATABASE=Philips Semiconductors ++ ID_VENDOR_FROM_DATABASE=NXP Semiconductors (formerly Philips Semiconductors) + + bluetooth:v0026* + ID_VENDOR_FROM_DATABASE=C Technologies +@@ -427,7 +427,7 @@ bluetooth:v008B* + ID_VENDOR_FROM_DATABASE=Topcorn Positioning Systems, LLC + + bluetooth:v008C* +- ID_VENDOR_FROM_DATABASE=Qualcomm Retail Solutions, Inc. (formerly Qualcomm Labs, Inc.) ++ ID_VENDOR_FROM_DATABASE=Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.) + + bluetooth:v008D* + ID_VENDOR_FROM_DATABASE=Zscan Software +@@ -1006,10 +1006,46 @@ bluetooth:v014C* + ID_VENDOR_FROM_DATABASE=Mesh-Net Ltd + + bluetooth:v014D* +- ID_VENDOR_FROM_DATABASE=HUIZHOU DESAY SV AUTOMOTIVE CO., LTD. ++ ID_VENDOR_FROM_DATABASE=Huizhou Desay SV Automotive CO., LTD. + + bluetooth:v014E* + ID_VENDOR_FROM_DATABASE=Tangerine, Inc. + + bluetooth:v014F* + ID_VENDOR_FROM_DATABASE=B&W Group Ltd. ++ ++bluetooth:v0150* ++ ID_VENDOR_FROM_DATABASE=Pioneer Corporation ++ ++bluetooth:v0151* ++ ID_VENDOR_FROM_DATABASE=OnBeep ++ ++bluetooth:v0152* ++ ID_VENDOR_FROM_DATABASE=Vernier Software & Technology ++ ++bluetooth:v0153* ++ ID_VENDOR_FROM_DATABASE=ROL Ergo ++ ++bluetooth:v0154* ++ ID_VENDOR_FROM_DATABASE=Pebble Technology ++ ++bluetooth:v0155* ++ ID_VENDOR_FROM_DATABASE=NETATMO ++ ++bluetooth:v0156* ++ ID_VENDOR_FROM_DATABASE=Accumulate AB ++ ++bluetooth:v0157* ++ ID_VENDOR_FROM_DATABASE=Anhui Huami Information Technology Co., Ltd. ++ ++bluetooth:v0158* ++ ID_VENDOR_FROM_DATABASE=Inmite s.r.o. ++ ++bluetooth:v0159* ++ ID_VENDOR_FROM_DATABASE=ChefSteps, Inc. ++ ++bluetooth:v015A* ++ ID_VENDOR_FROM_DATABASE=micus AG ++ ++bluetooth:v015B* ++ ID_VENDOR_FROM_DATABASE=Biomedical Research Ltd. +-- +1.7.9.2 + diff --git a/0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch b/0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch new file mode 100644 index 00000000..e76abb48 --- /dev/null +++ b/0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch @@ -0,0 +1,29 @@ +From e683212f049ac5d3f95fb17300cfa2fd971f78f3 Mon Sep 17 00:00:00 2001 +From: Ronny Chevalier +Date: Tue, 3 Jun 2014 19:44:03 +0200 +Subject: [PATCH] log: honour the kernel's quiet cmdline argument + +It was forgotten in b1e90ec515408aec2702522f6f68c4920b56375b + +See https://bugs.freedesktop.org/show_bug.cgi?id=79582 +--- + src/shared/log.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git src/shared/log.c src/shared/log.c +index 9039db3..6f17705 100644 +--- src/shared/log.c ++++ src/shared/log.c +@@ -878,6 +878,9 @@ void log_parse_environment(void) { + if (l == 5 && startswith(w, "debug")) { + log_set_max_level(LOG_DEBUG); + break; ++ } else if (l == 5 && startswith(w, "quiet")) { ++ log_set_max_level(LOG_WARNING); ++ break; + } + } + } +-- +1.7.9.2 + diff --git a/0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch b/0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch new file mode 100644 index 00000000..aa77e4cc --- /dev/null +++ b/0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch @@ -0,0 +1,26 @@ +From 267b3e41df5a2181f2911433539f81de2fa1511a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Thu, 29 May 2014 14:17:37 -0400 +Subject: [PATCH] tty-ask-password-agent: Do tell what directory we failed to + open + +--- + .../tty-ask-password-agent.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c +index 3203474..55a2215 100644 +--- src/tty-ask-password-agent/tty-ask-password-agent.c ++++ src/tty-ask-password-agent/tty-ask-password-agent.c +@@ -501,7 +501,7 @@ static int show_passwords(void) { + if (errno == ENOENT) + return 0; + +- log_error("opendir(): %m"); ++ log_error("opendir(/run/systemd/ask-password): %m"); + return -errno; + } + +-- +1.7.9.2 + diff --git a/0007-keyboard-add-Plantronics-.Audio-mute-button.patch b/0007-keyboard-add-Plantronics-.Audio-mute-button.patch new file mode 100644 index 00000000..53c701bd --- /dev/null +++ b/0007-keyboard-add-Plantronics-.Audio-mute-button.patch @@ -0,0 +1,32 @@ +From 9e3dbf6b2b99d0e16989d9cedb458729db5a60c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 1 Jun 2014 14:01:23 -0400 +Subject: [PATCH] keyboard: add Plantronics .Audio mute button + +https://bugs.freedesktop.org/show_bug.cgi?id=79495 +--- + hwdb/60-keyboard.hwdb | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb +index 05e6a04..d053766 100644 +--- hwdb/60-keyboard.hwdb ++++ hwdb/60-keyboard.hwdb +@@ -866,6 +866,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr* + KEYBOARD_KEY_f3=volumeup + + ########################################################### ++# Plantronics ++########################################################### ++ ++# Plantronics .Audio 626 DSP ++keyboard:usb:v047fpC006* ++ KEYBOARD_KEY_b002f=f20 # Microphone mute button; should be micmute ++ ++########################################################### + # Quanta + ########################################################### + +-- +1.7.9.2 + diff --git a/0007-po-add-German-translation.patch b/0007-po-add-German-translation.patch new file mode 100644 index 00000000..d653c8ff --- /dev/null +++ b/0007-po-add-German-translation.patch @@ -0,0 +1,448 @@ +From 351e57652a7d9a51f9064c089794d13801eaee73 Mon Sep 17 00:00:00 2001 +From: Benjamin Steinwender +Date: Sun, 8 Jun 2014 18:39:50 +0200 +Subject: [PATCH] po: add German translation + +https://bugs.freedesktop.org/show_bug.cgi?id=79430 +--- + po/LINGUAS | 1 + + po/de.po | 418 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 419 insertions(+) + create mode 100644 po/de.po + +diff --git po/LINGUAS po/LINGUAS +index 820ca82..2cb0f30 100644 +--- po/LINGUAS ++++ po/LINGUAS +@@ -1,3 +1,4 @@ ++de + el + fr + it +diff --git po/de.po po/de.po +new file mode 100644 +index 0000000..a41e33d +--- /dev/null ++++ po/de.po +@@ -0,0 +1,418 @@ ++# German translation for systemd. ++# Copyright (C) 2014 systemd's COPYRIGHT HOLDER ++# This file is distributed under the same license as the systemd package. ++# Christian Kirbach , 2014. ++# Benjamin Steinwender , 2014. ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: systemd master\n" ++"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?" ++"product=systemd&keywords=I18N+L10N&component=general\n" ++"POT-Creation-Date: 2014-06-02 10:25+0000\n" ++"PO-Revision-Date: 2014-06-02 22:43+0100\n" ++"Last-Translator: Benjamin Steinwender \n" ++"Language-Team: German \n" ++"Language: de\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=2; plural=(n != 1);\n" ++"X-Generator: Poedit 1.6.5\n" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:1 ++msgid "Set host name" ++msgstr "Rechnername festlegen" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:2 ++msgid "Authentication is required to set the local host name." ++msgstr "Legitimierung ist zum Festlegen des lokalen Rechnernamens notwendig" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:3 ++msgid "Set static host name" ++msgstr "Statischen Rechnernamen festlegen" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:4 ++msgid "" ++"Authentication is required to set the statically configured local host name, " ++"as well as the pretty host name." ++msgstr "" ++"Authentifizierung ist erforderlich, um den statisch geänderten, lokalen " ++"Rechnernamen, sowie den beschönigten Rechnernamen festzulegen." ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:5 ++msgid "Set machine information" ++msgstr "Maschinen-Information festlegen" ++ ++#: ../src/hostname/org.freedesktop.hostname1.policy.in.h:6 ++msgid "Authentication is required to set local machine information." ++msgstr "" ++"Legitimierung ist zum Festlegen der lokalen Maschinen-Information " ++"erforderlich." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:1 ++msgid "Set system locale" ++msgstr "Die lokale Sprachumgebung festlegen" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:2 ++msgid "Authentication is required to set the system locale." ++msgstr "" ++"Legitimierung ist zum Festlegen der systemweiten Spracheinstellungen " ++"erforderlich." ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:3 ++msgid "Set system keyboard settings" ++msgstr "Tastatureinstellungen des Systems festlegen" ++ ++#: ../src/locale/org.freedesktop.locale1.policy.in.h:4 ++msgid "Authentication is required to set the system keyboard settings." ++msgstr "" ++"Legitimierung ist zum Festlegen der Tastatureinstellungen des Systems " ++"erforderlich." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:1 ++msgid "Allow applications to inhibit system shutdown" ++msgstr "Anwendungen dürfen das Herunterfahren des Systems unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:2 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"shutdown." ++msgstr "" ++"Legitimierung ist notwendig, um Anwendungen das Herunterfahren des Systems " ++"zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:3 ++msgid "Allow applications to delay system shutdown" ++msgstr "Anwendungen dürfen das Herunterfahren des Systems verzögern" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:4 ++msgid "" ++"Authentication is required to allow an application to delay system shutdown." ++msgstr "" ++"Legitimierung ist notwendig, um Anwendungen das Verzögern des Herunterfahren " ++"des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:5 ++msgid "Allow applications to inhibit system sleep" ++msgstr "Anwendungen dürfen den Bereitschaftsmodus unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:6 ++msgid "" ++"Authentication is required to allow an application to inhibit system sleep." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden des " ++"Bereitschaftsmodus zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:7 ++msgid "Allow applications to delay system sleep" ++msgstr "Anwendungen dürfen den Bereitschaftsmodus verzögern" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:8 ++msgid "" ++"Authentication is required to allow an application to delay system sleep." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Verzögern des " ++"Bereitschaftsmodus zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:9 ++msgid "Allow applications to inhibit automatic system suspend" ++msgstr "Anwendungen dürfen den automatischen Bereitschaftsmodus unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:10 ++msgid "" ++"Authentication is required to allow an application to inhibit automatic " ++"system suspend." ++msgstr "" ++"Legitimierung ist notwendig, um Anwendungen das Unterbinden des " ++"automatischen Bereitschaftsmodus zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:11 ++msgid "Allow applications to inhibit system handling of the power key" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Ein-/Ausschaltknopfs des Systems " ++"unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:12 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the power key." ++msgstr "" ++"Legitmierung ist erforderlich, um Anwendungen das Unterbinden der Auswertung " ++"der Ein-/Ausschaltknopfs des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:13 ++msgid "Allow applications to inhibit system handling of the suspend key" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Bereitschaftsknopfs des Systems " ++"unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:14 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the suspend key." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden der " ++"Auswertung des Bereitschaftsknopfes des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:15 ++msgid "Allow applications to inhibit system handling of the hibernate key" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Knopfs für den Ruhezustand unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:16 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the hibernate key." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden der " ++"Auswertung des Knopfs für den Ruhezustand zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:17 ++msgid "Allow applications to inhibit system handling of the lid switch" ++msgstr "" ++"Anwendungen dürfen das Auswerten des Notebookdeckelschalters unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:18 ++msgid "" ++"Authentication is required to allow an application to inhibit system " ++"handling of the lid switch." ++msgstr "" ++"Legitimierung ist erforderlich, um Anwendungen das Unterbinden der " ++"Auswertung des Notebookdeckelschalters des Systems zu erlauben." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:19 ++msgid "Allow non-logged-in users to run programs" ++msgstr "Nicht angemeldete Benutzer dürfen Programme ausführen" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:20 ++msgid "" ++"Authentication is required to allow a non-logged-in user to run programs." ++msgstr "" ++"Legitimierung ist erforderlich, damit nicht angemeldete Benutzer Programme " ++"ausführen dürfen." ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:21 ++msgid "Allow attaching devices to seats" ++msgstr "Das Anschließen von Geräten an Arbeitsstationen erlauben" ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:22 ++msgid "Authentication is required for attaching a device to a seat." ++msgstr "" ++"Legitimierung ist zum Anschließen eines Geräts an eine Arbeitsstation " ++"notwendig." ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:23 ++msgid "Flush device to seat attachments" ++msgstr "Zurücksetzen der an eine Arbeitsstation angeschlossenen Geräte" ++ ++# www.freedesktop.org/wiki/Software/systemd/multiseat/ ++#: ../src/login/org.freedesktop.login1.policy.in.h:24 ++msgid "" ++"Authentication is required for resetting how devices are attached to seats." ++msgstr "" ++"Legitimierung ist zum Zurücksetzen notwendig, wie Geräte an eine " ++"Arbeitsstation angeschlossen werden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:25 ++msgid "Power off the system" ++msgstr "Das System ausschalten" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:26 ++msgid "Authentication is required for powering off the system." ++msgstr "Legitimierung ist zum Ausschalten des Systems notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:27 ++msgid "Power off the system while other users are logged in" ++msgstr "Das System herunter fahren, während andere Benutzer angemeldet sind" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:28 ++msgid "" ++"Authentication is required for powering off the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Herunterfahren des Systems notwendig, während andere " ++"Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:29 ++msgid "Power off the system while an application asked to inhibit it" ++msgstr "" ++"Das System ausschalten, während eine Anwendung anfordert es zu unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:30 ++msgid "" ++"Authentication is required for powering off the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Ausschalten des Systems notwendig, während eine " ++"Anwendung anfordert es zu unterbinden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:31 ++msgid "Reboot the system" ++msgstr "Das System neu starten" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:32 ++msgid "Authentication is required for rebooting the system." ++msgstr "Legitimierung ist zum Neustart des Systems notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:33 ++msgid "Reboot the system while other users are logged in" ++msgstr "Das Systems neu starten, während andere Benutzer angemeldet sind" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:34 ++msgid "" ++"Authentication is required for rebooting the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Neustart des Systems notwendig, während andere " ++"Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:35 ++msgid "Reboot the system while an application asked to inhibit it" ++msgstr "" ++"Das System neu starten, während eine Anwendung anfordert es zu unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:36 ++msgid "" ++"Authentication is required for rebooting the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Neustart des Systems notwendig, während eine Anwendung " ++"anforderte es zu unterbinden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:37 ++msgid "Suspend the system" ++msgstr "Das System in Bereitschaft versetzen" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:38 ++msgid "Authentication is required for suspending the system." ++msgstr "Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:39 ++msgid "Suspend the system while other users are logged in" ++msgstr "" ++"Das System in Bereitschaft versetzen, während andere Benutzer angemeldet " ++"sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:40 ++msgid "" ++"Authentication is required for suspending the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig, " ++"während andere Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:41 ++msgid "Suspend the system while an application asked to inhibit it" ++msgstr "" ++"Das System in Bereitschaft versetzen, während eine Anwendung anfordert dies " ++"zu unterbinden" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:42 ++msgid "" ++"Authentication is required for suspending the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Versetzen des Systems in Bereitschaft notwendig, " ++"während eine Anwendung anfordert dies zu unterbinden." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:43 ++msgid "Hibernate the system" ++msgstr "Den Ruhezustand des Systems aktivieren" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:44 ++msgid "Authentication is required for hibernating the system." ++msgstr "" ++"Legitimierung ist zum Aktivieren des Ruhezustands des Systems notwendig." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:45 ++msgid "Hibernate the system while other users are logged in" ++msgstr "" ++"Den Ruhezustand des Systems aktivieren, während andere Benutzer angemeldet " ++"sind" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:46 ++msgid "" ++"Authentication is required for hibernating the system while other users are " ++"logged in." ++msgstr "" ++"Legitimierung ist zum Aktivieren des Ruhezustands des Systems notwendig, " ++"während andere Benutzer angemeldet sind." ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:47 ++msgid "Hibernate the system while an application asked to inhibit it" ++msgstr "" ++"Das System in den Ruhezustand versetzen, während eine Anwendung wünscht dies " ++"zu verhindern" ++ ++#: ../src/login/org.freedesktop.login1.policy.in.h:48 ++msgid "" ++"Authentication is required for hibernating the system while an application " ++"asked to inhibit it." ++msgstr "" ++"Legitimierung ist zum Versetzen des System in den Ruhezustand notwendig, " ++"während eine Anwendung wünscht dies zu verhindern." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1 ++msgid "Set system time" ++msgstr "Die Systemzeit festlegen" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:2 ++msgid "Authentication is required to set the system time." ++msgstr "Legitimierung ist zum Festlegen der Systemzeit notwendig." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:3 ++msgid "Set system timezone" ++msgstr "Die Systemzeitzone festlegen" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:4 ++msgid "Authentication is required to set the system timezone." ++msgstr "Legitimierung ist zum Festlegen der Systemzeitzone notwendig." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:5 ++msgid "Set RTC to local timezone or UTC" ++msgstr "Echtzeituhr auf lokale Zeitzone oder UTC setzen" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:6 ++msgid "" ++"Authentication is required to control whether the RTC stores the local or " ++"UTC time." ++msgstr "" ++"Legitimierung ist notwendig zum Festlegen, ob die Echtzeituhr auf lokale " ++"Zeitzone oder UTC eingestellt ist." ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:7 ++msgid "Turn network time synchronization on or off" ++msgstr "Netzwerkzeitabgeich ein- oder ausschalten" ++ ++#: ../src/timedate/org.freedesktop.timedate1.policy.in.h:8 ++msgid "" ++"Authentication is required to control whether network time synchronization " ++"shall be enabled." ++msgstr "" ++"Legitimierung ist zum Festlegen, ob Netzwerkzeitabgeich eingeschaltet sein " ++"soll, erforderlich." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:1 ++msgid "Send passphrase back to system" ++msgstr "Passphrase zurück an das System senden" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:2 ++msgid "" ++"Authentication is required to send the entered passphrase back to the system." ++msgstr "" ++"Legitimierung ist zum Senden des eingegebenen Kennworts zurück an das System " ++"notwendig." ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3 ++msgid "Privileged system and service manager access" ++msgstr "Privilegierter Zugriff auf die System- und Dienstverwaltung" ++ ++#: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4 ++msgid "Authentication is required to access the system and service manager." ++msgstr "" ++"Legitimierung ist notwendig für den Zugriff auf die System- und " ++"Dienstverwaltung." +-- +1.7.9.2 + diff --git a/0001-systemd-empty-sigmask-on-reexec.patch b/0008-Reset-signal-mask-on-re-exec-to-init.patch similarity index 53% rename from 0001-systemd-empty-sigmask-on-reexec.patch rename to 0008-Reset-signal-mask-on-re-exec-to-init.patch index f4f3ac92..9fe7d1ea 100644 --- a/0001-systemd-empty-sigmask-on-reexec.patch +++ b/0008-Reset-signal-mask-on-re-exec-to-init.patch @@ -1,16 +1,23 @@ -Process 1 (aka init) needs to be started with an empty signal mask. That -includes the process 1 that's started after the initrd is finished. When the -initrd is using systemd (as it does with dracut based initrds) then it is -systemd that calls the real init. Normally this is systemd again, except -when the user uses for instance "init=/bin/bash" on the kernel command line. +From 5a85ca1cb622fda4a39c8a6f00dccea7f8a1e82a Mon Sep 17 00:00:00 2001 +From: Ruediger Oertel +Date: Fri, 13 Jun 2014 16:41:06 +0200 +Subject: [PATCH] Reset signal-mask on re-exec to init=.. +Process 1 (aka init) needs to be started with an empty signal mask. +That includes the process 1 that's started after the initrd is finished. +When the initrd is using systemd (as it does with dracut based initrds) +then it is systemd that calls the real init. Normally this is systemd +again, except when the user uses for instance "init=/bin/bash" on the +kernel command line. --- - main.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + src/core/main.c | 8 ++++++++ + 1 file changed, 8 insertions(+) +diff --git src/core/main.c src/core/main.c +index 3aac5d1..3e57f07 100644 --- src/core/main.c -+++ src/core/main.c 2014-02-27 13:54:21.922236495 +0000 -@@ -1780,6 +1780,7 @@ finish: ++++ src/core/main.c +@@ -1843,6 +1843,7 @@ finish: if (reexecute) { const char **args; unsigned i, args_size; @@ -18,25 +25,27 @@ when the user uses for instance "init=/bin/bash" on the kernel command line. /* Close and disarm the watchdog, so that the new * instance can reinitialize it, but doesn't get -@@ -1863,6 +1864,11 @@ finish: +@@ -1926,6 +1927,11 @@ finish: args[i++] = NULL; assert(i <= args_size); + /* reenable any blocked signals, especially important + * if we switch from initial ramdisk to init=... */ + sigemptyset(&ss); -+ sigprocmask(SIG_SETMASK,&ss,&o_ss); ++ sigprocmask(SIG_SETMASK, &ss, &o_ss); + if (switch_root_init) { args[0] = switch_root_init; execv(args[0], (char* const*) args); -@@ -1881,6 +1887,9 @@ finish: +@@ -1944,6 +1950,8 @@ finish: log_error("Failed to execute /bin/sh, giving up: %m"); } else log_warning("Failed to execute /sbin/init, giving up: %m"); + -+ /* back to saved state if reexec failed */ -+ sigprocmask(SIG_SETMASK,&o_ss,NULL); ++ sigprocmask(SIG_SETMASK, &o_ss, NULL); } if (arg_serialization) { +-- +1.7.9.2 + diff --git a/0009-core-clean-up-signal-reset-logic-when-reexec.patch b/0009-core-clean-up-signal-reset-logic-when-reexec.patch new file mode 100644 index 00000000..cfe54186 --- /dev/null +++ b/0009-core-clean-up-signal-reset-logic-when-reexec.patch @@ -0,0 +1,50 @@ +From 9bfcda9528636914aef3e0ab91191bb81654c83d Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 20 Jun 2014 16:58:21 +0200 +Subject: [PATCH] core: clean-up signal reset logic when reexec + +There's no need to save the old sigmask, if we are going to die. Let's +simplify this. Also, reset all the signal handlers, so that we don't +leave SIG_IGN set for some of them across reexec. +--- + src/core/main.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git src/core/main.c src/core/main.c +index 863ba52..6981e72 100644 +--- src/core/main.c ++++ src/core/main.c +@@ -1824,7 +1824,7 @@ finish: + if (reexecute) { + const char **args; + unsigned i, args_size; +- sigset_t ss, o_ss; ++ sigset_t ss; + + /* Close and disarm the watchdog, so that the new + * instance can reinitialize it, but doesn't get +@@ -1910,8 +1910,10 @@ finish: + + /* reenable any blocked signals, especially important + * if we switch from initial ramdisk to init=... */ +- sigemptyset(&ss); +- sigprocmask(SIG_SETMASK, &ss, &o_ss); ++ reset_all_signal_handlers(); ++ ++ assert_se(sigemptyset(&ss) == 0); ++ assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0); + + if (switch_root_init) { + args[0] = switch_root_init; +@@ -1931,8 +1933,6 @@ finish: + log_error("Failed to execute /bin/sh, giving up: %m"); + } else + log_warning("Failed to execute /sbin/init, giving up: %m"); +- +- sigprocmask(SIG_SETMASK, &o_ss, NULL); + } + + if (arg_serialization) { +-- +1.7.9.2 + diff --git a/0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch b/0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch new file mode 100644 index 00000000..e99c1a0d --- /dev/null +++ b/0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch @@ -0,0 +1,25 @@ +From da92ca5eb506d513033e0c7a85daf25a7e1c9d0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 20 Jun 2014 22:43:49 -0400 +Subject: [PATCH] util: treat fuse.sshfs as a network filesystem + +https://bugs.freedesktop.org/show_bug.cgi?id=73727 +--- + src/shared/util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git src/shared/util.c src/shared/util.c +index 882a690..dbdb692 100644 +--- src/shared/util.c ++++ src/shared/util.c +@@ -1514,6 +1514,7 @@ bool fstype_is_network(const char *fstype) { + static const char table[] = + "cifs\0" + "smbfs\0" ++ "sshfs\0" + "ncpfs\0" + "ncp\0" + "nfs\0" +-- +1.7.9.2 + diff --git a/0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch b/0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch new file mode 100644 index 00000000..325f04a9 --- /dev/null +++ b/0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch @@ -0,0 +1,28 @@ +From 8e75477abdd838d3beddc5fd1c6a7707b22748b6 Mon Sep 17 00:00:00 2001 +From: Ronny Chevalier +Date: Sat, 21 Jun 2014 22:07:09 +0200 +Subject: [PATCH] build-sys: add -pthread flag for libsystemd-shared + +src/shared/async.c uses pthread so it will fail at link time if we link +only to libsystemd-shared and use async +--- + Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git Makefile.am Makefile.am +index c7653ea..00db82d 100644 +--- Makefile.am ++++ Makefile.am +@@ -837,7 +837,8 @@ nodist_libsystemd_shared_la_SOURCES = \ + + libsystemd_shared_la_CFLAGS = \ + $(AM_CFLAGS) \ +- $(SECCOMP_CFLAGS) ++ $(SECCOMP_CFLAGS) \ ++ -pthread + + # ------------------------------------------------------------------------------ + noinst_LTLIBRARIES += \ +-- +1.7.9.2 + diff --git a/0012-core-transaction-avoid-misleading-error-message-when.patch b/0012-core-transaction-avoid-misleading-error-message-when.patch new file mode 100644 index 00000000..03021cd2 --- /dev/null +++ b/0012-core-transaction-avoid-misleading-error-message-when.patch @@ -0,0 +1,42 @@ +Based on 04ef5b03f64d3824a51a2a903548af029a006744 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 22 Jun 2014 14:04:23 -0400 +Subject: [PATCH] core/transaction: avoid misleading error message when unit + not found + +There's no point in telling the user to look at the logs when +an attempt to load the unit file failed with ENOENT. + +https://bugzilla.redhat.com/show_bug.cgi?id=996133 +--- + TODO | 4 ---- + src/core/transaction.c | 18 ++++++++++++------ + 2 files changed, 12 insertions(+), 10 deletions(-) + +--- src/core/transaction.c ++++ src/core/transaction.c 2014-06-24 11:18:42.746235805 +0000 +@@ -865,12 +865,18 @@ int transaction_add_job_and_dependencies + } + + if (type != JOB_STOP && unit->load_state == UNIT_ERROR) { +- sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED, +- "Unit %s failed to load: %s. " +- "See system logs and 'systemctl status %s' for details.", +- unit->id, +- strerror(-unit->load_error), +- unit->id); ++ if (unit->load_error == -ENOENT) ++ sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED, ++ "Unit %s failed to load: %s.", ++ unit->id, ++ strerror(-unit->load_error)); ++ else ++ sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED, ++ "Unit %s failed to load: %s. " ++ "See system logs and 'systemctl status %s' for details.", ++ unit->id, ++ strerror(-unit->load_error), ++ unit->id); + return -EINVAL; + } + diff --git a/1021-udev-re-add-persistent-net-rules.patch b/1021-udev-re-add-persistent-net-rules.patch new file mode 100644 index 00000000..e8cd290c --- /dev/null +++ b/1021-udev-re-add-persistent-net-rules.patch @@ -0,0 +1,532 @@ +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -0,0 +1,105 @@ ++# do not edit this file, it will be overwritten on update ++ ++# these rules generate rules for persistent network device naming ++# ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer ++ ++ACTION!="add", GOTO="persistent_net_generator_end" ++SUBSYSTEM!="net", GOTO="persistent_net_generator_end" ++ ++# ignore the interface if a name has already been set ++NAME=="?*", GOTO="persistent_net_generator_end" ++ ++# device name whitelist ++KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" ++ ++IMPORT{cmdline}="net.ifnames" ++ENV{net.ifnames}=="1", GOTO="persistent_net_generator_end" ++ ++# ignore Xen virtual interfaces ++SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" ++ ++# read MAC address ++ENV{MATCHADDR}="$attr{address}" ++ ++# match interface type ++ENV{MATCHIFTYPE}="$attr{type}" ++ ++# ignore KVM virtual interfaces ++ENV{MATCHADDR}=="52:54:00:*", GOTO="persistent_net_generator_end" ++# ignore VMWare virtual interfaces ++ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" ++# ignore Hyper-V virtual interfaces ++ENV{MATCHADDR}=="00:15:5d:*", GOTO="persistent_net_generator_end" ++ ++# These vendors are known to violate the local MAC address assignment scheme ++# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom ++ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist" ++# 3Com ++ENV{MATCHADDR}=="02:60:60:*", GOTO="globally_administered_whitelist" ++# 3Com IBM PC; Imagen; Valid; Cisco; Apple ++ENV{MATCHADDR}=="02:60:8c:*", GOTO="globally_administered_whitelist" ++# Intel ++ENV{MATCHADDR}=="02:a0:c9:*", GOTO="globally_administered_whitelist" ++# Olivetti ++ENV{MATCHADDR}=="02:aa:3c:*", GOTO="globally_administered_whitelist" ++# CMC Masscomp; Silicon Graphics; Prime EXL ++ENV{MATCHADDR}=="02:cf:1f:*", GOTO="globally_administered_whitelist" ++# Prominet Corporation Gigabit Ethernet Switch ++ENV{MATCHADDR}=="02:e0:3b:*", GOTO="globally_administered_whitelist" ++# BTI (Bus-Tech, Inc.) IBM Mainframes ++ENV{MATCHADDR}=="02:e6:d3:*", GOTO="globally_administered_whitelist" ++# Realtek ++ENV{MATCHADDR}=="52:54:00:*", GOTO="globally_administered_whitelist" ++# Novell 2000 ++ENV{MATCHADDR}=="52:54:4c:*", GOTO="globally_administered_whitelist" ++# Realtec ++ENV{MATCHADDR}=="52:54:ab:*", GOTO="globally_administered_whitelist" ++# Kingston Technologies ++ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="globally_administered_whitelist" ++# Xensource ++ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" ++ ++# match interface dev_id ++ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++ ++# do not use "locally administered" MAC address ++ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" ++ ++# do not use empty address ++ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" ++ ++LABEL="globally_administered_whitelist" ++ ++# build comment line for generated rule: ++SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="?*", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" ++SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" ++SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" ++ ++# ibmveth likes to use "locally administered" MAC addresses ++DRIVERS=="ibmveth", ENV{MATCHADDR}="$attr{address}", ENV{COMMENT}="ibmveth ($id)" ++ ++# S/390 uses id matches only, do not use MAC address match ++SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}="" ++ ++# see if we got enough data to create a rule ++ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", GOTO="persistent_net_generator_end" ++ ++# default comment ++ENV{COMMENT}=="", ENV{COMMENT}="net device ($attr{driver})" ++ ++# write rule ++DRIVERS=="?*", IMPORT{program}="write_net_rules" ++ ++# rename interface if needed ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ ++LABEL="persistent_net_generator_end" +Index: systemd-210/src/udev/rule_generator/rule_generator.functions +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/rule_generator.functions +@@ -0,0 +1,113 @@ ++# functions used by the udev rule generator ++ ++# Copyright (C) 2006 Marco d'Itri ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 2 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++PATH='/usr/bin:/bin:/usr/sbin:/sbin' ++ ++# Read a single line from file $1 in the $DEVPATH directory. ++# The function must not return an error even if the file does not exist. ++sysread() { ++ local file="$1" ++ [ -e "/sys$DEVPATH/$file" ] || return 0 ++ local value ++ read value < "/sys$DEVPATH/$file" || return 0 ++ echo "$value" ++} ++ ++sysreadlink() { ++ local file="$1" ++ [ -e "/sys$DEVPATH/$file" ] || return 0 ++ readlink -f /sys$DEVPATH/$file 2> /dev/null || true ++} ++ ++# Return true if a directory is writeable. ++writeable() { ++ if ln -s test-link $1/.is-writeable 2> /dev/null; then ++ rm -f $1/.is-writeable ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++# Create a lock file for the current rules file. ++lock_rules_file() { ++ RUNDIR="/run/udev" ++ [ -e "$RUNDIR" ] || return 0 ++ ++ RULES_LOCK="$RUNDIR/.lock-${RULES_FILE##*/}" ++ ++ retry=30 ++ while ! mkdir $RULES_LOCK 2> /dev/null; do ++ if [ $retry -eq 0 ]; then ++ echo "Cannot lock $RULES_FILE!" >&2 ++ exit 2 ++ fi ++ sleep 1 ++ retry=$(($retry - 1)) ++ done ++} ++ ++unlock_rules_file() { ++ [ "$RULES_LOCK" ] || return 0 ++ rmdir $RULES_LOCK || true ++} ++ ++# Choose the real rules file if it is writeable or a temporary file if not. ++# Both files should be checked later when looking for existing rules. ++choose_rules_file() { ++ RUNDIR="/run/udev" ++ local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}" ++ [ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1 ++ ++ if writeable ${RULES_FILE%/*}; then ++ RO_RULES_FILE='/dev/null' ++ else ++ RO_RULES_FILE=$RULES_FILE ++ RULES_FILE=$tmp_rules_file ++ fi ++} ++ ++# Return the name of the first free device. ++raw_find_next_available() { ++ local links="$1" ++ ++ local basename=${links%%[ 0-9]*} ++ local max=-1 ++ for name in $links; do ++ local num=${name#$basename} ++ [ "$num" ] || num=0 ++ [ $num -gt $max ] && max=$num ++ done ++ ++ local max=$(($max + 1)) ++ # "name0" actually is just "name" ++ [ $max -eq 0 ] && return ++ echo "$max" ++} ++ ++# Find all rules matching a key (with action) and a pattern. ++find_all_rules() { ++ local key="$1" ++ local linkre="$2" ++ local match="$3" ++ ++ local search='.*[[:space:],]'"$key"'"('"$linkre"')".*' ++ echo $(sed -n -r -e 's/^#.*//' -e "${match}s/${search}/\1/p" \ ++ $RO_RULES_FILE \ ++ $([ -e $RULES_FILE ] && echo $RULES_FILE) \ ++ 2>/dev/null) ++} +Index: systemd-210/src/udev/rule_generator/write_net_rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/write_net_rules +@@ -0,0 +1,141 @@ ++#!/bin/sh -e ++ ++# This script is run to create persistent network device naming rules ++# based on properties of the device. ++# If the interface needs to be renamed, INTERFACE_NEW= will be printed ++# on stdout to allow udev to IMPORT it. ++ ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDEVID dev_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer ++ ++# Copyright (C) 2006 Marco d'Itri ++# Copyright (C) 2007 Kay Sievers ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++# debug, if UDEV_LOG= ++if [ -n "$UDEV_LOG" ]; then ++ if [ "$UDEV_LOG" -ge 7 ]; then ++ set -x ++ fi ++fi ++ ++RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' ++ ++. /usr/lib/udev/rule_generator.functions ++ ++interface_name_taken() { ++ local value="$(find_all_rules 'NAME=' $INTERFACE)" ++ if [ "$value" ]; then ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++find_next_available() { ++ raw_find_next_available "$(find_all_rules 'NAME=' "$1")" ++} ++ ++write_rule() { ++ local match="$1" ++ local name="$2" ++ local comment="$3" ++ ++ { ++ if [ "$PRINT_HEADER" ]; then ++ PRINT_HEADER= ++ echo "# This file was automatically generated by the $0" ++ echo "# program, run by the persistent-net-generator.rules rules file." ++ echo "#" ++ echo "# You can modify it, as long as you keep each rule on a single" ++ echo "# line, and change only the value of the NAME= key." ++ fi ++ ++ echo "" ++ [ "$comment" ] && echo "# $comment" ++ echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\"" ++ } >> $RULES_FILE ++} ++ ++if [ -z "$INTERFACE" ]; then ++ echo "missing \$INTERFACE" >&2 ++ exit 1 ++fi ++ ++# Prevent concurrent processes from modifying the file at the same time. ++lock_rules_file ++ ++# Check if the rules file is writeable. ++choose_rules_file ++ ++# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces ++if [ "$MATCHADDR" ]; then ++ match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\"" ++fi ++ ++if [ "$MATCHDRV" ]; then ++ match="$match, DRIVERS==\"$MATCHDRV\"" ++fi ++ ++if [ "$MATCHDEVID" ]; then ++ match="$match, ATTR{dev_id}==\"$MATCHDEVID\"" ++fi ++ ++if [ "$MATCHID" ]; then ++ match="$match, KERNELS==\"$MATCHID\"" ++fi ++ ++if [ "$MATCHIFTYPE" ]; then ++ match="$match, ATTR{type}==\"$MATCHIFTYPE\"" ++fi ++ ++if [ -z "$match" ]; then ++ echo "missing valid match" >&2 ++ unlock_rules_file ++ exit 1 ++fi ++ ++basename=${INTERFACE%%[0-9]*} ++match="$match, KERNEL==\"$basename*\"" ++ ++if [ "$INTERFACE_NAME" ]; then ++ # external tools may request a custom name ++ COMMENT="$COMMENT (custom name provided by external tool)" ++ if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then ++ INTERFACE=$INTERFACE_NAME; ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++else ++ # if a rule using the current name already exists, find a new name ++ if interface_name_taken; then ++ INTERFACE="$basename$(find_next_available "$basename[0-9]*")" ++ # prevent INTERFACE from being "eth" instead of "eth0" ++ [ "$INTERFACE" = "${INTERFACE%%[ \[\]0-9]*}" ] && INTERFACE=${INTERFACE}0 ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++fi ++ ++write_rule "$match" "$INTERFACE" "$COMMENT" ++ ++unlock_rules_file ++ ++exit 0 +Index: systemd-210/Makefile.am +=================================================================== +--- systemd-210.orig/Makefile.am ++++ systemd-210/Makefile.am +@@ -2552,7 +2552,14 @@ dist_udevrules_DATA += \ + rules/75-tty-description.rules \ + rules/78-sound-card.rules \ + rules/80-net-setup-link.rules \ +- rules/95-udev-late.rules ++ rules/95-udev-late.rules \ ++ src/udev/rule_generator/75-persistent-net-generator.rules \ ++ src/udev/rule_generator/76-net-sriov-names.rules ++ ++udevlibexec_PROGRAMS += \ ++ src/udev/rule_generator/rule_generator.functions \ ++ src/udev/rule_generator/write_net_rules \ ++ src/udev/rule_generator/net-set-sriov-names + + dist_udevhwdb_DATA = \ + hwdb/20-pci-vendor-model.hwdb \ +Index: systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +@@ -0,0 +1,18 @@ ++# do not edit this file, it will be overwritten on update ++# ++# rename SRIOV virtual function interfaces ++ ++ACTION=="remove", GOTO="net-sriov-names_end" ++SUBSYSTEM!="net", GOTO="net-sriov-names_end" ++ ++IMPORT{cmdline}="net.ifnames" ++ENV{net.ifnames}=="1", GOTO="net-sriov-names_end" ++ ++SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", NAME=="?*", ENV{INTERFACE_NEW}="$name" ++SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", IMPORT{program}="net-set-sriov-names" ++ ++# rename interface if needed ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ENV{INTERFACE_NEW}=="", DRIVERS=="cxgb4vf|igbvf|ixgbevf", NAME="vf$attr{ifindex}" ++ ++LABEL="net-sriov-names_end" +Index: systemd-210/src/udev/rule_generator/net-set-sriov-names +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/net-set-sriov-names +@@ -0,0 +1,79 @@ ++#!/bin/bash -e ++# ++# This script is run to rename virtual interfaces ++# ++ ++if [ -n "$UDEV_LOG" ]; then ++ if [ "$UDEV_LOG" -ge 7 ]; then ++ set -x ++ fi ++fi ++ ++# according to dev_new_index(), ifindex is within [1, INT_MAX] ++int_max=$(/usr/bin/getconf INT_MAX) ++ifindex_before() { ++ a=$1 ++ b=$2 ++ ++ ((0 < (b - a) && (b - a) < int_max / 2 || ++ -1 * int_max < (b - a) && (b - a) < -1 * int_max / 2)) ++} ++ ++rename_interface() { ++ local src_net=$1 ++ local dest_net=$2 ++ local err=0 ++ ++ /sbin/ip link set dev $src_net down ++ /sbin/ip link set dev $src_net name $dest_net ++} ++ ++if [ -z "$INTERFACE" ]; then ++ echo "missing \$INTERFACE" >&2 ++ exit 1 ++fi ++ ++if [ -e "/sys/class/net/$INTERFACE/device/physfn" ]; then ++ pf=$(ls -1 "/sys/class/net/$INTERFACE/device/physfn/net") ++ if [ $(echo "$pf" | wc -l) -ne 1 ]; then ++ echo "too many pf's" >&2 ++ exit 1 ++ fi ++ read vfindex < "/sys/class/net/$INTERFACE/ifindex" ++ read pfindex < "/sys/class/net/$pf/ifindex" ++ if ifindex_before $pfindex $vfindex; then ++ bus_info=$(basename $(readlink "/sys/class/net/$INTERFACE/device")) ++ for virtfn in "/sys/class/net/$pf/device/"virtfn*; do ++ if [ "$(basename $(readlink "$virtfn"))" = "$bus_info" ]; then ++ vfnum=$(basename "$virtfn") ++ vfnum=${vfnum#virtfn} ++ echo "INTERFACE_NEW=$pf.vf$vfnum" ++ exit 0 ++ fi ++ done ++ fi ++fi ++ ++read pfindex < "/sys/class/net/$INTERFACE/ifindex" ++shopt -s nullglob ++for virtfn in "/sys/class/net/$INTERFACE/device/"virtfn*; do ++ vf=$(ls -1 "$virtfn/net") ++ if [ $(echo "$vf" | wc -l) -ne 1 ]; then ++ echo "too many vf's" >&2 ++ exit 1 ++ fi ++ read vfindex < "/sys/class/net/$vf/ifindex" ++ if ifindex_before $vfindex $pfindex; then ++ vfnum=$(basename "$virtfn") ++ vfnum=${vfnum#virtfn} ++ if [ "$INTERFACE_NEW" ]; then ++ new_name=$INTERFACE_NEW ++ else ++ new_name=$INTERFACE ++ fi ++ new_name="$new_name.vf$vfnum" ++ if [ "$vf" != "$new_name" ]; then ++ rename_interface "$vf" "$new_name" ++ fi ++ fi ++done +Index: systemd-210/src/udev/net/link-config.c +=================================================================== +--- systemd-210.orig/src/udev/net/link-config.c ++++ systemd-210/src/udev/net/link-config.c +@@ -193,6 +193,18 @@ static bool enable_name_policy(void) { + r = proc_cmdline(&line); + if (r < 0) + log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r)); ++#if defined(NET_IFNAMES) && (NET_IFNAMES == 1) ++# warning Using persistent rules as a default ++ if (r <= 0) ++ return false; ++ ++ FOREACH_WORD_QUOTED(w, l, line, state) ++ if (strneq(w, "net.ifnames=1", l)) ++ return true; ++ ++ return false; ++#else ++# warning Using predictable rules as a default + if (r <= 0) + return true; + +@@ -201,6 +213,7 @@ static bool enable_name_policy(void) { + return false; + + return true; ++#endif + } + + int link_config_load(link_config_ctx *ctx) { diff --git a/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch new file mode 100644 index 00000000..39e385c0 --- /dev/null +++ b/1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch @@ -0,0 +1,1445 @@ +From 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 12 Apr 2014 22:35:50 -0700 +Subject: [PATCH] udev: remove seqnum API and all assumptions about seqnums + +The way the kernel namespaces have been implemented breaks assumptions +udev made regarding uevent sequence numbers. Creating devices in a +namespace "steals" uevents and its sequence numbers from the host. It +confuses the "udevadmin settle" logic, which might block until util a +timeout is reached, even when no uevent is pending. + +Remove any assumptions about sequence numbers and deprecate libudev's +API exposing these numbers; none of that can reliably be used anymore +when namespaces are involved. +--- + Makefile.am | 6 +- + man/udevadm.xml | 22 -- + src/libudev/libudev-monitor.c | 17 +- + src/libudev/libudev-queue-private.c | 406 ----------------------------------- + src/libudev/libudev-queue.c | 302 ++------------------------ + src/libudev/libudev.h | 10 +- + src/shared/udev-util.h | 2 - + src/test/test-libudev.c | 24 --- + src/udev/udev-ctrl.c | 2 +- + src/udev/udevadm-settle.c | 131 ++--------- + src/udev/udevd.c | 59 +++-- + 11 files changed, 84 insertions(+), 897 deletions(-) + delete mode 100644 src/libudev/libudev-queue-private.c + +diff --git Makefile.am Makefile.am +index 5d84605..0ad1729 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2587,8 +2587,7 @@ noinst_LTLIBRARIES += \ + + libudev_internal_la_SOURCES =\ + $(libudev_la_SOURCES) \ +- src/libudev/libudev-device-private.c \ +- src/libudev/libudev-queue-private.c ++ src/libudev/libudev-device-private.c + + libudev_internal_la_CFLAGS = \ + $(AM_CFLAGS) \ +@@ -5169,6 +5168,9 @@ test_libsystemd_sym_LDADD = \ + + test_libudev_sym_SOURCES = \ + test-libudev-sym.c ++test_libudev_sym_CFLAGS = \ ++ $(AM_CFLAGS) \ ++ -Wno-deprecated-declarations + test_libudev_sym_LDADD = \ + libudev.la + +diff --git man/udevadm.xml man/udevadm.xml +index 21d1443..fbfa85a 100644 +--- a/man/udevadm.xml ++++ b/man/udevadm.xml +@@ -339,21 +339,6 @@ + + + +- +- +- +- Wait only for events after the given sequence +- number. +- +- +- +- +- +- +- Wait only for events before the given sequence number. +- +- +- + + + +@@ -361,13 +346,6 @@ + + + +- +- +- +- Do not print any output, like the remaining queue entries when reaching the timeout. +- +- +- + + + +diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c +index ba1b04d..3f7436b 100644 +--- a/src/libudev/libudev-monitor.c ++++ b/src/libudev/libudev-monitor.c +@@ -146,21 +146,6 @@ static bool udev_has_devtmpfs(struct udev *udev) { + return false; + } + +-/* we consider udev running when we have running udev service */ +-static bool udev_has_service(struct udev *udev) { +- struct udev_queue *queue; +- bool active; +- +- queue = udev_queue_new(udev); +- if (!queue) +- return false; +- +- active = udev_queue_get_udev_is_active(queue); +- udev_queue_unref(queue); +- +- return active; +-} +- + struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd) + { + struct udev_monitor *udev_monitor; +@@ -184,7 +169,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c + * We do not set a netlink multicast group here, so the socket + * will not receive any messages. + */ +- if (!udev_has_service(udev) && !udev_has_devtmpfs(udev)) { ++ if (access("/run/udev/control", F_OK) < 0 && !udev_has_devtmpfs(udev)) { + udev_dbg(udev, "the udev service seems not to be active, disable the monitor\n"); + group = UDEV_MONITOR_NONE; + } else +diff --git src/libudev/libudev-queue-private.c src/libudev/libudev-queue-private.c +deleted file mode 100644 +index d5a2b50..0000000 +--- a/src/libudev/libudev-queue-private.c ++++ /dev/null +@@ -1,406 +0,0 @@ +-/*** +- This file is part of systemd. +- +- Copyright 2008-2012 Kay Sievers +- Copyright 2009 Alan Jenkins +- +- systemd is free software; you can redistribute it and/or modify it +- under the terms of the GNU Lesser General Public License as published by +- the Free Software Foundation; either version 2.1 of the License, or +- (at your option) any later version. +- +- systemd is distributed in the hope that it will be useful, but +- WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public License +- along with systemd; If not, see . +-***/ +- +-/* +- * DISCLAIMER - The file format mentioned here is private to udev/libudev, +- * and may be changed without notice. +- * +- * The udev event queue is exported as a binary log file. +- * Each log record consists of a sequence number followed by the device path. +- * +- * When a new event is queued, its details are appended to the log. +- * When the event finishes, a second record is appended to the log +- * with the same sequence number but a devpath len of 0. +- * +- * Example: +- * { 0x0000000000000001 } +- * { 0x0000000000000001, 0x0019, "/devices/virtual/mem/null" }, +- * { 0x0000000000000002, 0x001b, "/devices/virtual/mem/random" }, +- * { 0x0000000000000001, 0x0000 }, +- * { 0x0000000000000003, 0x0019, "/devices/virtual/mem/zero" }, +- * +- * Events 2 and 3 are still queued, but event 1 has finished. +- * +- * The queue does not grow indefinitely. It is periodically re-created +- * to remove finished events. Atomic rename() makes this transparent to readers. +- * +- * The queue file starts with a single sequence number which specifies the +- * minimum sequence number in the log that follows. Any events prior to this +- * sequence number have already finished. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "libudev.h" +-#include "libudev-private.h" +- +-static int rebuild_queue_file(struct udev_queue_export *udev_queue_export); +- +-struct udev_queue_export { +- struct udev *udev; +- int queued_count; /* number of unfinished events exported in queue file */ +- FILE *queue_file; +- unsigned long long int seqnum_max; /* earliest sequence number in queue file */ +- unsigned long long int seqnum_min; /* latest sequence number in queue file */ +- int waste_bytes; /* queue file bytes wasted on finished events */ +-}; +- +-struct udev_queue_export *udev_queue_export_new(struct udev *udev) +-{ +- struct udev_queue_export *udev_queue_export; +- unsigned long long int initial_seqnum; +- +- if (udev == NULL) +- return NULL; +- +- udev_queue_export = new0(struct udev_queue_export, 1); +- if (udev_queue_export == NULL) +- return NULL; +- udev_queue_export->udev = udev; +- +- initial_seqnum = udev_get_kernel_seqnum(udev); +- udev_queue_export->seqnum_min = initial_seqnum; +- udev_queue_export->seqnum_max = initial_seqnum; +- +- udev_queue_export_cleanup(udev_queue_export); +- if (rebuild_queue_file(udev_queue_export) != 0) { +- free(udev_queue_export); +- return NULL; +- } +- +- return udev_queue_export; +-} +- +-struct udev_queue_export *udev_queue_export_unref(struct udev_queue_export *udev_queue_export) +-{ +- if (udev_queue_export == NULL) +- return NULL; +- if (udev_queue_export->queue_file != NULL) +- fclose(udev_queue_export->queue_file); +- free(udev_queue_export); +- return NULL; +-} +- +-void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) +-{ +- if (udev_queue_export == NULL) +- return; +- unlink("/run/udev/queue.tmp"); +- unlink("/run/udev/queue.bin"); +-} +- +-static int skip_to(FILE *file, long offset) +-{ +- long old_offset; +- +- /* fseek may drop buffered data, avoid it for small seeks */ +- old_offset = ftell(file); +- if (offset > old_offset && offset - old_offset <= BUFSIZ) { +- size_t skip_bytes = offset - old_offset; +- char *buf = alloca(skip_bytes); +- +- if (fread(buf, skip_bytes, 1, file) != skip_bytes) +- return -1; +- } +- +- return fseek(file, offset, SEEK_SET); +-} +- +-struct queue_devpaths { +- unsigned int devpaths_first; /* index of first queued event */ +- unsigned int devpaths_size; +- long devpaths[]; /* seqnum -> offset of devpath in queue file (or 0) */ +-}; +- +-/* +- * Returns a table mapping seqnum to devpath file offset for currently queued events. +- * devpaths[i] represents the event with seqnum = i + udev_queue_export->seqnum_min. +- */ +-static struct queue_devpaths *build_index(struct udev_queue_export *udev_queue_export) +-{ +- struct queue_devpaths *devpaths; +- unsigned long long int range; +- long devpath_offset; +- ssize_t devpath_len; +- unsigned long long int seqnum; +- unsigned long long int n; +- unsigned int i; +- +- /* seek to the first event in the file */ +- rewind(udev_queue_export->queue_file); +- udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum); +- +- /* allocate the table */ +- range = udev_queue_export->seqnum_min - udev_queue_export->seqnum_max; +- if (range - 1 > INT_MAX) { +- udev_err(udev_queue_export->udev, "queue file overflow\n"); +- return NULL; +- } +- devpaths = malloc0(sizeof(struct queue_devpaths) + (range + 1) * sizeof(long)); +- if (devpaths == NULL) +- return NULL; +- devpaths->devpaths_size = range + 1; +- +- /* read all records and populate the table */ +- for (;;) { +- if (udev_queue_read_seqnum(udev_queue_export->queue_file, &seqnum) < 0) +- break; +- n = seqnum - udev_queue_export->seqnum_max; +- if (n >= devpaths->devpaths_size) +- goto read_error; +- +- devpath_offset = ftell(udev_queue_export->queue_file); +- devpath_len = udev_queue_skip_devpath(udev_queue_export->queue_file); +- if (devpath_len < 0) +- goto read_error; +- +- if (devpath_len > 0) +- devpaths->devpaths[n] = devpath_offset; +- else +- devpaths->devpaths[n] = 0; +- } +- +- /* find first queued event */ +- for (i = 0; i < devpaths->devpaths_size; i++) { +- if (devpaths->devpaths[i] != 0) +- break; +- } +- devpaths->devpaths_first = i; +- +- return devpaths; +- +-read_error: +- udev_err(udev_queue_export->udev, "queue file corrupted\n"); +- free(devpaths); +- return NULL; +-} +- +-static int rebuild_queue_file(struct udev_queue_export *udev_queue_export) +-{ +- unsigned long long int seqnum; +- struct queue_devpaths *devpaths = NULL; +- FILE *new_queue_file = NULL; +- unsigned int i; +- +- /* read old queue file */ +- if (udev_queue_export->queue_file != NULL) { +- devpaths = build_index(udev_queue_export); +- if (devpaths != NULL) +- udev_queue_export->seqnum_max += devpaths->devpaths_first; +- } +- if (devpaths == NULL) { +- udev_queue_export->queued_count = 0; +- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; +- } +- +- /* create new queue file */ +- new_queue_file = fopen("/run/udev/queue.tmp", "w+e"); +- if (new_queue_file == NULL) +- goto error; +- seqnum = udev_queue_export->seqnum_max; +- fwrite(&seqnum, 1, sizeof(unsigned long long int), new_queue_file); +- +- /* copy unfinished events only to the new file */ +- if (devpaths != NULL) { +- for (i = devpaths->devpaths_first; i < devpaths->devpaths_size; i++) { +- char devpath[UTIL_PATH_SIZE]; +- int err; +- unsigned short devpath_len; +- +- if (devpaths->devpaths[i] != 0) +- { +- skip_to(udev_queue_export->queue_file, devpaths->devpaths[i]); +- err = udev_queue_read_devpath(udev_queue_export->queue_file, devpath, sizeof(devpath)); +- devpath_len = err; +- +- fwrite(&seqnum, sizeof(unsigned long long int), 1, new_queue_file); +- fwrite(&devpath_len, sizeof(unsigned short), 1, new_queue_file); +- fwrite(devpath, 1, devpath_len, new_queue_file); +- } +- seqnum++; +- } +- free(devpaths); +- devpaths = NULL; +- } +- fflush(new_queue_file); +- if (ferror(new_queue_file)) +- goto error; +- +- /* rename the new file on top of the old one */ +- if (rename("/run/udev/queue.tmp", "/run/udev/queue.bin") != 0) +- goto error; +- +- if (udev_queue_export->queue_file != NULL) +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = new_queue_file; +- udev_queue_export->waste_bytes = 0; +- +- return 0; +- +-error: +- udev_err(udev_queue_export->udev, "failed to create queue file: %m\n"); +- udev_queue_export_cleanup(udev_queue_export); +- +- if (udev_queue_export->queue_file != NULL) { +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- } +- if (new_queue_file != NULL) +- fclose(new_queue_file); +- +- if (devpaths != NULL) +- free(devpaths); +- udev_queue_export->queued_count = 0; +- udev_queue_export->waste_bytes = 0; +- udev_queue_export->seqnum_max = udev_queue_export->seqnum_min; +- +- return -1; +-} +- +-static int write_queue_record(struct udev_queue_export *udev_queue_export, +- unsigned long long int seqnum, const char *devpath, size_t devpath_len) +-{ +- unsigned short len; +- +- if (udev_queue_export->queue_file == NULL) +- return -1; +- +- if (fwrite(&seqnum, sizeof(unsigned long long int), 1, udev_queue_export->queue_file) != 1) +- goto write_error; +- +- len = (devpath_len < USHRT_MAX) ? devpath_len : USHRT_MAX; +- if (fwrite(&len, sizeof(unsigned short), 1, udev_queue_export->queue_file) != 1) +- goto write_error; +- if (len > 0) { +- if (fwrite(devpath, 1, len, udev_queue_export->queue_file) != len) +- goto write_error; +- } +- +- /* *must* flush output; caller may fork */ +- if (fflush(udev_queue_export->queue_file) != 0) +- goto write_error; +- +- return 0; +- +-write_error: +- /* if we failed half way through writing a record to a file, +- we should not try to write any further records to it. */ +- udev_err(udev_queue_export->udev, "error writing to queue file: %m\n"); +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- +- return -1; +-} +- +-enum device_state { +- DEVICE_QUEUED, +- DEVICE_FINISHED, +-}; +- +-static inline size_t queue_record_size(size_t devpath_len) +-{ +- return sizeof(unsigned long long int) + sizeof(unsigned short int) + devpath_len; +-} +- +-static int update_queue(struct udev_queue_export *udev_queue_export, +- struct udev_device *udev_device, enum device_state state) +-{ +- unsigned long long int seqnum = udev_device_get_seqnum(udev_device); +- const char *devpath = NULL; +- size_t devpath_len = 0; +- int bytes; +- int err; +- +- /* FINISHED records have a zero length devpath */ +- if (state == DEVICE_QUEUED) { +- devpath = udev_device_get_devpath(udev_device); +- devpath_len = strlen(devpath); +- } +- +- /* recover from an earlier failed rebuild */ +- if (udev_queue_export->queue_file == NULL) { +- if (rebuild_queue_file(udev_queue_export) != 0) +- return -1; +- } +- +- /* if we're removing the last event from the queue, that's the best time to rebuild it */ +- if (state != DEVICE_QUEUED && udev_queue_export->queued_count == 1) { +- /* we don't need to read the old queue file */ +- fclose(udev_queue_export->queue_file); +- udev_queue_export->queue_file = NULL; +- rebuild_queue_file(udev_queue_export); +- return 0; +- } +- +- /* try to rebuild the queue files before they grow larger than one page. */ +- bytes = ftell(udev_queue_export->queue_file) + queue_record_size(devpath_len); +- if ((udev_queue_export->waste_bytes > bytes / 2) && bytes > 4096) +- rebuild_queue_file(udev_queue_export); +- +- /* don't record a finished event, if we already dropped the event in a failed rebuild */ +- if (seqnum < udev_queue_export->seqnum_max) +- return 0; +- +- /* now write to the queue */ +- if (state == DEVICE_QUEUED) { +- udev_queue_export->queued_count++; +- udev_queue_export->seqnum_min = seqnum; +- } else { +- udev_queue_export->waste_bytes += queue_record_size(devpath_len) + queue_record_size(0); +- udev_queue_export->queued_count--; +- } +- err = write_queue_record(udev_queue_export, seqnum, devpath, devpath_len); +- +- /* try to handle ENOSPC */ +- if (err != 0 && udev_queue_export->queued_count == 0) { +- udev_queue_export_cleanup(udev_queue_export); +- err = rebuild_queue_file(udev_queue_export); +- } +- +- return err; +-} +- +-static int update(struct udev_queue_export *udev_queue_export, +- struct udev_device *udev_device, enum device_state state) +-{ +- if (update_queue(udev_queue_export, udev_device, state) != 0) +- return -1; +- +- return 0; +-} +- +-int udev_queue_export_device_queued(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) +-{ +- return update(udev_queue_export, udev_device, DEVICE_QUEUED); +-} +- +-int udev_queue_export_device_finished(struct udev_queue_export *udev_queue_export, struct udev_device *udev_device) +-{ +- return update(udev_queue_export, udev_device, DEVICE_FINISHED); +-} +diff --git src/libudev/libudev-queue.c src/libudev/libudev-queue.c +index 2cb4d67..eb0e096 100644 +--- a/src/libudev/libudev-queue.c ++++ b/src/libudev/libudev-queue.c +@@ -24,8 +24,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + +@@ -36,10 +34,7 @@ + * SECTION:libudev-queue + * @short_description: access to currently active events + * +- * The udev daemon processes events asynchronously. All events which do not have +- * interdependencies run in parallel. This exports the current state of the +- * event processing queue, and the current event sequence numbers from the kernel +- * and the udev daemon. ++ * This exports the current state of the udev processing queue. + */ + + /** +@@ -50,7 +45,6 @@ + struct udev_queue { + struct udev *udev; + int refcount; +- struct udev_list queue_list; + }; + + /** +@@ -72,9 +66,9 @@ _public_ struct udev_queue *udev_queue_new(struct udev *udev) + udev_queue = new0(struct udev_queue, 1); + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount = 1; + udev_queue->udev = udev; +- udev_list_init(udev, &udev_queue->queue_list, false); + return udev_queue; + } + +@@ -90,6 +84,7 @@ _public_ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue) + { + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount++; + return udev_queue; + } +@@ -107,10 +102,11 @@ _public_ struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue) + { + if (udev_queue == NULL) + return NULL; ++ + udev_queue->refcount--; + if (udev_queue->refcount > 0) + return NULL; +- udev_list_cleanup(&udev_queue->queue_list); ++ + free(udev_queue); + return NULL; + } +@@ -130,141 +126,30 @@ _public_ struct udev *udev_queue_get_udev(struct udev_queue *udev_queue) + return udev_queue->udev; + } + +-unsigned long long int udev_get_kernel_seqnum(struct udev *udev) +-{ +- unsigned long long int seqnum; +- int fd; +- char buf[32]; +- ssize_t len; +- +- fd = open("/sys/kernel/uevent_seqnum", O_RDONLY|O_CLOEXEC); +- if (fd < 0) +- return 0; +- len = read(fd, buf, sizeof(buf)); +- close(fd); +- if (len <= 2) +- return 0; +- buf[len-1] = '\0'; +- seqnum = strtoull(buf, NULL, 10); +- return seqnum; +-} +- + /** + * udev_queue_get_kernel_seqnum: + * @udev_queue: udev queue context + * +- * Get the current kernel event sequence number. ++ * This function is deprecated. + * +- * Returns: the sequence number. ++ * Returns: 0. + **/ + _public_ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum; +- +- if (udev_queue == NULL) +- return -EINVAL; +- +- seqnum = udev_get_kernel_seqnum(udev_queue->udev); +- return seqnum; +-} +- +-int udev_queue_read_seqnum(FILE *queue_file, unsigned long long int *seqnum) +-{ +- if (fread(seqnum, sizeof(unsigned long long int), 1, queue_file) != 1) +- return -1; +- + return 0; + } + +-ssize_t udev_queue_skip_devpath(FILE *queue_file) +-{ +- unsigned short int len; +- +- if (fread(&len, sizeof(unsigned short int), 1, queue_file) == 1) { +- char *devpath = alloca(len); +- +- /* use fread to skip, fseek might drop buffered data */ +- if (fread(devpath, 1, len, queue_file) == len) +- return len; +- } +- +- return -1; +-} +- +-ssize_t udev_queue_read_devpath(FILE *queue_file, char *devpath, size_t size) +-{ +- unsigned short int read_bytes = 0; +- unsigned short int len; +- +- if (fread(&len, sizeof(unsigned short int), 1, queue_file) != 1) +- return -1; +- +- read_bytes = (len < size - 1) ? len : size - 1; +- if (fread(devpath, 1, read_bytes, queue_file) != read_bytes) +- return -1; +- devpath[read_bytes] = '\0'; +- +- /* if devpath was too long, skip unread characters */ +- if (read_bytes != len) { +- unsigned short int skip_bytes = len - read_bytes; +- char *buf = alloca(skip_bytes); +- +- if (fread(buf, 1, skip_bytes, queue_file) != skip_bytes) +- return -1; +- } +- +- return read_bytes; +-} +- +-static FILE *open_queue_file(struct udev_queue *udev_queue, unsigned long long int *seqnum_start) +-{ +- FILE *queue_file; +- +- queue_file = fopen("/run/udev/queue.bin", "re"); +- if (queue_file == NULL) +- return NULL; +- +- if (udev_queue_read_seqnum(queue_file, seqnum_start) < 0) { +- udev_err(udev_queue->udev, "corrupt queue file\n"); +- fclose(queue_file); +- return NULL; +- } +- +- return queue_file; +-} +- + /** + * udev_queue_get_udev_seqnum: + * @udev_queue: udev queue context + * +- * Get the last known udev event sequence number. ++ * This function is deprecated. + * +- * Returns: the sequence number. ++ * Returns: 0. + **/ + _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_udev; +- FILE *queue_file; +- +- queue_file = open_queue_file(udev_queue, &seqnum_udev); +- if (queue_file == NULL) +- return 0; +- +- for (;;) { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- if (devpath_len > 0) +- seqnum_udev = seqnum; +- } +- +- fclose(queue_file); +- return seqnum_udev; ++ return 0; + } + + /** +@@ -277,15 +162,7 @@ _public_ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *ud + **/ + _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_start; +- FILE *queue_file; +- +- queue_file = open_queue_file(udev_queue, &seqnum_start); +- if (queue_file == NULL) +- return 0; +- +- fclose(queue_file); +- return 1; ++ return access("/run/udev/control", F_OK) >= 0; + } + + /** +@@ -298,48 +175,7 @@ _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue) + **/ + _public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum_kernel; +- unsigned long long int seqnum_udev = 0; +- int queued = 0; +- int is_empty = 0; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return -EINVAL; +- queue_file = open_queue_file(udev_queue, &seqnum_udev); +- if (queue_file == NULL) +- return 1; +- +- for (;;) { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- +- if (devpath_len > 0) { +- queued++; +- seqnum_udev = seqnum; +- } else { +- queued--; +- } +- } +- +- if (queued > 0) +- goto out; +- +- seqnum_kernel = udev_queue_get_kernel_seqnum(udev_queue); +- if (seqnum_udev < seqnum_kernel) +- goto out; +- +- is_empty = 1; +- +-out: +- fclose(queue_file); +- return is_empty; ++ return access("/run/udev/queue", F_OK) >= 0; + } + + /** +@@ -348,63 +184,15 @@ out: + * @start: first event sequence number + * @end: last event sequence number + * +- * Check if udev is currently processing any events in a given sequence number range. ++ * This function is deprecated, it just returns the result of ++ * udev_queue_get_queue_is_empty(). + * +- * Returns: a flag indicating if any of the sequence numbers in the given range is currently active. ++ * Returns: a flag indicating if udev is currently handling events. + **/ + _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, + unsigned long long int start, unsigned long long int end) + { +- unsigned long long int seqnum; +- ssize_t devpath_len; +- int unfinished; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return -EINVAL; +- queue_file = open_queue_file(udev_queue, &seqnum); +- if (queue_file == NULL) +- return 1; +- if (start < seqnum) +- start = seqnum; +- if (start > end) { +- fclose(queue_file); +- return 1; +- } +- if (end - start > INT_MAX - 1) { +- fclose(queue_file); +- return -EOVERFLOW; +- } +- +- /* +- * we might start with 0, and handle the initial seqnum +- * only when we find an entry in the queue file +- **/ +- unfinished = end - start; +- +- do { +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- devpath_len = udev_queue_skip_devpath(queue_file); +- if (devpath_len < 0) +- break; +- +- /* +- * we might start with an empty or re-build queue file, where +- * the initial seqnum is not recorded as finished +- */ +- if (start == seqnum && devpath_len > 0) +- unfinished++; +- +- if (devpath_len == 0) { +- if (seqnum >= start && seqnum <= end) +- unfinished--; +- } +- } while (unfinished > 0); +- +- fclose(queue_file); +- +- return (unfinished == 0); ++ return udev_queue_get_queue_is_empty(udev_queue); + } + + /** +@@ -412,69 +200,25 @@ _public_ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_ + * @udev_queue: udev queue context + * @seqnum: sequence number + * +- * Check if udev is currently processing a given sequence number. ++ * This function is deprecated, it just returns the result of ++ * udev_queue_get_queue_is_empty(). + * +- * Returns: a flag indicating if the given sequence number is currently active. ++ * Returns: a flag indicating if udev is currently handling events. + **/ + _public_ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) + { +- if (!udev_queue_get_seqnum_sequence_is_finished(udev_queue, seqnum, seqnum)) +- return 0; +- +- return 1; ++ return udev_queue_get_queue_is_empty(udev_queue); + } + + /** + * udev_queue_get_queued_list_entry: + * @udev_queue: udev queue context + * +- * Get the first entry of the list of queued events. ++ * This function is deprecated. + * +- * Returns: a udev_list_entry. ++ * Returns: NULL. + **/ + _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) + { +- unsigned long long int seqnum; +- FILE *queue_file; +- +- if (udev_queue == NULL) +- return NULL; +- udev_list_cleanup(&udev_queue->queue_list); +- +- queue_file = open_queue_file(udev_queue, &seqnum); +- if (queue_file == NULL) +- return NULL; +- +- for (;;) { +- char syspath[UTIL_PATH_SIZE]; +- char *s; +- size_t l; +- ssize_t len; +- char seqnum_str[32]; +- struct udev_list_entry *list_entry; +- +- if (udev_queue_read_seqnum(queue_file, &seqnum) < 0) +- break; +- snprintf(seqnum_str, sizeof(seqnum_str), "%llu", seqnum); +- +- s = syspath; +- l = strpcpy(&s, sizeof(syspath), "/sys"); +- len = udev_queue_read_devpath(queue_file, s, l); +- if (len < 0) +- break; +- +- if (len > 0) { +- udev_list_entry_add(&udev_queue->queue_list, syspath, seqnum_str); +- } else { +- udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_queue->queue_list)) { +- if (streq(seqnum_str, udev_list_entry_get_value(list_entry))) { +- udev_list_entry_delete(list_entry); +- break; +- } +- } +- } +- } +- fclose(queue_file); +- +- return udev_list_get_entry(&udev_queue->queue_list); ++ return NULL; + } +diff --git src/libudev/libudev.h src/libudev/libudev.h +index b9b8f13..ceb89bd 100644 +--- a/src/libudev/libudev.h ++++ b/src/libudev/libudev.h +@@ -170,14 +170,14 @@ struct udev_queue *udev_queue_ref(struct udev_queue *udev_queue); + struct udev_queue *udev_queue_unref(struct udev_queue *udev_queue); + struct udev *udev_queue_get_udev(struct udev_queue *udev_queue); + struct udev_queue *udev_queue_new(struct udev *udev); +-unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue); +-unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue); ++unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); ++unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) __attribute__ ((deprecated)); + int udev_queue_get_udev_is_active(struct udev_queue *udev_queue); + int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue); +-int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum); ++int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned long long int seqnum) __attribute__ ((deprecated)); + int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue, +- unsigned long long int start, unsigned long long int end); +-struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue); ++ unsigned long long int start, unsigned long long int end) __attribute__ ((deprecated)); ++struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue) __attribute__ ((deprecated)); + + /* + * udev_hwdb +diff --git src/shared/udev-util.h src/shared/udev-util.h +index 40f8b77..5f09ce1 100644 +--- a/src/shared/udev-util.h ++++ b/src/shared/udev-util.h +@@ -31,7 +31,6 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_event*, udev_event_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); + DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); +-DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); + + #define _cleanup_udev_unref_ _cleanup_(udev_unrefp) + #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) +@@ -40,5 +39,4 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); + #define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) + #define _cleanup_udev_ctrl_unref_ _cleanup_(udev_ctrl_unrefp) + #define _cleanup_udev_monitor_unref_ _cleanup_(udev_monitor_unrefp) +-#define _cleanup_udev_queue_unref_ _cleanup_(udev_queue_unrefp) + #define _cleanup_udev_list_cleanup_ _cleanup_(udev_list_cleanup) +diff --git src/test/test-libudev.c src/test/test-libudev.c +index c233b1e..f5c8bc7 100644 +--- a/src/test/test-libudev.c ++++ b/src/test/test-libudev.c +@@ -303,38 +303,14 @@ out: + + static int test_queue(struct udev *udev) { + struct udev_queue *udev_queue; +- unsigned long long int seqnum; +- struct udev_list_entry *list_entry; + + udev_queue = udev_queue_new(udev); + if (udev_queue == NULL) + return -1; +- seqnum = udev_queue_get_kernel_seqnum(udev_queue); +- printf("seqnum kernel: %llu\n", seqnum); +- seqnum = udev_queue_get_udev_seqnum(udev_queue); +- printf("seqnum udev : %llu\n", seqnum); + + if (udev_queue_get_queue_is_empty(udev_queue)) + printf("queue is empty\n"); +- printf("get queue list\n"); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); +- printf("\n"); +- printf("get queue list again\n"); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf("queued: '%s' [%s]\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); +- printf("\n"); + +- list_entry = udev_queue_get_queued_list_entry(udev_queue); +- if (list_entry != NULL) { +- printf("event [%llu] is queued\n", seqnum); +- seqnum = strtoull(udev_list_entry_get_value(list_entry), NULL, 10); +- if (udev_queue_get_seqnum_is_finished(udev_queue, seqnum)) +- printf("event [%llu] is not finished\n", seqnum); +- else +- printf("event [%llu] is finished\n", seqnum); +- } +- printf("\n"); + udev_queue_unref(udev_queue); + return 0; + } +diff --git src/udev/udev-ctrl.c src/udev/udev-ctrl.c +index 1e91ec2..74bbd3a 100644 +--- a/src/udev/udev-ctrl.c ++++ b/src/udev/udev-ctrl.c +@@ -275,7 +275,7 @@ static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int + + pfd[0].fd = uctrl->sock; + pfd[0].events = POLLIN; +- r = poll(pfd, 1, timeout * 1000); ++ r = poll(pfd, 1, timeout * MSEC_PER_SEC); + if (r < 0) { + if (errno == EINTR) + continue; +diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c +index 927ea2a..65fc35f 100644 +--- a/src/udev/udevadm-settle.c ++++ b/src/udev/udevadm-settle.c +@@ -41,42 +41,28 @@ + static void help(void) { + printf("Usage: udevadm settle OPTIONS\n" + " -t,--timeout= maximum time to wait for events\n" +- " -s,--seq-start= first seqnum to wait for\n" +- " -e,--seq-end= last seqnum to wait for\n" + " -E,--exit-if-exists= stop waiting if file exists\n" +- " -q,--quiet do not print list after timeout\n" + " -h,--help\n\n"); + } + + static int adm_settle(struct udev *udev, int argc, char *argv[]) + { + static const struct option options[] = { +- { "seq-start", required_argument, NULL, 's' }, +- { "seq-end", required_argument, NULL, 'e' }, ++ { "seq-start", required_argument, NULL, '\0' }, /* removed */ ++ { "seq-end", required_argument, NULL, '\0' }, /* removed */ + { "timeout", required_argument, NULL, 't' }, + { "exit-if-exists", required_argument, NULL, 'E' }, +- { "quiet", no_argument, NULL, 'q' }, ++ { "quiet", no_argument, NULL, 'q' }, /* removed */ + { "help", no_argument, NULL, 'h' }, + {} + }; +- usec_t start_usec = now(CLOCK_MONOTONIC); +- usec_t start = 0; +- usec_t end = 0; +- int quiet = 0; + const char *exists = NULL; + unsigned int timeout = 120; + struct pollfd pfd[1] = { {.fd = -1}, }; +- _cleanup_udev_queue_unref_ struct udev_queue *udev_queue = NULL; + int rc = EXIT_FAILURE, c; + +- while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) ++ while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) { + switch (c) { +- case 's': +- start = strtoull(optarg, NULL, 0); +- break; +- case 'e': +- end = strtoull(optarg, NULL, 0); +- break; + case 't': { + int r; + +@@ -91,9 +77,6 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + case 'E': + exists = optarg; + break; +- case 'q': +- quiet = 1; +- break; + case 'h': + help(); + exit(EXIT_SUCCESS); +@@ -102,44 +85,13 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + default: + assert_not_reached("Unknown argument"); + } ++ } + + if (optind < argc) { + fprintf(stderr, "Extraneous argument: '%s'\n", argv[optind]); + exit(EXIT_FAILURE); + } + +- udev_queue = udev_queue_new(udev); +- if (udev_queue == NULL) +- exit(2); +- +- if (start > 0) { +- unsigned long long kernel_seq; +- +- kernel_seq = udev_queue_get_kernel_seqnum(udev_queue); +- +- /* unless specified, the last event is the current kernel seqnum */ +- if (end == 0) +- end = udev_queue_get_kernel_seqnum(udev_queue); +- +- if (start > end) { +- log_error("seq-start larger than seq-end, ignoring"); +- start = 0; +- end = 0; +- } +- +- if (start > kernel_seq || end > kernel_seq) { +- log_error("seq-start or seq-end larger than current kernel value, ignoring"); +- start = 0; +- end = 0; +- } +- log_debug("start=%llu end=%llu current=%llu", (unsigned long long)start, (unsigned long long)end, kernel_seq); +- } else { +- if (end > 0) { +- log_error("seq-end needs seq-start parameter, ignoring"); +- end = 0; +- } +- } +- + /* guarantee that the udev daemon isn't pre-processing */ + if (getuid() == 0) { + struct udev_ctrl *uctrl; +@@ -160,73 +112,34 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + pfd[0].fd = inotify_init1(IN_CLOEXEC); + if (pfd[0].fd < 0) { + log_error("inotify_init failed: %m"); +- } else { +- if (inotify_add_watch(pfd[0].fd, "/run/udev" , IN_MOVED_TO) < 0) { +- log_error("watching /run/udev failed"); +- close(pfd[0].fd); +- pfd[0].fd = -1; +- } ++ goto out; + } + +- for (;;) { +- struct stat statbuf; ++ if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { ++ log_debug("watching /run/udev failed"); ++ goto out; ++ } + +- if (exists != NULL && stat(exists, &statbuf) == 0) { ++ for (;;) { ++ if (exists && access(exists, F_OK) >= 0) { + rc = EXIT_SUCCESS; + break; + } + +- if (start > 0) { +- /* if asked for, wait for a specific sequence of events */ +- if (udev_queue_get_seqnum_sequence_is_finished(udev_queue, start, end) == 1) { +- rc = EXIT_SUCCESS; +- break; +- } +- } else { +- /* exit if queue is empty */ +- if (udev_queue_get_queue_is_empty(udev_queue)) { +- rc = EXIT_SUCCESS; +- break; +- } +- } +- +- if (pfd[0].fd >= 0) { +- int delay; +- +- if (exists != NULL || start > 0) +- delay = 100; +- else +- delay = 1000; +- /* wake up after delay, or immediately after the queue is rebuilt */ +- if (poll(pfd, 1, delay) > 0 && pfd[0].revents & POLLIN) { +- char buf[sizeof(struct inotify_event) + PATH_MAX]; +- +- read(pfd[0].fd, buf, sizeof(buf)); +- } +- } else { +- sleep(1); ++ /* exit if queue is empty */ ++ if (access("/run/udev/queue", F_OK) < 0) { ++ rc = EXIT_SUCCESS; ++ break; + } + +- if (timeout > 0) { +- usec_t age_usec; ++ /* wake up when "queue" file is deleted */ ++ if (poll(pfd, 1, 100) > 0 && pfd[0].revents & POLLIN) { ++ char buf[sizeof(struct inotify_event) + PATH_MAX]; + +- age_usec = now(CLOCK_MONOTONIC) - start_usec; +- if (age_usec / (1000 * 1000) >= timeout) { +- struct udev_list_entry *list_entry; +- +- if (!quiet && udev_queue_get_queued_list_entry(udev_queue) != NULL) { +- log_debug("timeout waiting for udev queue"); +- printf("\nudevadm settle - timeout of %i seconds reached, the event queue contains:\n", timeout); +- udev_list_entry_foreach(list_entry, udev_queue_get_queued_list_entry(udev_queue)) +- printf(" %s (%s)\n", +- udev_list_entry_get_name(list_entry), +- udev_list_entry_get_value(list_entry)); +- } +- +- break; +- } ++ read(pfd[0].fd, buf, sizeof(buf)); + } + } ++ + out: + if (pfd[0].fd >= 0) + close(pfd[0].fd); +@@ -236,5 +149,5 @@ out: + const struct udevadm_cmd udevadm_settle = { + .name = "settle", + .cmd = adm_settle, +- .help = "wait for the event queue to finish", ++ .help = "wait for pending udev events", + }; +diff --git src/udev/udevd.c src/udev/udevd.c +index f21c227..f9ee368 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -60,7 +60,6 @@ void udev_main_log(struct udev *udev, int priority, + } + + static struct udev_rules *rules; +-static struct udev_queue_export *udev_queue_export; + static struct udev_ctrl *udev_ctrl; + static struct udev_monitor *monitor; + static int worker_watch[2] = { -1, -1 }; +@@ -139,14 +138,9 @@ static inline struct worker *node_to_worker(struct udev_list_node *node) + return container_of(node, struct worker, node); + } + +-static void event_queue_delete(struct event *event, bool export) ++static void event_queue_delete(struct event *event) + { + udev_list_node_remove(&event->node); +- +- if (export) { +- udev_queue_export_device_finished(udev_queue_export, event->dev); +- log_debug("seq %llu done with %i", udev_device_get_seqnum(event->dev), event->exitcode); +- } + udev_device_unref(event->dev); + free(event); + } +@@ -225,7 +219,6 @@ static void worker_new(struct event *event) + free(worker); + worker_list_cleanup(udev); + event_queue_cleanup(udev, EVENT_UNDEF); +- udev_queue_export_unref(udev_queue_export); + udev_monitor_unref(monitor); + udev_ctrl_unref(udev_ctrl); + close(fd_signal); +@@ -449,7 +442,6 @@ static int event_queue_insert(struct udev_device *dev) + event->nodelay = true; + #endif + +- udev_queue_export_device_queued(udev_queue_export, dev); + log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), + udev_device_get_action(dev), udev_device_get_subsystem(dev)); + +@@ -580,7 +572,7 @@ static void event_queue_cleanup(struct udev *udev, enum event_state match_type) + if (match_type != EVENT_UNDEF && match_type != event->state) + continue; + +- event_queue_delete(event, false); ++ event_queue_delete(event); + } + } + +@@ -605,7 +597,7 @@ static void worker_returned(int fd_worker) + /* worker returned */ + if (worker->event) { + worker->event->exitcode = msg.exitcode; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); + worker->event = NULL; + } + if (worker->state != WORKER_KILLED) +@@ -797,7 +789,8 @@ static void handle_signal(struct udev *udev, int signo) + log_error("worker [%u] failed while handling '%s'", + pid, worker->event->devpath); + worker->event->exitcode = -32; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); ++ + /* drop reference taken for state 'running' */ + worker_unref(worker); + } +@@ -1076,14 +1069,7 @@ int main(int argc, char *argv[]) + goto exit; + } + +- udev_monitor_set_receive_buffer_size(monitor, 128*1024*1024); +- +- /* create queue file before signalling 'ready', to make sure we block 'settle' */ +- udev_queue_export = udev_queue_export_new(udev); +- if (udev_queue_export == NULL) { +- log_error("error creating queue file"); +- goto exit; +- } ++ udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024); + + if (daemonize) { + pid_t pid; +@@ -1241,12 +1227,12 @@ int main(int argc, char *argv[]) + worker_kill(udev); + + /* exit after all has cleaned up */ +- if (udev_list_node_is_empty(&event_list) && udev_list_node_is_empty(&worker_list)) ++ if (udev_list_node_is_empty(&event_list) && children == 0) + break; + + /* timeout at exit for workers to finish */ +- timeout = 30 * 1000; +- } else if (udev_list_node_is_empty(&event_list) && !children) { ++ timeout = 30 * MSEC_PER_SEC; ++ } else if (udev_list_node_is_empty(&event_list) && children == 0) { + /* we are idle */ + timeout = -1; + +@@ -1255,8 +1241,20 @@ int main(int argc, char *argv[]) + cg_kill(SYSTEMD_CGROUP_CONTROLLER, udev_cgroup, SIGKILL, false, true, NULL); + } else { + /* kill idle or hanging workers */ +- timeout = 3 * 1000; ++ timeout = 3 * MSEC_PER_SEC; + } ++ ++ /* tell settle that we are busy or idle */ ++ if (!udev_list_node_is_empty(&event_list)) { ++ int fd; ++ ++ fd = open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444); ++ if (fd >= 0) ++ close(fd); ++ } else { ++ unlink("/run/udev/queue"); ++ } ++ + fdcount = epoll_wait(fd_ep, ev, ELEMENTSOF(ev), timeout); + if (fdcount < 0) + continue; +@@ -1283,18 +1281,18 @@ int main(int argc, char *argv[]) + if (worker->state != WORKER_RUNNING) + continue; + +- if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * 1000 * 1000) { ++ if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * USEC_PER_SEC) { + log_error("worker [%u] %s timeout; kill it", worker->pid, + worker->event ? worker->event->devpath : ""); + kill(worker->pid, SIGKILL); + worker->state = WORKER_KILLED; ++ + /* drop reference taken for state 'running' */ + worker_unref(worker); + if (worker->event) { +- log_error("seq %llu '%s' killed", +- udev_device_get_seqnum(worker->event->dev), worker->event->devpath); ++ log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath); + worker->event->exitcode = -64; +- event_queue_delete(worker->event, true); ++ event_queue_delete(worker->event); + worker->event = NULL; + } + } +@@ -1317,7 +1315,7 @@ int main(int argc, char *argv[]) + } + + /* check for changed config, every 3 seconds at most */ +- if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * 1000 * 1000) { ++ if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * USEC_PER_SEC) { + if (udev_rules_check_timestamp(rules)) + reload = true; + if (udev_builtin_validate(udev)) +@@ -1390,8 +1388,8 @@ int main(int argc, char *argv[]) + + rc = EXIT_SUCCESS; + exit: +- udev_queue_export_cleanup(udev_queue_export); + udev_ctrl_cleanup(udev_ctrl); ++ unlink("/run/udev/queue"); + exit_daemonize: + if (fd_ep >= 0) + close(fd_ep); +@@ -1406,7 +1404,6 @@ exit_daemonize: + if (worker_watch[WRITE_END] >= 0) + close(worker_watch[WRITE_END]); + udev_monitor_unref(monitor); +- udev_queue_export_unref(udev_queue_export); + udev_ctrl_connection_unref(ctrl_conn); + udev_ctrl_unref(udev_ctrl); + label_finish(); +-- +1.7.9.2 + diff --git a/1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch b/1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch new file mode 100644 index 00000000..75da64fa --- /dev/null +++ b/1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch @@ -0,0 +1,31 @@ +From a52ec8ed881537627869afa8f0486db7e20ce2db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Fri, 30 May 2014 13:16:56 -0400 +Subject: [PATCH] udev-builtin-keyboard: do tell on which device EVIOCSKEYCODE + failed. + +I am getting + +"Error calling EVIOCSKEYCODE (scan code 0xc022d, key code 418): Invalid +argument", the error message does not tell on which specific device the +problem is, add that info. +--- + src/udev/udev-builtin-keyboard.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/udev/udev-builtin-keyboard.c src/udev/udev-builtin-keyboard.c +index 614e44e..9b66bfd 100644 +--- src/udev/udev-builtin-keyboard.c ++++ src/udev/udev-builtin-keyboard.c +@@ -143,7 +143,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo + log_debug("keyboard: mapping scan code %d (0x%x) to key code %d (0x%x)", + map[i].scan, map[i].scan, map[i].key, map[i].key); + if (ioctl(fd, EVIOCSKEYCODE, &map[i]) < 0) +- log_error("Error calling EVIOCSKEYCODE (scan code 0x%x, key code %d): %m", map[i].scan, map[i].key); ++ log_error("Error calling EVIOCSKEYCODE on device node '%s' (scan code 0x%x, key code %d): %m", node, map[i].scan, map[i].key); + } + + /* install list of force-release codes */ +-- +1.7.9.2 + diff --git a/1024-udev-always-close-lock-file-descriptor.patch b/1024-udev-always-close-lock-file-descriptor.patch new file mode 100644 index 00000000..aaa4b296 --- /dev/null +++ b/1024-udev-always-close-lock-file-descriptor.patch @@ -0,0 +1,41 @@ +Based on 3d06f4183470d42361303086ed9dedd29c0ffc1b Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 3 Jun 2014 10:46:51 +0200 +Subject: [PATCH] udev: always close lock file descriptor + +https://bugs.freedesktop.org/show_bug.cgi?id=79576 +--- + src/udev/udevd.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- src/udev/udevd.c ++++ src/udev/udevd.c 2014-06-03 15:34:42.778346368 +0000 +@@ -301,6 +301,7 @@ static void worker_new(struct event *eve + if (fd_lock >= 0 && flock(fd_lock, LOCK_SH|LOCK_NB) < 0) { + log_debug("Unable to flock(%s), skipping event handling: %m", udev_device_get_devnode(d)); + err = -EWOULDBLOCK; ++ close_nointr_nofail(fd_lock); fd_lock = -1; + goto skip; + } + } +@@ -318,7 +319,7 @@ static void worker_new(struct event *eve + } + + if (fd_lock >= 0) +- close(fd_lock); ++ close_nointr_nofail(fd_lock); + + /* send processed event back to libudev listeners */ + udev_monitor_send_device(worker_monitor, NULL, dev); +@@ -378,9 +379,9 @@ skip: + out: + udev_device_unref(dev); + if (fd_signal >= 0) +- close(fd_signal); ++ close_nointr_nofail(fd_signal); + if (fd_ep >= 0) +- close(fd_ep); ++ close_nointr_nofail(fd_ep); + close(fd_inotify); + close(worker_watch[WRITE_END]); + udev_rules_unref(rules); diff --git a/1025-udev-exclude-device-mapper-from-block-device-ownersh.patch b/1025-udev-exclude-device-mapper-from-block-device-ownersh.patch new file mode 100644 index 00000000..2dc531f4 --- /dev/null +++ b/1025-udev-exclude-device-mapper-from-block-device-ownersh.patch @@ -0,0 +1,39 @@ +From e918a1b5a94f270186dca59156354acd2a596494 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 3 Jun 2014 16:49:38 +0200 +Subject: [PATCH] udev: exclude device-mapper from block device ownership event + locking + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 819ea3b..6c05104 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -290,7 +290,19 @@ static void worker_new(struct event *event) + * acquired the lock, the external process will block until + * udev has finished its event handling. + */ +- if (streq_ptr("block", udev_device_get_subsystem(dev))) { ++ ++ /* ++ * since we make check - device seems unused - we try ++ * ioctl to deactivate - and device is found to be opened ++ * sure, you try to take a write lock ++ * if you get it udev is out ++ * if you can't get it, udev is busy ++ * we cannot deactivate openned device (as it is in-use) ++ * maybe we should just exclude dm from that thing entirely ++ * IMHO this sounds like a good plan for this moment ++ */ ++ if (streq_ptr("block", udev_device_get_subsystem(dev)) && ++ !startswith("dm-", udev_device_get_sysname(dev))) { + struct udev_device *d = dev; + + if (streq_ptr("partition", udev_device_get_devtype(d))) +-- +1.8.4.5 + diff --git a/1026-udevd-inotify-modernizations.patch b/1026-udevd-inotify-modernizations.patch new file mode 100644 index 00000000..c63093ff --- /dev/null +++ b/1026-udevd-inotify-modernizations.patch @@ -0,0 +1,85 @@ +From edd32000c806e4527c5f376d138f7bff07724c26 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 11:05:45 +0200 +Subject: [PATCH] udevd: inotify - modernizations + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 45 ++++++++++++++++++++++----------------------- + 1 file changed, 22 insertions(+), 23 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -736,20 +736,30 @@ out: + return udev_ctrl_connection_unref(ctrl_conn); + } + ++static void synthesize_change(struct udev_device *dev) { ++ char filename[UTIL_PATH_SIZE]; ++ ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++} ++ + /* read inotify messages */ + static int handle_inotify(struct udev *udev) + { + int nbytes, pos; + char *buf; + struct inotify_event *ev; ++ int r; + +- if ((ioctl(fd_inotify, FIONREAD, &nbytes) < 0) || (nbytes <= 0)) +- return 0; ++ r = ioctl(fd_inotify, FIONREAD, &nbytes); ++ if (r < 0 || nbytes <= 0) ++ return -errno; + + buf = malloc(nbytes); +- if (buf == NULL) { ++ if (!buf) { + log_error("error getting buffer for inotify"); +- return -1; ++ return -ENOMEM; + } + + nbytes = read(fd_inotify, buf, nbytes); +@@ -759,27 +769,16 @@ static int handle_inotify(struct udev *u + + ev = (struct inotify_event *)(buf + pos); + dev = udev_watch_lookup(udev, ev->wd); +- if (dev != NULL) { +- log_debug("inotify event: %x for %s", ev->mask, udev_device_get_devnode(dev)); +- if (ev->mask & IN_CLOSE_WRITE) { +- char filename[UTIL_PATH_SIZE]; +- int fd; +- +- log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); +- strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); +- fd = open(filename, O_WRONLY|O_CLOEXEC); +- if (fd >= 0) { +- if (write(fd, "change", 6) < 0) +- log_debug("error writing uevent: %m"); +- close(fd); +- } +- } +- if (ev->mask & IN_IGNORED) +- udev_watch_end(udev, dev); ++ if (!dev) ++ continue; + +- udev_device_unref(dev); +- } ++ log_debug("inotify event: %x for %s", ev->mask, udev_device_get_devnode(dev)); ++ if (ev->mask & IN_CLOSE_WRITE) ++ synthesize_change(dev); ++ else if (ev->mask & IN_IGNORED) ++ udev_watch_end(udev, dev); + ++ udev_device_unref(dev); + } + + free(buf); diff --git a/1027-udev-synthesize-change-events-for-partitions-when-to.patch b/1027-udev-synthesize-change-events-for-partitions-when-to.patch new file mode 100644 index 00000000..ab09c1b2 --- /dev/null +++ b/1027-udev-synthesize-change-events-for-partitions-when-to.patch @@ -0,0 +1,84 @@ +From f3a740a5dae792fb6b2d411022ce8c29ced1c3f1 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 12:16:28 +0200 +Subject: [PATCH] udev: synthesize "change' events for partitions when tools + change the disk + +This should make sure that fdisk-like programs will automatically +cause an update of all partitions, just like mkfs-like programs cause +an update of the partition. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 42 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -46,6 +46,7 @@ + #include + + #include "udev.h" ++#include "udev-util.h" + #include "sd-daemon.h" + #include "cgroup-util.h" + #include "dev-setup.h" +@@ -736,15 +737,54 @@ out: + return udev_ctrl_connection_unref(ctrl_conn); + } + +-static void synthesize_change(struct udev_device *dev) { ++static int synthesize_change(struct udev_device *dev) { + char filename[UTIL_PATH_SIZE]; ++ int r; + + log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); + strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); + write_string_file(filename, "change"); ++ ++ /* for disks devices, re-trigger all partitions too */ ++ if (streq_ptr("block", udev_device_get_subsystem(dev)) && ++ streq_ptr("disk", udev_device_get_devtype(dev))) { ++ struct udev *udev = udev_device_get_udev(dev); ++ _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; ++ struct udev_list_entry *item; ++ ++ e = udev_enumerate_new(udev); ++ if (!e) ++ return -ENOMEM; ++ ++ r = udev_enumerate_add_match_parent(e, dev); ++ if (r < 0) ++ return r; ++ ++ r = udev_enumerate_add_match_subsystem(e, "block"); ++ if (r < 0) ++ return r; ++ ++ r = udev_enumerate_scan_devices(e); ++ udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { ++ _cleanup_udev_device_unref_ struct udev_device *d = NULL; ++ ++ d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); ++ if (!d) ++ continue; ++ ++ if (!streq_ptr("partition", udev_device_get_devtype(d))) ++ continue; ++ ++ log_debug("device %s closed, synthesising partition '%s' 'change'", ++ udev_device_get_devnode(dev), udev_device_get_devnode(d)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(d), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ } ++ } ++ ++ return 0; + } + +-/* read inotify messages */ + static int handle_inotify(struct udev *udev) + { + int nbytes, pos; diff --git a/1028-udev-link-config-fix-mem-leak.patch b/1028-udev-link-config-fix-mem-leak.patch new file mode 100644 index 00000000..265009f0 --- /dev/null +++ b/1028-udev-link-config-fix-mem-leak.patch @@ -0,0 +1,34 @@ +From edf029b7fd9a5853a87d3ca99aac2922bb8a277e Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Wed, 4 Jun 2014 12:34:23 +0200 +Subject: [PATCH] udev: link-config - fix mem leak + +Reported by Kay. + +Signed-off-by: Robert Milasan +--- + src/udev/net/link-config.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: systemd-210/src/udev/net/link-config.c +=================================================================== +--- systemd-210.orig/src/udev/net/link-config.c ++++ systemd-210/src/udev/net/link-config.c +@@ -118,6 +118,7 @@ static void link_configs_free(link_confi + free(link->match_type); + free(link->description); + free(link->alias); ++ free(link->name_policy); + + free(link); + } +@@ -205,7 +206,8 @@ static bool enable_name_policy(void) { + + int link_config_load(link_config_ctx *ctx) { + int r; +- char **files, **f; ++ _cleanup_strv_free_ char **files; ++ char **f; + + link_configs_free(ctx); + diff --git a/1029-udev-try-first-re-reading-the-partition-table.patch b/1029-udev-try-first-re-reading-the-partition-table.patch new file mode 100644 index 00000000..fa20002b --- /dev/null +++ b/1029-udev-try-first-re-reading-the-partition-table.patch @@ -0,0 +1,94 @@ +From ede344452a54e1c53f541cad12a06269a4fe96a9 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 13:30:24 +0200 +Subject: [PATCH] udev: try first re-reading the partition table + +mounted partitions: + # dd if=/dev/zero of=/dev/sda bs=1 count=1 + UDEV [4157.369250] change .../0:0:0:0/block/sda (block) + UDEV [4157.375059] change .../0:0:0:0/block/sda/sda1 (block) + UDEV [4157.397088] change .../0:0:0:0/block/sda/sda2 (block) + UDEV [4157.404842] change .../0:0:0:0/block/sda/sda4 (block) + +unmounted partitions: + # dd if=/dev/zero of=/dev/sdb bs=1 count=1 + UDEV [4163.450217] remove .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block) + UDEV [4163.593167] change .../target6:0:0/6:0:0:0/block/sdb (block) + UDEV [4163.713982] add .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block) + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 39 +++++++++++++++++++++++++++++++++------ + 1 file changed, 33 insertions(+), 6 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -741,17 +742,37 @@ static int synthesize_change(struct udev + char filename[UTIL_PATH_SIZE]; + int r; + +- log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); +- strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); +- write_string_file(filename, "change"); +- +- /* for disks devices, re-trigger all partitions too */ + if (streq_ptr("block", udev_device_get_subsystem(dev)) && +- streq_ptr("disk", udev_device_get_devtype(dev))) { ++ streq_ptr("disk", udev_device_get_devtype(dev)) && ++ !startswith("dm-", udev_device_get_sysname(dev))) { ++ int fd; + struct udev *udev = udev_device_get_udev(dev); + _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item; + ++ /* ++ * Try to re-read the partition table, this only succeeds if ++ * none of the devices is busy. ++ * ++ * The kernel will send out a change event for the disk, and ++ * "remove/add" for all partitions. ++ */ ++ fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); ++ if (fd >= 0) { ++ r = ioctl(fd, BLKRRPART, 0); ++ close(fd); ++ if (r >= 0) ++ return 0; ++ } ++ ++ /* ++ * Re-reading the partition table did not work, synthesize "change" ++ * events for the disk and all partitions. ++ */ ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ + e = udev_enumerate_new(udev); + if (!e) + return -ENOMEM; +@@ -780,8 +801,14 @@ static int synthesize_change(struct udev + strscpyl(filename, sizeof(filename), udev_device_get_syspath(d), "/uevent", NULL); + write_string_file(filename, "change"); + } ++ ++ return 0; + } + ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ + return 0; + } + diff --git a/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch b/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch new file mode 100644 index 00000000..6fb7b15f --- /dev/null +++ b/1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch @@ -0,0 +1,23 @@ +From 10fab50a3091e0b819c3ddab5a7c07acf750c050 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 14:09:31 +0200 +Subject: [PATCH] udev: guard REREADP logic with open(O_ECXL) + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -757,7 +757,7 @@ static int synthesize_change(struct udev + * The kernel will send out a change event for the disk, and + * "remove/add" for all partitions. + */ +- fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); ++ fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + if (fd >= 0) { + r = ioctl(fd, BLKRRPART, 0); + close(fd); diff --git a/1031-udev-make-sure-we-always-get-change-for-the-disk.patch b/1031-udev-make-sure-we-always-get-change-for-the-disk.patch new file mode 100644 index 00000000..4f48cd3a --- /dev/null +++ b/1031-udev-make-sure-we-always-get-change-for-the-disk.patch @@ -0,0 +1,98 @@ +From e9fc29f4ecc9509ccc02eb8a014341e26c0d7831 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 15:17:15 +0200 +Subject: [PATCH] udev: make sure we always get "change" for the disk + +The kernel will return 0 for REREADPT when no partition table +is found, we have to send out "change" ourselves. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 53 +++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 39 insertions(+), 14 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -745,34 +745,28 @@ static int synthesize_change(struct udev + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && + !startswith("dm-", udev_device_get_sysname(dev))) { ++ bool part_table_read = false; ++ bool has_partitions = false; + int fd; + struct udev *udev = udev_device_get_udev(dev); + _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item; + + /* +- * Try to re-read the partition table, this only succeeds if +- * none of the devices is busy. +- * +- * The kernel will send out a change event for the disk, and +- * "remove/add" for all partitions. ++ * Try to re-read the partition table. This only succeeds if ++ * none of the devices is busy. The kernel returns 0 if no ++ * partition table is found, and we will not get an event for ++ * the disk. + */ + fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + if (fd >= 0) { + r = ioctl(fd, BLKRRPART, 0); + close(fd); + if (r >= 0) +- return 0; ++ part_table_read = true; + } + +- /* +- * Re-reading the partition table did not work, synthesize "change" +- * events for the disk and all partitions. +- */ +- log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); +- strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); +- write_string_file(filename, "change"); +- ++ /* search for partitions */ + e = udev_enumerate_new(udev); + if (!e) + return -ENOMEM; +@@ -786,6 +780,37 @@ static int synthesize_change(struct udev + return r; + + r = udev_enumerate_scan_devices(e); ++ ++ udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { ++ _cleanup_udev_device_unref_ struct udev_device *d = NULL; ++ ++ d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); ++ if (!d) ++ continue; ++ ++ if (!streq_ptr("partition", udev_device_get_devtype(d))) ++ continue; ++ ++ has_partitions = true; ++ break; ++ } ++ ++ /* ++ * We have partitions and re-read the table, the kernel already sent ++ * out a "change" event for the disk, and "remove/add" for all ++ * partitions. ++ */ ++ if (part_table_read && has_partitions) ++ return 0; ++ ++ /* ++ * We have partitions but re-reading the partition table did not ++ * work, synthesize "change" for the disk and all partitions. ++ */ ++ log_debug("device %s closed, synthesising 'change'", udev_device_get_devnode(dev)); ++ strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); ++ write_string_file(filename, "change"); ++ + udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { + _cleanup_udev_device_unref_ struct udev_device *d = NULL; + diff --git a/1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch b/1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch new file mode 100644 index 00000000..4a6d7c13 --- /dev/null +++ b/1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch @@ -0,0 +1,29 @@ +From 02ba8fb3357daf57f6120ac512fb464a4c623419 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 4 Jun 2014 16:21:19 +0200 +Subject: [PATCH] udev: guard REREADPT by exclusive lock instead of O_EXCL + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -758,9 +758,12 @@ static int synthesize_change(struct udev + * partition table is found, and we will not get an event for + * the disk. + */ +- fd = open(udev_device_get_devnode(dev), O_RDONLY|O_EXCL|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); ++ fd = open(udev_device_get_devnode(dev), O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); + if (fd >= 0) { +- r = ioctl(fd, BLKRRPART, 0); ++ r = flock(fd, LOCK_EX|LOCK_NB); ++ if (r >= 0) ++ r = ioctl(fd, BLKRRPART, 0); ++ + close(fd); + if (r >= 0) + part_table_read = true; diff --git a/1033-udev-really-exclude-device-mapper-from-block-device.patch b/1033-udev-really-exclude-device-mapper-from-block-device.patch new file mode 100644 index 00000000..594331c3 --- /dev/null +++ b/1033-udev-really-exclude-device-mapper-from-block-device.patch @@ -0,0 +1,39 @@ +From 638ca89c53e2b897cfb3f627f4acbc7d09af2f4c Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Tue, 10 Jun 2014 15:51:15 +0200 +Subject: [PATCH] udev: really exclude device-mapper from block device + ownership event locking + +Arguments were wrong order, no? +This fixes commits: + +e918a1b5a94f270186dca59156354acd2a596494 +3d06f4183470d42361303086ed9dedd29c0ffc1b + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -304,7 +304,7 @@ static void worker_new(struct event *eve + * IMHO this sounds like a good plan for this moment + */ + if (streq_ptr("block", udev_device_get_subsystem(dev)) && +- !startswith("dm-", udev_device_get_sysname(dev))) { ++ !startswith(udev_device_get_sysname(dev), "dm-")) { + struct udev_device *d = dev; + + if (streq_ptr("partition", udev_device_get_devtype(d))) +@@ -744,7 +744,7 @@ static int synthesize_change(struct udev + + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && +- !startswith("dm-", udev_device_get_sysname(dev))) { ++ !startswith(udev_device_get_sysname(dev), "dm-")) { + bool part_table_read = false; + bool has_partitions = false; + int fd; diff --git a/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch b/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch new file mode 100644 index 00000000..c2a21fce --- /dev/null +++ b/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch @@ -0,0 +1,26 @@ +From 47a3fa0f7679521b85f7aeba9e245c52cc7bb2cb Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Wed, 4 Jun 2014 23:40:43 +0200 +Subject: [PATCH] udev: check the return value from udev_enumerate_scan_devices + +The return value from udev_enumerate_scan_devices was stored but +never used. I assume this was meant to be checked. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -783,6 +783,8 @@ static int synthesize_change(struct udev + return r; + + r = udev_enumerate_scan_devices(e); ++ if (r < 0) ++ return r; + + udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { + _cleanup_udev_device_unref_ struct udev_device *d = NULL; diff --git a/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch b/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch new file mode 100644 index 00000000..09c5202c --- /dev/null +++ b/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch @@ -0,0 +1,32 @@ +From c9af1be90db5a29ac86605c67bc2bb4bc5780520 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 12 Jun 2014 12:25:03 +0200 +Subject: [PATCH] 99-systemd.rules: Ignore devices with 'SYSTEMD_READY=0' + +Whenever a rule sets 'SYSTEMD_READY=0' it tries to indicate +that systemd should ignore this device. So we should not +set the 'systemd' tag in these cases; otherwise systemd +will pick up the device. + +References: bnc#881942 + +Signed-off-by: Hannes Reinecke +--- + rules/99-systemd.rules.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index db72373..11ee262 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -11,6 +11,7 @@ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270 + + KERNEL=="vport*", TAG+="systemd" + ++SUBSYSTEM=="block", KERNEL!="ram*", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end" + SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd" + SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" + +-- +1.8.4.5 + diff --git a/1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch b/1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch new file mode 100644 index 00000000..d26c49c0 --- /dev/null +++ b/1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch @@ -0,0 +1,14 @@ +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +=================================================================== +--- systemd-210.orig/src/udev/rule_generator/75-persistent-net-generator.rules ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -68,7 +68,8 @@ ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="glob + ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" + + # match interface dev_id +-ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++# disable due to bnc#882714 ++# ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" + + # do not use "locally administered" MAC address + ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" diff --git a/1037-udev-exclude-cd-dvd-from-block-device.patch b/1037-udev-exclude-cd-dvd-from-block-device.patch new file mode 100644 index 00000000..0b8d68ff --- /dev/null +++ b/1037-udev-exclude-cd-dvd-from-block-device.patch @@ -0,0 +1,14 @@ +Exclude cd/dvd as well (bnc#882714) + +--- systemd-210/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c 2014-06-18 12:53:34.454235577 +0000 +@@ -744,7 +744,8 @@ static int synthesize_change(struct udev + + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && +- !startswith(udev_device_get_sysname(dev), "dm-")) { ++ !startswith(udev_device_get_sysname(dev), "dm-") && ++ !startswith(udev_device_get_sysname(dev), "sr")) { + bool part_table_read = false; + bool has_partitions = false; + int fd; diff --git a/1038-udev-fix-invalid-free-in-enable_name_policy.patch b/1038-udev-fix-invalid-free-in-enable_name_policy.patch new file mode 100644 index 00000000..4afdb7ce --- /dev/null +++ b/1038-udev-fix-invalid-free-in-enable_name_policy.patch @@ -0,0 +1,30 @@ +From f8a0bb5285024b6ce372c3157e761e6543ebdcd2 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 13 Jun 2014 18:48:21 +0200 +Subject: [PATCH] udev: fix invalid free() in enable_name_policy() + +static bool enable_name_policy(...) in ./src/udev/net/link-config.c +calls proc_cmdline(...) to get "line" initialized, but +proc_cmdline(...) does not guarantee that atleast when both +conditions (detect_container(NULL) > 0) and +read_full_file(...) returned < 0. +--- + src/udev/net/link-config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/udev/net/link-config.c src/udev/net/link-config.c +index a9acc3d..7a9d01b 100644 +--- src/udev/net/link-config.c ++++ src/udev/net/link-config.c +@@ -185,7 +185,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) { + } + + static bool enable_name_policy(void) { +- _cleanup_free_ char *line; ++ _cleanup_free_ char *line = NULL; + char *w, *state; + int r; + size_t l; +-- +1.7.9.2 + diff --git a/1039-udevadm-settle-fixed-return-code-for-empty-queue.patch b/1039-udevadm-settle-fixed-return-code-for-empty-queue.patch new file mode 100644 index 00000000..2760970f --- /dev/null +++ b/1039-udevadm-settle-fixed-return-code-for-empty-queue.patch @@ -0,0 +1,34 @@ +From 83be2c398589a3d64db5999cfd5527c5219bff46 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 20 May 2014 12:25:16 +0200 +Subject: [PATCH] udevadm-settle: fixed return code for empty queue + +If the udev queue is empty and "/run/udev/queue" does not exist, +"udevadm settle" would return with EXIT_FAILURE, because the inotify on +"/run/udev/queue" would fail with ENOENT. + +This patch lets "udevadm settle" exit with EXIT_SUCCESS in this case. +--- + src/udev/udevadm-settle.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c +index 65fc35f..66fd843 100644 +--- src/udev/udevadm-settle.c ++++ src/udev/udevadm-settle.c +@@ -116,7 +116,11 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) + } + + if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { +- log_debug("watching /run/udev failed"); ++ /* If it does not exist, we don't have to wait */ ++ if (errno == ENOENT) ++ rc = EXIT_SUCCESS; ++ else ++ log_debug("watching /run/udev/queue failed"); + goto out; + } + +-- +1.7.9.2 + diff --git a/1040-re-enable-dev_id-conditionally-in-persistent-rules.patch b/1040-re-enable-dev_id-conditionally-in-persistent-rules.patch new file mode 100644 index 00000000..e203d8d3 --- /dev/null +++ b/1040-re-enable-dev_id-conditionally-in-persistent-rules.patch @@ -0,0 +1,16 @@ +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +=================================================================== +--- systemd-210.orig/src/udev/rule_generator/75-persistent-net-generator.rules ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -68,8 +68,9 @@ ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="glob + ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" + + # match interface dev_id +-# disable due to bnc#882714 +-# ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++# HACK: for s390x, if layer2 == 0, dont use dev_id ++ENV{LAYER2}="1", TEST=="device/layer2", ENV{LAYER2}="$attr{device/layer2}" ++ENV{LAYER2}!="0", ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" + + # do not use "locally administered" MAC address + ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" diff --git a/apply-ACL-for-nvidia-uvm-device-node.patch b/apply-ACL-for-nvidia-uvm-device-node.patch new file mode 100644 index 00000000..6471d229 --- /dev/null +++ b/apply-ACL-for-nvidia-uvm-device-node.patch @@ -0,0 +1,26 @@ +From c79437b7967cf5a23faa881bc5da6b88b63a1ada Mon Sep 17 00:00:00 2001 +From: Stefan Dirsch +Date: Tue, 3 Jun 2014 15:05:55 +0200 +Subject: [PATCH] apply ACL for nvidia-uvm device node + +set ACL on nvidia-uvm device (bnc#879767). +--- + src/login/logind-acl.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c +index 54bc16b..a40af21 100644 +--- a/src/login/logind-acl.c ++++ b/src/login/logind-acl.c +@@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev, + if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) + break; + } ++ /* required for additional CUDA support (nvidia-uvm module with appropriate device), bnc#879767 */ ++ devnode_acl("/dev/nvidia-uvm", flush, del, old_uid, add, new_uid); + } + + return r; +-- +1.8.4.5 + diff --git a/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch b/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch deleted file mode 100644 index 1bde222f..00000000 --- a/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Frederic Crozat -Date: Wed, 9 Nov 2011 11:10:49 +0100 -Subject: delay fsck / cryptsetup after md / dmraid are started - ---- - src/cryptsetup/cryptsetup-generator.c | 1 + - units/systemd-fsck@.service.in | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -Index: systemd-208/src/cryptsetup/cryptsetup-generator.c -=================================================================== ---- systemd-208.orig/src/cryptsetup/cryptsetup-generator.c -+++ systemd-208/src/cryptsetup/cryptsetup-generator.c -@@ -119,6 +119,7 @@ static int create_disk( - "DefaultDependencies=no\n" - "BindsTo=dev-mapper-%i.device\n" - "IgnoreOnIsolate=true\n" -+ "After=md.service dmraid.service\n" - "After=systemd-readahead-collect.service systemd-readahead-replay.service\n", - f); - -Index: systemd-208/units/systemd-fsck@.service.in -=================================================================== ---- systemd-280.orig/units/systemd-fsck@.service.in -+++ systemd-280/units/systemd-fsck@.service.in -@@ -10,7 +10,7 @@ - Documentation=man:systemd-fsck@.service(8) - DefaultDependencies=no - BindsTo=%i.device --After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service -+After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service md.service dmraid.service - Before=shutdown.target - - [Service] ---- systemd-280.orig/units/systemd-fsck-root.service.in -+++ systemd-280/units/systemd-fsck-root.service.in -@@ -9,7 +9,7 @@ - Description=File System Check on Root Device - Documentation=man:systemd-fsck-root.service(8) - DefaultDependencies=no --After=systemd-readahead-collect.service systemd-readahead-replay.service -+After=systemd-readahead-collect.service systemd-readahead-replay.service md.service dmraid.service - Before=local-fs.target shutdown.target - - ConditionPathIsReadWrite=!/ diff --git a/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch b/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch deleted file mode 100644 index d53eb948..00000000 --- a/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Frederic Crozat -Date: Thu, 9 Feb 2012 16:19:38 +0000 -Subject: ensure DM and dmraid are started before local-fs-pre-target - -ensure md / dmraid is started before mounting partitions, -if fsck was disabled for them (bnc#733283). ---- - units/local-fs-pre.target | 1 + - 1 file changed, 1 insertion(+) - ---- systemd-206_git201308300826.orig/units/local-fs-pre.target -+++ systemd-206_git201308300826/units/local-fs-pre.target -@@ -9,3 +9,4 @@ - Description=Local File Systems (Pre) - Documentation=man:systemd.special(7) - RefuseManualStart=yes -+After=md.service dmraid.service diff --git a/ensure-ask-password-wall-starts-after-getty-tty1.patch b/ensure-ask-password-wall-starts-after-getty-tty1.patch index 17d2e05e..ac8dbcfd 100644 --- a/ensure-ask-password-wall-starts-after-getty-tty1.patch +++ b/ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -1,20 +1,23 @@ From: Frederic Crozat +Cc: Werner Fink Date: Wed, 24 Aug 2011 13:02:12 +0000 Subject: ensure ask-password-wall starts after getty@tty1 ensure passphrase is handled before starting getty on tty1. + --- - units/systemd-ask-password-wall.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + units/systemd-ask-password-wall.service.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) --- systemd-206_git201308300826.orig/units/systemd-ask-password-wall.service.in +++ systemd-206_git201308300826/units/systemd-ask-password-wall.service.in -@@ -8,7 +8,7 @@ +@@ -8,7 +8,8 @@ [Unit] Description=Forward Password Requests to Wall Documentation=man:systemd-ask-password-console.service(8) -After=systemd-user-sessions.service -+After=systemd-user-sessions.service getty@tty1.service ++Wants=getty.target ++After=systemd-user-sessions.service getty.target [Service] ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service diff --git a/ensure-sysctl-are-applied-after-modules-are-loaded.patch b/ensure-sysctl-are-applied-after-modules-are-loaded.patch deleted file mode 100644 index a672f33c..00000000 --- a/ensure-sysctl-are-applied-after-modules-are-loaded.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Frederic Crozat -Date: Mon, 9 Jan 2012 17:01:22 +0000 -Subject: ensure sysctl are applied after modules are loaded - -(bnc#725412) ---- - units/systemd-sysctl.service.in | 1 + - 1 file changed, 1 insertion(+) - ---- systemd-206_git201308300826.orig/units/systemd-sysctl.service.in -+++ systemd-206_git201308300826/units/systemd-sysctl.service.in -@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service - DefaultDependencies=no - Conflicts=shutdown.target - After=systemd-readahead-collect.service systemd-readahead-replay.service -+After=systemd-modules-load.service - Before=sysinit.target shutdown.target - ConditionPathIsReadWrite=/proc/sys/ - ConditionDirectoryNotEmpty=|/lib/sysctl.d diff --git a/getty-generator-with-serial-3270-tty.patch b/getty-generator-with-serial-3270-tty.patch deleted file mode 100644 index 41a2e278..00000000 --- a/getty-generator-with-serial-3270-tty.patch +++ /dev/null @@ -1,34 +0,0 @@ -The path for the serial 3270 console looks like (dev/)3270/tty1 which -causes trouble in the systemd-getty-generator as the add_symlink() -tries to make directories for each slash even for the slash after -the @ symbol in the final link name. - ---- - getty-generator.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- systemd-210/src/getty-generator/getty-generator.c -+++ systemd-210/src/getty-generator/getty-generator.c 2014-03-14 14:13:09.296463091 +0000 -@@ -67,6 +67,7 @@ static int add_symlink(const char *fserv - - static int add_serial_getty(const char *tty) { - _cleanup_free_ char *n = NULL; -+ char *at; - - assert(tty); - -@@ -76,6 +77,14 @@ static int add_serial_getty(const char * - if (!n) - return log_oom(); - -+ if ((at = strchr(n, '@'))) { -+ char *sl; -+ while (*(++at) && (sl = strchr(at, '/'))) { -+ *sl = '-'; -+ at = sl; -+ } -+ } -+ - return add_symlink("serial-getty@.service", n); - } - diff --git a/insserv-generator.patch b/insserv-generator.patch index f1a2452f..5525222a 100644 --- a/insserv-generator.patch +++ b/insserv-generator.patch @@ -13,11 +13,11 @@ systemd unit drop-in files to add dependencies create mode 100644 src/insserv-generator/Makefile create mode 100644 src/insserv-generator/insserv-generator.c -Index: systemd-208/Makefile.am +Index: systemd-210/Makefile.am =================================================================== ---- systemd-208.orig/Makefile.am -+++ systemd-208/Makefile.am -@@ -322,6 +322,7 @@ rootlibexec_PROGRAMS = \ +--- systemd-210.orig/Makefile.am ++++ systemd-210/Makefile.am +@@ -343,6 +343,7 @@ rootlibexec_PROGRAMS = \ systemd-socket-proxyd systemgenerator_PROGRAMS = \ @@ -25,7 +25,7 @@ Index: systemd-208/Makefile.am systemd-getty-generator \ systemd-fstab-generator \ systemd-system-update-generator -@@ -1658,6 +1659,14 @@ systemd_delta_LDADD = \ +@@ -1728,6 +1729,14 @@ systemd_delta_LDADD = \ libsystemd-shared.la # ------------------------------------------------------------------------------ @@ -40,10 +40,10 @@ Index: systemd-208/Makefile.am systemd_getty_generator_SOURCES = \ src/getty-generator/getty-generator.c -Index: systemd-208/src/insserv-generator/Makefile +Index: systemd-210/src/insserv-generator/Makefile =================================================================== --- /dev/null -+++ systemd-208/src/insserv-generator/Makefile ++++ systemd-210/src/insserv-generator/Makefile @@ -0,0 +1,28 @@ +# This file is part of systemd. +# @@ -73,10 +73,10 @@ Index: systemd-208/src/insserv-generator/Makefile + $(MAKE) -C .. clean + +.PHONY: all clean -Index: systemd-208/src/insserv-generator/insserv-generator.c +Index: systemd-210/src/insserv-generator/insserv-generator.c =================================================================== --- /dev/null -+++ systemd-208/src/insserv-generator/insserv-generator.c ++++ systemd-210/src/insserv-generator/insserv-generator.c @@ -0,0 +1,312 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -146,7 +146,7 @@ Index: systemd-208/src/insserv-generator/insserv-generator.c + static const char * const table[] = { + /* LSB defined facilities */ + "local_fs", NULL, -+ "network", SPECIAL_NETWORK_TARGET, ++ "network", SPECIAL_NETWORK_ONLINE_TARGET, + "named", SPECIAL_NSS_LOOKUP_TARGET, + "portmap", SPECIAL_RPCBIND_TARGET, + "remote_fs", SPECIAL_REMOTE_FS_TARGET, diff --git a/keep-crypt-password-prompt.patch b/keep-crypt-password-prompt.patch index 3caffec8..10ddf398 100644 --- a/keep-crypt-password-prompt.patch +++ b/keep-crypt-password-prompt.patch @@ -9,10 +9,10 @@ + struct dirent *de; + + if (!(d = opendir("/run/systemd/ask-password"))) { -+ log_error("opendir(): %m"); + + if (errno == ENOENT) + return 1; ++ log_error("opendir(/run/systemd/ask-password): %m"); + + return -errno; + } diff --git a/systemd-detect-xendom.patch b/systemd-detect-xendom.patch deleted file mode 100644 index 7c02a07a..00000000 --- a/systemd-detect-xendom.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -Naur systemd-210/src/shared/virt.c systemd-210-mod/src/shared/virt.c ---- systemd-210/src/shared/virt.c 2014-02-24 15:38:03.909784909 +0100 -+++ systemd-210/src/shared/virt.c 2014-04-10 13:48:05.568766957 +0200 -@@ -149,7 +149,7 @@ - - /* Returns a short identifier for the various VM implementations */ - int detect_vm(const char **id) { -- _cleanup_free_ char *hvtype = NULL, *cpuinfo_contents = NULL; -+ _cleanup_free_ char *domcap = NULL, *cpuinfo_contents = NULL; - static thread_local int cached_found = -1; - static thread_local const char *cached_id = NULL; - const char *_id = NULL; -@@ -166,13 +166,18 @@ - /* Try high-level hypervisor sysfs file first: - * - * https://bugs.freedesktop.org/show_bug.cgi?id=61491 */ -- r = read_one_line_file("/sys/hypervisor/type", &hvtype); -+ r = read_one_line_file("/proc/xen/capabilities", &domcap); - if (r >= 0) { -- if (streq(hvtype, "xen")) { -- _id = "xen"; -+ if (strstr(domcap, "control_d")) { -+ r = 0; -+ _id = "xen-dom0"; -+ } else { - r = 1; -- goto finish; -+ _id = "xen-domU"; - } -+ -+ goto finish; -+ - } else if (r != -ENOENT) - return r; - diff --git a/systemd-mini.changes b/systemd-mini.changes index 70662ea3..da40a9c5 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,316 @@ +------------------------------------------------------------------- +Fri Jun 27 08:17:47 UTC 2014 - werner@suse.de + +- Update of patch 0001-detect-s390-virt.patch (bnc#880438) + +------------------------------------------------------------------- +Thu Jun 26 10:02:26 UTC 2014 - werner@suse.de + +- Shut up stupid check scripts crying for not mentioned systemd-mini-rpmlintrc + +------------------------------------------------------------------- +Thu Jun 26 09:31:19 UTC 2014 - werner@suse.de + +- Add upstream patchs + 0001-core-use-correct-format-string-for-UIDs.patch + 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch + 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch + +------------------------------------------------------------------- +Thu Jun 26 06:44:09 UTC 2014 - werner@suse.de + +- Add upstream patch + 0001-units-order-network-online.target-after-network.targ.patch + to make sure that etwork-online.target follows network.target + +------------------------------------------------------------------- +Wed Jun 25 18:09:52 UTC 2014 - rmilasan@suse.com + +- rules: re-enable dev_id conditionally in persistent rules + (bnc#884403 and bnc#882714). + Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch + +------------------------------------------------------------------- +Wed Jun 25 17:27:55 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch + 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch + 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch + 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch + 0005-man-fix-path-in-crypttab-5.patch + +------------------------------------------------------------------- +Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de + +- Add upstream patch + 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch it + fixes udevadm settle exit code which may had roken dracut scripts + (bnc#884271 comment#18) + +------------------------------------------------------------------- +Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de + +- Temporary disable patch 1022 (bnc#884271 and bnc#882714). + +------------------------------------------------------------------- +Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com + +- Rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch + to 1038-udev-fix-invalid-free-in-enable_name_policy.patch + +------------------------------------------------------------------- +Tue Jun 24 11:27:27 UTC 2014 - werner@suse.de + +- Replace patches + 0001-systemd-empty-sigmask-on-reexec.patch with + upstream 0008-Reset-signal-mask-on-re-exec-to-init.patch + ensure-sysctl-are-applied-after-modules-are-loaded.patch with + upstream 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch + getty-generator-with-serial-3270-tty.patch with + upstream 0004-getty-generator-properly-escape-instance-names.patch +- Add upstream patches + 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch + 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch + 0005-po-add-Greek-translation.patch + 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch + 0007-po-add-German-translation.patch + 0009-core-clean-up-signal-reset-logic-when-reexec.patch + 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch + 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch + 0012-core-transaction-avoid-misleading-error-message-when.patch + +------------------------------------------------------------------- +Tue Jun 24 10:04:21 UTC 2014 - werner@suse.de + +- Invert of the boolean for locking scheme of fsck (bnc#881125) +- Remove the ghost entry /etc/hostname and require the netcfg + +------------------------------------------------------------------- +Mon Jun 23 16:39:50 UTC 2014 - arvidjaar@gmail.com + +- make sure legacy services that depend on network are started after + network is available (bnc#883565) + * 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch + * update insserv-generator.patch to translate $network into + network-online.target + +------------------------------------------------------------------- +Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de + +- Add patch 0001-detect-s390-virt.patch from Thomas Blume (bnc#880438) + to detect the virtualization layers on s390x as well + +------------------------------------------------------------------- +Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de + +- Do not generate synthesize change for cd/dvd (bnc#882714, comment #51) + add patch 1037-udev-exclude-cd-dvd-from-block-device.patch from + Roberts suggestion as well as readd + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + +------------------------------------------------------------------- +Tue Jun 17 14:21:56 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-core-fix-invalid-free-in-killall.patch + 0002-udev-fix-invalid-free-in-enable_name_policy.patch + 0003-install-fix-invalid-free-in-unit_file_mask.patch + +------------------------------------------------------------------- +Tue Jun 17 11:43:23 UTC 2014 - rmilasan@suse.com + +- rules: disable usage of dev_id in persistent rules (bnc#882714). + add: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +- Disable patch (bnc#882714). + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + +------------------------------------------------------------------- +Thu Jun 12 12:14:11 UTC 2014 - werner@suse.de + +- Add patch + 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch + from Hannes Reinecke to avoid a race condition between variable + 'SYSTEMD_READY=0' and 'systemd' tag within udev rules (bnc#881942) + +------------------------------------------------------------------- +Thu Jun 12 09:40:54 UTC 2014 - werner@suse.de + +- Add workaround for bnc#882393 by adding the systemd update utmp + runlevel service to the wanted unit of e.g. the graphical target +- Add some later on created files to our file list + +------------------------------------------------------------------- +Thu Jun 12 03:33:01 UTC 2014 - jlee@suse.com + +- Generate %{_libexecdir}/modules-load.d/efivars.conf so we load efivars + module at boot time not from udev (bnc#881559). + +------------------------------------------------------------------- +Wed Jun 11 21:59:29 UTC 2014 - crrodriguez@opensuse.org + +- Do not build EFI support code in architectures on which + the kernel does not support CONFIG_EFI, it won't work. + (ia64 also supports it, but that's dead so is not included) + +------------------------------------------------------------------- +Wed Jun 11 14:09:30 UTC 2014 - werner@suse.de + +- Add patch tmpfiles-do-not-clean-for-mandb-index-files.patch + there is no need to clean out all 30 days the index data base + files nor the cachedir tags of mandb. Those files are used + for whatis(1) as well as for apropos(1). + +------------------------------------------------------------------- +Wed Jun 11 13:31:53 UTC 2014 - werner@suse.de + +- Do not override predictable names for openSUSE + +------------------------------------------------------------------- +Wed Jun 11 11:03:45 UTC 2014 - werner@suse.de + +- Remove systemd-detect-xendom.patch as it becomes obsolete with + upstream patch 0004-systemd-detect-virt-only-discover-Xen-domU.patch +- Add upstream patches + 0001-umount-modernizations.patch + 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch + 0003-core-allow-transient-mount-units.patch + 0004-systemd-detect-virt-only-discover-Xen-domU.patch + 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch + 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch + +------------------------------------------------------------------- +Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1033-udev-really-exclude-device-mapper-from-block-device.patch + 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch + +------------------------------------------------------------------- +Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de + +- Change detection of new locking scheme of fsck + +------------------------------------------------------------------- +Tue Jun 10 11:11:55 UTC 2014 - werner@suse.de + +- Change 1021-udev-re-add-persistent-net-rules.patch to use persistent + rules as a default on SLES-12 and predictable rules as a default + otherwise +- Add cflags shell function to check possible flags for the compiler + as well as for the linker + +------------------------------------------------------------------- +Mon Jun 9 08:38:33 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch + 1026-udevd-inotify-modernizations.patch + 1027-udev-synthesize-change-events-for-partitions-when-to.patch + 1028-udev-link-config-fix-mem-leak.patch + 1029-udev-try-first-re-reading-the-partition-table.patch + 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch + 1031-udev-make-sure-we-always-get-change-for-the-disk.patch + 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch + +------------------------------------------------------------------- +Fri Jun 6 10:24:19 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-sd-event-restore-correct-timeout-behaviour.patch + 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch + +------------------------------------------------------------------- +Thu Jun 5 13:29:20 UTC 2014 - werner@suse.de + +- Add upstream patch 0001-hwdb-fix-case-sensitive-match.patch + +------------------------------------------------------------------- +Thu Jun 5 13:23:24 UTC 2014 - werner@suse.de + +- Add dynamic detection of util-linux version to be able to + disable the fsck option -l for version less than 2.25.0 + +------------------------------------------------------------------- +Thu Jun 5 08:06:02 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * The patches + delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch and + ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch + indeed mention unit files which do not exist anymore. +- Make sure that systemd-ask-password-wall.service has a tty as + it is not sure that a tty1 exists +- Avoid broken firmware loading on newer distributions as 13.1 + +------------------------------------------------------------------- +Thu Jun 5 07:24:35 UTC 2014 - werner@suse.de + +- Correct version check for the tcp-devel drop +- Use correct permissions for /var/log/journal +- Use ACLs for /var/log/journal as described in man:systemd-journald.service(8) + +------------------------------------------------------------------- +Thu Jun 5 02:33:48 UTC 2014 - crrodriguez@opensuse.org + +- Correct the libseccomp distribution version test must be >= 13.1 +- In order to use unit directive AppArmorProfile= libapparmor-devel + must be present in buildRequires. + +------------------------------------------------------------------- +Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com + +- apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm + device (bnc#879767). + +------------------------------------------------------------------- +Tue Jun 3 15:56:01 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * fix keep-crypt-password-prompt.patch which floods the system + logs with bogus opendir failures, still the wrong thing to do however. + * Use %find_lang to collect locale files + * systemd-no-libattr.patch: systemd does not require libattr + but just sys/xattr.h, therefore drop the dependency. + (from upstream) + * Again, drop tcp-devel from buildRequires, this time it is not a + SUSE specific feature removal, tcpd supportdisappeared in systemd + 212 and we shouldn't keep it around. +- Add patch 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch + that is rename systemd-no-libattr.patch to git format +- Drop tcp-devel only for *next* openSUSE and not for SLES-12 nor + for openSUSE 13.1 + +------------------------------------------------------------------- +Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-virt-rework-container-detection-logic.patch + 0002-fsck-include-device-name-in-the-message-about-missin.patch + 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch + 0004-util-ignore_file-should-not-allow-files-ending-with.patch + 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +- Add upstream patches to update keyboard data base + 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +- Add upstream patches for udev + 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch + 1024-udev-always-close-lock-file-descriptor.patch + +------------------------------------------------------------------- +Tue Jun 3 12:55:53 UTC 2014 - rmilasan@suse.com + +- Fix enabling predictable rules when using net.ifnames=1. + update: 1021-udev-re-add-persistent-net-rules.patch + +------------------------------------------------------------------- +Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com + +- Re-add persistent rules as a default and make predictable rules as + fallback (bnc#880732). + add: 1021-udev-re-add-persistent-net-rules.patch +- udev: remove seqnum API and all assumptions about seqnums + add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Tue May 27 07:23:47 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 6c0acde3..15e40108 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -26,6 +26,12 @@ %bcond_without compat_libs %bcond_with networkd %bcond_with python +%ifarch %{ix86} x86_64 aarch64 +%define has_efi 1 +%else +%define has_efi 0 +%endif +%bcond_with udevsettle Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd @@ -38,6 +44,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: %{real} = %{version}-%{release} +BuildRequires: acl BuildRequires: audit-devel %if %{with compat_libs} # See gold_archs in binutils.spec @@ -59,7 +66,6 @@ BuildRequires: gtk-doc %endif BuildRequires: intltool BuildRequires: libacl-devel -BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libkmod-devel BuildRequires: libsepol-devel @@ -72,7 +78,9 @@ BuildRequires: pam-devel %if 0%{?suse_version} > 1310 BuildRequires: systemd-rpm-macros %endif +%if 0%{?suse_version} <= 1315 BuildRequires: tcpd-devel +%endif BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 %if ! 0%{?bootstrap} @@ -98,11 +106,14 @@ BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 %endif -%if 0%{?suse_version} > 1310 +%if 0%{?suse_version} >= 1310 %ifarch %ix86 x86_64 x32 %arm BuildRequires: pkgconfig(libseccomp) %endif %endif +%if ! 0%{?bootstrap} +BuildRequires: libapparmor-devel +%endif BuildRequires: pkgconfig(libselinux) >= 2.1.9 BuildRequires: pkgconfig(libsepol) %if 0%{?suse_version} > 1310 @@ -125,6 +136,7 @@ Requires: kmod >= 14 %else Requires: kmod >= 15 %endif +Requires: netcfg Requires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding @@ -135,12 +147,21 @@ Requires(post): findutils %if ! 0%{?bootstrap} Requires(post): pam-config %endif +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/awk +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz +%if ! 0%{?bootstrap} Source1: systemd-rpmlintrc +%else +Source1: systemd-mini-rpmlintrc +%endif Source2: localfs.service Source3: systemd-sysv-convert Source6: baselibs.conf @@ -168,16 +189,15 @@ Patch6: insserv-generator.patch Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch -Patch11: delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch -Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch -Patch14: ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch13: 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch Patch18: fix-owner-of-var-log-btmp.patch -# PATCH-FIX-SUSE Avoid error message about not existing getty@3270 file -Patch19: getty-generator-with-serial-3270-tty.patch +# PATCH-FIX-UPSTREAM Avoid error message about not existing getty@3270 file +Patch19: 0004-getty-generator-properly-escape-instance-names.patch # PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -189,6 +209,8 @@ Patch21: allow-multiple-sulogin-to-be-started.patch Patch22: handle-SYSTEMCTL_OPTIONS-environment-variable.patch # PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices Patch27: apply-ACL-for-nvidia-device-nodes.patch +# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device +Patch28: apply-ACL-for-nvidia-uvm-device-node.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch # PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. @@ -225,8 +247,8 @@ Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch Patch91: plymouth-quit-and-wait-for-emergency-service.patch # PATCH-FIX-SUSE 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -- Avoid systemd crash on resume (bnc#861488) Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -# PATCH-FIX-SUSE 0001-systemd-empty-sigmask-on-reexec.patch werner@suse.com -Patch114: 0001-systemd-empty-sigmask-on-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch114: 0008-Reset-signal-mask-on-re-exec-to-init.patch # PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com Patch117: 0001-make-209-working-on-older-dist.patch # PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com @@ -381,8 +403,8 @@ Patch193: portmap-wants-rpcbind-socket.patch Patch194: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-USTREAM added at 2014/03/14 Patch195: 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch -# PATCH-FIX-SUSE Detect XEN dom0 as well as domU -Patch196: systemd-detect-xendom.patch +# PATCH-FIX-SUSE Do not clean the data base files of the manual pages +Patch196: tmpfiles-do-not-clean-for-mandb-index-files.patch # PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console Patch197: rescue-emergency-target-conflicts.patch # PATCH-FIX-SUSE Avoid a divide by zero sigtrap @@ -477,40 +499,116 @@ Patch242: 0004-machined-make-sure-GetMachineAddresses-is-available-.patch Patch243: 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch244: 0006-login-add-mir-to-the-list-of-session-types.patch -# PATCHFIX-UPSTREAM added at 2014/05/20 +# PATCH-FIX-UPSTREAM added at 2014/05/20 Patch245: 0007-logind-fix-Display-property-of-user-objects.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch246: 0001-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch247: 0002-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch248: 0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch249: 0004-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch250: 0005-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch251: 0001-journal-cleanup-up-error-handling-in-update_catalog.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch252: 0002-journal-properly-detect-language-specified-in-line.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch253: 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch254: 0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch255: 0002-keymap-Asus-EeePC-touchpad-toggle-key.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch256: 0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch257: 0002-nspawn-restore-journal-directory-is-empty-check.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch258: 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch259: 0004-socket-properly-handle-if-our-service-vanished-durin.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch260: 0001-Do-not-unescape-unit-names-in-Install-section.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch261: 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch262: 0001-virt-rework-container-detection-logic.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch263: 0002-fsck-include-device-name-in-the-message-about-missin.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch264: 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch +# PATCH-FIX-UPSTREAM added at 2014/06/05 +Patch269: 0001-hwdb-fix-case-sensitive-match.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch270: 0001-sd-event-restore-correct-timeout-behaviour.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch271: 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch272: 0001-umount-modernizations.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch273: 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch274: 0003-core-allow-transient-mount-units.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 - Detect XEN dom0 as well as domU +Patch275: 0004-systemd-detect-virt-only-discover-Xen-domU.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch276: 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch278: 0001-core-fix-invalid-free-in-killall.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch279: 0003-install-fix-invalid-free-in-unit_file_mask.patch +# PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) +Patch280: 0001-detect-s390-virt.patch +# PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available +Patch281: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch282: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch283: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch284: 0005-po-add-Greek-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch285: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch286: 0007-po-add-German-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch287: 0009-core-clean-up-signal-reset-logic-when-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch288: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch289: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch290: 0012-core-transaction-avoid-misleading-error-message-when.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch291: 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch292: 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch293: 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch295: 0005-man-fix-path-in-crypttab-5.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch296: 0001-units-order-network-online.target-after-network.targ.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch297: 0001-core-use-correct-format-string-for-UIDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch298: 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch299: 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch # UDEV PATCHES # ============ @@ -556,8 +654,48 @@ Patch1017: 1017-udev-serialize-synchronize-block-device-event-handli.patch Patch1018: 1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch1019: 1019-udev-avoid-use-of-uninitialized-err.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch +# PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch +Patch1021: 1021-udev-re-add-persistent-net-rules.patch +# PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch1024: 1024-udev-always-close-lock-file-descriptor.patch +# PATCH-FIX-UPSTREAM 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +Patch1025: 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +# PATCH-FIX-UPSTREAM 1026-udevd-inotify-modernizations.patch +Patch1026: 1026-udevd-inotify-modernizations.patch +# PATCH-FIX-UPSTREAM 1027-udev-synthesize-change-events-for-partitions-when-to.patch +Patch1027: 1027-udev-synthesize-change-events-for-partitions-when-to.patch +# PATCH-FIX-UPSTREAM 1028-udev-link-config-fix-mem-leak.patch +Patch1028: 1028-udev-link-config-fix-mem-leak.patch +# PATCH-FIX-UPSTREAM 1029-udev-try-first-re-reading-the-partition-table.patch +Patch1029: 1029-udev-try-first-re-reading-the-partition-table.patch +# PATCH-FIX-UPSTREAM 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +# PATCH-FIX-UPSTREAM 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +# PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +# PATCH-FIX-UPSTREAM 1033-udev-really-exclude-device-mapper-from-block-device.patch +Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch +# PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +# PATCH-FIX-SUSE 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +# PATCH-FIX-SUSE See bnc#882714 comment #51 +Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch +# PATCH-FIX-UPSTREAM 1038-udev-fix-invalid-free-in-enable_name_policy.patch +Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch +# PATCH-FIX-UPSTREAM 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +Patch1039: 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +# PATCH-FIX-SUSE 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch (bnc#884403 and bnc#882714) +Patch1040: 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -613,12 +751,19 @@ Summary: A rule-based device node and kernel event manager License: GPL-2.0 Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq +PreReq: /bin/rm +PreReq: %insserv_prereq +PreReq: %fillup_prereq +PreReq: /usr/bin/sg_inq +Requires(pre): /usr/bin/stat +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/bin/getent Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): sed -Requires(post): systemd +Requires(post): /usr/bin/systemctl %if %{defined regenerate_initrd_post} Requires(post): coreutils +Requires(post): /usr/bin/stat Requires(postun): coreutils Requires(posttrans): suse-module-tools Requires(posttrans): /sbin/mkinitrd @@ -720,6 +865,11 @@ License: LGPL-2.1+ Group: System/Base Provides: syslog Provides: sysvinit(syslog) +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl +Requires(post): /usr/bin/systemctl Conflicts: otherproviders(syslog) %description logger @@ -786,15 +936,13 @@ cp %{SOURCE7} m4/ %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 +%patch13 -p0 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 -%patch19 -p1 +%patch19 -p0 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -806,6 +954,7 @@ cp %{SOURCE7} m4/ # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html %patch27 -p1 +%patch28 -p1 %patch37 -p1 %ifarch %arm %patch38 -p1 @@ -900,8 +1049,8 @@ cp %{SOURCE7} m4/ %patch192 -p1 %patch193 -p1 %patch194 -p0 -%patch195 -p0 %patch196 -p1 +%patch195 -p0 %patch197 -p1 %patch198 -p1 %patch199 -p0 @@ -966,6 +1115,44 @@ cp %{SOURCE7} m4/ %patch259 -p0 %patch260 -p0 %patch261 -p0 +%patch262 -p0 +%patch263 -p0 +%patch264 -p0 +%patch265 -p0 +%patch266 -p0 +%patch267 -p0 +%patch268 -p0 +%patch269 -p0 +%patch270 -p0 +%patch271 -p0 +%patch272 -p0 +%patch273 -p0 +%patch274 -p0 +%patch275 -p0 +%patch276 -p0 +%patch277 -p0 +%patch278 -p0 +%patch279 -p0 +%patch280 -p1 +%patch281 -p1 +%patch282 -p0 +%patch283 -p0 +%patch284 -p0 +%patch285 -p0 +%patch286 -p0 +%patch287 -p0 +%patch288 -p0 +%patch289 -p0 +%patch290 -p0 +%patch291 -p0 +%patch292 -p0 +%patch293 -p0 +%patch294 -p0 +%patch295 -p0 +%patch296 -p0 +%patch297 -p0 +%patch298 -p0 +%patch299 -p0 # udev patches %patch1001 -p1 @@ -989,15 +1176,111 @@ cp %{SOURCE7} m4/ %patch1018 -p0 %patch1019 -p0 %patch1020 -p0 +%patch1021 -p1 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} +%patch1022 -p1 +%endif +%endif +%patch1023 -p0 +%patch1024 -p0 +%patch1025 -p1 +%patch1026 -p1 +%patch1027 -p1 +%patch1028 -p1 +%patch1029 -p1 +%patch1030 -p1 +%patch1031 -p1 +%patch1032 -p1 +%patch1033 -p1 +%patch1034 -p1 +%patch1035 -p1 +%patch1036 -p1 +%patch1037 -p1 +%patch1038 -p0 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} +%patch1039 -p0 +%endif +%endif +%patch1040 -p1 # ensure generate files are removed rm -f units/emergency.service +# disable "-l" option for fsck if it does not support new locking scheme +# compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +PATH=${PATH}:/sbin:/usr/sbin +PATH_FSCK=$(type -p fsck) +if grep -q /run/fsck/%%s\\.lock $PATH_FSCK +then + echo Found new $PATH_FSCK that is allow private locking +else + echo Found old $PATH_FSCK that is disable flock for this one + sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c +fi + +%if 0%{?suse_version} <= 1310 +# +# Older versions like oS 13.1 do not distinguish between +# network.target and network-online.target +# +for f in src/core/service.c src/insserv-generator/insserv-generator.c +do + sed -ri '/"network",.*SPECIAL_NETWORK_ONLINE_TARGET,/{ s/SPECIAL_NETWORK_ONLINE_TARGET/SPECIAL_NETWORK_TARGET/}' $f +done +%endif + %build +cflags () +{ + local flag=$1; shift + local var=$1; shift + local gold + test -n "${flag}" -a -n "${var}" || return + case "${!var}" in + *${flag}*) return + esac + if type ld.gold > /dev/null 2>&1 ; then + gold=-Wl,-fuse-ld=gold + fi + set -o noclobber + case "$flag" in + -Wl,*) + if echo 'int main () { return 0; }' | \ + ${CC:-gcc} -Werror $gold $flag -o /dev/null -xc - > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + rm -f ldtest.c + ;; + *) + if ${CC:-gcc} -Werror $gold $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + if ${CXX:-g++} -Werror $gold $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + esac + set +o noclobber +} autoreconf -fiv # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; -export V=1 +export V=e +export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)" +export LDFLAGS +%if 0%{?suse_version} == 1315 + CFLAGS="$CFLAGS -DNET_IFNAMES=1" +%else + CFLAGS="$CFLAGS -DNET_IFNAMES=0" + for rules in 75-persistent-net-generator 76-net-sriov-names + do + sed -ri '/^ENV\{net.ifnames\}=="1", GOTO="[^"]*"$/{ s/=="1"/!="0"/ }' src/udev/rule_generator/${rules}.rules + done +%endif +cflags -pipe CFLAGS +cflags -Wl,-O2 LDFLAGS +cflags -Wl,--hash-size=8599 LDFLAGS # keep split-usr until all packages have moved their systemd rules to /usr %configure \ --docdir=%{_docdir}/systemd \ @@ -1024,7 +1307,12 @@ export V=1 --enable-selinux \ --enable-split-usr \ --disable-static \ +%if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ +%endif +%if ! 0%{has_efi} + --disable-efi \ +%endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ --with-debug-shell=/bin/bash \ @@ -1036,8 +1324,7 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif - --disable-kdbus \ - CFLAGS="%{optflags}" + --disable-kdbus make %{?_smp_mflags} %if ! 0%{?bootstrap} make %{?_smp_mflags} update-man-list man @@ -1072,7 +1359,9 @@ ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd %if ! 0%{?bootstrap} ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8 %endif +%if 0%{?suse_version} <= 1310 ln -sf /lib/firmware %{buildroot}/usr/lib/firmware +%endif %if ! 0%{?bootstrap} install -m755 -D %{S:8} %{buildroot}/etc/init.d/systemd-journald install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config @@ -1140,6 +1429,12 @@ cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf # load sg module at boot time sg EOF +%if 0%{has_efi} +cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/efivars.conf +# load efivars module at boot time +efivars +EOF +%endif # To avoid making life hard for Factory developers, don't package the # kernel.core_pattern setting until systemd-coredump is a part of an actual @@ -1240,7 +1535,7 @@ do done %endif -%if 0%{suse_version} < 1310 +%if 0%{suse_version} <= 1310 cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' [Unit] Description=Fix against deadlock at shutdown @@ -1264,6 +1559,28 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants %endif +# Some files which may created by us or by the admin later on +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ + machine-id machine-info \ + systemd/system/runlevel2.target \ + systemd/system/runlevel3.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel5.target +do + > %{buildroot}%{_sysconfdir}/$ghost +done + +# Workaround for bug #882393 +for runlevel in poweroff rescue multi-user graphical reboot +do + mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants + ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ +done + +%find_lang systemd + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 @@ -1279,8 +1596,14 @@ exit 0 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : /usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : # Make sure new journal files -chgrp systemd-journal %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : -chmod g+s %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : +chgrp systemd-journal %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +chmod g+s %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +if read ID < /etc/machine-id > /dev/null 2>&1 ; then + chgrp systemd-journal %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : + chmod g+s %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : +fi +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then @@ -1348,7 +1671,7 @@ elif [ ! -e /lib/udev ]; then ln -s /usr/lib/udev /lib/udev fi # Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules -/usr/sbin/groupadd -r tape 2> /dev/null || : +getent group tape >/dev/null || groupadd -r tape 2> /dev/null || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root ; then if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then @@ -1427,7 +1750,13 @@ fi %postun -n libgudev-1_0-0 -p /sbin/ldconfig +%pre logger +getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : +exit 0 + %post logger +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : @@ -1465,7 +1794,6 @@ exit 0 /bin/systemd-ask-password /bin/systemctl %{_bindir}/systemd-sleep-grub -%{_bindir}/bootctl %{_bindir}/busctl %{_bindir}/kernel-install %{_bindir}/hostnamectl @@ -1553,7 +1881,10 @@ exit 0 %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif +%if 0%{has_efi} +%{_bindir}/bootctl %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator +%endif %{_prefix}/lib/systemd/system-generators/systemd-getty-generator %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator @@ -1566,6 +1897,9 @@ exit 0 %dir %{_libexecdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d %{_libexecdir}/modules-load.d/sg.conf +%if 0%{has_efi} +%{_libexecdir}/modules-load.d/efivars.conf +%endif %dir %{_libexecdir}/tmpfiles.d %dir %{_sysconfdir}/tmpfiles.d @@ -1599,6 +1933,18 @@ exit 0 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +# Some files which may created by us +%dir %{_sysconfdir}/X11/xorg.conf.d +%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf +%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf +%ghost %config(noreplace) %{_sysconfdir}/locale.conf +%ghost %config(noreplace) %{_sysconfdir}/machine-id +%ghost %config(noreplace) %{_sysconfdir}/machine-info +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target + %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service @@ -1720,7 +2066,9 @@ exit 0 # keep for compatibility %ghost /lib/udev %{_bindir}/udevadm +%if 0%{?suse_version} <= 1310 %{_prefix}/lib/firmware +%endif %dir %{_prefix}/lib/udev/ %{_prefix}/lib/udev/accelerometer %{_prefix}/lib/udev/ata_id @@ -1731,6 +2079,9 @@ exit 0 %{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-peristent-rule +%{_prefix}/lib/udev/net-set-sriov-names +%{_prefix}/lib/udev/rule_generator.functions +%{_prefix}/lib/udev/write_net_rules %dir %{_prefix}/lib/udev/rules.d/ %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules @@ -1808,7 +2159,7 @@ exit 0 %files logger %defattr(-,root,root) -%dir %{_localstatedir}/log/journal +%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal %{_localstatedir}/log/README /etc/init.d/systemd-journald diff --git a/systemd.changes b/systemd.changes index 70662ea3..da40a9c5 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,316 @@ +------------------------------------------------------------------- +Fri Jun 27 08:17:47 UTC 2014 - werner@suse.de + +- Update of patch 0001-detect-s390-virt.patch (bnc#880438) + +------------------------------------------------------------------- +Thu Jun 26 10:02:26 UTC 2014 - werner@suse.de + +- Shut up stupid check scripts crying for not mentioned systemd-mini-rpmlintrc + +------------------------------------------------------------------- +Thu Jun 26 09:31:19 UTC 2014 - werner@suse.de + +- Add upstream patchs + 0001-core-use-correct-format-string-for-UIDs.patch + 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch + 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch + +------------------------------------------------------------------- +Thu Jun 26 06:44:09 UTC 2014 - werner@suse.de + +- Add upstream patch + 0001-units-order-network-online.target-after-network.targ.patch + to make sure that etwork-online.target follows network.target + +------------------------------------------------------------------- +Wed Jun 25 18:09:52 UTC 2014 - rmilasan@suse.com + +- rules: re-enable dev_id conditionally in persistent rules + (bnc#884403 and bnc#882714). + Add 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch + +------------------------------------------------------------------- +Wed Jun 25 17:27:55 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch + 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch + 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch + 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch + 0005-man-fix-path-in-crypttab-5.patch + +------------------------------------------------------------------- +Wed Jun 25 17:06:07 UTC 2014 - werner@suse.de + +- Add upstream patch + 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch it + fixes udevadm settle exit code which may had roken dracut scripts + (bnc#884271 comment#18) + +------------------------------------------------------------------- +Wed Jun 25 14:12:52 UTC 2014 - werner@suse.de + +- Temporary disable patch 1022 (bnc#884271 and bnc#882714). + +------------------------------------------------------------------- +Tue Jun 24 11:55:39 UTC 2014 - rmilasan@suse.com + +- Rename 0002-udev-fix-invalid-free-in-enable_name_policy.patch + to 1038-udev-fix-invalid-free-in-enable_name_policy.patch + +------------------------------------------------------------------- +Tue Jun 24 11:27:27 UTC 2014 - werner@suse.de + +- Replace patches + 0001-systemd-empty-sigmask-on-reexec.patch with + upstream 0008-Reset-signal-mask-on-re-exec-to-init.patch + ensure-sysctl-are-applied-after-modules-are-loaded.patch with + upstream 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch + getty-generator-with-serial-3270-tty.patch with + upstream 0004-getty-generator-properly-escape-instance-names.patch +- Add upstream patches + 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch + 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch + 0005-po-add-Greek-translation.patch + 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch + 0007-po-add-German-translation.patch + 0009-core-clean-up-signal-reset-logic-when-reexec.patch + 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch + 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch + 0012-core-transaction-avoid-misleading-error-message-when.patch + +------------------------------------------------------------------- +Tue Jun 24 10:04:21 UTC 2014 - werner@suse.de + +- Invert of the boolean for locking scheme of fsck (bnc#881125) +- Remove the ghost entry /etc/hostname and require the netcfg + +------------------------------------------------------------------- +Mon Jun 23 16:39:50 UTC 2014 - arvidjaar@gmail.com + +- make sure legacy services that depend on network are started after + network is available (bnc#883565) + * 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch + * update insserv-generator.patch to translate $network into + network-online.target + +------------------------------------------------------------------- +Wed Jun 18 13:35:58 UTC 2014 - werner@suse.de + +- Add patch 0001-detect-s390-virt.patch from Thomas Blume (bnc#880438) + to detect the virtualization layers on s390x as well + +------------------------------------------------------------------- +Wed Jun 18 12:58:42 UTC 2014 - werner@suse.de + +- Do not generate synthesize change for cd/dvd (bnc#882714, comment #51) + add patch 1037-udev-exclude-cd-dvd-from-block-device.patch from + Roberts suggestion as well as readd + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + +------------------------------------------------------------------- +Tue Jun 17 14:21:56 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-core-fix-invalid-free-in-killall.patch + 0002-udev-fix-invalid-free-in-enable_name_policy.patch + 0003-install-fix-invalid-free-in-unit_file_mask.patch + +------------------------------------------------------------------- +Tue Jun 17 11:43:23 UTC 2014 - rmilasan@suse.com + +- rules: disable usage of dev_id in persistent rules (bnc#882714). + add: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +- Disable patch (bnc#882714). + 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + +------------------------------------------------------------------- +Thu Jun 12 12:14:11 UTC 2014 - werner@suse.de + +- Add patch + 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch + from Hannes Reinecke to avoid a race condition between variable + 'SYSTEMD_READY=0' and 'systemd' tag within udev rules (bnc#881942) + +------------------------------------------------------------------- +Thu Jun 12 09:40:54 UTC 2014 - werner@suse.de + +- Add workaround for bnc#882393 by adding the systemd update utmp + runlevel service to the wanted unit of e.g. the graphical target +- Add some later on created files to our file list + +------------------------------------------------------------------- +Thu Jun 12 03:33:01 UTC 2014 - jlee@suse.com + +- Generate %{_libexecdir}/modules-load.d/efivars.conf so we load efivars + module at boot time not from udev (bnc#881559). + +------------------------------------------------------------------- +Wed Jun 11 21:59:29 UTC 2014 - crrodriguez@opensuse.org + +- Do not build EFI support code in architectures on which + the kernel does not support CONFIG_EFI, it won't work. + (ia64 also supports it, but that's dead so is not included) + +------------------------------------------------------------------- +Wed Jun 11 14:09:30 UTC 2014 - werner@suse.de + +- Add patch tmpfiles-do-not-clean-for-mandb-index-files.patch + there is no need to clean out all 30 days the index data base + files nor the cachedir tags of mandb. Those files are used + for whatis(1) as well as for apropos(1). + +------------------------------------------------------------------- +Wed Jun 11 13:31:53 UTC 2014 - werner@suse.de + +- Do not override predictable names for openSUSE + +------------------------------------------------------------------- +Wed Jun 11 11:03:45 UTC 2014 - werner@suse.de + +- Remove systemd-detect-xendom.patch as it becomes obsolete with + upstream patch 0004-systemd-detect-virt-only-discover-Xen-domU.patch +- Add upstream patches + 0001-umount-modernizations.patch + 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch + 0003-core-allow-transient-mount-units.patch + 0004-systemd-detect-virt-only-discover-Xen-domU.patch + 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch + 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch + +------------------------------------------------------------------- +Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1033-udev-really-exclude-device-mapper-from-block-device.patch + 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch + +------------------------------------------------------------------- +Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de + +- Change detection of new locking scheme of fsck + +------------------------------------------------------------------- +Tue Jun 10 11:11:55 UTC 2014 - werner@suse.de + +- Change 1021-udev-re-add-persistent-net-rules.patch to use persistent + rules as a default on SLES-12 and predictable rules as a default + otherwise +- Add cflags shell function to check possible flags for the compiler + as well as for the linker + +------------------------------------------------------------------- +Mon Jun 9 08:38:33 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch + 1026-udevd-inotify-modernizations.patch + 1027-udev-synthesize-change-events-for-partitions-when-to.patch + 1028-udev-link-config-fix-mem-leak.patch + 1029-udev-try-first-re-reading-the-partition-table.patch + 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch + 1031-udev-make-sure-we-always-get-change-for-the-disk.patch + 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch + +------------------------------------------------------------------- +Fri Jun 6 10:24:19 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-sd-event-restore-correct-timeout-behaviour.patch + 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch + +------------------------------------------------------------------- +Thu Jun 5 13:29:20 UTC 2014 - werner@suse.de + +- Add upstream patch 0001-hwdb-fix-case-sensitive-match.patch + +------------------------------------------------------------------- +Thu Jun 5 13:23:24 UTC 2014 - werner@suse.de + +- Add dynamic detection of util-linux version to be able to + disable the fsck option -l for version less than 2.25.0 + +------------------------------------------------------------------- +Thu Jun 5 08:06:02 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * The patches + delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch and + ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch + indeed mention unit files which do not exist anymore. +- Make sure that systemd-ask-password-wall.service has a tty as + it is not sure that a tty1 exists +- Avoid broken firmware loading on newer distributions as 13.1 + +------------------------------------------------------------------- +Thu Jun 5 07:24:35 UTC 2014 - werner@suse.de + +- Correct version check for the tcp-devel drop +- Use correct permissions for /var/log/journal +- Use ACLs for /var/log/journal as described in man:systemd-journald.service(8) + +------------------------------------------------------------------- +Thu Jun 5 02:33:48 UTC 2014 - crrodriguez@opensuse.org + +- Correct the libseccomp distribution version test must be >= 13.1 +- In order to use unit directive AppArmorProfile= libapparmor-devel + must be present in buildRequires. + +------------------------------------------------------------------- +Tue Jun 3 16:31:44 UTC 2014 - sndirsch@suse.com + +- apply-ACL-for-nvidia-uvm-device-node.patch: set ACL on nvidia-uvm + device (bnc#879767). + +------------------------------------------------------------------- +Tue Jun 3 15:56:01 UTC 2014 - werner@suse.de + +- Add changes from Cristian Rodríguez: + * fix keep-crypt-password-prompt.patch which floods the system + logs with bogus opendir failures, still the wrong thing to do however. + * Use %find_lang to collect locale files + * systemd-no-libattr.patch: systemd does not require libattr + but just sys/xattr.h, therefore drop the dependency. + (from upstream) + * Again, drop tcp-devel from buildRequires, this time it is not a + SUSE specific feature removal, tcpd supportdisappeared in systemd + 212 and we shouldn't keep it around. +- Add patch 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch + that is rename systemd-no-libattr.patch to git format +- Drop tcp-devel only for *next* openSUSE and not for SLES-12 nor + for openSUSE 13.1 + +------------------------------------------------------------------- +Tue Jun 3 14:23:40 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-virt-rework-container-detection-logic.patch + 0002-fsck-include-device-name-in-the-message-about-missin.patch + 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch + 0004-util-ignore_file-should-not-allow-files-ending-with.patch + 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +- Add upstream patches to update keyboard data base + 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +- Add upstream patches for udev + 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch + 1024-udev-always-close-lock-file-descriptor.patch + +------------------------------------------------------------------- +Tue Jun 3 12:55:53 UTC 2014 - rmilasan@suse.com + +- Fix enabling predictable rules when using net.ifnames=1. + update: 1021-udev-re-add-persistent-net-rules.patch + +------------------------------------------------------------------- +Fri May 30 07:35:07 UTC 2014 - rmilasan@suse.com + +- Re-add persistent rules as a default and make predictable rules as + fallback (bnc#880732). + add: 1021-udev-re-add-persistent-net-rules.patch +- udev: remove seqnum API and all assumptions about seqnums + add: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch + ------------------------------------------------------------------- Tue May 27 07:23:47 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index f7024fae..55ff9a7d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -24,6 +24,12 @@ %bcond_without compat_libs %bcond_with networkd %bcond_with python +%ifarch %{ix86} x86_64 aarch64 +%define has_efi 1 +%else +%define has_efi 0 +%endif +%bcond_with udevsettle Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd @@ -33,6 +39,7 @@ Summary: A System and Session Manager License: LGPL-2.1+ Group: System/Base BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: acl BuildRequires: audit-devel %if %{with compat_libs} # See gold_archs in binutils.spec @@ -54,7 +61,6 @@ BuildRequires: gtk-doc %endif BuildRequires: intltool BuildRequires: libacl-devel -BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libkmod-devel BuildRequires: libsepol-devel @@ -67,7 +73,9 @@ BuildRequires: pam-devel %if 0%{?suse_version} > 1310 BuildRequires: systemd-rpm-macros %endif +%if 0%{?suse_version} <= 1315 BuildRequires: tcpd-devel +%endif BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 %if ! 0%{?bootstrap} @@ -93,11 +101,14 @@ BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 %endif -%if 0%{?suse_version} > 1310 +%if 0%{?suse_version} >= 1310 %ifarch %ix86 x86_64 x32 %arm BuildRequires: pkgconfig(libseccomp) %endif %endif +%if ! 0%{?bootstrap} +BuildRequires: libapparmor-devel +%endif BuildRequires: pkgconfig(libselinux) >= 2.1.9 BuildRequires: pkgconfig(libsepol) %if 0%{?suse_version} > 1310 @@ -120,6 +131,7 @@ Requires: kmod >= 14 %else Requires: kmod >= 15 %endif +Requires: netcfg Requires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding @@ -130,12 +142,21 @@ Requires(post): findutils %if ! 0%{?bootstrap} Requires(post): pam-config %endif +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/awk +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz +%if ! 0%{?bootstrap} Source1: systemd-rpmlintrc +%else +Source1: systemd-mini-rpmlintrc +%endif Source2: localfs.service Source3: systemd-sysv-convert Source6: baselibs.conf @@ -163,16 +184,15 @@ Patch6: insserv-generator.patch Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch -Patch11: delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch -Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch -Patch14: ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch13: 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch Patch18: fix-owner-of-var-log-btmp.patch -# PATCH-FIX-SUSE Avoid error message about not existing getty@3270 file -Patch19: getty-generator-with-serial-3270-tty.patch +# PATCH-FIX-UPSTREAM Avoid error message about not existing getty@3270 file +Patch19: 0004-getty-generator-properly-escape-instance-names.patch # PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -184,6 +204,8 @@ Patch21: allow-multiple-sulogin-to-be-started.patch Patch22: handle-SYSTEMCTL_OPTIONS-environment-variable.patch # PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices Patch27: apply-ACL-for-nvidia-device-nodes.patch +# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device +Patch28: apply-ACL-for-nvidia-uvm-device-node.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch # PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. @@ -220,8 +242,8 @@ Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch Patch91: plymouth-quit-and-wait-for-emergency-service.patch # PATCH-FIX-SUSE 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -- Avoid systemd crash on resume (bnc#861488) Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -# PATCH-FIX-SUSE 0001-systemd-empty-sigmask-on-reexec.patch werner@suse.com -Patch114: 0001-systemd-empty-sigmask-on-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch114: 0008-Reset-signal-mask-on-re-exec-to-init.patch # PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com Patch117: 0001-make-209-working-on-older-dist.patch # PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com @@ -376,8 +398,8 @@ Patch193: portmap-wants-rpcbind-socket.patch Patch194: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-USTREAM added at 2014/03/14 Patch195: 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch -# PATCH-FIX-SUSE Detect XEN dom0 as well as domU -Patch196: systemd-detect-xendom.patch +# PATCH-FIX-SUSE Do not clean the data base files of the manual pages +Patch196: tmpfiles-do-not-clean-for-mandb-index-files.patch # PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console Patch197: rescue-emergency-target-conflicts.patch # PATCH-FIX-SUSE Avoid a divide by zero sigtrap @@ -472,40 +494,116 @@ Patch242: 0004-machined-make-sure-GetMachineAddresses-is-available-.patch Patch243: 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch244: 0006-login-add-mir-to-the-list-of-session-types.patch -# PATCHFIX-UPSTREAM added at 2014/05/20 +# PATCH-FIX-UPSTREAM added at 2014/05/20 Patch245: 0007-logind-fix-Display-property-of-user-objects.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch246: 0001-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch247: 0002-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch248: 0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch249: 0004-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch250: 0005-hwdb-update.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch251: 0001-journal-cleanup-up-error-handling-in-update_catalog.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch252: 0002-journal-properly-detect-language-specified-in-line.patch -# PATCHFIX-UPSTREAM added at 2014/05/21 +# PATCH-FIX-UPSTREAM added at 2014/05/21 Patch253: 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch254: 0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch255: 0002-keymap-Asus-EeePC-touchpad-toggle-key.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch256: 0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch257: 0002-nspawn-restore-journal-directory-is-empty-check.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch258: 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch259: 0004-socket-properly-handle-if-our-service-vanished-durin.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch260: 0001-Do-not-unescape-unit-names-in-Install-section.patch -# PATCHFIX-UPSTREAM added at 2014/05/27 +# PATCH-FIX-UPSTREAM added at 2014/05/27 Patch261: 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch262: 0001-virt-rework-container-detection-logic.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch263: 0002-fsck-include-device-name-in-the-message-about-missin.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch264: 0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch265: 0004-util-ignore_file-should-not-allow-files-ending-with.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch266: 0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch267: 0007-keyboard-add-Plantronics-.Audio-mute-button.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch268: 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch +# PATCH-FIX-UPSTREAM added at 2014/06/05 +Patch269: 0001-hwdb-fix-case-sensitive-match.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch270: 0001-sd-event-restore-correct-timeout-behaviour.patch +# PATCH-FIX-UPSTREAM added at 2014/06/06 +Patch271: 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch272: 0001-umount-modernizations.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch273: 0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch274: 0003-core-allow-transient-mount-units.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 - Detect XEN dom0 as well as domU +Patch275: 0004-systemd-detect-virt-only-discover-Xen-domU.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch276: 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/11 +Patch277: 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch278: 0001-core-fix-invalid-free-in-killall.patch +# PATCH-FIX-UPSTREAM added at 2014/06/17 +Patch279: 0003-install-fix-invalid-free-in-unit_file_mask.patch +# PATCH-FIX-SUSE detect virtualization layers on S390 (bnc#880438) +Patch280: 0001-detect-s390-virt.patch +# PATCH-FIX-UPSTREAM 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch arvidjaar@gmail.com -- Ensure legacy services are started after network is available +Patch281: 0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch282: 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch283: 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch284: 0005-po-add-Greek-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch285: 0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch286: 0007-po-add-German-translation.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch287: 0009-core-clean-up-signal-reset-logic-when-reexec.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch288: 0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch289: 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch +# PATCH-FIX-UPSTREAM added at 2014/06/24 +Patch290: 0012-core-transaction-avoid-misleading-error-message-when.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch291: 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch292: 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch293: 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch294: 0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch +# PATCH-FIX-UPSTREAM added at 2014/06/25 +Patch295: 0005-man-fix-path-in-crypttab-5.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch296: 0001-units-order-network-online.target-after-network.targ.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch297: 0001-core-use-correct-format-string-for-UIDs.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch298: 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch +# PATCH-FIX-UPSTREAM added at 2014/06/26 +Patch299: 0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch # UDEV PATCHES # ============ @@ -551,8 +649,48 @@ Patch1017: 1017-udev-serialize-synchronize-block-device-event-handli.patch Patch1018: 1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch # PATCH-FIX-UPSTREAM added at 2014/05/20 Patch1019: 1019-udev-avoid-use-of-uninitialized-err.patch -# PATCHFIX-UPSTREAM added at 2014/05/26 +# PATCH-FIX-UPSTREAM added at 2014/05/26 Patch1020: 1020-udev-keyboard-also-hook-into-change-events.patch +# PATCH-FIX-SUSE 1021-udev-re-add-persistent-net-rules.patch +Patch1021: 1021-udev-re-add-persistent-net-rules.patch +# PATCH-FIX-UPSTREAM 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +Patch1022: 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch1023: 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch +# PATCH-FIX-UPSTREAM added at 2014/06/03 +Patch1024: 1024-udev-always-close-lock-file-descriptor.patch +# PATCH-FIX-UPSTREAM 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +Patch1025: 1025-udev-exclude-device-mapper-from-block-device-ownersh.patch +# PATCH-FIX-UPSTREAM 1026-udevd-inotify-modernizations.patch +Patch1026: 1026-udevd-inotify-modernizations.patch +# PATCH-FIX-UPSTREAM 1027-udev-synthesize-change-events-for-partitions-when-to.patch +Patch1027: 1027-udev-synthesize-change-events-for-partitions-when-to.patch +# PATCH-FIX-UPSTREAM 1028-udev-link-config-fix-mem-leak.patch +Patch1028: 1028-udev-link-config-fix-mem-leak.patch +# PATCH-FIX-UPSTREAM 1029-udev-try-first-re-reading-the-partition-table.patch +Patch1029: 1029-udev-try-first-re-reading-the-partition-table.patch +# PATCH-FIX-UPSTREAM 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch +# PATCH-FIX-UPSTREAM 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch +# PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +# PATCH-FIX-UPSTREAM 1033-udev-really-exclude-device-mapper-from-block-device.patch +Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch +# PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +# PATCH-FIX-SUSE 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +Patch1036: 1036-rules-disable-usage-of-dev_id-in-persistent-rules.patch +# PATCH-FIX-SUSE See bnc#882714 comment #51 +Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch +# PATCH-FIX-UPSTREAM 1038-udev-fix-invalid-free-in-enable_name_policy.patch +Patch1038: 1038-udev-fix-invalid-free-in-enable_name_policy.patch +# PATCH-FIX-UPSTREAM 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +Patch1039: 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch +# PATCH-FIX-SUSE 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch (bnc#884403 and bnc#882714) +Patch1040: 1040-re-enable-dev_id-conditionally-in-persistent-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -608,12 +746,19 @@ Summary: A rule-based device node and kernel event manager License: GPL-2.0 Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -PreReq: /bin/rm /usr/bin/stat %insserv_prereq %fillup_prereq /usr/sbin/groupadd /usr/bin/getent /sbin/mkinitrd /usr/bin/sg_inq +PreReq: /bin/rm +PreReq: %insserv_prereq +PreReq: %fillup_prereq +PreReq: /usr/bin/sg_inq +Requires(pre): /usr/bin/stat +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/bin/getent Requires(post): lib%{udevpkgname}%{udev_major} Requires(post): sed -Requires(post): systemd +Requires(post): /usr/bin/systemctl %if %{defined regenerate_initrd_post} Requires(post): coreutils +Requires(post): /usr/bin/stat Requires(postun): coreutils Requires(posttrans): suse-module-tools Requires(posttrans): /sbin/mkinitrd @@ -715,6 +860,11 @@ License: LGPL-2.1+ Group: System/Base Provides: syslog Provides: sysvinit(syslog) +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires(post): /usr/bin/getent +Requires(post): /usr/bin/setfacl +Requires(post): /usr/bin/systemctl Conflicts: otherproviders(syslog) %description logger @@ -781,15 +931,13 @@ cp %{SOURCE7} m4/ %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 +%patch13 -p0 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 -%patch19 -p1 +%patch19 -p0 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -801,6 +949,7 @@ cp %{SOURCE7} m4/ # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html %patch27 -p1 +%patch28 -p1 %patch37 -p1 %ifarch %arm %patch38 -p1 @@ -895,8 +1044,8 @@ cp %{SOURCE7} m4/ %patch192 -p1 %patch193 -p1 %patch194 -p0 -%patch195 -p0 %patch196 -p1 +%patch195 -p0 %patch197 -p1 %patch198 -p1 %patch199 -p0 @@ -961,6 +1110,44 @@ cp %{SOURCE7} m4/ %patch259 -p0 %patch260 -p0 %patch261 -p0 +%patch262 -p0 +%patch263 -p0 +%patch264 -p0 +%patch265 -p0 +%patch266 -p0 +%patch267 -p0 +%patch268 -p0 +%patch269 -p0 +%patch270 -p0 +%patch271 -p0 +%patch272 -p0 +%patch273 -p0 +%patch274 -p0 +%patch275 -p0 +%patch276 -p0 +%patch277 -p0 +%patch278 -p0 +%patch279 -p0 +%patch280 -p1 +%patch281 -p1 +%patch282 -p0 +%patch283 -p0 +%patch284 -p0 +%patch285 -p0 +%patch286 -p0 +%patch287 -p0 +%patch288 -p0 +%patch289 -p0 +%patch290 -p0 +%patch291 -p0 +%patch292 -p0 +%patch293 -p0 +%patch294 -p0 +%patch295 -p0 +%patch296 -p0 +%patch297 -p0 +%patch298 -p0 +%patch299 -p0 # udev patches %patch1001 -p1 @@ -984,15 +1171,111 @@ cp %{SOURCE7} m4/ %patch1018 -p0 %patch1019 -p0 %patch1020 -p0 +%patch1021 -p1 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} +%patch1022 -p1 +%endif +%endif +%patch1023 -p0 +%patch1024 -p0 +%patch1025 -p1 +%patch1026 -p1 +%patch1027 -p1 +%patch1028 -p1 +%patch1029 -p1 +%patch1030 -p1 +%patch1031 -p1 +%patch1032 -p1 +%patch1033 -p1 +%patch1034 -p1 +%patch1035 -p1 +%patch1036 -p1 +%patch1037 -p1 +%patch1038 -p0 +%if 0%{?suse_version} > 1310 +%if %{with udevsettle} +%patch1039 -p0 +%endif +%endif +%patch1040 -p1 # ensure generate files are removed rm -f units/emergency.service +# disable "-l" option for fsck if it does not support new locking scheme +# compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +PATH=${PATH}:/sbin:/usr/sbin +PATH_FSCK=$(type -p fsck) +if grep -q /run/fsck/%%s\\.lock $PATH_FSCK +then + echo Found new $PATH_FSCK that is allow private locking +else + echo Found old $PATH_FSCK that is disable flock for this one + sed -ri 's@^([[:blank:]]+)(cmdline\[i\+\+\][[:blank:]]+=[[:blank:]]+"-l")(;)@\1/* \2 */\3@' src/fsck/fsck.c +fi + +%if 0%{?suse_version} <= 1310 +# +# Older versions like oS 13.1 do not distinguish between +# network.target and network-online.target +# +for f in src/core/service.c src/insserv-generator/insserv-generator.c +do + sed -ri '/"network",.*SPECIAL_NETWORK_ONLINE_TARGET,/{ s/SPECIAL_NETWORK_ONLINE_TARGET/SPECIAL_NETWORK_TARGET/}' $f +done +%endif + %build +cflags () +{ + local flag=$1; shift + local var=$1; shift + local gold + test -n "${flag}" -a -n "${var}" || return + case "${!var}" in + *${flag}*) return + esac + if type ld.gold > /dev/null 2>&1 ; then + gold=-Wl,-fuse-ld=gold + fi + set -o noclobber + case "$flag" in + -Wl,*) + if echo 'int main () { return 0; }' | \ + ${CC:-gcc} -Werror $gold $flag -o /dev/null -xc - > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + rm -f ldtest.c + ;; + *) + if ${CC:-gcc} -Werror $gold $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + if ${CXX:-g++} -Werror $gold $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then + eval $var=\${$var:+\$$var\ }$flag + fi + esac + set +o noclobber +} autoreconf -fiv # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; -export V=1 +export V=e +export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)" +export LDFLAGS +%if 0%{?suse_version} == 1315 + CFLAGS="$CFLAGS -DNET_IFNAMES=1" +%else + CFLAGS="$CFLAGS -DNET_IFNAMES=0" + for rules in 75-persistent-net-generator 76-net-sriov-names + do + sed -ri '/^ENV\{net.ifnames\}=="1", GOTO="[^"]*"$/{ s/=="1"/!="0"/ }' src/udev/rule_generator/${rules}.rules + done +%endif +cflags -pipe CFLAGS +cflags -Wl,-O2 LDFLAGS +cflags -Wl,--hash-size=8599 LDFLAGS # keep split-usr until all packages have moved their systemd rules to /usr %configure \ --docdir=%{_docdir}/systemd \ @@ -1019,7 +1302,12 @@ export V=1 --enable-selinux \ --enable-split-usr \ --disable-static \ +%if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ +%endif +%if ! 0%{has_efi} + --disable-efi \ +%endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ --with-debug-shell=/bin/bash \ @@ -1031,8 +1319,7 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif - --disable-kdbus \ - CFLAGS="%{optflags}" + --disable-kdbus make %{?_smp_mflags} %if ! 0%{?bootstrap} make %{?_smp_mflags} update-man-list man @@ -1067,7 +1354,9 @@ ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd %if ! 0%{?bootstrap} ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8 %endif +%if 0%{?suse_version} <= 1310 ln -sf /lib/firmware %{buildroot}/usr/lib/firmware +%endif %if ! 0%{?bootstrap} install -m755 -D %{S:8} %{buildroot}/etc/init.d/systemd-journald install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config @@ -1135,6 +1424,12 @@ cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf # load sg module at boot time sg EOF +%if 0%{has_efi} +cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/efivars.conf +# load efivars module at boot time +efivars +EOF +%endif # To avoid making life hard for Factory developers, don't package the # kernel.core_pattern setting until systemd-coredump is a part of an actual @@ -1235,7 +1530,7 @@ do done %endif -%if 0%{suse_version} < 1310 +%if 0%{suse_version} <= 1310 cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' [Unit] Description=Fix against deadlock at shutdown @@ -1259,6 +1554,28 @@ cat > %{buildroot}/%{_prefix}/lib/systemd/system/fix.service <<-'EOF' ln -sf ../fix.service %{buildroot}/%{_prefix}/lib/systemd/system/remote-fs.target.wants %endif +# Some files which may created by us or by the admin later on +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ + machine-id machine-info \ + systemd/system/runlevel2.target \ + systemd/system/runlevel3.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel4.target \ + systemd/system/runlevel5.target +do + > %{buildroot}%{_sysconfdir}/$ghost +done + +# Workaround for bug #882393 +for runlevel in poweroff rescue multi-user graphical reboot +do + mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants + ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ +done + +%find_lang systemd + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : exit 0 @@ -1274,8 +1591,14 @@ exit 0 /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : /usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : # Make sure new journal files -chgrp systemd-journal %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : -chmod g+s %{_localstatedir}/log/journal/ %{_localstatedir}/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || : +chgrp systemd-journal %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +chmod g+s %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +if read ID < /etc/machine-id > /dev/null 2>&1 ; then + chgrp systemd-journal %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : + chmod g+s %{_localstatedir}/log/journal/$ID > /dev/null 2>&1 || : +fi +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then @@ -1343,7 +1666,7 @@ elif [ ! -e /lib/udev ]; then ln -s /usr/lib/udev /lib/udev fi # Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules -/usr/sbin/groupadd -r tape 2> /dev/null || : +getent group tape >/dev/null || groupadd -r tape 2> /dev/null || : # kill daemon if we are not in a chroot if test -f /proc/1/exe -a -d /proc/1/root ; then if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then @@ -1422,7 +1745,13 @@ fi %postun -n libgudev-1_0-0 -p /sbin/ldconfig +%pre logger +getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : +exit 0 + %post logger +getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : +getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : @@ -1460,7 +1789,6 @@ exit 0 /bin/systemd-ask-password /bin/systemctl %{_bindir}/systemd-sleep-grub -%{_bindir}/bootctl %{_bindir}/busctl %{_bindir}/kernel-install %{_bindir}/hostnamectl @@ -1548,7 +1876,10 @@ exit 0 %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif +%if 0%{has_efi} +%{_bindir}/bootctl %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator +%endif %{_prefix}/lib/systemd/system-generators/systemd-getty-generator %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator @@ -1561,6 +1892,9 @@ exit 0 %dir %{_libexecdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d %{_libexecdir}/modules-load.d/sg.conf +%if 0%{has_efi} +%{_libexecdir}/modules-load.d/efivars.conf +%endif %dir %{_libexecdir}/tmpfiles.d %dir %{_sysconfdir}/tmpfiles.d @@ -1594,6 +1928,18 @@ exit 0 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +# Some files which may created by us +%dir %{_sysconfdir}/X11/xorg.conf.d +%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf +%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf +%ghost %config(noreplace) %{_sysconfdir}/locale.conf +%ghost %config(noreplace) %{_sysconfdir}/machine-id +%ghost %config(noreplace) %{_sysconfdir}/machine-info +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target + %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service @@ -1715,7 +2061,9 @@ exit 0 # keep for compatibility %ghost /lib/udev %{_bindir}/udevadm +%if 0%{?suse_version} <= 1310 %{_prefix}/lib/firmware +%endif %dir %{_prefix}/lib/udev/ %{_prefix}/lib/udev/accelerometer %{_prefix}/lib/udev/ata_id @@ -1726,6 +2074,9 @@ exit 0 %{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-peristent-rule +%{_prefix}/lib/udev/net-set-sriov-names +%{_prefix}/lib/udev/rule_generator.functions +%{_prefix}/lib/udev/write_net_rules %dir %{_prefix}/lib/udev/rules.d/ %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules @@ -1803,7 +2154,7 @@ exit 0 %files logger %defattr(-,root,root) -%dir %{_localstatedir}/log/journal +%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal %{_localstatedir}/log/README /etc/init.d/systemd-journald diff --git a/tmpfiles-do-not-clean-for-mandb-index-files.patch b/tmpfiles-do-not-clean-for-mandb-index-files.patch new file mode 100644 index 00000000..3bfd928f --- /dev/null +++ b/tmpfiles-do-not-clean-for-mandb-index-files.patch @@ -0,0 +1,22 @@ +There is no need to clean out all 30 days the index data base +files nor the cachedir tags of mandb. Those files are used +for whatis(1) as well as for apropos(1). + +--- + systemd-210/tmpfiles.d/systemd.conf | 5 +++++ + 1 file changed, 5 insertions(+) + +--- systemd-210/tmpfiles.d/systemd.conf ++++ systemd-210/tmpfiles.d/systemd.conf 2014-06-11 13:47:59.470236564 +0000 +@@ -14,6 +14,11 @@ f /var/log/wtmp 0664 root utmp - + f /var/log/btmp 0600 root root - + + d /var/cache/man - - - 30d ++# mandb uses data base file which should not be cleared ++x /var/cache/man/index.* ++x /var/cache/man/CACHEDIR.TAG ++x /var/cache/man/*/index.* ++x /var/cache/man/*/CACHEDIR.TAG + + d /run/systemd/ask-password 0755 root root - + d /run/systemd/seats 0755 root root -