Hello community, here is the log from the commit of package systemd for openSUSE:Factory checked in at 2014-11-26 10:36:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/systemd (Old) and /work/SRC/openSUSE:Factory/.systemd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "systemd" Changes: -------- --- /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes 2014-09-28 19:56:57.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes 2014-11-26 10:36:06.000000000 +0100 @@ -1,0 +2,290 @@ +Tue Nov 25 09:44:42 UTC 2014 - rmilasan@suse.com + +- Fix error return in rootsymlink_generator.c + Update 1096-new-udev-root-symlink-generator.patch + +------------------------------------------------------------------- +Fri Nov 21 13:35:40 UTC 2014 - werner@suse.de + +- Remove upstream patch + 0001-systemd-logind.service-set-Type-notify.patch + as systemd-logind.service is already from DBus type, compare with + upstream commit eab459bc0639b81b32735f36d3e929e4bfa2cb4b + +------------------------------------------------------------------- +Thu Nov 20 13:45:28 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-systemd-logind.service-set-Type-notify.patch + 0002-core-watchdog-bus-properties-cannot-be-both-writable.patch + 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch + +------------------------------------------------------------------- +Thu Nov 20 12:18:57 UTC 2014 - werner@suse.de + +- Re-add directory /usr/lib/systemd/system/basic.target.wants + +------------------------------------------------------------------- +Wed Nov 19 15:07:43 UTC 2014 - gber@opensuse.org + +- remove pm-utils-hooks-compat.sh again, pm-utils built-in hooks + partially duplicate hooks run by systemd which may potentially + lead to problems, instead temporarily re-enable + Forward-suspend-hibernate-calls-to-pm-utils.patch until + boo#904828 can be addressed properly + +------------------------------------------------------------------- +Wed Nov 19 00:58:00 UTC 2014 - Led <ledest@gmail.com> + +- fix bashisms in write_net_rules script +- update patches: + * 1053-better-checks-in-write_net_rules.patch + +------------------------------------------------------------------- +Tue Nov 18 10:26:08 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-systemctl-let-list-units-unit-files-honour-type.patch + 0002-systemctl-obey-state-in-list-unit-files.patch + which allows to use --type in the systemctl command list-units + and list-unit-files. + +------------------------------------------------------------------- +Tue Nov 18 10:10:28 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-keymap-Add-support-for-IBM-ThinkPad-X41-Tablet.patch + 0002-keymap-Fix-special-keys-on-ThinkPad-X60-X61-Tablet.patch + +------------------------------------------------------------------- +Thu Nov 13 14:47:17 UTC 2014 - rmilasan@suse.com + +- New root symlink rule generator + Add 1096-new-udev-root-symlink-generator.patch +- Remove write_dev_root_rule and systemd-udev-root-symlink + +------------------------------------------------------------------- +Thu Nov 13 12:59:05 UTC 2014 - werner@suse.de + +- Change patch 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch + to skip hdflush as well as hddown but only use halt as fallback + for poweroff as well as synch in systemctl before any reboot command + (compare with commit 4a3ad39957399c4a30fc472a804e72907ecaa4f9) + +------------------------------------------------------------------- +Thu Nov 13 09:54:35 UTC 2014 - rmilasan@suse.com + +- Create rule to set I/O scheduler to deadline if device attribute + 'rotational' equals 0, usually SSDs (bnc#904517). + Add 1095-set-ssd-disk-to-use-deadline-scheduler.patch + +------------------------------------------------------------------- +Thu Nov 13 07:50:49 UTC 2014 - thomas.blume@suse.com + +- fix systemd-fstab-generator crypttab parsing (bnc#903963) + +------------------------------------------------------------------- +Tue Nov 11 19:10:35 UTC 2014 - gber@opensuse.org + +- Add pm-utils-hooks-compat.sh in order to run pm-utils sleep hooks + from systemd (boo#904828) + +------------------------------------------------------------------- +Mon Nov 10 14:23:00 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-login-rerun-vconsole-setup-when-switching-from-vgaco.patch + 0002-shutdown-fix-arguments-to-run-initramfs-shutdown.patch + 0003-utf8-when-looking-at-the-next-unichar-honour-the-siz.patch + +------------------------------------------------------------------- +Mon Nov 10 12:39:35 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-core-don-t-allow-enabling-if-unit-is-masked.patch + 0002-snapshot-return-error-when-snapshot-exists.patch + 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch + 0004-Raise-level-of-Found-dependency.-lines.patch + 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch + 0006-journald-fix-minor-memory-leak.patch + 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch + 0008-journald-fix-memory-leak-on-error-path.patch + 0009-units-make-systemd-journald.service-Type-notify.patch + 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch + +------------------------------------------------------------------- +Mon Nov 10 12:36:34 UTC 2014 - werner@suse.de + +- Add upstream patches + 1092-libudev-do-not-accept-invalid-log-levels.patch + 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch + 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch + +------------------------------------------------------------------- +Fri Nov 7 09:45:20 UTC 2014 - werner@suse.de + +- Add patch watch_resolv.conf_for_become_changed.patch to add an + inotify watch on /etc/resolv.conf which enables the reload of + a changed resolver configuration on the fly (bsc#902901) +- Do not apply patch 0022-systemd-tmpfiles-ownerkeep.patch in case + if the script /usr/bin/systemd-tmpfiles-keep is missed + +------------------------------------------------------------------- +Mon Nov 3 14:23:02 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch + 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch + +------------------------------------------------------------------- +Mon Nov 3 14:17:48 UTC 2014 - werner@suse.de + +- Add upstream patches + 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch + 1091-udev-path_id-update-comments.patch + which will be applied if patch + 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch + is applied a this may fix the trouble with iSCSI (bnc#898233) + +------------------------------------------------------------------- +Thu Oct 30 10:45:01 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-manager-Linux-on-hppa-has-fewer-rtsigs-hence-avoid-u.patch + 0002-time-also-support-infinity-syntax-in-parse_nsec.patch + 0003-time-earlier-exit-from-format_timestamp_relative-on-.patch + 0004-sd-bus-if-we-don-t-manage-to-properly-allocate-the-e.patch + 0005-journalctl-correct-help-text-for-until.patch + 0006-calendarspec-fix-typo-in-annually.patch + 0007-systemctl-do-not-ignore-errors-in-symlink-removal.patch + 0008-util-introduce-sethostname_idempotent.patch + 0009-util-fix-copy-paste-error-and-actually-set-the-new-h.patch + 0010-shutdown-do-final-unmounting-only-if-not-running-ins.patch + 0011-selinux-make-sure-we-do-not-try-to-print-missing-fie.patch +- Replace patch + keep-crypt-password-prompt.patch as this with + upstream patch + 0012-manager-do-not-print-anything-while-passwords-are-be.patch + +------------------------------------------------------------------- +Fri Oct 24 13:02:45 UTC 2014 - werner@suse.de + +- Add upstream patch + 0002-shutdown-pass-own-argv-to-run-initramfs-shutdown.patch +- Add patch journald-advice-about-use-of-memory.patch to use mmap() + flags as well as madvise(2) for journal files. + +------------------------------------------------------------------- +Thu Oct 23 14:05:08 UTC 2014 - werner@suse.de + +- Add upstream patches + 0001-strv-add-an-additional-overflow-check-when-enlarging.patch + 0002-hwdb-Add-mapping-for-special-keys-on-compaq-ku-0133-.patch + 0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch + 0004-journal-do-server_vacuum-for-sigusr1.patch + 0005-cryptsetup-fix-an-OOM-check.patch + +------------------------------------------------------------------- +Wed Oct 22 13:56:22 UTC 2014 - werner@suse.de + +- Add upstream patch 1089-fix-cgroup-device-controller.patch + to avoid trouble on existing /dev/console with nspawn (bsc#902240) + +------------------------------------------------------------------- +Tue Oct 21 11:03:31 UTC 2014 - werner@suse.de + +- Modify patch avoid-leaking-socket-descriptors.patch to close + file descriptors for incomming connections in pam module in case ++++ 93 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/systemd/systemd-mini.changes ++++ and /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes systemd.changes: same change Old: ---- keep-crypt-password-prompt.patch systemd-udev-root-symlink write_dev_root_rule New: ---- 0001-core-don-t-allow-enabling-if-unit-is-masked.patch 0001-core-swap-only-make-configured-units-part-of-swap.ta.patch 0001-journalctl-do-not-output-reboot-markers-when-running.patch 0001-keymap-Add-support-for-IBM-ThinkPad-X41-Tablet.patch 0001-keymap-Fix-touchpad-toggle-on-Toshiba-Satellite-P75-.patch 0001-login-rerun-vconsole-setup-when-switching-from-vgaco.patch 0001-logind-add-support-for-Triton2-Power-Button.patch 0001-manager-Linux-on-hppa-has-fewer-rtsigs-hence-avoid-u.patch 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch 0001-sd-event-don-t-require-a-signal-event-source-to-be-e.patch 0001-shell-completion-fix-completion-of-inactive-units.patch 0001-shutdownd-clean-up-initialization-of-struct.patch 0001-strv-add-an-additional-overflow-check-when-enlarging.patch 0001-systemctl-let-list-units-unit-files-honour-type.patch 0001-systemctl-when-mangle-unit-names-for-the-isolate-suf.patch 0001-systemd-continue-switch-root-even-if-umount-fails.patch 0001-tmpfiles-compare-return-against-correct-errno.patch 0001-units-introduce-network-pre.target-as-place-to-hook-.patch 0001-virt-detect-that-we-are-running-inside-the-docker-co.patch 0002-bootchart-use-n-a-if-PRETTY_NAME-is-not-found.patch 0002-core-watchdog-bus-properties-cannot-be-both-writable.patch 0002-hwdb-Add-mapping-for-special-keys-on-compaq-ku-0133-.patch 0002-keymap-Fix-special-keys-on-ThinkPad-X60-X61-Tablet.patch 0002-keymap-Fix-touchpad-toggle-key-on-Asus-laptops.patch 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch 0002-logind-add-support-for-TPS65217-Power-Button.patch 0002-shell-completion-propose-templates-for-disable-re-en.patch 0002-shutdown-fix-arguments-to-run-initramfs-shutdown.patch 0002-shutdown-pass-own-argv-to-run-initramfs-shutdown.patch 0002-snapshot-return-error-when-snapshot-exists.patch 0002-systemctl-obey-state-in-list-unit-files.patch 0002-systemd-try-harder-to-bind-to-notify-socket.patch 0002-time-also-support-infinity-syntax-in-parse_nsec.patch 0002-udev-hwdb-New-Entry-for-Dell-XPS12-9Q33-keyboard.patch 0003-bootchart-parse-userinput-with-safe_atoi.patch 0003-fileio-label-return-error-when-writing-fails.patch 0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch 0003-man-we-don-t-have-Wanted-dependency.patch 0003-sd-bus-check-return-value-of-vasprintf.patch 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch 0003-time-earlier-exit-from-format_timestamp_relative-on-.patch 0003-utf8-when-looking-at-the-next-unichar-honour-the-siz.patch 0004-Raise-level-of-Found-dependency.-lines.patch 0004-bootchart-check-return-of-strftime.patch 0004-core-map-the-rescue-argument-to-rescue.target.patch 0004-journal-do-server_vacuum-for-sigusr1.patch 0004-sd-bus-if-we-don-t-manage-to-properly-allocate-the-e.patch 0004-sd-event-check-the-value-of-received-signal.patch 0004-selinux-fix-potential-double-free-crash-in-child-pro.patch 0005-bootchart-Do-not-try-to-access-data-for-non-existing.patch 0005-cryptsetup-fix-an-OOM-check.patch 0005-journalctl-correct-help-text-for-until.patch 0005-sd-id128-do-stricter-checking-of-random-boot-id.patch 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch 0005-util-avoid-double-close-of-fd.patch 0006-calendarspec-fix-typo-in-annually.patch 0006-journald-fix-minor-memory-leak.patch 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch 0007-systemctl-do-not-ignore-errors-in-symlink-removal.patch 0008-journald-fix-memory-leak-on-error-path.patch 0008-util-introduce-sethostname_idempotent.patch 0009-hwdb-Update-database-of-Bluetooth-company-identifier.patch 0009-units-make-systemd-journald.service-Type-notify.patch 0009-util-fix-copy-paste-error-and-actually-set-the-new-h.patch 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch 0010-shutdown-do-final-unmounting-only-if-not-running-ins.patch 0011-selinux-make-sure-we-do-not-try-to-print-missing-fie.patch 0012-manager-do-not-print-anything-while-passwords-are-be.patch 1089-fix-cgroup-device-controller.patch 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch 1091-udev-path_id-update-comments.patch 1092-libudev-do-not-accept-invalid-log-levels.patch 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch 1095-set-ssd-disk-to-use-deadline-scheduler.patch 1096-new-udev-root-symlink-generator.patch avoid-leaking-socket-descriptors.patch journald-advice-about-use-of-memory.patch watch_resolv.conf_for_become_changed.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd-mini.spec ++++++ --- /var/tmp/diff_new_pack.vsCCve/_old 2014-11-26 10:36:12.000000000 +0100 +++ /var/tmp/diff_new_pack.vsCCve/_new 2014-11-26 10:36:12.000000000 +0100 @@ -26,6 +26,7 @@ %bcond_without compat_libs %bcond_with networkd %bcond_with python +%bcond_with parentpathid %ifarch %{ix86} x86_64 aarch64 %define has_efi 1 %else @@ -41,6 +42,7 @@ %bcond_with udevsettle %endif %bcond_with systemgrps +%{expand: %%global has_tmpkeep %(type -p systemd-tmpfiles-keep &>/dev/null && echo 1 || echo 0)} Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd @@ -188,8 +190,6 @@ Source11: after-local.service Source1060: boot.udev -Source1061: write_dev_root_rule -Source1062: systemd-udev-root-symlink Source1063: udev-generate-persistent-rule.sh Source1064: systemd-sleep-grub Source1065: systemd-remount-tmpfs @@ -246,7 +246,7 @@ Patch23: disable-nss-myhostname-warning-bnc-783841.patch # PATCH-FIX-OPENSUSE handle-HOSTNAME.patch fcrozat@suse.com -- handle /etc/HOSTNAME (bnc#803653) Patch24: handle-etc-HOSTNAME.patch -# PATCH-FIX-OPENSUSE forward to pm-utils -- for code base <= 1310 +# PATCH-FIX-OPENSUSE forward to pm-utils -- until boo#904828 is addressed Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch # PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch @@ -438,8 +438,6 @@ Patch203: respect-nfs-bg-option.patch # PATCH-FIX-UPSTREAM Stop useless messages on dual_timestamp_is_set is failed. Patch204: shut-up-annoying-assertion-monotonic-clock-message.patch -# PATCH-FIX-SUSE Do not override the passphrase prompts due messages of busy jobs -Patch205: keep-crypt-password-prompt.patch # PATCH-FIX-UPSTREAM Fix uninitialized memory Patch206: 0001-sd-rtnl-message-append-fix-uninitialized-memory.patch # PATCH-FIX-UPSTREAM Make systemd user journal accessible by users (bnc#876694) @@ -902,6 +900,150 @@ Patch436: 0002-bus-remove-unused-check.patch # PATCH-FIX-UPSTREAM added at 2014/09/26 Patch437: 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch438: 0001-logind-add-support-for-Triton2-Power-Button.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch439: 0002-logind-add-support-for-TPS65217-Power-Button.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch440: 0001-shutdownd-clean-up-initialization-of-struct.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch441: 0003-bootchart-parse-userinput-with-safe_atoi.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch442: 0004-bootchart-check-return-of-strftime.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch443: 0005-bootchart-Do-not-try-to-access-data-for-non-existing.patch +# PATCH-FIX-UPSTREAM added at 2014/09/30 +Patch444: 0001-journalctl-do-not-output-reboot-markers-when-running.patch +# PATCH-FIX-UPSTREAM added at 2014/09/30 +Patch445: 0002-udev-hwdb-New-Entry-for-Dell-XPS12-9Q33-keyboard.patch +# PATCH-FIX-UPSTREAM added at 2014/10/02 +Patch446: 0001-core-swap-only-make-configured-units-part-of-swap.ta.patch +# PATCH-FIX-UPSTREAM added at 2014/10/02 +Patch447: 0009-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch448: 0001-virt-detect-that-we-are-running-inside-the-docker-co.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch449: 0002-bootchart-use-n-a-if-PRETTY_NAME-is-not-found.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch450: 0003-fileio-label-return-error-when-writing-fails.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch451: 0001-sd-event-don-t-require-a-signal-event-source-to-be-e.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch452: 0004-sd-event-check-the-value-of-received-signal.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch453: 0005-sd-id128-do-stricter-checking-of-random-boot-id.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch454: 0001-keymap-Fix-touchpad-toggle-on-Toshiba-Satellite-P75-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch455: 0001-units-introduce-network-pre.target-as-place-to-hook-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch456: 0002-keymap-Fix-touchpad-toggle-key-on-Asus-laptops.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch457: 0003-sd-bus-check-return-value-of-vasprintf.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch458: 0004-core-map-the-rescue-argument-to-rescue.target.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch459: 0005-util-avoid-double-close-of-fd.patch +# PATCH-FIX-UPSTREAM added at 2014/10/13 +Patch460: 0001-systemctl-when-mangle-unit-names-for-the-isolate-suf.patch +# PATCH-FIX-UPSTREAM added at 2014/10/14 +Patch461: 0001-tmpfiles-compare-return-against-correct-errno.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch462: 0001-shell-completion-fix-completion-of-inactive-units.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch463: 0002-shell-completion-propose-templates-for-disable-re-en.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch464: 0003-man-we-don-t-have-Wanted-dependency.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch465: 0004-selinux-fix-potential-double-free-crash-in-child-pro.patch +# PATCH-FIX-UPSTREAM added at 2014/10/20 +Patch466: 0001-systemd-continue-switch-root-even-if-umount-fails.patch +# PATCH-FIX-UPSTREAM added at 2014/10/20 +Patch467: 0002-systemd-try-harder-to-bind-to-notify-socket.patch +# PATCH-FIX-SUSE added at 2014/10/15 +Patch468: avoid-leaking-socket-descriptors.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch469: 0001-strv-add-an-additional-overflow-check-when-enlarging.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch470: 0002-hwdb-Add-mapping-for-special-keys-on-compaq-ku-0133-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch471: 0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch472: 0004-journal-do-server_vacuum-for-sigusr1.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch473: 0005-cryptsetup-fix-an-OOM-check.patch +# PATCH-FIX-UPSTREAM added at 2014/10/24 +Patch474: 0002-shutdown-pass-own-argv-to-run-initramfs-shutdown.patch +# PATCH-FIX-SUSE added at 2014/10/24 +Patch475: journald-advice-about-use-of-memory.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch476: 0001-manager-Linux-on-hppa-has-fewer-rtsigs-hence-avoid-u.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch477: 0002-time-also-support-infinity-syntax-in-parse_nsec.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch478: 0003-time-earlier-exit-from-format_timestamp_relative-on-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch479: 0004-sd-bus-if-we-don-t-manage-to-properly-allocate-the-e.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch480: 0005-journalctl-correct-help-text-for-until.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch481: 0006-calendarspec-fix-typo-in-annually.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch482: 0007-systemctl-do-not-ignore-errors-in-symlink-removal.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch483: 0008-util-introduce-sethostname_idempotent.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch484: 0009-util-fix-copy-paste-error-and-actually-set-the-new-h.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch485: 0010-shutdown-do-final-unmounting-only-if-not-running-ins.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch486: 0011-selinux-make-sure-we-do-not-try-to-print-missing-fie.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch487: 0012-manager-do-not-print-anything-while-passwords-are-be.patch +# PATCH-FIX-UPSTREAM added at 2014/10/31 +Patch488: 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch +# PATCH-FIX-UPSTREAM added at 2014/10/31 +Patch489: 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch +# PATCH-FIX-SUSE added at 2014/11/05 +Patch490: watch_resolv.conf_for_become_changed.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch491: 0001-core-don-t-allow-enabling-if-unit-is-masked.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch492: 0002-snapshot-return-error-when-snapshot-exists.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch493: 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch494: 0004-Raise-level-of-Found-dependency.-lines.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch495: 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch496: 0006-journald-fix-minor-memory-leak.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch497: 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch498: 0008-journald-fix-memory-leak-on-error-path.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch499: 0009-units-make-systemd-journald.service-Type-notify.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch500: 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/11/10 +Patch501: 0001-login-rerun-vconsole-setup-when-switching-from-vgaco.patch +# PATCH-FIX-UPSTREAM added at 2014/11/10 +Patch502: 0002-shutdown-fix-arguments-to-run-initramfs-shutdown.patch +# PATCH-FIX-UPSTREAM added at 2014/11/10 +Patch503: 0003-utf8-when-looking-at-the-next-unichar-honour-the-siz.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch504: 0001-keymap-Add-support-for-IBM-ThinkPad-X41-Tablet.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch505: 0002-keymap-Fix-special-keys-on-ThinkPad-X60-X61-Tablet.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch506: 0001-systemctl-let-list-units-unit-files-honour-type.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch507: 0002-systemctl-obey-state-in-list-unit-files.patch +# PATCH-FIX-UPSTREAM added at 2014/11/20 +Patch509: 0002-core-watchdog-bus-properties-cannot-be-both-writable.patch +# PATCH-FIX-UPSTREAM added at 2014/11/20 +Patch510: 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch # UDEV PATCHES # ============ @@ -1081,10 +1223,26 @@ Patch1085: 1085-udev-fix-typos.patch # PATCH-FIX-UPSTREAM 1085-udevd-don-t-fail-if-run-udev-exists.patch Patch1086: 1086-udevd-don-t-fail-if-run-udev-exists.patch -# PATCH-FIX-SSUE 1087-infinit-timeout-for-kmod-loaded-modules.patch +# PATCH-FIX-SUSE 1087-infinit-timeout-for-kmod-loaded-modules.patch Patch1087: 1087-infinit-timeout-for-kmod-loaded-modules.patch -# PATCH-FIX-SSUE 1088-drop-renaming-of-virtual-interfaces-in-guest.patch (bnc#898432) +# PATCH-FIX-SUSE 1088-drop-renaming-of-virtual-interfaces-in-guest.patch (bnc#898432) Patch1088: 1088-drop-renaming-of-virtual-interfaces-in-guest.patch +# PATCH-FIX-UPSTREAM 1089-fix-cgroup-device-controller.patch +Patch1089: 1089-fix-cgroup-device-controller.patch +# PATCH-FIX-UPSTREAM 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch +Patch1090: 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch +# PATCH-FIX-UPSTREAM 1091-udev-path_id-update-comments.patch +Patch1091: 1091-udev-path_id-update-comments.patch +# PATCH-FIX-UPSTREAM 1092-libudev-do-not-accept-invalid-log-levels.patch +Patch1092: 1092-libudev-do-not-accept-invalid-log-levels.patch +# PATCH-FIX-UPSTREAM 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch +Patch1093: 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch +# PATCH-FIX-UPSTREAM 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch +Patch1094: 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch +# PATCH-FIX-SUSE 1095-set-ssd-disk-to-use-deadline-scheduler.patch (bnc#904517) +Patch1095: 1095-set-ssd-disk-to-use-deadline-scheduler.patch +# PATCH-FIX-SUSE 1096-new-udev-root-symlink-generator.patch +Patch1096: 1096-new-udev-root-symlink-generator.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1340,17 +1498,12 @@ %patch22 -p1 %patch23 -p1 %patch24 -p1 -%if 0%{?suse_version} <= 1310 %patch25 -p1 -%endif # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.htm... %patch27 -p1 %patch28 -p1 %patch37 -p1 -%ifarch %arm -%patch38 -p1 -%endif %patch39 -p1 %patch40 -p1 %patch41 -p1 @@ -1430,7 +1583,9 @@ %patch181 -p1 %patch182 -p1 %patch183 -p1 +%if 0%{?has_tmpkeep} %patch184 -p1 +%endif %patch185 -p1 %patch186 -p1 %patch187 -p1 @@ -1451,7 +1606,6 @@ %patch202 -p0 %patch203 -p1 %patch204 -p1 -%patch205 -p1 %patch206 -p0 %patch207 -p0 %patch208 -p1 @@ -1683,6 +1837,81 @@ %patch435 -p0 %patch436 -p0 %patch437 -p0 +%patch438 -p0 +%patch439 -p0 +%ifarch %arm +%patch38 -p1 +%endif +%patch440 -p0 +%patch441 -p0 +%patch442 -p0 +%patch443 -p0 +%patch444 -p0 +%patch445 -p0 +%patch446 -p0 +%patch447 -p0 +%patch448 -p0 +%patch449 -p0 +%patch450 -p0 +%patch451 -p0 +%patch452 -p0 +%patch453 -p0 +%patch454 -p0 +%patch455 -p0 +%patch456 -p0 +%patch457 -p0 +%patch458 -p0 +%patch459 -p0 +%patch460 -p0 +%patch461 -p0 +%patch462 -p0 +%patch463 -p0 +%patch464 -p0 +%patch465 -p0 +%patch466 -p0 +%patch467 -p0 +%patch468 -p0 +%patch469 -p0 +%patch470 -p0 +%patch471 -p0 +%patch472 -p0 +%patch473 -p0 +%patch474 -p0 +%patch475 -p0 +%patch476 -p0 +%patch477 -p0 +%patch478 -p0 +%patch479 -p0 +%patch480 -p0 +%patch481 -p0 +%patch482 -p0 +%patch483 -p0 +%patch484 -p0 +%patch485 -p0 +%patch486 -p0 +%patch487 -p0 +%patch488 -p0 +%patch489 -p0 +%patch490 -p0 +%patch491 -p0 +%patch492 -p0 +%patch493 -p0 +%patch494 -p0 +%patch495 -p0 +%patch496 -p0 +%patch497 -p0 +%patch498 -p0 +%patch499 -p0 +%patch500 -p0 +%patch501 -p0 +%patch502 -p0 +%patch503 -p0 +%patch504 -p0 +%patch505 -p0 +%patch506 -p0 +%patch507 -p0 +%patch509 -p0 +%patch510 -p0 # udev patches %patch1001 -p1 @@ -1768,7 +1997,9 @@ %patch1060 -p1 %patch1061 -p0 %patch1062 -p1 +%if %{with parentpathid} %patch1063 -p0 +%endif %patch1064 -p0 %patch1065 -p0 %patch1066 -p1 @@ -1802,6 +2033,16 @@ %patch1086 -p0 %patch1087 -p0 %patch1088 -p1 +%patch1089 -p1 +%if %{with parentpathid} +%patch1090 -p0 +%patch1091 -p0 +%endif +%patch1092 -p0 +%patch1093 -p0 +%patch1094 -p0 +%patch1095 -p1 +%patch1096 -p1 # remove patch backups find -name '*.orig' -exec rm -f '{}' \+ @@ -1919,7 +2160,7 @@ %if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ %endif -%if ! 0%{has_efi} +%if ! 0%{?has_efi} --disable-efi \ %endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ @@ -1981,15 +2222,10 @@ sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060} install -m755 -D %{S:1060} %{buildroot}/etc/init.d/boot.udev ln -s systemd-udevd.service %{buildroot}/%{_prefix}/lib/systemd/system/udev.service -sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} -install -m755 -D %{S:1061} %{buildroot}/%{_prefix}/lib/udev/write_dev_root_rule -sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} -install -m644 -D %{S:1062} %{buildroot}/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service install -m755 -D %{S:1063} %{buildroot}/%{_prefix}/lib/udev/udev-generate-persistent-rule install -m755 -D %{S:1064} %{buildroot}/%{_bindir}/systemd-sleep-grub install -m755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants -ln -sf ../systemd-udev-root-symlink.service %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants rm -rf %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -delete mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants,system/shutdown.target.wants} @@ -2457,7 +2693,7 @@ %exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service %exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service +%exclude %{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev-root-symlink.service %if ! 0%{?bootstrap} %exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* %endif @@ -2691,12 +2927,12 @@ %{_prefix}/lib/udev/mtd_probe %{_prefix}/lib/udev/scsi_id %{_prefix}/lib/udev/v4l_id -%{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-persistent-rule %{_prefix}/lib/udev/net-set-sriov-names %{_prefix}/lib/udev/remount-tmpfs %{_prefix}/lib/udev/rule_generator.functions %{_prefix}/lib/udev/write_net_rules +%{_prefix}/lib/udev/rootsymlink-generator %dir %{_prefix}/lib/udev/rules.d/ %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules @@ -2716,8 +2952,6 @@ %endif %dir %{_prefix}/lib/systemd/system %{_prefix}/lib/systemd/systemd-udevd -%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service -%{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service %{_prefix}/lib/systemd/system/*udev*.service %{_prefix}/lib/systemd/system/systemd-udevd*.socket %dir %{_prefix}/lib/systemd/system/sysinit.target.wants ++++++ systemd.spec ++++++ --- /var/tmp/diff_new_pack.vsCCve/_old 2014-11-26 10:36:12.000000000 +0100 +++ /var/tmp/diff_new_pack.vsCCve/_new 2014-11-26 10:36:12.000000000 +0100 @@ -24,6 +24,7 @@ %bcond_without compat_libs %bcond_with networkd %bcond_with python +%bcond_with parentpathid %ifarch %{ix86} x86_64 aarch64 %define has_efi 1 %else @@ -39,6 +40,7 @@ %bcond_with udevsettle %endif %bcond_with systemgrps +%{expand: %%global has_tmpkeep %(type -p systemd-tmpfiles-keep &>/dev/null && echo 1 || echo 0)} Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd @@ -183,8 +185,6 @@ Source11: after-local.service Source1060: boot.udev -Source1061: write_dev_root_rule -Source1062: systemd-udev-root-symlink Source1063: udev-generate-persistent-rule.sh Source1064: systemd-sleep-grub Source1065: systemd-remount-tmpfs @@ -241,7 +241,7 @@ Patch23: disable-nss-myhostname-warning-bnc-783841.patch # PATCH-FIX-OPENSUSE handle-HOSTNAME.patch fcrozat@suse.com -- handle /etc/HOSTNAME (bnc#803653) Patch24: handle-etc-HOSTNAME.patch -# PATCH-FIX-OPENSUSE forward to pm-utils -- for code base <= 1310 +# PATCH-FIX-OPENSUSE forward to pm-utils -- until boo#904828 is addressed Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch # PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch @@ -433,8 +433,6 @@ Patch203: respect-nfs-bg-option.patch # PATCH-FIX-UPSTREAM Stop useless messages on dual_timestamp_is_set is failed. Patch204: shut-up-annoying-assertion-monotonic-clock-message.patch -# PATCH-FIX-SUSE Do not override the passphrase prompts due messages of busy jobs -Patch205: keep-crypt-password-prompt.patch # PATCH-FIX-UPSTREAM Fix uninitialized memory Patch206: 0001-sd-rtnl-message-append-fix-uninitialized-memory.patch # PATCH-FIX-UPSTREAM Make systemd user journal accessible by users (bnc#876694) @@ -897,6 +895,150 @@ Patch436: 0002-bus-remove-unused-check.patch # PATCH-FIX-UPSTREAM added at 2014/09/26 Patch437: 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch438: 0001-logind-add-support-for-Triton2-Power-Button.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch439: 0002-logind-add-support-for-TPS65217-Power-Button.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch440: 0001-shutdownd-clean-up-initialization-of-struct.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch441: 0003-bootchart-parse-userinput-with-safe_atoi.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch442: 0004-bootchart-check-return-of-strftime.patch +# PATCH-FIX-UPSTREAM added at 2014/09/29 +Patch443: 0005-bootchart-Do-not-try-to-access-data-for-non-existing.patch +# PATCH-FIX-UPSTREAM added at 2014/09/30 +Patch444: 0001-journalctl-do-not-output-reboot-markers-when-running.patch +# PATCH-FIX-UPSTREAM added at 2014/09/30 +Patch445: 0002-udev-hwdb-New-Entry-for-Dell-XPS12-9Q33-keyboard.patch +# PATCH-FIX-UPSTREAM added at 2014/10/02 +Patch446: 0001-core-swap-only-make-configured-units-part-of-swap.ta.patch +# PATCH-FIX-UPSTREAM added at 2014/10/02 +Patch447: 0009-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch448: 0001-virt-detect-that-we-are-running-inside-the-docker-co.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch449: 0002-bootchart-use-n-a-if-PRETTY_NAME-is-not-found.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch450: 0003-fileio-label-return-error-when-writing-fails.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch451: 0001-sd-event-don-t-require-a-signal-event-source-to-be-e.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch452: 0004-sd-event-check-the-value-of-received-signal.patch +# PATCH-FIX-UPSTREAM added at 2014/10/07 +Patch453: 0005-sd-id128-do-stricter-checking-of-random-boot-id.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch454: 0001-keymap-Fix-touchpad-toggle-on-Toshiba-Satellite-P75-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch455: 0001-units-introduce-network-pre.target-as-place-to-hook-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch456: 0002-keymap-Fix-touchpad-toggle-key-on-Asus-laptops.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch457: 0003-sd-bus-check-return-value-of-vasprintf.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch458: 0004-core-map-the-rescue-argument-to-rescue.target.patch +# PATCH-FIX-UPSTREAM added at 2014/10/10 +Patch459: 0005-util-avoid-double-close-of-fd.patch +# PATCH-FIX-UPSTREAM added at 2014/10/13 +Patch460: 0001-systemctl-when-mangle-unit-names-for-the-isolate-suf.patch +# PATCH-FIX-UPSTREAM added at 2014/10/14 +Patch461: 0001-tmpfiles-compare-return-against-correct-errno.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch462: 0001-shell-completion-fix-completion-of-inactive-units.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch463: 0002-shell-completion-propose-templates-for-disable-re-en.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch464: 0003-man-we-don-t-have-Wanted-dependency.patch +# PATCH-FIX-UPSTREAM added at 2014/10/15 +Patch465: 0004-selinux-fix-potential-double-free-crash-in-child-pro.patch +# PATCH-FIX-UPSTREAM added at 2014/10/20 +Patch466: 0001-systemd-continue-switch-root-even-if-umount-fails.patch +# PATCH-FIX-UPSTREAM added at 2014/10/20 +Patch467: 0002-systemd-try-harder-to-bind-to-notify-socket.patch +# PATCH-FIX-SUSE added at 2014/10/15 +Patch468: avoid-leaking-socket-descriptors.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch469: 0001-strv-add-an-additional-overflow-check-when-enlarging.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch470: 0002-hwdb-Add-mapping-for-special-keys-on-compaq-ku-0133-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch471: 0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch472: 0004-journal-do-server_vacuum-for-sigusr1.patch +# PATCH-FIX-UPSTREAM added at 2014/10/23 +Patch473: 0005-cryptsetup-fix-an-OOM-check.patch +# PATCH-FIX-UPSTREAM added at 2014/10/24 +Patch474: 0002-shutdown-pass-own-argv-to-run-initramfs-shutdown.patch +# PATCH-FIX-SUSE added at 2014/10/24 +Patch475: journald-advice-about-use-of-memory.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch476: 0001-manager-Linux-on-hppa-has-fewer-rtsigs-hence-avoid-u.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch477: 0002-time-also-support-infinity-syntax-in-parse_nsec.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch478: 0003-time-earlier-exit-from-format_timestamp_relative-on-.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch479: 0004-sd-bus-if-we-don-t-manage-to-properly-allocate-the-e.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch480: 0005-journalctl-correct-help-text-for-until.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch481: 0006-calendarspec-fix-typo-in-annually.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch482: 0007-systemctl-do-not-ignore-errors-in-symlink-removal.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch483: 0008-util-introduce-sethostname_idempotent.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch484: 0009-util-fix-copy-paste-error-and-actually-set-the-new-h.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch485: 0010-shutdown-do-final-unmounting-only-if-not-running-ins.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch486: 0011-selinux-make-sure-we-do-not-try-to-print-missing-fie.patch +# PATCH-FIX-UPSTREAM added at 2014/10/28 +Patch487: 0012-manager-do-not-print-anything-while-passwords-are-be.patch +# PATCH-FIX-UPSTREAM added at 2014/10/31 +Patch488: 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch +# PATCH-FIX-UPSTREAM added at 2014/10/31 +Patch489: 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch +# PATCH-FIX-SUSE added at 2014/11/05 +Patch490: watch_resolv.conf_for_become_changed.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch491: 0001-core-don-t-allow-enabling-if-unit-is-masked.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch492: 0002-snapshot-return-error-when-snapshot-exists.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch493: 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch494: 0004-Raise-level-of-Found-dependency.-lines.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch495: 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch496: 0006-journald-fix-minor-memory-leak.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch497: 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch498: 0008-journald-fix-memory-leak-on-error-path.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch499: 0009-units-make-systemd-journald.service-Type-notify.patch +# PATCH-FIX-UPSTREAM added at 2014/11/07 +Patch500: 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch +# PATCH-FIX-UPSTREAM added at 2014/11/10 +Patch501: 0001-login-rerun-vconsole-setup-when-switching-from-vgaco.patch +# PATCH-FIX-UPSTREAM added at 2014/11/10 +Patch502: 0002-shutdown-fix-arguments-to-run-initramfs-shutdown.patch +# PATCH-FIX-UPSTREAM added at 2014/11/10 +Patch503: 0003-utf8-when-looking-at-the-next-unichar-honour-the-siz.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch504: 0001-keymap-Add-support-for-IBM-ThinkPad-X41-Tablet.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch505: 0002-keymap-Fix-special-keys-on-ThinkPad-X60-X61-Tablet.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch506: 0001-systemctl-let-list-units-unit-files-honour-type.patch +# PATCH-FIX-UPSTREAM added at 2014/11/18 +Patch507: 0002-systemctl-obey-state-in-list-unit-files.patch +# PATCH-FIX-UPSTREAM added at 2014/11/20 +Patch509: 0002-core-watchdog-bus-properties-cannot-be-both-writable.patch +# PATCH-FIX-UPSTREAM added at 2014/11/20 +Patch510: 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch # UDEV PATCHES # ============ @@ -1076,10 +1218,26 @@ Patch1085: 1085-udev-fix-typos.patch # PATCH-FIX-UPSTREAM 1085-udevd-don-t-fail-if-run-udev-exists.patch Patch1086: 1086-udevd-don-t-fail-if-run-udev-exists.patch -# PATCH-FIX-SSUE 1087-infinit-timeout-for-kmod-loaded-modules.patch +# PATCH-FIX-SUSE 1087-infinit-timeout-for-kmod-loaded-modules.patch Patch1087: 1087-infinit-timeout-for-kmod-loaded-modules.patch -# PATCH-FIX-SSUE 1088-drop-renaming-of-virtual-interfaces-in-guest.patch (bnc#898432) +# PATCH-FIX-SUSE 1088-drop-renaming-of-virtual-interfaces-in-guest.patch (bnc#898432) Patch1088: 1088-drop-renaming-of-virtual-interfaces-in-guest.patch +# PATCH-FIX-UPSTREAM 1089-fix-cgroup-device-controller.patch +Patch1089: 1089-fix-cgroup-device-controller.patch +# PATCH-FIX-UPSTREAM 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch +Patch1090: 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch +# PATCH-FIX-UPSTREAM 1091-udev-path_id-update-comments.patch +Patch1091: 1091-udev-path_id-update-comments.patch +# PATCH-FIX-UPSTREAM 1092-libudev-do-not-accept-invalid-log-levels.patch +Patch1092: 1092-libudev-do-not-accept-invalid-log-levels.patch +# PATCH-FIX-UPSTREAM 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch +Patch1093: 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch +# PATCH-FIX-UPSTREAM 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch +Patch1094: 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch +# PATCH-FIX-SUSE 1095-set-ssd-disk-to-use-deadline-scheduler.patch (bnc#904517) +Patch1095: 1095-set-ssd-disk-to-use-deadline-scheduler.patch +# PATCH-FIX-SUSE 1096-new-udev-root-symlink-generator.patch +Patch1096: 1096-new-udev-root-symlink-generator.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1335,17 +1493,12 @@ %patch22 -p1 %patch23 -p1 %patch24 -p1 -%if 0%{?suse_version} <= 1310 %patch25 -p1 -%endif # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.htm... %patch27 -p1 %patch28 -p1 %patch37 -p1 -%ifarch %arm -%patch38 -p1 -%endif %patch39 -p1 %patch40 -p1 %patch41 -p1 @@ -1425,7 +1578,9 @@ %patch181 -p1 %patch182 -p1 %patch183 -p1 +%if 0%{?has_tmpkeep} %patch184 -p1 +%endif %patch185 -p1 %patch186 -p1 %patch187 -p1 @@ -1446,7 +1601,6 @@ %patch202 -p0 %patch203 -p1 %patch204 -p1 -%patch205 -p1 %patch206 -p0 %patch207 -p0 %patch208 -p1 @@ -1678,6 +1832,81 @@ %patch435 -p0 %patch436 -p0 %patch437 -p0 +%patch438 -p0 +%patch439 -p0 +%ifarch %arm +%patch38 -p1 +%endif +%patch440 -p0 +%patch441 -p0 +%patch442 -p0 +%patch443 -p0 +%patch444 -p0 +%patch445 -p0 +%patch446 -p0 +%patch447 -p0 +%patch448 -p0 +%patch449 -p0 +%patch450 -p0 +%patch451 -p0 +%patch452 -p0 +%patch453 -p0 +%patch454 -p0 +%patch455 -p0 +%patch456 -p0 +%patch457 -p0 +%patch458 -p0 +%patch459 -p0 +%patch460 -p0 +%patch461 -p0 +%patch462 -p0 +%patch463 -p0 +%patch464 -p0 +%patch465 -p0 +%patch466 -p0 +%patch467 -p0 +%patch468 -p0 +%patch469 -p0 +%patch470 -p0 +%patch471 -p0 +%patch472 -p0 +%patch473 -p0 +%patch474 -p0 +%patch475 -p0 +%patch476 -p0 +%patch477 -p0 +%patch478 -p0 +%patch479 -p0 +%patch480 -p0 +%patch481 -p0 +%patch482 -p0 +%patch483 -p0 +%patch484 -p0 +%patch485 -p0 +%patch486 -p0 +%patch487 -p0 +%patch488 -p0 +%patch489 -p0 +%patch490 -p0 +%patch491 -p0 +%patch492 -p0 +%patch493 -p0 +%patch494 -p0 +%patch495 -p0 +%patch496 -p0 +%patch497 -p0 +%patch498 -p0 +%patch499 -p0 +%patch500 -p0 +%patch501 -p0 +%patch502 -p0 +%patch503 -p0 +%patch504 -p0 +%patch505 -p0 +%patch506 -p0 +%patch507 -p0 +%patch509 -p0 +%patch510 -p0 # udev patches %patch1001 -p1 @@ -1763,7 +1992,9 @@ %patch1060 -p1 %patch1061 -p0 %patch1062 -p1 +%if %{with parentpathid} %patch1063 -p0 +%endif %patch1064 -p0 %patch1065 -p0 %patch1066 -p1 @@ -1797,6 +2028,16 @@ %patch1086 -p0 %patch1087 -p0 %patch1088 -p1 +%patch1089 -p1 +%if %{with parentpathid} +%patch1090 -p0 +%patch1091 -p0 +%endif +%patch1092 -p0 +%patch1093 -p0 +%patch1094 -p0 +%patch1095 -p1 +%patch1096 -p1 # remove patch backups find -name '*.orig' -exec rm -f '{}' \+ @@ -1914,7 +2155,7 @@ %if 0%{?suse_version} <= 1310 --with-firmware-path="%{_prefix}/lib/firmware:/lib/firmware" \ %endif -%if ! 0%{has_efi} +%if ! 0%{?has_efi} --disable-efi \ %endif --with-rc-local-script-path-start=/etc/init.d/boot.local \ @@ -1976,15 +2217,10 @@ sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060} install -m755 -D %{S:1060} %{buildroot}/etc/init.d/boot.udev ln -s systemd-udevd.service %{buildroot}/%{_prefix}/lib/systemd/system/udev.service -sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} -install -m755 -D %{S:1061} %{buildroot}/%{_prefix}/lib/udev/write_dev_root_rule -sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} -install -m644 -D %{S:1062} %{buildroot}/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service install -m755 -D %{S:1063} %{buildroot}/%{_prefix}/lib/udev/udev-generate-persistent-rule install -m755 -D %{S:1064} %{buildroot}/%{_bindir}/systemd-sleep-grub install -m755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants -ln -sf ../systemd-udev-root-symlink.service %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants rm -rf %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -delete mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants,system/shutdown.target.wants} @@ -2452,7 +2688,7 @@ %exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service %exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service +%exclude %{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev-root-symlink.service %if ! 0%{?bootstrap} %exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* %endif @@ -2686,12 +2922,12 @@ %{_prefix}/lib/udev/mtd_probe %{_prefix}/lib/udev/scsi_id %{_prefix}/lib/udev/v4l_id -%{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-persistent-rule %{_prefix}/lib/udev/net-set-sriov-names %{_prefix}/lib/udev/remount-tmpfs %{_prefix}/lib/udev/rule_generator.functions %{_prefix}/lib/udev/write_net_rules +%{_prefix}/lib/udev/rootsymlink-generator %dir %{_prefix}/lib/udev/rules.d/ %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules @@ -2711,8 +2947,6 @@ %endif %dir %{_prefix}/lib/systemd/system %{_prefix}/lib/systemd/systemd-udevd -%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service -%{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service %{_prefix}/lib/systemd/system/*udev*.service %{_prefix}/lib/systemd/system/systemd-udevd*.socket %dir %{_prefix}/lib/systemd/system/sysinit.target.wants ++++++ 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch ++++++ --- /var/tmp/diff_new_pack.vsCCve/_old 2014-11-26 10:36:12.000000000 +0100 +++ /var/tmp/diff_new_pack.vsCCve/_new 2014-11-26 10:36:12.000000000 +0100 @@ -1,497 +1,16 @@ -This seems to be a SUSE specific patch. Here we add the check for unmaintained -disk like devices to be able to flush and maybe shut them down. Also we add the -missing sync() system call for the direct halt/reboot systemctl command. Then we -use the system halt as gfallback if poweroff fails for both the direct poweroff -systemctl command as well as for the systemd-shutdown utility. - --- - Makefile.am | 11 + - src/core/hdflush.c | 365 ++++++++++++++++++++++++++++++++++++++++++++++ - src/core/hdflush.h | 25 +++ - src/core/shutdown.c | 12 + - src/systemctl/systemctl.c | 25 ++- - 5 files changed, 429 insertions(+), 9 deletions(-) + systemd-209/src/core/shutdown.c | 4 ++++ + systemd-209/src/systemctl/systemctl.c | 22 +++++++++++++++------- + 2 files changed, 19 insertions(+), 7 deletions(-) ---- systemd-209/Makefile.am -+++ systemd-209/Makefile.am 2014-01-28 11:06:56.000000000 +0000 -@@ -1004,7 +1004,9 @@ libsystemd_core_la_SOURCES = \ - src/core/audit-fd.c \ - src/core/audit-fd.h \ - src/core/async.c \ -- src/core/async.h -+ src/core/async.h \ -+ src/core/hdflush.c \ -+ src/core/hdflush.h - - if HAVE_KMOD - libsystemd_core_la_SOURCES += \ -@@ -1522,6 +1524,8 @@ systemd_shutdown_SOURCES = \ - src/core/shutdown.c \ - src/core/mount-setup.c \ - src/core/mount-setup.h \ -+ src/core/hdflush.c \ -+ src/core/hdflush.h \ - src/core/killall.h \ - src/core/killall.c - -@@ -1818,7 +1822,9 @@ systemd_cgroups_agent_LDADD = \ - - # ------------------------------------------------------------------------------ - systemctl_SOURCES = \ -- src/systemctl/systemctl.c -+ src/systemctl/systemctl.c \ -+ src/core/hdflush.c \ -+ src/core/hdflush.h - - systemctl_LDADD = \ - libsystemd-units.la \ -@@ -1826,6 +1832,7 @@ systemctl_LDADD = \ - libsystemd-internal.la \ - libsystemd-logs.la \ - libsystemd-journal-internal.la \ -+ libudev-internal.la \ - libsystemd-shared.la - - # ------------------------------------------------------------------------------ ---- systemd-209/src/core/hdflush.c -+++ systemd-209/src/core/hdflush.c 2014-01-28 10:58:56.000000000 +0000 -@@ -0,0 +1,367 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2014 Werner Fink -+ -+ 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 <http://www.gnu.org/licenses/>. -+***/ -+ -+/* -+ * Find all disks on the system, list out IDE, unmanaged ATA disks, and -+ * USB sticks flush the cache of those and optional shut them down. -+ */ -+ -+#include <libudev.h> -+#include <limits.h> -+#ifdef LIST_DEBUG -+# include <stdio.h> -+#endif -+#include <stdlib.h> -+#include <string.h> -+#include <unistd.h> -+ -+#include <sys/types.h> -+#include <sys/stat.h> -+#include <fcntl.h> -+#include <errno.h> -+ -+#include <sys/ioctl.h> -+#include <linux/hdreg.h> -+#include <linux/fs.h> -+#ifdef WORDS_BIGENDIAN -+# include <byteswap.h> -+#endif -+ -+#include "hdflush.h" -+ -+/* Used in flush_cache_ext(), compare with <linux/hdreg.h> */ -+#define IDBYTES 512 -+#define MASK_EXT 0xE000 /* Bit 15 shall be zero, bit 14 shall be one, bit 13 flush cache ext */ -+#define TEST_EXT 0x6000 -+ -+/* Maybe set in list_disks() and used in do_standby_disk() */ -+#define DISK_IS_IDE 0x00000001 -+#define DISK_IS_SATA 0x00000002 -+#define DISK_EXTFLUSH 0x00000004 -+#define DISK_REMOVABLE 0x00000008 -+#define DISK_MANAGED 0x00000010 -+#define DISK_FLUSHONLY 0x00000020 -+ -+struct sysfs { -+ struct udev *udev; -+ struct udev_enumerate *num; -+ struct udev_list_entry *item; -+ char *devnode; -+ size_t size; -+}; -+ -+static int flush_cache_ext(const struct sysfs *sysfs); -+ -+static struct sysfs * open_sysfs(void) -+{ -+ static struct sysfs sysfs; -+ sysfs.udev = udev_new(); -+ if (!sysfs.udev) -+ goto err; -+ sysfs.num = udev_enumerate_new(sysfs.udev); -+ if (!sysfs.num) -+ goto err; -+ if (udev_enumerate_add_match_subsystem(sysfs.num, "block") < 0) -+ goto err; -+ if (udev_enumerate_add_match_sysname(sysfs.num, "sd?") < 0) -+ goto err; -+ if (udev_enumerate_add_match_sysname(sysfs.num, "hd?") < 0) -+ goto err; -+ if (udev_enumerate_scan_devices(sysfs.num) < 0) -+ goto err; -+ sysfs.item = udev_enumerate_get_list_entry(sysfs.num); -+ sysfs.devnode = NULL; -+ sysfs.size = 0; -+ return &sysfs; -+err: -+ if (sysfs.num) -+ udev_unref(sysfs.udev); -+ if (sysfs.udev) -+ udev_unref(sysfs.udev); -+ return NULL; -+} -+ -+static void close_sysfs(struct sysfs *sysfs) -+{ -+ if (sysfs->num) -+ udev_enumerate_unref(sysfs->num); -+ if (sysfs->udev) -+ udev_unref(sysfs->udev); -+ if (sysfs->devnode) -+ free(sysfs->devnode); -+ sysfs->devnode = NULL; -+} -+ -+ -+static char *list_disks(struct sysfs *sysfs, unsigned int* flags) -+{ -+ struct udev_device *device, *parent; -+ struct udev_list_entry *item; -+ const char *devnode; -+ char path[PATH_MAX]; -+ -+ device = NULL; -+next: -+ if (device) -+ udev_device_unref(device); -+ if (sysfs->devnode) -+ free(sysfs->devnode); -+ sysfs->devnode = NULL; -+ sysfs->size = 0; -+ *flags = 0; -+ -+ if (!sysfs->item) -+ goto empty; -+ item = sysfs->item; -+ sysfs->item = udev_list_entry_get_next(sysfs->item); -+ -+ if (!(device = udev_device_new_from_syspath(sysfs->udev, udev_list_entry_get_name(item)))) -+ goto out; -+ if (!(devnode = udev_device_get_devnode(device))) -+ goto out; -+ if (!(sysfs->devnode = strdup(devnode))) -+ goto out; -+ -+ path[0] = '\0'; -+ parent = udev_device_get_parent(device); -+ if (parent) { -+ const char *sysname, *devpath; -+ struct udev_device *disk; -+ const char *value; -+ int ret; -+ -+ sysname = udev_device_get_sysname(parent); -+ devpath = udev_device_get_devpath(parent); -+ -+ strcpy(path, "/sys"); -+ strcat(path, devpath); -+ strcat(path, "/scsi_disk/"); -+ strcat(path, sysname); -+ -+ disk = udev_device_new_from_syspath(sysfs->udev, path); -+ if (disk) { -+ value = udev_device_get_sysattr_value(disk, "manage_start_stop"); -+ udev_device_unref(disk); -+ -+ if (value && *value != '0') { -+ *flags = DISK_MANAGED; -+#ifndef LIST_DEBUG -+ goto next; /* Device managed by the kernel */ -+#endif -+ } -+ } -+ -+ value = udev_device_get_sysattr_value(device, "size"); -+ if (value && *value) -+ sysfs->size = (size_t)atoll(value); -+ -+ value = udev_device_get_sysattr_value(device, "removable"); -+ if (value && *value != '0') { -+ *flags |= DISK_REMOVABLE; -+ -+ if ((ret = flush_cache_ext(sysfs))) { -+ if (ret < 0) -+ goto next; -+ *flags |= DISK_EXTFLUSH; -+ } -+ goto out; /* Removable disk like USB stick */ -+ } -+ -+ value = udev_device_get_sysname(device); -+ if (value && *value == 'h') { -+ *flags |= DISK_IS_IDE; -+ -+ if ((ret = flush_cache_ext(sysfs))) { -+ if (ret < 0) -+ goto next; -+ *flags |= DISK_EXTFLUSH; -+ } -+ goto out; /* IDE disk found */ -+ } -+ -+ value = udev_device_get_sysattr_value(parent, "vendor"); -+ if (value && strncmp(value, "ATA", 3) == 0) { -+ *flags |= (DISK_IS_IDE|DISK_IS_SATA); -+ -+ if ((ret = flush_cache_ext(sysfs))) { -+ if (ret < 0) -+ goto next; -+ *flags |= DISK_EXTFLUSH; -+ } -+ goto out; /* SATA disk to shutdown */ -+ } -+ goto next; -+ } -+out: -+ udev_device_unref(device); -+empty: -+ return sysfs->devnode; -+} -+#ifndef LIST_DEBUG -+/* -+ * Check IDE/(S)ATA hard disk identity for -+ * the FLUSH CACHE EXT bit set. -+ */ -+static int flush_cache_ext(const struct sysfs *sysfs) -+{ -+#ifndef WIN_IDENTIFY -+#define WIN_IDENTIFY 0xEC -+#endif -+ unsigned char args[4+IDBYTES]; -+ unsigned short *id = (unsigned short*)(&args[4]); -+ int fd = -1, ret = 0; -+ -+ if (sysfs->size < (1<<28)) -+ goto out; /* small disk */ -+ -+ if ((fd = open(sysfs->devnode, O_RDONLY|O_NONBLOCK|O_CLOEXEC)) < 0) -+ goto out; -+ -+ memset(&args[0], 0, sizeof(args)); -+ args[0] = WIN_IDENTIFY; -+ args[3] = 1; -+ if (ioctl(fd, HDIO_DRIVE_CMD, &args)) -+ goto out; -+#ifdef WORDS_BIGENDIAN -+# if 0 -+ { -+ const unsigned short *end = id + IDBYTES/2; -+ const unsigned short *from = id; -+ unsigned short *to = id; -+ -+ while (from < end) -+ *to++ = bswap_16(*from++); -+ } -+# else -+ id[83] = bswap_16(id[83]); -+# endif -+#endif -+ if ((id[83] & MASK_EXT) == TEST_EXT) -+ ret = 1; -+out: -+ if (fd >= 0) -+ close(fd); -+ return ret; -+} -+ -+/* -+ * Put an IDE/SCSI/SATA disk in standby mode. -+ * Code stolen from hdparm.c -+ */ -+static int do_standby_disk(struct sysfs *sysfs, unsigned int flags) -+{ -+#ifndef WIN_STANDBYNOW1 -+#define WIN_STANDBYNOW1 0xE0 -+#endif -+#ifndef WIN_STANDBYNOW2 -+#define WIN_STANDBYNOW2 0x94 -+#endif -+#ifndef WIN_FLUSH_CACHE_EXT -+#define WIN_FLUSH_CACHE_EXT 0xEA -+#endif -+#ifndef WIN_FLUSH_CACHE -+#define WIN_FLUSH_CACHE 0xE7 -+#endif -+ unsigned char flush1[4] = {WIN_FLUSH_CACHE_EXT,0,0,0}; -+ unsigned char flush2[4] = {WIN_FLUSH_CACHE,0,0,0}; -+ unsigned char stdby1[4] = {WIN_STANDBYNOW1,0,0,0}; -+ unsigned char stdby2[4] = {WIN_STANDBYNOW2,0,0,0}; -+ int fd, ret; -+ -+ if ((fd = open(sysfs->devnode, O_RDWR|O_NONBLOCK|O_CLOEXEC)) < 0) -+ return -1; -+ -+ switch (flags & DISK_EXTFLUSH) { -+ case DISK_EXTFLUSH: -+ if ((ret = ioctl(fd, HDIO_DRIVE_CMD, &flush1)) == 0) -+ break; -+ /* Extend flush rejected, try standard flush */ -+ default: -+ ret = ioctl(fd, HDIO_DRIVE_CMD, &flush2) && -+ ioctl(fd, BLKFLSBUF); -+ break; -+ } -+ -+ if ((flags & DISK_FLUSHONLY) == 0x0) { -+ ret = ioctl(fd, HDIO_DRIVE_CMD, &stdby1) && -+ ioctl(fd, HDIO_DRIVE_CMD, &stdby2); -+ } -+ -+ close(fd); -+ -+ if (ret) -+ return -1; -+ return 0; -+} -+#endif -+#ifdef LIST_DEBUG -+int main() -+{ -+ char *disk; -+ unsigned int flags; -+ struct sysfs *sysfs = open_sysfs(); -+ if (!sysfs) -+ goto err; -+ while ((disk = list_disks(sysfs, &flags))) -+ fprintf(stdout, "%s\n", sysfs->devnode); -+ close_sysfs(sysfs); -+err: -+ return 0; -+} -+#else -+/* -+ * List all disks and put them in standby mode. -+ * This has the side-effect of flushing the writecache, -+ * which is exactly what we want on poweroff. -+ */ -+void hddown(void) -+{ -+ struct sysfs *sysfs; -+ unsigned int flags; -+ char *disk; -+ -+ if (!(sysfs = open_sysfs())) -+ return; -+ -+ while ((disk = list_disks(sysfs, &flags))) -+ do_standby_disk(sysfs, flags); -+ -+ close_sysfs(sysfs); -+} -+ -+/* -+ * List all disks and cause them to flush their buffers. -+ */ -+void hdflush(void) -+{ -+ struct sysfs *sysfs; -+ unsigned int flags; -+ char *disk; -+ -+ if (!(sysfs = open_sysfs())) -+ return; -+ -+ while ((disk = list_disks(sysfs, &flags))) -+ do_standby_disk(sysfs, (flags|DISK_FLUSHONLY)); -+ -+ close_sysfs(sysfs); -+} -+#endif ---- systemd-209/src/core/hdflush.h -+++ systemd-209/src/core/hdflush.h 2014-01-28 11:00:08.000000000 +0000 -@@ -0,0 +1,25 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+#pragma once -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2014 Werner Fink -+ -+ 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 <http://www.gnu.org/licenses/>. -+***/ -+ -+void hdflush(void); -+void hddown(void); --- systemd-209/src/core/shutdown.c +++ systemd-209/src/core/shutdown.c 2014-02-28 11:17:22.000000000 +0000 -@@ -40,6 +40,7 @@ - #include "missing.h" - #include "log.h" - #include "fileio.h" -+#include "hdflush.h" - #include "umount.h" - #include "util.h" - #include "mkdir.h" -@@ -225,7 +226,8 @@ int main(int argc, char *argv[]) { - _cleanup_free_ char *cgroup = NULL; - char *arguments[3]; - unsigned retries; -- int cmd, r; -+ unsigned cmd; -+ int r; - - log_parse_environment(); - r = parse_argv(argc, argv); -@@ -388,8 +390,13 @@ int main(int argc, char *argv[]) { - * on reboot(), but the file systems need to be synce'd - * explicitly in advance. So let's do this here, but not - * needlessly slow down containers. */ -- if (!in_container) -+ if (!in_container) { - sync(); -+ if (cmd == RB_POWER_OFF || cmd == RB_HALT_SYSTEM) -+ hddown(); -+ else -+ hdflush(); -+ } - - switch (cmd) { - -@@ -449,6 +456,10 @@ int main(int argc, char *argv[]) { +@@ -449,6 +449,10 @@ int main(int argc, char *argv[]) { } reboot(cmd); + -+ if (cmd == RB_POWER_OFF) ++ if (cmd == (int)RB_POWER_OFF) + reboot(RB_HALT_SYSTEM); + if (errno == EPERM && in_container) { @@ -499,15 +18,7 @@ * CAP_SYS_BOOT just exit, this will kill our --- systemd-209/src/systemctl/systemctl.c +++ systemd-209/src/systemctl/systemctl.c 2014-02-28 11:19:35.000000000 +0000 -@@ -67,6 +67,7 @@ - #include "logs-show.h" - #include "socket-util.h" - #include "fileio.h" -+#include "hdflush.h" - #include "env-util.h" - #include "bus-util.h" - #include "bus-message.h" -@@ -93,6 +94,7 @@ static bool arg_no_pager = false; +@@ -93,6 +93,7 @@ static bool arg_no_pager = false; static bool arg_no_wtmp = false; static bool arg_no_wall = false; static bool arg_no_reload = false; @@ -515,7 +26,7 @@ static bool arg_show_types = false; static bool arg_ignore_inhibitors = false; static bool arg_dry = false; -@@ -5566,6 +5568,7 @@ static int halt_parse_argv(int argc, cha +@@ -5578,6 +5579,7 @@ static int halt_parse_argv(int argc, cha { "reboot", no_argument, NULL, ARG_REBOOT }, { "force", no_argument, NULL, 'f' }, { "wtmp-only", no_argument, NULL, 'w' }, @@ -523,7 +34,7 @@ { "no-wtmp", no_argument, NULL, 'd' }, { "no-wall", no_argument, NULL, ARG_NO_WALL }, {} -@@ -5617,10 +5620,13 @@ static int halt_parse_argv(int argc, cha +@@ -5629,10 +5631,13 @@ static int halt_parse_argv(int argc, cha case 'i': case 'h': @@ -538,25 +49,25 @@ case '?': return -EINVAL; -@@ -6266,16 +6272,24 @@ static int halt_now(enum action a) { - * point on... */ - reboot(RB_ENABLE_CAD); +@@ -6274,20 +6279,23 @@ done: + + static int halt_now(enum action a) { -- switch (a) { +-/* Make sure C-A-D is handled by the kernel from this + if (!arg_no_sync) + sync(); ++ ++ /* Make sure C-A-D is handled by the kernel from this + * point on... */ + reboot(RB_ENABLE_CAD); + + switch (a) { - case ACTION_HALT: - log_info("Halting."); - reboot(RB_HALT_SYSTEM); - return -errno; -+ if (a == ACTION_POWEROFF || a == ACTION_HALT) -+ hddown(); -+ else -+ hdflush(); -+ -+ switch (a) { - +- case ACTION_POWEROFF: log_info("Powering off."); reboot(RB_POWER_OFF); ++++++ 0001-core-don-t-allow-enabling-if-unit-is-masked.patch ++++++
From f7101b7368dfe41dbc8b7203e06133cccb589c01 Mon Sep 17 00:00:00 2001 From: Jan Synacek <jsynacek@redhat.com> Date: Tue, 7 Oct 2014 13:35:41 +0200 Subject: [PATCH] core: don't allow enabling if unit is masked
--- src/shared/install.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git src/shared/install.c src/shared/install.c index fa064c2..945bb27 100644 --- src/shared/install.c +++ src/shared/install.c @@ -1516,6 +1516,19 @@ int unit_file_enable( return r; STRV_FOREACH(i, files) { + UnitFileState state; + + state = unit_file_get_state(scope, root_dir, *i); + if (state < 0) { + log_error("Failed to get unit file state for %s: %s", *i, strerror(-state)); + return state; + } + + if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) { + log_error("Failed to enable unit: Unit %s is masked", *i); + return -ENOTSUP; + } + r = install_info_add_auto(&c, *i); if (r < 0) return r; -- 1.7.9.2 ++++++ 0001-core-swap-only-make-configured-units-part-of-swap.ta.patch ++++++
From 3018d31238caabc2e204aa161e647dc1c1b5d1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Thu, 2 Oct 2014 00:11:36 -0400 Subject: [PATCH] core/swap: only make configured units part of swap.target
We used to make all .swap units either RequiredBy=swap.target or WantedBy=swap.target. But swap.target should be the "configured swap units", either through /etc/fstab or non-generated .swap units. It is surprising when systemd starts treating a swap device that was possibly temporarily enabled as a hard dependency for other units. So do not add dependencies with swap.target for units gleaned from /proc/swaps. Similarly, we added dependencies for all aliases of the device name, which clutters up the dependency graph but does not seem to bring any value, since the status of those following units is consistent with the main one anyway. This should be a fix for [1], and it seems the right thing to do anyway. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1114786 --- src/core/swap.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git src/core/swap.c src/core/swap.c index ef90d0e..b2ca048 100644 --- src/core/swap.c +++ src/core/swap.c @@ -213,7 +213,7 @@ static int swap_add_device_links(Swap *s) { } static int swap_add_default_dependencies(Swap *s) { - bool nofail = false, noauto = false; + bool nofail, noauto; int r; assert(s); @@ -228,23 +228,25 @@ static int swap_add_default_dependencies(Swap *s) { if (r < 0) return r; - if (s->from_fragment) { - SwapParameters *p = &s->parameters_fragment; + if (!s->from_fragment) + /* The swap unit can either be for an alternative device name, in which + * case we don't need to add the dependency on swap.target because this unit + * is following a different unit which will have this dependency added, + * or it can be derived from /proc/swaps, in which case it was started + * manually, and should not become a dependency of swap.target. */ + return 0; - nofail = p->nofail; - noauto = p->noauto; - } + nofail = s->parameters_fragment.nofail; + noauto = s->parameters_fragment.noauto; if (!noauto) { if (nofail) r = unit_add_dependency_by_name_inverse(UNIT(s), UNIT_WANTS, SPECIAL_SWAP_TARGET, NULL, true); else r = unit_add_two_dependencies_by_name_inverse(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SWAP_TARGET, NULL, true); - if (r < 0) - return r; } - return 0; + return r < 0 ? r : 0; } static int swap_verify(Swap *s) { -- 1.7.9.2 ++++++ 0001-journalctl-do-not-output-reboot-markers-when-running.patch ++++++
From 4bed248505da4da94d82078fe60326a374970e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Fri, 26 Sep 2014 10:49:55 -0400 Subject: [PATCH] journalctl: do not output --reboot-- markers when running non-interactively
They are not legal in the export format. --- src/journal/journalctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/journal/journalctl.c src/journal/journalctl.c index 47206d3..89a922c 100644 --- src/journal/journalctl.c +++ src/journal/journalctl.c @@ -1939,7 +1939,7 @@ int main(int argc, char *argv[]) { goto finish; } - if (!arg_merge) { + if (!arg_merge && !arg_quiet) { sd_id128_t boot_id; r = sd_journal_get_monotonic_usec(j, NULL, &boot_id); -- 1.7.9.2 ++++++ 0001-keymap-Add-support-for-IBM-ThinkPad-X41-Tablet.patch ++++++
From 71ed2d38711e345f22e2200bc7bb156aed98972a Mon Sep 17 00:00:00 2001 From: Bastien Nocera <hadess@hadess.net> Date: Wed, 12 Nov 2014 23:30:46 +0100 Subject: [PATCH] keymap: Add support for IBM ThinkPad X41 Tablet
Scancode taken from: http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons#Linux_Support William Jon McCann provided the DMI match. IBM seems to have swapped the version and model of the system: Manufacturer: IBM Product Name: 18666TU Version: ThinkPad X41 Tablet --- hwdb/60-keyboard.hwdb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index d2ca965..56a4009 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -594,6 +594,13 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X6*:pvr* KEYBOARD_KEY_6f=down # down on d-pad KEYBOARD_KEY_69=enter # enter on d-pad +# ThinkPad X41 Tablet +keyboard:dmi:bvn*:bvr*:bd*:svnIBM*:pn18666TU:pvr* + KEYBOARD_KEY_6c=direction # rotate + KEYBOARD_KEY_68=f13 # toolbox + KEYBOARD_KEY_6b=esc # escape + KEYBOARD_KEY_69=enter # enter on d-pad + # IdeaPad keyboard:name:Ideapad extra buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn* KEYBOARD_KEY_42=f23 -- 1.7.9.2 ++++++ 0001-keymap-Fix-touchpad-toggle-on-Toshiba-Satellite-P75-.patch ++++++
From a046659f8551e1c8f79ba4b66472444e285255df Mon Sep 17 00:00:00 2001 From: Martin Pitt <martin.pitt@ubuntu.com> Date: Tue, 7 Oct 2014 11:20:04 +0200 Subject: [PATCH] keymap: Fix touchpad toggle on Toshiba Satellite P75-A7200
Just like everywhere else we use KEY_F21 instead of KEY_TOUCHPAD_TOGGLE for X friendliness. --- hwdb/60-keyboard.hwdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 8a1baa7..1fea32a 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -1094,7 +1094,7 @@ keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75 KEYBOARD_KEY_13c=brightnessdown KEYBOARD_KEY_13d=brightnessup KEYBOARD_KEY_13e=switchvideomode - KEYBOARD_KEY_13f=touchpad_toggle + KEYBOARD_KEY_13f=f21 # Touchpad toggle KEYBOARD_KEY_9e=wlan ########################################################### -- 1.7.9.2 ++++++ 0001-login-rerun-vconsole-setup-when-switching-from-vgaco.patch ++++++
From f6ba8671d83f9fce9a00045d8fa399a1c07ba7fc Mon Sep 17 00:00:00 2001 From: Ray Strode <rstrode@redhat.com> Date: Wed, 5 Nov 2014 08:30:52 -0500 Subject: [PATCH] login: rerun vconsole-setup when switching from vgacon to fbcon
The initialization performed by systemd-vconsole-setup is reset when changing console drivers (say from vgacon to fbcon), so we need to run it in that case. See http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.htm... This commit adds a udev rule to make systemd-vconsole-setup get run when the fbcon device becomes available. (david: moved into new file 90-vconsole.rules instead of 71-seats.rules; build-failures are on me, not on Ray) --- Makefile.am | 3 +++ src/vconsole/90-vconsole.rules | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/vconsole/90-vconsole.rules diff --git Makefile.am Makefile.am index 3686103..f614b86 100644 --- Makefile.am +++ Makefile.am @@ -4439,6 +4439,9 @@ rootlibexec_PROGRAMS += \ nodist_systemunit_DATA += \ units/systemd-vconsole-setup.service +dist_udevrules_DATA += \ + src/vconsole/90-vconsole.rules + SYSINIT_TARGET_WANTS += \ systemd-vconsole-setup.service endif diff --git src/vconsole/90-vconsole.rules src/vconsole/90-vconsole.rules new file mode 100644 index 0000000..bf6a9ef --- /dev/null +++ src/vconsole/90-vconsole.rules @@ -0,0 +1,11 @@ +# This file is part of systemd. +# +# 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. + +# Kernel resets vconsole state when changing console drivers so run +# systemd-vconsole-setup when fbcon loads + +ACTION=="add", SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="/usr/lib/systemd/systemd-vconsole-setup" -- 1.7.9.2 ++++++ 0001-logind-add-support-for-Triton2-Power-Button.patch ++++++
From 58d4aabedd415a735efeb8c2608ee73618c07f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Mon, 22 Sep 2014 22:14:39 -0400 Subject: [PATCH] logind: add support for Triton2 Power Button
https://bugs.freedesktop.org/show_bug.cgi?id=84201 --- src/login/70-power-switch.rules | 1 + 1 file changed, 1 insertion(+) diff --git src/login/70-power-switch.rules src/login/70-power-switch.rules index 36fb827..a6997f7 100644 --- src/login/70-power-switch.rules +++ src/login/70-power-switch.rules @@ -9,5 +9,6 @@ ACTION=="remove", GOTO="power_switch_end" SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" +SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" LABEL="power_switch_end" -- 1.7.9.2 ++++++ 0001-manager-Linux-on-hppa-has-fewer-rtsigs-hence-avoid-u.patch ++++++ Based on 4dffec1459f50ac9f8f67ccfcb79836b4ed5a50e Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 24 Oct 2014 13:44:45 +0200 Subject: [PATCH] manager: Linux on hppa has fewer rtsigs, hence avoid using the higher ones there https://bugs.freedesktop.org/show_bug.cgi?id=84931 --- src/core/manager.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) --- src/core/manager.c +++ src/core/manager.c 2014-10-29 14:02:28.635837997 +0000 @@ -340,11 +340,14 @@ static int manager_setup_signals(Manager assert(m); - /* We are not interested in SIGSTOP and friends. */ assert_se(sigaction(SIGCHLD, &sa, NULL) == 0); - assert_se(sigemptyset(&mask) == 0); + /* We make liberal use of realtime signals here. On + * Linux/glibc we have 30 of them (with the exception of Linux + * on hppa, see below), between SIGRTMIN+0 ... SIGRTMIN+30 + * (aka SIGRTMAX). */ + assert_se(sigemptyset(&mask) == 0); sigset_add_many(&mask, SIGCHLD, /* Child died */ SIGTERM, /* Reexecute daemon */ @@ -354,6 +357,7 @@ static int manager_setup_signals(Manager SIGINT, /* Kernel sends us this on control-alt-del */ SIGWINCH, /* Kernel sends us this on kbrequest (alt-arrowup) */ SIGPWR, /* Some kernel drivers and upsd send us this on power failure */ + SIGRTMIN+0, /* systemd: start default.target */ SIGRTMIN+1, /* systemd: isolate rescue.target */ SIGRTMIN+2, /* systemd: isolate emergency.target */ @@ -361,19 +365,40 @@ static int manager_setup_signals(Manager SIGRTMIN+4, /* systemd: start poweroff.target */ SIGRTMIN+5, /* systemd: start reboot.target */ SIGRTMIN+6, /* systemd: start kexec.target */ + + /* ... space for more special targets ... */ + SIGRTMIN+13, /* systemd: Immediate halt */ SIGRTMIN+14, /* systemd: Immediate poweroff */ SIGRTMIN+15, /* systemd: Immediate reboot */ SIGRTMIN+16, /* systemd: Immediate kexec */ + + /* ... space for more immediate system state changes ... */ + SIGRTMIN+20, /* systemd: enable status messages */ SIGRTMIN+21, /* systemd: disable status messages */ SIGRTMIN+22, /* systemd: set log level to LOG_DEBUG */ SIGRTMIN+23, /* systemd: set log level to LOG_INFO */ SIGRTMIN+24, /* systemd: Immediate exit (--user only) */ + + /* .. one free signal here ... */ + +#if !defined(__hppa64__) && !defined(__hppa__) + /* Apparently Linux on hppa has fewer RT + * signals (SIGRTMAX is SIGRTMIN+25 there), + * hence let's not try to make use of them + * here. Since these commands are accessible + * by different means and only really a safety + * net, the missing functionality on hppa + * shouldn't matter. */ + SIGRTMIN+26, /* systemd: set log target to journal-or-kmsg */ SIGRTMIN+27, /* systemd: set log target to console */ SIGRTMIN+28, /* systemd: set log target to kmsg */ SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg */ + + /* ... one free signal here SIGRTMIN+30 ... */ +#endif -1); assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); ++++++ 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch ++++++
From ef7b6c0190fefaacf6d8f8e1a6dda4ba8b98091b Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Wed, 29 Oct 2014 17:58:43 +0100 Subject: [PATCH] sd-bus: properly handle removals of non-existing matches
--- src/libsystemd/sd-bus/bus-match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/libsystemd/sd-bus/bus-match.c src/libsystemd/sd-bus/bus-match.c index 18afe0f..5658c61 100644 --- src/libsystemd/sd-bus/bus-match.c +++ src/libsystemd/sd-bus/bus-match.c @@ -537,7 +537,7 @@ static int bus_match_find_compare_value( else if (BUS_MATCH_CAN_HASH(t)) n = hashmap_get(c->compare.children, value_str); else { - for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next) + for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next) ; } -- 1.7.9.2 ++++++ 0001-sd-event-don-t-require-a-signal-event-source-to-be-e.patch ++++++
From 92daebc0d0268c35f416c1665e0da3d4be5dd69f Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 11 Jul 2014 16:48:35 +0200 Subject: [PATCH] sd-event: don't require a signal event source to be enabled for the child event source to work
--- src/libsystemd/sd-event/sd-event.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git src/libsystemd/sd-event/sd-event.c src/libsystemd/sd-event/sd-event.c index a21f7db..9a9664c 100644 --- src/libsystemd/sd-event/sd-event.c +++ src/libsystemd/sd-event/sd-event.c @@ -1919,14 +1919,13 @@ static int process_signal(sd_event *e, uint32_t events) { int r; assert(e); - assert(e->signal_sources); assert_return(events == EPOLLIN, -EIO); for (;;) { struct signalfd_siginfo si; ssize_t ss; - sd_event_source *s; + sd_event_source *s = NULL; ss = read(e->signal_fd, &si, sizeof(si)); if (ss < 0) { @@ -1941,16 +1940,19 @@ static int process_signal(sd_event *e, uint32_t events) { read_one = true; - s = e->signal_sources[si.ssi_signo]; if (si.ssi_signo == SIGCHLD) { r = process_child(e); if (r < 0) return r; - if (r > 0 || !s) + if (r > 0) continue; - } else - if (!s) - return -EIO; + } + + if (e->signal_sources) + s = e->signal_sources[si.ssi_signo]; + + if (!s) + continue; s->signal.siginfo = si; r = source_set_pending(s, true); -- 1.7.9.2 ++++++ 0001-shell-completion-fix-completion-of-inactive-units.patch ++++++ Based on f29c77bc0179b0fa57407dbe30b495be9f5ad2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Tue, 14 Oct 2014 20:20:07 -0400 Subject: [PATCH] shell-completion: fix completion of inactive units Units which not loaded were not proposed properly. OTOH, we should filter units from get-unit-files by their state if they are currently loaded. Bring zsh completions in line with bash completion, the same logic should be used in both implementations. https://bugzilla.redhat.com/show_bug.cgi?id=1024379 https://bugzilla.redhat.com/show_bug.cgi?id=790768 https://bugs.freedesktop.org/show_bug.cgi?id=84720 --- shell-completion/bash/systemctl | 17 +++++++++-------- shell-completion/zsh/_systemctl | 16 +++++++++------- 2 files changed, 18 insertions(+), 15 deletions(-) --- shell-completion/bash/systemctl +++ shell-completion/bash/systemctl @@ -55,10 +55,14 @@ __get_all_units () { { __systemctl $1 list-unit-files; __systemctl $1 list- | { while read -r a b; do echo " $a"; done; }; } __get_active_units () { __systemctl $1 list-units \ | { while read -r a b; do echo " $a"; done; }; } -__get_startable_units () { { - __systemctl $1 list-units --all -t service,timer,socket,mount,automount,path,snapshot,swap - __systemctl $1 list-unit-files -t service,timer,socket,mount,automount,path,snapshot,swap; } \ - | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed" ]] && echo " $a"; done; }; } +__get_startable_units () { + # find inactive or failed units, filter out masked and not-found + __systemctl $1 list-units --state inactive,failed -- $( __get_all_units ) | \ + { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; } +__get_restartable_units () { + # find !masked, filter out masked and not-found + __systemctl $1 list-units --state active,inactive,failed -- $( __get_all_units ) | \ + { while read -r a b c d; do [[ $b == "loaded" ]] && echo " $a"; done; }; } __get_failed_units () { __systemctl $1 list-units \ | { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; } __get_enabled_units () { __systemctl $1 list-unit-files \ @@ -180,10 +184,7 @@ _systemctl () { elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then comps=$( __filter_units_by_property $mode CanStart yes \ - $( __get_all_units $mode \ - | while read -r line; do \ - [[ "$line" =~ @\.|\.(device|snapshot|socket|timer)$ ]] || echo " $line"; \ - done )) + $( __get_restartable_units $mode)) compopt -o filenames elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then --- shell-completion/zsh/_systemctl +++ shell-completion/zsh/_systemctl @@ -138,8 +138,11 @@ _filter_units_by_property() { done } +_systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do echo -E - " $a"; done; } } + _systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )} -_systemctl_inactive_units(){_sys_inactive_units=($(__systemctl list-units --all | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed" ]] && echo -E - " $a"; done; }) )} +_systemctl_startable_units(){_sys_startable_units=($(__systemctl list-units --state inactive,failed -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )} +_systemctl_restartable_units(){_sys_restartable_units=($(__systemctl list-units --state inactive,failed,active -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )} _systemctl_failed_units() {_sys_failed_units=( $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )} _systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "enabled" ]] && echo -E - " $a"; done; }) )} _systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )} @@ -181,8 +184,9 @@ done # Completion functions for STARTABLE_UNITS (( $+functions[_systemctl_start] )) || _systemctl_start() { - _systemctl_inactive_units - compadd "$@" -a - _sys_inactive_units + _systemctl_startable_units + compadd "$@" - $( _filter_units_by_property CanStart yes \ + ${_sys_startable_units[*]} ) } # Completion functions for STOPPABLE_UNITS @@ -217,11 +221,9 @@ done for fun in restart reload-or-restart ; do (( $+functions[_systemctl_$fun] )) || _systemctl_$fun() { - _systemctl_all_units + _systemctl_restartable_units compadd "$@" - $( _filter_units_by_property CanStart yes \ - ${_sys_all_units[*]} | while read -r line; do \ - [[ "$line" =~ \.device$ ]] || echo -E - " $line"; \ - done ) + ${_sys_restartable_units[*]} ) } done -- 1.7.9.2 ++++++ 0001-shutdownd-clean-up-initialization-of-struct.patch ++++++
From b748c7596f79945be5263a0d1c88de64eb0c5146 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com> Date: Sat, 27 Sep 2014 00:25:09 +0200 Subject: [PATCH] shutdownd: clean up initialization of struct
No functional change. We just don't assign the value twice. Found by coverity. Fixes: CID#1237616 and #1237617 --- src/shutdownd/shutdownd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git src/shutdownd/shutdownd.c src/shutdownd/shutdownd.c index 99aa4b3..0f008a6 100644 --- src/shutdownd/shutdownd.c +++ src/shutdownd/shutdownd.c @@ -52,8 +52,8 @@ static int read_packet(int fd, union shutdown_buffer *_b) { union shutdown_buffer b; /* We maintain our own copy here, in * order not to corrupt the last message */ struct iovec iovec = { - iovec.iov_base = &b, - iovec.iov_len = sizeof(b) - 1, + .iov_base = &b, + .iov_len = sizeof(b) - 1, }; union { struct cmsghdr cmsghdr; -- 1.7.9.2 ++++++ 0001-strv-add-an-additional-overflow-check-when-enlarging.patch ++++++ Based on 97569e154b80541cbad39d78231b7f360d4ff058 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Tue, 21 Oct 2014 14:01:28 +0200 Subject: [PATCH] strv: add an additional overflow check when enlarging strv()s https://bugs.freedesktop.org/show_bug.cgi?id=76745 --- src/shared/strv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- src/shared/strv.c +++ src/shared/strv.c 2014-10-23 00:00:00.000000000 +0000 @@ -361,13 +361,19 @@ char *strv_join_quoted(char **l) { int strv_push(char ***l, char *value) { char **c; - unsigned n; + unsigned n, m; if (!value) return 0; n = strv_length(*l); - c = realloc(*l, sizeof(char*) * (n + 2)); + + /* increase and check for overflow */ + m = n + 2; + if (m < n) + return -ENOMEM; + + c = realloc(*l, sizeof(char*) * (size_t) m); if (!c) return -ENOMEM; ++++++ 0001-systemctl-let-list-units-unit-files-honour-type.patch ++++++ Based on 6c71341aeecc3d092ed90f66e1b2c481b8e260ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Wed, 29 Oct 2014 22:46:30 -0400 Subject: [PATCH] systemctl: let list-{units,unit-files } honour --type The docs don't clarify what is expected, but I don't see any reason why --type should be ignored. Also restucture the compund conditions into separate clauses for easier reading. --- src/systemctl/systemctl.c | 48 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c 2014-11-18 00:00:00.000000000 +0000 @@ -305,21 +305,37 @@ static int compare_unit_info(const void } static bool output_show_unit(const UnitInfo *u, char **patterns) { - const char *dot; - if (!strv_isempty(patterns)) { char **pattern; STRV_FOREACH(pattern, patterns) if (fnmatch(*pattern, u->id, FNM_NOESCAPE) == 0) - return true; + goto next; return false; } - return (!arg_types || ((dot = strrchr(u->id, '.')) && - strv_find(arg_types, dot+1))) && - (arg_all || !(streq(u->active_state, "inactive") - || u->following[0]) || u->job_id > 0); +next: + if (arg_types) { + const char *dot; + + dot = strrchr(u->id, '.'); + if (!dot) + return false; + + if (!strv_find(arg_types, dot+1)) + return false; + } + + if (arg_all) + return true; + + if (u->job_id > 0) + return true; + + if (streq(u->active_state, "inactive") || u->following[0]) + return false; + + return true; } static void output_units_list(const UnitInfo *unit_infos, unsigned c) { @@ -1019,18 +1035,28 @@ static int compare_unit_file_list(const } static bool output_show_unit_file(const UnitFileList *u, char **patterns) { - const char *dot; - if (!strv_isempty(patterns)) { char **pattern; STRV_FOREACH(pattern, patterns) if (fnmatch(*pattern, basename(u->path), FNM_NOESCAPE) == 0) - return true; + goto next; return false; } - return !arg_types || ((dot = strrchr(u->path, '.')) && strv_find(arg_types, dot+1)); +next: + if (!strv_isempty(arg_types)) { + const char *dot; + + dot = strrchr(u->path, '.'); + if (!dot) + return false; + + if (!strv_find(arg_types, dot+1)) + return false; + } + + return true; } static void output_unit_file_list(const UnitFileList *units, unsigned c) { ++++++ 0001-systemctl-when-mangle-unit-names-for-the-isolate-suf.patch ++++++
From 08073121d8171f8e6be27b0c80e2ec283064760e Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Mon, 13 Oct 2014 15:43:09 +0200 Subject: [PATCH] systemctl: when mangle unit names for the "isolate", suffix with ".target" rather than ".service" by default
After all, we set AllowIsolate exclusively for target units so far, and this is more or less the only thing tht makes sense, hence also use ".target" as completion suffix by default. --- src/systemctl/systemctl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c index 842ca6c..af3cc97 100644 --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c @@ -2704,7 +2704,7 @@ static enum action verb_to_action(const char *verb) { static int start_unit(sd_bus *bus, char **args) { _cleanup_set_free_free_ Set *s = NULL; _cleanup_strv_free_ char **names = NULL; - const char *method, *mode, *one_name; + const char *method, *mode, *one_name, *suffix = NULL; char **name; int r = 0; @@ -2717,8 +2717,11 @@ static int start_unit(sd_bus *bus, char **args) { method = verb_to_method(args[0]); action = verb_to_action(args[0]); - mode = streq(args[0], "isolate") ? "isolate" : - action_table[action].mode ?: arg_job_mode; + if (streq(args[0], "isolate")) { + mode = "isolate"; + suffix = ".target"; + } else + mode = action_table[action].mode ?: arg_job_mode; one_name = action_table[action].target; } else { @@ -2734,7 +2737,7 @@ static int start_unit(sd_bus *bus, char **args) { if (one_name) names = strv_new(one_name, NULL); else { - r = expand_names(bus, args + 1, NULL, &names); + r = expand_names(bus, args + 1, suffix, &names); if (r < 0) log_error("Failed to expand names: %s", strerror(-r)); } -- 1.7.9.2 ++++++ 0001-systemd-continue-switch-root-even-if-umount-fails.patch ++++++ Based on d677d4df80e0ea1c66c691f50867fedd63c6770a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Thu, 16 Oct 2014 19:12:55 -0500 Subject: [PATCH] systemd: continue switch-root even if umount fails Leaving the old root around seems better than aborting the switch. --- src/core/main.c | 2 +- src/core/switch-root.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) --- src/core/main.c +++ src/core/main.c 2014-10-20 13:35:35.915837828 +0000 @@ -1848,7 +1848,7 @@ finish: /* And switch root */ r = switch_root(switch_root_dir); if (r < 0) - log_error("Failed to switch root, ignoring: %s", strerror(-r)); + log_error("Failed to switch root, trying to continue: %s", strerror(-r)); } args_size = MAX(6, argc+1); --- src/core/switch-root.c +++ src/core/switch-root.c 2014-10-20 13:39:58.167121460 +0000 @@ -68,10 +68,9 @@ int switch_root(const char *new_root) { goto fail; } - /* Work-around for a kernel bug: for some reason the kernel - * refuses switching root if any file systems are mounted - * MS_SHARED. Hence remount them MS_PRIVATE here as a - * work-around. + /* Work-around for kernel design: the kernel refuses switching + * root if any file systems are mounted MS_SHARED. Hence + * remount them MS_PRIVATE here as a work-around. * * https://bugzilla.redhat.com/show_bug.cgi?id=847418 */ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0) @@ -124,8 +123,8 @@ int switch_root(const char *new_root) { * running off it we need to do this lazily. */ if (umount2("/mnt", MNT_DETACH) < 0) { r = -errno; - log_error("Failed to umount old root dir /mnt: %m"); - goto fail; + log_error("Failed to lazily umount old root dir /mnt, %s: %m", + errno == ENOENT ? "ignoring" : "leaving it around"); } } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) { ++++++ 0001-tmpfiles-compare-return-against-correct-errno.patch ++++++
From e7aab5412829ed6b50d109f670bd0b1b365838a7 Mon Sep 17 00:00:00 2001 From: Dave Reisner <dreisner@archlinux.org> Date: Sat, 11 Oct 2014 20:35:06 -0400 Subject: [PATCH] tmpfiles: compare return against correct errno
name_to_handle_at returns -EOPNOTSUPP, not -ENOTSUP. --- src/tmpfiles/tmpfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/tmpfiles/tmpfiles.c src/tmpfiles/tmpfiles.c index dafb9ae..8108b43 100644 --- src/tmpfiles/tmpfiles.c +++ src/tmpfiles/tmpfiles.c @@ -259,7 +259,7 @@ static int dir_is_mount_point(DIR *d, const char *subdir) { /* got only one handle; assume different mount points if one * of both queries was not supported by the filesystem */ - if (r_p == -ENOSYS || r_p == -ENOTSUP || r == -ENOSYS || r == -ENOTSUP) + if (r_p == -ENOSYS || r_p == -EOPNOTSUPP || r == -ENOSYS || r == -EOPNOTSUPP) return true; /* return error */ -- 1.7.9.2 ++++++ 0001-units-introduce-network-pre.target-as-place-to-hook-.patch ++++++
From a4a878d04045b46fa9783664e3643a890b356790 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Wed, 11 Jun 2014 11:33:02 +0200 Subject: [PATCH] units: introduce network-pre.target as place to hook in firewalls
network-pre.target is a passive target that should be pulled in by services that want to be executed before any network is configured (for example: firewall scrips). network-pre.target should be ordered before all network managemet services (but not be pulled in by them). network-pre.target should be order after all services that want to be executed before any network is configured (and be pulled in by them). --- Makefile.am | 1 + man/systemd.special.xml | 15 +++++++++++++++ units/local-fs.target | 2 -- units/network-pre.target | 12 ++++++++++++ units/network.target | 2 ++ units/systemd-networkd.service.in | 2 +- 6 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 units/network-pre.target diff --git Makefile.am Makefile.am index 3ea95e9..8514ec9 100644 --- Makefile.am +++ Makefile.am @@ -413,6 +413,7 @@ dist_systemunit_DATA = \ units/remote-fs.target \ units/remote-fs-pre.target \ units/network.target \ + units/network-pre.target \ units/network-online.target \ units/nss-lookup.target \ units/nss-user-lookup.target \ diff --git man/systemd.special.xml man/systemd.special.xml index 38b94a7..cda6edd 100644 --- man/systemd.special.xml +++ man/systemd.special.xml @@ -72,6 +72,7 @@ <filename>multi-user.target</filename>, <filename>network.target</filename>, <filename>network-online.target</filename>, + <filename>network-pre.target</filename>, <filename>nss-lookup.target</filename>, <filename>nss-user-lookup.target</filename>, <filename>paths.target</filename>, @@ -891,6 +892,20 @@ </listitem> </varlistentry> <varlistentry> + <term><filename>network-pre.target</filename></term> + <listitem> + <para>This passive target unit + may be pulled in by services + that want to run before any + network is set up, for example + for the purpose of setting up a + firewall. All network + management software orders + itself after this target, but + does not pull it in.</para> + </listitem> + </varlistentry> + <varlistentry> <term><filename>nss-lookup.target</filename></term> <listitem> <para>A target that should be diff --git units/local-fs.target units/local-fs.target index ae3cedc..70cb13f 100644 --- units/local-fs.target +++ units/local-fs.target @@ -9,7 +9,5 @@ Description=Local File Systems Documentation=man:systemd.special(7) After=local-fs-pre.target -DefaultDependencies=no -Conflicts=shutdown.target OnFailure=emergency.target OnFailureJobMode=replace-irreversibly diff --git units/network-pre.target units/network-pre.target new file mode 100644 index 0000000..0ea4bc7 --- /dev/null +++ units/network-pre.target @@ -0,0 +1,12 @@ +# This file is part of systemd. +# +# 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. + +[Unit] +Description=Network (Pre) +Documentation=man:systemd.special(7) +Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget +RefuseManualStart=yes diff --git units/network.target units/network.target index 65fc64b..61ebdca 100644 --- units/network.target +++ units/network.target @@ -9,3 +9,5 @@ Description=Network Documentation=man:systemd.special(7) Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget +After=network-pre.target +RefuseManualStart=yes diff --git units/systemd-networkd.service.in units/systemd-networkd.service.in index 373ac4e..48f4d63 100644 --- units/systemd-networkd.service.in +++ units/systemd-networkd.service.in @@ -9,7 +9,7 @@ Description=Network Service Documentation=man:systemd-networkd.service(8) DefaultDependencies=no -After=dbus.service +After=dbus.service network-pre.target Before=network.target Wants=network.target ConditionCapability=CAP_NET_ADMIN -- 1.7.9.2 ++++++ 0001-virt-detect-that-we-are-running-inside-the-docker-co.patch ++++++
From 893e72da6b27c21b102e1589276e651e9e4f591c Mon Sep 17 00:00:00 2001 From: Michal Sekletar <msekleta@redhat.com> Date: Tue, 9 Sep 2014 18:14:25 +0200 Subject: [PATCH] virt: detect that we are running inside the docker container
--- src/shared/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git src/shared/virt.c src/shared/virt.c index b436895..f9c4e67 100644 --- src/shared/virt.c +++ src/shared/virt.c @@ -310,6 +310,8 @@ int detect_container(const char **id) { _id = "lxc-libvirt"; else if (streq(e, "systemd-nspawn")) _id = "systemd-nspawn"; + else if (streq(e, "docker")) + _id = "docker"; else _id = "other"; -- 1.7.9.2 ++++++ 0002-bootchart-use-n-a-if-PRETTY_NAME-is-not-found.patch ++++++
From 1c92ff85b786c423f4436ec26007e79369c9ac05 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com> Date: Fri, 26 Sep 2014 22:01:32 +0200 Subject: [PATCH] bootchart: use 'n/a' if PRETTY_NAME is not found
Spotted with coverity. If parsing both /etc/os-release and /usr/lib/os-release fails then null would be passed on. The calls to parse the two files are allowed to fail. A empty /etc may not have had the /etc/os-release symlink restored yet and we just try again in the loop. If for whatever reason that does not happen then we now pass on 'n/a' instead of null. --- src/bootchart/bootchart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/bootchart/bootchart.c src/bootchart/bootchart.c index 366a5ab..813e38d 100644 --- src/bootchart/bootchart.c +++ src/bootchart/bootchart.c @@ -471,7 +471,7 @@ int main(int argc, char *argv[]) { exit (EXIT_FAILURE); } - svg_do(build); + svg_do(strna(build)); fprintf(stderr, "systemd-bootchart wrote %s\n", output_file); -- 1.7.9.2 ++++++ 0002-core-watchdog-bus-properties-cannot-be-both-writable.patch ++++++ Based on 4c3f1641f13b7687a0dc234d3ae387b7c40494ff Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Wed, 19 Nov 2014 20:52:23 +0100 Subject: [PATCH] core: watchdog bus properties cannot be both writable and constant --- src/core/dbus-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- src/core/dbus-manager.c +++ src/core/dbus-manager.c 2014-11-20 13:43:06.781518488 +0000 @@ -1599,8 +1599,8 @@ const sd_bus_vtable bus_manager_vtable[] SD_BUS_PROPERTY("UnitPath", "as", NULL, offsetof(Manager, lookup_paths.unit_path), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("DefaultStandardOutput", "s", bus_property_get_exec_output, offsetof(Manager, default_std_output), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("DefaultStandardError", "s", bus_property_get_exec_output, offsetof(Manager, default_std_output), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_WRITABLE_PROPERTY("RuntimeWatchdogUSec", "t", bus_property_get_usec, property_set_runtime_watchdog, offsetof(Manager, runtime_watchdog), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_WRITABLE_PROPERTY("ShutdownWatchdogUSec", "t", bus_property_get_usec, bus_property_set_usec, offsetof(Manager, shutdown_watchdog), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_WRITABLE_PROPERTY("RuntimeWatchdogUSec", "t", bus_property_get_usec, property_set_runtime_watchdog, offsetof(Manager, runtime_watchdog), 0), + SD_BUS_WRITABLE_PROPERTY("ShutdownWatchdogUSec", "t", bus_property_get_usec, bus_property_set_usec, offsetof(Manager, shutdown_watchdog), 0), SD_BUS_PROPERTY("ControlGroup", "s", NULL, offsetof(Manager, cgroup_root), 0), SD_BUS_METHOD("GetUnit", "s", "o", method_get_unit, SD_BUS_VTABLE_UNPRIVILEGED), ++++++ 0002-hwdb-Add-mapping-for-special-keys-on-compaq-ku-0133-.patch ++++++
From fc1ae82cae69d8dbbd9e7a31938810a486fac782 Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@redhat.com> Date: Wed, 22 Oct 2014 14:09:21 +0200 Subject: [PATCH] hwdb: Add mapping for special keys on compaq ku 0133 keyboards
The compaq ku 0133 keyboard has 8 special keys at the top: http://lackof.org/taggart/hacking/keyboard/cpqwireless.jpg 3 of these use standard HID usage codes from the consumer page, the 5 others use part of the reserved 0x07 - 0x1f range. This commit adds mapping for this keyboard for these reserved codes, making the other 5 keys work. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- hwdb/60-keyboard.hwdb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 59f467b..06caba9 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -181,6 +181,13 @@ keyboard:dmi:bvn*:bvr*:bd*:svnCompaq*:pn*Evo*N*:pvr* KEYBOARD_KEY_9e=email KEYBOARD_KEY_9f=homepage +keyboard:usb:v049Fp0051d*dc*dsc*dp*ic*isc*ip*in01* + KEYBOARD_KEY_0c0011=presentation + KEYBOARD_KEY_0c0012=addressbook + KEYBOARD_KEY_0c0013=info + KEYBOARD_KEY_0c0014=prog1 + KEYBOARD_KEY_0c0015=messenger + ########################################################### # Dell ########################################################### -- 1.7.9.2 ++++++ 0002-keymap-Fix-special-keys-on-ThinkPad-X60-X61-Tablet.patch ++++++
From b4c72e52d2109fe7f0ac3440c81ae3e1ce64a143 Mon Sep 17 00:00:00 2001 From: Bastien Nocera <hadess@hadess.net> Date: Wed, 12 Nov 2014 23:31:08 +0100 Subject: [PATCH] keymap: Fix special keys on ThinkPad X60/X61 Tablet
KEY_DIRECTION is mapped to XF86RotateWindows, to rotate the display: http://cgit.freedesktop.org/xkeyboard-config/commit/symbols/inet?id=ec875f6f... And F13 is mapped to XF86Tools, which is closest to the original toolbox usage: http://cgit.freedesktop.org/xkeyboard-config/tree/symbols/inet?id=7a2c4bed21... --- hwdb/60-keyboard.hwdb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 56a4009..533ad5b 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -585,8 +585,8 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet* # ThinkPad X6 Tablet keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X6*:pvr* - KEYBOARD_KEY_6c=f21 # rotate - KEYBOARD_KEY_68=screenlock # screenlock + KEYBOARD_KEY_6c=direction # rotate + KEYBOARD_KEY_68=f13 # toolbox KEYBOARD_KEY_6b=esc # escape KEYBOARD_KEY_6d=right # right on d-pad KEYBOARD_KEY_6e=left # left on d-pad -- 1.7.9.2 ++++++ 0002-keymap-Fix-touchpad-toggle-key-on-Asus-laptops.patch ++++++
From 4e3deeedc15b03197d591850061316289245c9a9 Mon Sep 17 00:00:00 2001 From: Martin Pitt <martin.pitt@ubuntu.com> Date: Tue, 7 Oct 2014 11:22:31 +0200 Subject: [PATCH] keymap: Fix touchpad toggle key on Asus laptops
https://launchpad.net/bugs/1377352 --- hwdb/60-keyboard.hwdb | 1 + 1 file changed, 1 insertion(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 1fea32a..59f467b 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -153,6 +153,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnASUS:pn* keyboard:name:Asus WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr* keyboard:name:Eee PC WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr* +keyboard:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr* KEYBOARD_KEY_6b=f21 # Touchpad Toggle ########################################################### -- 1.7.9.2 ++++++ 0002-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch ++++++
From aba248ee6b1eb10baf3d89eca2ad7569459af6ab Mon Sep 17 00:00:00 2001 From: Hans de Goede <hdegoede@redhat.com> Date: Thu, 30 Oct 2014 10:15:54 +0100 Subject: [PATCH] keymap: Ignore brightness keys on Dell Inspiron 1520 to avoid double events
On the Dell Inspiron 1520 both the atkbd and acpi-video input devices report an event for pressing the brightness up / down key-combos, resulting in user space seeing double events and increasing / decreasing the brightness 2 steps for each keypress. This hwdb snippet suppresses the atkbd events, making the Inspiron 1520 work like most modern laptops which emit brightness up / down events through acpi-video only. Reported by Pavel Malyshev <p.malishev@gmail.com> https://bugzilla.redhat.com/show_bug.cgi?id=1141525 --- hwdb/60-keyboard.hwdb | 5 +++++ 1 file changed, 5 insertions(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 06caba9..d2ca965 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -230,6 +230,11 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1110:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1210:pvr* KEYBOARD_KEY_84=wlan +# Dell Inspiron 1520 +keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1520:pvr* + KEYBOARD_KEY_85=unknown # Brightness Down, also emitted by acpi-video, ignore + KEYBOARD_KEY_86=unknown # Brightness Up, also emitted by acpi-video, ignore + # Latitude XT2 keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:pvr* KEYBOARD_KEY_9b=up # tablet rocker up -- 1.7.9.2 ++++++ 0002-logind-add-support-for-TPS65217-Power-Button.patch ++++++
From 492d7a3038b154e1813a1ece913a5a27148fec19 Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Sat, 27 Sep 2014 09:55:44 +0200 Subject: [PATCH] logind: add support for TPS65217 Power Button
This PMIC is found on TI AM335x based boards like the beaglebone and beaglebone black. root@beaglebone-white:~# udevadm info -a /dev/input/event0 Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0/event0': KERNEL=="event0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0': KERNELS=="input0" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="tps65217_pwr_but" ATTRS{phys}=="" ATTRS{uniq}=="" ATTRS{properties}=="0" looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024': KERNELS=="0-0024" SUBSYSTEMS=="i2c" DRIVERS=="tps65217" ATTRS{name}=="tps65217" looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0': KERNELS=="i2c-0" SUBSYSTEMS=="i2c" DRIVERS=="" ATTRS{name}=="OMAP I2C adapter" looking at parent device '/devices/ocp.3/44e0b000.i2c': KERNELS=="44e0b000.i2c" SUBSYSTEMS=="platform" DRIVERS=="omap_i2c" looking at parent device '/devices/ocp.3': KERNELS=="ocp.3" SUBSYSTEMS=="platform" DRIVERS=="" --- src/login/70-power-switch.rules | 1 + 1 file changed, 1 insertion(+) diff --git src/login/70-power-switch.rules src/login/70-power-switch.rules index a6997f7..695d246 100644 --- src/login/70-power-switch.rules +++ src/login/70-power-switch.rules @@ -10,5 +10,6 @@ ACTION=="remove", GOTO="power_switch_end" SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" +SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch" LABEL="power_switch_end" -- 1.7.9.2 ++++++ 0002-shell-completion-propose-templates-for-disable-re-en.patch ++++++ Based on e9a19bd882ff8a2c8aef5c63b39525ea231e5fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Tue, 14 Oct 2014 21:10:02 -0400 Subject: [PATCH] shell-completion: propose templates for disable/[re]enable/[re]start Templates can be [re]enabled, on their own if the have DefaultInstance set, and with an instance suffix in all cases. Propose just the template name ending in @, to underline the instance suffix may have to be appended. Likewise for start/restart. This means that sometimes superflous units that one will not really want to operate on will be proposed, but this seems better than proposing a very incomplete set of names. https://bugs.freedesktop.org/show_bug.cgi?id=66912 --- shell-completion/bash/systemctl | 15 +++++++++++---- shell-completion/zsh/_systemctl | 20 +++++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) --- shell-completion/bash/systemctl +++ shell-completion/bash/systemctl @@ -53,6 +53,9 @@ __filter_units_by_property () { __get_all_units () { { __systemctl $1 list-unit-files; __systemctl $1 list-units --all; } \ | { while read -r a b; do echo " $a"; done; }; } +__get_template_names () { __systemctl $1 list-unit-files \ + | { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; } + __get_active_units () { __systemctl $1 list-units \ | { while read -r a b; do echo " $a"; done; }; } __get_startable_units () { @@ -169,22 +172,26 @@ _systemctl () { compopt -o filenames elif __contains_word "$verb" ${VERBS[DISABLED_UNITS]}; then - comps=$( __get_disabled_units $mode ) + comps=$( __get_disabled_units $mode; + __get_template_names $mode) compopt -o filenames elif __contains_word "$verb" ${VERBS[REENABLABLE_UNITS]}; then comps=$( __get_disabled_units $mode; - __get_enabled_units $mode ) + __get_enabled_units $mode; + __get_template_names $mode) compopt -o filenames elif __contains_word "$verb" ${VERBS[STARTABLE_UNITS]}; then comps=$( __filter_units_by_property $mode CanStart yes \ - $( __get_startable_units $mode)) + $( __get_startable_units $mode); + __get_template_names $mode) compopt -o filenames elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then comps=$( __filter_units_by_property $mode CanStart yes \ - $( __get_restartable_units $mode)) + $( __get_restartable_units $mode); \ + __get_template_names $mode) compopt -o filenames elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then --- shell-completion/zsh/_systemctl +++ shell-completion/zsh/_systemctl @@ -139,6 +139,8 @@ _filter_units_by_property() { } _systemctl_all_units() { { __systemctl list-unit-files; __systemctl list-units --all; } | { while read -r a b; do echo -E - " $a"; done; } } +_systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } } + _systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )} _systemctl_startable_units(){_sys_startable_units=($(__systemctl list-units --state inactive,failed -- $(_systemctl_all_units) | { while read -r a b c d; do [[ $b == "loaded" ]] && echo -E - " $a"; done; }) )} @@ -158,20 +160,24 @@ for fun in is-active is-failed is-enabled status show cat mask preset help list- done # Completion functions for ENABLED_UNITS -for fun in disable reenable ; do - (( $+functions[_systemctl_$fun] )) || _systemctl_$fun() - { +(( $+functions[_systemctl_disable] )) || _systemctl_disable() +{ + _systemctl_enabled_units + compadd "$@" -a - _sys_enabled_units +} + +(( $+functions[_systemctl_reenable] )) || _systemctl_reenable() +{ _systemctl_enabled_units _systemctl_disabled_units - compadd "$@" -a - _sys_enabled_units _sys_disabled_units - } -done + compadd "$@" -a - _sys_enabled_units _sys_disabled_units $(_systemctl_get_template_names) +} # Completion functions for DISABLED_UNITS (( $+functions[_systemctl_enable] )) || _systemctl_enable() { _systemctl_disabled_units - compadd "$@" -a - _sys_disabled_units + compadd "$@" -a - _sys_disabled_units $(_systemctl_get_template_names) } # Completion functions for FAILED_UNITS -- 1.7.9.2 ++++++ 0002-shutdown-fix-arguments-to-run-initramfs-shutdown.patch ++++++ Based on 4b5d8d0f22ae61ceb45a25391354ba53b43ee992 Mon Sep 17 00:00:00 2001 From: Michal Schmidt <mschmidt@redhat.com> Date: Thu, 6 Nov 2014 22:24:13 +0100 Subject: [PATCH] shutdown: fix arguments to /run/initramfs/shutdown Our initrd interface specifies that the verb is in argv[1]. This is where systemd passes it to systemd-shutdown, but getopt permutes argv[]. This confuses dracut's shutdown script: Shutdown called with argument '--log-level'. Rebooting! getopt can be convinced to not permute argv[] by having '-' as the first character of optstring. Let's use it. This requires changing the way non-option arguments (in our case, the verb) are processed. This fixes a bug where the system would reboot instead of powering off. --- src/core/shutdown.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) --- src/core/shutdown.c +++ src/core/shutdown.c 2014-11-10 14:14:20.869519112 +0000 @@ -75,9 +75,9 @@ static int parse_argv(int argc, char *ar assert(argc >= 1); assert(argv); - opterr = 0; - - while ((c = getopt_long(argc, argv, ":", options, NULL)) >= 0) + /* "-" prevents getopt from permuting argv[] and moving the verb away + * from argv[1]. Our interface to initrd promises it'll be there. */ + while ((c = getopt_long(argc, argv, "-", options, NULL)) >= 0) switch (c) { case ARG_LOG_LEVEL: @@ -115,27 +115,25 @@ static int parse_argv(int argc, char *ar break; - case '?': - log_error("Unknown option %s.", argv[optind-1]); - return -EINVAL; + case '\001': + if (!arg_verb) + arg_verb = optarg; + else + log_error("Excess arguments, ignoring"); + break; - case ':': - log_error("Missing argument to %s.", argv[optind-1]); + case '?': return -EINVAL; default: assert_not_reached("Unhandled option code."); } - if (optind >= argc) { + if (!arg_verb) { log_error("Verb argument missing."); return -EINVAL; } - arg_verb = argv[optind]; - - if (optind + 1 < argc) - log_error("Excess arguments, ignoring"); return 0; } ++++++ 0002-shutdown-pass-own-argv-to-run-initramfs-shutdown.patch ++++++ Based on a2726e5cedfa5edeabd7e0784be11bc578555ac5 Mon Sep 17 00:00:00 2001 From: Marius Tessmann <mus.svz@gmail.com> Date: Fri, 29 Aug 2014 17:51:45 +0200 Subject: [PATCH] shutdown: pass own argv to /run/initramfs/shutdown Since commit b1e90ec515408aec2702522f6f68c4920b56375b systemd passes its log settings to systemd-shutdown via command line parameters. However, systemd-shutdown doesn't pass these parameters to /run/initramfs/shutdown, causing it to fall back to the default log settings. This fixes the following bugs about the shutdown not being quiet despite "quiet" being in the kernel parameters: https://bugs.freedesktop.org/show_bug.cgi?id=79582 https://bugs.freedesktop.org/show_bug.cgi?id=57216 --- src/core/shutdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- src/core/shutdown.c +++ src/core/shutdown.c 2014-10-24 12:32:44.704337960 +0000 @@ -377,11 +377,11 @@ int main(int argc, char *argv[]) { if (prepare_new_root() >= 0 && pivot_to_new_root() >= 0) { - arguments[0] = (char*) "/shutdown"; + argv[0] = (char*) "/shutdown"; log_info("Returning to initrd..."); - execv("/shutdown", arguments); + execv("/shutdown", argv); log_error("Failed to execute shutdown binary: %m"); } } ++++++ 0002-snapshot-return-error-when-snapshot-exists.patch ++++++
From 7cabba07745b388497e8c0fc19b61984167fd474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Tue, 28 Oct 2014 12:36:17 -0400 Subject: [PATCH] snapshot: return error when snapshot exists
--- src/core/snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/snapshot.c src/core/snapshot.c index 5eed615..c2678cb 100644 --- src/core/snapshot.c +++ src/core/snapshot.c @@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e, return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name); if (manager_get_unit(m, name)) - sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name); + return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name); } else { -- 1.7.9.2 ++++++ 0002-systemctl-obey-state-in-list-unit-files.patch ++++++
From fec1530e6b5b8d6dc352c7338010357126e84621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Wed, 29 Oct 2014 22:51:00 -0400 Subject: [PATCH] systemctl: obey --state in list-unit-files
--- src/systemctl/systemctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c index b71040b..8481a9b 100644 --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c @@ -1268,6 +1268,11 @@ next: return false; } + if (!strv_isempty(arg_states)) { + if (!strv_find(arg_states, unit_file_state_to_string(u->state))) + return false; + } + return true; } -- 1.7.9.2 ++++++ 0002-systemd-try-harder-to-bind-to-notify-socket.patch ++++++ Based on e7bc519620cb7bcdbe2166fc2a446453769d827e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Thu, 16 Oct 2014 19:15:38 -0500 Subject: [PATCH] systemd: try harder to bind to notify socket Without the socket open we are going to crash and burn. If for whatever reason we fail during deserialization we will fail when trying to open the socket. In this case it is better to unlink the old socket and maybe lose some messages, than to continue without the notification socket. Of course this situation should not happen, but we should handle it as gracefully as possible anyway. https://bugzilla.redhat.com/show_bug.cgi?id=1099299 --- src/core/manager.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) --- src/core/manager.c +++ src/core/manager.c 2014-10-20 13:47:21.035837897 +0000 @@ -572,7 +572,21 @@ static int manager_setup_notify(Manager r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)); if (r < 0) { log_error("bind(@%s) failed: %m", sa.un.sun_path+1); - return -errno; + if (errno == EADDRINUSE) { + log_notice("Removing %s socket and trying again.", m->notify_socket); + r = unlink(m->notify_socket); + if (r < 0) { + log_error("Failed to remove %s: %m", m->notify_socket); + return -EADDRINUSE; + } + + r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)); + if (r < 0) { + log_error("bind(@%s) failed: %m", sa.un.sun_path+1); + return -errno; + } + } else + return -errno; } r = setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)); ++++++ 0002-time-also-support-infinity-syntax-in-parse_nsec.patch ++++++ Based on e73c78c27511b03c7abc55aed87896092c0de699 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 24 Oct 2014 19:07:26 +0200 Subject: [PATCH] time: also support 'infinity' syntax in parse_nsec() Let's make parse_usec() and parse_nsec() work similar --- src/shared/time-util.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- src/shared/time-util.c +++ src/shared/time-util.c @@ -773,7 +773,7 @@ int parse_nsec(const char *t, nsec_t *nsec) { { "", 1ULL }, /* default is nsec */ }; - const char *p; + const char *p, *s; nsec_t r = 0; bool something = false; @@ -781,6 +781,18 @@ int parse_nsec(const char *t, nsec_t *nsec) { assert(nsec); p = t; + + p += strspn(p, WHITESPACE); + s = startswith(p, "infinity"); + if (s) { + s += strspn(s, WHITESPACE); + if (!*s != 0) + return -EINVAL; + + *nsec = ((nsec_t) -1); + return 0; + } + for (;;) { long long l, z = 0; char *e; ++++++ 0002-udev-hwdb-New-Entry-for-Dell-XPS12-9Q33-keyboard.patch ++++++
From 24119cf10c7ed58a8fc0851745149dcc6dd5757f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de> Date: Mon, 29 Sep 2014 22:32:10 -0400 Subject: [PATCH] udev/hwdb: New Entry for Dell XPS12 9Q33 keyboard
https://bugs.freedesktop.org/show_bug.cgi?id=84437 --- hwdb/60-keyboard.hwdb | 5 +++++ 1 file changed, 5 insertions(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 0ffcb83..8a1baa7 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -243,6 +243,11 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS*:pvr* KEYBOARD_KEY_8c=!unknown +# Dell XPS12 9Q33 +keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS12-9Q33*:pvr* + KEYBOARD_KEY_88=wlan + KEYBOARD_KEY_65=switchvideomode # Screen Rotate + # Dell Latitude microphone mute keyboard:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude* KEYBOARD_KEY_150=f20 # Mic mute toggle, should be micmute -- 1.7.9.2 ++++++ 0003-bootchart-parse-userinput-with-safe_atoi.patch ++++++
From 9bcf7507fab6e6b022ae3cc7178237e6e0a09e9a Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com> Date: Fri, 26 Sep 2014 21:41:02 +0200 Subject: [PATCH] bootchart: parse userinput with safe_atoi
Found by coverity. Fixes: CID#996409 --- src/bootchart/store.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git src/bootchart/store.c src/bootchart/store.c index ed683e8..3099ff1 100644 --- src/bootchart/store.c +++ src/bootchart/store.c @@ -192,12 +192,14 @@ vmstat_next: m = buf; while (m) { + int r; + if (sscanf(m, "%s %*s %*s %*s %*s %*s %*s %s %s", key, rt, wt) < 3) goto schedstat_next; if (strstr(key, "cpu")) { - c = atoi((const char*)(key+3)); - if (c > MAXCPUS) + r = safe_atoi((const char*)(key+3), &c); + if (r < 0 || c > MAXCPUS) /* Oops, we only have room for MAXCPUS data */ break; sampledata->runtime[c] = atoll(rt); -- 1.7.9.2 ++++++ 0003-fileio-label-return-error-when-writing-fails.patch ++++++ Based on 754fc0c720eb998b8e47e695c12807ced0ff3602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Fri, 3 Oct 2014 08:58:40 -0400 Subject: [PATCH] fileio-label: return error when writing fails The status of actually writing the file was totally ignored. --- src/shared/fileio-label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- src/shared/fileio-label.c +++ src/shared/fileio-label.c 2014-10-14 14:52:50.883837740 +0000 @@ -33,7 +33,7 @@ int write_string_file_atomic_label(const if (r < 0) return r; - write_string_file_atomic(fn, line); + r = write_string_file_atomic(fn, line); label_context_clear(); @@ -47,7 +47,7 @@ int write_env_file_label(const char *fna if (r < 0) return r; - write_env_file(fname, l); + r = write_env_file(fname, l); label_context_clear(); ++++++ 0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch ++++++
From f2a474aea8f82fa9b695515d4590f4f3398358a7 Mon Sep 17 00:00:00 2001 From: Juho Son <juho80.son@samsung.com> Date: Thu, 11 Sep 2014 16:06:38 +0900 Subject: [PATCH] journald: add CAP_MAC_OVERRIDE in journald for SMACK issue
systemd-journald check the cgroup id to support rate limit option for every messages. so journald should be available to access cgroup node in each process send messages to journald. In system using SMACK, cgroup node in proc is assigned execute label as each process's execute label. so if journald don't want to denied for every process, journald should have all of access rule for all process's label. It's too heavy. so we could give special smack label for journald te get all accesses's permission. '^' label. When assign '^' execute smack label to systemd-journald, systemd-journald need to add CAP_MAC_OVERRIDE capability to get that smack privilege. so I want to notice this information and set default capability to journald whether system use SMACK or not. because that capability affect to only smack enabled kernel --- units/systemd-journald.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git units/systemd-journald.service.in units/systemd-journald.service.in index 7013979..4de38fa 100644 --- units/systemd-journald.service.in +++ units/systemd-journald.service.in @@ -20,7 +20,7 @@ Restart=always RestartSec=0 NotifyAccess=all StandardOutput=null -CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID +CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE WatchdogSec=1min # Increase the default a bit in order to allow many simultaneous -- 1.7.9.2 ++++++ 0003-man-we-don-t-have-Wanted-dependency.patch ++++++
From 3e883473a0f36c220fc45ecf61d6878c9ac308b4 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn <lnykryn@redhat.com> Date: Wed, 15 Oct 2014 09:28:31 +0200 Subject: [PATCH] man: we don't have 'Wanted' dependency
--- man/systemd.unit.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git man/systemd.unit.xml man/systemd.unit.xml index e9395ff..88c9d7f 100644 --- man/systemd.unit.xml +++ man/systemd.unit.xml @@ -181,10 +181,10 @@ <filename>foo.service.wants/</filename> may exist. All unit files symlinked from such a directory are implicitly added as dependencies of type - <varname>Wanted=</varname> to the unit. This is useful + <varname>Wants=</varname> to the unit. This is useful to hook units into the start-up of other units, without having to modify their unit files. For details - about the semantics of <varname>Wanted=</varname>, see + about the semantics of <varname>Wants=</varname>, see below. The preferred way to create symlinks in the <filename>.wants/</filename> directory of a unit file is with the <command>enable</command> command of the -- 1.7.9.2 ++++++ 0003-sd-bus-check-return-value-of-vasprintf.patch ++++++
From 8bf13eb1e02b9977ae1cd331ae5dc7305a305a09 Mon Sep 17 00:00:00 2001 From: Daniel Mack <daniel@zonque.org> Date: Tue, 7 Oct 2014 12:10:06 +0200 Subject: [PATCH] sd-bus: check return value of vasprintf
Check for OOM situations when vasprintf() returns < 0 in bus_error_setfv(). Spotted by coverity. --- src/libsystemd/sd-bus/bus-error.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git src/libsystemd/sd-bus/bus-error.c src/libsystemd/sd-bus/bus-error.c index abdfd73..5ca974a 100644 --- src/libsystemd/sd-bus/bus-error.c +++ src/libsystemd/sd-bus/bus-error.c @@ -194,8 +194,13 @@ int bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_li return -ENOMEM; } - if (format) - vasprintf((char**) &e->message, format, ap); + if (format) { + int r; + + r = vasprintf((char**) &e->message, format, ap); + if (r < 0) + return -ENOMEM; + } e->_need_free = 1; -- 1.7.9.2 ++++++ 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch ++++++
From 9b772efb41c2d9f743ba5e96804bdf89b12630d8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Wed, 19 Nov 2014 20:52:47 +0100 Subject: [PATCH] sd-bus: refuse properties that claim to be both writable and constant at the same time
--- src/libsystemd/sd-bus/bus-objects.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/libsystemd/sd-bus/bus-objects.c src/libsystemd/sd-bus/bus-objects.c index 0ab1119..7981d65 100644 --- src/libsystemd/sd-bus/bus-objects.c +++ src/libsystemd/sd-bus/bus-objects.c @@ -1682,6 +1682,11 @@ static int add_object_vtable_internal( goto fail; } + if (v->flags & SD_BUS_VTABLE_PROPERTY_CONST) { + r = -EINVAL; + goto fail; + } + /* Fall through */ case _SD_BUS_VTABLE_PROPERTY: { -- 1.7.9.2 ++++++ 0003-shared-install-avoid-prematurely-rejecting-missing-u.patch ++++++
From 0ffce503cd6e5a5ff5ba5cd1cc23684cfb8bb9e3 Mon Sep 17 00:00:00 2001 From: Dave Reisner <dreisner@archlinux.org> Date: Thu, 30 Oct 2014 20:12:05 -0400 Subject: [PATCH] shared/install: avoid prematurely rejecting "missing" units
f7101b7368df copied some logic to prevent enabling masked units, but also added a check which causes attempts to enable templated units to fail. Since we know the logic beyond this check will properly handle units which truly do not exist, we can rely on the unit file state comparison to suffice for expressing the intent of f7101b7368df. ref: https://bugs.archlinux.org/task/42616 --- src/shared/install.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git src/shared/install.c src/shared/install.c index 035b44c..cab93e8 100644 --- src/shared/install.c +++ src/shared/install.c @@ -1620,12 +1620,10 @@ int unit_file_enable( STRV_FOREACH(i, files) { UnitFileState state; + /* We only want to know if this unit is masked, so we ignore + * errors from unit_file_get_state, deferring other checks. + * This allows templated units to be enabled on the fly. */ state = unit_file_get_state(scope, root_dir, *i); - if (state < 0) { - log_error("Failed to get unit file state for %s: %s", *i, strerror(-state)); - return state; - } - if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) { log_error("Failed to enable unit: Unit %s is masked", *i); return -ENOTSUP; -- 1.7.9.2 ++++++ 0003-time-earlier-exit-from-format_timestamp_relative-on-.patch ++++++ Based on 65de0395ffe1cfb0f9af86504e8588fb31bb0fbc Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 24 Oct 2014 19:08:22 +0200 Subject: [PATCH] time: earlier exit from format_timestamp_relative() on special times --- src/shared/time-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- src/shared/time-util.c +++ src/shared/time-util.c 2014-10-29 14:07:28.479838096 +0000 @@ -194,11 +194,10 @@ char *format_timestamp_relative(char *bu const char *s; usec_t n, d; - n = now(CLOCK_REALTIME); - if (t <= 0 || (t == (usec_t) -1)) return NULL; + n = now(CLOCK_REALTIME); if (n > t) { d = n - t; s = "ago"; ++++++ 0003-utf8-when-looking-at-the-next-unichar-honour-the-siz.patch ++++++ Based on 144b3d9e093dd9310cd9590bec039dc43a7e2ad6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 7 Nov 2014 16:34:00 +0100 Subject: [PATCH] utf8: when looking at the next unichar, honour the size parameter, in utf8_is_printable_newline() --- src/shared/utf8.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- src/shared/utf8.c +++ src/shared/utf8.c 2014-11-10 14:20:28.094539264 +0000 @@ -143,9 +143,14 @@ bool utf8_is_printable_newline(const cha for (p = (const uint8_t*) str; length;) { int encoded_len = utf8_encoded_valid_unichar((const char *)p); - int val = utf8_encoded_to_unichar((const char*)p); + int val; - if (encoded_len < 0 || val < 0 || is_unicode_control(val) || + if (encoded_len < 0 || + (size_t) encoded_len > length) + return false; + + val = utf8_encoded_to_unichar((const char*)p); + if (val < 0 || is_unicode_control(val) || (!newline && val == '\n')) return false; ++++++ 0004-Raise-level-of-Found-dependency.-lines.patch ++++++
From 14fe721b5f6d8457cc8737fa75f2ed79e7fa534b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sun, 2 Nov 2014 12:10:42 -0500 Subject: [PATCH] Raise level of 'Found dependency...' lines
This way they always show up together with 'Found ordering cycle...'. Ordering cycles are a serious error and a major pain to debug. If quiet is enabled, only the first and the last line of output are shown: systemd[1]: Found ordering cycle on basic.target/start systemd[1]: Breaking ordering cycle by deleting job timers.target/start systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start which isn't particularly enlightening. So just show the whole message at the same level. https://bugzilla.redhat.com/show_bug.cgi?id=1158206 --- src/core/transaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git src/core/transaction.c src/core/transaction.c index 488cb86..bbaa6da 100644 --- src/core/transaction.c +++ src/core/transaction.c @@ -376,9 +376,9 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) { /* logging for j not k here here to provide consistent narrative */ - log_info_unit(j->unit->id, - "Found dependency on %s/%s", - k->unit->id, job_type_to_string(k->type)); + log_warning_unit(j->unit->id, + "Found dependency on %s/%s", + k->unit->id, job_type_to_string(k->type)); if (!delete && hashmap_get(tr->jobs, k->unit) && !unit_matters_to_anchor(k->unit, k)) { -- 1.7.9.2 ++++++ 0004-bootchart-check-return-of-strftime.patch ++++++
From e931d3f4241231e4102eda06adaf7cbfd68c6a5d Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com> Date: Sat, 27 Sep 2014 22:25:07 +0200 Subject: [PATCH] bootchart: check return of strftime
Found by coverity. Fixes: CID#996314 and #996312 --- src/bootchart/bootchart.c | 8 ++++++-- src/bootchart/svg.c | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git src/bootchart/bootchart.c src/bootchart/bootchart.c index 8ef5ad1..366a5ab 100644 --- src/bootchart/bootchart.c +++ src/bootchart/bootchart.c @@ -389,7 +389,9 @@ int main(int argc, char *argv[]) { if (!of && (access(arg_output_path, R_OK|W_OK|X_OK) == 0)) { t = time(NULL); - strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t)); + r = strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t)); + assert_se(r > 0); + snprintf(output_file, PATH_MAX, "%s/bootchart-%s.svg", arg_output_path, datestr); of = fopen(output_file, "we"); } @@ -457,7 +459,9 @@ int main(int argc, char *argv[]) { if (!of) { t = time(NULL); - strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t)); + r = strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t)); + assert_se(r > 0); + snprintf(output_file, PATH_MAX, "%s/bootchart-%s.svg", arg_output_path, datestr); of = fopen(output_file, "we"); } diff --git src/bootchart/svg.c src/bootchart/svg.c index 135883f..faf377e 100644 --- src/bootchart/svg.c +++ src/bootchart/svg.c @@ -162,7 +162,7 @@ static void svg_title(const char *build) { char *c; FILE *f; time_t t; - int fd; + int fd, r; struct utsname uts; /* grab /proc/cmdline */ @@ -196,7 +196,8 @@ static void svg_title(const char *build) { /* date */ t = time(NULL); - strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", localtime(&t)); + r = strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", localtime(&t)); + assert_se(r > 0); /* CPU type */ fd = openat(procfd, "cpuinfo", O_RDONLY); -- 1.7.9.2 ++++++ 0004-core-map-the-rescue-argument-to-rescue.target.patch ++++++
From 5329ab10ffaf5b4a3fd6ebd9380b1ec09d05cfc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <grawity@gmail.com> Date: Tue, 7 Oct 2014 14:55:21 +0300 Subject: [PATCH] core: map the 'rescue' argument to rescue.target
Even though the 'emergency' and 'single' aliases come from sysvinit, the lack of 'rescue' is still quite confusing (caught me by surprise for the 9th time yet) and inconsistent with `systemctl rescue` as well. --- src/core/main.c | 1 + 1 file changed, 1 insertion(+) diff --git src/core/main.c src/core/main.c index 1a62e04..44373cc 100644 --- src/core/main.c +++ src/core/main.c @@ -272,6 +272,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { static const char * const rlmap[] = { "emergency", SPECIAL_EMERGENCY_TARGET, "-b", SPECIAL_EMERGENCY_TARGET, + "rescue", SPECIAL_RESCUE_TARGET, "single", SPECIAL_RESCUE_TARGET, "-s", SPECIAL_RESCUE_TARGET, "s", SPECIAL_RESCUE_TARGET, -- 1.7.9.2 ++++++ 0004-journal-do-server_vacuum-for-sigusr1.patch ++++++
From 3bfd4e0c6341b0ef946d2198f089743fa99e0a97 Mon Sep 17 00:00:00 2001 From: WaLyong Cho <walyong.cho@samsung.com> Date: Thu, 28 Aug 2014 21:33:03 +0900 Subject: [PATCH] journal: do server_vacuum for sigusr1
runtime journal is migrated to system journal when only "/run/systemd/journal/flushed" exist. It's ok but according to this the system journal directory size(max use) can be over the config. If journal is not rotated during some time the journal directory can be remained as over the config(or default) size. To avoid, do server_vacuum just after the system journal migration from runtime. --- src/journal/journald-server.c | 1 + 1 file changed, 1 insertion(+) diff --git src/journal/journald-server.c src/journal/journald-server.c index 52111f7..bf9cfcc 100644 --- src/journal/journald-server.c +++ src/journal/journald-server.c @@ -1224,6 +1224,7 @@ static int dispatch_sigusr1(sd_event_source *es, const struct signalfd_siginfo * touch("/run/systemd/journal/flushed"); server_flush_to_var(s); server_sync(s); + server_vacuum(s); return 0; } -- 1.7.9.2 ++++++ 0004-sd-bus-if-we-don-t-manage-to-properly-allocate-the-e.patch ++++++
From 455cd8b137b8ef45d04889f2d967c562a097f1e6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 24 Oct 2014 19:24:53 +0200 Subject: [PATCH] sd-bus: if we don't manage to properly allocate the error message for an sd_bus_error, just go on
sd_bus_error_setfv() must initialize the sd_bus_error value to some sensible value and then return a good errno code matching that. If it cannot work at all it should set the error statically to the OOM error. But if it can work half-way (i.e. initialize the name, but not the message) it should do so and still return the correct errno number for it. This effectively reverts 8bf13eb1e02b9977ae1cd331ae5dc7305a305a09 --- src/libsystemd/sd-bus/bus-error.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git src/libsystemd/sd-bus/bus-error.c src/libsystemd/sd-bus/bus-error.c index 5ca974a..af83c12 100644 --- src/libsystemd/sd-bus/bus-error.c +++ src/libsystemd/sd-bus/bus-error.c @@ -194,13 +194,10 @@ int bus_error_setfv(sd_bus_error *e, const char *name, const char *format, va_li return -ENOMEM; } - if (format) { - int r; - - r = vasprintf((char**) &e->message, format, ap); - if (r < 0) - return -ENOMEM; - } + /* Of we hit OOM on formatting the pretty message, we ignore + * this, since we at least managed to write the error name */ + if (format) + (void) vasprintf((char**) &e->message, format, ap); e->_need_free = 1; -- 1.7.9.2 ++++++ 0004-sd-event-check-the-value-of-received-signal.patch ++++++
From 7057bd993110c1eff0cd3a8776902ca66417634e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Fri, 3 Oct 2014 18:49:45 -0400 Subject: [PATCH] sd-event: check the value of received signal
Appease coverity report #1237775. Also rename ss to n, to make it visually different from ss. --- src/libsystemd/sd-event/sd-event.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git src/libsystemd/sd-event/sd-event.c src/libsystemd/sd-event/sd-event.c index b56182d..4c67ee8 100644 --- src/libsystemd/sd-event/sd-event.c +++ src/libsystemd/sd-event/sd-event.c @@ -1973,20 +1973,22 @@ static int process_signal(sd_event *e, uint32_t events) { for (;;) { struct signalfd_siginfo si; - ssize_t ss; + ssize_t n; sd_event_source *s = NULL; - ss = read(e->signal_fd, &si, sizeof(si)); - if (ss < 0) { + n = read(e->signal_fd, &si, sizeof(si)); + if (n < 0) { if (errno == EAGAIN || errno == EINTR) return read_one; return -errno; } - if (_unlikely_(ss != sizeof(si))) + if (_unlikely_(n != sizeof(si))) return -EIO; + assert(si.ssi_signo < _NSIG); + read_one = true; if (si.ssi_signo == SIGCHLD) { -- 1.7.9.2 ++++++ 0004-selinux-fix-potential-double-free-crash-in-child-pro.patch ++++++
From 5e78424f4a27c07be50e246308035c877f204038 Mon Sep 17 00:00:00 2001 From: Michal Sekletar <msekleta@redhat.com> Date: Mon, 13 Oct 2014 15:25:09 +0200 Subject: [PATCH] selinux: fix potential double free crash in child process
Before returning from function we should reset ret to NULL, thus cleanup function is nop. Also context_str() returns pointer to a string containing context but not a copy, hence we must make copy it explicitly. --- src/shared/label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/shared/label.c src/shared/label.c index b6af38d..69d4616 100644 --- src/shared/label.c +++ src/shared/label.c @@ -334,7 +334,7 @@ int label_get_child_mls_label(int socket_fd, const char *exe, char **label) { } freecon(mycon); - mycon = context_str(bcon); + mycon = strdup(context_str(bcon)); if (!mycon) { r = -errno; goto out; @@ -348,6 +348,7 @@ int label_get_child_mls_label(int socket_fd, const char *exe, char **label) { } *label = ret; + ret = NULL; r = 0; out: -- 1.7.9.2 ++++++ 0005-bootchart-Do-not-try-to-access-data-for-non-existing.patch ++++++
From c119700c06b248b1c2a082b40b1a346f58d89da0 Mon Sep 17 00:00:00 2001 From: Philippe De Swert <philippe.deswert@jollamobile.com> Date: Sun, 28 Sep 2014 18:12:51 +0300 Subject: [PATCH] bootchart: Do not try to access data for non-existing CPU's
Cpu's are assigned normally, so starting at 0, so the MAX_CPU index will always be one smaller than the actual number. Found with Coverity. --- src/bootchart/store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/bootchart/store.c src/bootchart/store.c index 3099ff1..9ea1b27 100644 --- src/bootchart/store.c +++ src/bootchart/store.c @@ -199,7 +199,7 @@ vmstat_next: if (strstr(key, "cpu")) { r = safe_atoi((const char*)(key+3), &c); - if (r < 0 || c > MAXCPUS) + if (r < 0 || c > MAXCPUS -1) /* Oops, we only have room for MAXCPUS data */ break; sampledata->runtime[c] = atoll(rt); -- 1.7.9.2 ++++++ 0005-cryptsetup-fix-an-OOM-check.patch ++++++
From 0e2f14014c65b4d8b30146e414579154cfa932da Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Thu, 23 Oct 2014 00:30:04 +0200 Subject: [PATCH] cryptsetup: fix an OOM check
--- src/cryptsetup/cryptsetup-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/cryptsetup/cryptsetup-generator.c src/cryptsetup/cryptsetup-generator.c index 137b787..c7f30f6 100644 --- src/cryptsetup/cryptsetup-generator.c +++ src/cryptsetup/cryptsetup-generator.c @@ -387,7 +387,7 @@ int main(int argc, char *argv[]) { if (k == 2 && streq(proc_uuid, device + 5)) { free(options); options = strdup(p); - if (!proc_options) { + if (!options) { log_oom(); goto cleanup; } -- 1.7.9.2 ++++++ 0005-journalctl-correct-help-text-for-until.patch ++++++ Based on 7558251eef610e71595a0aa48952479906cb899a Mon Sep 17 00:00:00 2001 From: Santiago Vila <sanvila@unex.es> Date: Sat, 25 Oct 2014 10:40:30 -0400 Subject: [PATCH] journalctl: correct help text for --until http://bugs.debian.org/766598 --- src/journal/journalctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- src/journal/journalctl.c +++ src/journal/journalctl.c 2014-10-29 14:10:18.863838313 +0000 @@ -171,7 +171,7 @@ static int help(void) { " --user Show only the user journal for the current user\n" " -M --machine=CONTAINER Operate on local container\n" " --since=DATE Start showing entries on or newer than the specified date\n" - " --until=DATE Stop showing entries on or older than the specified date\n" + " --until=DATE Stop showing entries on or newer than the specified date\n" " -c --cursor=CURSOR Start showing entries from the specified cursor\n" " --after-cursor=CURSOR Start showing entries from after the specified cursor\n" " --show-cursor Print the cursor after all the entries\n" ++++++ 0005-sd-id128-do-stricter-checking-of-random-boot-id.patch ++++++
From cef3566998fcae6936d781e678c309950a8a5787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Fri, 3 Oct 2014 20:57:30 -0400 Subject: [PATCH] sd-id128: do stricter checking of random boot id
If we are bothering to check whether the kernel is not feeding us bad data, we might as well do it properly. CID #1237692. --- src/libsystemd/sd-id128/sd-id128.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git src/libsystemd/sd-id128/sd-id128.c src/libsystemd/sd-id128/sd-id128.c index a1e44e6..233ffa0 100644 --- src/libsystemd/sd-id128/sd-id128.c +++ src/libsystemd/sd-id128/sd-id128.c @@ -183,11 +183,14 @@ _public_ int sd_id128_get_boot(sd_id128_t *ret) { for (j = 0, p = buf; j < 16; j++) { int a, b; - if (p >= buf + k) + if (p >= buf + k - 1) return -EIO; - if (*p == '-') + if (*p == '-') { p++; + if (p >= buf + k - 1) + return -EIO; + } a = unhexchar(p[0]); b = unhexchar(p[1]); -- 1.7.9.2 ++++++ 0005-units-order-sd-journal-flush-after-sd-remount-fs.patch ++++++ Based on 1f1926aa5e836caa3bd6df43704aecd606135103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sun, 2 Nov 2014 21:45:42 -0500 Subject: [PATCH] units: order sd-journal-flush after sd-remount-fs Otherwise we could attempt to flush the journal while /var/log/ was still ro, and silently skip journal flushing. The way that errors in flushing are handled should still be changed to be more transparent and robust. Based on 919699ec301ea507edce4a619141ed22e789ac0d Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Fri, 31 Oct 2014 16:22:36 +0100 Subject: [PATCH] units: don't order journal flushing afte remote-fs.target Instead, only depend on the actual file systems we need. This should solve dep loops on setups where remote-fs.target is moved into late boot. --- units/systemd-journal-flush.service.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- units/systemd-journal-flush.service.in +++ units/systemd-journal-flush.service.in 2014-11-10 11:46:22.885518923 +0000 @@ -10,8 +10,9 @@ Description=Trigger Flushing of Journal Documentation=man:systemd-journald.service(8) man:journald.conf(5) DefaultDependencies=no Requires=systemd-journald.service -After=systemd-journald.service local-fs.target remote-fs.target -Before=systemd-user-sessions.service +After=systemd-journald.service local-fs.target +After=systemd-remount-fs.service +Before=systemd-user-sessions.service systemd-tmpfiles-setup.service [Service] ExecStart=@rootbindir@/systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service ++++++ 0005-util-avoid-double-close-of-fd.patch ++++++ Based on 6f53e671aa7539cab02c9f739d84d28a343ca5bc Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com> Date: Wed, 8 Oct 2014 23:57:32 +0200 Subject: [PATCH] util: avoid double close of fd We could end with a double close if we close the fd loop and flush_fd fails. That would make us goto fail and there we close the fd once again. This patch sets the fd to the return value for safe_close: -1 A fd with negative value will be ignored by the next call to safe_close. CID#996223 --- src/shared/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- src/shared/util.c +++ src/shared/util.c 2014-10-14 15:42:22.515839157 +0000 @@ -1969,7 +1969,8 @@ int acquire_terminal( * ended our handle will be dead. It's important that * we do this after sleeping, so that we don't enter * an endless loop. */ - close_nointr_nofail(fd); + if (fd >= 0) close_nointr_nofail(fd); + fd = -1; } if (notify >= 0) ++++++ 0006-calendarspec-fix-typo-in-annually.patch ++++++
From e90efc70900f8e69cfbafd9e9508bdeb4d40dad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sat, 25 Oct 2014 11:59:36 -0400 Subject: [PATCH] calendarspec: fix typo in "annually"
https://bugs.freedesktop.org/show_bug.cgi?id=85447 --- src/shared/calendarspec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/shared/calendarspec.c src/shared/calendarspec.c index 4ac74ab..64d0dec 100644 --- src/shared/calendarspec.c +++ src/shared/calendarspec.c @@ -688,7 +688,8 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) { if (r < 0) goto fail; - } else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) { + } else if (strcaseeq(p, "annually") || strcaseeq(p, "yearly") + || strcaseeq(p, "anually") /* backwards compatibility */ ) { r = const_chain(1, &c->month); if (r < 0) goto fail; -- 1.7.9.2 ++++++ 0006-journald-fix-minor-memory-leak.patch ++++++
From 99d0966e75a984bed4f117c888ecc93e16e7b7b6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Mon, 3 Nov 2014 21:11:16 +0100 Subject: [PATCH] journald: fix minor memory leak
--- src/journal/journald-server.c | 1 + 1 file changed, 1 insertion(+) diff --git src/journal/journald-server.c src/journal/journald-server.c index e062427..cf6bbcc 100644 --- src/journal/journald-server.c +++ src/journal/journald-server.c @@ -1690,6 +1690,7 @@ void server_done(Server *s) { free(s->buffer); free(s->tty_path); free(s->cgroup_root); + free(s->hostname_field); if (s->mmap) mmap_cache_unref(s->mmap); -- 1.7.9.2 ++++++ 0007-journald-also-check-journal-file-size-to-deduce-if-i.patch ++++++
From 332076b45b8a78f018ade2dfdc7e4279a56d49cc Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Mon, 3 Nov 2014 23:10:21 +0100 Subject: [PATCH] journald: also check journal file size to deduce if it is empty
--- src/journal/journal-vacuum.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git src/journal/journal-vacuum.c src/journal/journal-vacuum.c index dbf5d22..d141fe0 100644 --- src/journal/journal-vacuum.c +++ src/journal/journal-vacuum.c @@ -121,22 +121,30 @@ static void patch_realtime( } static int journal_file_empty(int dir_fd, const char *name) { - int r; - le64_t n_entries; _cleanup_close_ int fd; + struct stat st; + le64_t n_entries; + ssize_t n; fd = openat(dir_fd, name, O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK); if (fd < 0) return -errno; - if (lseek(fd, offsetof(Header, n_entries), SEEK_SET) < 0) + if (fstat(fd, &st) < 0) return -errno; - r = read(fd, &n_entries, sizeof(n_entries)); - if (r != sizeof(n_entries)) - return r == 0 ? -EINVAL : -errno; + /* If an offline file doesn't even have a header we consider it empty */ + if (st.st_size < (off_t) sizeof(Header)) + return 1; + + /* If the number of entries is empty, we consider it empty, too */ + n = pread(fd, &n_entries, sizeof(n_entries), offsetof(Header, n_entries)); + if (n < 0) + return -errno; + if (n != sizeof(n_entries)) + return -EIO; - return le64toh(n_entries) == 0; + return le64toh(n_entries) <= 0; } int journal_directory_vacuum( -- 1.7.9.2 ++++++ 0007-systemctl-do-not-ignore-errors-in-symlink-removal.patch ++++++
From e95c98378ac2d34df864de4a9b785fd17defb77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sat, 25 Oct 2014 15:15:28 -0400 Subject: [PATCH] systemctl: do not ignore errors in symlink removal
On an ro fs, systemctl disable ... would fail silently. --- src/shared/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/shared/install.c src/shared/install.c index 0d7c30e..035b44c 100644 --- src/shared/install.c +++ src/shared/install.c @@ -1679,7 +1679,7 @@ int unit_file_disable( r = install_context_mark_for_removal(&c, &paths, &remove_symlinks_to, config_path, root_dir); q = remove_marked_symlinks(remove_symlinks_to, config_path, changes, n_changes, files); - if (r == 0) + if (r >= 0) r = q; return r; -- 1.7.9.2 ++++++ 0008-journald-fix-memory-leak-on-error-path.patch ++++++
From 26d8ff04914a5208d029e899682cd314b7714bf0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Mon, 3 Nov 2014 23:10:34 +0100 Subject: [PATCH] journald: fix memory leak on error path
--- src/journal/journal-vacuum.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git src/journal/journal-vacuum.c src/journal/journal-vacuum.c index d141fe0..80723c4 100644 --- src/journal/journal-vacuum.c +++ src/journal/journal-vacuum.c @@ -283,7 +283,11 @@ int journal_directory_vacuum( patch_realtime(directory, p, &st, &realtime); - GREEDY_REALLOC(list, n_allocated, n_list + 1); + if (!GREEDY_REALLOC(list, n_allocated, n_list + 1)) { + free(p); + r = -ENOMEM; + goto finish; + } list[n_list].filename = p; list[n_list].usage = 512UL * (uint64_t) st.st_blocks; -- 1.7.9.2 ++++++ 0008-util-introduce-sethostname_idempotent.patch ++++++ Based on 605f81a8968b2df8a28cca2cf11db99ab948a2af Mon Sep 17 00:00:00 2001 From: Michal Sekletar <msekleta@redhat.com> Date: Tue, 21 Oct 2014 18:17:54 +0200 Subject: [PATCH] util: introduce sethostname_idempotent Function queries system hostname and applies changes only when necessary. Also, migrate all client of sethostname to sethostname_idempotent while at it. --- src/core/hostname-setup.c | 2 +- src/hostname/hostnamed.c | 2 +- src/nspawn/nspawn.c | 2 +- src/shared/util.c | 20 ++++++++++++++++++++ src/shared/util.h | 2 ++ 5 files changed, 25 insertions(+), 3 deletions(-) --- src/core/hostname-setup.c +++ src/core/hostname-setup.c 2014-10-29 00:00:00.000000000 +0000 @@ -99,7 +99,7 @@ int hostname_setup(void) { hn = "localhost"; } - if (sethostname(hn, strlen(hn)) < 0) { + if (sethostname_idempotent(hn) < 0) { log_warning("Failed to set hostname to <%s>: %m", hn); return -errno; } --- src/hostname/hostnamed.c +++ src/hostname/hostnamed.c 2014-10-29 14:13:26.124337751 +0000 @@ -244,7 +244,7 @@ static int context_write_data_hostname(C else hn = c->data[PROP_HOSTNAME]; - if (sethostname(hn, strlen(hn)) < 0) + if (sethostname_idempotent(hn) < 0) return -errno; return 0; --- src/nspawn/nspawn.c +++ src/nspawn/nspawn.c 2014-10-29 00:00:00.000000000 +0000 @@ -981,7 +981,7 @@ static int setup_hostname(void) { if (arg_share_system) return 0; - if (sethostname(arg_machine, strlen(arg_machine)) < 0) + if (sethostname_idempotent(arg_machine) < 0) return -errno; return 0; --- src/shared/util.c +++ src/shared/util.c 2014-10-29 00:00:00.000000000 +0000 @@ -6451,6 +6451,26 @@ int fd_warn_permissions(const char *path return 0; } +int sethostname_idempotent(const char *s) { + int r; + char buf[HOST_NAME_MAX + 1] = {}; + + assert(s); + + r = gethostname(buf, sizeof(buf)); + if (r < 0) + return -errno; + + if (streq(buf, s)) + return 0; + + r = sethostname(buf, strlen(buf)); + if (r < 0) + return -errno; + + return 1; +} + unsigned long personality_from_string(const char *p) { /* Parse a personality specifier. We introduce our own --- src/shared/util.h +++ src/shared/util.h 2014-10-29 14:14:15.764337717 +0000 @@ -899,3 +899,5 @@ union file_handle_union { }; int umount_recursive(const char *target, int flags); + +int sethostname_idempotent(const char *s); ++++++ 0009-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From 2e3390ea4684b954edce66b7758b5371d3338a9f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann <marcel@holtmann.org> Date: Thu, 2 Oct 2014 07:53:15 +0200 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index 14aee74..ee2efdf 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -1148,3 +1148,21 @@ bluetooth:v017B* bluetooth:v017C* ID_VENDOR_FROM_DATABASE=Daimler AG + +bluetooth:v017D* + ID_VENDOR_FROM_DATABASE=BatAndCat + +bluetooth:v017E* + ID_VENDOR_FROM_DATABASE=BluDotz Ltd + +bluetooth:v017F* + ID_VENDOR_FROM_DATABASE=XTel ApS + +bluetooth:v0180* + ID_VENDOR_FROM_DATABASE=Gigaset Communications GmbH + +bluetooth:v0181* + ID_VENDOR_FROM_DATABASE=Gecko Health Innovations, Inc. + +bluetooth:v0182* + ID_VENDOR_FROM_DATABASE=HOP Ubiquitous -- 1.7.9.2 ++++++ 0009-units-make-systemd-journald.service-Type-notify.patch ++++++ Based on a87a38c20196a4aeb56b6ba71d688eefd0b21c30 Mon Sep 17 00:00:00 2001 From: Michal Schmidt <mschmidt@redhat.com> Date: Tue, 4 Nov 2014 20:28:08 +0100 Subject: [PATCH] units: make systemd-journald.service Type=notify It already calls sd_notify(), so it looks like an oversight. Without it, its ordering to systemd-journal-flush.service is non-deterministic and the SIGUSR1 from flushing may kill journald before it has its signal handlers set up. https://bugs.freedesktop.org/show_bug.cgi?id=85871 https://bugzilla.redhat.com/show_bug.cgi?id=1159641 --- units/systemd-journald.service.in | 1 + 1 file changed, 1 insertion(+) --- units/systemd-journald.service.in +++ units/systemd-journald.service.in 2014-11-10 12:22:08.461949786 +0000 @@ -14,6 +14,7 @@ After=systemd-journald.socket syslog.soc Before=sysinit.target [Service] +Type=notify ExecStart=@rootlibexecdir@/systemd-journald Restart=always RestartSec=0 ++++++ 0009-util-fix-copy-paste-error-and-actually-set-the-new-h.patch ++++++
From a9169c1c589bf7c7a29e7905d17e350ce7c7c48e Mon Sep 17 00:00:00 2001 From: Michal Sekletar <msekleta@redhat.com> Date: Mon, 27 Oct 2014 11:08:26 +0100 Subject: [PATCH] util: fix copy-paste error and actually set the new hostname
Reported-by: sztanpet on irc --- src/shared/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/shared/util.c src/shared/util.c index 7d94a28..4143f6d 100644 --- src/shared/util.c +++ src/shared/util.c @@ -7189,7 +7189,7 @@ int sethostname_idempotent(const char *s) { if (streq(buf, s)) return 0; - r = sethostname(buf, strlen(buf)); + r = sethostname(s, strlen(s)); if (r < 0) return -errno; -- 1.7.9.2 ++++++ 0010-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From 5d20fde4a5c4dff4d7c737b545fbd13582d544c1 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann <marcel@holtmann.org> Date: Fri, 31 Oct 2014 20:37:59 +0100 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index ee2efdf..58ca87d 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -1166,3 +1166,60 @@ bluetooth:v0181* bluetooth:v0182* ID_VENDOR_FROM_DATABASE=HOP Ubiquitous + +bluetooth:v0183* + ID_VENDOR_FROM_DATABASE=To Be Assigned + +bluetooth:v0184* + ID_VENDOR_FROM_DATABASE=Nectar + +bluetooth:v0185* + ID_VENDOR_FROM_DATABASE=bel'apps LLC + +bluetooth:v0186* + ID_VENDOR_FROM_DATABASE=CORE Lighting Ltd + +bluetooth:v0187* + ID_VENDOR_FROM_DATABASE=Seraphim Sense Ltd + +bluetooth:v0188* + ID_VENDOR_FROM_DATABASE=Unico RBC + +bluetooth:v0189* + ID_VENDOR_FROM_DATABASE=Physical Enterprises Inc. + +bluetooth:v018A* + ID_VENDOR_FROM_DATABASE=Able Trend Technology Limited + +bluetooth:v018B* + ID_VENDOR_FROM_DATABASE=Konica Minolta, Inc. + +bluetooth:v018C* + ID_VENDOR_FROM_DATABASE=Wilo SE + +bluetooth:v018D* + ID_VENDOR_FROM_DATABASE=Extron Design Services + +bluetooth:v018E* + ID_VENDOR_FROM_DATABASE=Fitbit, Inc. + +bluetooth:v018F* + ID_VENDOR_FROM_DATABASE=Fireflies Systems + +bluetooth:v0190* + ID_VENDOR_FROM_DATABASE=Intelletto Technologies Inc. + +bluetooth:v0191* + ID_VENDOR_FROM_DATABASE=FDK CORPORATION + +bluetooth:v0192* + ID_VENDOR_FROM_DATABASE=Cloudleaf, Inc + +bluetooth:v0193* + ID_VENDOR_FROM_DATABASE=Maveric Automation LLC + +bluetooth:v0194* + ID_VENDOR_FROM_DATABASE=Acoustic Stream Corporation + +bluetooth:v0195* + ID_VENDOR_FROM_DATABASE=Zuli -- 1.7.9.2 ++++++ 0010-shutdown-do-final-unmounting-only-if-not-running-ins.patch ++++++ Based on d89b5fed9ea5d9ec293585cb85bb27b56ea6ac9c Mon Sep 17 00:00:00 2001 From: Michal Sekletar <msekleta@redhat.com> Date: Tue, 21 Oct 2014 18:38:42 +0200 Subject: [PATCH] shutdown: do final unmounting only if not running inside the container If we run in the container then we run in a mount namespace. If namespace dies then kernel should do unmounting for us, hence we skip unmounting in containers. Also, it may be the case that we no longer have capability to do umount, because we are running in the unprivileged container. See: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023536.html --- src/core/shutdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- src/core/shutdown.c +++ src/core/shutdown.c 2014-10-29 14:18:38.767837898 +0000 @@ -278,6 +278,7 @@ int main(int argc, char *argv[]) { broadcast_signal(SIGKILL, true, false); if (in_container) { + need_umount = false; need_swapoff = false; need_dm_detach = false; need_loop_detach = false; ++++++ 0011-selinux-make-sure-we-do-not-try-to-print-missing-fie.patch ++++++ Based on dec23413ecc90d4a547aa41f02af0482b4513495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Mon, 27 Oct 2014 21:31:29 -0400 Subject: [PATCH] selinux: make sure we do not try to print missing fields UID or GID of 0 is valid, so we cannot use that to distinguish whether calls to sd_bus_creds_get_* succeeded, and the return value from the function is the only way to know about missing fields. Print "n/a" if the fields are missing. CID #1238779 --- src/core/selinux-access.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git src/core/selinux-access.c src/core/selinux-access.c index 08ea6ef..351d48f 100644 --- src/core/selinux-access.c +++ src/core/selinux-access.c @@ -53,7 +53,7 @@ struct audit_info { /* Any time an access gets denied this callback will be called - with the aduit data. We then need to just copy the audit data into the msgbuf. + with the audit data. We then need to just copy the audit data into the msgbuf. */ static int audit_callback( void *auditdata, @@ -64,14 +64,20 @@ static int audit_callback( const struct audit_info *audit = auditdata; uid_t uid = 0, login_uid = 0; gid_t gid = 0; + char login_uid_buf[DECIMAL_STR_MAX(uid_t)] = "n/a"; + char uid_buf[DECIMAL_STR_MAX(uid_t)] = "n/a"; + char gid_buf[DECIMAL_STR_MAX(gid_t)] = "n/a"; - sd_bus_creds_get_audit_login_uid(audit->creds, &login_uid); - sd_bus_creds_get_uid(audit->creds, &uid); - sd_bus_creds_get_gid(audit->creds, &gid); + if (sd_bus_creds_get_audit_login_uid(audit->creds, &login_uid) >= 0) + snprintf(login_uid_buf, sizeof(login_uid_buf), UID_FMT, login_uid); + if (sd_bus_creds_get_uid(audit->creds, &uid) >= 0) + snprintf(uid_buf, sizeof(uid_buf), UID_FMT, uid); + if (sd_bus_creds_get_gid(audit->creds, &gid) >= 0) + snprintf(gid_buf, sizeof(gid_buf), "%lu", (unsigned long)gid); snprintf(msgbuf, msgbufsize, - "auid=%d uid=%d gid=%d%s%s%s%s%s%s", - login_uid, uid, gid, + "auid=%s uid=%s gid=%s%s%s%s%s%s%s", + login_uid_buf, uid_buf, gid_buf, audit->path ? " path=\"" : "", strempty(audit->path), audit->path ? "\"" : "", audit->cmdline ? " cmdline=\"" : "", strempty(audit->cmdline), audit->cmdline ? "\"" : ""); -- 1.7.9.2 ++++++ 0012-manager-do-not-print-anything-while-passwords-are-be.patch ++++++ Based on e46b13c8c7f48f81d4e09912f2265daaa7f6d27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sat, 25 Oct 2014 20:30:51 -0400 Subject: [PATCH] manager: do not print anything while passwords are being queried https://bugs.freedesktop.org/show_bug.cgi?id=73942 --- src/core/manager.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++- src/core/manager.h | 5 ++ 2 files changed, 109 insertions(+), 1 deletion(-) --- src/core/manager.c +++ src/core/manager.c 2014-10-29 14:31:18.984212089 +0000 @@ -25,6 +25,8 @@ #include <signal.h> #include <sys/wait.h> #include <unistd.h> +#include <sys/inotify.h> +#include <sys/epoll.h> #include <sys/poll.h> #include <sys/reboot.h> #include <sys/ioctl.h> @@ -212,6 +214,96 @@ static void manager_print_jobs_in_progre } +static int have_ask_password(void) { + _cleanup_closedir_ DIR *dir; + + dir = opendir("/run/systemd/ask-password"); + if (!dir) { + if (errno == ENOENT) + return false; + else + return -errno; + } + + for (;;) { + struct dirent *de; + + errno = 0; + de = readdir(dir); + if (!de && errno != 0) + return -errno; + if (!de) + return false; + + if (startswith(de->d_name, "ask.")) + return true; + } +} + +static int manager_dispatch_ask_password_fd(sd_event_source *source, + int fd, uint32_t revents, void *userdata) { + Manager *m = userdata; + + assert(m); + + flush_fd(fd); + + m->have_ask_password = have_ask_password(); + if (m->have_ask_password < 0) + /* Log error but continue. Negative have_ask_password + * is treated as unknown status. */ + log_error("Failed to list /run/systemd/ask-password: %s", strerror(m->have_ask_password)); + + return 0; +} + +static void manager_close_ask_password(Manager *m) { + assert(m); + if (m->ask_password_inotify_fd >= 0) close_nointr_nofail(m->ask_password_inotify_fd); + m->ask_password_inotify_fd = -1; + m->ask_password_event_source = sd_event_source_unref(m->ask_password_event_source); + m->have_ask_password = -EINVAL; +} + +static int manager_check_ask_password(Manager *m) { + int r; + + assert(m); + + if (!m->ask_password_event_source) { + assert(m->ask_password_inotify_fd < 0); + + mkdir_p_label("/run/systemd/ask-password", 0755); + + m->ask_password_inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); + if (m->ask_password_inotify_fd < 0) { + log_error("inotify_init1() failed: %m"); + return -errno; + } + + if (inotify_add_watch(m->ask_password_inotify_fd, "/run/systemd/ask-password", IN_CREATE|IN_DELETE|IN_MOVE) < 0) { + log_error("Failed to add watch on /run/systemd/ask-password: %m"); + manager_close_ask_password(m); + return -errno; + } + + r = sd_event_add_io(m->event, &m->ask_password_event_source, + m->ask_password_inotify_fd, EPOLLIN, + manager_dispatch_ask_password_fd, m); + if (r < 0) { + log_error("Failed to add event source for /run/systemd/ask-password: %m"); + manager_close_ask_password(m); + return -errno; + } + + /* Queries might have been added meanwhile... */ + manager_dispatch_ask_password_fd(m->ask_password_event_source, + m->ask_password_inotify_fd, EPOLLIN, m); + } + + return m->have_ask_password; +} + static int manager_watch_idle_pipe(Manager *m) { int r; @@ -470,6 +562,9 @@ int manager_new(SystemdRunningAs running m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = -1; m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */ + m->ask_password_inotify_fd = -1; + m->have_ask_password = -EINVAL; /* we don't know */ + r = manager_default_environment(m); if (r < 0) goto fail; @@ -847,6 +942,8 @@ void manager_free(Manager *m) { if (m->kdbus_fd >= 0) close_nointr_nofail(m->kdbus_fd); + manager_close_ask_password(m); + manager_close_idle_pipe(m); udev_unref(m->udev); @@ -2526,6 +2623,9 @@ void manager_check_finished(Manager *m) /* Turn off confirm spawn now */ m->confirm_spawn = false; + /* No need to update ask password status when we're going non-interactive */ + manager_close_ask_password(m); + if (dual_timestamp_is_set(&m->finish_timestamp)) return; @@ -2843,12 +2943,15 @@ static bool manager_get_show_status(Mana if (m->no_console_output) return false; + /* If we cannot find out the status properly, just proceed. */ + if (manager_check_ask_password(m) > 0) + return false; + if (m->show_status > 0) return true; /* If Plymouth is running make sure we show the status, so * that there's something nice to see when people press Esc */ - return plymouth_running(); } --- src/core/manager.h +++ src/core/manager.h 2014-10-29 00:00:00.000000000 +0000 @@ -231,6 +231,11 @@ struct Manager { unsigned n_on_console; unsigned jobs_in_progress_iteration; + /* Do we have any outstanding password prompts? */ + int have_ask_password; + int ask_password_inotify_fd; + sd_event_source *ask_password_event_source; + /* Type=idle pipes */ int idle_pipe[4]; sd_event_source *idle_pipe_event_source; ++++++ 1053-better-checks-in-write_net_rules.patch ++++++ --- /var/tmp/diff_new_pack.vsCCve/_old 2014-11-26 10:36:14.000000000 +0100 +++ /var/tmp/diff_new_pack.vsCCve/_new 2014-11-26 10:36:14.000000000 +0100 @@ -8,7 +8,7 @@ if [ "$MATCHADDR" ]; then + # Check if MACADDR doesn't exist already in the generated rules + MAC="$(/usr/bin/grep -w -o -C1 -m1 "$MATCHADDR" "$RULES_FILE" 2>/dev/null || true)" -+ if [ "$MAC" == "$MATCHADDR" ]; then ++ if [ "$MAC" = "$MATCHADDR" ]; then + unlock_rules_file + exit 0 + fi @@ -23,7 +23,7 @@ - if [ "$ID" == "$MATCHID" ]; then + # Check if KERNEL doesn't exist already in the generated rules + KERNEL="$(find_all_rules 'KERNELS==' "$MATCHID")" -+ if [ "$KERNEL" == "$MATCHID" ]; then ++ if [ "$KERNEL" = "$MATCHID" ]; then unlock_rules_file exit 0 fi ++++++ 1089-fix-cgroup-device-controller.patch ++++++
From eb0f0863f5af48865fb4569e2076d5f9e2313995 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Mon, 10 Mar 2014 21:36:01 +0100 Subject: nspawn: don't try mknod() of /dev/console with the correct major/minor
We overmount /dev/console with an external pty anyway, hence there's no point in using the real major/minor when we create the node to overmount. Instead, use the one of /dev/null now. This fixes a race against the cgroup device controller setup we are using. In case /dev/console was create before the cgroup policy was applied all was good, but if created in the opposite order the mknod() would fail, since creating /dev/console is not allowed by it. Creating /dev/null instances is however permitted, and hence use it. diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index d8d0dae..bef866a 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -879,23 +879,19 @@ static int setup_ptmx(const char *dest) { } static int setup_dev_console(const char *dest, const char *console) { + _cleanup_umask_ mode_t u; + const char *to; struct stat st; - _cleanup_free_ char *to = NULL; int r; - _cleanup_umask_ mode_t u; assert(dest); assert(console); u = umask(0000); - if (stat(console, &st) < 0) { - log_error("Failed to stat %s: %m", console); + if (stat("/dev/null", &st) < 0) { + log_error("Failed to stat /dev/null: %m"); return -errno; - - } else if (!S_ISCHR(st.st_mode)) { - log_error("/dev/console is not a char device"); - return -EIO; } r = chmod_and_chown(console, 0600, 0, 0); @@ -904,16 +900,15 @@ static int setup_dev_console(const char *dest, const char *console) { return r; } - if (asprintf(&to, "%s/dev/console", dest) < 0) - return log_oom(); - /* We need to bind mount the right tty to /dev/console since * ptys can only exist on pts file systems. To have something - * to bind mount things on we create a device node first, that - * has the right major/minor (note that the major minor - * doesn't actually matter here, since we mount it over - * anyway). */ + * to bind mount things on we create a device node first, and + * use /dev/null for that since we the cgroups device policy + * allows us to create that freely, while we cannot create + * /dev/console. (Note that the major minor doesn't actually + * matter here, since we mount it over anyway). */ + to = strappenda(dest, "/dev/console"); if (mknod(to, (st.st_mode & ~07777) | 0600, st.st_rdev) < 0) { log_error("mknod() for /dev/console failed: %m"); return -errno; -- cgit v0.10.2 ++++++ 1090-udev-path_id-set-supported_parent-for-well-known-SCS.patch ++++++ Based on cc821d02a37c8c76aaf15bae2d33fee1bdc4b2e0 Mon Sep 17 00:00:00 2001 From: Kay Sievers <kay@vrfy.org> Date: Tue, 28 Oct 2014 16:50:24 +0100 Subject: [PATCH] udev: path_id - set supported_parent for well-known SCSI setups --- src/udev/udev-builtin-path_id.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- src/udev/udev-builtin-path_id.c +++ src/udev/udev-builtin-path_id.c 2014-11-03 14:12:48.129956655 +0000 @@ -379,7 +379,7 @@ out: return hostdev; } -static struct udev_device *handle_scsi(struct udev_device *parent, char **path) +static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) { const char *devtype; const char *name; @@ -394,6 +394,7 @@ static struct udev_device *handle_scsi(s if (id != NULL) { parent = skip_subsystem(parent, "scsi"); path_prepend(path, "ieee1394-0x%s", id); + *supported_parent = true; goto out; } @@ -402,16 +403,19 @@ static struct udev_device *handle_scsi(s if (strstr(name, "/rport-") != NULL) { parent = handle_scsi_fibre_channel(parent, path); + *supported_parent = true; goto out; } if (strstr(name, "/end_device-") != NULL) { parent = handle_scsi_sas(parent, path); + *supported_parent = true; goto out; } if (strstr(name, "/session") != NULL) { parent = handle_scsi_iscsi(parent, path); + *supported_parent = true; goto out; } @@ -545,7 +549,7 @@ static int builtin_path_id(struct udev_d } else if (streq(subsys, "scsi_tape")) { handle_scsi_tape(parent, &path); } else if (streq(subsys, "scsi")) { - parent = handle_scsi(parent, &path); + parent = handle_scsi(parent, &path, &supported_parent); supported_transport = true; } else if (streq(subsys, "cciss")) { parent = handle_cciss(parent, &path); ++++++ 1091-udev-path_id-update-comments.patch ++++++
From a42cdff19f2d34f12ceca0f40707421a8aaa2c2f Mon Sep 17 00:00:00 2001 From: Kay Sievers <kay@vrfy.org> Date: Thu, 30 Oct 2014 01:18:34 +0100 Subject: [PATCH] udev: path_id - update comments
--- src/udev/udev-builtin-path_id.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git src/udev/udev-builtin-path_id.c src/udev/udev-builtin-path_id.c index 0d247f6..df996cb 100644 --- src/udev/udev-builtin-path_id.c +++ src/udev/udev-builtin-path_id.c @@ -548,9 +548,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool } /* - * Do return devices with have an unknown type of parent device, they - * might produce conflicting IDs below multiple independent parent - * devices. + * Do not return devices with an unknown parent device type. They + * might produce conflicting IDs if the parent does not provide a + * unique and predictable name. */ if (!supported_parent) { free(path); @@ -558,9 +558,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool } /* - * Do not return a have-only a single-parent block devices, some - * have entire hidden buses behind it, and not create predictable - * IDs that way. + * Do not return block devices without a well-known transport. Some + * devices do not expose their buses and do not provide a unique + * and predictable name that way. */ if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport) { free(path); -- 1.7.9.2 ++++++ 1092-libudev-do-not-accept-invalid-log-levels.patch ++++++ Based on ee7122c0ec6aa11f02e9e8d94254b353f12d2c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sat, 1 Nov 2014 12:06:41 -0400 Subject: [PATCH] libudev: do not accept invalid log levels Invalid log levels lead to a assert failure later on. https://bugs.freedesktop.org/show_bug.cgi?id=85657 --- src/libudev/libudev-util.c | 10 +++++++--- src/libudev/libudev.c | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) --- src/libudev/libudev-util.c +++ src/libudev/libudev-util.c 2014-11-10 11:33:26.269519209 +0000 @@ -255,9 +255,13 @@ int util_log_priority(const char *priori char *endptr; int prio; - prio = strtol(priority, &endptr, 10); - if (endptr[0] == '\0' || isspace(endptr[0])) - return prio; + prio = strtoul(priority, &endptr, 10); + if (endptr[0] == '\0' || isspace(endptr[0])) { + if (prio >= 0 && prio <= 7) + return prio; + else + return -ERANGE; + } if (startswith(priority, "err")) return LOG_ERR; if (startswith(priority, "info")) --- src/libudev/libudev.c +++ src/libudev/libudev.c @@ -193,7 +193,13 @@ _public_ struct udev *udev_new(void) } if (streq(key, "udev_log")) { - udev_set_log_priority(udev, util_log_priority(val)); + int prio; + + prio = util_log_priority(val); + if (prio < 0) + udev_err(udev, "/etc/udev/udev.conf:%u: invalid logging level '%s', ignoring.\n", line_nr, val); + else + udev_set_log_priority(udev, prio); continue; } } @@ -201,8 +207,15 @@ _public_ struct udev *udev_new(void) /* environment overrides config */ env = secure_getenv("UDEV_LOG"); - if (env != NULL) - udev_set_log_priority(udev, util_log_priority(env)); + if (env != NULL) { + int prio; + + prio = util_log_priority(env); + if (prio < 0) + udev_err(udev, "$UDEV_LOG specifies invalid logging level '%s', ignoring.\n", env); + else + udev_set_log_priority(udev, prio); + } return udev; } ++++++ 1093-udev-Fix-parsing-of-udev.event-timeout-kernel-parame.patch ++++++ Based on f671774f52838d35d78e62ddcb781b5b65b3373f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" <rjones@redhat.com> Date: Tue, 4 Nov 2014 23:45:15 +0000 Subject: [PATCH] udev: Fix parsing of udev.event-timeout kernel parameter. --- src/udev/udevd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- src/udev/udevd.c +++ src/udev/udevd.c 2014-11-10 12:28:20.385559165 +0000 @@ -1011,9 +1011,9 @@ static void kernel_cmdline_options(struc if (r < 0) log_warning("Invalid udev.exec-delay ignored: %s", opt + 16); } else if (startswith(opt, "udev.event-timeout=")) { - r = safe_atou64(opt + 16, &event_timeout_usec); + r = safe_atou64(opt + 19, &event_timeout_usec); if (r < 0) { - log_warning("Invalid udev.event-timeout ignored: %s", opt + 16); + log_warning("Invalid udev.event-timeout ignored: %s", opt + 19); break; } event_timeout_usec *= USEC_PER_SEC; ++++++ 1094-udev-avoid-magic-constants-in-kernel-cmdline-parsers.patch ++++++ Based on cfe2061add5479710f6597899d632e64c54e62ef Mon Sep 17 00:00:00 2001 From: David Herrmann <dh.herrmann@gmail.com> Date: Wed, 5 Nov 2014 12:56:49 +0100 Subject: [PATCH] udev: avoid magic constants in kernel-cmdline parsers Lets recognize the fact that startswith() returns a pointer to the tail on success. Use it instead of hard-coding string-lengths as magic constants. --- src/udev/udevd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) --- src/udev/udevd.c +++ src/udev/udevd.c 2014-11-10 12:31:15.745519116 +0000 @@ -984,7 +984,7 @@ static void kernel_cmdline_options(struc return; FOREACH_WORD_QUOTED(w, l, line, state) { - char *s, *opt; + char *s, *opt, *value; s = strndup(w, l); if (!s) @@ -996,24 +996,24 @@ static void kernel_cmdline_options(struc else opt = s; - if (startswith(opt, "udev.log-priority=")) { + if ((value = startswith(opt, "udev.log-priority="))) { int prio; - prio = util_log_priority(opt + 18); + prio = util_log_priority(value); log_set_max_level(prio); udev_set_log_priority(udev, prio); - } else if (startswith(opt, "udev.children-max=")) { - r = safe_atoi(opt + 18, &children_max); + } else if ((value = startswith(opt, "udev.children-max="))) { + r = safe_atoi(value, &children_max); if (r < 0) - log_warning("Invalid udev.children-max ignored: %s", opt + 18); - } else if (startswith(opt, "udev.exec-delay=")) { - r = safe_atoi(opt + 16, &exec_delay); + log_warning("Invalid udev.children-max ignored: %s", value); + } else if ((value = startswith(opt, "udev.exec-delay="))) { + r = safe_atoi(value, &exec_delay); if (r < 0) - log_warning("Invalid udev.exec-delay ignored: %s", opt + 16); - } else if (startswith(opt, "udev.event-timeout=")) { - r = safe_atou64(opt + 19, &event_timeout_usec); + log_warning("Invalid udev.exec-delay ignored: %s", value); + } else if ((value = startswith(opt, "udev.event-timeout="))) { + r = safe_atou64(value, &event_timeout_usec); if (r < 0) { - log_warning("Invalid udev.event-timeout ignored: %s", opt + 19); + log_warning("Invalid udev.event-timeout ignored: %s", value); break; } event_timeout_usec *= USEC_PER_SEC; ++++++ 1095-set-ssd-disk-to-use-deadline-scheduler.patch ++++++ Index: systemd-210/Makefile.am =================================================================== --- systemd-210.orig/Makefile.am +++ systemd-210/Makefile.am @@ -2546,6 +2546,7 @@ dist_udevrules_DATA += \ rules/60-persistent-input.rules \ rules/60-persistent-alsa.rules \ rules/60-persistent-storage.rules \ + rules/60-ssd-scheduler.rules \ rules/64-btrfs.rules \ rules/75-net-description.rules \ rules/75-tty-description.rules \ Index: systemd-210/rules/60-ssd-scheduler.rules =================================================================== --- /dev/null +++ systemd-210/rules/60-ssd-scheduler.rules @@ -0,0 +1,11 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="ssd_scheduler_end" +SUBSYSTEM!="block", GOTO="ssd_scheduler_end" + +IMPORT{cmdline}="elevator" +ENV{elevator}=="*?", GOTO="ssd_scheduler_end" + +KERNEL=="sd*[!0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline" + +LABEL="ssd_scheduler_end" ++++++ 1096-new-udev-root-symlink-generator.patch ++++++ Index: systemd-210/Makefile.am =================================================================== --- systemd-210.orig/Makefile.am +++ systemd-210/Makefile.am @@ -2791,6 +2791,25 @@ EXTRA_DIST += \ test/rule-syntax-check.py # ------------------------------------------------------------------------------ +rootsymlink_generator_SOURCES = \ + src/udev/rootsymlink_generator/rootsymlink_generator.c + +rootsymlink_generator_CFLAGS = \ + $(AM_CFLAGS) + +udevlibexec_PROGRAMS += \ + rootsymlink-generator + +nodist_systemunit_DATA += \ + units/systemd-udev-root-symlink.service + +SYSINIT_TARGET_WANTS += \ + systemd-udev-root-symlink.service + +EXTRA_DIST += \ + units/systemd-udev-root-symlink.service.in + +# ------------------------------------------------------------------------------ ata_id_SOURCES = \ src/udev/ata_id/ata_id.c Index: systemd-210/src/udev/rootsymlink_generator/rootsymlink_generator.c =================================================================== --- /dev/null +++ systemd-210/src/udev/rootsymlink_generator/rootsymlink_generator.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2014-2015 Robert Milasan <rmilasan@suse.com> + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <fcntl.h> +#include <unistd.h> + +#define BUFFER_SIZE 128 + +#define _ROOTDEV_ "/" +#define _PATH_ "/run/udev/rules.d" +#define _FILE_ "10-root-symlink.rules" + +int main() +{ + struct stat statbuf; + + if (stat(_ROOTDEV_, &statbuf) != 0) + return 1; + + if (major(statbuf.st_dev) > 0) { + int fd = -1; + char filename[BUFFER_SIZE]; + + if (mkdir(_PATH_, 0755) != 0 && errno != EEXIST) + return errno; + + snprintf(filename, BUFFER_SIZE, "%s/%s", _PATH_, _FILE_); + + if ((fd = open(filename, O_CREAT|O_WRONLY|O_TRUNC, 0644)) == -1) + return errno; + else { + char buf[BUFFER_SIZE]; + + snprintf(buf, BUFFER_SIZE, "ACTION==\"add|change\", SUBSYSTEM==\"block\", ENV{MAJOR}==\"%d\", ENV{MINOR}==\"%d\", SYMLINK+=\"root\"\n", + major(statbuf.st_dev), minor(statbuf.st_dev)); + + if (write(fd, buf, strlen(buf)) == -1) + return errno; + + if (close(fd) == -1) + return errno; + } + } + + return 0; +} Index: systemd-210/units/systemd-udev-root-symlink.service.in =================================================================== --- /dev/null +++ systemd-210/units/systemd-udev-root-symlink.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=Rule generator for /dev/root symlink +Before=systemd-udevd.service +DefaultDependencies=no +ConditionPathIsReadWrite=/run/udev + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@udevlibexec@/rootsymlink-generator Index: systemd-210/units/systemd-udev-root-symlink.service =================================================================== --- /dev/null +++ systemd-210/units/systemd-udev-root-symlink.service @@ -0,0 +1,10 @@ +[Unit] +Description=Rule generator for /dev/root symlink +Before=systemd-udevd.service +DefaultDependencies=no +ConditionPathIsReadWrite=/run/udev + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/lib/udev/rootsymlink-generator ++++++ avoid-leaking-socket-descriptors.patch ++++++ Based on 249968612f16a71df909d6e73785c18a9ff36a65 with src/core/dbus.c as well and corrected systemctl error messages for killing a unit. --- src/analyze/analyze.c | 2 +- src/bus-proxyd/bus-proxyd.c | 4 +--- src/cgroups-agent/cgroups-agent.c | 4 +--- src/core/dbus.c | 2 +- src/fsck/fsck.c | 2 +- src/hostname/hostnamectl.c | 2 +- src/hostname/hostnamed.c | 4 ++-- src/libsystemd/sd-bus/bus-util.h | 9 +++++++++ src/libsystemd/sd-bus/busctl.c | 2 +- src/locale/localectl.c | 2 +- src/locale/localed.c | 4 ++-- src/login/inhibit.c | 2 +- src/login/loginctl.c | 2 +- src/login/pam-module.c | 4 ++-- src/machine/machinectl.c | 4 ++-- src/nspawn/nspawn.c | 4 ++-- src/run/run.c | 2 +- src/systemctl/systemctl.c | 2 +- src/timedate/timedatectl.c | 2 +- src/timedate/timedated.c | 4 ++-- 20 files changed, 34 insertions(+), 29 deletions(-) --- src/analyze/analyze.c +++ src/analyze/analyze.c 2014-10-21 11:13:56.113045992 +0000 @@ -1264,7 +1264,7 @@ static int parse_argv(int argc, char *ar } int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/bus-proxyd/bus-proxyd.c +++ src/bus-proxyd/bus-proxyd.c 2014-10-21 11:16:16.303837968 +0000 @@ -427,7 +427,7 @@ static int patch_sender(sd_bus *a, sd_bu int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *a = NULL, *b = NULL; + _cleanup_bus_close_unref_ sd_bus *a = NULL, *b = NULL; sd_id128_t server_id; int r, in_fd, out_fd; bool got_hello = false; @@ -777,8 +777,6 @@ int main(int argc, char *argv[]) { r = 0; finish: - sd_bus_flush(a); - sd_bus_flush(b); return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } --- src/cgroups-agent/cgroups-agent.c +++ src/cgroups-agent/cgroups-agent.c 2014-10-21 11:17:37.400197469 +0000 @@ -26,7 +26,7 @@ #include "bus-util.h" int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; if (argc != 2) { @@ -62,7 +62,5 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - sd_bus_flush(bus); - return EXIT_SUCCESS; } --- src/core/dbus.c +++ src/core/dbus.c 2014-10-17 09:52:47.000000000 +0000 @@ -639,7 +639,7 @@ static int bus_setup_disconnected_match( } static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void *userdata) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; _cleanup_close_ int nfd = -1; Manager *m = userdata; sd_id128_t id; --- src/fsck/fsck.c +++ src/fsck/fsck.c 2014-10-21 11:18:06.003838037 +0000 @@ -45,7 +45,7 @@ static bool arg_show_progress = false; static void start_target(const char *target) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; assert(target); --- src/hostname/hostnamectl.c +++ src/hostname/hostnamectl.c 2014-10-21 11:18:19.915858156 +0000 @@ -468,7 +468,7 @@ static int hostnamectl_main(sd_bus *bus, } int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/hostname/hostnamed.c +++ src/hostname/hostnamed.c 2014-10-21 11:24:07.737447673 +0000 @@ -566,7 +566,7 @@ static const sd_bus_vtable hostname_vtab }; static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; assert(c); @@ -607,7 +607,7 @@ int main(int argc, char *argv[]) { Context context = {}; _cleanup_event_unref_ sd_event *event = NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; log_set_target(LOG_TARGET_AUTO); --- src/libsystemd/sd-bus/bus-util.h +++ src/libsystemd/sd-bus/bus-util.h 2014-10-17 09:51:34.000000000 +0000 @@ -137,11 +137,20 @@ typedef struct UnitInfo { int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u); +static inline void sd_bus_close_unrefp(sd_bus **bus) { + if (*bus) { + sd_bus_flush(*bus); + sd_bus_close(*bus); + sd_bus_unref(*bus); + } +} + DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_creds*, sd_bus_creds_unref); #define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp) +#define _cleanup_bus_close_unref_ _cleanup_(sd_bus_close_unrefp) #define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp) #define _cleanup_bus_creds_unref_ _cleanup_(sd_bus_creds_unrefp) #define _cleanup_bus_error_free_ _cleanup_(sd_bus_error_free) --- src/libsystemd/sd-bus/busctl.c +++ src/libsystemd/sd-bus/busctl.c 2014-10-21 11:19:01.472337887 +0000 @@ -484,7 +484,7 @@ static int busctl_main(sd_bus *bus, int } int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; log_parse_environment(); --- src/locale/localectl.c +++ src/locale/localectl.c 2014-10-21 11:19:13.811947994 +0000 @@ -796,7 +796,7 @@ static int localectl_main(sd_bus *bus, i } int main(int argc, char*argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/locale/localed.c +++ src/locale/localed.c 2014-10-21 11:19:28.415837424 +0000 @@ -1076,7 +1076,7 @@ static const sd_bus_vtable locale_vtable }; static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; assert(c); @@ -1116,7 +1116,7 @@ static int connect_bus(Context *c, sd_ev int main(int argc, char *argv[]) { Context context = {}; _cleanup_event_unref_ sd_event *event = NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; log_set_target(LOG_TARGET_AUTO); --- src/login/inhibit.c +++ src/login/inhibit.c 2014-10-21 11:19:44.470844885 +0000 @@ -221,7 +221,7 @@ static int parse_argv(int argc, char *ar int main(int argc, char *argv[]) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; log_parse_environment(); --- src/login/loginctl.c +++ src/login/loginctl.c 2014-10-21 11:20:16.695837857 +0000 @@ -1298,7 +1298,7 @@ static int loginctl_main(sd_bus *bus, in } int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/login/pam-module.c +++ src/login/pam-module.c 2014-10-21 10:48:20.000000000 +0000 @@ -213,7 +213,7 @@ _public_ PAM_EXTERN int pam_sm_open_sess *seat = NULL, *type = NULL, *class = NULL, *class_pam = NULL, *type_pam = NULL, *cvtnr = NULL, *desktop = NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int session_fd = -1, existing, r; bool debug = false, remote; struct passwd *pw; @@ -517,7 +517,7 @@ _public_ PAM_EXTERN int pam_sm_close_ses int argc, const char **argv) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; const void *existing = NULL; const char *id; int r; --- src/machine/machinectl.c +++ src/machine/machinectl.c 2014-10-21 11:20:45.747838104 +0000 @@ -550,7 +550,7 @@ static int openpt_in_namespace(pid_t pid static int login_machine(sd_bus *bus, char **args, unsigned n) { _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *reply2 = NULL, *reply3 = NULL; _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *container_bus = NULL; + _cleanup_bus_close_unref_ sd_bus *container_bus = NULL; _cleanup_close_ int master = -1; _cleanup_free_ char *getty = NULL; const char *path, *pty, *p; @@ -879,7 +879,7 @@ static int machinectl_main(sd_bus *bus, } int main(int argc, char*argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/nspawn/nspawn.c +++ src/nspawn/nspawn.c 2014-10-21 11:21:05.561523449 +0000 @@ -1163,7 +1163,7 @@ static int drop_capabilities(void) { static int register_machine(pid_t pid) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; if (!arg_register) @@ -1285,7 +1285,7 @@ static int register_machine(pid_t pid) { static int terminate_machine(pid_t pid) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; const char *path; int r; --- src/run/run.c +++ src/run/run.c 2014-10-21 11:22:35.163838021 +0000 @@ -462,7 +462,7 @@ static int start_transient_scope( int main(int argc, char* argv[]) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; _cleanup_free_ char *description = NULL, *command = NULL; int r; --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c 2014-10-22 09:36:33.399838318 +0000 @@ -2601,7 +2601,7 @@ static int kill_unit(sd_bus *bus, char * "ssi", *names, arg_kill_who, arg_signal); if (q < 0) { log_error("Failed to kill unit %s: %s", - *names, bus_error_message(&error, r)); + *names, bus_error_message(&error, q)); if (r == 0) r = q; } @@ -6436,7 +6436,7 @@ static int runlevel_main(void) { } int main(int argc, char*argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/timedate/timedatectl.c +++ src/timedate/timedatectl.c 2014-10-21 11:23:06.107837988 +0000 @@ -593,7 +593,7 @@ static int timedatectl_main(sd_bus *bus, } int main(int argc, char *argv[]) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; setlocale(LC_ALL, ""); --- src/timedate/timedated.c +++ src/timedate/timedated.c 2014-10-21 11:23:26.047838675 +0000 @@ -779,7 +779,7 @@ static const sd_bus_vtable timedate_vtab }; static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) { - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; assert(c); @@ -825,7 +825,7 @@ int main(int argc, char *argv[]) { }; _cleanup_event_unref_ sd_event *event = NULL; - _cleanup_bus_unref_ sd_bus *bus = NULL; + _cleanup_bus_close_unref_ sd_bus *bus = NULL; int r; log_set_target(LOG_TARGET_AUTO); ++++++ journald-advice-about-use-of-memory.patch ++++++ --- src/journal/catalog.c | 21 +++++++++++++++++++-- src/journal/journal-authenticate.c | 4 ++-- src/journal/journal-file.c | 2 +- src/journal/journald-kmsg.c | 2 +- src/journal/mmap-cache.c | 24 ++++++++++++++++++++++-- 5 files changed, 45 insertions(+), 8 deletions(-) --- src/journal/catalog.c +++ src/journal/catalog.c 2014-10-24 11:44:59.079838065 +0000 @@ -472,9 +472,19 @@ finish: static int open_mmap(const char *database, int *_fd, struct stat *_st, void **_p) { const CatalogHeader *h; - int fd; + static const struct { + const int index; + int advise; + } advises[] = { + {0,MADV_WILLNEED}, + {1,MADV_SEQUENTIAL}, + {2,MADV_DONTDUMP}, + {3,MADV_DONTFORK} + }; + int n, fd; void *p; struct stat st; + size_t psize; assert(_fd); assert(_st); @@ -494,12 +504,19 @@ static int open_mmap(const char *databas return -EINVAL; } - p = mmap(NULL, PAGE_ALIGN(st.st_size), PROT_READ, MAP_SHARED, fd, 0); + psize = PAGE_ALIGN(st.st_size); + p = mmap(NULL, psize, PROT_READ, MAP_SHARED|MAP_POPULATE|MAP_NONBLOCK, fd, 0); if (p == MAP_FAILED) { close_nointr_nofail(fd); return -errno; } + for (n=0; n < sizeof(advises)/sizeof(advises[0]); n++) { + int r = madvise(p, psize, advises[n].advise); + if (r < 0) + log_warning("Failed to give advice about use of memory: %m"); + } + h = p; if (memcmp(h->signature, CATALOG_SIGNATURE, sizeof(h->signature)) != 0 || le64toh(h->header_size) < sizeof(CatalogHeader) || --- src/journal/journal-authenticate.c +++ src/journal/journal-authenticate.c 2014-10-24 07:41:09.271837523 +0000 @@ -355,7 +355,7 @@ int journal_file_fss_load(JournalFile *f goto finish; } - m = mmap(NULL, PAGE_ALIGN(sizeof(FSSHeader)), PROT_READ, MAP_SHARED, fd, 0); + m = mmap(NULL, PAGE_ALIGN(sizeof(FSSHeader)), PROT_READ, MAP_SHARED|MAP_STACK, fd, 0); if (m == MAP_FAILED) { m = NULL; r = -errno; @@ -399,7 +399,7 @@ int journal_file_fss_load(JournalFile *f goto finish; } - f->fss_file = mmap(NULL, PAGE_ALIGN(f->fss_file_size), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + f->fss_file = mmap(NULL, PAGE_ALIGN(f->fss_file_size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_STACK, fd, 0); if (f->fss_file == MAP_FAILED) { f->fss_file = NULL; r = -errno; --- src/journal/journal-file.c +++ src/journal/journal-file.c 2014-10-24 07:39:25.603837720 +0000 @@ -2554,7 +2554,7 @@ int journal_file_open( goto fail; } - f->header = mmap(NULL, PAGE_ALIGN(sizeof(Header)), prot_from_flags(flags), MAP_SHARED, f->fd, 0); + f->header = mmap(NULL, PAGE_ALIGN(sizeof(Header)), prot_from_flags(flags), MAP_SHARED|MAP_STACK, f->fd, 0); if (f->header == MAP_FAILED) { f->header = NULL; r = -errno; --- src/journal/journald-kmsg.c +++ src/journal/journald-kmsg.c 2014-10-24 07:38:01.967837989 +0000 @@ -473,7 +473,7 @@ int server_open_kernel_seqnum(Server *s) return 0; } - p = mmap(NULL, sizeof(uint64_t), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + p = mmap(NULL, sizeof(uint64_t), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_STACK, fd, 0); if (p == MAP_FAILED) { log_error("Failed to map sequential number file, ignoring: %m"); close_nointr_nofail(fd); --- src/journal/mmap-cache.c +++ src/journal/mmap-cache.c 2014-10-24 11:16:47.759837744 +0000 @@ -439,12 +439,21 @@ static int add_mmap( struct stat *st, void **ret) { + static const struct { + const int index; + int vise; + } ad[] = { + {0, MADV_WILLNEED}, + {1, MADV_SEQUENTIAL}, + {2, MADV_DONTDUMP}, + {3, MADV_DONTFORK} + }; uint64_t woffset, wsize; Context *c; FileDescriptor *f; Window *w; void *d; - int r; + int n, r; assert(m); assert(m->n_ref > 0); @@ -481,7 +490,7 @@ static int add_mmap( } for (;;) { - d = mmap(NULL, wsize, prot, MAP_SHARED, fd, woffset); + d = mmap(NULL, wsize, prot, MAP_SHARED|MAP_POPULATE|MAP_NONBLOCK, fd, woffset); if (d != MAP_FAILED) break; if (errno != ENOMEM) @@ -494,6 +503,17 @@ static int add_mmap( return -ENOMEM; } + for (n=0; n < sizeof(ad)/sizeof(ad[0]); n++) { + if (ad[n].vise == MADV_DONTFORK) { + int flags = fcntl(fd, F_GETFD); + if (flags < 0 || !(flags & FD_CLOEXEC)) + continue; + } + r = madvise(d, wsize, ad[n].vise); + if (r < 0) + log_warning("Failed to give advice about use of memory: %m"); + } + c = context_add(m, context); if (!c) goto outofmem; ++++++ parse-crypttab-for-noauto-option.patch ++++++ --- /var/tmp/diff_new_pack.vsCCve/_old 2014-11-26 10:36:14.000000000 +0100 +++ /var/tmp/diff_new_pack.vsCCve/_new 2014-11-26 10:36:14.000000000 +0100 @@ -44,7 +44,7 @@ + } + + if (strcmp((what + 12), name) == 0) { -+ if (strstr(options, "noauto")) ++ if (options && strstr(options, "noauto")) + return 0; + + return 1; ++++++ rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch ++++++ --- /var/tmp/diff_new_pack.vsCCve/_old 2014-11-26 10:36:14.000000000 +0100 +++ /var/tmp/diff_new_pack.vsCCve/_new 2014-11-26 10:36:14.000000000 +0100 @@ -7,14 +7,12 @@ src/login/70-power-switch.rules | 1 + 1 file changed, 1 insertion(+) -diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules -index 36fb827..d925ab7 100644 --- a/src/login/70-power-switch.rules +++ b/src/login/70-power-switch.rules -@@ -9,5 +9,6 @@ ACTION=="remove", GOTO="power_switch_end" - - SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" +@@ -11,5 +11,6 @@ SUBSYSTEM=="input", KERNEL=="event*", SU SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" + SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" + SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch" +SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="gpio-keys.8", TAG+="power-switch" LABEL="power_switch_end" ++++++ watch_resolv.conf_for_become_changed.patch ++++++ --- src/core/manager.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/core/manager.h | 5 ++ 2 files changed, 108 insertions(+) --- src/core/manager.c +++ src/core/manager.c 2014-11-07 11:12:58.334193988 +0000 @@ -37,6 +37,7 @@ #include <sys/stat.h> #include <dirent.h> #include <sys/timerfd.h> +#include <resolv.h> #ifdef HAVE_AUDIT #include <libaudit.h> @@ -304,6 +305,101 @@ static int manager_check_ask_password(Ma return m->have_ask_password; } +static int manager_setup_resolv_conf_change(Manager *); + +static int manager_dispatch_resolv_conf_fd(sd_event_source *source, + int fd, uint32_t revents, void *userdata) { + Manager *m = userdata; + + assert(m); + assert(m->resolv_conf_inotify_fd == fd); + + if (revents != EPOLLIN) { + log_warning("Got unexpected poll event for notify fd."); + return 0; + } + + if (fd >= 0) + flush_fd(fd); + + m->resolv_conf_event_source = sd_event_source_unref(m->resolv_conf_event_source); + + if (m->resolv_conf_inotify_fd >= 0) + close_nointr_nofail(m->resolv_conf_inotify_fd); + m->resolv_conf_inotify_fd = -1; + + manager_setup_resolv_conf_change(m); + + return m->resolv_conf_noent ? 0 : res_init(); +} + +static int manager_setup_resolv_conf_change(Manager *m) { + int r; + + assert(m); + assert(m->resolv_conf_inotify_fd < 0); + + m->resolv_conf_inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); + if (m->resolv_conf_inotify_fd < 0) { + log_error("inotify_init1() failed: %m"); + r = -errno; + goto fail; + } + if (inotify_add_watch(m->resolv_conf_inotify_fd, "/etc/resolv.conf", + IN_CLOSE_WRITE|IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF) < 0) { + if (errno == ENOENT) { + m->resolv_conf_noent = true; + if (inotify_add_watch(m->resolv_conf_inotify_fd, "/etc", IN_CREATE|IN_MOVED_TO) < 0) { + log_error("Failed to add watch on /etc: %m"); + r = -errno; + goto fail; + } + } else { + log_error("Failed to add watch on /etc/resolv.conf: %m"); + r = -errno; + goto fail; + } + } + if (inotify_add_watch(m->resolv_conf_inotify_fd, "/etc/host.conf", + IN_CLOSE_WRITE|IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF) < 0 && errno != ENOENT) { + log_error("Failed to add watch on /etc/host.conf: %m"); + r = -errno; + goto fail; + } + + r = sd_event_add_io(m->event, &m->resolv_conf_event_source, + m->resolv_conf_inotify_fd, EPOLLIN, + manager_dispatch_resolv_conf_fd, m); + if (r < 0) { + log_error("Failed to add event source for resolver: %s", strerror(-r)); + goto fail; + } + + r = sd_event_source_set_priority(m->resolv_conf_event_source, -10); + if (r < 0) { + log_error("Failed to add event source for resolver: %s", strerror(-r)); + m->resolv_conf_event_source = sd_event_source_unref(m->resolv_conf_event_source); + goto fail; + } + + return 0; +fail: + if (m->resolv_conf_inotify_fd >= 0) + close_nointr_nofail(m->resolv_conf_inotify_fd); + m->resolv_conf_inotify_fd = -1; + + return 0; /* Ignore error here */ +} + +static void manager_shutdown_resolv_conf_change(Manager *m) { + assert(m); + + m->resolv_conf_event_source = sd_event_source_unref(m->resolv_conf_event_source); + if (m->resolv_conf_inotify_fd >= 0) + close_nointr_nofail(m->resolv_conf_inotify_fd); + m->resolv_conf_inotify_fd = -1; +} + static int manager_watch_idle_pipe(Manager *m) { int r; @@ -562,6 +658,7 @@ int manager_new(SystemdRunningAs running m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = -1; m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */ + m->resolv_conf_inotify_fd = -1; m->ask_password_inotify_fd = -1; m->have_ask_password = -EINVAL; /* we don't know */ @@ -613,6 +710,10 @@ int manager_new(SystemdRunningAs running if (r < 0) goto fail; + r = manager_setup_resolv_conf_change(m); + if (r < 0) + goto fail; + m->udev = udev_new(); if (!m->udev) { r = -ENOMEM; @@ -906,6 +1007,8 @@ void manager_free(Manager *m) { assert(m); + manager_shutdown_resolv_conf_change(m); + manager_clear_jobs_and_units(m); for (c = 0; c < _UNIT_TYPE_MAX; c++) --- src/core/manager.h +++ src/core/manager.h 2014-11-07 11:06:41.466019636 +0000 @@ -157,6 +157,11 @@ struct Manager { FILE *proc_self_mountinfo; sd_event_source *mount_event_source; + /* Watch out any change of /etc/resolv.conf */ + int resolv_conf_inotify_fd; + sd_event_source *resolv_conf_event_source; + bool resolv_conf_noent; + /* Data specific to the swap filesystem */ FILE *proc_swaps; sd_event_source *swap_event_source; -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org