Hello community,
here is the log from the commit of package systemd for openSUSE:Factory checked in at 2015-03-09 09:20:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2015-03-05 15:28:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.changes 2015-03-09 09:20:54.000000000 +0100
@@ -2,94 +1,0 @@
-Tue Mar 3 16:03:07 UTC 2015 - jengelh@inai.de
-
-- Add 0001-core-rework-device-state-logic.patch to fix spurious
- automated umount after mount.
-
--------------------------------------------------------------------
-Wed Feb 18 12:13:52 UTC 2015 - meissner@suse.com
-
-- mark more subpackages as !bootstrap for systemd-mini usage.
-
--------------------------------------------------------------------
-Wed Feb 18 05:01:38 UTC 2015 - crrodriguez@opensuse.org
-
-- spec : remove --with-firmware-path, firmware loader was removed in v217
-- spec: remove --disable-multi-seat-x, gone.(fixed in xorg)
-- spec: Do not enable systemd-readahead-collect.service and
-systemd-readahead-replay.service as these do not exist anymore.
-- spec: drop timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch
- Yast was fixed to write all timezone changes exactly how timedated expects
- things to be done.
-- spec: remove handle-etc-HOSTNAME.patch, since late 2014 the netcfg
- package handles the migration from /etc/HOSTNAME to /etc/hostname
- and owns both files.
--spec: remove boot.udev and systemd-journald.init as they currently
- serve no purpose.
-- suse-sysv-bootd-support.diff: Remove HAVE_SYSVINIT conditions, we
- are in sysvcompat-only codepath, also remove the code targetting other
- distributions, never compiled as the TARGET_$DISTRO macros are never defined.
-- systemd-powerd-initctl-support.patch guard with HAVE_SYSV_COMPAT
-- set-and-use-default-logconsole.patch: fix HAVE_SYSV_COMPAT guards
-- insserv-generator.patch: Only build when sysvcompat is enabled
-- vhangup-on-all-consoles.patch add a comment indicating this is a workaround
- for a kernel bug.
-- spec: Add option to allow disabling sysvinit compat at build time.
-- spec: Add option to enable resolved at build time.
-- spec: Remove all %ifs for !factory products, current systemd releases can
- neither be built nor installed in older products without upgrading
- several components of the base system.
- (removed: 1008-add-msft-compability-rules.patch was only for =< 13.1)
-- spec: remove all dummy "aliases" to /etc/init.d, that made sense only when
- those init scripts still existed. (dummy localfs.service source: gone)
-- systemd-sleep-grub: moved to the grub2 package where it belongs as a
- suspend/resume hook (SR#286533) (drops prepare-suspend-to-disk.patch)
-- remove LFS_CFLAGS from CFLAGS, never needed in systemd as it force feds
- config.h everywhere in the preprocessor cmdline.
-
--------------------------------------------------------------------
-Mon Feb 16 23:46:11 UTC 2015 - jengelh@inai.de
-
-- Update to new upstream release 219
-* systemd units can now be "unsupported" (like, for example,
- .device in a containers), similar to the "skipped" state in
- SUSE's prior sysvinit scripts.
-* tmpfiles gained the 'v' type for creating btrfs subvolumes.
-* tmpfiles gained the 'a' type for setting ACLs.
-* systemd-nspawn gained new switches: --ephemeral, --template
-* The /var/lib/containers location is deprecated and replaced by
- /var/lib/machines.
-* machinectl gained the copy-from and copy-to commands.
-* machinectl now knows a "bind" command (for use with nspawn)
-* new "systemd-importd" daemon to download container images and run
- them as nspawn containers.
-* networkd collects LLDP network announcements, if available, and
- so shown in networkctl.
-* The fallback terminal type was changed from "vt102" to "vt220",
- allowing PgUp/PgDn keys to work.
-* Pressing Ctrl-Alt-Del 7x in 2 seconds forces a umount+reboot now,
- useful should the regular shutdown hang.
-* Removing storage will cause systemd to unmount the associated
- mountpoints so that they don't linger around.
-
--------------------------------------------------------------------
-Mon Feb 16 11:47:04 UTC 2015 - jengelh@inai.de
-
-- Add suse-sysv-bootd-support.diff (reinstate old
- Revert-service-drop-support-for-SysV-scripts-for-the-early.patch)
-
--------------------------------------------------------------------
-Mon Feb 16 10:18:18 UTC 2015 - jengelh@inai.de
-
-- Update to systemd v218-1050-g38ab096
-- Remove patches
- use-usr-sbin-sulogin-for-emergency-service.patch (upstream fixed it)
-- Reinstate and improve (remove huge indents from)
- tty-ask-password-agent-on-console.patch,
- 0014-journald-with-journaling-FS.patch, rootsymlink_generator.
-
--------------------------------------------------------------------
-Mon Feb 16 09:42:48 UTC 2015 - meissner@suse.com
-
-- disable systemd-resolved for now as it interacts not well with
- our methods and security has concerns regarding spoofing. bsc#917781
-
--------------------------------------------------------------------
@@ -100,472 +5,0 @@
-
--------------------------------------------------------------------
-Fri Jan 9 18:48:28 UTC 2015 - jengelh@inai.de
-
-- Update to new upstream release 218
-* New utilities: systemd-timesyncd (SNTP client),
- systemd-resolved, systemd-networkd, networkctl,
- systemd-sysusers
-* machinectl gained a "poweroff" command for clean container shutdown
-* The udev hwdb now contains DPI information for mice.
-* Userspace firmware loading support has been removed and
- the minimum supported kernel version is thus bumped to 3.7.
-- Remove patches:
- G=gone locally, is upstream;
- D=dropped: no longer needed;
- N=no longer applies to source nor is it deemed needed;
- K=killed: no longer applicable and too complex to resolve:
- ----
- G 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch
- G avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch
- K service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch
- K remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch
- K handle-SYSTEMCTL_OPTIONS-environment-variable.patch
- K 0018-Make-LSB-Skripts-know-about-Required-and-Should.patch
- K log-target-null-instead-kmsg.patch
- K tty-ask-password-agent-on-console.patch
- K 513-nspawn-veth.patch
- K 1087-infinit-timeout-for-kmod-loaded-modules.patch
- D module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch
- D avoid-leaking-socket-descriptors.patch
- D 0001-make-fortify-happy-with-ppoll.patch
- N fix-owner-of-var-log-btmp.patch
- N disable-nss-myhostname-warning-bnc-783841.patch
- N Revert-service-drop-support-for-SysV-scripts-for-the-early.patch
- N 0001-make-209-working-on-older-dist.patch
- N 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch
- N tmpfiles-do-not-clean-for-mandb-index-files.patch
- G 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch
- G avoid-assertion-if-invalid-address-familily-is-passed-to-g.patc
- G optionally-warn-if-nss-myhostname-is-called.patch
- G 0001-units-systemd-sysctl.service.in-run-after-load-modul.patch
- G 0004-getty-generator-properly-escape-instance-names.patch
- G rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
- G 0008-Reset-signal-mask-on-re-exec-to-init.patch
- G 0001-login-fix-pos-array-allocation.patch
- G 0002-login-set-pos-slot-to-fallback-on-pos-eviction.patch
- G 0003-login-Allow-calling-org.freedesktop.login1.Seat.Swit.patch
- G 0004-fix-typo-in-iDRAC-network-interface-name-irdac-idrac.patch
- G 0005-Replace-var-run-with-run-in-remaining-places.patch
- G 0006-Revert-back-to-var-run-at-a-couple-of-problems.patch
- G 0007-README-document-that-var-run-must-be-a-symlink-run.patch
- G 0008-Use-var-run-dbus-system_bus_socket-for-the-D-Bus-soc.patch
- G 0009-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch
- G 0010-mount-don-t-fire-PropertiesChanged-signals-for-mount.patch
- G 0011-logs-show-fix-corrupt-output-with-empty-messages.patch
- G 0012-journalctl-refuse-extra-arguments-with-verify-and-si.patch
- G 0014-nspawn-fix-detection-of-missing-proc-self-loginuid.patch
- G 0001-Fix-systemd-stdio-bridge-symlink.patch
- G 0002-execute-free-directory-path-if-we-fail-to-remove-it-.patch
- G 0003-Do-not-print-invalid-UTF-8-in-error-messages.patch
- G 0004-man-document-missing-options-of-systemd-run.patch
- G 0005-systemd-run-add-some-extra-safety-checks.patch
- G 0006-journal-assume-that-next-entry-is-after-previous-ent.patch
- G 0007-journal-forget-file-after-encountering-an-error.patch
- G 0008-core-correctly-unregister-PIDs-from-PID-hashtables.patch
- G 0009-logind-fix-reference-to-systemd-user-sessions.servic.patch
- G 0010-man-update-link-to-LSB.patch
- G 0011-man-systemd-bootchart-fix-spacing-in-command.patch
- G 0012-man-add-missing-comma.patch
- G 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch
- G 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch
- G 0002-manager-flush-memory-stream-before-using-the-buffer.patch
- G 0003-busname-don-t-drop-service-from-the-result-string.patch
- G 0004-fix-off-by-one-error-in-array-index-assertion.patch
- G 0005-logind-fix-policykit-checks.patch
- G 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch
- G 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch
- G 0001-gpt-auto-generator-don-t-return-OOM-on-parentless-de.patch
- G 0002-bus-fix-memory-leak-when-kdbus-is-not-enabled.patch
- G 0006-Do-not-return-1-EINVAL-on-allocation-error.patch
- G 0007-networkd-fix-typo.patch
- G 0008-sd-bus-don-t-access-invalid-memory-if-a-signal-match.patch
- G 0009-sd-bus-don-t-choke-if-somebody-sends-us-a-message-wi.patch
- G 0012-journald-remove-stray-reset-of-error-return-value.patch
- G 0013-core-libsystemd-systemd-timedate-udev-spelling-fixes.patch
- G 0001-cgroup-it-s-not-OK-to-invoke-alloca-in-loops.patch
- G 0002-machined-fix-Kill-bus-call-on-machine-objects-when-w.patch
- G 0003-sd-bus-don-t-use-assert_return-to-check-for-disconne.patch
- G 0004-core-don-t-try-to-relabel-mounts-before-we-loaded-th.patch
- G 0005-sd-daemon-fix-incorrect-variable-access.patch
- G 0006-sd-event-initialization-perturbation-value-right-bef.patch
- G 0007-sd-event-don-t-accidentally-turn-of-watchdog-timer-e.patch
- G 0008-systemctl-kill-mode-is-long-long-gone-don-t-mention-.patch
- G 0009-ask-password-when-the-user-types-a-overly-long-passw.patch
- G 0001-journal-fix-export-of-messages-containing-newlines.patch
- G 0002-systemctl-update-NAME-to-PATTERN-in-help.patch
- G 0003-tty-ask-password-agent-return-negative-errno.patch
- G 0004-systemd-python-use-.hex-instead-of-.get_hex.patch
- G 0005-systemd-python-fix-failing-assert.patch
- G 0007-dbus-suppress-duplicate-and-misleading-messages.patch
- G 0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch
- G 0001-bash-completion-fix-__get_startable_units.patch
++++ 370 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:
----
0001-core-rework-device-state-logic.patch
suse-sysv-bootd-support.diff
systemd-219.tar.xz
New:
----
0001-Clear-up-confusion-wrt.-ENTRY_SIZE_MAX-and-DATA_SIZE.patch
0001-Do-not-unescape-unit-names-in-Install-section.patch
0001-Don-t-snprintf-a-potentially-NULL-pointer.patch
0001-Fix-systemd-stdio-bridge-symlink.patch
0001-Fix-warning-about-unused-variable-with-SELINUX.patch
0001-activate-fix-fd-leak-in-do_accept.patch
0001-architecture-Add-tilegx.patch
0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch
0001-bash-completion-fix-__get_startable_units.patch
0001-bash-completion-p-option-for-journalctl.patch
0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch
0001-bus-proxyd-fix-incorrect-comparison.patch
0001-cgroup-it-s-not-OK-to-invoke-alloca-in-loops.patch
0001-completion-filter-templates-from-restartable-units.patch
0001-conf-parser-silently-ignore-sections-starting-with-X.patch
0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch
0001-core-close-socket-fds-asynchronously.patch
0001-core-don-t-allow-enabling-if-unit-is-masked.patch
0001-core-fix-invalid-free-in-killall.patch
0001-core-fix-resource-leak-in-manager_environment_add.patch
0001-core-swap-only-make-configured-units-part-of-swap.ta.patch
0001-core-sysvcompat-network-should-be-equivalent-to-netw.patch
0001-core-use-correct-format-string-for-UIDs.patch
0001-detect-virt-Fix-Xen-domU-discovery.patch
0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch
0001-event-pull-in-sd-event.h-from-event-util.h.patch
0001-gpt-auto-generator-don-t-return-OOM-on-parentless-de.patch
0001-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0001-hwdb-fix-case-sensitive-match.patch
0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch
0001-hwdb-update.patch
0001-initrd-parse-etc.service-ignore-return-code-of-daemo.patch
0001-journal-Do-not-count-on-the-compiler-initializing-fo.patch
0001-journal-cleanup-up-error-handling-in-update_catalog.patch
0001-journal-compress-return-early-in-uncompress_startswi.patch
0001-journal-fix-export-of-messages-containing-newlines.patch
0001-journalctl-do-not-output-reboot-markers-when-running.patch
0001-keymap-Add-Lenovo-Enhanced-USB-Keyboard.patch
0001-keymap-Add-support-for-IBM-ThinkPad-X41-Tablet.patch
0001-keymap-Fix-touchpad-toggle-on-Toshiba-Satellite-P75-.patch
0001-login-fix-memory-leak-on-DropController.patch
0001-login-fix-pos-array-allocation.patch
0001-login-pause-devices-before-acknowledging-VT-switches.patch
0001-login-rerun-vconsole-setup-when-switching-from-vgaco.patch
0001-login-simplify-controller-handling.patch
0001-logind-add-support-for-Triton2-Power-Button.patch
0001-logind-allow-switching-to-unused-VTs-via-SwitchTo.patch
0001-logind-ignore-lid-switch-if-more-than-1-display-is-c.patch
0001-machine-don-t-return-uninitialized-variable.patch
0001-main-uid_to_name-might-fail-due-to-OOM-protect-again.patch
0001-make-209-working-on-older-dist.patch
0001-make-fortify-happy-with-ppoll.patch
0001-manager-Linux-on-hppa-has-fewer-rtsigs-hence-avoid-u.patch
0001-nspawn-allow-to-bind-mount-journal-on-top-of-a-non-e.patch
0001-nspawn-don-t-try-to-create-veth-link-with-too-long-i.patch
0001-nspawn-fix-network-interface.patch
0001-nspawn-fix-truncation-of-machine-names-in-interface-.patch
0001-parse_uid-return-ENXIO-for-1-uids.patch
0001-po-add-Ukrainian-translation.patch
0001-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch
0001-replace-more-dup-by-F_DUPFD_CLOEXEC.patch
0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.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-sd-event-restore-correct-timeout-behaviour.patch
0001-sd-rtnl-message-append-fix-uninitialized-memory.patch
0001-selinux-access-fix-broken-ternary-operator.patch
0001-shell-completion-fix-completion-of-inactive-units.patch
0001-shutdownd-clean-up-initialization-of-struct.patch
0001-socket-introduce-SELinuxContextFromNet-option.patch
0001-strv-add-an-additional-overflow-check-when-enlarging.patch
0001-systemctl-Correct-error-message-printed-when-bus_pro.patch
0001-systemctl-allow-to-change-the-default-target-without.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-systemd-detect-virt-detect-s390-virtualization.patch
0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch
0001-sysv-order-initscripts-which-provide-network-before-.patch
0001-tmpfiles-compare-return-against-correct-errno.patch
0001-tmpfiles-fix-permissions-on-new-journal-files.patch
0001-umount-modernizations.patch
0001-units-introduce-network-pre.target-as-place-to-hook-.patch
0001-units-make-ExecStopPost-action-part-of-ExecStart.patch
0001-units-make-sure-rfkill-service-is-bount-to-the-actua.patch
0001-units-order-network-online.target-after-network.targ.patch
0001-units-systemd-sysctl.service.in-run-after-load-modul.patch
0001-units-tmpfiles-setup-dev-allow-unsafe-file-creation-.patch
0001-util-consider-0x7F-a-control-chracter-which-it-is-DE.patch
0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch
0001-virt-detect-that-we-are-running-inside-the-docker-co.patch
0001-virt-rework-container-detection-logic.patch
0002-Add-hwdb-entry-for-Samsung-Series-7-Ultra.patch
0002-Be-more-verbose-when-bind-or-listen-fails.patch
0002-analyze-avoid-a-null-dereference.patch
0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch
0002-architecture-Add-cris.patch
0002-backlight-do-nothing-if-max_brightness-is-0.patch
0002-bootchart-use-n-a-if-PRETTY_NAME-is-not-found.patch
0002-bus-fix-memory-leak-when-kdbus-is-not-enabled.patch
0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch
0002-bus-remove-unused-check.patch
0002-core-make-sure-Environment-fields-passed-in-for-tran.patch
0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch
0002-core-watchdog-bus-properties-cannot-be-both-writable.patch
0002-execute-free-directory-path-if-we-fail-to-remove-it-.patch
0002-fsck-include-device-name-in-the-message-about-missin.patch
0002-hostnamed-add-a-new-chassis-type-for-watches.patch
0002-hwdb-Add-mapping-for-special-keys-on-compaq-ku-0133-.patch
0002-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0002-hwdb-update.patch
0002-include-fcntl.h-rather-than-sys-fcntl.h.patch
0002-journal-compress-improve-xz-compression-performance.patch
0002-journal-properly-detect-language-specified-in-line.patch
0002-journalctl-man-allow-only-between-terms.patch
0002-journald-make-MaxFileSec-really-default-to-1month.patch
0002-keymap-Add-microphone-mute-keymap-for-Dell-Latitude.patch
0002-keymap-Asus-EeePC-touchpad-toggle-key.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-login-set-pos-slot-to-fallback-on-pos-eviction.patch
0002-logind-add-support-for-TPS65217-Power-Button.patch
0002-logind-bring-polkit-policy-for-hibernate-in-line-wit.patch
0002-logind-fix-printf-format.patch
0002-machined-fix-Kill-bus-call-on-machine-objects-when-w.patch
0002-man-document-yearly-and-annually-in-systemd.time-7.patch
0002-man-note-that-entire-sections-can-now-be-ignored.patch
0002-man-tmpfiles.d-recommend-using-b-and-c.patch
0002-manager-flush-memory-stream-before-using-the-buffer.patch
0002-namespace-fix-uninitialized-memory-access.patch
0002-namespace-when-setting-up-an-inaccessible-mount-poin.patch
0002-nspawn-restore-journal-directory-is-empty-check.patch
0002-pam_systemd-use-F_DUPFD_CLOEXEC-when-dupping-session.patch
0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch
0002-shell-completion-prevent-mangling-unit-names.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-switch-root-umount-the-old-root-correctly.patch
0002-sysctl-replaces-some-slashes-with-dots.patch
0002-systemctl-obey-state-in-list-unit-files.patch
0002-systemctl-show-BindsTo-BoundBy-in-list-dependencies.patch
0002-systemctl-update-NAME-to-PATTERN-in-help.patch
0002-systemd-fix-error-message.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
0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch
0002-units-order-systemd-fsck-.service-after-local-fs-pre.patch
0002-units-serial-getty-.service-use-the-default-RestartS.patch
0002-util-avoid-non-portable-__WORDSIZE.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-util-fix-has-cc-check-and-add-test.patch
0002-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch
0002-util-remove-a-unnecessary-check.patch
0002-util-when-unescaping-strings-don-t-allow-smuggling-i.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-Add-quotes-to-warning-message.patch
0003-Always-check-asprintf-return-code.patch
0003-Do-not-print-invalid-UTF-8-in-error-messages.patch
0003-Quote-unit-names-in-suggested-systemctl-commandlines.patch
0003-analyze-fix-mem-leak.patch
0003-analyze-fix-plot-with-bad-y-size.patch
0003-arch-add-crisv32-to-uname-check.patch
0003-architecture-add-string-table-entries-for-mips-le-ar.patch
0003-backlight-unify-error-messages.patch
0003-bootchart-it-s-not-OK-to-return-1-from-a-main-progra.patch
0003-bootchart-parse-userinput-with-safe_atoi.patch
0003-busname-don-t-drop-service-from-the-result-string.patch
0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch
0003-core-allow-transient-mount-units.patch
0003-core-make-sure-to-serialize-jobs-for-all-units.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-core-nicer-message-when-inotify-watches-are-exhauste.patch
0003-cryptsetup-default-to-no-hash-when-keyfile-is-specif.patch
0003-delta-do-not-use-unicode-chars-in-C-locale.patch
0003-fileio-label-return-error-when-writing-fails.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
0003-hwdb-PCI-include-primary-model-string-in-subsystem-m.patch
0003-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0003-install-fix-invalid-free-in-unit_file_mask.patch
0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch
0003-keymap-Adjust-for-more-Samsung-900X4-series.patch
0003-keymap-Annotate-all-micmute-workarounds.patch
0003-keymap-Fix-HP-Pavillon-DV7.patch
0003-localed-consider-an-unset-model-as-a-wildcard.patch
0003-login-Allow-calling-org.freedesktop.login1.Seat.Swit.patch
0003-logind-ignore-lid-switch-events-for-30s-after-each-s.patch
0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch
0003-man-we-don-t-have-Wanted-dependency.patch
0003-mount-order-options-before-other-arguments-to-mount.patch
0003-namespace-make-sure-tmp-var-tmp-and-dev-are-writable.patch
0003-sd-bus-check-return-value-of-vasprintf.patch
0003-sd-bus-don-t-use-assert_return-to-check-for-disconne.patch
0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch
0003-sd-event-always-call-epoll_ctl-on-mask-updates-if-ed.patch
0003-sd-journal-properly-convert-object-size-on-big-endia.patch
0003-shared-install-avoid-prematurely-rejecting-missing-u.patch
0003-systemd-use-pager-for-test-and-help.patch
0003-time-earlier-exit-from-format_timestamp_relative-on-.patch
0003-tty-ask-password-agent-return-negative-errno.patch
0003-udev-event-explicitly-don-t-read-from-invalid-fd.patch
0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch
0003-units-remove-RefuseManualStart-from-units-which-are-.patch
0003-units-use-KillMode-mixed-for-systemd-nspawn-.service.patch
0003-utf8-when-looking-at-the-next-unichar-honour-the-siz.patch
0004-Raise-level-of-Found-dependency.-lines.patch
0004-architecture-remove-cris-from-uname-list.patch
0004-backlight-Avoid-error-when-state-restore-is-disabled.patch
0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch
0004-bash-completion-use-list-unit-files-to-get-all-units.patch
0004-bootchart-check-return-of-strftime.patch
0004-config-parser-fix-mem-leak.patch
0004-core-Added-support-for-ERRNO-NOTIFY_SOCKET-message-p.patch
0004-core-don-t-try-to-relabel-mounts-before-we-loaded-th.patch
0004-core-fix-transaction-destructiveness-check-once-more.patch
0004-core-map-the-rescue-argument-to-rescue.target.patch
0004-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch
0004-fileio-quote-more-shell-characters-in-envfiles.patch
0004-fix-off-by-one-error-in-array-index-assertion.patch
0004-fix-typo-in-iDRAC-network-interface-name-irdac-idrac.patch
0004-getty-generator-properly-escape-instance-names.patch
0004-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0004-hwdb-update-format-description-and-document-reloadin.patch
0004-hwdb-update.patch
0004-implement-a-union-to-pad-out-file_handle.patch
0004-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch
0004-journal-do-server_vacuum-for-sigusr1.patch
0004-login-set_controller-should-fail-if-prepare_vt-fails.patch
0004-logind-Do-not-fail-display-count-if-a-device-has-no-.patch
0004-machined-make-sure-GetMachineAddresses-is-available-.patch
0004-man-document-missing-options-of-systemd-run.patch
0004-sd-bus-if-we-don-t-manage-to-properly-allocate-the-e.patch
0004-sd-bus-when-an-event-loop-terminates-explicitly-clos.patch
0004-sd-event-check-the-value-of-received-signal.patch
0004-sd-journal-verify-that-object-start-with-the-field-n.patch
0004-selinux-fix-potential-double-free-crash-in-child-pro.patch
0004-shared-conf-parser.patch
0004-shared-wtmp-utmp-don-t-clear-store_wtmp-in-utmp_put_.patch
0004-socket-properly-handle-if-our-service-vanished-durin.patch
0004-systemd-detect-virt-only-discover-Xen-domU.patch
0004-systemd-python-use-.hex-instead-of-.get_hex.patch
0004-systemd-return-the-first-error-from-manager_startup.patch
0004-util-ignore_file-should-not-allow-files-ending-with.patch
0004-util-refuse-considering-UID-0xFFFF-and-0xFFFFFFFF-va.patch
0005-Replace-var-run-with-run-in-remaining-places.patch
0005-backlight-Do-not-clamp-brightness-for-LEDs.patch
0005-backlight-handle-saved-brightness-exceeding-max-brig.patch
0005-bootchart-Do-not-try-to-access-data-for-non-existing.patch
0005-bus-avoid-using-m-kdbus-after-freeing-it.patch
0005-bus-close-a-bus-that-failed-to-connect.patch
0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch
0005-core-only-set-the-kernel-s-timezone-when-the-RTC-run.patch
0005-cryptsetup-fix-an-OOM-check.patch
0005-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0005-hwdb-update.patch
0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch
0005-journalctl-correct-help-text-for-until.patch
0005-login-fix-mem-leak.patch
0005-logind-fix-policykit-checks.patch
0005-logind-fix-typo.patch
0005-logind-move-lid-switch-handling-from-logind-main-to-.patch
0005-man-fix-path-in-crypttab-5.patch
0005-nspawn-block-open_by_handle_at-and-others-via-seccom.patch
0005-po-add-Greek-translation.patch
0005-sd-daemon-fix-incorrect-variable-access.patch
0005-sd-id128-do-stricter-checking-of-random-boot-id.patch
0005-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch
0005-service-don-t-accept-negative-ERRNO-notification-mes.patch
0005-shared-label.h-add-missing-stdio.h-include.patch
0005-systemd-python-fix-failing-assert.patch
0005-systemd-run-add-some-extra-safety-checks.patch
0005-units-order-sd-journal-flush-after-sd-remount-fs.patch
0005-util-avoid-double-close-of-fd.patch
0006-Do-not-return-1-EINVAL-on-allocation-error.patch
0006-Revert-back-to-var-run-at-a-couple-of-problems.patch
0006-bus-unref-buscreds-on-failure.patch
0006-calendarspec-fix-typo-in-annually.patch
0006-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0006-hwdb-update.patch
0006-journal-assume-that-next-entry-is-after-previous-ent.patch
0006-journald-fix-minor-memory-leak.patch
0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch
0006-login-add-mir-to-the-list-of-session-types.patch
0006-login-share-VT-signal-handler-between-sessions.patch
0006-man-clarify-that-the-ExecReload-command-should-be-sy.patch
0006-parse_boolean-require-exact-matches.patch
0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch
0006-sd-event-initialization-perturbation-value-right-bef.patch
0006-shared-sparse-endian.h-add-missing-byteswap.h-includ.patch
0006-systemctl-fix-resource-leak-CID-1237747.patch
0006-systemctl-show-StatusErrno-value-in-systemctl-status.patch
0006-tmpfiles-don-t-do-automatic-cleanup-in-XDG_RUNTIME_D.patch
0006-tty-ask-password-agent-Do-tell-what-directory-we-fai.patch
0007-README-document-that-var-run-must-be-a-symlink-run.patch
0007-core-fix-a-potential-mem-leak.patch
0007-dbus-suppress-duplicate-and-misleading-messages.patch
0007-drop_duplicates-copy-full-BindMount-struct.patch
0007-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0007-hwdb-update.patch
0007-journal-forget-file-after-encountering-an-error.patch
0007-journald-also-check-journal-file-size-to-deduce-if-i.patch
0007-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch
0007-keyboard-add-Plantronics-.Audio-mute-button.patch
0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch
0007-logind-fix-Display-property-of-user-objects.patch
0007-man-readahead-fix-cmdline-switch-inconsistency-betwe.patch
0007-networkd-fix-typo.patch
0007-po-add-German-translation.patch
0007-sd-event-don-t-accidentally-turn-of-watchdog-timer-e.patch
0007-service-flush-status-text-and-errno-values-each-time.patch
0007-systemctl-do-not-ignore-errors-in-symlink-removal.patch
0007-units-skip-mounting-tmp-if-it-is-a-symlink.patch
0008-Reset-signal-mask-on-re-exec-to-init.patch
0008-Use-var-run-dbus-system_bus_socket-for-the-D-Bus-soc.patch
0008-core-correctly-unregister-PIDs-from-PID-hashtables.patch
0008-core-smack-setup-Actually-allow-for-succesfully-load.patch
0008-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0008-hwdb-update.patch
0008-journald-fix-memory-leak-on-error-path.patch
0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch
0008-man-update-journald-rate-limit-defaults.patch
0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch
0008-sd-bus-don-t-access-invalid-memory-if-a-signal-match.patch
0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patch
0008-shell-completion-prevent-mangling-unit-names-bash.patch
0008-systemctl-kill-mode-is-long-long-gone-don-t-mention-.patch
0008-util-introduce-sethostname_idempotent.patch
0009-ask-password-when-the-user-types-a-overly-long-passw.patch
0009-bus-fix-bus_print_property-to-use-int-for-booleans.patch
0009-core-clean-up-signal-reset-logic-when-reexec.patch
0009-hwdb-Update-database-of-Bluetooth-company-identifier.patch
0009-hwdb-update.patch
0009-journal-do-not-leak-mmaps-on-OOM.patch
0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch
0009-journald-always-add-syslog-facility-for-messages-com.patch
0009-logind-fix-reference-to-systemd-user-sessions.servic.patch
0009-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch
0009-nspawn-properly-format-container_uuid-in-UUID-format.patch
0009-sd-bus-don-t-choke-if-somebody-sends-us-a-message-wi.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-logind-allow-suspending-if-there-are-no-displays.patch
0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch
0010-man-update-link-to-LSB.patch
0010-manager-use-correct-cleanup-function.patch
0010-mount-don-t-fire-PropertiesChanged-signals-for-mount.patch
0010-shutdown-do-final-unmounting-only-if-not-running-ins.patch
0010-util-treat-fuse.sshfs-as-a-network-filesystem.patch
0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch
0011-logs-show-fix-corrupt-output-with-empty-messages.patch
0011-man-systemd-bootchart-fix-spacing-in-command.patch
0011-selinux-make-sure-we-do-not-try-to-print-missing-fie.patch
0011-units-fix-BindsTo-logic-when-applied-relative-to-ser.patch
0012-core-transaction-avoid-misleading-error-message-when.patch
0012-journalctl-refuse-extra-arguments-with-verify-and-si.patch
0012-journald-remove-stray-reset-of-error-return-value.patch
0012-man-add-missing-comma.patch
0012-manager-do-not-print-anything-while-passwords-are-be.patch
0012-util-try-to-be-a-bit-more-NFS-compatible-when-checki.patch
0013-core-libsystemd-systemd-timedate-udev-spelling-fixes.patch
0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch
0014-nspawn-fix-detection-of-missing-proc-self-loginuid.patch
0018-Make-LSB-Skripts-know-about-Required-and-Should.patch
1008-add-msft-compability-rules.patch
1009-cdrom_id-use-the-old-MMC-fallback.patch
1010-udev-increase-result-size-for-programs.patch
1014-udev-update-net_id-comments.patch
1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
1016-udev-warn-when-name_to_handle_at-is-not-implemented.patch
1017-udev-serialize-synchronize-block-device-event-handli.patch
1018-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch
1019-udev-avoid-use-of-uninitialized-err.patch
1020-udev-keyboard-also-hook-into-change-events.patch
1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch
1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch
1024-udev-always-close-lock-file-descriptor.patch
1025-udev-exclude-device-mapper-from-block-device-ownersh.patch
1026-udevd-inotify-modernizations.patch
1027-udev-synthesize-change-events-for-partitions-when-to.patch
1028-udev-link-config-fix-mem-leak.patch
1029-udev-try-first-re-reading-the-partition-table.patch
1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch
1031-udev-make-sure-we-always-get-change-for-the-disk.patch
1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch
1033-udev-really-exclude-device-mapper-from-block-device.patch
1034-udev-check-the-return-value-from-udev_enumerate_scan.patch
1038-udev-fix-invalid-free-in-enable_name_policy.patch
1039-udevadm-settle-fixed-return-code-for-empty-queue.patch
1041-libudev-fix-udev_queue_get_queue_is_empty-logic.patch
1042-libudev-queue-provide-file-descriptor-to-watch-busy-.patch
1043-libudev-queue-watch-entire-directory-to-allow-the-re.patch
1044-rules-update-qemu-hid-rules.patch
1045-rules-don-t-enable-usb-pm-for-Avocent-devices.patch
1047-udev-net_setup_link-builtin-should-print-the-reason-.patch
1048-udev-net_setup_link-add-a-bit-more-logging.patch
1049-udev-link_config-ignore-errors-due-to-missing-MAC-ad.patch
1052-rules-uaccess-add-ID_SOFTWARE_RADIO.patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
1056-udevd-add-event-timeout-commandline-option.patch
1057-udev-unify-event-timeout-handling.patch
1058-udev-unify-event-timeout-handling.patch
1059-udev-fixup-commit-dd5eddd28a74a49607a8fffcaf960040db.patch
1061-rules-allow-systemd-to-manage-loop-device-partitions.patch
1063-udev-path_id-suppress-ID_PATH-for-devices-with-an-un.patch
1064-udev-hwdb-do-not-look-at-usb_device-parents.patch
1065-udev-bump-event-timeout-to-60-seconds.patch
1067-udev-always-resolve-correctly-database-names-on-chan.patch
1068-udev-net_setup_link-export-the-.link-filename-applie.patch
1069-rules-net-setup-link-preserve-ID_NET_LINK_FILE-and-I.patch
1070-rules-net-setup-link-remove-stray-linebreak.patch
1071-udev-import-the-full-db-on-MOVE-events-for-devices-w.patch
1072-udev-netif_rename-don-t-log-to-kmsg.patch
1073-udev-drop-print_kmsg.patch
1074-udev-fix-copy-paste-error-in-log-message.patch
1075-udev-timeout-increase-timeout.patch
1076-udev-timeout-warn-after-a-third-of-the-timeout-befor.patch
1077-udev-timeout-warn-after-a-third-of-the-timeout-befor.patch
1078-udev-remove-userspace-firmware-loading-support.patch
1079-udev-remove-userspace-firmware-loading-support.patch
1080-udevd-parse_argv-warn-if-argumens-are-invalid.patch
1081-udevd-check-return-of-various-functions.patch
1082-udevadm-hwdb-check-return-value-of-fseeko.patch
1083-udev-node-warn-if-chmod-chown-fails.patch
1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch
1085-udev-fix-typos.patch
1086-udevd-don-t-fail-if-run-udev-exists.patch
1087-infinit-timeout-for-kmod-loaded-modules.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
1098-udev-link_setup-respect-kernel-name-assign-policy.patch
513-nspawn-veth.patch
Revert-service-drop-support-for-SysV-scripts-for-the-early.patch
avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch
avoid-leaking-socket-descriptors.patch
boot.udev
disable-nss-myhostname-warning-bnc-783841.patch
fix-owner-of-var-log-btmp.patch
handle-SYSTEMCTL_OPTIONS-environment-variable.patch
handle-etc-HOSTNAME.patch
localfs.service
log-target-null-instead-kmsg.patch
module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch
optionally-warn-if-nss-myhostname-is-called.patch
prepare-suspend-to-disk.patch
remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch
service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch
shut-up-annoying-assertion-monotonic-clock-message.patch
systemd-210.tar.xz
systemd-journald.init
systemd-sleep-grub
timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch
tmpfiles-do-not-clean-for-mandb-index-files.patch
use-usr-sbin-sulogin-for-emergency-service.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ systemd-mini.spec ++++++
++++ 2296 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/systemd/systemd-mini.spec
++++ and /work/SRC/openSUSE:Factory/.systemd.new/systemd-mini.spec
systemd.spec: same change
++++++ 0001-Clear-up-confusion-wrt.-ENTRY_SIZE_MAX-and-DATA_SIZE.patch ++++++
Based on 874bc134ac6504c45e94174e37af13ff21a6bfe2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From 5effdfa831d75306fc0ff9b47d39997e4ae87f16 Mon Sep 17 00:00:00 2001 From: Michael Meeks
Date: Tue, 11 Feb 2014 14:42:26 +0000 Subject: [PATCH] Don't snprintf a potentially NULL pointer.
--- src/shared/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/log.c b/src/shared/log.c index 2a075ff..d6b138f 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -479,7 +479,7 @@ static int log_do_header(char *header, size_t size, func ? "CODE_FUNCTION=" : "", func ? LINE_MAX : 0, func, func ? "\n" : "", - object ? object_name : "", + object_name ? object_name : "", object ? LINE_MAX : 0, object, /* %.0s means no output */ object ? "\n" : "", program_invocation_short_name); -- 1.8.4.5 ++++++ 0001-Fix-systemd-stdio-bridge-symlink.patch ++++++
From 8100c1a8f58b2fb5d97e156420a7e16562e93bc4 Mon Sep 17 00:00:00 2001 From: Mike Gilbert
Date: Sun, 2 Mar 2014 23:37:39 -0500 Subject: [PATCH] Fix systemd-stdio-bridge symlink
The symlink is created in bindir (/usr/bin), and points to a binary which lives in rootlibexecdir (/lib/systemd or /usr/lib/systemd). A relative symlink does not work here. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git Makefile.am Makefile.am index 38445fb..e7134a2 100644 --- Makefile.am +++ Makefile.am @@ -1978,7 +1978,7 @@ systemd_bus_proxyd_LDADD = \ bus-proxyd-install-hook: $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) - $(AM_V_LN)$(LN_S) -f ../lib/systemd/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge + $(AM_V_LN)$(LN_S) -f $(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge bus-proxyd-uninstall-hook: rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge -- 1.7.9.2 ++++++ 0001-Fix-warning-about-unused-variable-with-SELINUX.patch ++++++
From 493d521d9ffe706741665a88ea14929913ea2eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Tue, 23 Sep 2014 09:22:40 -0400 Subject: [PATCH] Fix warning about unused variable with !SELINUX
src/shared/label.c:255:15: warning: unused variable 'l' [-Wunused-variable] char *l = NULL; ^ --- src/shared/label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/shared/label.c src/shared/label.c index 02b41f0..b6af38d 100644 --- src/shared/label.c +++ src/shared/label.c @@ -252,9 +252,10 @@ fail: int label_get_our_label(char **label) { int r = -EOPNOTSUPP; - char *l = NULL; #ifdef HAVE_SELINUX + char *l = NULL; + r = getcon(&l); if (r < 0) return r; -- 1.7.9.2 ++++++ 0001-On_s390_con3270_disable_ANSI_colour_esc.patch ++++++ --- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:20:59.000000000 +0100 +++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:20:59.000000000 +0100 @@ -1,29 +1,25 @@ --- rules/99-systemd.rules.in | 2 - src/core/manager.c | 24 ++++++++--- - src/shared/util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++-- + src/core/manager.c | 24 ++++++++-- + src/shared/util.c | 101 ++++++++++++++++++++++++++++++++++++++++++++-- src/shared/util.h | 1 - 4 files changed, 116 insertions(+), 10 deletions(-) + 4 files changed, 118 insertions(+), 10 deletions(-) -Index: systemd/rules/99-systemd.rules.in -=================================================================== ---- systemd.orig/rules/99-systemd.rules.in -+++ systemd/rules/99-systemd.rules.in +--- systemd-208/rules/99-systemd.rules.in ++++ systemd-208/rules/99-systemd.rules.in 2014-02-05 10:34:17.346235540 +0000 @@ -7,7 +7,7 @@ ACTION=="remove", GOTO="systemd_end" --SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd" +-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*", TAG+="systemd" +SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd" KERNEL=="vport*", TAG+="systemd" -Index: systemd/src/core/manager.c -=================================================================== ---- systemd.orig/src/core/manager.c -+++ systemd/src/core/manager.c -@@ -113,7 +113,7 @@ static int manager_watch_jobs_in_progres +--- systemd-210/src/core/manager.c ++++ systemd-210/src/core/manager.c 2014-04-30 10:51:43.398735332 +0000 +@@ -110,7 +110,7 @@ static int manager_watch_jobs_in_progres #define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1)) @@ -32,7 +28,7 @@ char *p = buffer; assert(buflen >= CYLON_BUFFER_EXTRA + width + 1); -@@ -122,12 +122,14 @@ static void draw_cylon(char buffer[], si +@@ -119,12 +119,14 @@ static void draw_cylon(char buffer[], si if (pos > 1) { if (pos > 2) p = mempset(p, ' ', pos-2); @@ -49,7 +45,7 @@ *p++ = '*'; } -@@ -138,7 +140,8 @@ static void draw_cylon(char buffer[], si +@@ -135,7 +137,8 @@ static void draw_cylon(char buffer[], si *p++ = '*'; if (pos < width-1) p = mempset(p, ' ', width-1-pos); @@ -59,7 +55,7 @@ } } -@@ -155,6 +158,7 @@ void manager_flip_auto_status(Manager *m +@@ -150,6 +153,7 @@ void manager_flip_auto_status(Manager *m } static void manager_print_jobs_in_progress(Manager *m) { @@ -67,7 +63,7 @@ _cleanup_free_ char *job_of_n = NULL; Iterator i; Job *j; -@@ -180,10 +184,20 @@ static void manager_print_jobs_in_progre +@@ -174,10 +178,20 @@ static void manager_print_jobs_in_progre assert(counter == print_nr + 1); assert(j); @@ -89,11 +85,9 @@ m->jobs_in_progress_iteration++; -Index: systemd/src/shared/util.c -=================================================================== ---- systemd.orig/src/shared/util.c -+++ systemd/src/shared/util.c -@@ -3212,6 +3212,7 @@ int status_vprintf(const char *status, b +--- systemd-210/src/shared/util.c ++++ systemd-210/src/shared/util.c 2014-04-30 10:39:17.154736438 +0000 +@@ -2886,6 +2886,7 @@ int status_vprintf(const char *status, b struct iovec iovec[6] = {}; int n = 0; static bool prev_ephemeral; @@ -101,12 +95,12 @@ assert(format); -@@ -3225,6 +3226,41 @@ int status_vprintf(const char *status, b +@@ -2899,6 +2900,41 @@ int status_vprintf(const char *status, b if (fd < 0) return fd; + if (_unlikely_(is_ansi_console < 0)) -+ is_ansi_console = ansi_console(fd); ++ is_ansi_console = (int)ansi_console(fd); + + if (status && !is_ansi_console) { + const char *esc, *ptr; @@ -143,7 +137,7 @@ if (ellipse) { char *e; size_t emax, sl; -@@ -3247,8 +3283,12 @@ int status_vprintf(const char *status, b +@@ -2921,8 +2957,12 @@ int status_vprintf(const char *status, b } } @@ -158,7 +152,7 @@ prev_ephemeral = ephemeral; if (status) { -@@ -3504,8 +3544,22 @@ void columns_lines_cache_reset(int signu +@@ -3169,12 +3209,47 @@ void columns_lines_cache_reset(int signu bool on_tty(void) { static int cached_on_tty = -1; @@ -182,9 +176,6 @@ return cached_on_tty; } -@@ -3523,6 +3577,27 @@ int files_same(const char *filea, const - a.st_ino == b.st_ino; - } +bool ansi_console(int fd) { + static int cached_ansi_console = -1; @@ -208,13 +199,13 @@ +} + int running_in_chroot(void) { - int ret; + struct stat a = {}, b = {}; -@@ -4006,7 +4081,23 @@ bool tty_is_vc_resolve(const char *tty) +@@ -3630,7 +3705,25 @@ bool tty_is_vc_resolve(const char *tty) const char *default_term_for_tty(const char *tty) { assert(tty); -- return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220"; +- return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt102"; + if (tty_is_vc_resolve(tty)) + return "TERM=linux"; + @@ -230,16 +221,16 @@ + if (streq(mode, "3270")) + return "TERM=ibm327x"; + } ++ if (streq(tty, "ttyS1")) ++ return "TERM=vt220"; +#endif -+ return "TERM=vt220"; ++ return "TERM=vt102"; } bool dirent_is_file(const struct dirent *de) { -Index: systemd/src/shared/util.h -=================================================================== ---- systemd.orig/src/shared/util.h -+++ systemd/src/shared/util.h -@@ -475,6 +475,7 @@ unsigned lines(void); +--- systemd-210/src/shared/util.h ++++ systemd-210/src/shared/util.h 2014-04-30 10:24:51.134235665 +0000 +@@ -418,6 +418,7 @@ unsigned lines(void); void columns_lines_cache_reset(int _unused_ signum); bool on_tty(void); ++++++ 0001-activate-fix-fd-leak-in-do_accept.patch ++++++
From aa44499da15a8fa7026463555a7a27e55e4e24a8 Mon Sep 17 00:00:00 2001 From: Philippe De Swert
Date: Wed, 10 Sep 2014 22:14:41 +0300 Subject: [PATCH] activate: fix fd leak in do_accept()
Found with Coverity. --- src/activate/activate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/activate/activate.c src/activate/activate.c index 8942773..0a1df37 100644 --- src/activate/activate.c +++ src/activate/activate.c @@ -242,7 +242,7 @@ static int launch1(const char* child, char** argv, char **env, int fd) { static int do_accept(const char* name, char **argv, char **envp, int fd) { _cleanup_free_ char *local = NULL, *peer = NULL; - int fd2; + _cleanup_close_ int fd2 = -1; fd2 = accept(fd, NULL, NULL); if (fd2 < 0) { -- 1.7.9.2 ++++++ 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch ++++++ --- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:20:59.000000000 +0100 +++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:20:59.000000000 +0100 @@ -1,13 +1,11 @@ --- - src/core/shutdown.c | 4 ++++ - src/systemctl/systemctl.c | 18 ++++++++++++------ - 2 files changed, 16 insertions(+), 6 deletions(-) + systemd-209/src/core/shutdown.c | 4 ++++ + systemd-209/src/systemctl/systemctl.c | 22 +++++++++++++++------- + 2 files changed, 19 insertions(+), 7 deletions(-) -Index: systemd-218/src/core/shutdown.c -=================================================================== ---- systemd-218.orig/src/core/shutdown.c -+++ systemd-218/src/core/shutdown.c -@@ -400,6 +400,10 @@ int main(int argc, char *argv[]) { +--- systemd-209/src/core/shutdown.c ++++ systemd-209/src/core/shutdown.c 2014-02-28 11:17:22.000000000 +0000 +@@ -449,6 +449,10 @@ int main(int argc, char *argv[]) { } reboot(cmd); @@ -18,11 +16,9 @@ if (errno == EPERM && in_container) { /* If we are in a container, and we lacked * CAP_SYS_BOOT just exit, this will kill our -Index: systemd-218/src/systemctl/systemctl.c -=================================================================== ---- systemd-218.orig/src/systemctl/systemctl.c -+++ systemd-218/src/systemctl/systemctl.c -@@ -94,6 +94,7 @@ static bool arg_no_pager = false; +--- systemd-209/src/systemctl/systemctl.c ++++ systemd-209/src/systemctl/systemctl.c 2014-02-28 11:19:35.000000000 +0000 +@@ -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; @@ -30,7 +26,7 @@ static bool arg_show_types = false; static bool arg_ignore_inhibitors = false; static bool arg_dry = false; -@@ -6813,6 +6814,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' }, @@ -38,7 +34,7 @@ { "no-wtmp", no_argument, NULL, 'd' }, { "no-wall", no_argument, NULL, ARG_NO_WALL }, {} -@@ -6865,10 +6867,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': @@ -53,17 +49,17 @@ case '?': return -EINVAL; -@@ -7511,7 +7516,8 @@ static int halt_now(enum action a) { - /* The kernel will automaticall flush ATA disks and suchlike - * on reboot(), but the file systems need to be synce'd - * explicitly in advance. */ -- sync(); +@@ -6274,20 +6279,23 @@ done: + + static int halt_now(enum action 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... */ -@@ -7519,14 +7525,14 @@ static int halt_now(enum action a) { ++ ++ /* Make sure C-A-D is handled by the kernel from this + * point on... */ + reboot(RB_ENABLE_CAD); switch (a) { @@ -71,11 +67,12 @@ - log_info("Halting."); - reboot(RB_HALT_SYSTEM); - return -errno; - +- case ACTION_POWEROFF: log_info("Powering off."); reboot(RB_POWER_OFF); -+ /* fall-through */ ++ /* Fall through */ ++ + case ACTION_HALT: + log_info("Halting."); + reboot(RB_HALT_SYSTEM); ++++++ 0001-add-network-device-after-NFS-mount-units.patch ++++++ --- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:20:59.000000000 +0100 +++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:20:59.000000000 +0100 @@ -11,23 +11,19 @@ src/shared/util.c | 1 5 files changed, 234 insertions(+), 2 deletions(-) -Index: systemd-218/Makefile.am -=================================================================== ---- systemd-218.orig/Makefile.am -+++ systemd-218/Makefile.am -@@ -1134,6 +1134,8 @@ libsystemd_core_la_SOURCES = \ +--- systemd-210/Makefile.am ++++ systemd-210/Makefile.am 2014-02-26 12:44:20.000000000 +0000 +@@ -994,6 +994,8 @@ libsystemd_core_la_SOURCES = \ src/core/machine-id-setup.h \ src/core/mount-setup.c \ src/core/mount-setup.h \ + src/core/mount-iface.c \ + src/core/mount-iface.h \ - src/core/kmod-setup.c \ - src/core/kmod-setup.h \ src/core/loopback-setup.h \ -Index: systemd-218/src/core/mount-iface.c -=================================================================== ---- /dev/null -+++ systemd-218/src/core/mount-iface.c + src/core/loopback-setup.c \ + src/core/condition.c \ +--- systemd-210/src/core/mount-iface.c ++++ systemd-210/src/core/mount-iface.c 2014-02-26 10:18:36.000000000 +0000 @@ -0,0 +1,173 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -170,7 +166,7 @@ + continue; + + ret = ifa->ifa_name; -+ break; ++ break; + } else if (ifa->ifa_addr->sa_family == AF_INET6) { + struct in6_addr *addr, *mask, dest, ip6; + unsigned int prefix; @@ -202,10 +198,8 @@ + freeifaddrs(ifa_list); + ifa_list = NULL; +} -Index: systemd-218/src/core/mount-iface.h -=================================================================== ---- /dev/null -+++ systemd-218/src/core/mount-iface.h +--- systemd-210/src/core/mount-iface.h ++++ systemd-210/src/core/mount-iface.h 2014-02-26 10:08:20.000000000 +0000 @@ -0,0 +1,25 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -232,11 +226,9 @@ + +char *host2iface(const char *ip); +void freeroutes(void); -Index: systemd-218/src/core/mount.c -=================================================================== ---- systemd-218.orig/src/core/mount.c -+++ systemd-218/src/core/mount.c -@@ -38,6 +38,7 @@ +--- systemd-210/src/core/mount.c ++++ systemd-210/src/core/mount.c 2014-03-03 12:13:23.406246117 +0000 +@@ -36,6 +36,7 @@ #include "mkdir.h" #include "path-util.h" #include "mount-setup.h" @@ -244,7 +236,7 @@ #include "unit-name.h" #include "dbus-mount.h" #include "special.h" -@@ -1365,8 +1366,9 @@ static int mount_add_one( +@@ -1388,8 +1389,9 @@ static int mount_add_one( _cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL; bool load_extras = false; MountParameters *p; @@ -255,7 +247,7 @@ int r; assert(m); -@@ -1391,6 +1393,8 @@ static int mount_add_one( +@@ -1414,6 +1416,8 @@ static int mount_add_one( if (!e) return -ENOMEM; @@ -264,16 +256,16 @@ u = manager_get_unit(m, e); if (!u) { delete = true; -@@ -1419,7 +1423,7 @@ static int mount_add_one( +@@ -1442,7 +1446,7 @@ static int mount_add_one( if (m->running_as == SYSTEMD_SYSTEM) { const char* target; -- target = mount_needs_network(options, fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; +- target = fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; + target = isnetwork ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; + r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true); if (r < 0) - goto fail; -@@ -1505,6 +1509,32 @@ static int mount_add_one( +@@ -1519,6 +1523,32 @@ static int mount_add_one( goto fail; } @@ -296,7 +288,7 @@ + else { + r = unit_add_dependency_by_name(u, UNIT_AFTER, target, NULL, true); + if (r < 0) -+ log_unit_error(u->id, "Failed to add dependency on %s, ignoring: %s", ++ log_error_unit(u->id, "Failed to add dependency on %s, ignoring: %s", + target, strerror(-r)); + } + } @@ -306,23 +298,21 @@ if (changed) unit_add_to_dbus_queue(u); -@@ -1560,6 +1590,7 @@ static int mount_load_proc_self_mountinf - if (r == 0 && k < 0) +@@ -1583,6 +1613,7 @@ static int mount_load_proc_self_mountinf + if (k < 0) r = k; } + freeroutes(); /* Just in case of using the routing table with host2iface() */ return r; } -Index: systemd-218/src/shared/util.c -=================================================================== ---- systemd-218.orig/src/shared/util.c -+++ systemd-218/src/shared/util.c -@@ -1667,6 +1667,7 @@ bool fstype_is_network(const char *fstyp +--- systemd-210/src/shared/util.c ++++ systemd-210/src/shared/util.c 2014-02-24 15:17:42.000000000 +0000 +@@ -1502,6 +1502,7 @@ bool fstype_is_network(const char *fstyp "ncp\0" "nfs\0" "nfs4\0" + "afs\0" "gfs\0" - "gfs2\0" - "glusterfs\0"; + "gfs2\0"; + ++++++ 0001-architecture-Add-tilegx.patch ++++++
From 46eea341c36f0caf0bdd5b2274a1ef7cb4e83e97 Mon Sep 17 00:00:00 2001 From: Henrik Grindal Bakken
Date: Thu, 27 Feb 2014 21:19:13 +0100 Subject: [PATCH] architecture: Add tilegx
Add Tilera's TILE-GX processor family support. --- src/shared/architecture.c | 3 +++ src/shared/architecture.h | 3 +++ 2 files changed, 6 insertions(+) diff --git src/shared/architecture.c src/shared/architecture.c index ceba492..fcdb3d5 100644 --- src/shared/architecture.c +++ src/shared/architecture.c @@ -112,6 +112,8 @@ Architecture uname_architecture(void) { { "sh", ARCHITECTURE_SH }, #elif defined(__m68k__) { "m68k", ARCHITECTURE_M68K }, +#elif defined(__tilegx__) + { "tilegx", ARCHITECTURE_TILEGX }, #else #error "Please register your architecture here!" #endif @@ -158,6 +160,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = { [ARCHITECTURE_SH] = "sh", [ARCHITECTURE_SH64] = "sh64", [ARCHITECTURE_M68K] = "m68k", + [ARCHITECTURE_TILEGX] = "tilegx", }; DEFINE_STRING_TABLE_LOOKUP(architecture, Architecture); diff --git src/shared/architecture.h src/shared/architecture.h index 3183645..e589a91 100644 --- src/shared/architecture.h +++ src/shared/architecture.h @@ -47,6 +47,7 @@ typedef enum Architecture { ARCHITECTURE_SH, ARCHITECTURE_SH64, ARCHITECTURE_M68K, + ARCHITECTURE_TILEGX, _ARCHITECTURE_MAX, _ARCHITECTURE_INVALID = -1 } Architecture; @@ -107,6 +108,8 @@ Architecture uname_architecture(void); # define native_architecture() ARCHITECTURE_SH #elif defined(__m68k__) # define native_architecture() ARCHITECTURE_M68K +#elif defined(__tilegx__) +# define native_architecture() ARCHITECTURE_TILEGX #else #error "Please register your architecture here!" #endif -- 1.7.9.2 ++++++ 0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch ++++++
From 7b909d7407965c03caaba30daae7aee113627a83 Mon Sep 17 00:00:00 2001 From: Josh Triplett
Date: Tue, 11 Mar 2014 21:16:33 -0700 Subject: [PATCH] backlight: Avoid restoring brightness to an unreadably dim level
Some systems turn the backlight all the way off at the lowest levels. Clamp saved brightness to at least 1 or 5% of max_brightness. This avoids preserving an unreadably dim screen, which would otherwise force the user to disable state restoration. --- src/backlight/backlight.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git src/backlight/backlight.c src/backlight/backlight.c index 81470b3..abf8bcf 100644 --- src/backlight/backlight.c +++ src/backlight/backlight.c @@ -192,6 +192,48 @@ static bool validate_device(struct udev *udev, struct udev_device *device) { return true; } +/* Some systems turn the backlight all the way off at the lowest levels. + * clamp_brightness clamps the saved brightness to at least 1 or 5% of + * max_brightness. This avoids preserving an unreadably dim screen, which + * would otherwise force the user to disable state restoration. */ +static void clamp_brightness(struct udev_device *device, char **value) { + int r; + const char *max_brightness_str; + unsigned brightness, max_brightness, new_brightness; + + max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness"); + if (!max_brightness_str) { + log_warning("Failed to read max_brightness attribute; not checking saved brightness"); + return; + } + + r = safe_atou(*value, &brightness); + if (r < 0) { + log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r)); + return; + } + + r = safe_atou(max_brightness_str, &max_brightness); + if (r < 0) { + log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r)); + return; + } + + new_brightness = MAX3(brightness, 1U, max_brightness/20); + if (new_brightness != brightness) { + char *old_value = *value; + + r = asprintf(value, "%u", new_brightness); + if (r < 0) { + log_oom(); + return; + } + + log_debug("Saved brightness %s too low; increasing to %s.", old_value, *value); + free(old_value); + } +} + int main(int argc, char *argv[]) { _cleanup_udev_unref_ struct udev *udev = NULL; _cleanup_udev_device_unref_ struct udev_device *device = NULL; @@ -306,6 +348,8 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } + clamp_brightness(device, &value); + r = udev_device_set_sysattr_value(device, "brightness", value); if (r < 0) { log_error("Failed to write system attribute: %s", strerror(-r)); -- 1.7.9.2 ++++++ 0001-bash-completion-fix-__get_startable_units.patch ++++++
From a163b64c4b08e8a4ad39a9a295acf3d1634024a3 Mon Sep 17 00:00:00 2001 From: Dan Kilman
Date: Sun, 13 Apr 2014 18:06:13 +0300 Subject: [PATCH] bash completion: fix __get_startable_units
--- shell-completion/bash/systemctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git shell-completion/bash/systemctl shell-completion/bash/systemctl index 992e52d..e1c8420 100644 --- shell-completion/bash/systemctl +++ shell-completion/bash/systemctl @@ -56,7 +56,7 @@ __get_all_units () { __systemctl $1 list-units --all \ __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 \ - | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed " ]] && echo " $a"; done; }; } + | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed" ]] && 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 \ -- 1.7.9.2 ++++++ 0001-bash-completion-p-option-for-journalctl.patch ++++++
From be8f4a9fa732d61e845e1ab1a62ac3a6b368d3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sat, 19 Jul 2014 19:46:04 -0400 Subject: [PATCH] bash-completion: -p option for journalctl
---
shell-completion/bash/journalctl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git shell-completion/bash/journalctl shell-completion/bash/journalctl
index e4b2f4a..14dcd22 100644
--- shell-completion/bash/journalctl
+++ shell-completion/bash/journalctl
@@ -35,6 +35,8 @@ __journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
_UDEV_{SYSNAME,DEVNODE,DEVLINK}
__CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP)
+__syslog_priorities=(emerg alert crit err warning notice info debug)
+
_journalctl() {
local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
@@ -44,8 +46,8 @@ _journalctl() {
--no-tail -q --quiet --setup-keys --this-boot --verify
--version --list-catalog --update-catalog --list-boots'
[ARG]='-b --boot --this-boot -D --directory --file -F --field
- -o --output -u --unit --user-unit'
- [ARGUNKNOWN]='-c --cursor --interval -n --lines -p --priority --since --until
+ -o --output -u --unit --user-unit -p --priority'
+ [ARGUNKNOWN]='-c --cursor --interval -n --lines --since --until
--verify-key'
)
@@ -68,6 +70,9 @@ _journalctl() {
--field|-F)
comps=${__journal_fields[*]}
;;
+ --priority|-p)
+ comps=${__syslog_priorities[*]}
+ ;;
--unit|-u)
comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null)
;;
--
1.7.9.2
++++++ 0001-bnc888612-logind-polkit-acpi.patch ++++++
--- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:20:59.000000000 +0100
+++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:20:59.000000000 +0100
@@ -3,11 +3,11 @@
src/login/logind-dbus.c | 20 ++++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
-Index: systemd-218/src/login/logind-action.c
+Index: systemd-210/src/login/logind-action.c
===================================================================
---- systemd-218.orig/src/login/logind-action.c
-+++ systemd-218/src/login/logind-action.c
-@@ -83,6 +83,11 @@ int manager_handle_action(
+--- systemd-210.orig/src/login/logind-action.c
++++ systemd-210/src/login/logind-action.c
+@@ -101,6 +101,11 @@ int manager_handle_action(
/* If the key handling is inhibited, don't do anything */
if (inhibit_key > 0) {
@@ -19,11 +19,11 @@
if (manager_is_inhibited(m, inhibit_key, INHIBIT_BLOCK, NULL, true, false, 0, NULL)) {
log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key));
return 0;
-Index: systemd-218/src/login/logind-dbus.c
+Index: systemd-210/src/login/logind-dbus.c
===================================================================
---- systemd-218.orig/src/login/logind-dbus.c
-+++ systemd-218/src/login/logind-dbus.c
-@@ -1487,9 +1487,11 @@ static int method_do_shutdown_or_sleep(
+--- systemd-210.orig/src/login/logind-dbus.c
++++ systemd-210/src/login/logind-dbus.c
+@@ -1469,9 +1469,11 @@ static int method_do_shutdown_or_sleep(
sd_bus_error *error) {
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
@@ -36,7 +36,7 @@
assert(m);
assert(message);
-@@ -1533,7 +1535,17 @@ static int method_do_shutdown_or_sleep(
+@@ -1515,7 +1517,17 @@ static int method_do_shutdown_or_sleep(
multiple_sessions = r > 0;
blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL);
@@ -52,24 +52,24 @@
+
+
+ if (multiple_sessions && !shutdown_through_acpi) {
- r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, &m->polkit_registry, error);
+ r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message,
+ action_multiple_sessions, interactive, error, method, m);
if (r < 0)
- return r;
-@@ -1541,7 +1553,7 @@ static int method_do_shutdown_or_sleep(
+@@ -1524,7 +1536,7 @@ static int method_do_shutdown_or_sleep(
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
- if (blocked) {
+ if (blocked && !shutdown_through_acpi) {
- r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, &m->polkit_registry, error);
+ r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message,
+ action_ignore_inhibit, interactive, error, method, m);
if (r < 0)
- return r;
-@@ -1549,7 +1561,7 @@ static int method_do_shutdown_or_sleep(
+@@ -1533,7 +1545,7 @@ static int method_do_shutdown_or_sleep(
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
}
- if (!multiple_sessions && !blocked) {
+ if (!multiple_sessions && !blocked && !shutdown_through_acpi) {
- r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, &m->polkit_registry, error);
+ r = bus_verify_polkit_async(m->bus, &m->polkit_registry, message,
+ action, interactive, error, method, m);
if (r < 0)
- return r;
++++++ 0001-build-sys-use-glibc-s-xattr-support-instead-of-requi.patch ++++++
Based on d2edfae0f9bdbecf6a8518e2a5bcf06f470e0d9e Mon Sep 17 00:00:00 2001
From: Kay Sievers
From a641dcd9bf05418d6a6c165e1c0cff615b4a0f47 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 18 Mar 2014 04:06:36 +0100 Subject: [PATCH] cgroup: it's not OK to invoke alloca() in loops
---
src/core/mount-setup.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git src/core/mount-setup.c src/core/mount-setup.c
index 387030a..c6d3f4b 100644
--- src/core/mount-setup.c
+++ src/core/mount-setup.c
@@ -216,10 +216,10 @@ int mount_setup_early(void) {
}
int mount_cgroup_controllers(char ***join_controllers) {
- int r;
- char buf[LINE_MAX];
_cleanup_set_free_free_ Set *controllers = NULL;
_cleanup_fclose_ FILE *f;
+ char buf[LINE_MAX];
+ int r;
/* Mount all available cgroup controllers that are built into the kernel. */
@@ -262,6 +262,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
}
for (;;) {
+ _cleanup_free_ char *options = NULL, *controller = NULL, *where = NULL;
MountPoint p = {
.what = "cgroup",
.type = "cgroup",
@@ -269,7 +270,6 @@ int mount_cgroup_controllers(char ***join_controllers) {
.mode = MNT_IN_CONTAINER,
};
char ***k = NULL;
- _cleanup_free_ char *options = NULL, *controller;
controller = set_steal_first(controllers);
if (!controller)
@@ -286,7 +286,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
for (i = *k, j = *k; *i; i++) {
if (!streq(*i, controller)) {
- char _cleanup_free_ *t;
+ _cleanup_free_ char *t;
t = set_remove(controllers, *i);
if (!t) {
@@ -308,7 +308,11 @@ int mount_cgroup_controllers(char ***join_controllers) {
controller = NULL;
}
- p.where = strappenda("/sys/fs/cgroup/", options);
+ where = strappend("/sys/fs/cgroup/", options);
+ if (!where)
+ return log_oom();
+
+ p.where = where;
p.options = options;
r = mount_one(&p, true);
@@ -319,7 +323,11 @@ int mount_cgroup_controllers(char ***join_controllers) {
char **i;
for (i = *k; *i; i++) {
- char *t = strappenda("/sys/fs/cgroup/", *i);
+ _cleanup_free_ char *t = NULL;
+
+ t = strappend("/sys/fs/cgroup/", *i);
+ if (!t)
+ return log_oom();
r = symlink(options, t);
if (r < 0 && errno != EEXIST) {
--
1.7.9.2
++++++ 0001-completion-filter-templates-from-restartable-units.patch ++++++
Based on ec15977a3cd82eff6c94bb13db72195f7cd512e8 Mon Sep 17 00:00:00 2001
From: Dave Reisner
From 342aea195051633c69ba7b8c02c82a0e5f8cbde4 Mon Sep 17 00:00:00 2001 From: Michael Marineau
Date: Fri, 16 May 2014 16:58:31 -0700 Subject: [PATCH] conf-parser: silently ignore sections starting with "X-"
This allows external tools to keep additional unit information in a separate section without scaring users with a big warning. --- src/shared/conf-parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git src/shared/conf-parser.c src/shared/conf-parser.c index d27b1b7..062b15b 100644 --- src/shared/conf-parser.c +++ src/shared/conf-parser.c @@ -204,6 +204,7 @@ static int parse_line(const char* unit, bool allow_include, char **section, unsigned *section_line, + bool *section_ignored, char *l, void *userdata) { @@ -266,7 +267,7 @@ static int parse_line(const char* unit, if (sections && !nulstr_contains(sections, n)) { - if (!relaxed) + if (!relaxed && !startswith(n, "X-")) log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Unknown section '%s'. Ignoring.", n); @@ -274,10 +275,12 @@ static int parse_line(const char* unit, free(*section); *section = NULL; *section_line = 0; + *section_ignored = true; } else { free(*section); *section = n; *section_line = line; + *section_ignored = false; } return 0; @@ -285,7 +288,7 @@ static int parse_line(const char* unit, if (sections && !*section) { - if (!relaxed) + if (!relaxed && !*section_ignored) log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Assignment outside of section. Ignoring."); @@ -328,6 +331,7 @@ int config_parse(const char *unit, _cleanup_free_ char *section = NULL, *continuation = NULL; _cleanup_fclose_ FILE *ours = NULL; unsigned line = 0, section_line = 0; + bool section_ignored = false; int r; assert(filename); @@ -399,6 +403,7 @@ int config_parse(const char *unit, allow_include, §ion, §ion_line, + §ion_ignored, p, userdata); free(c); -- 1.7.9.2 ++++++ 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch ++++++
From 36d239dbdaf94ba2d96bb60ac45ecfc58624b1eb Mon Sep 17 00:00:00 2001 From: Daniel Mack
Date: Fri, 7 Mar 2014 11:41:18 +0100 Subject: [PATCH] core/busname: add lookup string for BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT
When a busname unit enters BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT, the
serialization will not be able to look up the result as string via
busname_result_to_string(). This leads to an assertion trap during
daemon-reexec.
---
src/core/busname.c | 1 +
1 file changed, 1 insertion(+)
diff --git src/core/busname.c src/core/busname.c
index 4c34538..237011a 100644
--- src/core/busname.c
+++ src/core/busname.c
@@ -548,6 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState);
static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = {
[BUSNAME_SUCCESS] = "success",
[BUSNAME_FAILURE_RESOURCES] = "resources",
+ [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "failed-permanent",
};
DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult);
--
1.7.9.2
++++++ 0001-core-close-socket-fds-asynchronously.patch ++++++
Based on 574634bcacb01efe15ca2742effd461a5b7afb5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From f7101b7368dfe41dbc8b7203e06133cccb589c01 Mon Sep 17 00:00:00 2001 From: Jan Synacek
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-fix-invalid-free-in-killall.patch ++++++
From 3e09eb5c83e56bc0184bd9d9c44f76047464f77c Mon Sep 17 00:00:00 2001 From: Andreas Henriksson
Date: Fri, 13 Jun 2014 18:48:19 +0200 Subject: [PATCH] core: fix invalid free() in killall()
static int killall(....) in ./src/core/killall.c tries to get "s" initialized by calling get_process_comm(...) which calls read_one_line_file(...) which if it fails will mean it is left uninitialized. It is then used in argument to strna(s) call where it is dereferenced(!), in addition to nothing else initializing it before the scope it is in finishes. --- src/core/killall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/killall.c src/core/killall.c index 57ed41c..eab48f7 100644 --- src/core/killall.c +++ src/core/killall.c @@ -168,7 +168,7 @@ static int killall(int sig, Set *pids, bool send_sighup) { continue; if (sig == SIGKILL) { - _cleanup_free_ char *s; + _cleanup_free_ char *s = NULL; get_process_comm(pid, &s); log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s)); -- 1.7.9.2 ++++++ 0001-core-fix-resource-leak-in-manager_environment_add.patch ++++++
From aa9f8a30fd7dc7aa3aa2575b75b3f9a0ab3f02db Mon Sep 17 00:00:00 2001 From: Andreas Henriksson
Date: Tue, 16 Sep 2014 21:11:02 +0200 Subject: [PATCH] core: fix resource leak in manager_environment_add
Second error path must free the (potentially) allocated memory in the first code chunk before returning. Found by coverity. Fixes: CID#1237750 --- src/core/manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git src/core/manager.c src/core/manager.c index 0770727..e0c1cd1 100644 --- src/core/manager.c +++ src/core/manager.c @@ -2751,8 +2751,10 @@ int manager_environment_add(Manager *m, char **minus, char **plus) { if (!strv_isempty(plus)) { b = strv_env_merge(2, l, plus); - if (!b) + if (!b) { + strv_free(a); return -ENOMEM; + } l = b; } -- 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?=
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-core-sysvcompat-network-should-be-equivalent-to-netw.patch ++++++
From 0404c609f399b2092a3de52eef9d75b0dc12e94c Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Mon, 12 May 2014 21:26:54 +0200 Subject: [PATCH] core: sysvcompat - $network should be equivalent to network-online, rather than network target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Most likely the facility needed is actual connectivity, rather than whether or not the
network managment daemon is running.
We also need to explicitly pull in the network-online.target, as it is not active by
default.
This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default
as part of network-online.target, and only delay boot when some service actively pulls it in.
See: https://bugzilla.gnome.org/show_bug.cgi?id=728965
Cc: Pavel Šimerda
From a71516dfd1858f37712ef52a288bf5fb274383e0 Mon Sep 17 00:00:00 2001 From: Thomas Blume
Date: Thu, 17 Jul 2014 11:25:37 +0200 Subject: [PATCH] detect-virt: Fix Xen domU discovery
The conditional for detection xen virtualization contained a little mistake.
It is checking for i to be empty: 'if (!i) {', but it must check for cap instead,
because: 'cap = strsep(&i, ",")' will set cap to the discovered value and i to
the next value after the separator.
Hence, i would be empty, if there is only control_d in domcap, leading to a wrong
domU detection.
https://bugs.freedesktop.org/show_bug.cgi?id=77271
---
src/shared/virt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/shared/virt.c src/shared/virt.c
index 774915f..20a8d7c 100644
--- src/shared/virt.c
+++ src/shared/virt.c
@@ -173,7 +173,7 @@ int detect_vm(const char **id) {
if (streq(cap, "control_d"))
break;
- if (!i) {
+ if (!cap) {
_id = "xen";
r = 1;
}
--
1.7.9.2
++++++ 0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch ++++++
Based on 0d522a7a0547982eae9ab1b5971e4bed9c2fbc7c Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 138992534878483de28417dfc61c546bba5cb8ad Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 10 Jul 2014 18:25:08 +0200 Subject: [PATCH] event: pull in sd-event.h from event-util.h
--- src/libsystemd/sd-event/event-util.h | 1 + 1 file changed, 1 insertion(+) diff --git src/libsystemd/sd-event/event-util.h src/libsystemd/sd-event/event-util.h index e58020d..e7cad9b 100644 --- src/libsystemd/sd-event/event-util.h +++ src/libsystemd/sd-event/event-util.h @@ -22,6 +22,7 @@ ***/ #include "util.h" +#include "sd-event.h" DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event*, sd_event_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event_source*, sd_event_source_unref); -- 1.7.9.2 ++++++ 0001-gpt-auto-generator-don-t-return-OOM-on-parentless-de.patch ++++++
From 9c4495ca561624c2f0085507dd1288ed5f1247c5 Mon Sep 17 00:00:00 2001 From: Tomasz Torcz
Date: Wed, 12 Mar 2014 19:25:11 +0100 Subject: [PATCH] gpt-auto-generator: don't return OOM on parentless devices
--- src/gpt-auto-generator/gpt-auto-generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- src/gpt-auto-generator/gpt-auto-generator.c +++ src/gpt-auto-generator/gpt-auto-generator.c 2014-03-18 13:35:11.438235125 +0000 @@ -254,7 +254,7 @@ static int enumerate_partitions(struct u parent = udev_device_get_parent(d); if (!parent) - return log_oom(); + return 0; r = udev_enumerate_add_match_parent(e, parent); if (r < 0) ++++++ 0001-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From e525326bd07ebf3cabcfd730bc479166723f2d44 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Sun, 2 Mar 2014 10:02:10 -0800 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index db3bc24..0335a71 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -902,3 +902,12 @@ bluetooth:v0129* bluetooth:v012A* ID_VENDOR_FROM_DATABASE=Changzhou Yongse Infotech Co., Ltd + +bluetooth:v012B* + ID_VENDOR_FROM_DATABASE=SportIQ + +bluetooth:v012C* + ID_VENDOR_FROM_DATABASE=TEMEC Instruments B.V. + +bluetooth:v012D* + ID_VENDOR_FROM_DATABASE=Sony Corporation -- 1.7.9.2 ++++++ 0001-hwdb-fix-case-sensitive-match.patch ++++++
From 4c02dd7153f970244950b5e00f7bdfea8d2ff0be Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 17:55:14 +0200 Subject: [PATCH] hwdb: fix case-sensitive match
--- hwdb/60-keyboard.hwdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index d053766..c7ff4e4 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -870,7 +870,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr* ########################################################### # Plantronics .Audio 626 DSP -keyboard:usb:v047fpC006* +keyboard:usb:v047FpC006* KEYBOARD_KEY_b002f=f20 # Microphone mute button; should be micmute ########################################################### -- 1.7.9.2 ++++++ 0001-hwdb-keymaps-for-Samsung-900X3E-900X3F.patch ++++++
From 77e8ff6974ffaa6c9954e3d2264d9aa75ef25233 Mon Sep 17 00:00:00 2001 From: Kieran Clancy
Date: Thu, 27 Feb 2014 16:02:57 +1030 Subject: [PATCH] hwdb: keymaps for Samsung 900X3E/900X3F
Keymaps for Samsung 900X3E and 900X3F should be the same as for other models in the series. I have also moved the comment for '# Series 9' to the right place --- hwdb/60-keyboard.hwdb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index edfa842..bd8fd10 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -897,9 +897,10 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr* KEYBOARD_KEY_a8=! # Fn Lock - Function lock on KEYBOARD_KEY_a9=! # Fn Lock - Function lock off +# Series 7 / 9 keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr* -keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDG]*:pvr* +keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDEFG]*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings KEYBOARD_KEY_a0=!mute # Fn+F6 mute @@ -909,7 +910,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer -# Series 9 keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr* KEYBOARD_KEY_ce=! # Fn+F8 keyboard backlight up KEYBOARD_KEY_8d=! # Fn+F7 keyboard backlight down -- 1.7.9.2 ++++++ 0001-hwdb-update.patch ++++++ ++++ 6590 lines (skipped) ++++++ 0001-initrd-parse-etc.service-ignore-return-code-of-daemo.patch ++++++
From f3b8fbb1da6519e14985ea444f8304673d20ad3f Mon Sep 17 00:00:00 2001 From: Harald Hoyer
Date: Wed, 3 Sep 2014 13:28:31 +0200 Subject: [PATCH] initrd-parse-etc.service: ignore return code of daemon-reload
It seems the return code of systemctl daemon-reload can be !=0 in some circumstances, which causes a failure of the unit and breaks booting in the initrd. --- units/initrd-parse-etc.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git units/initrd-parse-etc.service.in units/initrd-parse-etc.service.in index c0b2543..42c059b 100644 --- units/initrd-parse-etc.service.in +++ units/initrd-parse-etc.service.in @@ -16,7 +16,7 @@ ConditionPathExists=/etc/initrd-release [Service] Type=oneshot -ExecStartPre=@rootbindir@/systemctl daemon-reload +ExecStartPre=-@rootbindir@/systemctl daemon-reload # we have to retrigger initrd-fs.target after daemon-reload ExecStart=-@rootbindir@/systemctl --no-block start initrd-fs.target ExecStart=@rootbindir@/systemctl --no-block start initrd-cleanup.service -- 1.7.9.2 ++++++ 0001-journal-Do-not-count-on-the-compiler-initializing-fo.patch ++++++
From e8c108ca9f11a382742f212f5b42a02536b3d40f Mon Sep 17 00:00:00 2001 From: Philippe De Swert
Date: Wed, 17 Sep 2014 00:27:16 +0300 Subject: [PATCH] journal: Do not count on the compiler initializing found_last to false
There is a very unlikely case where this can happen since gcc usually does the sane thing. But let's make sure found_last is initialized anyway. Fixes: CID#996386 --- src/journal/journal-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/journal/journal-verify.c src/journal/journal-verify.c index 6c8ca8c..b4e8f73 100644 --- src/journal/journal-verify.c +++ src/journal/journal-verify.c @@ -804,7 +804,7 @@ int journal_file_verify( usec_t last_usec = 0; int data_fd = -1, entry_fd = -1, entry_array_fd = -1; unsigned i; - bool found_last; + bool found_last = false; #ifdef HAVE_GCRYPT uint64_t last_tag = 0; #endif -- 1.7.9.2 ++++++ 0001-journal-cleanup-up-error-handling-in-update_catalog.patch ++++++
From e3b9d9c8027a7c4c55cf1614e0fe9423fad69e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Fri, 11 Apr 2014 08:44:55 -0400 Subject: [PATCH] journal: cleanup up error handling in update_catalog()
- Negative/positive errno mixup caused duplicates not to be detected properly.
Now we get a warning about some duplicate entries in our own catalogs...
- Errors in update_catalog would be ignored, but they should not be.
---
src/journal/catalog.c | 25 +++++++++++++------------
src/journal/test-catalog.c | 3 ++-
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git src/journal/catalog.c src/journal/catalog.c
index 3ed0b7e..02dedc4 100644
--- src/journal/catalog.c
+++ src/journal/catalog.c
@@ -103,7 +103,7 @@ static int finish_item(
const char *payload) {
ssize_t offset;
- CatalogItem *i;
+ _cleanup_free_ CatalogItem *i = NULL;
int r;
assert(h);
@@ -126,13 +126,14 @@ static int finish_item(
i->offset = htole64((uint64_t) offset);
r = hashmap_put(h, i, i);
- if (r == EEXIST) {
+ if (r == -EEXIST) {
log_warning("Duplicate entry for " SD_ID128_FORMAT_STR ".%s, ignoring.",
SD_ID128_FORMAT_VAL(id), language ? language : "C");
- free(i);
return 0;
- }
+ } else if (r < 0)
+ return r;
+ i = NULL;
return 0;
}
@@ -383,8 +384,8 @@ error:
int catalog_update(const char* database, const char* root, const char* const* dirs) {
_cleanup_strv_free_ char **files = NULL;
char **f;
- Hashmap *h;
struct strbuf *sb = NULL;
+ _cleanup_hashmap_free_free_ Hashmap *h = NULL;
_cleanup_free_ CatalogItem *items = NULL;
CatalogItem *i;
Iterator j;
@@ -406,13 +407,17 @@ int catalog_update(const char* database, const char* root, const char* const* di
}
STRV_FOREACH(f, files) {
- log_debug("reading file '%s'", *f);
- catalog_import_file(h, sb, *f);
+ log_debug("Reading file '%s'", *f);
+ r = catalog_import_file(h, sb, *f);
+ if (r < 0) {
+ log_error("Failed to import file '%s': %s.",
+ *f, strerror(-r));
+ goto finish;
+ }
}
if (hashmap_size(h) <= 0) {
log_info("No items in catalog.");
- r = 0;
goto finish;
} else
log_debug("Found %u items in catalog.", hashmap_size(h));
@@ -443,11 +448,7 @@ int catalog_update(const char* database, const char* root, const char* const* di
log_debug("%s: wrote %u items, with %zu bytes of strings, %ld total size.",
database, n, sb->len, r);
- r = 0;
-
finish:
- if (h)
- hashmap_free_free(h);
if (sb)
strbuf_cleanup(sb);
diff --git src/journal/test-catalog.c src/journal/test-catalog.c
index b087a8b..967ab67 100644
--- src/journal/test-catalog.c
+++ src/journal/test-catalog.c
@@ -157,7 +157,8 @@ int main(int argc, char *argv[]) {
setlocale(LC_ALL, "de_DE.UTF-8");
- log_set_max_level(LOG_DEBUG);
+ log_parse_environment();
+ log_open();
test_catalog_file_lang();
--
1.7.9.2
++++++ 0001-journal-compress-return-early-in-uncompress_startswi.patch ++++++
Based on 5e592c66bdf76dfc8445b332f7a5088ca504ee90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From 0ade5ffe2778e7b238bba8d979ca4d53dee1e702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Mon, 31 Mar 2014 08:57:28 -0400 Subject: [PATCH] journal: fix export of messages containing newlines
In "export" format, newlines are significant, and messages containing newlines must be exported as "binary". --- src/shared/logs-show.c | 7 ++++--- src/shared/utf8.c | 5 +++-- src/shared/utf8.h | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git src/shared/logs-show.c src/shared/logs-show.c index 9d14933..b0b66f6 100644 --- src/shared/logs-show.c +++ src/shared/logs-show.c @@ -547,7 +547,9 @@ static int output_export( startswith(data, "_BOOT_ID=")) continue; - if (!utf8_is_printable(data, length)) { + if (utf8_is_printable_newline(data, length, false)) + fwrite(data, length, 1, f); + else { const char *c; uint64_t le64; @@ -562,8 +564,7 @@ static int output_export( le64 = htole64(length - (c - (const char*) data) - 1); fwrite(&le64, sizeof(le64), 1, f); fwrite(c + 1, length - (c - (const char*) data) - 1, 1, f); - } else - fwrite(data, length, 1, f); + } fputc('\n', f); } diff --git src/shared/utf8.c src/shared/utf8.c index 0b524d8..c559c13 100644 --- src/shared/utf8.c +++ src/shared/utf8.c @@ -136,7 +136,7 @@ int utf8_encoded_to_unichar(const char *str) { return unichar; } -bool utf8_is_printable(const char* str, size_t length) { +bool utf8_is_printable_newline(const char* str, size_t length, bool newline) { const uint8_t *p; assert(str); @@ -145,7 +145,8 @@ bool utf8_is_printable(const char* str, size_t length) { int encoded_len = utf8_encoded_valid_unichar((const char *)p); int val = utf8_encoded_to_unichar((const char*)p); - if (encoded_len < 0 || val < 0 || is_unicode_control(val)) + if (encoded_len < 0 || val < 0 || is_unicode_control(val) || + (!newline && val == '\n')) return false; length -= encoded_len; diff --git src/shared/utf8.h src/shared/utf8.h index c0eb73a..c087995 100644 --- src/shared/utf8.h +++ src/shared/utf8.h @@ -31,7 +31,10 @@ const char *utf8_is_valid(const char *s) _pure_; char *ascii_is_valid(const char *s) _pure_; char *utf8_escape_invalid(const char *s); -bool utf8_is_printable(const char* str, size_t length) _pure_; +bool utf8_is_printable_newline(const char* str, size_t length, bool newline) _pure_; +_pure_ static inline bool utf8_is_printable(const char* str, size_t length) { + return utf8_is_printable_newline(str, length, true); +} char *utf16_to_utf8(const void *s, size_t length); -- 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?=
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-Lenovo-Enhanced-USB-Keyboard.patch ++++++
From d258d4967eb24122c2b1014d4e873f61b633f1d2 Mon Sep 17 00:00:00 2001 From: Martin Pitt
Date: Sun, 25 May 2014 11:57:22 +0200 Subject: [PATCH] keymap: Add Lenovo Enhanced USB Keyboard
https://bugs.freedesktop.org/show_bug.cgi?id=77234 --- hwdb/60-keyboard.hwdb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 832c686..fe5b3ee 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -579,6 +579,18 @@ keyboard:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*Lenovo*V480*:pvr* KEYBOARD_KEY_f1=f21 +# enhanced USB keyboard +keyboard:usb:v04B3p301B* + KEYBOARD_KEY_90001=prog1 # ThinkVantage + KEYBOARD_KEY_90002=screenlock + KEYBOARD_KEY_90003=file + KEYBOARD_KEY_90004=wordprocessor + KEYBOARD_KEY_90005=spreadsheet + KEYBOARD_KEY_90006=calc + KEYBOARD_KEY_90007=mail + KEYBOARD_KEY_90008=www + + ########################################################### # Logitech ########################################################### -- 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
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
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-let-systemctl-completion-ignore-at-names.patch ++++++ --- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:21:00.000000000 +0100 +++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:21:00.000000000 +0100 @@ -1,5 +1,5 @@ ---- systemd-210/shell-completion/bash/systemctl.in -+++ systemd-210/shell-completion/bash/systemctl.in 2014-08-20 15:01:04.502736981 +0000 +--- systemd-210/shell-completion/bash/systemctl ++++ systemd-210/shell-completion/bash/systemctl 2014-08-20 15:01:04.502736981 +0000 @@ -43,7 +43,7 @@ __filter_units_by_property () { local units=("$@") local props ++++++ 0001-login-fix-memory-leak-on-DropController.patch ++++++
From 60240797a4ce464ec7a0537ccbec4c83f599251c Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Fri, 22 Aug 2014 14:57:11 +0200 Subject: [PATCH] login: fix memory-leak on DropController()
Our bus-name watch helpers only remove a bus-name if it's not a controller, anymore. If we call manager_drop_busname() before unregistering the controller, the busname will not be dropped. Therefore, first drop the controller, then drop the bus-name. --- src/login/logind-session.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git src/login/logind-session.c src/login/logind-session.c index 136bbce..0c6e425 100644 --- src/login/logind-session.c +++ src/login/logind-session.c @@ -1061,11 +1061,13 @@ bool session_is_controller(Session *s, const char *sender) { static void session_swap_controller(Session *s, char *name) { SessionDevice *sd; + char *c; if (s->controller) { - manager_drop_busname(s->manager, s->controller); - free(s->controller); + c = s->controller; s->controller = NULL; + manager_drop_busname(s->manager, c); + free(c); /* Drop all devices as they're now unused. Do that after the * controller is released to avoid sending out useles -- 1.7.9.2 ++++++ 0001-login-fix-pos-array-allocation.patch ++++++
From a1937e679f76758635d295287398abe526de2522 Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Tue, 25 Feb 2014 12:20:25 +0100 Subject: [PATCH] login: fix pos-array allocation
GREEDY_REALLOC takes a pointer to the real size, not the array-width as
argument. Therefore, our array is currently way to small to keep the seat
positions.
Introduce GREEDY_REALLOC0_T() as typed version of GREEDY_REALLOC and store
the array-width instead of array-size.
---
src/login/logind-seat.c | 2 +-
src/shared/util.h | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git src/login/logind-seat.c src/login/logind-seat.c
index 631be5f..36ec7ed 100644
--- src/login/logind-seat.c
+++ src/login/logind-seat.c
@@ -475,7 +475,7 @@ void seat_claim_position(Seat *s, Session *session, unsigned int pos) {
if (seat_has_vts(s))
pos = session->vtnr;
- if (!GREEDY_REALLOC0(s->positions, s->position_count, pos + 1))
+ if (!GREEDY_REALLOC0_T(s->positions, s->position_count, pos + 1))
return;
seat_evict_position(s, session);
diff --git src/shared/util.h src/shared/util.h
index 9913fce..78b1444 100644
--- src/shared/util.h
+++ src/shared/util.h
@@ -723,6 +723,15 @@ void* greedy_realloc0(void **p, size_t *allocated, size_t need);
#define GREEDY_REALLOC0(array, allocated, need) \
greedy_realloc0((void**) &(array), &(allocated), sizeof((array)[0]) * (need))
+#define GREEDY_REALLOC0_T(array, count, need) \
+ ({ \
+ size_t _size = (count) * sizeof((array)[0]); \
+ void *_ptr = GREEDY_REALLOC0((array), _size, (need)); \
+ if (_ptr) \
+ (count) = _size / sizeof((array)[0]); \
+ _ptr; \
+ })
+
static inline void _reset_errno_(int *saved_errno) {
errno = *saved_errno;
}
--
1.7.9.2
++++++ 0001-login-pause-devices-before-acknowledging-VT-switches.patch ++++++
Based on 2ec3ff668ff03410e94cfef8e3ee9384a8222211 Mon Sep 17 00:00:00 2001
From: David Herrmann
From f6ba8671d83f9fce9a00045d8fa399a1c07ba7fc Mon Sep 17 00:00:00 2001 From: Ray Strode
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-login-simplify-controller-handling.patch ++++++
Based on b12e56156e5f363ebb8dc4ea5c10f5fd0665dc9d Mon Sep 17 00:00:00 2001
From: David Herrmann
From 58d4aabedd415a735efeb8c2608ee73618c07f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
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-logind-allow-switching-to-unused-VTs-via-SwitchTo.patch ++++++
From 154034270c4643b7cfe61c0be1676d78bb1b7b07 Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Tue, 8 Jul 2014 12:56:55 +0200 Subject: [PATCH] logind: allow switching to unused VTs via SwitchTo()
If compositors use the new SwitchTo() logic to map F1-F12, we should allow
them to switch to unregistered VTs, too. Otherwise, the auto-spawn logic
of gettys won't trigger.
Reported-by: Jasper St. Pierre
From 6a79c58603ea816a1b4fa1520397b4e138bc1ca0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 3 Mar 2014 19:30:16 +0100 Subject: [PATCH] logind: ignore lid switch if more than 1 display is connected
Previously we expected the desktop environment to take an inhibitor lock, but this opened a race on boot-up where logind might already be running but no DE is active. Hence, let's move checking for additional displays into logind. This also opens up this logic for other DEs, given that only GNOME implemented the inhibitor logic so far. --- man/logind.conf.xml | 14 +++++++----- src/login/logind-action.c | 8 +++++++ src/login/logind-core.c | 55 +++++++++++++++++++++++++++++++++++++++++++-- src/login/logind.h | 1 + 4 files changed, 71 insertions(+), 7 deletions(-) diff --git man/logind.conf.xml man/logind.conf.xml index 54cc379..7673201 100644 --- man/logind.conf.xml +++ man/logind.conf.xml @@ -242,10 +242,10 @@ <literal>ignore</literal>, logind will never handle these keys. If <literal>lock</literal>, all running - sessions will be screen-locked; otherwise, - the specified action - will be taken in the respective - event. Only input devices with the + sessions will be screen-locked; + otherwise, the specified action will + be taken in the respective event. Only + input devices with the <literal>power-switch</literal> udev tag will be watched for key/lid switch events. <varname>HandlePowerKey=</varname> @@ -257,7 +257,11 @@ default to <literal>suspend</literal>. <varname>HandleHibernateKey=</varname> defaults to - <literal>hibernate</literal>.</para></listitem> + <literal>hibernate</literal>. Note + that the lid switch is ignored if the + system is inserted in a docking + station, or if more than one display + is connected.</para></listitem> </varlistentry> <varlistentry> diff --git src/login/logind-action.c src/login/logind-action.c index c04f210..da5a830 100644 --- src/login/logind-action.c +++ src/login/logind-action.c @@ -72,10 +72,18 @@ int manager_handle_action( /* If we are docked don't react to lid closing */ if (inhibit_key == INHIBIT_HANDLE_LID_SWITCH) { + int n; + if (manager_is_docked(m)) { log_debug("Ignoring lid switch request, system is docked."); return 0; } + + n = manager_count_displays(m); + if (n != 1) { + log_debug("Ignoring lid switch request, %s displays connected."); + return 0; + } } /* If the key handling is inhibited, don't do anything */ diff --git src/login/logind-core.c src/login/logind-core.c index e4e593f..b8d03c3 100644 --- src/login/logind-core.c +++ src/login/logind-core.c @@ -32,6 +32,7 @@ #include "audit.h" #include "bus-util.h" #include "bus-error.h" +#include "udev-util.h" #include "logind.h" int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) { @@ -276,9 +277,11 @@ int manager_process_seat_device(Manager *m, struct udev_device *d) { return 0; } - /* ignore non-master devices for unknown seats */ + seat = hashmap_get(m->seats, sn); master = udev_device_has_tag(d, "master-of-seat"); - if (!master && !(seat = hashmap_get(m->seats, sn))) + + /* Ignore non-master devices for unknown seats */ + if (!master && !seat) return 0; r = manager_add_device(m, udev_device_get_syspath(d), master, &device); @@ -514,3 +517,51 @@ bool manager_is_docked(Manager *m) { return false; } + +int manager_count_displays(Manager *m) { + _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item = NULL, *first = NULL; + int r; + int n = 0; + + e = udev_enumerate_new(m->udev); + if (!e) + return -ENOMEM; + + r = udev_enumerate_add_match_subsystem(e, "drm"); + if (r < 0) + return r; + + r = udev_enumerate_scan_devices(e); + if (r < 0) + return r; + + first = udev_enumerate_get_list_entry(e); + udev_list_entry_foreach(item, first) { + _cleanup_udev_device_unref_ struct udev_device *d = NULL; + struct udev_device *p; + const char *status; + + d = udev_device_new_from_syspath(m->udev, udev_list_entry_get_name(item)); + if (!d) + return -ENOMEM; + + p = udev_device_get_parent(d); + if (!p) + return -ENOMEM; + + /* If the parent shares the same subsystem as the + * device we are looking at then it is a connector, + * which is what we are interested in. */ + if (!streq_ptr(udev_device_get_subsystem(p), "drm")) + continue; + + /* We count any connector which is not explicitly + * "disconnected" as connected. */ + status = udev_device_get_sysattr_value(d, "status"); + if (!streq_ptr(status, "disconnected")) + n++; + } + + return n; +} diff --git src/login/logind.h src/login/logind.h index 0344acc..74d6641 100644 --- src/login/logind.h +++ src/login/logind.h @@ -149,6 +149,7 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **user); int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session); bool manager_is_docked(Manager *m); +int manager_count_displays(Manager *m); extern const sd_bus_vtable manager_vtable[]; -- 1.7.9.2 ++++++ 0001-machine-don-t-return-uninitialized-variable.patch ++++++
From f14aa1f1b2e4e99ee20393871b5f64f1378ed6c3 Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Sun, 6 Jul 2014 14:12:28 +0200 Subject: [PATCH] machine: don't return uninitialized variable
Repotred by Ronny Chevalier
---
src/machine/machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/machine/machine.c src/machine/machine.c
index c0fa1b2..cf38e3f 100644
--- src/machine/machine.c
+++ src/machine/machine.c
@@ -371,7 +371,7 @@ static int machine_stop_scope(Machine *m) {
free(m->scope_job);
m->scope_job = job;
- return r;
+ return 0;
}
int machine_stop(Machine *m) {
--
1.7.9.2
++++++ 0001-main-uid_to_name-might-fail-due-to-OOM-protect-again.patch ++++++
Based on 1f97091d3cb0887c264176b47b0a86c269acf0b5 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From e6a4a517befe559adf6d1dbbadf425c3538849c9 Mon Sep 17 00:00:00 2001 From: Djalal Harouni
Date: Fri, 11 Apr 2014 01:45:52 +0100 Subject: [PATCH] nspawn: allow to bind mount journal on top of a non empty container journal dentry
Currently if nspawn was called with --link-journal=host or
--link-journal=auto and the right /var/log/journal/machine-id/ exists
then the bind mount the subdirectory into the container might fail due
to the ~/mycontainer/var/log/journal/machine-id/ of the container not
being empty.
There is no reason to check if the container journal subdir is empty
since there will be a bind mount on top of it. The user asked for a bind
mount so give it.
Note: a next call with --link-journal=guest may fail due to the
/var/log/journal/machine-id/ on the host not being empty.
https://bugs.freedesktop.org/show_bug.cgi?id=76193
Reported-by: Tobias Hunger
From f841a154efbb3162d2a732936f031ac7a6b0d4cf Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Tue, 1 Jul 2014 16:00:05 +0200 Subject: [PATCH] parse_uid: return -ENXIO for -1 uids
--- src/shared/audit.c | 3 --- src/shared/util.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git src/shared/audit.c src/shared/audit.c index 5466447..f101050 100644 --- src/shared/audit.c +++ src/shared/audit.c @@ -77,9 +77,6 @@ int audit_loginuid_from_pid(pid_t pid, uid_t *uid) { if (r < 0) return r; - if (u == (uid_t) -1) - return -ENXIO; - *uid = (uid_t) u; return 0; } diff --git src/shared/util.c src/shared/util.c index e75f6c9..9b5a47a 100644 --- src/shared/util.c +++ src/shared/util.c @@ -282,11 +282,11 @@ int parse_uid(const char *s, uid_t* ret_uid) { /* Some libc APIs use (uid_t) -1 as special placeholder */ if (uid == (uid_t) 0xFFFFFFFF) - return -EINVAL; + return -ENXIO; /* A long time ago UIDs where 16bit, hence explicitly avoid the 16bit -1 too */ if (uid == (uid_t) 0xFFFF) - return -EINVAL; + return -ENXIO; *ret_uid = uid; return 0; -- 1.7.9.2 ++++++ 0001-po-add-Ukrainian-translation.patch ++++++
From 260b6323cc2aebe722d5b8e43fa63a502f906774 Mon Sep 17 00:00:00 2001 From: Daniel Korostil
Date: Thu, 17 Jul 2014 02:07:29 +0300 Subject: [PATCH] po: add Ukrainian translation
---
po/LINGUAS | 1 +
po/uk.po | 377 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 378 insertions(+)
create mode 100644 po/uk.po
diff --git po/LINGUAS po/LINGUAS
index 2cb0f30..f214ece 100644
--- po/LINGUAS
+++ po/LINGUAS
@@ -4,3 +4,4 @@ fr
it
pl
ru
+uk
diff --git po/uk.po po/uk.po
new file mode 100644
index 0000000..7a5212a
--- /dev/null
+++ po/uk.po
@@ -0,0 +1,377 @@
+# Ukrainian translation for systemd.
+# Copyright (C) 2014 systemd's COPYRIGHT HOLDER
+# This file is distributed under the same license as the systemd package.
+# Eugene Melnik
From ead349509e325aad720bb0349521a9e56e2ac7c0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 13 May 2014 16:40:53 +0200 Subject: [PATCH] replace more dup() by F_DUPFD_CLOEXEC
--- src/login/inhibit.c | 2 +- src/shared/install.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git src/login/inhibit.c src/login/inhibit.c index 48c2ec4..ae3afdf 100644 --- src/login/inhibit.c +++ src/login/inhibit.c @@ -64,7 +64,7 @@ static int inhibit(sd_bus *bus, sd_bus_error *error) { if (r < 0) return r; - r = dup(fd); + r = fcntl(fd, F_DUPFD_CLOEXEC, 3); if (r < 0) return -errno; diff --git src/shared/install.c src/shared/install.c index acfba25..9ce9403 100644 --- src/shared/install.c +++ src/shared/install.c @@ -332,7 +332,7 @@ static int remove_marked_symlinks( int q, cfd; deleted = false; - cfd = dup(fd); + cfd = fcntl(fd, F_DUPFD_CLOEXEC, 3); if (cfd < 0) { r = -errno; break; -- 1.7.9.2 ++++++ 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch ++++++
From 42c4ebcbd4cbd7b27667eb8081ee4dc46f9ece17 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 13 Mar 2014 20:33:22 +0100 Subject: [PATCH] sd-bus: don't look for a 64bit value when we only have 32bit value on reply cookie hash table access
This broke hashtable lookups for the message cookies on s390x, which is a 64bit BE machine where accessing 32bit values as 64bit and vice versa will explode. Also, while we are at it, be a bit more careful when dealing with the 64bit cookies we expose and the 32bit serial numbers dbus uses in its payload. Problem identified by Fridrich Strba. --- src/libsystemd/sd-bus/bus-dump.c | 4 ++-- src/libsystemd/sd-bus/bus-kernel.c | 2 +- src/libsystemd/sd-bus/bus-message.c | 15 ++++++++++----- src/libsystemd/sd-bus/bus-message.h | 5 +++-- src/libsystemd/sd-bus/sd-bus.c | 12 ++++++------ 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c index 0e41549..ea81644 100644 --- a/src/libsystemd/sd-bus/bus-dump.c +++ b/src/libsystemd/sd-bus/bus-dump.c @@ -69,10 +69,10 @@ int bus_message_dump(sd_bus_message *m, FILE *f, bool with_header) { if (BUS_MESSAGE_COOKIE(m) == 0xFFFFFFFFULL) fprintf(f, " Cookie=-1"); else - fprintf(f, " Cookie=%lu", (unsigned long) BUS_MESSAGE_COOKIE(m)); + fprintf(f, " Cookie=%" PRIu64, BUS_MESSAGE_COOKIE(m)); if (m->reply_cookie != 0) - fprintf(f, " ReplyCookie=%lu", (unsigned long) m->reply_cookie); + fprintf(f, " ReplyCookie=%" PRIu64, m->reply_cookie); fputs("\n", f); diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 8a2ca02..80ef15b 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -266,7 +266,7 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) { well_known ? 0 : m->destination ? unique : KDBUS_DST_ID_BROADCAST; m->kdbus->payload_type = KDBUS_PAYLOAD_DBUS; - m->kdbus->cookie = m->header->serial; + m->kdbus->cookie = (uint64_t) m->header->serial; m->kdbus->priority = m->priority; if (m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index fb894ef..97ab0e3 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -617,7 +617,7 @@ static int message_new_reply( t->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED; t->reply_cookie = BUS_MESSAGE_COOKIE(call); - r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, t->reply_cookie); + r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) t->reply_cookie); if (r < 0) goto fail; @@ -752,7 +752,7 @@ int bus_message_new_synthetic_error( t->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED; t->reply_cookie = cookie; - r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, t->reply_cookie); + r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) t->reply_cookie); if (r < 0) goto fail; @@ -5075,21 +5075,26 @@ int bus_message_parse_fields(sd_bus_message *m) { break; } - case BUS_MESSAGE_HEADER_REPLY_SERIAL: + case BUS_MESSAGE_HEADER_REPLY_SERIAL: { + uint32_t serial; + if (m->reply_cookie != 0) return -EBADMSG; if (!streq(signature, "u")) return -EBADMSG; - r = message_peek_field_uint32(m, &ri, item_size, &m->reply_cookie); + r = message_peek_field_uint32(m, &ri, item_size, &serial); if (r < 0) return r; + m->reply_cookie = serial; + if (m->reply_cookie == 0) return -EBADMSG; break; + } case BUS_MESSAGE_HEADER_UNIX_FDS: if (unix_fds != 0) @@ -5489,7 +5494,7 @@ int bus_message_remarshal(sd_bus *bus, sd_bus_message **m) { return -ENOMEM; n->reply_cookie = (*m)->reply_cookie; - r = message_append_field_uint32(n, BUS_MESSAGE_HEADER_REPLY_SERIAL, n->reply_cookie); + r = message_append_field_uint32(n, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) n->reply_cookie); if (r < 0) return r; diff --git a/src/libsystemd/sd-bus/bus-message.h b/src/libsystemd/sd-bus/bus-message.h index 5fbe3e6..df79294 100644 --- a/src/libsystemd/sd-bus/bus-message.h +++ b/src/libsystemd/sd-bus/bus-message.h @@ -84,7 +84,7 @@ struct sd_bus_message { sd_bus *bus; - uint32_t reply_cookie; + uint64_t reply_cookie; const char *path; const char *interface; @@ -162,7 +162,8 @@ static inline uint64_t BUS_MESSAGE_BSWAP64(sd_bus_message *m, uint64_t u) { return BUS_MESSAGE_NEED_BSWAP(m) ? bswap_64(u) : u; } -static inline uint32_t BUS_MESSAGE_COOKIE(sd_bus_message *m) { +static inline uint64_t BUS_MESSAGE_COOKIE(sd_bus_message *m) { + /* Note that we return the serial converted to a 64bit value here */ return BUS_MESSAGE_BSWAP32(m, m->header->serial); } diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index ca7c428..8e44e50 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -1486,15 +1486,15 @@ static int bus_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call return r; if (bus->is_kernel || *idx >= BUS_MESSAGE_SIZE(m)) - log_debug("Sent message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%lu reply_cookie=%lu error=%s", + log_debug("Sent message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", bus_message_type_to_string(m->header->type), strna(sd_bus_message_get_sender(m)), strna(sd_bus_message_get_destination(m)), strna(sd_bus_message_get_path(m)), strna(sd_bus_message_get_interface(m)), strna(sd_bus_message_get_member(m)), - (unsigned long) BUS_MESSAGE_COOKIE(m), - (unsigned long) m->reply_cookie, + BUS_MESSAGE_COOKIE(m), + m->reply_cookie, strna(m->error.message)); return r; @@ -2253,15 +2253,15 @@ static int process_message(sd_bus *bus, sd_bus_message *m) { bus->current = m; bus->iteration_counter++; - log_debug("Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%lu reply_cookie=%lu error=%s", + log_debug("Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", bus_message_type_to_string(m->header->type), strna(sd_bus_message_get_sender(m)), strna(sd_bus_message_get_destination(m)), strna(sd_bus_message_get_path(m)), strna(sd_bus_message_get_interface(m)), strna(sd_bus_message_get_member(m)), - (unsigned long) BUS_MESSAGE_COOKIE(m), - (unsigned long) m->reply_cookie, + BUS_MESSAGE_COOKIE(m), + m->reply_cookie, strna(m->error.message)); r = process_hello(bus, m); -- 1.9.0 ++++++ 0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch ++++++
From ef7b6c0190fefaacf6d8f8e1a6dda4ba8b98091b Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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
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-sd-event-restore-correct-timeout-behaviour.patch ++++++
Based on eec6022cf039e62233139000b9e95db943959e48 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From b748c7596f79945be5263a0d1c88de64eb0c5146 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
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-socket-introduce-SELinuxContextFromNet-option.patch ++++++
Based on 16115b0a7b7cdf08fb38084d857d572d8a9088dc Mon Sep 17 00:00:00 2001
From: Michal Sekletar
From 498cfc230af8f83675be2e92057956f1792969e4 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons
Date: Sat, 23 Aug 2014 21:11:44 +0200 Subject: [PATCH] systemctl: Correct error message printed when bus_process_wait fails
Actually use the variable containing the return code of bus_process_wait when printing the error message as a result of it failing. --- src/systemctl/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c index d9b8bee..6534819 100644 --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c @@ -2382,7 +2382,7 @@ static int wait_for_jobs(sd_bus *bus, Set *s) { while (!set_isempty(s)) { q = bus_process_wait(bus); if (q < 0) { - log_error("Failed to wait for response: %s", strerror(-r)); + log_error("Failed to wait for response: %s", strerror(-q)); return q; } -- 1.7.9.2 ++++++ 0001-systemctl-allow-to-change-the-default-target-without.patch ++++++
From a1484a216e79da1fa7e2323095fb1b7203fb7a17 Mon Sep 17 00:00:00 2001 From: Djalal Harouni
Date: Mon, 14 Apr 2014 01:07:52 +0100 Subject: [PATCH] systemctl: allow to change the default target without the --force switch
Currently "systemctl set-default" will fail to change the default target
due to the 'default.target' being a symlink which is always the case.
To work around this, the user must specify the "--force" switch to be
able to overwrite the existing symlink.
This is clearly a regression that was introduced by commit 718db96199e
since it worked before without the "--force" switch and the man pages do
not mention that you need to specify it. It is expected that this is a
symlink.
So just explicity set the force flag to make it work again.
https://bugs.freedesktop.org/show_bug.cgi?id=76623
Reported-by:
---
src/systemctl/systemctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c
index ee0938f..1b381f7 100644
--- src/systemctl/systemctl.c
+++ src/systemctl/systemctl.c
@@ -1968,7 +1968,7 @@ static int set_default(sd_bus *bus, char **args) {
return log_oom();
if (!bus || avoid_bus()) {
- r = unit_file_set_default(arg_scope, arg_root, unit, arg_force, &changes, &n_changes);
+ r = unit_file_set_default(arg_scope, arg_root, unit, true, &changes, &n_changes);
if (r < 0) {
log_error("Failed to set default target: %s", strerror(-r));
return r;
@@ -1990,7 +1990,7 @@ static int set_default(sd_bus *bus, char **args) {
"SetDefaultTarget",
&error,
&reply,
- "sb", unit, arg_force);
+ "sb", unit, true);
if (r < 0) {
log_error("Failed to set default target: %s", bus_error_message(&error, -r));
return r;
--
1.7.9.2
++++++ 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?=
From 08073121d8171f8e6be27b0c80e2ec283064760e Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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?=
From f41925b4e442a34c93ad120ef1426c974a047ed1 Mon Sep 17 00:00:00 2001 From: Thomas Blume
Date: Fri, 18 Jul 2014 09:13:36 -0400 Subject: [PATCH] systemd-detect-virt: detect s390 virtualization
A system that is running on a logical partition (LPAR) provided by PR/SM has access to physical hardware (except CPU). It is true that PR/SM abstracts the hardware, but only for sharing purposes. Details are statet at: http://publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eicaz/eicazzlpar... -->-- In other words, PR/SM transforms physical resources into virtual resources so that many logical partitions can share the same physical resources. --<-- Still, from the OS point of view, the shared virtual resource is real hardware. ConditionVirtualization must be set to false if the OS runs directly on PR/SM (e.g. in an LPAR). [zj: reorder code so that variables are not allocated when #if-def is false. Add commit message.] --- man/systemd.unit.xml | 1 + src/shared/virt.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git man/systemd.unit.xml man/systemd.unit.xml index 6447584..86a8cbb 100644 --- man/systemd.unit.xml +++ man/systemd.unit.xml @@ -996,6 +996,7 @@ virtualization solution, or one of <varname>qemu</varname>, <varname>kvm</varname>, + <varname>zvm</varname>, <varname>vmware</varname>, <varname>microsoft</varname>, <varname>oracle</varname>, diff --git src/shared/virt.c src/shared/virt.c index 20a8d7c..b436895 100644 --- src/shared/virt.c +++ src/shared/virt.c @@ -220,6 +220,23 @@ int detect_vm(const char **id) { goto finish; } +#if defined(__s390__) + { + _cleanup_free_ char *t = NULL; + + r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t); + if (r >= 0) { + if (streq(t, "z/VM")) + _id = "zvm"; + else + _id = "kvm"; + r = 1; + + goto finish; + } + } +#endif + r = 0; finish: -- 1.7.9.2 ++++++ 0001-systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch ++++++
From 9ed2a35e93f4a9e82585f860f54cdcbbdf3e1f86 Mon Sep 17 00:00:00 2001 From: Richard Weinberger
Date: Tue, 9 Sep 2014 11:09:37 +0200 Subject: [PATCH] systemd-tmpfiles: Fix IGNORE_DIRECTORY_PATH age handling
If one has a config like:
d /tmp 1777 root root -
X /tmp/important_mount
All files below /tmp/important_mount will be deleted as the
/tmp/important_mount item will spuriously inherit a max age of 0
from /tmp.
/tmp has a max age of 0 but age_set is (of course) false.
This affects also the PrivateTmp feature of systemd.
All tmp files of such services will be deleted unconditionally
and can cause service failures and data loss.
Fix this by checking ->age_set in the IGNORE_DIRECTORY_PATH logic.
---
src/tmpfiles/tmpfiles.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/tmpfiles/tmpfiles.c src/tmpfiles/tmpfiles.c
index f9830c4..7eafd6b 100644
--- src/tmpfiles/tmpfiles.c
+++ src/tmpfiles/tmpfiles.c
@@ -1576,7 +1576,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) {
candidate_item = j;
}
- if (candidate_item) {
+ if (candidate_item && candidate_item->age_set) {
i->age = candidate_item->age;
i->age_set = true;
}
--
1.7.9.2
++++++ 0001-sysv-order-initscripts-which-provide-network-before-.patch ++++++
Based on 805b573fad06b845502e76f3db3a0efa7583149d Mon Sep 17 00:00:00 2001
From: Lukas Nykryn
From e7aab5412829ed6b50d109f670bd0b1b365838a7 Mon Sep 17 00:00:00 2001 From: Dave Reisner
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-tmpfiles-fix-permissions-on-new-journal-files.patch ++++++
From a606871da508995f5ede113a8fc6538afd98966c Mon Sep 17 00:00:00 2001 From: Greg KH
Date: Tue, 15 Apr 2014 14:12:01 -0700 Subject: [PATCH] tmpfiles: fix permissions on new journal files
When starting up journald on a new system, set the proper permissions on the system.journal files, not only on the journal directory. --- tmpfiles.d/systemd.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git tmpfiles.d/systemd.conf tmpfiles.d/systemd.conf index 7c6d6b9..c470045 100644 --- tmpfiles.d/systemd.conf +++ tmpfiles.d/systemd.conf @@ -23,6 +23,6 @@ d /run/systemd/machines 0755 root root - d /run/systemd/shutdown 0755 root root - m /var/log/journal 2755 root systemd-journal - - -m /var/log/journal/%m 2755 root systemd-journal - - +Z /var/log/journal/%m 2755 root systemd-journal - - m /run/log/journal 2755 root systemd-journal - - -m /run/log/journal/%m 2755 root systemd-journal - - +Z /run/log/journal/%m 2755 root systemd-journal - - -- 1.7.9.2 ++++++ 0001-umount-modernizations.patch ++++++
From c3544e8d2c2d870a2aff0944aff4ab7824b9ae6b Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 5 Jun 2014 21:35:15 +0200 Subject: [PATCH] umount: modernizations
--- src/core/umount.c | 65 ++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git src/core/umount.c src/core/umount.c index d1258f0..a30f674 100644 --- src/core/umount.c +++ src/core/umount.c @@ -61,52 +61,46 @@ static void mount_points_list_free(MountPoint **head) { } static int mount_points_list_get(MountPoint **head) { - FILE *proc_self_mountinfo; - char *path, *p; + _cleanup_fclose_ FILE *proc_self_mountinfo = NULL; unsigned int i; - int r; assert(head); - if (!(proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"))) + proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); + if (!proc_self_mountinfo) return -errno; for (i = 1;; i++) { - int k; + _cleanup_free_ char *path = NULL; + char *p = NULL; MountPoint *m; + int k; - path = p = NULL; - - if ((k = fscanf(proc_self_mountinfo, - "%*s " /* (1) mount id */ - "%*s " /* (2) parent id */ - "%*s " /* (3) major:minor */ - "%*s " /* (4) root */ - "%ms " /* (5) mount point */ - "%*s" /* (6) mount options */ - "%*[^-]" /* (7) optional fields */ - "- " /* (8) separator */ - "%*s " /* (9) file system type */ - "%*s" /* (10) mount source */ - "%*s" /* (11) mount options 2 */ - "%*[^\n]", /* some rubbish at the end */ - &path)) != 1) { + k = fscanf(proc_self_mountinfo, + "%*s " /* (1) mount id */ + "%*s " /* (2) parent id */ + "%*s " /* (3) major:minor */ + "%*s " /* (4) root */ + "%ms " /* (5) mount point */ + "%*s" /* (6) mount options */ + "%*[^-]" /* (7) optional fields */ + "- " /* (8) separator */ + "%*s " /* (9) file system type */ + "%*s" /* (10) mount source */ + "%*s" /* (11) mount options 2 */ + "%*[^\n]", /* some rubbish at the end */ + &path); + if (k != 1) { if (k == EOF) break; log_warning("Failed to parse /proc/self/mountinfo:%u.", i); - - free(path); continue; } p = cunescape(path); - free(path); - - if (!p) { - r = -ENOMEM; - goto finish; - } + if (!p) + return -ENOMEM; /* Ignore mount points we can't unmount because they * are API or because we are keeping them open (like @@ -118,22 +112,17 @@ static int mount_points_list_get(MountPoint **head) { continue; } - if (!(m = new0(MountPoint, 1))) { + m = new0(MountPoint, 1); + if (!m) { free(p); - r = -ENOMEM; - goto finish; + return -ENOMEM; } m->path = p; LIST_PREPEND(mount_point, *head, m); } - r = 0; - -finish: - fclose(proc_self_mountinfo); - - return r; + return 0; } static int swap_list_get(MountPoint **head) { -- 1.7.9.2 ++++++ 0001-units-introduce-network-pre.target-as-place-to-hook-.patch ++++++
From a4a878d04045b46fa9783664e3643a890b356790 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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-units-make-ExecStopPost-action-part-of-ExecStart.patch ++++++
Based on d3381512282f2ca1c7669f77fb736a90fdce6982 Mon Sep 17 00:00:00 2001
From: Michal Sekletar
From 8c94052ee543c3598a3c7b0c46688150aa2c6168 Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Mon, 27 Oct 2014 17:15:42 +0100 Subject: [PATCH 1/2] units: tmpfiles-setup-dev - allow unsafe file creation to happen in /dev at boot
This will allow us to mark static device nodes with '!' to indicate that they should only be created at early boot. --- units/systemd-tmpfiles-setup-dev.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in index f3833fd..0123a03 100644 --- a/units/systemd-tmpfiles-setup-dev.service.in +++ b/units/systemd-tmpfiles-setup-dev.service.in @@ -17,4 +17,4 @@ ConditionCapability=CAP_SYS_MODULE [Service] Type=oneshot RemainAfterExit=yes -ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create +ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create --boot -- 2.1.2 ++++++ 0001-util-consider-0x7F-a-control-chracter-which-it-is-DE.patch ++++++
From 3a8a916338d8446b938f3cf40f6aae0c611892e3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 7 Jul 2014 11:47:10 +0200 Subject: [PATCH] util: consider 0x7F a control chracter (which it is: DEL)
Let's better be safe than sorry. --- src/shared/util.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git src/shared/util.c src/shared/util.c index 3d875c7..d25ee66 100644 --- src/shared/util.c +++ src/shared/util.c @@ -1608,8 +1608,9 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) { return -ETIMEDOUT; } + errno = 0; if (!fgets(line, sizeof(line), f)) - return -EIO; + return errno ? -errno : -EIO; truncate_nl(line); @@ -5355,6 +5356,9 @@ bool string_is_safe(const char *p) { if (*t > 0 && *t < ' ') return false; + if (*t == 127) + return false; + if (strchr("\\\"\'", *t)) return false; } @@ -5371,10 +5375,14 @@ bool string_has_cc(const char *p) { assert(p); - for (t = p; *t; t++) + for (t = p; *t; t++) { if (*t > 0 && *t < ' ' && *t != '\t') return true; + if (*t == 127) + return true; + } + return false; } -- 1.7.9.2 ++++++ 0001-vconsole-also-copy-character-maps-not-just-fonts-fro.patch ++++++
From ff452e76e2c0f89a32542b7179bb2fd538335933 Mon Sep 17 00:00:00 2001 From: Carl Schaefer
Date: Mon, 23 Jun 2014 18:23:48 +0200 Subject: [PATCH] vconsole: also copy character maps (not just fonts) from vt1 to vt2, vt3, ...
https://bugs.freedesktop.org/show_bug.cgi?id=78796 --- src/vconsole/vconsole-setup.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git src/vconsole/vconsole-setup.c src/vconsole/vconsole-setup.c index 0f2b706..e0c4050 100644 --- src/vconsole/vconsole-setup.c +++ src/vconsole/vconsole-setup.c @@ -180,6 +180,10 @@ static int font_load(const char *vc, const char *font, const char *map, const ch */ static void font_copy_to_all_vcs(int fd) { struct vt_stat vcs = {}; + unsigned char map8[E_TABSZ]; + unsigned short map16[E_TABSZ]; + struct unimapdesc unimapd; + struct unipair unipairs[USHRT_MAX]; int i, r; /* get active, and 16 bit mask of used VT numbers */ @@ -209,6 +213,26 @@ static void font_copy_to_all_vcs(int fd) { cfo.op = KD_FONT_OP_COPY; cfo.height = vcs.v_active-1; /* tty1 == index 0 */ ioctl(vcfd, KDFONTOP, &cfo); + + /* copy map of 8bit chars */ + if (ioctl(fd, GIO_SCRNMAP, map8) >= 0) + ioctl(vcfd, PIO_SCRNMAP, map8); + + /* copy map of 8bit chars -> 16bit Unicode values */ + if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0) + ioctl(vcfd, PIO_UNISCRNMAP, map16); + + /* copy unicode translation table */ + /* unimapd is a ushort count and a pointer to an + array of struct unipair { ushort, ushort } */ + unimapd.entries = unipairs; + unimapd.entry_ct = USHRT_MAX; + if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) { + struct unimapinit adv = { 0, 0, 0 }; + + ioctl(vcfd, PIO_UNIMAPCLR, &adv); + ioctl(vcfd, PIO_UNIMAP, &unimapd); + } } } -- 1.7.9.2 ++++++ 0001-virt-detect-that-we-are-running-inside-the-docker-co.patch ++++++
From 893e72da6b27c21b102e1589276e651e9e4f591c Mon Sep 17 00:00:00 2001 From: Michal Sekletar
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
++++++ 0001-virt-rework-container-detection-logic.patch ++++++
Based on fdd25311706bd32580ec4d43211cdf4665d2f9de Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 15f392394e75ffb7f318920008fd1bbe4e82b488 Mon Sep 17 00:00:00 2001 From: Scott Thrasher
Date: Wed, 26 Mar 2014 18:48:13 -0700 Subject: [PATCH] Add hwdb entry for Samsung Series 7 Ultra
---
hwdb/60-keyboard.hwdb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb
index bd8fd10..832c686 100644
--- hwdb/60-keyboard.hwdb
+++ hwdb/60-keyboard.hwdb
@@ -924,6 +924,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
KEYBOARD_KEY_96=!kbdillumup # Fn+F8 keyboard backlight up
KEYBOARD_KEY_d5=!wlan # Fn+F12 Wi-Fi toggle
+# Series 7 Ultra
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*7[34]0U3E*:pvr*
+ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings
+ KEYBOARD_KEY_97=!kbdillumdown # Fn+F9 keyboard backlight down
+ KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up
+ KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer
+ KEYBOARD_KEY_d5=!wlan # Fn+F12 wlan/airplane switch
+
# SQ1US
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr*
KEYBOARD_KEY_d4=menu
--
1.7.9.2
++++++ 0002-Be-more-verbose-when-bind-or-listen-fails.patch ++++++
Based on 6b9732b2bf0499c5e4ea8a9d4f6051d98033f680 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From d725a138c5c311ba06567d6841933aa5b7b6a435 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Thu, 11 Sep 2014 23:41:44 +0200 Subject: [PATCH] analyze: avoid a null dereference
If we have an error in the early sd_bus_* calls then unit_times will still be null. Found with coverity. Fixes: CID#996464 --- src/analyze/analyze.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/analyze/analyze.c src/analyze/analyze.c index d860a02..1281d6b 100644 --- src/analyze/analyze.c +++ src/analyze/analyze.c @@ -277,7 +277,8 @@ static int acquire_time_data(sd_bus *bus, struct unit_times **out) { return c; fail: - free_unit_times(unit_times, (unsigned) c); + if (unit_times) + free_unit_times(unit_times, (unsigned) c); return r; } -- 1.7.9.2 ++++++ 0002-analyze-run-use-bus_open_transport_systemd-instead-o.patch ++++++
From 1f89214e6e990a0b552f6854f87f8514ca384956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?=
Date: Fri, 21 Feb 2014 11:55:24 +0100 Subject: [PATCH] analyze/run: use bus_open_transport_systemd instead of bus_open_transport
Both systemd-analyze and systemd-run only access org.freedesktop.systemd1 on the bus. This patch allows using systemd-run --user and systemd-analyze --user even if the user session's bus is not properly integrated with the systemd user unit. https://bugs.freedesktop.org/show_bug.cgi?id=79252 and other reports... --- src/analyze/analyze.c | 2 +- src/run/run.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git src/analyze/analyze.c src/analyze/analyze.c index 4c5fcfe..0a4190c 100644 --- src/analyze/analyze.c +++ src/analyze/analyze.c @@ -1335,7 +1335,7 @@ int main(int argc, char *argv[]) { if (r <= 0) goto finish; - r = bus_open_transport(arg_transport, arg_host, arg_user, &bus); + r = bus_open_transport_systemd(arg_transport, arg_host, arg_user, &bus); if (r < 0) { log_error("Failed to create bus connection: %s", strerror(-r)); goto finish; diff --git src/run/run.c src/run/run.c index e4c695c..9d5527b 100644 --- src/run/run.c +++ src/run/run.c @@ -593,7 +593,7 @@ int main(int argc, char* argv[]) { arg_description = description; } - r = bus_open_transport(arg_transport, arg_host, arg_user, &bus); + r = bus_open_transport_systemd(arg_transport, arg_host, arg_user, &bus); if (r < 0) { log_error("Failed to create bus connection: %s", strerror(-r)); goto finish; -- 1.7.9.2 ++++++ 0002-architecture-Add-cris.patch ++++++
From 86bafac9540ba9e111ccba2fdf4161fe3a67cd3b Mon Sep 17 00:00:00 2001 From: Umut Tezduyar Lindskog
Date: Tue, 4 Mar 2014 13:58:35 +0100 Subject: [PATCH] architecture: Add cris
--- src/shared/architecture.c | 3 +++ src/shared/architecture.h | 3 +++ 2 files changed, 6 insertions(+) diff --git src/shared/architecture.c src/shared/architecture.c index fcdb3d5..9e0c3ef 100644 --- src/shared/architecture.c +++ src/shared/architecture.c @@ -114,6 +114,8 @@ Architecture uname_architecture(void) { { "m68k", ARCHITECTURE_M68K }, #elif defined(__tilegx__) { "tilegx", ARCHITECTURE_TILEGX }, +#elif defined(__cris__) + { "cris", ARCHITECTURE_CRIS }, #else #error "Please register your architecture here!" #endif @@ -161,6 +163,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = { [ARCHITECTURE_SH64] = "sh64", [ARCHITECTURE_M68K] = "m68k", [ARCHITECTURE_TILEGX] = "tilegx", + [ARCHITECTURE_CRIS] = "cris", }; DEFINE_STRING_TABLE_LOOKUP(architecture, Architecture); diff --git src/shared/architecture.h src/shared/architecture.h index e589a91..20e848b 100644 --- src/shared/architecture.h +++ src/shared/architecture.h @@ -48,6 +48,7 @@ typedef enum Architecture { ARCHITECTURE_SH64, ARCHITECTURE_M68K, ARCHITECTURE_TILEGX, + ARCHITECTURE_CRIS, _ARCHITECTURE_MAX, _ARCHITECTURE_INVALID = -1 } Architecture; @@ -110,6 +111,8 @@ Architecture uname_architecture(void); # define native_architecture() ARCHITECTURE_M68K #elif defined(__tilegx__) # define native_architecture() ARCHITECTURE_TILEGX +#elif defined(__cris__) +# define native_architecture() ARCHITECTURE_CRIS #else #error "Please register your architecture here!" #endif -- 1.7.9.2 ++++++ 0002-backlight-do-nothing-if-max_brightness-is-0.patch ++++++
From 3cadce7d33e263ec7a6a83c00c11144930258b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?=
Date: Thu, 27 Mar 2014 23:41:59 +0100 Subject: [PATCH] backlight: do nothing if max_brightness is 0
On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded. It exposes a backlight device despite the lack of any physical backlight devices. This fake backlight device has max_brightness set to 0. Since the introduction of the clamp_brightness function, systemd-backlight tries to write '1' to brightness and fails. This patch changes systemd-backlight to exit gracefully when max_brightness is 0 before performing any action. This affects both the load and save actions. --- src/backlight/backlight.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git src/backlight/backlight.c src/backlight/backlight.c index abf8bcf..ce0385b 100644 --- src/backlight/backlight.c +++ src/backlight/backlight.c @@ -192,30 +192,37 @@ static bool validate_device(struct udev *udev, struct udev_device *device) { return true; } -/* Some systems turn the backlight all the way off at the lowest levels. - * clamp_brightness clamps the saved brightness to at least 1 or 5% of - * max_brightness. This avoids preserving an unreadably dim screen, which - * would otherwise force the user to disable state restoration. */ -static void clamp_brightness(struct udev_device *device, char **value) { +static unsigned get_max_brightness(struct udev_device *device) { int r; const char *max_brightness_str; - unsigned brightness, max_brightness, new_brightness; + unsigned max_brightness; max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness"); if (!max_brightness_str) { - log_warning("Failed to read max_brightness attribute; not checking saved brightness"); - return; + log_warning("Failed to read max_brightness attribute"); + return 0; } - r = safe_atou(*value, &brightness); + r = safe_atou(max_brightness_str, &max_brightness); if (r < 0) { - log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r)); - return; + log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r)); + return 0; } - r = safe_atou(max_brightness_str, &max_brightness); + return max_brightness; +} + +/* Some systems turn the backlight all the way off at the lowest levels. + * clamp_brightness clamps the saved brightness to at least 1 or 5% of + * max_brightness. This avoids preserving an unreadably dim screen, which + * would otherwise force the user to disable state restoration. */ +static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) { + int r; + unsigned brightness, new_brightness; + + r = safe_atou(*value, &brightness); if (r < 0) { - log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r)); + log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r)); return; } @@ -239,6 +246,7 @@ int main(int argc, char *argv[]) { _cleanup_udev_device_unref_ struct udev_device *device = NULL; _cleanup_free_ char *saved = NULL, *ss = NULL, *escaped_ss = NULL, *escaped_sysname = NULL, *escaped_path_id = NULL; const char *sysname, *path_id; + unsigned max_brightness; int r; if (argc != 3) { @@ -294,6 +302,14 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } + /* If max_brightness is 0, then there is no actual backlight + * device. This happens on desktops with Asus mainboards + * that load the eeepc-wmi module. + */ + max_brightness = get_max_brightness(device); + if (max_brightness == 0) + return EXIT_SUCCESS; + escaped_ss = cescape(ss); if (!escaped_ss) { log_oom(); @@ -348,7 +364,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - clamp_brightness(device, &value); + clamp_brightness(device, &value, max_brightness); r = udev_device_set_sysattr_value(device, "brightness", value); if (r < 0) { -- 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
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-bus-fix-memory-leak-when-kdbus-is-not-enabled.patch ++++++
From 82923adfe5c4fa09cc91fd2a2e374c936cd4a186 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 13 Mar 2014 20:00:50 +0100 Subject: [PATCH] bus: fix memory leak when kdbus is not enabled
--- src/libsystemd/sd-bus/sd-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index ffa3369..ca7c428 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -1189,7 +1189,8 @@ _public_ int sd_bus_open_user(sd_bus **ret) { #ifdef ENABLE_KDBUS asprintf(&b->address, KERNEL_USER_BUS_FMT, (unsigned long) getuid()); #else - return -ECONNREFUSED; + r = -ECONNREFUSED; + goto fail; #endif } -- 1.7.9.2 ++++++ 0002-bus-make-use-of-sd_bus_try_close-in-exit-on-idle-ser.patch ++++++
From b27adf354a83ad25f4a209c0a6f7989ecab7b4e2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 5 Jun 2014 13:31:25 +0200 Subject: [PATCH] bus: make use of sd_bus_try_close() in exit-on-idle services
--- src/libsystemd/sd-bus/bus-util.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git src/libsystemd/sd-bus/bus-util.c src/libsystemd/sd-bus/bus-util.c index 6bd21cc..6441c5b 100644 --- src/libsystemd/sd-bus/bus-util.c +++ src/libsystemd/sd-bus/bus-util.c @@ -43,7 +43,9 @@ static int name_owner_change_callback(sd_bus *bus, sd_bus_message *m, void *user assert(m); assert(e); + sd_bus_close(bus); sd_event_exit(e, 0); + return 1; } @@ -121,11 +123,30 @@ int bus_event_loop_with_idle( return r; if (r == 0 && !exiting) { - r = bus_async_unregister_and_exit(e, bus, name); + + r = sd_bus_try_close(bus); + if (r == -EBUSY) + continue; + + if (r == -ENOTSUP) { + /* Fallback for dbus1 connections: we + * unregister the name and wait for + * the response to come through for + * it */ + + r = bus_async_unregister_and_exit(e, bus, name); + if (r < 0) + return r; + + exiting = true; + continue; + } + if (r < 0) return r; - exiting = true; + sd_event_exit(e, 0); + break; } } -- 1.7.9.2 ++++++ 0002-bus-remove-unused-check.patch ++++++
From 04c553e322680b6fcdf5b271e84b0b4b0ad8d5f9 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Tue, 23 Sep 2014 21:34:21 +0200 Subject: [PATCH] bus: remove unused check
strerror_r does not return null here and even if it did we would have problems already at the preceding strlen call. Found by coverity. Fixes: CID#1237770 --- src/libsystemd/sd-bus/bus-error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/libsystemd/sd-bus/bus-error.c src/libsystemd/sd-bus/bus-error.c index c2e41fb..abdfd73 100644 --- src/libsystemd/sd-bus/bus-error.c +++ src/libsystemd/sd-bus/bus-error.c @@ -312,7 +312,7 @@ static void bus_error_strerror(sd_bus_error *e, int error) { continue; } - if (!x || errno) { + if (errno) { free(m); return; } -- 1.7.9.2 ++++++ 0002-core-make-sure-Environment-fields-passed-in-for-tran.patch ++++++
From cdd7b7dfd44649b204c43e907f03d4294de4f28a Mon Sep 17 00:00:00 2001 From: Hristo Venev
Date: Mon, 23 Jun 2014 18:53:04 +0200 Subject: [PATCH] core: make sure Environment fields passed in for transient units are properly written to unit files
From 375ae4aa4d2f89ae8afdd27e9f2b8336fcc2a046 Mon Sep 17 00:00:00 2001 From: Uoti Urpala
Date: Mon, 23 Jun 2014 16:50:03 +0300 Subject: [PATCH] core/transaction: fix cycle break attempts outside
https://bugs.freedesktop.org/show_bug.cgi?id=76744
---
src/core/dbus-execute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/core/dbus-execute.c src/core/dbus-execute.c
index cb9a077..ecbadd7 100644
--- src/core/dbus-execute.c
+++ src/core/dbus-execute.c
@@ -848,7 +848,7 @@ int bus_exec_context_set_transient_property(
strv_free(c->environment);
c->environment = e;
- joined = strv_join(c->environment, " ");
+ joined = strv_join_quoted(c->environment);
if (!joined)
return -ENOMEM;
--
1.7.9.2
++++++ 0002-core-transaction-fix-cycle-break-attempts-outside-tr.patch ++++++
transaction
Patch fixes some incorrect-looking code in transaction.c.
It could fix cases where Debian users with bad package configurations
had systemd go into an infinite loop printing messages about breaking an
ordering cycle, though I have not reproduced that problem myself.
transaction_verify_order_one() considers jobs/units outside current
transaction when checking whether ordering dependencies cause cycles.
It would also incorrectly try to break cycles at these jobs; this
cannot work, as the break action is to remove the job from the
transaction, which is a no-op if the job isn't part of the transaction
to begin with. The unit_matters_to_anchor() test also looks like it
would not work correctly for non-transaction jobs. Add a check to
verify that the unit is part of the transaction before considering a
job a candidate for deletion.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752259
---
src/core/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/core/transaction.c src/core/transaction.c
index d23a45c..805d40a 100644
--- src/core/transaction.c
+++ src/core/transaction.c
@@ -381,7 +381,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
"Found dependency on %s/%s",
k->unit->id, job_type_to_string(k->type));
- if (!delete &&
+ if (!delete && hashmap_get(tr->jobs, k->unit) &&
!unit_matters_to_anchor(k->unit, k)) {
/* Ok, we can drop this one, so let's
* do so. */
--
1.7.9.2
++++++ 0002-core-watchdog-bus-properties-cannot-be-both-writable.patch ++++++
Based on 4c3f1641f13b7687a0dc234d3ae387b7c40494ff Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 98b47d54ce946ad3524f84eb38d2413498a333dc Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 3 Mar 2014 17:11:39 +0100 Subject: [PATCH] execute: free directory path if we fail to remove it because we cannot allocate a thread
---
src/core/execute.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git src/core/execute.c src/core/execute.c
index 9de6e87..3312885 100644
--- src/core/execute.c
+++ src/core/execute.c
@@ -2713,6 +2713,8 @@ static void *remove_tmpdir_thread(void *p) {
}
void exec_runtime_destroy(ExecRuntime *rt) {
+ int r;
+
if (!rt)
return;
@@ -2722,13 +2724,25 @@ void exec_runtime_destroy(ExecRuntime *rt) {
if (rt->tmp_dir) {
log_debug("Spawning thread to nuke %s", rt->tmp_dir);
- asynchronous_job(remove_tmpdir_thread, rt->tmp_dir);
+
+ r = asynchronous_job(remove_tmpdir_thread, rt->tmp_dir);
+ if (r < 0) {
+ log_warning("Failed to nuke %s: %s", rt->tmp_dir, strerror(-r));
+ free(rt->tmp_dir);
+ }
+
rt->tmp_dir = NULL;
}
if (rt->var_tmp_dir) {
log_debug("Spawning thread to nuke %s", rt->var_tmp_dir);
- asynchronous_job(remove_tmpdir_thread, rt->var_tmp_dir);
+
+ r = asynchronous_job(remove_tmpdir_thread, rt->var_tmp_dir);
+ if (r < 0) {
+ log_warning("Failed to nuke %s: %s", rt->var_tmp_dir, strerror(-r));
+ free(rt->var_tmp_dir);
+ }
+
rt->var_tmp_dir = NULL;
}
--
1.7.9.2
++++++ 0002-fsck-include-device-name-in-the-message-about-missin.patch ++++++
Based on 8d2a6145334257c8a9ceabc9dd52dff06cca818e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From c49e59c1831f20fe02276d7bc6ba7d23d24c4ab3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 9 Jul 2014 13:20:05 +0200 Subject: [PATCH] hostnamed: add a new chassis type for watches
--- src/hostname/hostnamed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/hostname/hostnamed.c src/hostname/hostnamed.c index 514554d..eaae113 100644 --- src/hostname/hostnamed.c +++ src/hostname/hostnamed.c @@ -144,7 +144,8 @@ static bool valid_chassis(const char *chassis) { "laptop\0" "server\0" "tablet\0" - "handset\0", + "handset\0" + "watch\0", chassis); } -- 1.7.9.2 ++++++ 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
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
From f401e2b24ba17452f9655993a6dedefdffe06d23 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Tue, 11 Mar 2014 09:33:31 -0700 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index 0335a71..7d86f10 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -911,3 +911,15 @@ bluetooth:v012C* bluetooth:v012D* ID_VENDOR_FROM_DATABASE=Sony Corporation + +bluetooth:v012E* + ID_VENDOR_FROM_DATABASE=ASSA ABLOY + +bluetooth:v012F* + ID_VENDOR_FROM_DATABASE=Clarion Co., Ltd. + +bluetooth:v0130* + ID_VENDOR_FROM_DATABASE=Warehouse Innovations + +bluetooth:v0131* + ID_VENDOR_FROM_DATABASE=Cypress Semiconductor Corporation -- 1.7.9.2 ++++++ 0002-hwdb-update.patch ++++++ ++++ 2058 lines (skipped) ++++++ 0002-include-fcntl.h-rather-than-sys-fcntl.h.patch ++++++
From fdb8bd0fe7244b72ddc1c08e401ebddefdaf4f46 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing
Date: Thu, 18 Sep 2014 15:24:38 +0200 Subject: [PATCH] include fcntl.h rather than sys/fcntl.h
---
src/socket-proxy/socket-proxyd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/socket-proxy/socket-proxyd.c src/socket-proxy/socket-proxyd.c
index 81d8457..ff2b24f 100644
--- src/socket-proxy/socket-proxyd.c
+++ src/socket-proxy/socket-proxyd.c
@@ -26,7 +26,7 @@
#include
From baf167ee0a2953f98e4e7d4c35752ef737832674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Fri, 11 Apr 2014 20:57:27 -0400 Subject: [PATCH] journal: properly detect language specified in line
... it turns out that the duplicates in our own catalog were not real duplicates, but translations. --- TODO | 2 ++ src/journal/catalog.c | 53 +++++++++++++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 19 deletions(-) diff --git TODO TODO index 0343b94..a7307f7 100644 --- TODO +++ TODO @@ -709,6 +709,8 @@ External: * fedora: update policy to declare access mode and ownership of unit files to root:root 0644, and add an rpmlint check for it +* register catalog database signature as file magic + Regularly: * look for close() vs. close_nointr() vs. close_nointr_nofail() diff --git src/journal/catalog.c src/journal/catalog.c index 02dedc4..f03357d 100644 --- src/journal/catalog.c +++ src/journal/catalog.c @@ -159,6 +159,37 @@ int catalog_file_lang(const char* filename, char **lang) { return 1; } +static int catalog_entry_lang(const char* filename, int line, + const char* t, const char* deflang, char **lang) { + size_t c; + + c = strlen(t); + if (c == 0) { + log_error("[%s:%u] Language too short.", filename, line); + return -EINVAL; + } + if (c > 31) { + log_error("[%s:%u] language too long.", filename, line); + return -EINVAL; + } + + if (deflang) { + if (streq(t, deflang)) { + log_warning("[%s:%u] language specified unnecessarily", + filename, line); + return 0; + } else + log_warning("[%s:%u] language differs from default for file", + filename, line); + } + + *lang = strdup(t); + if (!*lang) + return -ENOMEM; + + return 0; +} + int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path) { _cleanup_fclose_ FILE *f = NULL; _cleanup_free_ char *payload = NULL; @@ -238,25 +269,9 @@ int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path) { if (with_language) { t = strstrip(line + 2 + 1 + 32 + 1); - c = strlen(t); - if (c <= 0) { - log_error("[%s:%u] Language too short.", path, n); - return -EINVAL; - } - if (c > 31) { - log_error("[%s:%u] language too long.", path, n); - return -EINVAL; - } - - if (deflang) { - log_warning("[%s:%u] language %s", path, n, - streq(t, deflang) ? - "specified unnecessarily" : - "differs from default for file"); - lang = strdup(t); - if (!lang) - return -ENOMEM; - } + r = catalog_entry_lang(path, n, t, deflang, &lang); + if (r < 0) + return r; } got_id = true; -- 1.7.9.2 ++++++ 0002-journalctl-man-allow-only-between-terms.patch ++++++
From 4e6029435111adcad71489aca2dd68bc65aeffd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sat, 19 Jul 2014 21:05:07 -0400 Subject: [PATCH] journalctl,man: allow + only between terms
https://bugzilla.redhat.com/show_bug.cgi?id=1110712
---
man/journalctl.xml | 19 +++++++++++++++----
src/journal/journalctl.c | 20 +++++++++++++++++---
2 files changed, 32 insertions(+), 7 deletions(-)
diff --git man/journalctl.xml man/journalctl.xml
index 47b5a05..df9c794 100644
--- man/journalctl.xml
+++ man/journalctl.xml
@@ -84,10 +84,11 @@
field, then they are automatically matched as
alternatives, i.e. the resulting output will show
entries matching any of the specified matches for the
- same field. Finally, if the character
- <literal>+</literal> appears as a separate word on the
- command line, all matches before and after are combined
- in a disjunction (i.e. logical OR).</para>
+ same field. Finally, the character
+ <literal>+</literal> may appears as a separate word
+ between other terms on the command line. This causes
+ all matches before and after to be combined in a
+ disjunction (i.e. logical OR).</para>
<para>As shortcuts for a few types of field/value
matches, file paths may be specified. If a file path
@@ -98,11 +99,21 @@
<literal>_KERNEL_DEVICE=</literal> match for the
device.</para>
+ <para>Additional contraints may be added using options
+ <option>--boot</option>, <option>--unit=</option>,
+ etc, to futher limit what entries will be shown
+ (logical AND).</para>
+
<para>Output is interleaved from all accessible
journal files, whether they are rotated or currently
being written, and regardless of whether they belong to the
system itself or are accessible user journals.</para>
+ <para>The set of journal files which will be used
+ can be modified using the <option>--user</option>,
+ <option>--system</option>, <option>--directory</option>,
+ and <option>--file</option> options, see below.</para>
+
<para>All users are granted access to their private
per-user journals. However, by default, only root and
users who are members of the <literal>systemd-journal</literal>
diff --git src/journal/journalctl.c src/journal/journalctl.c
index 92e8286..7aedbf0 100644
--- src/journal/journalctl.c
+++ src/journal/journalctl.c
@@ -699,15 +699,20 @@ static int generate_new_id128(void) {
static int add_matches(sd_journal *j, char **args) {
char **i;
+ bool have_term = false;
assert(j);
STRV_FOREACH(i, args) {
int r;
- if (streq(*i, "+"))
+ if (streq(*i, "+")) {
+ if (!have_term)
+ break;
r = sd_journal_add_disjunction(j);
- else if (path_is_absolute(*i)) {
+ have_term = false;
+
+ } else if (path_is_absolute(*i)) {
_cleanup_free_ char *p, *t = NULL, *t2 = NULL;
const char *path;
_cleanup_free_ char *interpreter = NULL;
@@ -756,8 +761,12 @@ static int add_matches(sd_journal *j, char **args) {
r = sd_journal_add_match(j, t, 0);
if (t2)
r = sd_journal_add_match(j, t2, 0);
- } else
+ have_term = true;
+
+ } else {
r = sd_journal_add_match(j, *i, 0);
+ have_term = true;
+ }
if (r < 0) {
log_error("Failed to add match '%s': %s", *i, strerror(-r));
@@ -765,6 +774,11 @@ static int add_matches(sd_journal *j, char **args) {
}
}
+ if (!strv_isempty(args) && !have_term) {
+ log_error("\"+\" can only be used between terms");
+ return -EINVAL;
+ }
+
return 0;
}
--
1.7.9.2
++++++ 0002-journald-make-MaxFileSec-really-default-to-1month.patch ++++++
Based on e150e82097211f09b911c7784a89ef9efed713ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Bartoszkiewicz?=
From 1f6d36f267186c0e3184bab4c7eca48481c6faab Mon Sep 17 00:00:00 2001 From: Hui Wang
Date: Wed, 30 Jul 2014 16:09:08 +0800 Subject: [PATCH] keymap: Add microphone mute keymap for Dell Latitude
On the Dell Latitude, the mic mute key event is generated by wmi
driver, the keycode assigned to this hotkey from kernel is
KEY_MICMUTE (248), this keycode is too big for xorg to handle,
in the xorg, the XF86AudioMicMute is assigned to F20.
Please refer to 4e648ea0 of xkeyboard-config.
BugLink: https://bugs.launchpad.net/bugs/1326684
BugLink: https://bugs.launchpad.net/bugs/1339998
Signed-off-by: Hui Wang
From e55edb22a71e67f01534d28f91c6aa27bba48fc1 Mon Sep 17 00:00:00 2001 From: Martin Pitt
Date: Sun, 25 May 2014 12:16:35 +0200 Subject: [PATCH] keymap: Asus EeePC touchpad toggle key
Originally is KEY_TOUCHPAD_TOGGLE, but X.org can't handle the big key events, so use the F21 convention. https://bugs.freedesktop.org/show_bug.cgi?id=72807 --- hwdb/60-keyboard.hwdb | 1 + 1 file changed, 1 insertion(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index fe5b3ee..05e6a04 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -138,6 +138,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnASUS:pn* KEYBOARD_KEY_ef=mute 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_KEY_6b=f21 # Touchpad Toggle ########################################################### -- 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
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
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
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
From 3e6b205f81e743c7354ccbc69eb45afbdbebe2dc Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Tue, 25 Feb 2014 13:08:24 +0100 Subject: [PATCH] login: set pos-slot to fallback on pos-eviction
If we evict a session position, we open the position slot for future sessions. However, there might already be another session on the same position if both were started on the same VT. This is currently done if gdm spawns the session on its own Xserver. Hence, look for such a session on pos-eviction and claim the new slot immediately. --- src/login/logind-seat.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git src/login/logind-seat.c src/login/logind-seat.c index 36ec7ed..96cf08e 100644 --- src/login/logind-seat.c +++ src/login/logind-seat.c @@ -459,6 +459,7 @@ int seat_stop_sessions(Seat *s, bool force) { } void seat_evict_position(Seat *s, Session *session) { + Session *iter; unsigned int pos = session->pos; session->pos = 0; @@ -466,8 +467,19 @@ void seat_evict_position(Seat *s, Session *session) { if (!pos) return; - if (pos < s->position_count && s->positions[pos] == session) + if (pos < s->position_count && s->positions[pos] == session) { s->positions[pos] = NULL; + + /* There might be another session claiming the same + * position (eg., during gdm->session transition), so lets look + * for it and set it on the free slot. */ + LIST_FOREACH(sessions_by_seat, iter, s->sessions) { + if (iter->pos == pos) { + s->positions[pos] = iter; + break; + } + } + } } void seat_claim_position(Seat *s, Session *session, unsigned int pos) { -- 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
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-logind-bring-polkit-policy-for-hibernate-in-line-wit.patch ++++++
From 301f9684e6465df5d0590f6c571fe3229ded966d Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 15 May 2014 18:30:07 +0200 Subject: [PATCH] logind: bring polkit policy for hibernate in line with suspend/poweroff/reboot
THere's no reason why hibernate should be better protected then
suspendor poweroff, so sync the policies.
---
src/login/org.freedesktop.login1.policy.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/login/org.freedesktop.login1.policy.in src/login/org.freedesktop.login1.policy.in
index b96d32d..b8e90f1 100644
--- src/login/org.freedesktop.login1.policy.in
+++ src/login/org.freedesktop.login1.policy.in
@@ -254,7 +254,7 @@
<defaults>
From 7e9110a29d90041b0364cb93a84aec9dd72363b6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 3 Mar 2014 19:39:51 +0100 Subject: [PATCH] logind: fix printf format
--- src/login/logind-action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/login/logind-action.c src/login/logind-action.c index da5a830..c9d8bc5 100644 --- src/login/logind-action.c +++ src/login/logind-action.c @@ -81,7 +81,7 @@ int manager_handle_action( n = manager_count_displays(m); if (n != 1) { - log_debug("Ignoring lid switch request, %s displays connected."); + log_debug("Ignoring lid switch request, %i displays connected.", n); return 0; } } -- 1.7.9.2 ++++++ 0002-machined-fix-Kill-bus-call-on-machine-objects-when-w.patch ++++++
From de58a50e24a0d55e3bbcc77f8f6170a7322acf52 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 18 Mar 2014 04:43:08 +0100 Subject: [PATCH] machined: fix Kill() bus call on machine objects when "what" is specified as "leader"
--- src/machine/machine.c | 10 +++++++++- src/machine/machined-dbus.c | 4 ++-- src/machine/machined.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git src/machine/machine.c src/machine/machine.c index 4596a80..9a5cc9a 100644 --- src/machine/machine.c +++ src/machine/machine.c @@ -410,7 +410,15 @@ int machine_kill(Machine *m, KillWho who, int signo) { if (!m->unit) return -ESRCH; - return manager_kill_unit(m->manager, m->unit, who, signo, NULL); + if (who == KILL_LEADER) { + /* If we shall simply kill the leader, do so directly */ + + if (kill(m->leader, signo) < 0) + return -errno; + } + + /* Otherwise make PID 1 do it for us, for the entire cgroup */ + return manager_kill_unit(m->manager, m->unit, signo, NULL); } static const char* const machine_class_table[_MACHINE_CLASS_MAX] = { diff --git src/machine/machined-dbus.c src/machine/machined-dbus.c index 09d28bb..9473105 100644 --- src/machine/machined-dbus.c +++ src/machine/machined-dbus.c @@ -655,7 +655,7 @@ int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, c return 1; } -int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, sd_bus_error *error) { +int manager_kill_unit(Manager *manager, const char *unit, int signo, sd_bus_error *error) { assert(manager); assert(unit); @@ -667,7 +667,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo "KillUnit", error, NULL, - "ssi", unit, who == KILL_LEADER ? "main" : "all", signo); + "ssi", unit, "all", signo); } int manager_unit_is_active(Manager *manager, const char *unit) { diff --git src/machine/machined.h src/machine/machined.h index d4b581b..2dba303 100644 --- src/machine/machined.h +++ src/machine/machined.h @@ -67,6 +67,6 @@ int match_job_removed(sd_bus *bus, sd_bus_message *message, void *userdata, sd_b int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, sd_bus_message *more_properties, sd_bus_error *error, char **job); int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job); -int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, sd_bus_error *error); +int manager_kill_unit(Manager *manager, const char *unit, int signo, sd_bus_error *error); int manager_unit_is_active(Manager *manager, const char *unit); int manager_job_is_active(Manager *manager, const char *path); -- 1.7.9.2 ++++++ 0002-man-document-yearly-and-annually-in-systemd.time-7.patch ++++++
From 8c275eef38bf7e3e592e4cb35a497522d1f15bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Wed, 16 Jul 2014 22:17:29 -0400 Subject: [PATCH] man: document yearly and annually in systemd.time(7)
https://bugs.freedesktop.org/show_bug.cgi?id=81158 --- man/systemd.time.xml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git man/systemd.time.xml man/systemd.time.xml index 0706cdf..02431a5 100644 --- man/systemd.time.xml +++ man/systemd.time.xml @@ -243,12 +243,16 @@ <para>The special expressions <literal>hourly</literal>, <literal>daily</literal>, - <literal>monthly</literal> and <literal>weekly</literal> - may be used as calendar events which refer to - <literal>*-*-* *:00:00</literal>, <literal>*-*-* - 00:00:00</literal>, <literal>*-*-01 00:00:00</literal> and - <literal>Mon *-*-* 00:00:00</literal>, - respectively.</para> + <literal>monthly</literal>, <literal>weekly</literal>, + and <literal>yearly</literal> or + <literal>annually</literal> may be used as calendar + events which refer to + <literal>*-*-* *:00:00</literal>, + <literal>*-*-* 00:00:00</literal>, + <literal>*-*-01 00:00:00</literal>, + <literal>Mon *-*-* 00:00:00</literal>, and + <literal>*-01-01 00:00:00</literal> respectively. + </para> <para>Examples for valid timestamps and their normalized form:</para> @@ -277,6 +281,8 @@ Wed-Sat,Tue 12-10-15 1:2:3 → Tue-Sat 2012-10-15 01:02:03 daily → *-*-* 00:00:00 monthly → *-*-01 00:00:00 weekly → Mon *-*-* 00:00:00 + yearly → *-01-01 00:00:00 + annually → *-01-01 00:00:00 *:2/3 → *-*-* *:02/3:00</programlisting> <para>Calendar events are used by timer units, see -- 1.7.9.2 ++++++ 0002-man-note-that-entire-sections-can-now-be-ignored.patch ++++++
From 2bcc2523711e69e6daa744641e56ed8b78646676 Mon Sep 17 00:00:00 2001 From: Michael Marineau
Date: Sat, 17 May 2014 16:09:08 -0700 Subject: [PATCH] man: note that entire sections can now be ignored
Prefixing a section name with "X-" will cause it and all of its contents to be silently ignored as of commit 342aea19. --- man/systemd.unit.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git man/systemd.unit.xml man/systemd.unit.xml index 157530b..e903156 100644 --- man/systemd.unit.xml +++ man/systemd.unit.xml @@ -139,10 +139,12 @@ <para>Unit files may contain additional options on top of those listed here. If systemd encounters an unknown option, it will write a warning log message but - continue loading the unit. If an option is prefixed - with <option>X-</option>, it is ignored completely by - systemd. Applications may use this to include - additional information in the unit files.</para> + continue loading the unit. If an option or section name + is prefixed with <option>X-</option>, it is ignored + completely by systemd. Options within an ignored + section do not need the prefix. Applications may use + this to include additional information in the unit + files.</para> <para>Boolean arguments used in unit files can be written in various formats. For positive settings the -- 1.7.9.2 ++++++ 0002-man-tmpfiles.d-recommend-using-b-and-c.patch ++++++ diff -Naur systemd-210/man/tmpfiles.d.xml systemd-210-mod/man/tmpfiles.d.xml --- systemd-210/man/tmpfiles.d.xml 2014-12-16 10:16:51.269189374 +0100 +++ systemd-210-mod/man/tmpfiles.d.xml 2014-12-16 10:39:49.937552189 +0100 @@ -158,12 +158,18 @@ <varlistentry> <term><varname>c</varname></term> - <listitem><para>Create a character device node if it does not exist yet.</para></listitem> + <listitem><para>Create a character device node if it does not exist yet. + It is recommended to suffix this entry with an exclamation mark to only + create static device nodes at boot, as udev will not manage static device + nodes that are created at runtime.</para></listitem> </varlistentry> <varlistentry> <term><varname>b</varname></term> - <listitem><para>Create a block device node if it does not exist yet.</para></listitem> + <listitem><para>Create a block device node if it does not exist yet. + It is recommended to suffix this entry with an exclamation mark to only + create static device nodes at boot, as udev will not manage static device + nodes that re created at runtime.</para></listitem> </varlistentry> <varlistentry> ++++++ 0002-manager-flush-memory-stream-before-using-the-buffer.patch ++++++
From b2cdc6664ef6b56e47d38649d69b9943d9f9f5d0 Mon Sep 17 00:00:00 2001 From: Daniel Mack
Date: Fri, 7 Mar 2014 14:43:59 +0100 Subject: [PATCH] manager: flush memory stream before using the buffer
When the manager receives a SIGUSR2 signal, it opens a memory stream
with open_memstream(), uses the returned file handle for logging, and
dumps the logged content with log_dump().
However, the char* buffer is only safe to use after the file handle has
been flushed with fflush, as the man pages states:
When the stream is closed (fclose(3)) or flushed (fflush(3)), the
locations pointed to by ptr and sizeloc are updated to contain,
respectively, a pointer to the buffer and the current size of the
buffer.
These values remain valid only as long as the caller performs no
further output on the stream. If further output is performed, then the
stream must again be flushed before trying to access these variables.
Without that call, dump remains NULL and the daemon crashes in
log_dump().
---
src/core/manager.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git src/core/manager.c src/core/manager.c
index 27a1cc6..78f4f3d 100644
--- src/core/manager.c
+++ src/core/manager.c
@@ -1621,6 +1621,11 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
break;
}
+ if (fflush(f)) {
+ log_warning("Failed to flush status stream");
+ break;
+ }
+
log_dump(LOG_INFO, dump);
break;
}
--
1.7.9.2
++++++ 0002-namespace-fix-uninitialized-memory-access.patch ++++++
Based on 002b226843e77630128da580225f9c3ef8474db2 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From cdb2b9d05a2f3d649f47bd2ba24eb3fe30b52e92 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 22 May 2014 15:19:46 +0900 Subject: [PATCH] nspawn: restore journal directory is empty check
This undoes part of commit e6a4a517befe559adf6d1dbbadf425c3538849c9. Instead of removing the error message about non-empty journal bind mount directories, simply downgrade the message to a warning and proceed. --- src/nspawn/nspawn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git src/nspawn/nspawn.c src/nspawn/nspawn.c index ef84664..eb9c5e0 100644 --- src/nspawn/nspawn.c +++ src/nspawn/nspawn.c @@ -1143,6 +1143,9 @@ static int setup_journal(const char *directory) { } else if (access(p, F_OK) < 0) return 0; + if (dir_is_empty(q) == 0) + log_warning("%s is not empty, proceeding anyway.", q); + r = mkdir_p(q, 0755); if (r < 0) { log_error("Failed to create %s: %m", q); -- 1.7.9.2 ++++++ 0002-pam_systemd-use-F_DUPFD_CLOEXEC-when-dupping-session.patch ++++++
From 85c08dc013f9f99b58bc9b79284af0b35304237b Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 13 May 2014 16:35:34 +0200 Subject: [PATCH] pam_systemd: use F_DUPFD_CLOEXEC when dupping session fds
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019034.html
---
src/login/pam-module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/login/pam-module.c src/login/pam-module.c
index 9873dd5..1259457 100644
--- src/login/pam-module.c
+++ src/login/pam-module.c
@@ -475,7 +475,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
}
if (session_fd >= 0) {
- session_fd = dup(session_fd);
+ session_fd = fcntl(session_fd, F_DUPFD_CLOEXEC, 3);
if (session_fd < 0) {
pam_syslog(handle, LOG_ERR, "Failed to dup session fd: %m");
return PAM_SESSION_ERR;
--
1.7.9.2
++++++ 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch ++++++
Based on 4844262f25a3ff6bd23de05a0a6f84a8e2983d74 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 7cabba07745b388497e8c0fc19b61984167fd474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
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-switch-root-umount-the-old-root-correctly.patch ++++++
Based on 23f25b1496c31ef4c20b8f3ee8328f7b1d5f3a54 Mon Sep 17 00:00:00 2001
From: Dan Dedrick
From 2e573fcf8754fdfe0db0a783b1631ec1679b063a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Wed, 16 Apr 2014 21:33:46 -0400 Subject: [PATCH] sysctl: replaces some slashes with dots
It turns out that plain sysctl understands a.b/c syntax to write to /proc/sys/a/b.c. Support this for compatibility. https://bugs.freedesktop.org/show_bug.cgi?id=77466 --- man/sysctl.d.xml | 29 +++++++++++++++++++++-------- src/sysctl/sysctl.c | 18 ++++++++++++++++-- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git man/sysctl.d.xml man/sysctl.d.xml index 00a857b..db53b49 100644 --- man/sysctl.d.xml +++ man/sysctl.d.xml @@ -68,13 +68,26 @@ <para>The configuration files contain a list of variable assignments, separated by newlines. Empty lines and lines whose first non-whitespace character - is # or ; are ignored.</para> - - <para>Note that both / and . are accepted as label - separators within sysctl variable - names. <literal>kernel.domainname=foo</literal> and - <literal>kernel/domainname=foo</literal> hence are - entirely equivalent.</para> + is <literal>#</literal> or <literal>;</literal> are + ignored.</para> + + <para>Note that either <literal>/</literal> or + <literal>.</literal> may be used as separators within + sysctl variable names. If the first separator is a + slash, remaining slashes and dots are left intact. If + the first separator is a dot, dots and slashes are + interchanged. <literal>kernel.domainname=foo</literal> + and <literal>kernel/domainname=foo</literal> are + equivalent and will cause <literal>foo</literal> to + be written to + <filename>/proc/sys/kernel/domainname</filename>. + Either + <literal>net.ipv4.conf.enp3s0/200.forwarding</literal> + or + <literal>net/ipv4/conf/enp3s0.200/forwarding</literal> + may be used to refer to + <filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>. + </para> <para>Each configuration file shall be named in the style of <filename><replaceable>program</replaceable>.conf</filename>. @@ -109,7 +122,7 @@ early on boot. The network interface-specific options will also be applied individually for each network interface as it shows up in the system. (More - specifically, that is + specifically, <filename>net.ipv4.conf.*</filename>, <filename>net.ipv6.conf.*</filename>, <filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>)</para> diff --git src/sysctl/sysctl.c src/sysctl/sysctl.c index 283eefe..06defa5 100644 --- src/sysctl/sysctl.c +++ src/sysctl/sysctl.c @@ -48,12 +48,26 @@ static const char conf_file_dirs[] = #endif ; -static char *normalize_sysctl(char *s) { +static char* normalize_sysctl(char *s) { char *n; - for (n = s; *n; n++) + n = strpbrk(s, "/."); + /* If the first separator is a slash, the path is + * assumed to be normalized and slashes remain slashes + * and dots remains dots. */ + if (!n || *n == '/') + return s; + + /* Otherwise, dots become slashes and slashes become + * dots. Fun. */ + while (n) { if (*n == '.') *n = '/'; + else + *n = '.'; + + n = strpbrk(n + 1, "/."); + } return s; } -- 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?=
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-systemctl-show-BindsTo-BoundBy-in-list-dependencies.patch ++++++
From c469089cf647ac740c7dcf09c463d2907b6d00eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sat, 22 Nov 2014 20:21:56 -0500 Subject: [PATCH] systemctl: show BindsTo/BoundBy in list-dependencies
Suggested-by: Peter Mattern
From b3ae710c251d0ce5cf2cef63208e325497b5e323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Tue, 1 Apr 2014 20:43:15 -0400 Subject: [PATCH] systemctl: update NAME to PATTERN in help()
Previously the man page was modified, but not help().
---
TODO | 2 ++
src/systemctl/systemctl.c | 14 +++++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git TODO TODO
index 4ff69ff..0343b94 100644
--- TODO
+++ TODO
@@ -1,4 +1,6 @@
Bugfixes:
+* Should systemctl status \* work on all unit types, not just .service?
+
* enabling an instance unit creates a pointless link, and
the unit will be started with getty@getty.service:
$ systemctl enable getty@.service
diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c
index 6b88f85..653a324 100644
--- src/systemctl/systemctl.c
+++ src/systemctl/systemctl.c
@@ -5403,15 +5403,15 @@ static int systemctl_help(void) {
" otherwise restart if active\n"
" isolate NAME Start one unit and stop all others\n"
" kill NAME... Send signal to processes of a unit\n"
- " is-active NAME... Check whether units are active\n"
- " is-failed NAME... Check whether units are failed\n"
- " status [NAME...|PID...] Show runtime status of one or more units\n"
- " show [NAME...|JOB...] Show properties of one or more\n"
+ " is-active PATTERN... Check whether units are active\n"
+ " is-failed PATTERN... Check whether units are failed\n"
+ " status [PATTERN...|PID...] Show runtime status of one or more units\n"
+ " show [PATTERN...|JOB...] Show properties of one or more\n"
" units/jobs or the manager\n"
- " cat NAME... Show files and drop-ins of one or more units\n"
+ " cat PATTERN... Show files and drop-ins of one or more units\n"
" set-property NAME ASSIGNMENT... Sets one or more properties of a unit\n"
- " help NAME...|PID... Show manual for one or more units\n"
- " reset-failed [NAME...] Reset failed state for all, one, or more\n"
+ " help PATTERN...|PID... Show manual for one or more units\n"
+ " reset-failed [PATTERN...] Reset failed state for all, one, or more\n"
" units\n"
" list-dependencies [NAME] Recursively show units which are required\n"
" or wanted by this unit or by which this\n"
--
1.7.9.2
++++++ 0002-systemd-fix-error-message.patch ++++++
Based on 6ad3b2b62cbe34cc02ee98deb5f48047f5e42d26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From 24119cf10c7ed58a8fc0851745149dcc6dd5757f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?=
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
++++++ 0002-units-add-missing-caps-so-that-GetAddresses-can-work.patch ++++++
Basedo n a55954297dade7b432fd3a4f328f23261621ff79 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 66f311206e908a5b6f21e66fad73e1e5ea3e31d6 Mon Sep 17 00:00:00 2001 From: Ivan Shapovalov
Date: Wed, 27 Aug 2014 00:17:43 +0400 Subject: [PATCH] units: order systemd-fsck@.service after local-fs-pre.target.
With this change, it becomes possible to order a unit to activate before any
modifications to the file systems. This is especially useful for supporting
resume from hibernation.
---
units/systemd-fsck@.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git units/systemd-fsck@.service.in units/systemd-fsck@.service.in
index c12efa8..d2cda6a 100644
--- units/systemd-fsck@.service.in
+++ units/systemd-fsck@.service.in
@@ -10,7 +10,7 @@ Description=File System Check on %f
Documentation=man:systemd-fsck@.service(8)
DefaultDependencies=no
BindsTo=%i.device
-After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service
+After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service local-fs-pre.target
Before=shutdown.target
[Service]
--
1.7.9.2
++++++ 0002-units-serial-getty-.service-use-the-default-RestartS.patch ++++++
Based on 4bf04322b8b7ecca4f3d65cfc642d0ac16356129 Mon Sep 17 00:00:00 2001
From: Michael Olbrich
From 6294aa76d818e831de4592b41a37e225fd0871f9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 7 Jul 2014 12:04:55 +0200 Subject: [PATCH] util: don't consider tabs special in string_has_cc() anymore
Instead, take a list of exceptions to our usual CC check
---
src/hostname/hostnamed.c | 3 +--
src/shared/env-util.c | 4 +++-
src/shared/fileio.c | 2 +-
src/shared/util.c | 19 ++++++++++---------
src/shared/util.h | 5 +++--
5 files changed, 18 insertions(+), 15 deletions(-)
Index: src/hostname/hostnamed.c
===================================================================
--- src/hostname/hostnamed.c.orig
+++ src/hostname/hostnamed.c
@@ -507,8 +507,7 @@ static int set_machine_info(Context *c,
if (prop == PROP_ICON_NAME && !filename_is_safe(name))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid icon name '%s'", name);
- if (prop == PROP_PRETTY_HOSTNAME &&
- (string_has_cc(name) || chars_intersect(name, "\t")))
+ if (prop == PROP_PRETTY_HOSTNAME && string_has_cc(name, NULL))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid pretty host name '%s'", name);
if (prop == PROP_CHASSIS && !valid_chassis(name))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid chassis '%s'", name);
Index: src/shared/env-util.c
===================================================================
--- src/shared/env-util.c.orig
+++ src/shared/env-util.c
@@ -78,7 +78,9 @@ bool env_value_is_valid(const char *e) {
if (!utf8_is_valid(e))
return false;
- if (string_has_cc(e))
+ /* bash allows tabs in environment variables, and so should
+ * we */
+ if (string_has_cc(e, "\t"))
return false;
/* POSIX says the overall size of the environment block cannot
Index: src/shared/fileio.c
===================================================================
--- src/shared/fileio.c.orig
+++ src/shared/fileio.c
@@ -658,7 +658,7 @@ static void write_env_var(FILE *f, const
p++;
fwrite(v, 1, p-v, f);
- if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
+ if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
fputc('\"', f);
for (; *p; p++) {
Index: src/shared/util.c
===================================================================
--- src/shared/util.c.orig
+++ src/shared/util.c
@@ -5466,16 +5466,14 @@ bool filename_is_safe(const char *p) {
bool string_is_safe(const char *p) {
const char *t;
- assert(p);
+ if (!p)
+ return false;
for (t = p; *t; t++) {
if (*t > 0 && *t < ' ')
return false;
- if (*t == 127)
- return false;
-
- if (strchr("\\\"\'", *t))
+ if (strchr("\\\"\'\0x7f", *t))
return false;
}
@@ -5483,16 +5481,19 @@ bool string_is_safe(const char *p) {
}
/**
- * Check if a string contains control characters.
- * Spaces and tabs are not considered control characters.
+ * Check if a string contains control characters. If 'ok' is non-NULL
+ * it may be a string containing additional CCs to be considered OK.
*/
-bool string_has_cc(const char *p) {
+bool string_has_cc(const char *p, const char *ok) {
const char *t;
assert(p);
for (t = p; *t; t++) {
- if (*t > 0 && *t < ' ' && *t != '\t')
+ if (ok && strchr(ok, *t))
+ return false;
+
+ if (*t > 0 && *t < ' ')
return true;
if (*t == 127)
Index: src/shared/util.h
===================================================================
--- src/shared/util.h.orig
+++ src/shared/util.h
@@ -652,7 +652,7 @@ _alloc_(2, 3) static inline void *memdup
bool filename_is_safe(const char *p) _pure_;
bool path_is_safe(const char *p) _pure_;
bool string_is_safe(const char *p) _pure_;
-bool string_has_cc(const char *p) _pure_;
+bool string_has_cc(const char *p, const char *ok) _pure_;
/**
* Check if a string contains any glob patterns.
++++++ 0002-util-fix-has-cc-check-and-add-test.patch ++++++
Based on 1cb1767a29458b3d16d6b161b4ee34dd496ff60d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From f0ea29eaeb3449822bfbdfa839b00e323dfc523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sun, 20 Jul 2014 19:47:42 -0400 Subject: [PATCH] Add quotes to warning message
The message for SYSTEMD_LOG_LEVEL= looked a bit strange.
---
src/shared/log.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git src/shared/log.c src/shared/log.c
index 9039db3..3941e3e 100644
--- src/shared/log.c
+++ src/shared/log.c
@@ -884,19 +884,19 @@ void log_parse_environment(void) {
e = secure_getenv("SYSTEMD_LOG_TARGET");
if (e && log_set_target_from_string(e) < 0)
- log_warning("Failed to parse log target %s. Ignoring.", e);
+ log_warning("Failed to parse log target '%s'. Ignoring.", e);
e = secure_getenv("SYSTEMD_LOG_LEVEL");
if (e && log_set_max_level_from_string(e) < 0)
- log_warning("Failed to parse log level %s. Ignoring.", e);
+ log_warning("Failed to parse log level '%s'. Ignoring.", e);
e = secure_getenv("SYSTEMD_LOG_COLOR");
if (e && log_show_color_from_string(e) < 0)
- log_warning("Failed to parse bool %s. Ignoring.", e);
+ log_warning("Failed to parse bool '%s'. Ignoring.", e);
e = secure_getenv("SYSTEMD_LOG_LOCATION");
if (e && log_show_location_from_string(e) < 0)
- log_warning("Failed to parse bool %s. Ignoring.", e);
+ log_warning("Failed to parse bool '%s'. Ignoring.", e);
}
LogTarget log_get_target(void) {
--
1.7.9.2
++++++ 0003-Always-check-asprintf-return-code.patch ++++++
Based on 7de80bfe2e61d5818601ccfddbadad3b7703ed70 Mon Sep 17 00:00:00 2001
From: Karel Zak
From b5d742138f71e87312541a89aac5657015f50f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Tue, 4 Mar 2014 09:50:26 -0500 Subject: [PATCH] Do not print invalid UTF-8 in error messages
Inexplicably, 550a40ec ('core: do not print invalid utf-8 in error messages') only fixed two paths. Convert all of them now. --- src/core/load-fragment.c | 13 ++++--------- src/shared/conf-parser.c | 7 +++---- src/shared/conf-parser.h | 6 ++++++ src/shared/fileio.c | 9 ++++++--- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git src/core/load-fragment.c src/core/load-fragment.c index d77bf5c..5628d8c 100644 --- src/core/load-fragment.c +++ src/core/load-fragment.c @@ -536,9 +536,7 @@ int config_parse_exec(const char *unit, } if (!utf8_is_valid(path)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Path is not UTF-8 clean, ignoring assignment: %s", - rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); r = 0; goto fail; } @@ -553,9 +551,7 @@ int config_parse_exec(const char *unit, } if (!utf8_is_valid(c)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Path is not UTF-8 clean, ignoring assignment: %s", - rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); r = 0; goto fail; } @@ -1960,8 +1956,7 @@ int config_parse_unit_requires_mounts_for( return log_oom(); if (!utf8_is_valid(n)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Path is not UTF-8 clean, ignoring assignment: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); continue; } diff --git src/shared/conf-parser.c src/shared/conf-parser.c index 0a87a71..d27b1b7 100644 --- src/shared/conf-parser.c +++ src/shared/conf-parser.c @@ -618,8 +618,7 @@ int config_parse_string(const char *unit return log_oom(); if (!utf8_is_valid(n)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "String is not UTF-8 clean, ignoring assignment: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); free(n); return 0; } @@ -656,8 +655,7 @@ int config_parse_path(const char *unit, assert(data); if (!utf8_is_valid(rvalue)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Path is not UTF-8 clean, ignoring assignment: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); return 0; } @@ -725,8 +723,7 @@ int config_parse_strv(const char *unit, return log_oom(); if (!utf8_is_valid(n)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "String is not UTF-8 clean, ignoring: %s", rvalue); + log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue); continue; } diff --git src/shared/conf-parser.h src/shared/conf-parser.h index e1c7ab4..ba0e58d 100644 --- src/shared/conf-parser.h +++ src/shared/conf-parser.h @@ -121,6 +121,12 @@ int log_syntax_internal(const char *unit, int level, config_file, config_line, \ error, __VA_ARGS__) +#define log_invalid_utf8(unit, level, config_file, config_line, error, rvalue) { \ + _cleanup_free_ char *__p = utf8_escape_invalid(rvalue); \ + log_syntax(unit, level, config_file, config_line, error, \ + "String is not UTF-8 clean, ignoring assignment: %s", __p); \ + } + #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \ int function(const char *unit, \ const char *filename, \ diff --git src/shared/fileio.c src/shared/fileio.c index d591567..f101269 100644 --- src/shared/fileio.c +++ src/shared/fileio.c @@ -598,15 +598,18 @@ static int load_env_file_push(const char *filename, unsigned line, int r; if (!utf8_is_valid(key)) { + _cleanup_free_ char *t = utf8_escape_invalid(key); + log_error("%s:%u: invalid UTF-8 for key '%s', ignoring.", - filename, line, key); + filename, line, t); return -EINVAL; } if (value && !utf8_is_valid(value)) { - /* FIXME: filter UTF-8 */ + _cleanup_free_ char *t = utf8_escape_invalid(value); + log_error("%s:%u: invalid UTF-8 value for key %s: '%s', ignoring.", - filename, line, key, value); + filename, line, key, t); return -EINVAL; } -- 1.7.9.2 ++++++ 0003-Quote-unit-names-in-suggested-systemctl-commandlines.patch ++++++
From 8e07fc41f86d41e68c5663b2a3c620a0adedcc11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sun, 31 Aug 2014 00:42:27 -0400 Subject: [PATCH] Quote unit names in suggested systemctl commandlines
The fact that unit names have to be quoted can be a bit surprising. Show quotes in the hint commandline, but only after checking that this is necessary, since quotes are visually heavy and usually not needed. https://bugs.freedesktop.org/show_bug.cgi?id=82832 --- src/core/job.c | 11 +++++++++-- src/systemctl/systemctl.c | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git src/core/job.c src/core/job.c index 5e4987f..ef5dbce 100644 --- src/core/job.c +++ src/core/job.c @@ -632,11 +632,18 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) { unit_status_printf(u, ANSI_GREEN_ON " OK " ANSI_HIGHLIGHT_OFF, format); break; - case JOB_FAILED: + case JOB_FAILED: { + bool quotes; + + quotes = chars_intersect(u->id, SHELL_NEED_QUOTES); + manager_flip_auto_status(u->manager, true); unit_status_printf(u, ANSI_HIGHLIGHT_RED_ON "FAILED" ANSI_HIGHLIGHT_OFF, format); - manager_status_printf(u->manager, false, NULL, "See 'systemctl status %s' for details.", u->id); + manager_status_printf(u->manager, false, NULL, + "See \"systemctl status %s%s%s\" for details.", + quotes ? "'" : "", u->id, quotes ? "'" : ""); break; + } case JOB_DEPENDENCY: manager_flip_auto_status(u->manager, true); diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c index 6534819..de43c87 100644 --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c @@ -2351,8 +2351,18 @@ static int check_wait_response(WaitData *d) { log_error("Job for %s canceled.", strna(d->name)); else if (streq(d->result, "dependency")) log_error("A dependency job for %s failed. See 'journalctl -xn' for details.", strna(d->name)); - else if (!streq(d->result, "done") && !streq(d->result, "skipped")) - log_error("Job for %s failed. See 'systemctl status %s' and 'journalctl -xn' for details.", strna(d->name), strna(d->name)); + else if (!streq(d->result, "done") && !streq(d->result, "skipped")) { + if (d->name) { + bool quotes; + + quotes = chars_intersect(d->name, SHELL_NEED_QUOTES); + + log_error("Job for %s failed. See \"systemctl status %s%s%s\" and \"journalctl -xn\" for details.", + d->name, + quotes ? "'" : "", d->name, quotes ? "'" : ""); + } else + log_error("Job failed. See \"journalctl -xn\" for details."); + } } if (streq(d->result, "timeout")) -- 1.7.9.2 ++++++ 0003-analyze-fix-mem-leak.patch ++++++
From 0ee9613d98cbe1f36ffc98c6bfa51dd2b798fc6d Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Sat, 13 Sep 2014 12:29:43 +0200 Subject: [PATCH] analyze: fix mem leak
Found with Coverity. Fixes: CID#1237756 --- src/analyze/analyze.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/analyze/analyze.c src/analyze/analyze.c index 1281d6b..82f5cf3 100644 --- src/analyze/analyze.c +++ src/analyze/analyze.c @@ -848,7 +848,8 @@ static int list_dependencies(sd_bus *bus, const char *name) { char ts[FORMAT_TIMESPAN_MAX]; struct unit_times *times; int r; - const char *path, *id; + const char *id; + _cleanup_free_ char *path = NULL; _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; struct boot_times *boot; -- 1.7.9.2 ++++++ 0003-analyze-fix-plot-with-bad-y-size.patch ++++++
From a213b7e977221ca96bbc1b19a5a879c912ba2488 Mon Sep 17 00:00:00 2001 From: Jeffrey Clark
Date: Wed, 23 Apr 2014 22:37:43 +0200 Subject: [PATCH] analyze: fix plot with bad y size
systemd-analyze plot > test.svg produces output with all y and height element attributes equal to zero. This of course causes the resulting svg to appear blank (zero height). Bug does not affect x86. Looks like a compiler optimization may be the culprit. https://github.com/archlinuxarm/PKGBUILDs/issues/815 --- src/analyze/analyze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/analyze/analyze.c src/analyze/analyze.c index ba236d9..ebaa9d0 100644 --- src/analyze/analyze.c +++ src/analyze/analyze.c @@ -43,7 +43,7 @@ #include "pager.h" #define SCALE_X (0.1 / 1000.0) /* pixels per us */ -#define SCALE_Y 20.0 +#define SCALE_Y (20.0) #define compare(a, b) (((a) > (b))? 1 : (((b) > (a))? -1 : 0)) -- 1.7.9.2 ++++++ 0003-arch-add-crisv32-to-uname-check.patch ++++++
From 9b3a0ba3e9e28382a1072bf0e2c07a3661432743 Mon Sep 17 00:00:00 2001 From: Umut Tezduyar Lindskog
Date: Thu, 3 Jul 2014 09:54:45 +0200 Subject: [PATCH] arch: add crisv32 to uname check
---
src/shared/architecture.c | 1 +
1 file changed, 1 insertion(+)
diff --git src/shared/architecture.c src/shared/architecture.c
index 9e0c3ef..7dd049a 100644
--- src/shared/architecture.c
+++ src/shared/architecture.c
@@ -116,6 +116,7 @@ Architecture uname_architecture(void) {
{ "tilegx", ARCHITECTURE_TILEGX },
#elif defined(__cris__)
{ "cris", ARCHITECTURE_CRIS },
+ { "crisv32", ARCHITECTURE_CRIS },
#else
#error "Please register your architecture here!"
#endif
--
1.7.9.2
++++++ 0003-architecture-add-string-table-entries-for-mips-le-ar.patch ++++++
Based on 037c26d0aeb750ca9c8d605884ea1db7baecfea8 Mon Sep 17 00:00:00 2001
Based on 9a00f57a5ba7ed431e6bac8d8b36518708503b4e Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 4155f7d4be5053d5f34a26e5437fd85e1fe00fa3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 11 Aug 2014 18:23:47 +0200 Subject: [PATCH] bootchart: it's not OK to return -1 from a main program
--- src/bootchart/bootchart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git src/bootchart/bootchart.c src/bootchart/bootchart.c index c0e176d..8ef5ad1 100644 --- src/bootchart/bootchart.c +++ src/bootchart/bootchart.c @@ -380,8 +380,8 @@ int main(int argc, char *argv[]) { sampledata = new0(struct list_sample_data, 1); if (sampledata == NULL) { - log_error("Failed to allocate memory for a node: %m"); - return -1; + log_oom(); + return EXIT_FAILURE; } sampledata->sampletime = gettime_ns(); -- 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
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-busname-don-t-drop-service-from-the-result-string.patch ++++++
From 700ff4d97311902a440109a2c081731ab6ae8a20 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 7 Mar 2014 17:29:16 +0100 Subject: [PATCH] busname: don't drop 'service' from the result string
--- src/core/busname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/busname.c src/core/busname.c index 237011a..bca2145 100644 --- src/core/busname.c +++ src/core/busname.c @@ -548,7 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState); static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = { [BUSNAME_SUCCESS] = "success", [BUSNAME_FAILURE_RESOURCES] = "resources", - [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "failed-permanent", + [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "service-failed-permanent", }; DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult); -- 1.7.9.2 ++++++ 0003-core-You-can-not-put-the-cached-result-of-use_smack-.patch ++++++
From d1d8e5d49f3149d03ceb94d1d2f6c14e7abccb6f Mon Sep 17 00:00:00 2001 From: Ronan Le Martret
Date: Tue, 22 Apr 2014 10:33:25 +0200 Subject: [PATCH] core: You can not put the cached result of use_smack fct, as we are not sure the "/sys" is mounted. So we should mount "sys" before "/proc"
https://bugs.freedesktop.org/show_bug.cgi?id=77646 --- src/core/mount-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git src/core/mount-setup.c src/core/mount-setup.c index ae8447c..991bfdf 100644 --- src/core/mount-setup.c +++ src/core/mount-setup.c @@ -67,10 +67,10 @@ typedef struct MountPoint { #define N_EARLY_MOUNT 5 static const MountPoint mount_table[] = { - { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, - NULL, MNT_FATAL|MNT_IN_CONTAINER }, { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL, MNT_FATAL|MNT_IN_CONTAINER }, + { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_FATAL|MNT_IN_CONTAINER }, { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, NULL, MNT_FATAL|MNT_IN_CONTAINER }, { "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, -- 1.7.9.2 ++++++ 0003-core-allow-transient-mount-units.patch ++++++
From 0e252f6b375af59eac9bd6d2fe8dd6ee2f51998d Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Fri, 6 Jun 2014 15:10:20 +0200 Subject: [PATCH] core: allow transient mount units
For now only What=, Options=, Type= are supported, and Where= is deduced from the unit name. --- src/core/dbus-mount.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- src/core/mount.c | 2 ++ 2 files changed, 65 insertions(+), 1 deletion(-) diff --git src/core/dbus-mount.c src/core/dbus-mount.c index e64d3ea..e27019d 100644 --- src/core/dbus-mount.c +++ src/core/dbus-mount.c @@ -124,6 +124,47 @@ const sd_bus_vtable bus_mount_vtable[] = { SD_BUS_VTABLE_END }; +static int bus_mount_set_transient_property( + Mount *m, + const char *name, + sd_bus_message *message, + UnitSetPropertiesMode mode, + sd_bus_error *error) { + + const char *new_property; + char **property; + char *p; + int r; + + assert(m); + assert(name); + assert(message); + + if (streq(name, "What")) + property = &m->parameters_fragment.what; + else if (streq(name, "Options")) + property = &m->parameters_fragment.options; + else if (streq(name, "Type")) + property = &m->parameters_fragment.fstype; + else + return 0; + + r = sd_bus_message_read(message, "s", &new_property); + if (r < 0) + return r; + + if (mode != UNIT_CHECK) { + p = strdup(new_property); + if (!p) + return -ENOMEM; + + free(*property); + *property = p; + } + + return 1; +} + int bus_mount_set_property( Unit *u, const char *name, @@ -132,12 +173,33 @@ int bus_mount_set_property( sd_bus_error *error) { Mount *m = MOUNT(u); + int r; assert(m); assert(name); assert(message); - return bus_cgroup_set_property(u, &m->cgroup_context, name, message, mode, error); + r = bus_cgroup_set_property(u, &m->cgroup_context, name, message, mode, error); + if (r != 0) + return r; + + if (u->transient && u->load_state == UNIT_STUB) { + /* This is a transient unit, let's load a little more */ + + r = bus_mount_set_transient_property(m, name, message, mode, error); + if (r != 0) + return r; + + r = bus_exec_context_set_transient_property(u, &m->exec_context, name, message, mode, error); + if (r != 0) + return r; + + r = bus_kill_context_set_transient_property(u, &m->kill_context, name, message, mode, error); + if (r != 0) + return r; + } + + return 0; } int bus_mount_commit_properties(Unit *u) { diff --git src/core/mount.c src/core/mount.c index a979837..14ac0a0 100644 --- src/core/mount.c +++ src/core/mount.c @@ -1819,6 +1819,8 @@ const UnitVTable mount_vtable = { .get_timeout = mount_get_timeout, + .can_transient = true, + .enumerate = mount_enumerate, .shutdown = mount_shutdown, -- 1.7.9.2 ++++++ 0003-core-make-sure-to-serialize-jobs-for-all-units.patch ++++++
From 9bdb98c59451ed090f8d35d470a54710f389ce71 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 16 May 2014 01:15:03 +0200 Subject: [PATCH] core: make sure to serialize jobs for all units
Previously we wouldn't serialize jobs for units that themselves have nothing to serialize. http://lists.freedesktop.org/archives/systemd-devel/2014-May/019051.html --- src/core/manager.c | 3 --- src/core/unit.c | 43 +++++++++++++++++++++---------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git src/core/manager.c src/core/manager.c index 1e3e127..d0af674 100644 --- src/core/manager.c +++ src/core/manager.c @@ -2131,9 +2131,6 @@ int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool switching_root) { if (u->id != t) continue; - if (!unit_can_serialize(u)) - continue; - /* Start marker */ fputs(u->id, f); fputc('\n', f); diff --git src/core/unit.c src/core/unit.c index c4ed923..41651ba 100644 --- src/core/unit.c +++ src/core/unit.c @@ -2288,25 +2288,25 @@ bool unit_can_serialize(Unit *u) { } int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) { - ExecRuntime *rt; int r; assert(u); assert(f); assert(fds); - if (!unit_can_serialize(u)) - return 0; - - r = UNIT_VTABLE(u)->serialize(u, f, fds); - if (r < 0) - return r; + if (unit_can_serialize(u)) { + ExecRuntime *rt; - rt = unit_get_exec_runtime(u); - if (rt) { - r = exec_runtime_serialize(rt, u, f, fds); + r = UNIT_VTABLE(u)->serialize(u, f, fds); if (r < 0) return r; + + rt = unit_get_exec_runtime(u); + if (rt) { + r = exec_runtime_serialize(rt, u, f, fds); + if (r < 0) + return r; + } } dual_timestamp_serialize(f, "inactive-exit-timestamp", &u->inactive_exit_timestamp); @@ -2368,17 +2368,14 @@ void unit_serialize_item(Unit *u, FILE *f, const char *key, const char *value) { } int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { - size_t offset; ExecRuntime **rt = NULL; + size_t offset; int r; assert(u); assert(f); assert(fds); - if (!unit_can_serialize(u)) - return 0; - offset = UNIT_VTABLE(u)->exec_runtime_offset; if (offset > 0) rt = (ExecRuntime**) ((uint8_t*) u + offset); @@ -2503,17 +2500,19 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { continue; } - if (rt) { - r = exec_runtime_deserialize_item(rt, u, l, v, fds); + if (unit_can_serialize(u)) { + if (rt) { + r = exec_runtime_deserialize_item(rt, u, l, v, fds); + if (r < 0) + return r; + if (r > 0) + continue; + } + + r = UNIT_VTABLE(u)->deserialize_item(u, l, v, fds); if (r < 0) return r; - if (r > 0) - continue; } - - r = UNIT_VTABLE(u)->deserialize_item(u, l, v, fds); - if (r < 0) - return r; } } -- 1.7.9.2 ++++++ 0003-core-never-consider-failure-when-reading-drop-ins-fa.patch ++++++
From bcd816bd349241bcd9c0bfbfd9cfe7b034ba351b Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 22 May 2014 16:49:12 +0900 Subject: [PATCH] core: never consider failure when reading drop-ins fatal
drop-ins don't carry the main configuration of a unit, hence read them if we can't, complain if we cannot, but don't fail. --- src/core/load-dropin.c | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) Index: src/core/load-dropin.c =================================================================== --- src/core/load-dropin.c.orig +++ src/core/load-dropin.c @@ -58,6 +58,7 @@ static int iterate_dir( if (errno == ENOENT) return 0; + log_error("Failed to open directory %s: %m", path); return -errno; } @@ -101,7 +102,6 @@ static int process_dir( char ***strv) { _cleanup_free_ char *path = NULL; - int r; assert(u); assert(unit_path); @@ -112,11 +112,8 @@ static int process_dir( if (!path) return log_oom(); - if (!u->manager->unit_path_cache || set_get(u->manager->unit_path_cache, path)) { - r = iterate_dir(u, path, dependency, strv); - if (r < 0) - return r; - } + if (!u->manager->unit_path_cache || set_get(u->manager->unit_path_cache, path)) + iterate_dir(u, path, dependency, strv); if (u->instance) { _cleanup_free_ char *template = NULL, *p = NULL; @@ -130,11 +127,8 @@ static int process_dir( if (!p) return log_oom(); - if (!u->manager->unit_path_cache || set_get(u->manager->unit_path_cache, p)) { - r = iterate_dir(u, p, dependency, strv); - if (r < 0) - return r; - } + if (!u->manager->unit_path_cache || set_get(u->manager->unit_path_cache, p)) + iterate_dir(u, p, dependency, strv); } return 0; @@ -152,12 +146,8 @@ char **unit_find_dropin_paths(Unit *u) { SET_FOREACH(t, u->names, i) { char **p; - STRV_FOREACH(p, u->manager->lookup_paths.unit_path) { - /* This loads the drop-in config snippets */ - r = process_dir(u, *p, t, ".d", _UNIT_DEPENDENCY_INVALID, &strv); - if (r < 0) - return NULL; - } + STRV_FOREACH(p, u->manager->lookup_paths.unit_path) + process_dir(u, *p, t, ".d", _UNIT_DEPENDENCY_INVALID, &strv); } if (strv_isempty(strv)) @@ -176,7 +166,6 @@ char **unit_find_dropin_paths(Unit *u) { int unit_load_dropin(Unit *u) { Iterator i; char *t, **f; - int r; assert(u); @@ -186,13 +175,8 @@ int unit_load_dropin(Unit *u) { char **p; STRV_FOREACH(p, u->manager->lookup_paths.unit_path) { - r = process_dir(u, *p, t, ".wants", UNIT_WANTS, NULL); - if (r < 0) - return r; - - r = process_dir(u, *p, t, ".requires", UNIT_REQUIRES, NULL); - if (r < 0) - return r; + process_dir(u, *p, t, ".wants", UNIT_WANTS, NULL); + process_dir(u, *p, t, ".requires", UNIT_REQUIRES, NULL); } } @@ -201,11 +185,9 @@ int unit_load_dropin(Unit *u) { return 0; STRV_FOREACH(f, u->dropin_paths) { - r = config_parse(u->id, *f, NULL, - UNIT_VTABLE(u)->sections, config_item_perf_lookup, - (void*) load_fragment_gperf_lookup, false, false, u); - if (r < 0) - return r; + config_parse(u->id, *f, NULL, + UNIT_VTABLE(u)->sections, config_item_perf_lookup, + (void*) load_fragment_gperf_lookup, false, false, u); } u->dropin_mtime = now(CLOCK_REALTIME); ++++++ 0003-core-nicer-message-when-inotify-watches-are-exhauste.patch ++++++
From 18abe7bd3e13525b257da69ac49ff7841c289567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Wed, 16 Jul 2014 22:52:53 -0400 Subject: [PATCH] core: nicer message when inotify watches are exhausted
inotify_add_watch returns ENOSPC, which translates to
"No space left on device", which is misleading.
https://bugs.freedesktop.org/show_bug.cgi?id=73628
---
src/core/path.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git src/core/path.c src/core/path.c
index 20e454d..f54c77f 100644
--- src/core/path.c
+++ src/core/path.c
@@ -99,7 +99,8 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
break;
}
- log_warning("Failed to add watch on %s: %m", s->path);
+ log_warning("Failed to add watch on %s: %s", s->path,
+ errno == ENOSPC ? "too many watches" : strerror(-r));
r = -errno;
if (cut)
*cut = tmp;
--
1.7.9.2
++++++ 0003-cryptsetup-default-to-no-hash-when-keyfile-is-specif.patch ++++++
Based on 8a52210c9392887a31fdb2845f65b4c5869e8e66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From 00a5cc3a63c125633e822f39efd9c32223169f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Wed, 16 Apr 2014 23:33:41 -0400 Subject: [PATCH] delta: do not use unicode chars in C locale
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
---
src/delta/delta.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git src/delta/delta.c src/delta/delta.c
index 369f8f8..8fc37c5 100644
--- src/delta/delta.c
+++ src/delta/delta.c
@@ -85,6 +85,10 @@ static void pager_open_if_enabled(void) {
pager_open(false);
}
+static inline const char* arrow(void) {
+ return is_locale_utf8() ? "→" : "->";
+}
+
static int equivalent(const char *a, const char *b) {
_cleanup_free_ char *x = NULL, *y = NULL;
@@ -103,8 +107,9 @@ static int notify_override_masked(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_MASKED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight_red(), "[MASKED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight_red(), "[MASKED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -112,8 +117,9 @@ static int notify_override_equivalent(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_EQUIVALENT))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -121,8 +127,9 @@ static int notify_override_redirected(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_REDIRECTED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -130,8 +137,9 @@ static int notify_override_overridden(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_OVERRIDDEN))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -139,8 +147,9 @@ static int notify_override_extended(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_EXTENDED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[EXTENDED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[EXTENDED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -241,7 +250,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return -ENOMEM;
d = p + strlen(toppath) + 1;
- log_debug("Adding at top: %s → %s", d, p);
+ log_debug("Adding at top: %s %s %s", d, arrow(), p);
k = hashmap_put(top, d, p);
if (k >= 0) {
p = strdup(p);
@@ -253,7 +262,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return k;
}
- log_debug("Adding at bottom: %s → %s", d, p);
+ log_debug("Adding at bottom: %s %s %s", d, arrow(), p);
free(hashmap_remove(bottom, d));
k = hashmap_put(bottom, d, p);
if (k < 0) {
@@ -276,7 +285,8 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
if (!p)
return -ENOMEM;
- log_debug("Adding to drops: %s → %s → %s", unit, basename(p), p);
+ log_debug("Adding to drops: %s %s %s %s %s",
+ unit, arrow(), basename(p), arrow(), p);
k = hashmap_put(h, basename(p), p);
if (k < 0) {
free(p);
@@ -328,7 +338,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
if (!p)
return -ENOMEM;
- log_debug("Adding at top: %s → %s", basename(p), p);
+ log_debug("Adding at top: %s %s %s", basename(p), arrow(), p);
k = hashmap_put(top, basename(p), p);
if (k >= 0) {
p = strdup(p);
@@ -339,7 +349,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
return k;
}
- log_debug("Adding at bottom: %s → %s", basename(p), p);
+ log_debug("Adding at bottom: %s %s %s", basename(p), arrow(), p);
free(hashmap_remove(bottom, basename(p)));
k = hashmap_put(bottom, basename(p), p);
if (k < 0) {
--
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?=
From f89b42ec0fd51feab5566d6bdbacee101023c037 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Tue, 25 Mar 2014 20:21:23 -0700 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 7d86f10..b928f5a 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -923,3 +923,21 @@ bluetooth:v0130* bluetooth:v0131* ID_VENDOR_FROM_DATABASE=Cypress Semiconductor Corporation + +bluetooth:v0132* + ID_VENDOR_FROM_DATABASE=MADS Inc + +bluetooth:v0133* + ID_VENDOR_FROM_DATABASE=Blue Maestro Limited + +bluetooth:v0134* + ID_VENDOR_FROM_DATABASE=Resolution Products, Inc. + +bluetooth:v0135* + ID_VENDOR_FROM_DATABASE=Airewear LLC + +bluetooth:v0136* + ID_VENDOR_FROM_DATABASE=ETC sp. z.o.o. + +bluetooth:v0137* + ID_VENDOR_FROM_DATABASE=Prestigio Plaza Ltd. -- 1.7.9.2 ++++++ 0003-install-fix-invalid-free-in-unit_file_mask.patch ++++++
From 223217749e57996336d5730b0a28716cca56d45d Mon Sep 17 00:00:00 2001 From: Andreas Henriksson
Date: Fri, 13 Jun 2014 18:48:18 +0200 Subject: [PATCH] install: fix invalid free() in unit_file_mask()
int unit_file_mask(...) in ./src/shared/install.c calls get_config_path(...) which can in 4 error cases return without setting "ret", and thus "prefix" can be uninitialized when unit_file_mask(...) finishes (which it does directly after the error is returned from get_config_path(...)). --- src/shared/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/shared/install.c src/shared/install.c index 487d0f6..f562063 100644 --- src/shared/install.c +++ src/shared/install.c @@ -563,7 +563,7 @@ int unit_file_mask( unsigned *n_changes) { char **i; - _cleanup_free_ char *prefix; + _cleanup_free_ char *prefix = NULL; int r; assert(scope >= 0); -- 1.7.9.2 ++++++ 0003-journald-add-CAP_MAC_OVERRIDE-in-journald-for-SMACK-.patch ++++++
From f2a474aea8f82fa9b695515d4590f4f3398358a7 Mon Sep 17 00:00:00 2001 From: Juho Son
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-keymap-Adjust-for-more-Samsung-900X4-series.patch ++++++
From e512e8a255ef29d5a8eb605f8849202ea3d3e4cb Mon Sep 17 00:00:00 2001 From: Martin Pitt
Date: Wed, 27 Aug 2014 08:41:10 +0200 Subject: [PATCH] keymap: Adjust for more Samsung 900X4 series
Reportedly also applies to NP900X4B, so relax the match to apply to all models of this series. https://launchpad.net/bugs/902332 --- hwdb/60-keyboard.hwdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index ef0ebc5..0ffcb83 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -939,7 +939,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr* # Series 7 / 9 keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr* -keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDEFG]*:pvr* +keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34]*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings KEYBOARD_KEY_a0=!mute # Fn+F6 mute -- 1.7.9.2 ++++++ 0003-keymap-Annotate-all-micmute-workarounds.patch ++++++
From d946bb53f94713241004810de92cc37f1e19c2d2 Mon Sep 17 00:00:00 2001 From: Martin Pitt
Date: Wed, 30 Jul 2014 10:54:23 +0200 Subject: [PATCH] keymap: Annotate all micmute workarounds
Add a comment to all assignments to f20 that this actually should be "micmute" in a future when we aren't limited by X.org's key code limiations any more. --- hwdb/60-keyboard.hwdb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 70e372b..cbbbf2c 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -231,7 +231,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS*:pvr* # Dell Latitude microphone mute keyboard:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude* - KEYBOARD_KEY_150=f20 # Mic mute toggle + KEYBOARD_KEY_150=f20 # Mic mute toggle, should be micmute ########################################################### # Everex @@ -505,7 +505,7 @@ keyboard:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn* KEYBOARD_KEY_15=volumedown KEYBOARD_KEY_16=mute KEYBOARD_KEY_17=prog1 - KEYBOARD_KEY_1a=f20 + KEYBOARD_KEY_1a=f20 # Microphone mute button; should be micmute # ThinkPad Keyboard with TrackPoint keyboard:usb:v17EFp6009* @@ -573,7 +573,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*Y550*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*U300s*:pvr* KEYBOARD_KEY_f1=f21 - KEYBOARD_KEY_ce=f20 + KEYBOARD_KEY_ce=f20 # micmute keyboard:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:pvr* KEYBOARD_KEY_a0=!mute @@ -809,7 +809,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOLPC:pnXO:* KEYBOARD_KEY_f3=f17 KEYBOARD_KEY_f2=f18 KEYBOARD_KEY_f1=f19 - KEYBOARD_KEY_f0=f20 + KEYBOARD_KEY_f0=f20 # micmute KEYBOARD_KEY_ef=f21 KEYBOARD_KEY_ee=chat KEYBOARD_KEY_e4=chat -- 1.7.9.2 ++++++ 0003-keymap-Fix-HP-Pavillon-DV7.patch ++++++
From efb4bf4e419e14a13eead6289ea40165579a816f Mon Sep 17 00:00:00 2001 From: Martin Pitt
Date: Tue, 5 Aug 2014 12:29:27 +0200 Subject: [PATCH] keymap: Fix HP Pavillon DV7
Properly disable scan code 94 instead of producing KEY_0. https://launchpad.net/bugs/1322770 --- hwdb/60-keyboard.hwdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index cbbbf2c..5c3d4ca 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -368,7 +368,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*Pavilion*dv7*Notebook*PC:pvr KEYBOARD_KEY_b7=print KEYBOARD_KEY_c2=media # FIXME: quick play KEYBOARD_KEY_c6=break - KEYBOARD_KEY_94=0 + KEYBOARD_KEY_94=reserved # Elitebook keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Compaq*:pvr* -- 1.7.9.2 ++++++ 0003-localed-consider-an-unset-model-as-a-wildcard.patch ++++++
From 387066c2e5bda159201896b194711965b52f34a9 Mon Sep 17 00:00:00 2001 From: Michal Sekletar
Date: Fri, 30 May 2014 18:20:16 +0200 Subject: [PATCH] localed: consider an unset model as a wildcard
--- src/locale/localed.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git src/locale/localed.c src/locale/localed.c index e3061c8..358f6c2 100644 --- src/locale/localed.c +++ src/locale/localed.c @@ -712,15 +712,16 @@ static int find_legacy_keymap(Context *c, char **new_keymap) { } } - if (matching > 0 && - streq_ptr(c->x11_model, a[2])) { - matching++; - - if (streq_ptr(c->x11_variant, a[3])) { + if (matching > 0) { + if (isempty(c->x11_model) || streq_ptr(c->x11_model, a[2])) { matching++; - if (streq_ptr(c->x11_options, a[4])) + if (streq_ptr(c->x11_variant, a[3])) { matching++; + + if (streq_ptr(c->x11_options, a[4])) + matching++; + } } } -- 1.7.9.2 ++++++ 0003-login-Allow-calling-org.freedesktop.login1.Seat.Swit.patch ++++++
From 9c413373d2112055a0142ef522bf95af9b491b4a Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre"
Date: Fri, 21 Feb 2014 18:23:17 -0500 Subject: [PATCH] login: Allow calling org.freedesktop.login1.Seat.SwitchTo
---
src/login/org.freedesktop.login1.conf | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git src/login/org.freedesktop.login1.conf src/login/org.freedesktop.login1.conf
index d677f61..1318328 100644
--- src/login/org.freedesktop.login1.conf
+++ src/login/org.freedesktop.login1.conf
@@ -141,6 +141,18 @@
send_member="ActivateSession"/>
From f9cd6be10ece07e10488c05e270a0b5860779864 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 3 Mar 2014 20:49:33 +0100 Subject: [PATCH] logind: ignore lid switch events for 30s after each suspend and 3min after startup
This is needed to give USB docking stations and suchlike time to settle, so that a display connected to an USB docking station can actually act as a lid swith inhibitor correctly. With this change we should have somewhat reliable docking station support in place. --- src/login/logind-action.c | 15 ++++++++++++++- src/login/logind-dbus.c | 3 +++ src/login/logind.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/login/logind.h | 7 +++++++ 4 files changed, 69 insertions(+), 1 deletion(-) diff --git src/login/logind-action.c src/login/logind-action.c index c9d8bc5..ae7b350 100644 --- src/login/logind-action.c +++ src/login/logind-action.c @@ -70,20 +70,33 @@ int manager_handle_action( return 0; } - /* If we are docked don't react to lid closing */ if (inhibit_key == INHIBIT_HANDLE_LID_SWITCH) { int n; + /* If we are docked don't react to lid closing */ if (manager_is_docked(m)) { log_debug("Ignoring lid switch request, system is docked."); return 0; } + /* If we have more than one or no displays connected, + * don't react to lid closing. The no display case we + * treat like this under the assumption that there is + * no modern drm driver available. */ n = manager_count_displays(m); if (n != 1) { log_debug("Ignoring lid switch request, %i displays connected.", n); return 0; } + + /* If the last system suspend or startup is too close, + * let's not suspend for now, to give USB docking + * stations some time to settle so that we can + * properly watch its displays. */ + if (m->lid_switch_ignore_event_source) { + log_debug("Ignoring lid switch request, system startup or resume too close."); + return 0; + } } /* If the key handling is inhibited, don't do anything */ diff --git src/login/logind-dbus.c src/login/logind-dbus.c index fc89531..c9c58f3 100644 --- src/login/logind-dbus.c +++ src/login/logind-dbus.c @@ -1337,6 +1337,9 @@ static int execute_shutdown_or_sleep( m->action_job = c; m->action_what = w; + /* Make sure the lid switch is ignored for a while */ + manager_set_lid_switch_ignore(m, now(CLOCK_MONOTONIC) + IGNORE_LID_SWITCH_SUSPEND_USEC); + return 0; } diff --git src/login/logind.c src/login/logind.c index 10f61ab..fd113b3 100644 --- src/login/logind.c +++ src/login/logind.c @@ -144,6 +144,7 @@ void manager_free(Manager *m) { sd_event_source_unref(m->udev_device_event_source); sd_event_source_unref(m->udev_vcsa_event_source); sd_event_source_unref(m->udev_button_event_source); + sd_event_source_unref(m->lid_switch_ignore_event_source); if (m->console_active_fd >= 0) close_nointr_nofail(m->console_active_fd); @@ -959,6 +960,46 @@ static int manager_dispatch_idle_action(sd_event_source *s, uint64_t t, void *us return 0; } +static int lid_switch_ignore_handler(sd_event_source *e, uint64_t usec, void *userdata) { + Manager *m = userdata; + + assert(e); + assert(m); + + m->lid_switch_ignore_event_source = sd_event_source_unref(m->lid_switch_ignore_event_source); + return 0; +} + +int manager_set_lid_switch_ignore(Manager *m, usec_t until) { + int r; + + assert(m); + + if (until <= now(CLOCK_MONOTONIC)) + return 0; + + /* We want to ignore the lid switch for a while after each + * suspend, and after boot-up. Hence let's install a timer for + * this. As long as the event source exists we ignore the lid + * switch. */ + + if (m->lid_switch_ignore_event_source) { + usec_t u; + + r = sd_event_source_get_time(m->lid_switch_ignore_event_source, &u); + if (r < 0) + return r; + + if (until <= u) + return 0; + + r = sd_event_source_set_time(m->lid_switch_ignore_event_source, until); + } else + r = sd_event_add_monotonic(m->event, &m->lid_switch_ignore_event_source, until, 0, lid_switch_ignore_handler, m); + + return r; +} + int manager_startup(Manager *m) { int r; Seat *seat; @@ -994,6 +1035,10 @@ int manager_startup(Manager *m) { return r; } + r = manager_set_lid_switch_ignore(m, 0 + IGNORE_LID_SWITCH_STARTUP_USEC); + if (r < 0) + log_warning("Failed to set up lid switch ignore event source: %s", strerror(-r)); + /* Deserialize state */ r = manager_enumerate_devices(m); if (r < 0) diff --git src/login/logind.h src/login/logind.h index 74d6641..4bb8e7b 100644 --- src/login/logind.h +++ src/login/logind.h @@ -42,6 +42,9 @@ typedef struct Manager Manager; #include "logind-button.h" #include "logind-action.h" +#define IGNORE_LID_SWITCH_STARTUP_USEC (3 * USEC_PER_MINUTE) +#define IGNORE_LID_SWITCH_SUSPEND_USEC (30 * USEC_PER_SEC) + struct Manager { sd_event *event; sd_bus *bus; @@ -118,6 +121,8 @@ struct Manager { bool lid_switch_ignore_inhibited; Hashmap *polkit_registry; + + sd_event_source *lid_switch_ignore_event_source; }; Manager *manager_new(void); @@ -178,3 +183,5 @@ const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned lengt int manager_watch_busname(Manager *manager, const char *name); void manager_drop_busname(Manager *manager, const char *name); + +int manager_set_lid_switch_ignore(Manager *m, usec_t until); -- 1.7.9.2 ++++++ 0003-man-mention-XDG_CONFIG_HOME-in-systemd.unit.patch ++++++
From 05a2f6fefedd7254fd799502191d025d2908cf74 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen
Date: Sat, 12 Apr 2014 08:37:38 +0300 Subject: [PATCH] man: mention XDG_CONFIG_HOME in systemd.unit
--- man/systemd.unit.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git man/systemd.unit.xml man/systemd.unit.xml index 07a73fd..bcd4ba8 100644 --- man/systemd.unit.xml +++ man/systemd.unit.xml @@ -70,7 +70,8 @@ <filename>...</filename> </literallayout></para> - <para><literallayout><filename>$HOME/.config/systemd/user/*</filename> + <para><literallayout><filename>$XDG_CONFIG_HOME/systemd/user/*</filename> +<filename>$HOME/.config/systemd/user/*</filename> <filename>/etc/systemd/user/*</filename> <filename>/run/systemd/user/*</filename> <filename>/usr/lib/systemd/user/*</filename> @@ -320,8 +321,12 @@ </thead> <tbody> <row> + <entry><filename>$XDG_CONFIG_HOME/systemd/user</filename></entry> + <entry>User configuration (only used when $XDG_CONFIG_HOME is set)</entry> + </row> + <row> <entry><filename>$HOME/.config/systemd/user</filename></entry> - <entry>User configuration</entry> + <entry>User configuration (only used when $XDG_CONFIG_HOME is not set)</entry> </row> <row> <entry><filename>/etc/systemd/user</filename></entry> -- 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
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-mount-order-options-before-other-arguments-to-mount.patch ++++++
Based on 141a1ceaa62578f1ed14f04cae2113dd0f49fd7f Mon Sep 17 00:00:00 2001
From: Emil Renner Berthing
From 8bf13eb1e02b9977ae1cd331ae5dc7305a305a09 Mon Sep 17 00:00:00 2001 From: Daniel Mack
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-don-t-use-assert_return-to-check-for-disconne.patch ++++++
From a3d59cd1b0a2738d06893948492113f2c35be0af Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 19 Mar 2014 21:41:21 +0100 Subject: [PATCH] sd-bus: don't use assert_return() to check for disconnected bus connections
A terminated connection is a runtime error and not a developer mistake, hence don't use assert_return() to check for it. --- src/libsystemd/sd-bus/bus-control.c | 20 +++++++++++++----- src/libsystemd/sd-bus/bus-convenience.c | 58 +++++++++++++++++++++++++++++++++++++++++------------- src/libsystemd/sd-bus/bus-objects.c | 23 +++++++++++++++------ src/libsystemd/sd-bus/sd-bus.c | 49 +++++++++++++++++++++++++++++++++------------ 4 files changed, 113 insertions(+), 37 deletions(-) --- src/libsystemd/sd-bus/bus-control.c +++ src/libsystemd/sd-bus/bus-control.c 2014-03-28 00:00:00.000000000 +0000 @@ -128,12 +128,14 @@ _public_ int sd_bus_request_name(sd_bus assert_return(bus, -EINVAL); assert_return(name, -EINVAL); assert_return(bus->bus_client, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); assert_return(!(flags & ~(SD_BUS_NAME_ALLOW_REPLACEMENT|SD_BUS_NAME_REPLACE_EXISTING|SD_BUS_NAME_QUEUE)), -EINVAL); assert_return(service_name_is_valid(name), -EINVAL); assert_return(name[0] != ':', -EINVAL); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (bus->is_kernel) return bus_request_name_kernel(bus, name, flags); else @@ -201,11 +203,13 @@ _public_ int sd_bus_release_name(sd_bus assert_return(bus, -EINVAL); assert_return(name, -EINVAL); assert_return(bus->bus_client, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); assert_return(service_name_is_valid(name), -EINVAL); assert_return(name[0] != ':', -EINVAL); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (bus->is_kernel) return bus_release_name_kernel(bus, name); else @@ -344,9 +348,11 @@ static int bus_list_names_dbus1(sd_bus * _public_ int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable) { assert_return(bus, -EINVAL); assert_return(acquired || activatable, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (bus->is_kernel) return bus_list_names_kernel(bus, acquired, activatable); else @@ -737,11 +743,13 @@ _public_ int sd_bus_get_owner( assert_return(name, -EINVAL); assert_return(mask <= _SD_BUS_CREDS_ALL, -ENOTSUP); assert_return(mask == 0 || creds, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); assert_return(service_name_is_valid(name), -EINVAL); assert_return(bus->bus_client, -ENODATA); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (bus->is_kernel) return bus_get_owner_kdbus(bus, name, mask, creds); else @@ -1198,10 +1206,12 @@ _public_ int sd_bus_get_owner_machine_id assert_return(bus, -EINVAL); assert_return(name, -EINVAL); assert_return(machine, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); assert_return(service_name_is_valid(name), -EINVAL); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (streq_ptr(name, bus->unique_name)) return sd_id128_get_machine(machine); --- src/libsystemd/sd-bus/bus-convenience.c +++ src/libsystemd/sd-bus/bus-convenience.c 2014-03-28 00:00:00.000000000 +0000 @@ -36,9 +36,11 @@ _public_ int sd_bus_emit_signal( int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_message_new_signal(bus, &m, path, interface, member); if (r < 0) return r; @@ -70,9 +72,11 @@ _public_ int sd_bus_call_method( int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_message_new_method_call(bus, &m, destination, path, interface, member); if (r < 0) return r; @@ -100,9 +104,12 @@ _public_ int sd_bus_reply_method_return( assert_return(call, -EINVAL); assert_return(call->sealed, -EPERM); assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); - assert_return(call->bus && BUS_IS_OPEN(call->bus->state), -ENOTCONN); + assert_return(call->bus, -EINVAL); assert_return(!bus_pid_changed(call->bus), -ECHILD); + if (!BUS_IS_OPEN(call->bus->state)) + return -ENOTCONN; + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -134,9 +141,12 @@ _public_ int sd_bus_reply_method_error( assert_return(call->sealed, -EPERM); assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); assert_return(sd_bus_error_is_set(e), -EINVAL); - assert_return(call->bus && BUS_IS_OPEN(call->bus->state), -ENOTCONN); + assert_return(call->bus, -EINVAL); assert_return(!bus_pid_changed(call->bus), -ECHILD); + if (!BUS_IS_OPEN(call->bus->state)) + return -ENOTCONN; + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -159,9 +169,12 @@ _public_ int sd_bus_reply_method_errorf( assert_return(call, -EINVAL); assert_return(call->sealed, -EPERM); assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); - assert_return(call->bus && BUS_IS_OPEN(call->bus->state), -ENOTCONN); + assert_return(call->bus, -EINVAL); assert_return(!bus_pid_changed(call->bus), -ECHILD); + if (!BUS_IS_OPEN(call->bus->state)) + return -ENOTCONN; + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -182,9 +195,12 @@ _public_ int sd_bus_reply_method_errno( assert_return(call, -EINVAL); assert_return(call->sealed, -EPERM); assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); - assert_return(call->bus && BUS_IS_OPEN(call->bus->state), -ENOTCONN); + assert_return(call->bus, -EINVAL); assert_return(!bus_pid_changed(call->bus), -ECHILD); + if (!BUS_IS_OPEN(call->bus->state)) + return -ENOTCONN; + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -208,9 +224,12 @@ _public_ int sd_bus_reply_method_errnof( assert_return(call, -EINVAL); assert_return(call->sealed, -EPERM); assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); - assert_return(call->bus && BUS_IS_OPEN(call->bus->state), -ENOTCONN); + assert_return(call->bus, -EINVAL); assert_return(!bus_pid_changed(call->bus), -ECHILD); + if (!BUS_IS_OPEN(call->bus->state)) + return -ENOTCONN; + if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) return 0; @@ -239,9 +258,11 @@ _public_ int sd_bus_get_property( assert_return(member_name_is_valid(member), -EINVAL); assert_return(reply, -EINVAL); assert_return(signature_is_single(type, false), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_call_method(bus, destination, path, "org.freedesktop.DBus.Properties", "Get", error, &rep, "ss", strempty(interface), member); if (r < 0) return r; @@ -273,9 +294,11 @@ _public_ int sd_bus_get_property_trivial assert_return(member_name_is_valid(member), -EINVAL); assert_return(bus_type_is_trivial(type), -EINVAL); assert_return(ptr, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_call_method(bus, destination, path, "org.freedesktop.DBus.Properties", "Get", error, &reply, "ss", strempty(interface), member); if (r < 0) return r; @@ -309,9 +332,11 @@ _public_ int sd_bus_get_property_string( assert_return(isempty(interface) || interface_name_is_valid(interface), -EINVAL); assert_return(member_name_is_valid(member), -EINVAL); assert_return(ret, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_call_method(bus, destination, path, "org.freedesktop.DBus.Properties", "Get", error, &reply, "ss", strempty(interface), member); if (r < 0) return r; @@ -348,9 +373,11 @@ _public_ int sd_bus_get_property_strv( assert_return(isempty(interface) || interface_name_is_valid(interface), -EINVAL); assert_return(member_name_is_valid(member), -EINVAL); assert_return(ret, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_call_method(bus, destination, path, "org.freedesktop.DBus.Properties", "Get", error, &reply, "ss", strempty(interface), member); if (r < 0) return r; @@ -383,9 +410,11 @@ _public_ int sd_bus_set_property( assert_return(isempty(interface) || interface_name_is_valid(interface), -EINVAL); assert_return(member_name_is_valid(member), -EINVAL); assert_return(signature_is_single(type, false), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = sd_bus_message_new_method_call(bus, &m, destination, path, "org.freedesktop.DBus.Properties", "Set"); if (r < 0) return r; @@ -416,9 +445,12 @@ _public_ int sd_bus_query_sender_creds(s assert_return(call, -EINVAL); assert_return(call->sealed, -EPERM); - assert_return(call->bus && BUS_IS_OPEN(call->bus->state), -ENOTCONN); + assert_return(call->bus, -EINVAL); assert_return(!bus_pid_changed(call->bus), -ECHILD); + if (!BUS_IS_OPEN(call->bus->state)) + return -ENOTCONN; + c = sd_bus_message_get_creds(call); /* All data we need? */ --- src/libsystemd/sd-bus/bus-objects.c +++ src/libsystemd/sd-bus/bus-objects.c 2014-03-28 00:00:00.000000000 +0000 @@ -2196,9 +2196,10 @@ _public_ int sd_bus_emit_properties_chan assert_return(bus, -EINVAL); assert_return(object_path_is_valid(path), -EINVAL); assert_return(interface_name_is_valid(interface), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; /* A non-NULL but empty names list means nothing needs to be generated. A NULL list OTOH indicates that all properties @@ -2241,9 +2242,11 @@ _public_ int sd_bus_emit_properties_chan assert_return(bus, -EINVAL); assert_return(object_path_is_valid(path), -EINVAL); assert_return(interface_name_is_valid(interface), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (!name) return 0; @@ -2361,9 +2364,11 @@ _public_ int sd_bus_emit_interfaces_adde assert_return(bus, -EINVAL); assert_return(object_path_is_valid(path), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (strv_isempty(interfaces)) return 0; @@ -2421,9 +2426,11 @@ _public_ int sd_bus_emit_interfaces_adde assert_return(bus, -EINVAL); assert_return(object_path_is_valid(path), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + interfaces = strv_from_stdarg_alloca(interface); return sd_bus_emit_interfaces_added_strv(bus, path, interfaces); @@ -2435,9 +2442,11 @@ _public_ int sd_bus_emit_interfaces_remo assert_return(bus, -EINVAL); assert_return(object_path_is_valid(path), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (strv_isempty(interfaces)) return 0; @@ -2461,9 +2470,11 @@ _public_ int sd_bus_emit_interfaces_remo assert_return(bus, -EINVAL); assert_return(object_path_is_valid(path), -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + interfaces = strv_from_stdarg_alloca(interface); return sd_bus_emit_interfaces_removed_strv(bus, path, interfaces); --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c 2014-03-28 12:19:27.146736146 +0000 @@ -1592,10 +1592,12 @@ static int bus_send_internal(sd_bus *bus int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(m, -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (m->n_fds > 0) { r = sd_bus_can_send(bus, SD_BUS_TYPE_UNIX_FD); if (r < 0) @@ -1671,10 +1673,12 @@ _public_ int sd_bus_send_to(sd_bus *bus, int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(m, -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + if (!streq_ptr(m->destination, destination)) { if (!destination) @@ -1726,13 +1730,15 @@ _public_ int sd_bus_call_async( int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(m, -EINVAL); assert_return(m->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); assert_return(!(m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED), -EINVAL); assert_return(callback, -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = hashmap_ensure_allocated(&bus->reply_callbacks, uint64_hash_func, uint64_compare_func); if (r < 0) return r; @@ -1839,13 +1845,15 @@ _public_ int sd_bus_call( int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(m, -EINVAL); assert_return(m->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL); assert_return(!(m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED), -EINVAL); assert_return(!bus_error_is_dirty(error), -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; + r = bus_ensure_running(bus); if (r < 0) return r; @@ -1971,9 +1979,11 @@ _public_ int sd_bus_get_events(sd_bus *b int flags = 0; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state) || bus->state == BUS_CLOSING, -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state) && bus->state != BUS_CLOSING) + return -ENOTCONN; + if (bus->state == BUS_OPENING) flags |= POLLOUT; else if (bus->state == BUS_AUTHENTICATING) { @@ -1998,9 +2008,11 @@ _public_ int sd_bus_get_timeout(sd_bus * assert_return(bus, -EINVAL); assert_return(timeout_usec, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state) || bus->state == BUS_CLOSING, -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); + if (!BUS_IS_OPEN(bus->state) && bus->state != BUS_CLOSING) + return -ENOTCONN; + if (bus->state == BUS_CLOSING) { *timeout_usec = 0; return 1; @@ -2510,7 +2522,8 @@ static int bus_poll(sd_bus *bus, bool ne if (bus->state == BUS_CLOSING) return 1; - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; e = sd_bus_get_events(bus); if (e < 0) @@ -2565,7 +2578,8 @@ _public_ int sd_bus_wait(sd_bus *bus, ui if (bus->state == BUS_CLOSING) return 0; - assert_return(BUS_IS_OPEN(bus->state) , -ENOTCONN); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; if (bus->rqueue_size > 0) return 0; @@ -2582,7 +2596,8 @@ _public_ int sd_bus_flush(sd_bus *bus) { if (bus->state == BUS_CLOSING) return 0; - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; r = bus_ensure_running(bus); if (r < 0) @@ -3058,9 +3073,13 @@ _public_ int sd_bus_get_peer_creds(sd_bu assert_return(bus, -EINVAL); assert_return(mask <= _SD_BUS_CREDS_ALL, -ENOTSUP); assert_return(ret, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); - assert_return(!bus->is_kernel, -ENOTSUP); + + if (!bus->is_kernel) + return -ENOTSUP; + + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; if (!bus->ucred_valid && !isempty(bus->label)) return -ENODATA; @@ -3099,9 +3118,13 @@ _public_ int sd_bus_try_close(sd_bus *bu int r; assert_return(bus, -EINVAL); - assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN); assert_return(!bus_pid_changed(bus), -ECHILD); - assert_return(bus->is_kernel, -ENOTSUP); + + if (!bus->is_kernel) + return -ENOTSUP; + + if (!BUS_IS_OPEN(bus->state)) + return -ENOTCONN; if (bus->rqueue_size > 0) return -EBUSY; ++++++ 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch ++++++
From 9b772efb41c2d9f743ba5e96804bdf89b12630d8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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-sd-event-always-call-epoll_ctl-on-mask-updates-if-ed.patch ++++++
From b63c8d4f0364457b0ead8793504012bb7113974f Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Thu, 10 Jul 2014 00:47:23 +0200 Subject: [PATCH] sd-event: always call epoll_ctl() on mask-updates if edge-triggered
A call to sd_event_source_set_io_events() skipps calling into the kernel if the new event-mask matches the old one. This is safe for level-triggered sources as the kernel moves them onto the ready-list automatically if events change. However, edge-triggered sources might not be on the ready-list even though events are present. A call to sd_event_source_set_io_events() with EPOLLET set might thus be used to just move the io-source onto the ready-list so the next poll will return it again. This is very useful to avoid starvation in priority-based event queues. Imagine a read() loop on an edge-triggered fd. If we cannot read data fast enough to drain the receive queue, we might decide to skip reading for now and schedule it for later. On edge-triggered io-sources we have to make sure it's put on the ready-list so the next dispatch-round will return it again if it's still the highest priority task. We could make sd-event handle edge-triggered sources directly and allow marking them ready again. However, it's much simpler to let the kernel do that for now via EPOLL_CTL_MOD. --- src/libsystemd/sd-event/sd-event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git src/libsystemd/sd-event/sd-event.c src/libsystemd/sd-event/sd-event.c index 53f1904..a21f7db 100644 --- src/libsystemd/sd-event/sd-event.c +++ src/libsystemd/sd-event/sd-event.c @@ -1282,7 +1282,8 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events) assert_return(s->event->state != SD_EVENT_FINISHED, -ESTALE); assert_return(!event_pid_changed(s->event), -ECHILD); - if (s->io.events == events) + /* edge-triggered updates are never skipped, so we can reset edges */ + if (s->io.events == events && !(events & EPOLLET)) return 0; if (s->enabled != SD_EVENT_OFF) { -- 1.7.9.2 ++++++ 0003-sd-journal-properly-convert-object-size-on-big-endia.patch ++++++
From 57cd09acf2c63a414aa2131c00a2b3f600eb0133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sat, 23 Aug 2014 22:35:03 -0400 Subject: [PATCH] sd-journal: properly convert object->size on big endian
mmap code crashes when attempting to map an object of zero size. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758392 https://bugs.freedesktop.org/show_bug.cgi?id=82894 --- src/journal/journal-file.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git src/journal/journal-file.h src/journal/journal-file.h index 3d41682..da2ef3b 100644 --- src/journal/journal-file.h +++ src/journal/journal-file.h @@ -214,14 +214,15 @@ static unsigned type_to_context(int type) { static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset) { unsigned context = type_to_context(o->object.type); + uint64_t s = le64toh(o->object.size); return mmap_cache_get(f->mmap, f->fd, f->prot, context, true, - offset, o->object.size, &f->last_stat, NULL); + offset, s, &f->last_stat, NULL); } static inline int journal_file_object_release(JournalFile *f, Object *o, uint64_t offset) { unsigned context = type_to_context(o->object.type); + uint64_t s = le64toh(o->object.size); - return mmap_cache_release(f->mmap, f->fd, f->prot, context, - offset, o->object.size); + return mmap_cache_release(f->mmap, f->fd, f->prot, context, offset, s); } -- 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
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-systemd-use-pager-for-test-and-help.patch ++++++
From b87c2aa6bf1247c298c9bd9f56b9b56a87836b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Tue, 7 Jan 2014 00:00:05 -0500 Subject: [PATCH] systemd: use pager for --test and --help
---
src/core/main.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git src/core/main.c src/core/main.c
index f9ee297..ae38b43 100644
--- src/core/main.c
+++ src/core/main.c
@@ -50,6 +50,7 @@
#include "conf-parser.h"
#include "missing.h"
#include "label.h"
+#include "pager.h"
#include "build.h"
#include "strv.h"
#include "def.h"
@@ -94,6 +95,7 @@ static int arg_crash_chvt = -1;
static bool arg_confirm_spawn = false;
static ShowStatus arg_show_status = _SHOW_STATUS_UNSET;
static bool arg_switched_root = false;
+static int arg_no_pager = -1;
static char ***arg_join_controllers = NULL;
static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL;
static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
@@ -117,6 +119,14 @@ static bool arg_default_memory_accounting = false;
static void nop_handler(int sig) {}
+static void pager_open_if_enabled(void) {
+
+ if (arg_no_pager <= 0)
+ return;
+
+ pager_open(false);
+}
+
noreturn static void crash(int sig) {
if (getpid() != 1)
@@ -704,6 +714,7 @@ static int parse_argv(int argc, char *argv[]) {
ARG_SYSTEM,
ARG_USER,
ARG_TEST,
+ ARG_NO_PAGER,
ARG_VERSION,
ARG_DUMP_CONFIGURATION_ITEMS,
ARG_DUMP_CORE,
@@ -725,6 +736,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "system", no_argument, NULL, ARG_SYSTEM },
{ "user", no_argument, NULL, ARG_USER },
{ "test", no_argument, NULL, ARG_TEST },
+ { "no-pager", no_argument, NULL, ARG_NO_PAGER },
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, ARG_VERSION },
{ "dump-configuration-items", no_argument, NULL, ARG_DUMP_CONFIGURATION_ITEMS },
@@ -832,6 +844,12 @@ static int parse_argv(int argc, char *argv[]) {
case ARG_TEST:
arg_action = ACTION_TEST;
+ if (arg_no_pager < 0)
+ arg_no_pager = true;
+ break;
+
+ case ARG_NO_PAGER:
+ arg_no_pager = true;
break;
case ARG_VERSION:
@@ -912,6 +930,8 @@ static int parse_argv(int argc, char *argv[]) {
case 'h':
arg_action = ACTION_HELP;
+ if (arg_no_pager < 0)
+ arg_no_pager = true;
break;
case 'D':
@@ -984,6 +1004,7 @@ static int help(void) {
"Starts up and maintains the system or user services.\n\n"
" -h --help Show this help\n"
" --test Determine startup sequence, dump it and exit\n"
+ " --no-pager Do not pipe output into a pager\n"
" --dump-configuration-items Dump understood unit configuration items\n"
" --unit=UNIT Set default unit\n"
" --system Run a system instance, even if PID != 1\n"
@@ -1452,6 +1473,8 @@ int main(int argc, char *argv[]) {
goto finish;
}
+ pager_open_if_enabled();
+
if (arg_action == ACTION_HELP) {
retval = help();
goto finish;
@@ -1798,6 +1821,8 @@ int main(int argc, char *argv[]) {
}
finish:
+ pager_close();
+
if (m) {
manager_free(m);
m = NULL;
--
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
From ee0e4cca5ac37a094dfe1074907dae70c7b7701c Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger
Date: Thu, 3 Apr 2014 21:17:20 +0200 Subject: [PATCH] tty-ask-password-agent: return negative errno
Return negative errno in wall_tty_block(). get_ctty_devnr() already
returns a negative errno in case of failure, no need to negate it again.
Reported-by: Simon
From 3f796750b192e62701e91a95f85389f876d1059b Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Wed, 17 Sep 2014 21:44:56 +0200 Subject: [PATCH] udev: event - explicitly don't read() from invalid fd
This fixes CID #1237641.
---
src/udev/udev-event.c | 3 +++
1 file changed, 3 insertions(+)
diff --git src/udev/udev-event.c src/udev/udev-event.c
index 6b8b5a8..c8b1420 100644
--- src/udev/udev-event.c
+++ src/udev/udev-event.c
@@ -494,6 +494,9 @@ static void spawn_read(struct udev_event *event,
for (i = 0; i < fdcount; i++) {
int *fd = (int *)ev[i].data.ptr;
+ if (*fd < 0)
+ continue;
+
if (ev[i].events & EPOLLIN) {
ssize_t count;
char buf[4096];
--
1.7.9.2
++++++ 0003-units-order-systemd-tmpfiles-clean.service-after-tim.patch ++++++
Based on 497d1986c13032f1ef8f4592bb7ed8d3aa321a47 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From d8e40d62ab871a87fde421c4b246bb45bc3cbe2d Mon Sep 17 00:00:00 2001 From: Jonathan Liu
Date: Thu, 29 May 2014 01:17:25 +1000 Subject: [PATCH] units: use KillMode=mixed for systemd-nspawn@.service
This causes the container to shut down cleanly when the service is
stopped.
---
units/systemd-nspawn@.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git units/systemd-nspawn@.service.in units/systemd-nspawn@.service.in
index ff36e90..e373628 100644
--- units/systemd-nspawn@.service.in
+++ units/systemd-nspawn@.service.in
@@ -11,6 +11,7 @@ Documentation=man:systemd-nspawn(1)
[Service]
ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i
+KillMode=mixed
Type=notify
[Install]
--
1.7.9.2
++++++ 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
From 14fe721b5f6d8457cc8737fa75f2ed79e7fa534b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
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-architecture-remove-cris-from-uname-list.patch ++++++
From bc4bc52bc3de56405045b0437e145a7067fb085d Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 3 Jul 2014 22:52:44 +0200 Subject: [PATCH] architecture: remove "cris" from uname list
the only correct name appears to be "crisv32"... http://lists.freedesktop.org/archives/systemd-devel/2014-July/020899.html --- src/shared/architecture.c | 1 - 1 file changed, 1 deletion(-) diff --git src/shared/architecture.c src/shared/architecture.c index 7dd049a..6cdca4e 100644 --- src/shared/architecture.c +++ src/shared/architecture.c @@ -115,7 +115,6 @@ Architecture uname_architecture(void) { #elif defined(__tilegx__) { "tilegx", ARCHITECTURE_TILEGX }, #elif defined(__cris__) - { "cris", ARCHITECTURE_CRIS }, { "crisv32", ARCHITECTURE_CRIS }, #else #error "Please register your architecture here!" -- 1.7.9.2 ++++++ 0004-backlight-Avoid-error-when-state-restore-is-disabled.patch ++++++
From b76388e123e8d73ded1fd53937d816b314948517 Mon Sep 17 00:00:00 2001 From: Michael Biebl
Date: Thu, 11 Sep 2014 00:49:36 +0200 Subject: [PATCH] backlight: Avoid error when state restore is disabled
When the state restore is disabled, we would print: "Unknown verb: load" instead of simply skipping loading the state. --- src/backlight/backlight.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git src/backlight/backlight.c src/backlight/backlight.c index 4d94ebf..0a2bac6 100644 --- src/backlight/backlight.c +++ src/backlight/backlight.c @@ -372,9 +372,12 @@ int main(int argc, char *argv[]) { * device probing should be complete), so that the validity * check at boot time doesn't have to be reliable. */ - if (streq(argv[1], "load") && shall_restore_state()) { + if (streq(argv[1], "load")) { _cleanup_free_ char *value = NULL; + if (!shall_restore_state()) + return EXIT_SUCCESS; + if (!validate_device(udev, device)) return EXIT_SUCCESS; -- 1.7.9.2 ++++++ 0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch ++++++
From c7fdf44d08e1217d40dc092fb90a65978a0f541f Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 23 Apr 2014 06:55:54 +0200 Subject: [PATCH] backlight: warn if kernel exposes backlight device with bogus max_brightness
We shouldn't silently tape over broken kernel drivers.
---
src/backlight/backlight.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git src/backlight/backlight.c src/backlight/backlight.c
index 754a646..c708391 100644
--- src/backlight/backlight.c
+++ src/backlight/backlight.c
@@ -205,14 +205,18 @@ static unsigned get_max_brightness(struct udev_device *device) {
max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
if (!max_brightness_str) {
- log_warning("Failed to read 'max_brightness' attribute");
+ log_warning("Failed to read 'max_brightness' attribute.");
return 0;
}
r = safe_atou(max_brightness_str, &max_brightness);
if (r < 0) {
- log_warning("Failed to parse 'max_brightness' \"%s\": %s",
- max_brightness_str, strerror(-r));
+ log_warning("Failed to parse 'max_brightness' \"%s\": %s", max_brightness_str, strerror(-r));
+ return 0;
+ }
+
+ if (max_brightness <= 0) {
+ log_warning("Maximum brightness is 0, ignoring device.");
return 0;
}
--
1.7.9.2
++++++ 0004-bash-completion-use-list-unit-files-to-get-all-units.patch ++++++
Based on c6a373a26348544d944b08bf0c5dea4f72f6980b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From e931d3f4241231e4102eda06adaf7cbfd68c6a5d Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
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-config-parser-fix-mem-leak.patch ++++++
From 9e60277835e61597011358afcdbfb3dd712ce128 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Sun, 31 Aug 2014 23:13:12 +0200 Subject: [PATCH] config-parser: fix mem leak
From c4bfd1691f4d3e26d6d7f34dbca941e119956e8a Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 24 Mar 2014 21:04:02 +0100 Subject: [PATCH] core: don't try to relabel mounts before we loaded the
---
src/shared/conf-parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git src/shared/conf-parser.c src/shared/conf-parser.c
index 439cfc5..ee6de65 100644
--- src/shared/conf-parser.c
+++ src/shared/conf-parser.c
@@ -710,6 +710,7 @@ int config_parse_strv(const char *unit,
if (!utf8_is_valid(n)) {
log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
+ free(n);
continue;
}
--
1.7.9.2
++++++ 0004-core-Added-support-for-ERRNO-NOTIFY_SOCKET-message-p.patch ++++++
Based on 4774e357268e4a1e9fa82adb0563a538932a4c8e Mon Sep 17 00:00:00 2001
From: Miguel Angel Ajo
From 5329ab10ffaf5b4a3fd6ebd9380b1ec09d05cfc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?=
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-cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch ++++++
Based on bde29068aa3815c88190a91e9867605a0aeaf9c4 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 0ce5a80601597fe4d1a715a8f70ce8d5ccaa2d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?=
Date: Sun, 13 Jul 2014 18:49:00 +0300 Subject: [PATCH] fileio: quote more shell characters in envfiles
Turns out, making strings shell-proof is harder than expected: # machinectl set-hostname "foo|poweroff" && . /etc/machine-info (This could be simplified by quoting *and* escaping all characters, which is harmless in shell but unnecessary.) --- src/shared/fileio.c | 4 ++-- src/shared/util.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git src/shared/fileio.c src/shared/fileio.c index b0ab780..cbb40c2 100644 --- src/shared/fileio.c +++ src/shared/fileio.c @@ -738,11 +738,11 @@ static void write_env_var(FILE *f, const char *v) { p++; fwrite(v, 1, p-v, f); - if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE "\'\"\\`$")) { + if (string_has_cc(p, NULL) || chars_intersect(p, WHITESPACE SHELL_NEED_QUOTES)) { fputc('\"', f); for (; *p; p++) { - if (strchr("\'\"\\`$", *p)) + if (strchr(SHELL_NEED_ESCAPE, *p)) fputc('\\', f); fputc(*p, f); diff --git src/shared/util.h src/shared/util.h index c5eadc9..b3187a9 100644 --- src/shared/util.h +++ src/shared/util.h @@ -93,6 +93,12 @@ #define COMMENTS "#;" #define GLOB_CHARS "*?[" +/* What characters are special in the shell? */ +/* must be escaped outside and inside double-quotes */ +#define SHELL_NEED_ESCAPE "\"\\`$" +/* can be escaped or double-quoted */ +#define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;" + #define FORMAT_BYTES_MAX 8 #define ANSI_HIGHLIGHT_ON "\x1B[1;39m" -- 1.7.9.2 ++++++ 0004-fix-off-by-one-error-in-array-index-assertion.patch ++++++
From 26abdc73a212b90f7c4b71808a1028d2e87ab09f Mon Sep 17 00:00:00 2001 From: Dave Reisner
Date: Sat, 8 Mar 2014 17:32:53 -0500 Subject: [PATCH] fix off by one error in array index assertion
Since the index is already post-incremented when the array is appended to, this assertion can be wrongly reached when the array is at capacity (with the NULL terminator). The bug is reproducible on shutdown with the following settings in /etc/systemd/system.conf: LogTarget=journal-or-kmsg LogColor=yes LogLocation=yes Reported by Thermi on IRC. --- src/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/main.c src/core/main.c index 6ebfe64..f1b06d8 100644 --- src/core/main.c +++ src/core/main.c @@ -1994,7 +1994,7 @@ finish: if (log_get_show_location()) command_line[pos++] = "--log-location"; - assert(pos + 1 < ELEMENTSOF(command_line)); + assert(pos < ELEMENTSOF(command_line)); if (arm_reboot_watchdog && arg_shutdown_watchdog > 0) { char *e; -- 1.7.9.2 ++++++ 0004-fix-typo-in-iDRAC-network-interface-name-irdac-idrac.patch ++++++
From b3e4387351c835766f96796a20d94971afea7d3b Mon Sep 17 00:00:00 2001 From: Tomasz Torcz
Date: Tue, 25 Feb 2014 12:43:55 +0100 Subject: [PATCH] fix typo in iDRAC network interface name: irdac->idrac
--- hwdb/20-net-ifname.hwdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git hwdb/20-net-ifname.hwdb hwdb/20-net-ifname.hwdb index 29d2633..2408dc1 100644 --- hwdb/20-net-ifname.hwdb +++ hwdb/20-net-ifname.hwdb @@ -2,4 +2,4 @@ # Dell iDRAC Virtual USB NIC usb:v413CpA102* - ID_NET_NAME_FROM_DATABASE=irdac + ID_NET_NAME_FROM_DATABASE=idrac -- 1.7.9.2 ++++++ 0004-getty-generator-properly-escape-instance-names.patch ++++++
From a2ae516a25dafe41e0cd296ab7b5d022fa62b95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Thu, 19 Jun 2014 22:02:55 -0400 Subject: [PATCH] getty-generator: properly escape instance names
Otherwise the add_symlink() function tries to make directories for
each slash even for the slash after the @ symbol in the final link
name, failing for /dev/3270/tty1.
Based on a patch by Werner Fink
From b189101727e80a09864c5e5880663ef565467f19 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Sat, 12 Apr 2014 10:38:16 -0700 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index b928f5a..28aa2a7 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -733,7 +733,7 @@ bluetooth:v00F1* ID_VENDOR_FROM_DATABASE=Witron Technology Limited bluetooth:v00F2* - ID_VENDOR_FROM_DATABASE=Morse Project Inc. + ID_VENDOR_FROM_DATABASE=Aether Things Inc. (formerly Morse Project Inc.) bluetooth:v00F3* ID_VENDOR_FROM_DATABASE=Kent Displays Inc. @@ -941,3 +941,24 @@ bluetooth:v0136* bluetooth:v0137* ID_VENDOR_FROM_DATABASE=Prestigio Plaza Ltd. + +bluetooth:v0138* + ID_VENDOR_FROM_DATABASE=NTEO Inc. + +bluetooth:v0139* + ID_VENDOR_FROM_DATABASE=Focus Systems Corporation + +bluetooth:v013A* + ID_VENDOR_FROM_DATABASE=Tencent Holdings Limited + +bluetooth:v013B* + ID_VENDOR_FROM_DATABASE=Allegion + +bluetooth:v013C* + ID_VENDOR_FROM_DATABASE=Murata Manufacuring Co., Ltd. + +bluetooth:v013D* + ID_VENDOR_FROM_DATABASE=WirelessWERX + +bluetooth:v013E* + ID_VENDOR_FROM_DATABASE=nimai -- 1.7.9.2 ++++++ 0004-hwdb-update-format-description-and-document-reloadin.patch ++++++
From fa9d4be3f1f4a792b2f3624c2a08fe9cc6ce6e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Thu, 7 Aug 2014 21:48:57 -0400 Subject: [PATCH] hwdb: update format description and document reloading
https://bugs.freedesktop.org/show_bug.cgi?id=82311 --- hwdb/60-keyboard.hwdb | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 5c3d4ca..ef0ebc5 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -28,19 +28,33 @@ # driver, <vendor> is the firmware-provided string exported # by the kernel DMI modalias. # -# Scan codes are specified as: -# KEYBOARD_KEY_<hex scan code>=<key code identifier> -# The scan code should be expressed in hex lowercase and in -# full bytes, a multiple of 2 digits. The key codes are retrieved -# and normalized from the kernel input API header. +# Scan codes are specified as: +# KEYBOARD_KEY_<hex scan code>=<key code identifier> +# The scan code should be expressed in hex lowercase. The key codes +# are retrieved and normalized from the kernel input API header. # -# A '!' as the first charcter of the key identifier string -# will add the scan code to the AT keyboard's list of scan codes -# where the driver will synthesize a release event and not expect -# it to be generated by the hardware. +# An '!' as the first character of the key identifier string +# will add the scan code to the AT keyboard's list of scan codes +# where the driver will synthesize a release event and not expect +# it to be generated by the hardware. # # To debug key presses and access scan code mapping data of # an input device use the commonly available tool: evtest(1). +# +# To update this file, create a new file +# /etc/udev/hwdb.d/70-keyboad.hwdb +# and add your rules there. To load the new rules execute (as root): +# udevadm hwdb --update +# udevadm trigger /dev/input/eventXX +# where /dev/input/eventXX is the keyboard in question. If in +# doubt, simply use /dev/input/event* to reload all input rules. +# +# If your changes are generally applicable, open a bug report on +# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd +# and include your new rules, a description of the device, and the +# output of +# udevadm info /dev/input/eventXX +# (or /dev/input/event*). ########################################## # Acer -- 1.7.9.2 ++++++ 0004-hwdb-update.patch ++++++ ++++ 3964 lines (skipped) ++++++ 0004-implement-a-union-to-pad-out-file_handle.patch ++++++
From 370c860f748d149097710dc7952a64f627db9de7 Mon Sep 17 00:00:00 2001 From: Dave Reisner
Date: Sat, 19 Apr 2014 13:22:35 -0400 Subject: [PATCH] implement a union to pad out file_handle
Cases where name_to_handle_at is used allocated the full struct to be
MAX_HANDLE_SZ, and assigned this size to handle_bytes. This is wrong
since handle_bytes should describe the length of the flexible array
member and not the whole struct.
Define a union type which includes sufficient padding to allow
assignment of MAX_HANDLE_SZ to be correct.
---
src/libudev/libudev-monitor.c | 6 ++----
src/readahead/readahead-common.c | 6 ++----
src/shared/util.h | 6 ++++++
src/tmpfiles/tmpfiles.c | 11 ++++-------
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c
index 3f7436b..0a2ab82 100644
--- src/libudev/libudev-monitor.c
+++ src/libudev/libudev-monitor.c
@@ -108,15 +108,13 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev)
/* we consider udev running when /dev is on devtmpfs */
static bool udev_has_devtmpfs(struct udev *udev) {
- struct file_handle *h;
+ union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ, };
int mount_id;
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX], *e;
int r;
- h = alloca(MAX_HANDLE_SZ);
- h->handle_bytes = MAX_HANDLE_SZ;
- r = name_to_handle_at(AT_FDCWD, "/dev", h, &mount_id, 0);
+ r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
if (r < 0)
return false;
diff --git src/readahead/readahead-common.c src/readahead/readahead-common.c
index 5ffa88b..49679fc 100644
--- src/readahead/readahead-common.c
+++ src/readahead/readahead-common.c
@@ -75,7 +75,7 @@ int fs_on_ssd(const char *p) {
if (major(st.st_dev) == 0) {
_cleanup_fclose_ FILE *f = NULL;
int mount_id;
- struct file_handle *h;
+ union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ, };
/* Might be btrfs, which exposes "ssd" as mount flag if it is on ssd.
*
@@ -83,9 +83,7 @@ int fs_on_ssd(const char *p) {
* and then lookup the mount ID in mountinfo to find
* the mount options. */
- h = alloca(MAX_HANDLE_SZ);
- h->handle_bytes = MAX_HANDLE_SZ;
- r = name_to_handle_at(AT_FDCWD, p, h, &mount_id, AT_SYMLINK_FOLLOW);
+ r = name_to_handle_at(AT_FDCWD, p, &h.handle, &mount_id, AT_SYMLINK_FOLLOW);
if (r < 0)
return false;
diff --git src/shared/util.h src/shared/util.h
index 900f1cf..891848a 100644
--- src/shared/util.h
+++ src/shared/util.h
@@ -22,6 +22,7 @@
***/
#include
From 3bfd4e0c6341b0ef946d2198f089743fa99e0a97 Mon Sep 17 00:00:00 2001 From: WaLyong Cho
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-login-set_controller-should-fail-if-prepare_vt-fails.patch ++++++
Based on baccf3e40bab6c0b69992ae29c396930de4660c9 Mon Sep 17 00:00:00 2001
From: Olivier Brunel
From 94036de887ad5b0dc805abe38b5c1c58b57d9465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?=
Date: Tue, 11 Mar 2014 17:49:00 +0200 Subject: [PATCH] logind: Do not fail display count if a device has no parent
udev_device_get_parent() may return NULL when the device doesn't have a parent, as is the case with (for example) /sys/devices/virtual/drm/ttm. Also, log an actual error message instead of "-12 displays connected". --- src/login/logind-action.c | 4 +++- src/login/logind-core.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git src/login/logind-action.c src/login/logind-action.c index ae7b350..1928f43 100644 --- src/login/logind-action.c +++ src/login/logind-action.c @@ -84,7 +84,9 @@ int manager_handle_action( * treat like this under the assumption that there is * no modern drm driver available. */ n = manager_count_displays(m); - if (n != 1) { + if (n < 0) + log_warning("Display counting failed: %s", strerror(-n)); + else if (n != 1) { log_debug("Ignoring lid switch request, %i displays connected.", n); return 0; } diff --git src/login/logind-core.c src/login/logind-core.c index ca34d37..053d2ed 100644 --- src/login/logind-core.c +++ src/login/logind-core.c @@ -520,7 +520,7 @@ int manager_count_displays(Manager *m) { p = udev_device_get_parent(d); if (!p) - return -ENOMEM; + continue; /* If the parent shares the same subsystem as the * device we are looking at then it is a connector, -- 1.7.9.2 ++++++ 0004-machined-make-sure-GetMachineAddresses-is-available-.patch ++++++
From d3152a09ac5804ec8603daee12f98cf03523cce0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 19 May 2014 00:47:26 +0900 Subject: [PATCH] machined: make sure GetMachineAddresses() is available for unprivileged processes
---
src/machine/org.freedesktop.machine1.conf | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git src/machine/org.freedesktop.machine1.conf src/machine/org.freedesktop.machine1.conf
index 970ccd8..ab349a5 100644
--- src/machine/org.freedesktop.machine1.conf
+++ src/machine/org.freedesktop.machine1.conf
@@ -42,12 +42,20 @@
From 981ee551945f4e00de52fcbb7780fd7476bcd47e Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 5 Mar 2014 03:37:48 +0100 Subject: [PATCH] man: document missing options of systemd-run
---
man/systemd-run.xml | 71 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 60 insertions(+), 11 deletions(-)
diff --git man/systemd-run.xml man/systemd-run.xml
index 95c1cb7..81d41dc 100644
--- man/systemd-run.xml
+++ man/systemd-run.xml
@@ -121,9 +121,9 @@ along with systemd; If not, see http://www.gnu.org/licenses/.
<varlistentry>
<term><option>--description=</option></term>
- <listitem><para>Provide description for the unit. If not
- specified, the command itself will be used as a description.
- See <varname>Description=</varname> in
+ <listitem><para>Provide description for the service or scope
+ unit. If not specified, the command itself will be used as a
+ description. See <varname>Description=</varname> in
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
</varlistentry>
@@ -140,10 +140,10 @@ along with systemd; If not, see http://www.gnu.org/licenses/.
<varlistentry>
<term><option>--remain-after-exit</option></term>
- <listitem><para>After the service's process has terminated, keep
- the service around until it is explicitly stopped. This is
- useful to collect runtime information about the service after
- it finished running. Also see
+ <listitem><para>After the service or scope process has
+ terminated, keep the service around until it is explicitly
+ stopped. This is useful to collect runtime information about
+ the service after it finished running. Also see
<varname>RemainAfterExit=</varname> in
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
@@ -153,15 +153,64 @@ along with systemd; If not, see http://www.gnu.org/licenses/.
<varlistentry>
<term><option>--send-sighup</option></term>
- <listitem><para>When terminating the scope unit, send a SIGHUP
- immediately after SIGTERM. This is useful to indicate to
- shells and shell-like processes that the connection has been
- severed. Also see <varname>SendSIGHUP=</varname> in
+ <listitem><para>When terminating the scope or service unit,
+ send a SIGHUP immediately after SIGTERM. This is useful to
+ indicate to shells and shell-like processes that the
+ connection has been severed. Also see
+ <varname>SendSIGHUP=</varname> in
<citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--service-type=</option></term>
+
+ <listitem><para>Sets the service type. Also see
+ <varname>Type=</varname> in
+ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
+ option has no effect in conjunction with
+ <option>--scope</option>. Defaults to
+ <constant>simple</constant>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--uid=</option></term>
+ <term><option>--gid=</option></term>
+
+ <listitem><para>Runs the service process under the UNIX user
+ and group. Also see <varname>User=</varname> and
+ <varname>Group=</varname> in
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
+ option has no effect in conjunction with
+ <option>--scope</option>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nice=</option></term>
+
+ <listitem><para>Runs the service process with the specified
+ nice level. Also see <varname>Nice=</varname> in
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
+ option has no effect in conjunction with
+ <option>--scope</option>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--setenv=</option></term>
+
+ <listitem><para>Runs the service process with the specified
+ environment variables set. Also see
+ <varname>Environment=</varname> in
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
+ option has no effect in conjunction with
+ <option>--scope</option>.</para>
+ </listitem>
+ </varlistentry>
+
From 455cd8b137b8ef45d04889f2d967c562a097f1e6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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-bus-when-an-event-loop-terminates-explicitly-clos.patch ++++++
From 7bb4d371af5ec6b8c50b71d2a80c2866d8134d9a Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 2 Jul 2014 17:36:47 +0200 Subject: [PATCH] sd-bus: when an event loop terminates, explicitly close the bus
This makes sure we actually release the bus and all the messages it references. --- src/libsystemd/sd-bus/sd-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index d52afe8..eb267d4 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -2940,6 +2940,7 @@ static int quit_callback(sd_event_source *event, void *userdata) { assert(event); sd_bus_flush(bus); + sd_bus_close(bus); return 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?=
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-sd-journal-verify-that-object-start-with-the-field-n.patch ++++++
Based on 0f99f74a14ef193c1ebde687c5cc76e1d67b85ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From 5e78424f4a27c07be50e246308035c877f204038 Mon Sep 17 00:00:00 2001 From: Michal Sekletar
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
++++++ 0004-shared-conf-parser.patch ++++++
Based on 83e341a637b75f7f592a5dc717c34d8b67ed4ffa Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From 863f3ce0d050f005839f6aa41fe7bac5478a7b5e Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Fri, 19 Sep 2014 08:03:31 +0200 Subject: [PATCH] shared: wtmp-utmp - don't clear store_wtmp in utmp_put_dead_process()
Also modernize a few other things and add comments to explain CID #1237503 and CID #1237504. --- src/shared/utmp-wtmp.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git src/shared/utmp-wtmp.c src/shared/utmp-wtmp.c index 30a0c03..31f13ec 100644 --- src/shared/utmp-wtmp.c +++ src/shared/utmp-wtmp.c @@ -92,8 +92,6 @@ int utmp_get_runlevel(int *runlevel, int *previous) { static void init_timestamp(struct utmpx *store, usec_t t) { assert(store); - zero(*store); - if (t <= 0) t = now(CLOCK_REALTIME); @@ -143,7 +141,7 @@ static int write_entry_wtmp(const struct utmpx *store) { assert(store); /* wtmp is a simple append-only file where each entry is - simply appended to * the end; i.e. basically a log. */ + simply appended to the end; i.e. basically a log. */ errno = 0; updwtmpx(_PATH_WTMPX, store); @@ -172,7 +170,7 @@ static int write_entry_both(const struct utmpx *store) { } int utmp_put_shutdown(void) { - struct utmpx store; + struct utmpx store = {}; init_entry(&store, 0); @@ -183,7 +181,7 @@ int utmp_put_shutdown(void) { } int utmp_put_reboot(usec_t t) { - struct utmpx store; + struct utmpx store = {}; init_entry(&store, t); @@ -206,16 +204,17 @@ _pure_ static const char *sanitize_id(const char *id) { } int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line) { - struct utmpx store; + struct utmpx store = { + .ut_type = INIT_PROCESS, + .ut_pid = pid, + .ut_session = sid, + }; assert(id); init_timestamp(&store, 0); - store.ut_type = INIT_PROCESS; - store.ut_pid = pid; - store.ut_session = sid; - + /* ut_id needs only be nul-terminated if it is shorter than sizeof(ut_id) */ strncpy(store.ut_id, sanitize_id(id), sizeof(store.ut_id)); if (line) @@ -225,14 +224,15 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line } int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) { - struct utmpx lookup, store, store_wtmp, *found; + struct utmpx lookup = { + .ut_type = INIT_PROCESS /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */ + }, store, store_wtmp, *found; assert(id); setutxent(); - zero(lookup); - lookup.ut_type = INIT_PROCESS; /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */ + /* ut_id needs only be nul-terminated if it is shorter than sizeof(ut_id) */ strncpy(lookup.ut_id, sanitize_id(id), sizeof(lookup.ut_id)); found = getutxid(&lookup); @@ -260,7 +260,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) { int utmp_put_runlevel(int runlevel, int previous) { - struct utmpx store; + struct utmpx store = {}; int r; assert(runlevel > 0); -- 1.7.9.2 ++++++ 0004-socket-properly-handle-if-our-service-vanished-durin.patch ++++++
From 640ace4a8de907994a1b95f6d368c3e6a8fcf60f Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 22 May 2014 16:56:21 +0900 Subject: [PATCH] socket: properly handle if our service vanished during runtime
--- src/core/socket.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git src/core/socket.c src/core/socket.c index 05af8fe..aca20fd 100644 --- src/core/socket.c +++ src/core/socket.c @@ -1503,6 +1503,12 @@ static void socket_enter_running(Socket *s, int cfd) { } if (!pending) { + if (!UNIT_ISSET(s->service)) { + log_error_unit(UNIT(s)->id, "%s: service to activate vanished, refusing activation.", UNIT(s)->id); + r = -ENOENT; + goto fail; + } + r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, true, &error, NULL); if (r < 0) goto fail; -- 1.7.9.2 ++++++ 0004-systemd-detect-virt-only-discover-Xen-domU.patch ++++++
From 37287585b6ba9a55065c8f94458f6db3c0abe0af Mon Sep 17 00:00:00 2001 From: Thomas Blume
Date: Fri, 6 Jun 2014 16:36:45 +0200 Subject: [PATCH] systemd-detect-virt: only discover Xen domU
The current vm detection lacks the distinction between Xen dom0 and Xen domU. Both, dom0 and domU are running inside the hypervisor. Therefore systemd-detect-virt and the ConditionVirtualization directive detect dom0 as a virtual machine. dom0 is not using virtual devices but is accessing the real hardware. Therefore dom0 should be considered the virtualisation host and not a virtual machine. https://bugs.freedesktop.org/show_bug.cgi?id=77271 --- src/shared/virt.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git src/shared/virt.c src/shared/virt.c index 1e227c5..774915f 100644 --- src/shared/virt.c +++ src/shared/virt.c @@ -148,7 +148,7 @@ static int detect_vm_dmi(const char **_id) { /* Returns a short identifier for the various VM implementations */ int detect_vm(const char **id) { - _cleanup_free_ char *hvtype = NULL, *cpuinfo_contents = NULL; + _cleanup_free_ char *domcap = NULL, *cpuinfo_contents = NULL; static thread_local int cached_found = -1; static thread_local const char *cached_id = NULL; const char *_id = NULL; @@ -162,17 +162,37 @@ int detect_vm(const char **id) { return cached_found; } - /* Try high-level hypervisor sysfs file first: + /* Try xen capabilities file first, if not found try high-level hypervisor sysfs file: * - * https://bugs.freedesktop.org/show_bug.cgi?id=61491 */ - r = read_one_line_file("/sys/hypervisor/type", &hvtype); + * https://bugs.freedesktop.org/show_bug.cgi?id=77271 */ + r = read_one_line_file("/proc/xen/capabilities", &domcap); if (r >= 0) { - if (streq(hvtype, "xen")) { + char *cap, *i = domcap; + + while ((cap = strsep(&i, ","))) + if (streq(cap, "control_d")) + break; + + if (!i) { _id = "xen"; r = 1; - goto finish; } - } else if (r != -ENOENT) + + goto finish; + + } else if (r == -ENOENT) { + _cleanup_free_ char *hvtype = NULL; + + r = read_one_line_file("/sys/hypervisor/type", &hvtype); + if (r >= 0) { + if (streq(hvtype, "xen")) { + _id = "xen"; + r = 1; + goto finish; + } + } else if (r != -ENOENT) + return r; + } else return r; /* this will set _id to "other" and return 0 for unknown hypervisors */ -- 1.7.9.2 ++++++ 0004-systemd-python-use-.hex-instead-of-.get_hex.patch ++++++
From b532cf3722e04adb0bd075666eb9989a9390d0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sat, 5 Apr 2014 13:23:25 -0400 Subject: [PATCH] systemd-python: use .hex instead of .get_hex()
It turns out the latter got removed in Python 3. https://bugs.freedesktop.org/show_bug.cgi?id=77086 --- src/python-systemd/journal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git src/python-systemd/journal.py src/python-systemd/journal.py index 9c7e004..dd1f229 100644 --- src/python-systemd/journal.py +++ src/python-systemd/journal.py @@ -293,7 +293,7 @@ class Reader(_Reader): monotonic = monotonic.totalseconds() monotonic = int(monotonic * 1000000) if isinstance(bootid, _uuid.UUID): - bootid = bootid.get_hex() + bootid = bootid.hex return super(Reader, self).seek_monotonic(monotonic, bootid) def log_level(self, level): @@ -314,7 +314,7 @@ class Reader(_Reader): Equivalent to add_match(MESSAGE_ID=`messageid`). """ if isinstance(messageid, _uuid.UUID): - messageid = messageid.get_hex() + messageid = messageid.hex self.add_match(MESSAGE_ID=messageid) def this_boot(self, bootid=None): @@ -346,7 +346,7 @@ class Reader(_Reader): def get_catalog(mid): if isinstance(mid, _uuid.UUID): - mid = mid.get_hex() + mid = mid.hex return _get_catalog(mid) def _make_line(field, value): -- 1.7.9.2 ++++++ 0004-systemd-return-the-first-error-from-manager_startup.patch ++++++
From 1cd974edfd7cd91dcdf321e7202bd220bac50a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Fri, 18 Jul 2014 17:05:18 -0400 Subject: [PATCH] systemd: return the first error from manager_startup()
--- src/core/manager.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git src/core/manager.c src/core/manager.c index 2e63c5e..0653d7e 100644 --- src/core/manager.c +++ src/core/manager.c @@ -1005,11 +1005,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { dual_timestamp_get(&m->units_load_finish_timestamp); /* Second, deserialize if there is something to deserialize */ - if (serialization) { - q = manager_deserialize(m, serialization, fds); - if (q < 0) - r = q; - } + if (serialization) + r = manager_deserialize(m, serialization, fds); /* Any fds left? Find some unit which wants them. This is * useful to allow container managers to pass some file @@ -1017,13 +1014,15 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { * socket-based activation of entire containers. */ if (fdset_size(fds) > 0) { q = manager_distribute_fds(m, fds); - if (q < 0) + if (q < 0 && r == 0) r = q; } /* We might have deserialized the notify fd, but if we didn't * then let's create the bus now */ - manager_setup_notify(m); + q = manager_setup_notify(m); + if (q < 0 && r == 0) + r = q; /* We might have deserialized the kdbus control fd, but if we * didn't, then let's create the bus now. */ @@ -1033,7 +1032,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { /* Third, fire things up! */ q = manager_coldplug(m); - if (q < 0) + if (q < 0 && r == 0) r = q; if (serialization) { -- 1.7.9.2 ++++++ 0004-util-ignore_file-should-not-allow-files-ending-with.patch ++++++
From 93f1a06374e335e8508d89e1bdaadf45be6ab777 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Sat, 31 May 2014 21:36:23 +0200 Subject: [PATCH] util: ignore_file should not allow files ending with '~'
ignore_file currently allows any file ending with '~' while it seems that the opposite was intended: a228a22fda4faa9ecb7c5a5e499980c8ae5d2a08 --- src/shared/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/shared/util.c src/shared/util.c index 0c27394..17b0ae1 100644 --- src/shared/util.c +++ src/shared/util.c @@ -1371,7 +1371,7 @@ bool ignore_file(const char *filename) { assert(filename); if (endswith(filename, "~")) - return false; + return true; return ignore_file_allow_backup(filename); } -- 1.7.9.2 ++++++ 0004-util-refuse-considering-UID-0xFFFF-and-0xFFFFFFFF-va.patch ++++++
From 306a55c86360a7ae7b2509771d5ea6ab0d166d85 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Sun, 29 Jun 2014 22:15:33 +0200 Subject: [PATCH] util: refuse considering UID 0xFFFF and 0xFFFFFFFF valid
--- src/shared/util.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git src/shared/util.c src/shared/util.c index e7ff0f8..1709bb7 100644 --- src/shared/util.c +++ src/shared/util.c @@ -280,6 +280,14 @@ int parse_uid(const char *s, uid_t* ret_uid) { if ((unsigned long) uid != ul) return -ERANGE; + /* Some libc APIs use (uid_t) -1 as special placeholder */ + if (uid == (uid_t) 0xFFFFFFFF) + return -EINVAL; + + /* A long time ago UIDs where 16bit, hence explicitly avoid the 16bit -1 too */ + if (uid == (uid_t) 0xFFFF) + return -EINVAL; + *ret_uid = uid; return 0; } -- 1.7.9.2 ++++++ 0005-Replace-var-run-with-run-in-remaining-places.patch ++++++
From 41a55c46ab8fb4ef6727434227071321fc762cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Tue, 25 Feb 2014 20:11:04 -0500 Subject: [PATCH] Replace /var/run with /run in remaining places
/run was already used almost everywhere, fix the remaining places for consistency. --- man/daemon.xml | 2 +- man/runlevel.xml | 2 +- man/tmpfiles.d.xml | 4 ++-- src/libsystemd/sd-bus/sd-bus.c | 4 ++-- src/systemctl/systemctl.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git man/daemon.xml man/daemon.xml index 88dd082..fd29ba7 100644 --- man/daemon.xml +++ man/daemon.xml @@ -149,7 +149,7 @@ write the daemon PID (as returned by <function>getpid()</function>) to a PID file, for example - <filename>/var/run/foobar.pid</filename> + <filename>/run/foobar.pid</filename> (for a hypothetical daemon "foobar") to ensure that the daemon cannot be started more than once. This must be diff --git man/runlevel.xml man/runlevel.xml index 976753a..4db06dc 100644 --- man/runlevel.xml +++ man/runlevel.xml @@ -124,7 +124,7 @@ <variablelist> <varlistentry> - <term><filename>/var/run/utmp</filename></term> + <term><filename>/run/utmp</filename></term> <listitem><para>The utmp database <command>runlevel</command> reads the diff --git man/tmpfiles.d.xml man/tmpfiles.d.xml index 812129f..0a006d1 100644 --- man/tmpfiles.d.xml +++ man/tmpfiles.d.xml @@ -441,8 +441,8 @@ r! /tmp/.X[0-9]*-lock</programlisting> <title>/etc/tmpfiles.d/screen.conf example</title> <para><command>screen</command> needs two directories created at boot with specific modes and ownership.</para> - <programlisting>d /var/run/screens 1777 root root 10d -d /var/run/uscreens 0755 root root 10d12h</programlisting> + <programlisting>d /run/screens 1777 root root 10d +d /run/uscreens 0755 root root 10d12h</programlisting> </example> <example> <title>/etc/tmpfiles.d/abrt.conf example</title> diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index 20f540d..1318272 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -794,8 +794,8 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid) machine = NULL; b->sockaddr.un.sun_family = AF_UNIX; - strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); - b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + sizeof("/var/run/dbus/system_bus_socket") - 1; + strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); + b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket"); return 0; } diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c index 34d7079..8692716 100644 --- src/systemctl/systemctl.c +++ src/systemctl/systemctl.c @@ -3758,8 +3758,8 @@ static int show_one( streq(verb, "status")) { /* According to LSB: "program not running" */ /* 0: program is running or service is OK - * 1: program is dead and /var/run pid file exists - * 2: program is dead and /var/lock lock file exists + * 1: program is dead and /run PID file exists + * 2: program is dead and /run/lock lock file exists * 3: program is not running * 4: program or service status is unknown */ -- 1.7.9.2 ++++++ 0005-backlight-Do-not-clamp-brightness-for-LEDs.patch ++++++
From 4cd2b2cf8ca585d15ebc859701b346658262b5bb Mon Sep 17 00:00:00 2001 From: Denis Tikhomirov
Date: Thu, 5 Jun 2014 23:59:40 +0400 Subject: [PATCH] backlight: Do not clamp brightness for LEDs
https://bugs.freedesktop.org/show_bug.cgi?id=77092 On Thu, Jun 05, 2014 at 08:37:20AM +0200, Lennart Poettering wrote:
The patch is line-broken, please send an uncorrupted patch! I am very sorry, I forgot that my client limits line width. I will use mutt now on. clamp_brightness() clamps the brightness value to the range of the actual device. This is a recent addition that was added to deal with driver updates where the resolution is changed. I don't think this part should be dropped for LED devices. The clamp_brightness() call hence should be called unconditionally, however, internally it should use a different min_brightness value if something is an !backlight devices... Thank you for explanation, this sounds very reasonable to me. Please, see updated patch:
src/backlight/backlight.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git src/backlight/backlight.c src/backlight/backlight.c index 691472c..4d94ebf 100644 --- src/backlight/backlight.c +++ src/backlight/backlight.c @@ -225,11 +225,13 @@ static unsigned get_max_brightness(struct udev_device *device) { /* Some systems turn the backlight all the way off at the lowest levels. * clamp_brightness clamps the saved brightness to at least 1 or 5% of - * max_brightness. This avoids preserving an unreadably dim screen, which - * would otherwise force the user to disable state restoration. */ + * max_brightness in case of 'backlight' subsystem. This avoids preserving + * an unreadably dim screen, which would otherwise force the user to + * disable state restoration. */ static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) { int r; unsigned brightness, new_brightness, min_brightness; + const char *subsystem; r = safe_atou(*value, &brightness); if (r < 0) { @@ -237,7 +239,12 @@ static void clamp_brightness(struct udev_device *device, char **value, unsigned return; } - min_brightness = MAX(1U, max_brightness/20); + subsystem = udev_device_get_subsystem(device); + if (streq_ptr(subsystem, "backlight")) + min_brightness = MAX(1U, max_brightness/20); + else + min_brightness = 0; + new_brightness = CLAMP(brightness, min_brightness, max_brightness); if (new_brightness != brightness) { char *old_value = *value; -- 1.7.9.2 ++++++ 0005-backlight-handle-saved-brightness-exceeding-max-brig.patch ++++++
From 0c9d8f1d4b5018199cb5a9b57580dc1480a7f915 Mon Sep 17 00:00:00 2001 From: Jani Nikula
Date: Wed, 7 May 2014 12:01:01 +0300 Subject: [PATCH] backlight: handle saved brightness exceeding max brightness
If too high a brightness value has been saved (e.g. due to kernel
mechanism changing from one kernel version to another, or booting the
userspace on another system), the brightness update fails and the
process exits.
Clamp saved brightness between the policy minimum introduced in
commit 7b909d7407965c03caaba30daae7aee113627a83
Author: Josh Triplett
From c119700c06b248b1c2a082b40b1a346f58d89da0 Mon Sep 17 00:00:00 2001 From: Philippe De Swert
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-bus-avoid-using-m-kdbus-after-freeing-it.patch ++++++
Based on fd989a0bc999d79719408ac28b126d9c9016bcb5 Mon Sep 17 00:00:00 2001
From: Philippe De Swert
From db9bb83fa5ec72da38eb5bd0c259ef8c76a71858 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 3 Jul 2014 01:19:21 +0200 Subject: [PATCH] bus: close a bus that failed to connect
--- src/libsystemd/sd-bus/sd-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index c25375c..28fc19e 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -1033,8 +1033,10 @@ _public_ int sd_bus_start(sd_bus *bus) { else return -EINVAL; - if (r < 0) + if (r < 0) { + sd_bus_close(bus); return r; + } return bus_send_hello(bus); } -- 1.7.9.2 ++++++ 0005-core-Filter-by-state-behind-the-D-Bus-API-not-in-the.patch ++++++
From cdc06ed7b6120c1049305fa7033f228ee9d86043 Mon Sep 17 00:00:00 2001 From: David Strauss
Date: Mon, 28 Apr 2014 12:08:32 -0700 Subject: [PATCH] core: Filter by state behind the D-Bus API, not in the systemctl client.
---
src/core/dbus-manager.c | 24 +++++++++++++++++++++++-
src/core/org.freedesktop.systemd1.conf | 4 ++++
src/systemctl/systemctl.c | 24 +++++++++++++-----------
3 files changed, 40 insertions(+), 12 deletions(-)
diff --git src/core/dbus-manager.c src/core/dbus-manager.c
index 58e484d..d5fab0a 100644
--- src/core/dbus-manager.c
+++ src/core/dbus-manager.c
@@ -728,7 +728,7 @@ static int method_reset_failed(sd_bus *bus, sd_bus_message *message, void *userd
return sd_bus_reply_method_return(message, NULL);
}
-static int method_list_units(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int list_units_filtered(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error, char **states) {
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
Manager *m = userdata;
const char *k;
@@ -761,6 +761,12 @@ static int method_list_units(sd_bus *bus, sd_bus_message *message, void *userdat
following = unit_following(u);
+ if (!strv_isempty(states) &&
+ !strv_contains(states, unit_load_state_to_string(u->load_state)) &&
+ !strv_contains(states, unit_active_state_to_string(unit_active_state(u))) &&
+ !strv_contains(states, unit_sub_state_to_string(u)))
+ continue;
+
unit_path = unit_dbus_path(u);
if (!unit_path)
return -ENOMEM;
@@ -794,6 +800,21 @@ static int method_list_units(sd_bus *bus, sd_bus_message *message, void *userdat
return sd_bus_send(bus, reply, NULL);
}
+static int method_list_units(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+ return list_units_filtered(bus, message, userdata, error, NULL);
+}
+
+static int method_list_units_filtered(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
+ _cleanup_strv_free_ char **states = NULL;
+ int r;
+
+ r = sd_bus_message_read_strv(message, &states);
+ if (r < 0)
+ return r;
+
+ return list_units_filtered(bus, message, userdata, error, states);
+}
+
static int method_list_jobs(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
Manager *m = userdata;
@@ -1670,6 +1691,7 @@ const sd_bus_vtable bus_manager_vtable[] = {
SD_BUS_METHOD("ClearJobs", NULL, NULL, method_clear_jobs, 0),
SD_BUS_METHOD("ResetFailed", NULL, NULL, method_reset_failed, 0),
SD_BUS_METHOD("ListUnits", NULL, "a(ssssssouso)", method_list_units, SD_BUS_VTABLE_UNPRIVILEGED),
+ SD_BUS_METHOD("ListUnitsFiltered", "as", "a(ssssssouso)", method_list_units_filtered, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ListJobs", NULL, "a(usssoo)", method_list_jobs, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Subscribe", NULL, NULL, method_subscribe, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Unsubscribe", NULL, NULL, method_unsubscribe, SD_BUS_VTABLE_UNPRIVILEGED),
diff --git src/core/org.freedesktop.systemd1.conf src/core/org.freedesktop.systemd1.conf
index a375dce..9dfca81 100644
--- src/core/org.freedesktop.systemd1.conf
+++ src/core/org.freedesktop.systemd1.conf
@@ -64,6 +64,10 @@
From 0e2f14014c65b4d8b30146e414579154cfa932da Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From 24e29480bd800d3acdb3087e5863440bd0dd1d80 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Fri, 16 May 2014 15:57:35 -0700 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
---
hwdb/20-bluetooth-vendor-product.hwdb | 53 ++++++++++++++++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)
diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb
index 28aa2a7..a65c7db 100644
--- hwdb/20-bluetooth-vendor-product.hwdb
+++ hwdb/20-bluetooth-vendor-product.hwdb
@@ -961,4 +961,55 @@ bluetooth:v013D*
ID_VENDOR_FROM_DATABASE=WirelessWERX
bluetooth:v013E*
- ID_VENDOR_FROM_DATABASE=nimai
+ ID_VENDOR_FROM_DATABASE=Nod, Inc.
+
+bluetooth:v013F*
+ ID_VENDOR_FROM_DATABASE=B&B Manufacturing Company
+
+bluetooth:v0140*
+ ID_VENDOR_FROM_DATABASE=Alpine Electronics (China) Co., Ltd
+
+bluetooth:v0141*
+ ID_VENDOR_FROM_DATABASE=FedEx Services
+
+bluetooth:v0142*
+ ID_VENDOR_FROM_DATABASE=Grape Systems Inc.
+
+bluetooth:v0143*
+ ID_VENDOR_FROM_DATABASE=Bkon Connect
+
+bluetooth:v0144*
+ ID_VENDOR_FROM_DATABASE=Lintech GmbH
+
+bluetooth:v0145*
+ ID_VENDOR_FROM_DATABASE=Novatel Wireless
+
+bluetooth:v0146*
+ ID_VENDOR_FROM_DATABASE=Ciright
+
+bluetooth:v0147*
+ ID_VENDOR_FROM_DATABASE=Mighty Cast, Inc.
+
+bluetooth:v0148*
+ ID_VENDOR_FROM_DATABASE=Ambimat Electronics
+
+bluetooth:v0149*
+ ID_VENDOR_FROM_DATABASE=Perytons Ltd.
+
+bluetooth:v014A*
+ ID_VENDOR_FROM_DATABASE=Tivoli Audio, LLC
+
+bluetooth:v014B*
+ ID_VENDOR_FROM_DATABASE=Master Lock
+
+bluetooth:v014C*
+ ID_VENDOR_FROM_DATABASE=Mesh-Net Ltd
+
+bluetooth:v014D*
+ ID_VENDOR_FROM_DATABASE=HUIZHOU DESAY SV AUTOMOTIVE CO., LTD.
+
+bluetooth:v014E*
+ ID_VENDOR_FROM_DATABASE=Tangerine, Inc.
+
+bluetooth:v014F*
+ ID_VENDOR_FROM_DATABASE=B&W Group Ltd.
--
1.7.9.2
++++++ 0005-hwdb-update.patch ++++++
++++ 1560 lines (skipped)
++++++ 0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch ++++++
Based on 1727a595225132eb73ec134b6979d9c713b42e8c Mon Sep 17 00:00:00 2001
From: Michael Marineau
From 055d406624cb9e01963558767420b71e5f75d2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Mon, 10 Mar 2014 08:25:15 -0400 Subject: [PATCH] logind: fix policykit checks
--- src/login/logind-dbus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git src/login/logind-dbus.c src/login/logind-dbus.c index c9c58f3..235b131 100644 --- src/login/logind-dbus.c +++ src/login/logind-dbus.c @@ -1480,6 +1480,8 @@ static int method_do_shutdown_or_sleep( action_multiple_sessions, interactive, error, method, m); if (r < 0) return r; + if (r == 0) + return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } if (blocked) { @@ -1487,6 +1489,8 @@ static int method_do_shutdown_or_sleep( action_ignore_inhibit, interactive, error, method, m); if (r < 0) return r; + if (r == 0) + return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } if (!multiple_sessions && !blocked) { @@ -1494,6 +1498,8 @@ static int method_do_shutdown_or_sleep( action, interactive, error, method, m); if (r < 0) return r; + if (r == 0) + return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } r = bus_manager_shutdown_or_sleep_now_or_later(m, unit_name, w, error); -- 1.7.9.2 ++++++ 0005-logind-fix-typo.patch ++++++
From 2b2332856bafe25c4aa17db2a90bdcddef1fec1a Mon Sep 17 00:00:00 2001 From: Ronny Chevalier
Date: Wed, 17 Sep 2014 20:10:44 +0200 Subject: [PATCH] logind: fix typo
--- src/login/logind-session-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/login/logind-session-dbus.c src/login/logind-session-dbus.c index 7d81500..58836fc 100644 --- src/login/logind-session-dbus.c +++ src/login/logind-session-dbus.c @@ -249,7 +249,7 @@ static int method_set_idle_hint(sd_bus *bus, sd_bus_message *message, void *user return r; if (uid != 0 && uid != s->user->uid) - return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Only owner of session my set idle hint"); + return sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Only owner of session may set idle hint"); session_set_idle_hint(s, b); -- 1.7.9.2 ++++++ 0005-logind-move-lid-switch-handling-from-logind-main-to-.patch ++++++
From b5d3e1688133077ca20542a20dcd8919147e72e1 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Tue, 11 Mar 2014 22:38:54 +0100 Subject: [PATCH] logind: move lid switch handling from logind-main to logind-core
../src/login/logind-dbus.c:1352: error: undefined reference to 'manager_set_lid_switch_ignore' collect2: error: ld returned 1 exit status make[2]: *** [test-login-tables] --- src/login/logind-dbus.c | 40 ++++++++++++++++++++++++++++++++++++++++ src/login/logind.c | 40 ---------------------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git src/login/logind-dbus.c src/login/logind-dbus.c index c5f9cb3..2ef87f7 100644 --- src/login/logind-dbus.c +++ src/login/logind-dbus.c @@ -1305,6 +1305,46 @@ static int bus_manager_log_shutdown( q, NULL); } +static int lid_switch_ignore_handler(sd_event_source *e, uint64_t usec, void *userdata) { + Manager *m = userdata; + + assert(e); + assert(m); + + m->lid_switch_ignore_event_source = sd_event_source_unref(m->lid_switch_ignore_event_source); + return 0; +} + +int manager_set_lid_switch_ignore(Manager *m, usec_t until) { + int r; + + assert(m); + + if (until <= now(CLOCK_MONOTONIC)) + return 0; + + /* We want to ignore the lid switch for a while after each + * suspend, and after boot-up. Hence let's install a timer for + * this. As long as the event source exists we ignore the lid + * switch. */ + + if (m->lid_switch_ignore_event_source) { + usec_t u; + + r = sd_event_source_get_time(m->lid_switch_ignore_event_source, &u); + if (r < 0) + return r; + + if (until <= u) + return 0; + + r = sd_event_source_set_time(m->lid_switch_ignore_event_source, until); + } else + r = sd_event_add_monotonic(m->event, &m->lid_switch_ignore_event_source, until, 0, lid_switch_ignore_handler, m); + + return r; +} + static int execute_shutdown_or_sleep( Manager *m, InhibitWhat w, diff --git src/login/logind.c src/login/logind.c index 03b7753..2d734ff 100644 --- src/login/logind.c +++ src/login/logind.c @@ -962,46 +962,6 @@ static int manager_dispatch_idle_action(sd_event_source *s, uint64_t t, void *us return 0; } -static int lid_switch_ignore_handler(sd_event_source *e, uint64_t usec, void *userdata) { - Manager *m = userdata; - - assert(e); - assert(m); - - m->lid_switch_ignore_event_source = sd_event_source_unref(m->lid_switch_ignore_event_source); - return 0; -} - -int manager_set_lid_switch_ignore(Manager *m, usec_t until) { - int r; - - assert(m); - - if (until <= now(CLOCK_MONOTONIC)) - return 0; - - /* We want to ignore the lid switch for a while after each - * suspend, and after boot-up. Hence let's install a timer for - * this. As long as the event source exists we ignore the lid - * switch. */ - - if (m->lid_switch_ignore_event_source) { - usec_t u; - - r = sd_event_source_get_time(m->lid_switch_ignore_event_source, &u); - if (r < 0) - return r; - - if (until <= u) - return 0; - - r = sd_event_source_set_time(m->lid_switch_ignore_event_source, until); - } else - r = sd_event_add_monotonic(m->event, &m->lid_switch_ignore_event_source, until, 0, lid_switch_ignore_handler, m); - - return r; -} - int manager_startup(Manager *m) { int r; Seat *seat; -- 1.7.9.2 ++++++ 0005-man-fix-path-in-crypttab-5.patch ++++++
From 9fcdf32294e66f91d2a177f73a77049832768311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Mon, 23 Jun 2014 23:07:53 -0400 Subject: [PATCH] man: fix path in crypttab(5)
https://bugs.freedesktop.org/show_bug.cgi?id=75816 --- man/crypttab.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git man/crypttab.xml man/crypttab.xml index 668e51d..9030015 100644 --- man/crypttab.xml +++ man/crypttab.xml @@ -369,7 +369,7 @@ <programlisting>luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b swap /dev/sda7 /dev/urandom swap truecrypt /dev/sda2 /etc/container_password tcrypt -hidden /mnt/tc_hidden /null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting> +hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting> </example> </refsect1> -- 1.7.9.2 ++++++ 0005-nspawn-block-open_by_handle_at-and-others-via-seccom.patch ++++++
From 28650077f36466d9c5ee27ef2006fae3171a2430 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 30 Jun 2014 16:22:12 +0200 Subject: [PATCH] nspawn: block open_by_handle_at() and others via seccomp
Let's protect ourselves against the recently reported docker security issue. Our man page makes clear that we do not make any security promises anyway, but well, this one is easy to mitigate, so let's do it. While we are at it block a couple of more syscalls that are no good in containers, too. --- src/nspawn/nspawn.c | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git src/nspawn/nspawn.c src/nspawn/nspawn.c index fd61d07..656c1bf 100644 --- src/nspawn/nspawn.c +++ src/nspawn/nspawn.c @@ -1864,22 +1864,25 @@ static int setup_macvlan(pid_t pid) { return 0; } -static int audit_still_doesnt_work_in_containers(void) { +static int setup_seccomp(void) { #ifdef HAVE_SECCOMP + static const int blacklist[] = { + SCMP_SYS(kexec_load), + SCMP_SYS(open_by_handle_at), + SCMP_SYS(init_module), + SCMP_SYS(finit_module), + SCMP_SYS(delete_module), + SCMP_SYS(iopl), + SCMP_SYS(ioperm), + SCMP_SYS(swapon), + SCMP_SYS(swapoff), + }; + scmp_filter_ctx seccomp; + unsigned i; int r; - /* - Audit is broken in containers, much of the userspace audit - hookup will fail if running inside a container. We don't - care and just turn off creation of audit sockets. - - This will make socket(AF_NETLINK, *, NETLINK_AUDIT) fail - with EAFNOSUPPORT which audit userspace uses as indication - that audit is disabled in the kernel. - */ - seccomp = seccomp_init(SCMP_ACT_ALLOW); if (!seccomp) return log_oom(); @@ -1890,6 +1893,26 @@ static int audit_still_doesnt_work_in_containers(void) { goto finish; } + for (i = 0; i < ELEMENTSOF(blacklist); i++) { + r = seccomp_rule_add(seccomp, SCMP_ACT_ERRNO(EPERM), blacklist[i], 0); + if (r == -EFAULT) + continue; /* unknown syscall */ + if (r < 0) { + log_error("Failed to block syscall: %s", strerror(-r)); + goto finish; + } + } + + /* + Audit is broken in containers, much of the userspace audit + hookup will fail if running inside a container. We don't + care and just turn off creation of audit sockets. + + This will make socket(AF_NETLINK, *, NETLINK_AUDIT) fail + with EAFNOSUPPORT which audit userspace uses as indication + that audit is disabled in the kernel. + */ + r = seccomp_rule_add( seccomp, SCMP_ACT_ERRNO(EAFNOSUPPORT), @@ -3050,7 +3073,7 @@ int main(int argc, char *argv[]) { dev_setup(arg_directory); - if (audit_still_doesnt_work_in_containers() < 0) + if (setup_seccomp() < 0) goto child_fail; if (setup_dev_console(arg_directory, console) < 0) -- 1.7.9.2 ++++++ 0005-po-add-Greek-translation.patch ++++++
From 3d89c35c2ae08c3fbf1a037c4df54c8e5ae56faf Mon Sep 17 00:00:00 2001 From: Dimitris Spingos
Date: Wed, 7 May 2014 18:27:02 +0200 Subject: [PATCH] po: add Greek translation
https://bugs.freedesktop.org/show_bug.cgi?id=78064
---
po/LINGUAS | 3 +-
po/el.po | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 406 insertions(+), 1 deletion(-)
create mode 100644 po/el.po
diff --git po/LINGUAS po/LINGUAS
index 0301751..820ca82 100644
--- po/LINGUAS
+++ po/LINGUAS
@@ -1,4 +1,5 @@
+el
fr
+it
pl
ru
-it
diff --git po/el.po po/el.po
new file mode 100644
index 0000000..1570565
--- /dev/null
+++ po/el.po
@@ -0,0 +1,404 @@
+# Greek translation for systemd.
+# Copyright (C) 2014 systemd's COPYRIGHT HOLDER
+# This file is distributed under the same license as the systemd package.
+# Dimitris Spingos
From 56dc9aec21ab23f76fadf45585adf88e71aa8078 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 24 Mar 2014 23:54:14 +0100 Subject: [PATCH] sd-daemon: fix incorrect variable access
--- src/libsystemd/sd-daemon/sd-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/libsystemd/sd-daemon/sd-daemon.c src/libsystemd/sd-daemon/sd-daemon.c index 21fb346..b013438 100644 --- src/libsystemd/sd-daemon/sd-daemon.c +++ src/libsystemd/sd-daemon/sd-daemon.c @@ -517,7 +517,7 @@ _public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) { r = -errno; goto finish; } - if (!p || p == e || *p || l <= 0) { + if (!p || p == e || *p || ll <= 0) { r = -EINVAL; goto finish; } -- 1.7.9.2 ++++++ 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?=
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-sd-resolve-fix-allocation-if-query-ids-never-reuse-t.patch ++++++
Based on 85529c815b47c22839e0f148af67fd37e977cbfa Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 2040ccf171404b709acb0ecf1d1f17b87c5d05f0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 7 Jul 2014 17:32:44 +0200 Subject: [PATCH] service: don't accept negative ERRNO= notification messages
--- src/core/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/service.c src/core/service.c index 5c54a34..d5aff99 100644 --- src/core/service.c +++ src/core/service.c @@ -2637,7 +2637,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { if (e) { int status_errno; - if (safe_atoi(e + 6, &status_errno) < 0) + if (safe_atoi(e + 6, &status_errno) < 0 || status_errno < 0) log_warning_unit(u->id, "Failed to parse ERRNO= field in notification message: %s", e); else { log_debug_unit(u->id, "%s: got %s", u->id, e); -- 1.7.9.2 ++++++ 0005-shared-label.h-add-missing-stdio.h-include.patch ++++++
From 45f15021e3524b04d574b9ff4e801cb3219daf3f Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing
Date: Thu, 18 Sep 2014 15:24:42 +0200 Subject: [PATCH] shared/label.h: add missing stdio.h include
---
src/shared/label.h | 1 +
1 file changed, 1 insertion(+)
diff --git src/shared/label.h src/shared/label.h
index 7294820..cb2ec79 100644
--- src/shared/label.h
+++ src/shared/label.h
@@ -24,6 +24,7 @@
#include
From b65f24238b0627143916a9c7f8315483a9666676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sat, 5 Apr 2014 13:29:50 -0400 Subject: [PATCH] systemd-python: fix failing assert
A parameter which was always null before, now get's set to the module. --- src/python-systemd/_reader.c | 1 - 1 file changed, 1 deletion(-) diff --git src/python-systemd/_reader.c src/python-systemd/_reader.c index 059b904..9a19a10 100644 --- src/python-systemd/_reader.c +++ src/python-systemd/_reader.c @@ -902,7 +902,6 @@ static PyObject* get_catalog(PyObject *self, PyObject *args) { sd_id128_t id; _cleanup_free_ char *msg = NULL; - assert(!self); assert(args); if (!PyArg_ParseTuple(args, "z:get_catalog", &id_)) -- 1.7.9.2 ++++++ 0005-systemd-run-add-some-extra-safety-checks.patch ++++++
From 1ac67edb7c4d31a287fa98c0b554ae98bd34e71b Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 5 Mar 2014 03:38:36 +0100 Subject: [PATCH] systemd-run: add some extra safety checks
---
src/run/run.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git src/run/run.c src/run/run.c
index 81763c9..e71ca7d 100644
--- src/run/run.c
+++ src/run/run.c
@@ -37,7 +37,7 @@ static const char *arg_description = NULL;
static const char *arg_slice = NULL;
static bool arg_send_sighup = false;
static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
-static char *arg_host = NULL;
+static const char *arg_host = NULL;
static bool arg_user = false;
static const char *arg_service_type = NULL;
static const char *arg_exec_user = NULL;
@@ -186,7 +186,7 @@ static int parse_argv(int argc, char *argv[]) {
case ARG_NICE:
r = safe_atoi(optarg, &arg_nice);
- if (r < 0) {
+ if (r < 0 || arg_nice < PRIO_MIN || arg_nice >= PRIO_MAX) {
log_error("Failed to parse nice value");
return -EINVAL;
}
--
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?=
From 315db1a8aed226a51a4cf700172249cfd10ae115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Fri, 14 Mar 2014 09:05:56 -0400 Subject: [PATCH] Do not return -1 (EINVAL) on allocation error
--- src/core/socket.c | 8 +++----- diff --git src/core/socket.c src/core/socket.c index 8ecc9f9..b39bec2 100644 --- src/core/socket.c +++ src/core/socket.c @@ -198,16 +198,14 @@ static int socket_instantiate_service(Socket *s) { assert(s->accept); - if (!(prefix = unit_name_to_prefix(UNIT(s)->id))) + prefix = unit_name_to_prefix(UNIT(s)->id); + if (!prefix) return -ENOMEM; - r = asprintf(&name, "%s@%u.service", prefix, s->n_accepted); - - if (r < 0) + if (asprintf(&name, "%s@%u.service", prefix, s->n_accepted) < 0) return -ENOMEM; r = manager_load_unit(UNIT(s)->manager, name, NULL, NULL, &u); - if (r < 0) return r; -- 1.7.9.2 ++++++ 0006-Revert-back-to-var-run-at-a-couple-of-problems.patch ++++++
From df1e02046144f41176c32ed011369fd8dba36b76 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 26 Feb 2014 02:47:43 +0100 Subject: [PATCH] Revert back to /var/run at a couple of problems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
This partially reverts 41a55c46ab8fb4ef6727434227071321fc762cce Some specifications we want to stay compatibility actually document /var/run, not /run, and we should stay compatible with that. In order to make sure our D-Bus implementation works on any system, regardless if running systemd or not, we should always use /var/run which is the only path mandated by the D-Bus spec. Similar, glibc hardcodes the utmp location to /var/run, and this is exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this public API, too. We simply do not support systems where /var/run is not a symlink → /run. Hence both are equivalent. Staying compatible with upstream specifications hence weighs more than cleaning up superficial appearance. --- man/runlevel.xml | 2 +- src/libsystemd/sd-bus/sd-bus.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git man/runlevel.xml man/runlevel.xml index 4db06dc..976753a 100644 --- man/runlevel.xml +++ man/runlevel.xml @@ -124,7 +124,7 @@ <variablelist> <varlistentry> - <term><filename>/run/utmp</filename></term> + <term><filename>/var/run/utmp</filename></term> <listitem><para>The utmp database <command>runlevel</command> reads the diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index 1318272..636715f 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -794,8 +794,8 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid) machine = NULL; b->sockaddr.un.sun_family = AF_UNIX; - strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); - b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket"); + strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); + b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket"); return 0; } -- 1.7.9.2 ++++++ 0006-bus-unref-buscreds-on-failure.patch ++++++
From 2b347169b9046ff2d735ef23e62a8c74f5151600 Mon Sep 17 00:00:00 2001 From: Philippe De Swert
Date: Wed, 10 Sep 2014 12:20:42 +0300 Subject: [PATCH] bus: unref buscreds on failure
Actually unref the buscreds when we are not going to return a pointer to them. As when bus_creds_add_more fails we immediately return the error code otherwise and leak the new buscreds. Found with coverity. Fixes: CID#1237761 --- src/libsystemd/sd-bus/sd-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index 78e91b9..83b3aa1 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -3339,8 +3339,10 @@ _public_ int sd_bus_get_peer_creds(sd_bus *bus, uint64_t mask, sd_bus_creds **re } r = bus_creds_add_more(c, mask, pid, 0); - if (r < 0) + if (r < 0) { + sd_bus_creds_unref(c); return r; + } *ret = c; return 0; -- 1.7.9.2 ++++++ 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?=
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-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From 7cfa80f07e94c3e48703d145ef03a73dd6e7b983 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Wed, 18 Jun 2014 13:55:32 +0200 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 42 ++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index a65c7db..377748a 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -115,7 +115,7 @@ bluetooth:v0024* ID_VENDOR_FROM_DATABASE=Alcatel bluetooth:v0025* - ID_VENDOR_FROM_DATABASE=Philips Semiconductors + ID_VENDOR_FROM_DATABASE=NXP Semiconductors (formerly Philips Semiconductors) bluetooth:v0026* ID_VENDOR_FROM_DATABASE=C Technologies @@ -427,7 +427,7 @@ bluetooth:v008B* ID_VENDOR_FROM_DATABASE=Topcorn Positioning Systems, LLC bluetooth:v008C* - ID_VENDOR_FROM_DATABASE=Qualcomm Retail Solutions, Inc. (formerly Qualcomm Labs, Inc.) + ID_VENDOR_FROM_DATABASE=Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.) bluetooth:v008D* ID_VENDOR_FROM_DATABASE=Zscan Software @@ -1006,10 +1006,46 @@ bluetooth:v014C* ID_VENDOR_FROM_DATABASE=Mesh-Net Ltd bluetooth:v014D* - ID_VENDOR_FROM_DATABASE=HUIZHOU DESAY SV AUTOMOTIVE CO., LTD. + ID_VENDOR_FROM_DATABASE=Huizhou Desay SV Automotive CO., LTD. bluetooth:v014E* ID_VENDOR_FROM_DATABASE=Tangerine, Inc. bluetooth:v014F* ID_VENDOR_FROM_DATABASE=B&W Group Ltd. + +bluetooth:v0150* + ID_VENDOR_FROM_DATABASE=Pioneer Corporation + +bluetooth:v0151* + ID_VENDOR_FROM_DATABASE=OnBeep + +bluetooth:v0152* + ID_VENDOR_FROM_DATABASE=Vernier Software & Technology + +bluetooth:v0153* + ID_VENDOR_FROM_DATABASE=ROL Ergo + +bluetooth:v0154* + ID_VENDOR_FROM_DATABASE=Pebble Technology + +bluetooth:v0155* + ID_VENDOR_FROM_DATABASE=NETATMO + +bluetooth:v0156* + ID_VENDOR_FROM_DATABASE=Accumulate AB + +bluetooth:v0157* + ID_VENDOR_FROM_DATABASE=Anhui Huami Information Technology Co., Ltd. + +bluetooth:v0158* + ID_VENDOR_FROM_DATABASE=Inmite s.r.o. + +bluetooth:v0159* + ID_VENDOR_FROM_DATABASE=ChefSteps, Inc. + +bluetooth:v015A* + ID_VENDOR_FROM_DATABASE=micus AG + +bluetooth:v015B* + ID_VENDOR_FROM_DATABASE=Biomedical Research Ltd. -- 1.7.9.2 ++++++ 0006-hwdb-update.patch ++++++ ++++ 4392 lines (skipped) ++++++ 0006-journal-assume-that-next-entry-is-after-previous-ent.patch ++++++
From fb099c8d2af6620db2709e826a258089d10cdfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Thu, 27 Feb 2014 00:07:29 -0500 Subject: [PATCH] journal: assume that next entry is after previous entry
With a corrupted file, we can get in a situation where two entries in the entry array point to the same object. Then journal_file_next_entry will find the first one using generic_arrray_bisect, and try to move to the second one, but since the address is the same, generic_array_get will return the first one. journal_file_next_entry ends up in an infinite loop. https://bugzilla.redhat.com/show_bug.cgi?id=1047039 --- src/journal/journal-file.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git src/journal/journal-file.c src/journal/journal-file.c index 5876733..0e1fc7f 100644 --- src/journal/journal-file.c +++ src/journal/journal-file.c @@ -1359,7 +1359,7 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st } typedef struct ChainCacheItem { - uint64_t first; /* the array at the begin of the chain */ + uint64_t first; /* the array at the beginning of the chain */ uint64_t array; /* the cached array */ uint64_t begin; /* the first item in the cached array */ uint64_t total; /* the total number of items in all arrays before this one in the chain */ @@ -1945,7 +1945,7 @@ int journal_file_next_entry( direction_t direction, Object **ret, uint64_t *offset) { - uint64_t i, n; + uint64_t i, n, ofs; int r; assert(f); @@ -1986,10 +1986,24 @@ int journal_file_next_entry( } /* And jump to it */ - return generic_array_get(f, - le64toh(f->header->entry_array_offset), - i, - ret, offset); + r = generic_array_get(f, + le64toh(f->header->entry_array_offset), + i, + ret, &ofs); + if (r <= 0) + return r; + + if (p > 0 && + (direction == DIRECTION_DOWN ? ofs <= p : ofs >= p)) { + log_debug("%s: entry array corrupted at entry %"PRIu64, + f->path, i); + return -EBADMSG; + } + + if (offset) + *offset = ofs; + + return 1; } int journal_file_skip_entry( -- 1.7.9.2 ++++++ 0006-journald-fix-minor-memory-leak.patch ++++++
From 99d0966e75a984bed4f117c888ecc93e16e7b7b6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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 ++++++ 0006-log-honour-the-kernel-s-quiet-cmdline-argument.patch ++++++
From e683212f049ac5d3f95fb17300cfa2fd971f78f3 Mon Sep 17 00:00:00 2001 From: Ronny Chevalier
Date: Tue, 3 Jun 2014 19:44:03 +0200 Subject: [PATCH] log: honour the kernel's quiet cmdline argument
It was forgotten in b1e90ec515408aec2702522f6f68c4920b56375b See https://bugs.freedesktop.org/show_bug.cgi?id=79582 --- src/shared/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git src/shared/log.c src/shared/log.c index 9039db3..6f17705 100644 --- src/shared/log.c +++ src/shared/log.c @@ -878,6 +878,9 @@ void log_parse_environment(void) { if (l == 5 && startswith(w, "debug")) { log_set_max_level(LOG_DEBUG); break; + } else if (l == 5 && startswith(w, "quiet")) { + log_set_max_level(LOG_WARNING); + break; } } } -- 1.7.9.2 ++++++ 0006-login-add-mir-to-the-list-of-session-types.patch ++++++
From 9541666b8d97f107335dd7e3cb93b4d2cfbf19c9 Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Wed, 9 Apr 2014 21:22:48 +0200 Subject: [PATCH] login: add 'mir' to the list of session types
Add Mir to the list of session types. This is implemented for LightDM
in lp:~robert-ancell/lightdm/xdg-session-desktop [1].
[1] https://code.launchpad.net/~robert-ancell/lightdm/xdg-session-desktop/+merge...
(david: adjusted commit-header and fixed whitespace issues)
---
man/pam_systemd.xml | 5 +++--
man/sd_session_is_active.xml | 6 +++---
src/login/logind-session.c | 1 +
src/login/logind-session.h | 1 +
src/systemd/sd-login.h | 2 +-
5 files changed, 9 insertions(+), 6 deletions(-)
diff --git man/pam_systemd.xml man/pam_systemd.xml
index 3022cdb..f973899 100644
--- man/pam_systemd.xml
+++ man/pam_systemd.xml
@@ -145,8 +145,9 @@
variable takes precedence. One of
<literal>unspecified</literal>,
<literal>tty</literal>,
- <literal>x11</literal> or
- <literal>wayland</literal>. See
+ <literal>x11</literal>,
+ <literal>wayland</literal> or
+ <literal>mir</literal>. See
<citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for details about the session type.</para></listitem>
</varlistentry>
diff --git man/sd_session_is_active.xml man/sd_session_is_active.xml
index ddb2bee..31a6119 100644
--- man/sd_session_is_active.xml
+++ man/sd_session_is_active.xml
@@ -201,9 +201,9 @@
be used to determine the type of the session
identified by the specified session identifier. The
returned string is one of <literal>x11</literal>,
- <literal>wayland</literal>, <literal>tty</literal> or
- <literal>unspecified</literal> and needs to be freed
- with the libc
+ <literal>wayland</literal>, <literal>tty</literal>,
+ <literal>mir</literal> or <literal>unspecified</literal> and
+ needs to be freed with the libc
<citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use.</para>
--- src/login/logind-session.c
+++ src/login/logind-session.c 2014-05-20 12:49:07.150236121 +0000
@@ -1124,6 +1124,7 @@ static const char* const session_type_ta
[SESSION_TTY] = "tty",
[SESSION_X11] = "x11",
[SESSION_WAYLAND] = "wayland",
+ [SESSION_MIR] = "mir",
[SESSION_UNSPECIFIED] = "unspecified",
};
diff --git src/login/logind-session.h src/login/logind-session.h
index c9af5eb..7ecc9f0 100644
--- src/login/logind-session.h
+++ src/login/logind-session.h
@@ -55,6 +55,7 @@ typedef enum SessionType {
SESSION_TTY,
SESSION_X11,
SESSION_WAYLAND,
+ SESSION_MIR,
_SESSION_TYPE_MAX,
_SESSION_TYPE_INVALID = -1
} SessionType;
diff --git src/systemd/sd-login.h src/systemd/sd-login.h
index a4ca231..776733a 100644
--- src/systemd/sd-login.h
+++ src/systemd/sd-login.h
@@ -138,7 +138,7 @@ int sd_session_get_seat(const char *session, char **seat);
/* Determine the (PAM) service name this session was registered by. */
int sd_session_get_service(const char *session, char **service);
-/* Determine the type of this session, i.e. one of "tty", "x11" or "unspecified". */
+/* Determine the type of this session, i.e. one of "tty", "x11", "wayland", "mir" or "unspecified". */
int sd_session_get_type(const char *session, char **type);
/* Determine the class of this session, i.e. one of "user", "greeter" or "lock-screen". */
--
1.7.9.2
++++++ 0006-login-share-VT-signal-handler-between-sessions.patch ++++++
Based on 92683ad2e28c79891e4123d9a421b018dc58870c Mon Sep 17 00:00:00 2001
From: David Herrmann
From 33169701b0640d3629d4c36cf8c71dc26d2cb7e1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 16 May 2014 01:33:22 +0200 Subject: [PATCH] man: clarify that the ExecReload= command should be synchronous
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019054.html --- man/systemd.service.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git man/systemd.service.xml man/systemd.service.xml index af32ccb..364ad7d 100644 --- man/systemd.service.xml +++ man/systemd.service.xml @@ -519,6 +519,20 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting> following:</para> <programlisting>/bin/kill -HUP $MAINPID</programlisting> + + <para>Note however that reloading a + daemon by sending a signal (as with + the example line above) is usually not + a good choice, because this is an + asynchronous operation and hence not + suitable to order reloads of multiple + services against each other. It is + strongly recommended to set + <varname>ExecReload=</varname> to a + command that no only triggers a + configuration reload of the daemon, + but also synchronously waits for it + complete.</para> </listitem> </varlistentry> -- 1.7.9.2 ++++++ 0006-parse_boolean-require-exact-matches.patch ++++++
From 0f625d0b87139fc18cd565c9b6da05c53a0eb7ab Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt
Date: Sun, 27 Jul 2014 15:19:00 +0200 Subject: [PATCH] parse_boolean: require exact matches
Require exact matches in all cases instead of treating strings starting with 't' ('f') as true (false). This is required for config_parse_protect_system to parse ProtectSystem=full correctly: it uses parse_boolean and only tries a more specific parsing function if that did not return a valid result. Thus "full" was treated as "false" before. --- src/shared/util.c | 4 ++-- src/test/test-util.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git src/shared/util.c src/shared/util.c index 4fda31c..49c17ef 100644 --- src/shared/util.c +++ src/shared/util.c @@ -231,9 +231,9 @@ int unlink_noerrno(const char *path) { int parse_boolean(const char *v) { assert(v); - if (streq(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || strcaseeq(v, "on")) + if (streq(v, "1") || strcaseeq(v, "yes") || strcaseeq(v, "y") || strcaseeq(v, "true") || strcaseeq(v, "t") || strcaseeq(v, "on")) return 1; - else if (streq(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || strcaseeq(v, "off")) + else if (streq(v, "0") || strcaseeq(v, "no") || strcaseeq(v, "n") || strcaseeq(v, "false") || strcaseeq(v, "f") || strcaseeq(v, "off")) return 0; return -EINVAL; diff --git src/test/test-util.c src/test/test-util.c index ed91a67..9a28ef9 100644 --- src/test/test-util.c +++ src/test/test-util.c @@ -129,6 +129,7 @@ static void test_parse_boolean(void) { assert_se(parse_boolean("garbage") < 0); assert_se(parse_boolean("") < 0); + assert_se(parse_boolean("full") < 0); } static void test_parse_pid(void) { -- 1.7.9.2 ++++++ 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch ++++++
From ebc54302d7fc70927d5dc119e178ff03f6a911ed Mon Sep 17 00:00:00 2001 From: Peter Rajnoha
Date: Mon, 10 Mar 2014 22:58:14 +0100 Subject: [PATCH] rules: mark loop device as SYSTEMD_READY=0 if no file is attached
Check existence of loop/backing_file in sysfs and mark loop devices with SYSTEMD_READY if missing. Such loop files is uninitialized and it's not ready for use yet (there's no file attached). --- rules/99-systemd.rules.in | 3 +++ 1 file changed, 3 insertions(+) diff --git rules/99-systemd.rules.in rules/99-systemd.rules.in index 021359a..04a59c4 100644 --- rules/99-systemd.rules.in +++ rules/99-systemd.rules.in @@ -22,6 +22,9 @@ SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_T SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0" SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0" +# Ignore loop devices that don't have any file attached +SUBSYSTEM=="block", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0" + # Ignore nbd devices in the "add" event, with "change" the nbd is ready ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0" -- 1.7.9.2 ++++++ 0006-sd-event-initialization-perturbation-value-right-bef.patch ++++++
From 52444dc478fe38b5b69a771923ab429a41927aa5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 24 Mar 2014 23:54:21 +0100 Subject: [PATCH] sd-event: initialization perturbation value right before we use it
That way, we don't forget to initialize it when the watchdog is initialized before all event sources. --- src/libsystemd/sd-event/sd-event.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) --- src/libsystemd/sd-event/sd-event.c +++ src/libsystemd/sd-event/sd-event.c 2014-03-28 12:44:05.652327044 +0000 @@ -648,13 +648,31 @@ _public_ int sd_event_add_io( return 0; } +static void initialize_perturb(sd_event *e) { + sd_id128_t bootid = {}; + + /* When we sleep for longer, we try to realign the wakeup to + the same time wihtin each minute/second/250ms, so that + events all across the system can be coalesced into a single + CPU wakeup. However, let's take some system-specific + randomness for this value, so that in a network of systems + with synced clocks timer events are distributed a + bit. Here, we calculate a perturbation usec offset from the + boot ID. */ + + if (_likely_(e->perturb != (usec_t) -1)) + return; + + if (sd_id128_get_boot(&bootid) >= 0) + e->perturb = (bootid.qwords[0] ^ bootid.qwords[1]) % USEC_PER_MINUTE; +} + static int event_setup_timer_fd( sd_event *e, EventSourceType type, int *timer_fd, clockid_t id) { - sd_id128_t bootid = {}; struct epoll_event ev = {}; int r, fd; @@ -677,18 +695,6 @@ static int event_setup_timer_fd( return -errno; } - /* When we sleep for longer, we try to realign the wakeup to - the same time wihtin each minute/second/250ms, so that - events all across the system can be coalesced into a single - CPU wakeup. However, let's take some system-specific - randomness for this value, so that in a network of systems - with synced clocks timer events are distributed a - bit. Here, we calculate a perturbation usec offset from the - boot ID. */ - - if (sd_id128_get_boot(&bootid) >= 0) - e->perturb = (bootid.qwords[0] ^ bootid.qwords[1]) % USEC_PER_MINUTE; - *timer_fd = fd; return 0; } @@ -1506,6 +1512,8 @@ static usec_t sleep_between(sd_event *e, if (b <= a + 1) return a; + initialize_perturb(e); + /* Find a good time to wake up again between times a and b. We have two goals here: ++++++ 0006-shared-sparse-endian.h-add-missing-byteswap.h-includ.patch ++++++
From 8e8af4cfc7fa373504a22e58966909161acfb72f Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing
Date: Thu, 18 Sep 2014 15:24:43 +0200 Subject: [PATCH] shared/sparse-endian.h: add missing byteswap.h include
---
src/shared/sparse-endian.h | 1 +
1 file changed, 1 insertion(+)
diff --git src/shared/sparse-endian.h src/shared/sparse-endian.h
index eb4dbf3..c913fda 100644
--- src/shared/sparse-endian.h
+++ src/shared/sparse-endian.h
@@ -21,6 +21,7 @@
#ifndef SPARSE_ENDIAN_H
#define SPARSE_ENDIAN_H
+#include
From 48a2900c6612052149a1d0dd88aeacb99b49ce4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?=
Date: Wed, 17 Sep 2014 21:56:25 -0300 Subject: [PATCH] systemctl: fix resource leak CID #1237747
..by simply moving the declaration of "unit" into the STRV_FOREACH
loop as suggested by Andreas.
---
src/systemctl/systemctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c
index 88be871..9012128 100644
--- src/systemctl/systemctl.c
+++ src/systemctl/systemctl.c
@@ -4449,7 +4449,6 @@ static int show(sd_bus *bus, char **args) {
}
static int cat(sd_bus *bus, char **args) {
- _cleanup_free_ char *unit = NULL;
_cleanup_strv_free_ char **names = NULL;
char **name;
bool first = true;
@@ -4468,6 +4467,8 @@ static int cat(sd_bus *bus, char **args) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_strv_free_ char **dropin_paths = NULL;
_cleanup_free_ char *fragment_path = NULL;
+ _cleanup_free_ char *unit = NULL;
+
char **path;
unit = unit_dbus_path_from_name(*name);
--
1.7.9.2
++++++ 0006-systemctl-show-StatusErrno-value-in-systemctl-status.patch ++++++
Based on b4af5a803aa71a57733ca46fef29b7afb20a626c Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 267b3e41df5a2181f2911433539f81de2fa1511a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?=
Date: Thu, 29 May 2014 14:17:37 -0400 Subject: [PATCH] tty-ask-password-agent: Do tell what directory we failed to open
--- .../tty-ask-password-agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c index 3203474..55a2215 100644 --- src/tty-ask-password-agent/tty-ask-password-agent.c +++ src/tty-ask-password-agent/tty-ask-password-agent.c @@ -501,7 +501,7 @@ static int show_passwords(void) { if (errno == ENOENT) return 0; - log_error("opendir(): %m"); + log_error("opendir(/run/systemd/ask-password): %m"); return -errno; } -- 1.7.9.2 ++++++ 0007-README-document-that-var-run-must-be-a-symlink-run.patch ++++++
From 47bc23c18cbc87471dc832534c8565625e4a9d16 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 26 Feb 2014 02:54:37 +0100 Subject: [PATCH] =?UTF-8?q?README:=20document=20that=20/var/run=20must=20be=20?= =?UTF-8?q?a=20symlink=20=E2=86=92=20/run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
---
README | 3 +++
1 file changed, 3 insertions(+)
diff --git README README
index b918132..7a227e7 100644
--- README
+++ README
@@ -190,6 +190,9 @@ WARNINGS:
about this, since this kind of file system setup is not really
supported anymore by the basic set of Linux OS components.
+ systemd requires that the /run mount point exists. systemd also
+ requires that /var/run is a a symlink → /run.
+
For more information on this issue consult
http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
--
1.7.9.2
++++++ 0007-core-fix-a-potential-mem-leak.patch ++++++
Based on 4d5e13a125cf8d77d432225ab69826caa1d1cf59 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen
From fe7f06f142cf42928e419d8578afd75bf1439672 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 11 Mar 2014 04:10:19 +0100 Subject: [PATCH] dbus: suppress duplicate and misleading messages
When we try to send a signal on a connection we didn't hae the time to process the Disconnected message yet, don't generate multiple warning messages, but only a single debug message. https://bugs.freedesktop.org/show_bug.cgi?id=75874 --- src/core/dbus-manager.c | 7 +++++-- src/core/dbus-unit.c | 12 ++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git src/core/dbus-manager.c src/core/dbus-manager.c index 34ef1f5..30f28b6 100644 --- src/core/dbus-manager.c +++ src/core/dbus-manager.c @@ -1357,8 +1357,11 @@ static int reply_unit_file_changes_and_f unsigned i; int r; - if (n_changes > 0) - bus_manager_foreach_client(m, send_unit_files_changed, NULL); + if (n_changes > 0) { + r = bus_manager_foreach_client(m, send_unit_files_changed, NULL); + if (r < 0) + log_debug("Failed to send UnitFilesChanged signal: %s", strerror(-r)); + } r = sd_bus_message_new_method_return(message, &reply); if (r < 0) diff --git src/core/dbus-unit.c src/core/dbus-unit.c index 515ac8b..07e7f20 100644 --- src/core/dbus-unit.c +++ src/core/dbus-unit.c @@ -638,21 +638,13 @@ static int send_changed_signal(sd_bus *bus, void *userdata) { bus, p, UNIT_VTABLE(u)->bus_interface, NULL); - if (r < 0) { - log_warning("Failed to send out specific PropertiesChanged signal for %s: %s", u->id, strerror(-r)); + if (r < 0) return r; - } - r = sd_bus_emit_properties_changed_strv( + return sd_bus_emit_properties_changed_strv( bus, p, "org.freedesktop.systemd1.Unit", NULL); - if (r < 0) { - log_warning("Failed to send out generic PropertiesChanged signal for %s: %s", u->id, strerror(-r)); - return r; - } - - return 0; } void bus_unit_send_change_signal(Unit *u) { -- 1.7.9.2 --- src/core/dbus-manager.c +++ src/core/dbus-manager.c 2014-03-11 11:05:44.350235568 +0000 ++++++ 0007-drop_duplicates-copy-full-BindMount-struct.patch ++++++
From e2d7c1a0758ce80d7cb439745deefefdffd67655 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt
Date: Sun, 27 Jul 2014 16:32:13 +0200 Subject: [PATCH] drop_duplicates: copy full BindMount struct
At least t->ignore = f->ignore; is missing here. Just copy the full struct to be sure. --- src/core/namespace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git src/core/namespace.c src/core/namespace.c index 5466b7b..fe95377 100644 --- src/core/namespace.c +++ src/core/namespace.c @@ -124,8 +124,7 @@ static void drop_duplicates(BindMount *m, unsigned *n) { if (previous && path_equal(f->path, previous->path)) continue; - t->path = f->path; - t->mode = f->mode; + *t = *f; previous = t; -- 1.7.9.2 ++++++ 0007-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From 063e36db8aed7b54100b33089deb6d2e86d516b9 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Thu, 3 Jul 2014 16:13:48 +0200 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index 377748a..9f3136a 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -1045,7 +1045,31 @@ bluetooth:v0159* ID_VENDOR_FROM_DATABASE=ChefSteps, Inc. bluetooth:v015A* - ID_VENDOR_FROM_DATABASE=micus AG + ID_VENDOR_FROM_DATABASE=micas AG bluetooth:v015B* ID_VENDOR_FROM_DATABASE=Biomedical Research Ltd. + +bluetooth:v015C* + ID_VENDOR_FROM_DATABASE=Pitius Tec S.L. + +bluetooth:v015D* + ID_VENDOR_FROM_DATABASE=Estimote, Inc. + +bluetooth:v015E* + ID_VENDOR_FROM_DATABASE=Unikey Technologies, Inc. + +bluetooth:v015F* + ID_VENDOR_FROM_DATABASE=Timer Cap Co. + +bluetooth:v0160* + ID_VENDOR_FROM_DATABASE=AwoX + +bluetooth:v0161* + ID_VENDOR_FROM_DATABASE=yikes + +bluetooth:v0162* + ID_VENDOR_FROM_DATABASE=MADSGlobal NZ Ltd. + +bluetooth:v0163* + ID_VENDOR_FROM_DATABASE=PCH International -- 1.7.9.2 ++++++ 0007-hwdb-update.patch ++++++ ++++ 1910 lines (skipped) ++++++ 0007-journal-forget-file-after-encountering-an-error.patch ++++++
From a9a245c128af6c0418085062c60251bc51fa4a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Thu, 27 Feb 2014 00:11:54 -0500 Subject: [PATCH] journal: forget file after encountering an error
If we encounter an inconsistency in a file, let's just ignore it. Otherwise, after previous patch, we would try, and fail, to use this file in every invocation of sd_journal_next or sd_journal_previous that happens afterwards. --- src/journal/sd-journal.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git src/journal/sd-journal.c src/journal/sd-journal.c index ef455e9..b54bc21 100644 --- src/journal/sd-journal.c +++ src/journal/sd-journal.c @@ -51,6 +51,8 @@ #define DEFAULT_DATA_THRESHOLD (64*1024) +static void remove_file_real(sd_journal *j, JournalFile *f); + static bool journal_pid_changed(sd_journal *j) { assert(j); @@ -885,6 +887,7 @@ static int real_journal_next(sd_journal *j, direction_t direction) { r = next_beyond_location(j, f, direction, &o, &p); if (r < 0) { log_debug("Can't iterate through %s, ignoring: %s", f->path, strerror(-r)); + remove_file_real(j, f); continue; } else if (r == 0) continue; @@ -1339,7 +1342,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) { } static int remove_file(sd_journal *j, const char *prefix, const char *filename) { - char *path; + _cleanup_free_ char *path; JournalFile *f; assert(j); @@ -1351,10 +1354,17 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename) return -ENOMEM; f = hashmap_get(j->files, path); - free(path); if (!f) return 0; + remove_file_real(j, f); + return 0; +} + +static void remove_file_real(sd_journal *j, JournalFile *f) { + assert(j); + assert(f); + hashmap_remove(j->files, f->path); log_debug("File %s removed.", f->path); @@ -1372,8 +1382,6 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename) journal_file_close(f); j->current_invalidate_counter ++; - - return 0; } static int add_directory(sd_journal *j, const char *prefix, const char *dirname) { -- 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
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-journald-also-increase-the-SendBuffer-of-dev-log-to-.patch ++++++
Based on 5e8b767df6e18444d5aff2987b5e5603361ed528 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
From 9e3dbf6b2b99d0e16989d9cedb458729db5a60c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Sun, 1 Jun 2014 14:01:23 -0400 Subject: [PATCH] keyboard: add Plantronics .Audio mute button
https://bugs.freedesktop.org/show_bug.cgi?id=79495 --- hwdb/60-keyboard.hwdb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git hwdb/60-keyboard.hwdb hwdb/60-keyboard.hwdb index 05e6a04..d053766 100644 --- hwdb/60-keyboard.hwdb +++ hwdb/60-keyboard.hwdb @@ -866,6 +866,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr* KEYBOARD_KEY_f3=volumeup ########################################################### +# Plantronics +########################################################### + +# Plantronics .Audio 626 DSP +keyboard:usb:v047fpC006* + KEYBOARD_KEY_b002f=f20 # Microphone mute button; should be micmute + +########################################################### # Quanta ########################################################### -- 1.7.9.2 ++++++ 0007-libudev-monitor-warn-if-we-fail-to-request-SO_PASSCR.patch ++++++
From 9dedfe7f667a8cb22ba85d0223556c69c4fd0e9a Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 09:20:46 +0200 Subject: [PATCH] libudev: monitor - warn if we fail to request SO_PASSCRED
The function still succeeds, so there is no functional change. This fixes CID #996288. --- src/libudev/libudev-monitor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c index 186e5e1..59698b8 100644 --- src/libudev/libudev-monitor.c +++ src/libudev/libudev-monitor.c @@ -412,7 +412,10 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) } /* enable receiving of sender credentials */ - setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); + err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); + if (err < 0) + udev_err(udev_monitor->udev, "setting SO_PASSCRED failed: %m\n"); + return 0; } -- 1.7.9.2 ++++++ 0007-logind-fix-Display-property-of-user-objects.patch ++++++
From 952d32609f9bceee444fa2690afb4d28539b4b92 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 19 May 2014 09:03:20 +0900 Subject: [PATCH] logind: fix Display property of user objects
When we dropped support for creating a per-user to the "main" X11 display we stopped returning useful data in the "Display" user property. With this change this is fixed and we again expose an appropriate (graphical session) in the property that is useful as the "main" one, if one is needed. --- src/login/logind-session.c | 8 ++++++-- src/login/logind-session.h | 2 ++ src/login/logind-user-dbus.c | 2 +- src/login/logind-user.c | 37 +++++++++++++++++++++++++++++++++++++ src/login/logind-user.h | 1 + 5 files changed, 47 insertions(+), 3 deletions(-) diff --git src/login/logind-session.c src/login/logind-session.c index 4fb229e..9a54101 100644 --- src/login/logind-session.c +++ src/login/logind-session.c @@ -545,6 +545,8 @@ int session_start(Session *s) { s->started = true; + user_elect_display(s->user); + /* Save data */ session_save(s); user_save(s->user); @@ -553,7 +555,7 @@ int session_start(Session *s) { /* Send signals */ session_send_signal(s, true); - user_send_changed(s->user, "Sessions", NULL); + user_send_changed(s->user, "Sessions", "Display", NULL); if (s->seat) { if (s->seat->active == s) seat_send_changed(s->seat, "Sessions", "ActiveSession", NULL); @@ -612,6 +614,8 @@ int session_stop(Session *s, bool force) { s->stopping = true; + user_elect_display(s->user); + session_save(s); user_save(s->user); @@ -660,7 +664,7 @@ int session_finalize(Session *s) { } user_save(s->user); - user_send_changed(s->user, "Sessions", NULL); + user_send_changed(s->user, "Sessions", "Display", NULL); return r; } diff --git src/login/logind-session.h src/login/logind-session.h index f78f309..81957df 100644 --- src/login/logind-session.h +++ src/login/logind-session.h @@ -60,6 +60,8 @@ typedef enum SessionType { _SESSION_TYPE_INVALID = -1 } SessionType; +#define SESSION_TYPE_IS_GRAPHICAL(type) IN_SET(type, SESSION_X11, SESSION_WAYLAND, SESSION_MIR) + enum KillWho { KILL_LEADER, KILL_ALL, diff --git src/login/logind-user-dbus.c src/login/logind-user-dbus.c index 6266ccb..51793f6 100644 --- src/login/logind-user-dbus.c +++ src/login/logind-user-dbus.c @@ -220,7 +220,7 @@ const sd_bus_vtable user_vtable[] = { SD_BUS_PROPERTY("RuntimePath", "s", NULL, offsetof(User, runtime_path), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Service", "s", NULL, offsetof(User, service), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Slice", "s", NULL, offsetof(User, slice), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_PROPERTY("Display", "(so)", property_get_display, 0, SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("Display", "(so)", property_get_display, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("State", "s", property_get_state, 0, 0), SD_BUS_PROPERTY("Sessions", "a(so)", property_get_sessions, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("IdleHint", "b", property_get_idle_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), diff --git src/login/logind-user.c src/login/logind-user.c index 5fffa65..fdbccb3 100644 --- src/login/logind-user.c +++ src/login/logind-user.c @@ -713,6 +713,43 @@ int user_kill(User *u, int signo) { return manager_kill_unit(u->manager, u->slice, KILL_ALL, signo, NULL); } +void user_elect_display(User *u) { + Session *graphical = NULL, *text = NULL, *s; + + assert(u); + + /* This elects a primary session for each user, which we call + * the "display". We try to keep the assignment stable, but we + * "upgrade" to better choices. */ + + LIST_FOREACH(sessions_by_user, s, u->sessions) { + + if (s->class != SESSION_USER) + continue; + + if (s->stopping) + continue; + + if (SESSION_TYPE_IS_GRAPHICAL(s->type)) + graphical = s; + else + text = s; + } + + if (graphical && + (!u->display || + u->display->class != SESSION_USER || + u->display->stopping || + !SESSION_TYPE_IS_GRAPHICAL(u->display->type))) + u->display = graphical; + + if (text && + (!u->display || + u->display->class != SESSION_USER || + u->display->stopping)) + u->display = text; +} + static const char* const user_state_table[_USER_STATE_MAX] = { [USER_OFFLINE] = "offline", [USER_OPENING] = "opening", diff --git src/login/logind-user.h src/login/logind-user.h index f237d2a..4e0568f 100644 --- src/login/logind-user.h +++ src/login/logind-user.h @@ -80,6 +80,7 @@ int user_save(User *u); int user_load(User *u); int user_kill(User *u, int signo); int user_check_linger_file(User *u); +void user_elect_display(User *u); extern const sd_bus_vtable user_vtable[]; int user_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error); -- 1.7.9.2 ++++++ 0007-man-readahead-fix-cmdline-switch-inconsistency-betwe.patch ++++++
From 332bc31992acffc6f32e194c0122e01607bd0e27 Mon Sep 17 00:00:00 2001 From: Alison Chaiken
Date: Fri, 16 May 2014 09:25:53 +0200 Subject: [PATCH] man: readahead: fix cmdline switch inconsistency between readahead.c and docs
Source code has "files-max" and XML has --max-files. --- man/systemd-readahead-replay.service.xml | 2 +- src/readahead/readahead.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git man/systemd-readahead-replay.service.xml man/systemd-readahead-replay.service.xml index 67b41f5..669fe78 100644 --- man/systemd-readahead-replay.service.xml +++ man/systemd-readahead-replay.service.xml @@ -117,7 +117,7 @@ <variablelist> <varlistentry> - <term><option>--max-files=</option></term> + <term><option>--files-max=</option></term> <listitem><para>Maximum number of files to read ahead. Only valid diff --git src/readahead/readahead.c src/readahead/readahead.c index d6729ec..73cf538 100644 --- src/readahead/readahead.c +++ src/readahead/readahead.c @@ -42,7 +42,7 @@ static int help(void) { "Collect read-ahead data on early boot.\n\n" " -h --help Show this help\n" " --version Show package version\n" - " --max-files=INT Maximum number of files to read ahead\n" + " --files-max=INT Maximum number of files to read ahead\n" " --file-size-max=BYTES Maximum size of files to read ahead\n" " --timeout=USEC Maximum time to spend collecting data\n\n\n", program_invocation_short_name); -- 1.7.9.2 ++++++ 0007-networkd-fix-typo.patch ++++++
From eed0eee85ac34abd81cd9e81fdb6a19f47b6c8a3 Mon Sep 17 00:00:00 2001 From: Michael Olbrich
Date: Fri, 14 Mar 2014 18:19:29 +0100 Subject: [PATCH] networkd: fix typo
It's HAVE_SPLIT_USR not HAVE_SPLIT_USER --- src/network/networkd-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/network/networkd-manager.c src/network/networkd-manager.c index c730e71..ea414b1 100644 --- src/network/networkd-manager.c +++ src/network/networkd-manager.c @@ -33,7 +33,7 @@ const char* const network_dirs[] = { "/etc/systemd/network", "/run/systemd/network", "/usr/lib/systemd/network", -#ifdef HAVE_SPLIT_USER +#ifdef HAVE_SPLIT_USR "/lib/systemd/network", #endif NULL}; -- 1.7.9.2 ++++++ 0007-po-add-German-translation.patch ++++++
From 351e57652a7d9a51f9064c089794d13801eaee73 Mon Sep 17 00:00:00 2001 From: Benjamin Steinwender Date: Sun, 8 Jun 2014 18:39:50 +0200 Subject: [PATCH] po: add German translation
https://bugs.freedesktop.org/show_bug.cgi?id=79430
---
po/LINGUAS | 1 +
po/de.po | 418 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 419 insertions(+)
create mode 100644 po/de.po
diff --git po/LINGUAS po/LINGUAS
index 820ca82..2cb0f30 100644
--- po/LINGUAS
+++ po/LINGUAS
@@ -1,3 +1,4 @@
+de
el
fr
it
diff --git po/de.po po/de.po
new file mode 100644
index 0000000..a41e33d
--- /dev/null
+++ po/de.po
@@ -0,0 +1,418 @@
+# German translation for systemd.
+# Copyright (C) 2014 systemd's COPYRIGHT HOLDER
+# This file is distributed under the same license as the systemd package.
+# Christian Kirbach
From 75145780813957ecbe6835f2c8bc20113a3605d2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 25 Mar 2014 00:01:51 +0100 Subject: [PATCH] sd-event: don't accidentally turn of watchdog timer event if we determine 0
--- src/libsystemd/sd-event/sd-event.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/libsystemd/sd-event/sd-event.c src/libsystemd/sd-event/sd-event.c index d6a3d1c..4aabec1 100644 --- src/libsystemd/sd-event/sd-event.c +++ src/libsystemd/sd-event/sd-event.c @@ -2087,6 +2087,11 @@ static int arm_watchdog(sd_event *e) { timespec_store(&its.it_value, t); + /* Make sure we never set the watchdog to 0, which tells the + * kernel to disable it. */ + if (its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0) + its.it_value.tv_nsec = 1; + r = timerfd_settime(e->watchdog_fd, TFD_TIMER_ABSTIME, &its, NULL); if (r < 0) return -errno; -- 1.7.9.2 ++++++ 0007-service-flush-status-text-and-errno-values-each-time.patch ++++++
From 8cfdb077b8e3da1c47fc1d735d051f21f33144c1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 7 Jul 2014 17:33:46 +0200 Subject: [PATCH] service: flush status text and errno values each time a service is started
We shouldn't show status texts from previous service starts --- src/core/service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git src/core/service.c src/core/service.c index d5aff99..0f542ed 100644 --- src/core/service.c +++ src/core/service.c @@ -1699,6 +1699,10 @@ static int service_start(Unit *u) { s->main_pid_alien = false; s->forbid_restart = false; + free(s->status_text); + s->status_text = NULL; + s->status_errno = 0; + service_enter_start_pre(s); return 0; } -- 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?=
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 ++++++ 0007-units-skip-mounting-tmp-if-it-is-a-symlink.patch ++++++
From 8ebf02d6f382ce1ac7e0d44a713b8795a07b08cd Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 30 Jun 2014 21:44:05 +0200 Subject: [PATCH] units: skip mounting /tmp if it is a symlink
We shouldn't get confused if people have symlinked /tmp somewhere, so let's simply skip the mount then. --- units/tmp.mount | 1 + 1 file changed, 1 insertion(+) diff --git units/tmp.mount units/tmp.mount index 99a3ba3..00a0d28 100644 --- units/tmp.mount +++ units/tmp.mount @@ -9,6 +9,7 @@ Description=Temporary Directory Documentation=man:hier(7) Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems +ConditionPathIsSymbolicLink=!/tmp DefaultDependencies=no Conflicts=umount.target Before=local-fs.target umount.target -- 1.7.9.2 ++++++ 0008-Reset-signal-mask-on-re-exec-to-init.patch ++++++
From 5a85ca1cb622fda4a39c8a6f00dccea7f8a1e82a Mon Sep 17 00:00:00 2001 From: Ruediger Oertel
Date: Fri, 13 Jun 2014 16:41:06 +0200 Subject: [PATCH] Reset signal-mask on re-exec to init=..
Process 1 (aka init) needs to be started with an empty signal mask. That includes the process 1 that's started after the initrd is finished. When the initrd is using systemd (as it does with dracut based initrds) then it is systemd that calls the real init. Normally this is systemd again, except when the user uses for instance "init=/bin/bash" on the kernel command line. --- src/core/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git src/core/main.c src/core/main.c index 3aac5d1..3e57f07 100644 --- src/core/main.c +++ src/core/main.c @@ -1843,6 +1843,7 @@ finish: if (reexecute) { const char **args; unsigned i, args_size; + sigset_t ss, o_ss; /* Close and disarm the watchdog, so that the new * instance can reinitialize it, but doesn't get @@ -1926,6 +1927,11 @@ finish: args[i++] = NULL; assert(i <= args_size); + /* reenable any blocked signals, especially important + * if we switch from initial ramdisk to init=... */ + sigemptyset(&ss); + sigprocmask(SIG_SETMASK, &ss, &o_ss); + if (switch_root_init) { args[0] = switch_root_init; execv(args[0], (char* const*) args); @@ -1944,6 +1950,8 @@ finish: log_error("Failed to execute /bin/sh, giving up: %m"); } else log_warning("Failed to execute /sbin/init, giving up: %m"); + + sigprocmask(SIG_SETMASK, &o_ss, NULL); } if (arg_serialization) { -- 1.7.9.2 ++++++ 0008-Use-var-run-dbus-system_bus_socket-for-the-D-Bus-soc.patch ++++++
From 1ae383a8a3ae4824453e297352fda603d2d3fd5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Tue, 25 Feb 2014 21:26:31 -0500 Subject: [PATCH] Use /var/run/dbus/system_bus_socket for the D-Bus socket
--- man/systemd-bus-proxyd@.service.xml | 2 +- src/shared/def.h | 2 +- units/systemd-bus-proxyd.socket | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git man/systemd-bus-proxyd@.service.xml man/systemd-bus-proxyd@.service.xml index 75a3c8b..3a5930d 100644 --- man/systemd-bus-proxyd@.service.xml +++ man/systemd-bus-proxyd@.service.xml @@ -59,7 +59,7 @@ along with systemd; If not, see http://www.gnu.org/licenses/. <para><filename>systemd-bus-proxyd.socket</filename> will launch <filename>systemd-bus-proxyd@.service</filename> for connections to the classic D-Bus socket in - <filename>/run/dbus/system_bus_socket</filename>.</para> + <filename>/var/run/dbus/system_bus_socket</filename>.</para> <para><filename>systemd-bus-proxyd@.service</filename> is launched for an existing D-Bus connection and will use diff --git src/shared/def.h src/shared/def.h index 7777756..aa489d8 100644 --- src/shared/def.h +++ src/shared/def.h @@ -61,7 +61,7 @@ "/usr/lib/kbd/keymaps/\0" #endif -#define UNIX_SYSTEM_BUS_PATH "unix:path=/run/dbus/system_bus_socket" +#define UNIX_SYSTEM_BUS_PATH "unix:path=/var/run/dbus/system_bus_socket" #define KERNEL_SYSTEM_BUS_PATH "kernel:path=/dev/kdbus/0-system/bus" #ifdef ENABLE_KDBUS diff --git units/systemd-bus-proxyd.socket units/systemd-bus-proxyd.socket index 406e15b..6c42d38 100644 --- units/systemd-bus-proxyd.socket +++ units/systemd-bus-proxyd.socket @@ -9,5 +9,5 @@ Description=Legacy D-Bus Protocol Compatibility Socket [Socket] -ListenStream=/run/dbus/system_bus_socket +ListenStream=/var/run/dbus/system_bus_socket Accept=yes -- 1.7.9.2 ++++++ 0008-core-correctly-unregister-PIDs-from-PID-hashtables.patch ++++++
From bd44e61b0480712ec5585ff7b0295362a5f9dd36 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 6 Mar 2014 02:19:42 +0100 Subject: [PATCH] core: correctly unregister PIDs from PID hashtables
--- src/core/unit.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git src/core/unit.c src/core/unit.c index 2437ee3..85250ca 100644 --- src/core/unit.c +++ src/core/unit.c @@ -1704,11 +1704,11 @@ int unit_watch_pid(Unit *u, pid_t pid) { /* Watch a specific PID. We only support one or two units * watching each PID for now, not more. */ - r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func); + r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func); if (r < 0) return r; - r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func); + r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func); if (r < 0) return r; @@ -1737,7 +1737,17 @@ void unit_unwatch_pid(Unit *u, pid_t pid) { set_remove(u->pids, LONG_TO_PTR(pid)); } -static int watch_pids_in_path(Unit *u, const char *path) { +void unit_unwatch_all_pids(Unit *u) { + assert(u); + + while (!set_isempty(u->pids)) + unit_unwatch_pid(u, PTR_TO_LONG(set_first(u->pids))); + + set_free(u->pids); + u->pids = NULL; +} + +static int unit_watch_pids_in_path(Unit *u, const char *path) { _cleanup_closedir_ DIR *d = NULL; _cleanup_fclose_ FILE *f = NULL; int ret = 0, r; @@ -1775,7 +1785,7 @@ static int watch_pids_in_path(Unit *u, const char *path) { if (!p) return -ENOMEM; - r = watch_pids_in_path(u, p); + r = unit_watch_pids_in_path(u, p); if (r < 0 && ret >= 0) ret = r; } @@ -1788,31 +1798,15 @@ static int watch_pids_in_path(Unit *u, const char *path) { return ret; } - int unit_watch_all_pids(Unit *u) { assert(u); - if (!u->cgroup_path) - return -ENOENT; - /* Adds all PIDs from our cgroup to the set of PIDs we watch */ - return watch_pids_in_path(u, u->cgroup_path); -} - -void unit_unwatch_all_pids(Unit *u) { - Iterator i; - void *e; - - assert(u); - - SET_FOREACH(e, u->pids, i) { - hashmap_remove_value(u->manager->watch_pids1, e, u); - hashmap_remove_value(u->manager->watch_pids2, e, u); - } + if (!u->cgroup_path) + return -ENOENT; - set_free(u->pids); - u->pids = NULL; + return unit_watch_pids_in_path(u, u->cgroup_path); } void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) { @@ -1830,7 +1824,7 @@ void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) { continue; if (!pid_is_unwaited(pid)) - set_remove(u->pids, e); + unit_unwatch_pid(u, pid); } } -- 1.7.9.2 ++++++ 0008-core-smack-setup-Actually-allow-for-succesfully-load.patch ++++++
From b9289d4c6e13ec5fb67bfce69c826d93b004da6a Mon Sep 17 00:00:00 2001 From: Philippe De Swert
Date: Fri, 12 Sep 2014 16:49:48 +0300 Subject: [PATCH] core: smack-setup: Actually allow for succesfully loading CIPSO policy
The line under the last switch statement *loaded_policy = true; would never be executed. As all switch cases return 0. Thus the policy would never be marked as loaded. Found with Coverity. Fixes: CID#1237785 --- src/core/smack-setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/smack-setup.c src/core/smack-setup.c index 5f6dabf..5d8a26c 100644 --- src/core/smack-setup.c +++ src/core/smack-setup.c @@ -158,7 +158,7 @@ int smack_setup(bool *loaded_policy) { return 0; case 0: log_info("Successfully loaded Smack/CIPSO policies."); - return 0; + break; default: log_warning("Failed to load Smack/CIPSO access rules: %s, ignoring.", strerror(abs(r))); -- 1.7.9.2 ++++++ 0008-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From de68938a2cb3ab535ebd9198723a651753c1a1df Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
Date: Mon, 8 Sep 2014 05:06:18 +0200 Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
--- hwdb/20-bluetooth-vendor-product.hwdb | 77 ++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git hwdb/20-bluetooth-vendor-product.hwdb hwdb/20-bluetooth-vendor-product.hwdb index 9f3136a..14aee74 100644 --- hwdb/20-bluetooth-vendor-product.hwdb +++ hwdb/20-bluetooth-vendor-product.hwdb @@ -184,7 +184,7 @@ bluetooth:v003B* ID_VENDOR_FROM_DATABASE=Gennum Corporation bluetooth:v003C* - ID_VENDOR_FROM_DATABASE=Research In Motion + ID_VENDOR_FROM_DATABASE=BlackBerry Limited (formerly Research In Motion) bluetooth:v003D* ID_VENDOR_FROM_DATABASE=IPextreme, Inc. @@ -1073,3 +1073,78 @@ bluetooth:v0162* bluetooth:v0163* ID_VENDOR_FROM_DATABASE=PCH International + +bluetooth:v0164* + ID_VENDOR_FROM_DATABASE=Qingdao Yeelink Information Technology Co., Ltd. + +bluetooth:v0165* + ID_VENDOR_FROM_DATABASE=Milwaukee Tool (formerly Milwaukee Electric Tools) + +bluetooth:v0166* + ID_VENDOR_FROM_DATABASE=MISHIK Pte Ltd + +bluetooth:v0167* + ID_VENDOR_FROM_DATABASE=Bayer HealthCare + +bluetooth:v0168* + ID_VENDOR_FROM_DATABASE=Spicebox LLC + +bluetooth:v0169* + ID_VENDOR_FROM_DATABASE=emberlight + +bluetooth:v016A* + ID_VENDOR_FROM_DATABASE=Cooper-Atkins Corporation + +bluetooth:v016B* + ID_VENDOR_FROM_DATABASE=Qblinks + +bluetooth:v016C* + ID_VENDOR_FROM_DATABASE=MYSPHERA + +bluetooth:v016D* + ID_VENDOR_FROM_DATABASE=LifeScan Inc + +bluetooth:v016E* + ID_VENDOR_FROM_DATABASE=Volantic AB + +bluetooth:v016F* + ID_VENDOR_FROM_DATABASE=Podo Labs, Inc + +bluetooth:v0170* + ID_VENDOR_FROM_DATABASE=Roche Diabetes Care AG + +bluetooth:v0171* + ID_VENDOR_FROM_DATABASE=Amazon Fulfillment Service + +bluetooth:v0172* + ID_VENDOR_FROM_DATABASE=Connovate Technology Private Limited + +bluetooth:v0173* + ID_VENDOR_FROM_DATABASE=Kocomojo, LLC + +bluetooth:v0174* + ID_VENDOR_FROM_DATABASE=Everykey LLC + +bluetooth:v0175* + ID_VENDOR_FROM_DATABASE=Dynamic Controls + +bluetooth:v0176* + ID_VENDOR_FROM_DATABASE=SentriLock + +bluetooth:v0177* + ID_VENDOR_FROM_DATABASE=I-SYST inc. + +bluetooth:v0178* + ID_VENDOR_FROM_DATABASE=CASIO COMPUTER CO., LTD. + +bluetooth:v0179* + ID_VENDOR_FROM_DATABASE=LAPIS Semiconductor Co., Ltd. + +bluetooth:v017A* + ID_VENDOR_FROM_DATABASE=Telemonitor, Inc. + +bluetooth:v017B* + ID_VENDOR_FROM_DATABASE=taskit GmbH + +bluetooth:v017C* + ID_VENDOR_FROM_DATABASE=Daimler AG -- 1.7.9.2 ++++++ 0008-hwdb-update.patch ++++++ ++++ 1425 lines (skipped) ++++++ 0008-journald-fix-memory-leak-on-error-path.patch ++++++
From 26d8ff04914a5208d029e899682cd314b7714bf0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch ++++++
From 252094eb05c58270a0bc35b14ad30a126ddbb3bb Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 11 Mar 2014 05:23:39 +0100 Subject: [PATCH] man: multiple sleep modes are to be separated by whitespace, not commas
As pointed out by Jason A. Donenfeld. --- man/systemd-sleep.conf.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git man/systemd-sleep.conf.xml man/systemd-sleep.conf.xml index a917f4d..d0ea6d8 100644 --- man/systemd-sleep.conf.xml +++ man/systemd-sleep.conf.xml @@ -128,7 +128,7 @@ along with systemd; If not, see http://www.gnu.org/licenses/. <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. More than one value can be specified by separating - multiple values with commas. They will be tried + multiple values with whitespace. They will be tried in turn, until one is written without error. If neither succeeds, the operation will be aborted. </para></listitem> @@ -146,7 +146,7 @@ along with systemd; If not, see http://www.gnu.org/licenses/. <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. More than one value can be specified by separating - multiple values with commas. They will be tried + multiple values with whitespace. They will be tried in turn, until one is written without error. If neither succeeds, the operation will be aborted. </para></listitem> -- 1.7.9.2 ++++++ 0008-man-update-journald-rate-limit-defaults.patch ++++++
From 8f18f550e7023948f199616fdfbb0f09711fd615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?=
Date: Wed, 30 Apr 2014 19:53:13 +0300 Subject: [PATCH] man: update journald rate limit defaults
This brings the man page back into sync with the actual code. --- man/journald.conf.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git man/journald.conf.xml man/journald.conf.xml index 239a2ec..5cd09a2 100644 --- man/journald.conf.xml +++ man/journald.conf.xml @@ -190,8 +190,8 @@ limiting is applied per-service, so that two services which log do not interfere with each other's - limits. Defaults to 200 messages in - 10s. The time specification for + limits. Defaults to 1000 messages in + 30s. The time specification for <varname>RateLimitInterval=</varname> may be specified in the following units: <literal>s</literal>, -- 1.7.9.2 ++++++ 0008-mount-setup-fix-counting-of-early-mounts-without-SMA.patch ++++++
From 7c96ab1d2484ab2df3c6a84f1a1d2e076f469085 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 13 Aug 2014 20:01:19 +0200 Subject: [PATCH] mount-setup: fix counting of early mounts without SMACK
http://lists.freedesktop.org/archives/systemd-devel/2014-August/021772.html --- src/core/mount-setup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git src/core/mount-setup.c src/core/mount-setup.c index 206f89a..cc2633e 100644 --- src/core/mount-setup.c +++ src/core/mount-setup.c @@ -63,8 +63,13 @@ typedef struct MountPoint { /* The first three entries we might need before SELinux is up. The * fourth (securityfs) is needed by IMA to load a custom policy. The - * other ones we can delay until SELinux and IMA are loaded. */ + * other ones we can delay until SELinux and IMA are loaded. When + * SMACK is enabled we need smackfs, too, so it's a fifth one. */ +#ifdef HAVE_SMACK #define N_EARLY_MOUNT 5 +#else +#define N_EARLY_MOUNT 4 +#endif static const MountPoint mount_table[] = { { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, -- 1.7.9.2 ++++++ 0008-sd-bus-don-t-access-invalid-memory-if-a-signal-match.patch ++++++
From bbb6ff0216a7c081a2e63e01b1f121592b0165bb Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 14 Mar 2014 21:12:36 +0100 Subject: [PATCH] sd-bus: don't access invalid memory if a signal matcher was freed from its own callback
---
src/libsystemd/sd-bus/bus-match.c | 3 +++
1 file changed, 3 insertions(+)
diff --git src/libsystemd/sd-bus/bus-match.c src/libsystemd/sd-bus/bus-match.c
index 8280488..c54ca8d 100644
--- src/libsystemd/sd-bus/bus-match.c
+++ src/libsystemd/sd-bus/bus-match.c
@@ -293,6 +293,9 @@ int bus_match_run(
r = bus_maybe_reply_error(m, r, &error_buffer);
if (r != 0)
return r;
+
+ if (bus && bus->match_callbacks_modified)
+ return 0;
}
return bus_match_run(bus, node->next, m);
--
1.7.9.2
++++++ 0008-shared-conf-parser-don-t-leak-memory-on-error-in-DEF.patch ++++++
Based on 77c10205bb337585c320e91af4b416f2dcc6faba Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From 0088d63151e088d62104d88f866e9eb049091c22 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 25 Mar 2014 00:31:48 +0100 Subject: [PATCH] systemctl: --kill-mode is long long gone, don't mention it in the man page
---
man/systemctl.xml | 5 ++---
shell-completion/bash/systemctl | 5 +----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git man/systemctl.xml man/systemctl.xml
index 77447dd..b4727d9 100644
--- man/systemctl.xml
+++ man/systemctl.xml
@@ -664,9 +664,8 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
<listitem>
<para>Send a signal to one or more processes of the
unit. Use <option>--kill-who=</option> to select which
- process to kill. Use <option>--kill-mode=</option> to select
- the kill mode and <option>--signal=</option> to select the
- signal to send.</para>
+ process to kill. Use <option>--signal=</option> to select
+ the signal to send.</para>
</listitem>
</varlistentry>
<varlistentry>
diff --git shell-completion/bash/systemctl shell-completion/bash/systemctl
index dc7ef66..0dfc868 100644
--- shell-completion/bash/systemctl
+++ shell-completion/bash/systemctl
@@ -74,7 +74,7 @@ _systemctl () {
[STANDALONE]='--all -a --reverse --after --before --defaults --fail --ignore-dependencies --failed --force -f --full -l --global
--help -h --no-ask-password --no-block --no-legend --no-pager --no-reload --no-wall
--quiet -q --privileged -P --system --user --version --runtime'
- [ARG]='--host -H --kill-mode --kill-who --property -p --signal -s --type -t --state --root'
+ [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root'
)
if __contains_word "--user" ${COMP_WORDS[*]}; then
@@ -99,9 +99,6 @@ _systemctl () {
--kill-who)
comps='all control main'
;;
- --kill-mode)
- comps='control-group process'
- ;;
--root)
comps=$(compgen -A directory -- "$cur" )
compopt -o filenames
--
1.7.9.2
++++++ 0008-util-introduce-sethostname_idempotent.patch ++++++
Based on 605f81a8968b2df8a28cca2cf11db99ab948a2af Mon Sep 17 00:00:00 2001
From: Michal Sekletar
From 036eeac5a1799fa2c0ae11a14d8c667b5d303189 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Tue, 25 Mar 2014 01:27:05 +0100 Subject: [PATCH] ask-password: when the user types a overly long password, beep and refuse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Based on a similar patch from David Härdeman. --- src/shared/ask-password-api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/shared/ask-password-api.c src/shared/ask-password-api.c index 117f0c6..96f16cc 100644 --- src/shared/ask-password-api.c +++ src/shared/ask-password-api.c @@ -207,6 +207,11 @@ int ask_password_tty( if (ttyfd >= 0) loop_write(ttyfd, "(no echo) ", 10, false); } else { + if (p >= sizeof(passphrase)-1) { + loop_write(ttyfd, "\a", 1, false); + continue; + } + passphrase[p++] = c; if (!silent_mode && ttyfd >= 0) -- 1.7.9.2 ++++++ 0009-bus-fix-bus_print_property-to-use-int-for-booleans.patch ++++++
From c2fa048c4a70c8386c6d8fe939e5ea9edecf1e98 Mon Sep 17 00:00:00 2001 From: David Herrmann
Date: Thu, 18 Sep 2014 13:28:28 +0200 Subject: [PATCH] bus: fix bus_print_property() to use "int" for booleans
We always use "int" if we retrieve boolean values from sd-bus, as "bool" is only a single byte, but full int on va-args. Thanks to Werner Fink for the report! --- src/libsystemd/sd-bus/bus-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/libsystemd/sd-bus/bus-util.c src/libsystemd/sd-bus/bus-util.c index 7c6da60..9018bce 100644 --- src/libsystemd/sd-bus/bus-util.c +++ src/libsystemd/sd-bus/bus-util.c @@ -631,7 +631,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) { } case SD_BUS_TYPE_BOOLEAN: { - bool b; + int b; r = sd_bus_message_read_basic(property, type, &b); if (r < 0) -- 1.7.9.2 ++++++ 0009-core-clean-up-signal-reset-logic-when-reexec.patch ++++++
From 9bfcda9528636914aef3e0ab91191bb81654c83d Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 20 Jun 2014 16:58:21 +0200 Subject: [PATCH] core: clean-up signal reset logic when reexec
There's no need to save the old sigmask, if we are going to die. Let's simplify this. Also, reset all the signal handlers, so that we don't leave SIG_IGN set for some of them across reexec. --- src/core/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git src/core/main.c src/core/main.c index 863ba52..6981e72 100644 --- src/core/main.c +++ src/core/main.c @@ -1824,7 +1824,7 @@ finish: if (reexecute) { const char **args; unsigned i, args_size; - sigset_t ss, o_ss; + sigset_t ss; /* Close and disarm the watchdog, so that the new * instance can reinitialize it, but doesn't get @@ -1910,8 +1910,10 @@ finish: /* reenable any blocked signals, especially important * if we switch from initial ramdisk to init=... */ - sigemptyset(&ss); - sigprocmask(SIG_SETMASK, &ss, &o_ss); + reset_all_signal_handlers(); + + assert_se(sigemptyset(&ss) == 0); + assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0); if (switch_root_init) { args[0] = switch_root_init; @@ -1931,8 +1933,6 @@ finish: log_error("Failed to execute /bin/sh, giving up: %m"); } else log_warning("Failed to execute /sbin/init, giving up: %m"); - - sigprocmask(SIG_SETMASK, &o_ss, NULL); } if (arg_serialization) { -- 1.7.9.2 ++++++ 0009-hwdb-Update-database-of-Bluetooth-company-identifier.patch ++++++
From 2e3390ea4684b954edce66b7758b5371d3338a9f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann
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-hwdb-update.patch ++++++ ++++ 3363 lines (skipped) ++++++ 0009-journal-do-not-leak-mmaps-on-OOM.patch ++++++
From b67ddc7bbe31cde7f69f9814204d9bb1d4623c47 Mon Sep 17 00:00:00 2001 From: Philippe De Swert
Date: Wed, 10 Sep 2014 12:20:41 +0300 Subject: [PATCH] journal: do not leak mmaps on OOM
After a section of memory is succesfully allocated, some of the following actions can still fail due to lack of memory. In this case -ENOMEM is returned without actually freeing the already mapped memory. Found with coverity. Fixes: CID#1237762 --- src/journal/mmap-cache.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git src/journal/mmap-cache.c src/journal/mmap-cache.c index 7dbbb5e..908562d 100644 --- src/journal/mmap-cache.c +++ src/journal/mmap-cache.c @@ -496,15 +496,15 @@ static int add_mmap( c = context_add(m, context); if (!c) - return -ENOMEM; + goto outofmem; f = fd_add(m, fd); if (!f) - return -ENOMEM; + goto outofmem; w = window_add(m); if (!w) - return -ENOMEM; + goto outofmem; w->keep_always = keep_always; w->ptr = d; @@ -522,6 +522,10 @@ static int add_mmap( if (ret) *ret = (uint8_t*) w->ptr + (offset - w->offset); return 1; + +outofmem: + munmap(d, wsize); + return -ENOMEM; } int mmap_cache_get( -- 1.7.9.2 ++++++ 0009-journald-Fix-off-by-one-error-in-Missed-X-kernel-mes.patch ++++++
From b9c488f60050248b35640f28e4d00958702ba1c3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra
Date: Wed, 6 Aug 2014 13:14:51 +0200 Subject: [PATCH] journald: Fix off-by-one error in "Missed X kernel messages" warning
On receiving a message, "kernel_seqnum" is set to "serial + 1". So subtracting 1 will cause messages like "Missed 0 kernel messages", which should be "Missed 1 kernel messages". --- src/journal/journald-kmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/journal/journald-kmsg.c src/journal/journald-kmsg.c index 9935986..fb8ea08 100644 --- src/journal/journald-kmsg.c +++ src/journal/journald-kmsg.c @@ -152,7 +152,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) { /* Did we lose any? */ if (serial > *s->kernel_seqnum) server_driver_message(s, SD_MESSAGE_JOURNAL_MISSED, "Missed %"PRIu64" kernel messages", - serial - *s->kernel_seqnum - 1); + serial - *s->kernel_seqnum); /* Make sure we never read this one again. Note that * we always store the next message serial we expect -- 1.7.9.2 ++++++ 0009-journald-always-add-syslog-facility-for-messages-com.patch ++++++
From 36dd072cdf03dcac0fcd2d6b42f261444dc7ac88 Mon Sep 17 00:00:00 2001 From: Michal Sekletar
Date: Fri, 25 Jul 2014 14:38:22 +0200 Subject: [PATCH] journald: always add syslog facility for messages coming from kmsg
Set SYSLOG_FACILITY field for kernel log messages too. Setting only SYSLOG_IDENTIFIER="kernel" is not sufficient and tools reading journal maybe confused by missing SYSLOG_FACILITY field for kernel log messages. --- src/journal/journald-kmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git src/journal/journald-kmsg.c src/journal/journald-kmsg.c index 12992e7..bb62a76 100644 --- src/journal/journald-kmsg.c +++ src/journal/journald-kmsg.c @@ -274,6 +274,9 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) { if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0) IOVEC_SET_STRING(iovec[n++], syslog_priority); + if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0) + IOVEC_SET_STRING(iovec[n++], syslog_facility); + if ((priority & LOG_FACMASK) == LOG_KERN) IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel"); else { @@ -295,9 +298,6 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) { if (syslog_pid) IOVEC_SET_STRING(iovec[n++], syslog_pid); } - - if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0) - IOVEC_SET_STRING(iovec[n++], syslog_facility); } message = cunescape_length_with_prefix(p, pl, "MESSAGE="); -- 1.7.9.2 ++++++ 0009-logind-fix-reference-to-systemd-user-sessions.servic.patch ++++++
From 646e392e10924454576f10b072f78d7676422816 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Thu, 6 Mar 2014 04:52:31 +0100 Subject: [PATCH] logind: fix reference to systemd-user-sessions.service
--- src/login/logind-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/login/logind-session.c src/login/logind-session.c index 548f049..3700522 100644 --- src/login/logind-session.c +++ src/login/logind-session.c @@ -490,7 +490,7 @@ static int session_start_scope(Session *s) { if (!scope) return log_oom(); - r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-session.service", &error, &job); + r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-sessions.service", &error, &job); if (r < 0) { log_error("Failed to start session scope %s: %s %s", scope, bus_error_message(&error, r), error.name); -- 1.7.9.2 ++++++ 0009-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch ++++++
From ff5f34d08c191c326c41a083745522383ac86cae Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 26 Feb 2014 04:27:50 +0100 Subject: [PATCH] mount: don't send out PropertiesChanged message if actually nothing got changed
--- src/core/mount.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git src/core/mount.c src/core/mount.c index b35e507..98812c9 100644 --- src/core/mount.c +++ src/core/mount.c @@ -1390,7 +1390,7 @@ static int mount_add_one( _cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL; bool load_extras = false; MountParameters *p; - bool delete; + bool delete, changed = false; Unit *u; int r; @@ -1458,6 +1458,7 @@ static int mount_add_one( } unit_add_to_load_queue(u); + changed = true; } else { delete = false; @@ -1476,6 +1477,7 @@ static int mount_add_one( /* Load in the extras later on, after we * finished initialization of the unit */ load_extras = true; + changed = true; } } @@ -1488,10 +1490,16 @@ static int mount_add_one( } p = &MOUNT(u)->parameters_proc_self_mountinfo; + + changed = changed || + !streq_ptr(p->options, options) || + !streq_ptr(p->what, what) || + !streq_ptr(p->fstype, fstype); + if (set_flags) { MOUNT(u)->is_mounted = true; MOUNT(u)->just_mounted = !MOUNT(u)->from_proc_self_mountinfo; - MOUNT(u)->just_changed = !streq_ptr(p->options, o); + MOUNT(u)->just_changed = changed; } MOUNT(u)->from_proc_self_mountinfo = true; @@ -1514,7 +1522,8 @@ static int mount_add_one( goto fail; } - unit_add_to_dbus_queue(u); + if (changed) + unit_add_to_dbus_queue(u); return 0; -- 1.7.9.2 ++++++ 0009-nspawn-properly-format-container_uuid-in-UUID-format.patch ++++++
From 9f24adc288de142d6606fde3c5a5971613f3b6b9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 16 May 2014 19:37:19 +0200 Subject: [PATCH] nspawn: properly format container_uuid in UUID format
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018971.html --- src/nspawn/nspawn.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git src/nspawn/nspawn.c src/nspawn/nspawn.c index 0bd52da..6be4dca 100644 --- src/nspawn/nspawn.c +++ src/nspawn/nspawn.c @@ -769,6 +769,15 @@ static int setup_resolv_conf(const char *dest) { return 0; } +static char* id128_format_as_uuid(sd_id128_t id, char s[37]) { + + snprintf(s, 37, + "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + SD_ID128_FORMAT_VAL(id)); + + return s; +} + static int setup_boot_id(const char *dest) { _cleanup_free_ char *from = NULL, *to = NULL; sd_id128_t rnd = {}; @@ -794,10 +803,7 @@ static int setup_boot_id(const char *dest) { return r; } - snprintf(as_uuid, sizeof(as_uuid), - "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", - SD_ID128_FORMAT_VAL(rnd)); - char_array_0(as_uuid); + id128_format_as_uuid(rnd, as_uuid); r = write_string_file(from, as_uuid); if (r < 0) { @@ -2954,7 +2960,9 @@ int main(int argc, char *argv[]) { } if (!sd_id128_equal(arg_uuid, SD_ID128_NULL)) { - if (asprintf((char**)(envp + n_env++), "container_uuid=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(arg_uuid)) < 0) { + char as_uuid[37]; + + if (asprintf((char**)(envp + n_env++), "container_uuid=%s", id128_format_as_uuid(arg_uuid, as_uuid)) < 0) { log_oom(); goto child_fail; } -- 1.7.9.2 ++++++ 0009-sd-bus-don-t-choke-if-somebody-sends-us-a-message-wi.patch ++++++
From 5a4d665ad679a8436f1210ba67d713a8f0b91b96 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Fri, 14 Mar 2014 21:15:32 +0100 Subject: [PATCH] sd-bus: don't choke if somebody sends us a message with a unix fd count of 0
It's kinda pointless to include a unix fd header field in messages if it
carries the value 0, but let's do this anyway...
---
src/libsystemd/sd-bus/bus-message.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git src/libsystemd/sd-bus/bus-message.c src/libsystemd/sd-bus/bus-message.c
index 97ab0e3..b9d7f6d 100644
--- src/libsystemd/sd-bus/bus-message.c
+++ src/libsystemd/sd-bus/bus-message.c
@@ -4885,6 +4885,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
size_t ri;
int r;
uint32_t unix_fds = 0;
+ bool unix_fds_set = false;
void *offsets = NULL;
unsigned n_offsets = 0;
size_t sz = 0;
@@ -5097,7 +5098,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
}
case BUS_MESSAGE_HEADER_UNIX_FDS:
- if (unix_fds != 0)
+ if (unix_fds_set)
return -EBADMSG;
if (!streq(signature, "u"))
@@ -5107,9 +5108,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
if (r < 0)
return -EBADMSG;
- if (unix_fds == 0)
- return -EBADMSG;
-
+ unix_fds_set = true;
break;
default:
--
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
From a9169c1c589bf7c7a29e7905d17e350ce7c7c48e Mon Sep 17 00:00:00 2001 From: Michal Sekletar
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
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-logind-allow-suspending-if-there-are-no-displays.patch ++++++
From d36d90933a832bd1e1eb8e3d16b3de73f91636b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?=
Date: Mon, 28 Apr 2014 00:58:56 +0300 Subject: [PATCH] logind: allow suspending if there are no displays
With proprietary graphics drivers, there won't be any 'drm' devices in sysfs, so logind will never suspend the system upon closing the lid, even if only one (internal) display is connected. This has been reported by multiple users so far. IMHO, it's better to suspend the system in this case for safety reasons, to avoid having nvidia blob users' laptops overheat, for the same reason that sleep inhibitors are overridden (LidSwitchIgnoreInhibited=yes). --- src/login/logind-action.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git src/login/logind-action.c src/login/logind-action.c index ae9cd48..36ee441 100644 --- src/login/logind-action.c +++ src/login/logind-action.c @@ -79,14 +79,12 @@ int manager_handle_action( return 0; } - /* If we have more than one or no displays connected, - * don't react to lid closing. The no display case we - * treat like this under the assumption that there is - * no modern drm driver available. */ + /* If we have more than one display connected, + * don't react to lid closing. */ n = manager_count_displays(m); if (n < 0) log_warning("Display counting failed: %s", strerror(-n)); - else if (n != 1) { + else if (n > 1) { log_debug("Ignoring lid switch request, %i displays connected.", n); return 0; } -- 1.7.9.2 ++++++ 0010-machine_kill-Don-t-kill-the-unit-when-killing-the-le.patch ++++++
From 9d685ca8193c0da3ad5746be3871f5350179a3b3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra
Date: Thu, 14 Aug 2014 19:59:16 +0200 Subject: [PATCH] machine_kill(): Don't kill the unit when killing the leader
If "machinectl poweroff" or "machinectl reboot" is used on a systemd-nspawn container started with --keep-unit and --register, it should *only* send the appropriate signal to the leader PID (i.e. the container's systemd process). It shouldn't fall through to manager_kill_unit() to also send the signal to the unit. The latter ends up killing systemd-nspawn, which takes down the container prematurely. --- src/machine/machine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git src/machine/machine.c src/machine/machine.c index 1c9177e..13d3448 100644 --- src/machine/machine.c +++ src/machine/machine.c @@ -493,6 +493,8 @@ int machine_kill(Machine *m, KillWho who, int signo) { if (kill(m->leader, signo) < 0) return -errno; + + return 0; } /* Otherwise make PID 1 do it for us, for the entire cgroup */ -- 1.7.9.2 ++++++ 0010-man-update-link-to-LSB.patch ++++++
From 27d14fb331ba8144f99f4da2d13f15cf5c8b8a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Thu, 6 Mar 2014 08:10:19 -0500 Subject: [PATCH] man: update link to LSB
https://bugzilla.redhat.com/show_bug.cgi?id=1073402
---
man/daemon.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git man/daemon.xml man/daemon.xml
index fd29ba7..ab58d08 100644
--- man/daemon.xml
+++ man/daemon.xml
@@ -252,7 +252,7 @@
detect service errors and problems. It
is recommended to follow the exit code
scheme as defined in the
From 807d0cca2b0daf4cd725298c1b5e062b1126f15b Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Thu, 11 Sep 2014 21:14:53 +0200 Subject: [PATCH] manager: use correct cleanup function
Close the dir instead of attempt to free it. Introduced in 874310b7b68c4c0d36ff07397db30a959bb7dae5 Found with coverity. Fixes: CID#996368 --- src/core/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/core/manager.c src/core/manager.c index 9abdf47..095111e 100644 --- src/core/manager.c +++ src/core/manager.c @@ -896,7 +896,7 @@ static int manager_coldplug(Manager *m) { static void manager_build_unit_path_cache(Manager *m) { char **i; - _cleanup_free_ DIR *d = NULL; + _cleanup_closedir_ DIR *d = NULL; int r; assert(m); -- 1.7.9.2 ++++++ 0010-mount-don-t-fire-PropertiesChanged-signals-for-mount.patch ++++++
From aef831369cd2a7a1bd4a58dd96ff8628ed6a85f9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 26 Feb 2014 04:28:37 +0100 Subject: [PATCH] mount: don't fire PropertiesChanged signals for mounts that are stopped
---
src/core/mount.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git src/core/mount.c src/core/mount.c
index 98812c9..7a92e1c 100644
--- src/core/mount.c
+++ src/core/mount.c
@@ -1679,20 +1679,20 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
Mount *mount = MOUNT(u);
if (!mount->is_mounted) {
- /* This has just been unmounted. */
mount->from_proc_self_mountinfo = false;
switch (mount->state) {
case MOUNT_MOUNTED:
+ /* This has just been unmounted by
+ * somebody else, follow the state
+ * change. */
mount_enter_dead(mount, MOUNT_SUCCESS);
break;
default:
- mount_set_state(mount, mount->state);
break;
-
}
} else if (mount->just_mounted || mount->just_changed) {
@@ -1703,6 +1703,9 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
case MOUNT_DEAD:
case MOUNT_FAILED:
+ /* This has just been mounted by
+ * somebody else, follow the state
+ * change. */
mount_enter_mounted(mount, MOUNT_SUCCESS);
break;
--
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
From da92ca5eb506d513033e0c7a85daf25a7e1c9d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Fri, 20 Jun 2014 22:43:49 -0400 Subject: [PATCH] util: treat fuse.sshfs as a network filesystem
https://bugs.freedesktop.org/show_bug.cgi?id=73727 --- src/shared/util.c | 1 + 1 file changed, 1 insertion(+) diff --git src/shared/util.c src/shared/util.c index 882a690..dbdb692 100644 --- src/shared/util.c +++ src/shared/util.c @@ -1514,6 +1514,7 @@ bool fstype_is_network(const char *fstype) { static const char table[] = "cifs\0" "smbfs\0" + "sshfs\0" "ncpfs\0" "ncp\0" "nfs\0" -- 1.7.9.2 ++++++ 0011-build-sys-add-pthread-flag-for-libsystemd-shared.patch ++++++
From 8e75477abdd838d3beddc5fd1c6a7707b22748b6 Mon Sep 17 00:00:00 2001 From: Ronny Chevalier
Date: Sat, 21 Jun 2014 22:07:09 +0200 Subject: [PATCH] build-sys: add -pthread flag for libsystemd-shared
src/shared/async.c uses pthread so it will fail at link time if we link only to libsystemd-shared and use async --- Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git Makefile.am Makefile.am index c7653ea..00db82d 100644 --- Makefile.am +++ Makefile.am @@ -837,7 +837,8 @@ nodist_libsystemd_shared_la_SOURCES = \ libsystemd_shared_la_CFLAGS = \ $(AM_CFLAGS) \ - $(SECCOMP_CFLAGS) + $(SECCOMP_CFLAGS) \ + -pthread # ------------------------------------------------------------------------------ noinst_LTLIBRARIES += \ -- 1.7.9.2 ++++++ 0011-logs-show-fix-corrupt-output-with-empty-messages.patch ++++++
From 47d80904a1f72d559962cc5ad32fffd46672a34a Mon Sep 17 00:00:00 2001 From: Uoti Urpala
Date: Thu, 20 Feb 2014 03:00:09 +0200 Subject: [PATCH] logs-show: fix corrupt output with empty messages
If a message had zero length, journalctl would print no newline, and two output lines would be concatenated. Fix. The problem was introduced in commit 31f7bf199452 ("logs-show: print multiline messages"). Affected short and verbose output modes. Before fix: Feb 09 21:16:17 glyph dhclient[1323]: Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit after: Feb 09 21:16:17 glyph dhclient[1323]: Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit --- src/shared/logs-show.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/shared/logs-show.c src/shared/logs-show.c index 61c3652..12d4a1c 100644 --- src/shared/logs-show.c +++ src/shared/logs-show.c @@ -124,6 +124,11 @@ static bool print_multiline(FILE *f, unsigned prefix, unsigned n_columns, Output } } + /* A special case: make sure that we print a newline when + the message is empty. */ + if (message_len == 0) + fputs("\n", f); + for (pos = message; pos < message + message_len; pos = end + 1, line++) { -- 1.7.9.2 ++++++ 0011-man-systemd-bootchart-fix-spacing-in-command.patch ++++++
From 82ed60080d327d7301fcd55f5a1f8511f894b9d5 Mon Sep 17 00:00:00 2001 From: Zachary Cook
Date: Thu, 6 Mar 2014 03:49:49 -0500 Subject: [PATCH] man: systemd-bootchart - fix spacing in command
Use the same formatting as the systemd-analyze man page, so that man shows a space.
---
man/systemd-bootchart.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git man/systemd-bootchart.xml man/systemd-bootchart.xml
index d0adaad..1715d5d 100644
--- man/systemd-bootchart.xml
+++ man/systemd-bootchart.xml
@@ -78,8 +78,8 @@
in which order, and where possible problems
exist in the startup sequence of the system.
It is essentially a more detailed version of
- the <command>systemd-analyze</command>
- <command>plot</command> function.
+ the <command>systemd-analyze plot</command>
+ function.
</para>
<para>
Of course, bootchart can also be used at any
--
1.7.9.2
++++++ 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?=
From ff50244582bf69e8489bba6ce59a21663d7f8274 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 18 Aug 2014 22:21:42 +0200 Subject: [PATCH] units: fix BindsTo= logic when applied relative to services with Type=oneshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Start jobs for Type=oneshot units are successful when the unit state
transition activating → inactive took place. In such a case all units
that BindsTo= on it previously would continue to run, even though the unit
they dependet on was actually already gone.
---
src/core/unit.c | 48 ++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git src/core/unit.c src/core/unit.c
index a5f6b2e..950b83a 100644
--- src/core/unit.c
+++ src/core/unit.c
@@ -1471,12 +1471,44 @@ static void unit_check_unneeded(Unit *u) {
if (unit_active_or_pending(other))
return;
- log_info_unit(u->id, "Service %s is not needed anymore. Stopping.", u->id);
+ log_info_unit(u->id, "Unit %s is not needed anymore. Stopping.", u->id);
/* Ok, nobody needs us anymore. Sniff. Then let's commit suicide */
manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
}
+static void unit_check_binds_to(Unit *u) {
+ bool stop = false;
+ Unit *other;
+ Iterator i;
+
+ assert(u);
+
+ if (u->job)
+ return;
+
+ if (unit_active_state(u) != UNIT_ACTIVE)
+ return;
+
+ SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i) {
+ if (other->job)
+ continue;
+
+ if (!UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(other)))
+ continue;
+
+ stop = true;
+ }
+
+ if (!stop)
+ return;
+
+ log_info_unit(u->id, "Unit %s is bound to inactive service. Stopping, too.", u->id);
+
+ /* A unit we need to run is gone. Sniff. Let's stop this. */
+ manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
+}
+
static void retroactively_start_dependencies(Unit *u) {
Iterator i;
Unit *other;
@@ -1788,11 +1820,19 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
manager_recheck_journal(m);
unit_trigger_notify(u);
- /* Maybe we finished startup and are now ready for being
- * stopped because unneeded? */
- if (u->manager->n_reloading <= 0)
+ if (u->manager->n_reloading <= 0) {
+ /* Maybe we finished startup and are now ready for
+ * being stopped because unneeded? */
unit_check_unneeded(u);
+ /* Maybe we finished startup, but something we needed
+ * has vanished? Let's die then. (This happens when
+ * something BindsTo= to a Type=oneshot unit, as these
+ * units go directly from starting to inactive,
+ * without ever entering started.) */
+ unit_check_binds_to(u);
+ }
+
unit_add_to_dbus_queue(u);
unit_add_to_gc_queue(u);
}
--
1.7.9.2
++++++ 0012-core-transaction-avoid-misleading-error-message-when.patch ++++++
Based on 04ef5b03f64d3824a51a2a903548af029a006744 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
From 0b6b7c2004317da48e5bbd3078c5662d8f0061b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Wed, 26 Feb 2014 23:01:43 -0500 Subject: [PATCH] journalctl: refuse extra arguments with --verify and similar
Positional arguments only make sense with the default action. For other actions, complain instead of ignoring them silently. --- src/journal/journalctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/journal/journalctl.c src/journal/journalctl.c index a328ba1..0619b25 100644 --- src/journal/journalctl.c +++ src/journal/journalctl.c @@ -658,6 +658,11 @@ static int parse_argv(int argc, char *argv[]) { return -EINVAL; } + if (arg_action != ACTION_SHOW && optind < argc) { + log_error("Extraneous arguments starting with '%s'", argv[optind]); + return -EINVAL; + } + return 1; } -- 1.7.9.2 ++++++ 0012-journald-remove-stray-reset-of-error-return-value.patch ++++++
From 2fc74bf4336eb7a7e40c0b355d19966cd97d4b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Mon, 10 Mar 2014 21:19:23 -0400 Subject: [PATCH] journald: remove stray reset of error return value
--- src/journal/journald.c | 1 - 1 file changed, 1 deletion(-) diff --git src/journal/journald.c src/journal/journald.c index 37896d0..c8c0801 100644 --- src/journal/journald.c +++ src/journal/journald.c @@ -110,7 +110,6 @@ int main(int argc, char *argv[]) { r = sd_event_run(server.event, t); if (r < 0) { log_error("Failed to run event loop: %s", strerror(-r)); - r = -errno; goto finish; } -- 1.7.9.2 ++++++ 0012-man-add-missing-comma.patch ++++++
From 7d06ef0a5cd2f0a4e021d3d12f3841cce529e0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?=
Date: Thu, 6 Mar 2014 23:54:13 -0500 Subject: [PATCH] man: add missing comma
marcosf0> missing comma in udevadm "see also" section
---
man/udevadm.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git man/udevadm.xml man/udevadm.xml
index a3f8d54..21d1443 100644
--- man/udevadm.xml
+++ man/udevadm.xml
@@ -594,7 +594,7 @@
<title>See Also</title>
<para><citerefentry>
<refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
- </citerefentry>
+ </citerefentry>,
<citerefentry>
<refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum>
</citerefentry></para>
--
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?=
From 70421bdce2719d76efffd8afdc28433c75aac5a2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Mon, 18 Aug 2014 23:15:51 +0200 Subject: [PATCH] util: try to be a bit more NFS compatible when checking whether an FS is writable
https://bugs.freedesktop.org/show_bug.cgi?id=81169 --- src/shared/path-util.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git src/shared/path-util.c src/shared/path-util.c index 57554cd..67566bc 100644 --- src/shared/path-util.c +++ src/shared/path-util.c @@ -533,7 +533,16 @@ int path_is_read_only_fs(const char *path) { if (statvfs(path, &st) < 0) return -errno; - return !!(st.f_flag & ST_RDONLY); + if (st.f_flag & ST_RDONLY) + return true; + + /* On NFS, statvfs() might not reflect whether we can actually + * write to the remote share. Let's try again with + * access(W_OK) which is more reliable, at least sometimes. */ + if (access(path, W_OK) < 0 && errno == EROFS) + return true; + + return false; } int path_is_os_tree(const char *path) { -- 1.7.9.2 ++++++ 0013-core-libsystemd-systemd-timedate-udev-spelling-fixes.patch ++++++
From 6f285378aa6e4b5b23c939d1fea16f9ab0a57efb Mon Sep 17 00:00:00 2001 From: Miklos Vajna
Date: Fri, 14 Mar 2014 21:13:38 +0100 Subject: [PATCH] core, libsystemd, systemd, timedate, udev: spelling fixes
--- src/core/service.c | 2 +- src/core/unit.c | 2 +- src/libsystemd/sd-bus/bus-message.c | 2 +- src/libsystemd/sd-bus/sd-bus.c | 4 ++-- src/systemd/sd-resolve.h | 2 +- src/timedate/timedated.c | 2 +- src/udev/udevadm-settle.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git src/core/service.c src/core/service.c index 41b95ab..386692a 100644 --- src/core/service.c +++ src/core/service.c @@ -3416,7 +3416,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { free(t); } - /* Interpet WATCHDOG= */ + /* Interpret WATCHDOG= */ if (strv_find(tags, "WATCHDOG=1")) { log_debug_unit(u->id, "%s: got WATCHDOG=1", u->id); service_reset_watchdog(s); diff --git src/core/unit.c src/core/unit.c index 5c98843..4fb0d9c 100644 --- src/core/unit.c +++ src/core/unit.c @@ -1537,7 +1537,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su unit_destroy_cgroup(u); /* Note that this doesn't apply to RemainAfterExit services exiting - * sucessfully, since there's no change of state in that case. Which is + * successfully, since there's no change of state in that case. Which is * why it is handled in service_set_state() */ if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) { ExecContext *ec; diff --git src/libsystemd/sd-bus/bus-message.c src/libsystemd/sd-bus/bus-message.c index b9d7f6d..e32f2b8 100644 --- src/libsystemd/sd-bus/bus-message.c +++ src/libsystemd/sd-bus/bus-message.c @@ -4215,7 +4215,7 @@ static int message_read_ap( * in a single stackframe. We hence implement our own * home-grown stack in an array. */ - n_array = (unsigned) -1; /* lenght of current array entries */ + n_array = (unsigned) -1; /* length of current array entries */ n_struct = strlen(types); /* length of current struct contents signature */ for (;;) { diff --git src/libsystemd/sd-bus/sd-bus.c src/libsystemd/sd-bus/sd-bus.c index 8e44e50..ba8a8a2 100644 --- src/libsystemd/sd-bus/sd-bus.c +++ src/libsystemd/sd-bus/sd-bus.c @@ -1447,7 +1447,7 @@ static int bus_seal_message(sd_bus *b, sd_bus_message *m, usec_t timeout) { static int bus_remarshal_message(sd_bus *b, sd_bus_message **m) { assert(b); - /* Do packet version and endianess already match? */ + /* Do packet version and endianness already match? */ if ((b->message_version == 0 || b->message_version == (*m)->header->version) && (b->message_endian == 0 || b->message_endian == (*m)->header->endian)) return 0; @@ -1464,7 +1464,7 @@ int bus_seal_synthetic_message(sd_bus *b, sd_bus_message *m) { * hence let's fill something in for synthetic messages. Since * synthetic messages might have a fake sender and we don't * want to interfere with the real sender's serial numbers we - * pick a fixed, artifical one. We use (uint32_t) -1 rather + * pick a fixed, artificial one. We use (uint32_t) -1 rather * than (uint64_t) -1 since dbus1 only had 32bit identifiers, * even though kdbus can do 64bit. */ diff --git src/systemd/sd-resolve.h src/systemd/sd-resolve.h index df69e4b..3c1d482 100644 --- src/systemd/sd-resolve.h +++ src/systemd/sd-resolve.h @@ -129,7 +129,7 @@ int sd_resolve_get_next(sd_resolve *resolve, sd_resolve_query **q); int sd_resolve_get_n_queries(sd_resolve *resolve); /** Cancel a currently running query. q is is destroyed by this call - * and may not be used any futher. */ + * and may not be used any further. */ int sd_resolve_cancel(sd_resolve_query* q); /** Returns non-zero when the query operation specified by q has been completed */ diff --git src/timedate/timedated.c src/timedate/timedated.c index d85ce57..c4a797a 100644 --- src/timedate/timedated.c +++ src/timedate/timedated.c @@ -468,7 +468,7 @@ static int property_get_rtc_time( zero(tm); r = hwclock_get_time(&tm); if (r == -EBUSY) { - log_warning("/dev/rtc is busy, is somebody keeping it open continously? That's not a good idea... Returning a bogus RTC timestamp."); + log_warning("/dev/rtc is busy, is somebody keeping it open continuously? That's not a good idea... Returning a bogus RTC timestamp."); t = 0; } else if (r == -ENOENT) { log_debug("Not /dev/rtc found."); diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c index b026155..927ea2a 100644 --- src/udev/udevadm-settle.c +++ src/udev/udevadm-settle.c @@ -100,7 +100,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) case '?': exit(EXIT_FAILURE); default: - assert_not_reached("Unkown argument"); + assert_not_reached("Unknown argument"); } if (optind < argc) { -- 1.7.9.2 ++++++ 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch ++++++
From 6c49212741253dae05b89d22374186f092ef1e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?=
Date: Fri, 7 Mar 2014 01:50:34 +0100 Subject: [PATCH] units: Do not unescape instance name in systemd-backlight@.service
The instance name is never escaped in the udev rule, but unescaped in the unit.
This results in the following error message on Asus boards:
Failed to get backlight or LED device 'backlight:eeepc/wmi': No such file or directory
---
units/systemd-backlight@.service.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git units/systemd-backlight@.service.in units/systemd-backlight@.service.in
index 5caa5d5..e945d87 100644
--- units/systemd-backlight@.service.in
+++ units/systemd-backlight@.service.in
@@ -6,7 +6,7 @@
# (at your option) any later version.
[Unit]
-Description=Load/Save Screen Backlight Brightness of %I
+Description=Load/Save Screen Backlight Brightness of %i
Documentation=man:systemd-backlight@.service(8)
DefaultDependencies=no
RequiresMountsFor=/var/lib/systemd/backlight
@@ -17,5 +17,5 @@ Before=sysinit.target shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=@rootlibexecdir@/systemd-backlight load %I
-ExecStop=@rootlibexecdir@/systemd-backlight save %I
+ExecStart=@rootlibexecdir@/systemd-backlight load %i
+ExecStop=@rootlibexecdir@/systemd-backlight save %i
--
1.7.9.2
++++++ 0014-journald-with-journaling-FS.patch ++++++
--- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:21:03.000000000 +0100
+++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:21:03.000000000 +0100
@@ -1,22 +1,5 @@
-From: werner@suse.de
-Upstream: marked as openSUSE-specific fix originally, but may well
- worth be to be sent upstream.
-
-Original description:
- (none)
-
-Augmented description [jengelh@inai.de]:
-Disable COW on journal files, as that is naturally leading to a lot
-of unwanted fragmentation on btrfs.
-No word on compression…
----
- src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++
- 1 file changed, 34 insertions(+)
-
-Index: systemd/src/journal/journald-server.c
-===================================================================
---- systemd.orig/src/journal/journald-server.c
-+++ systemd/src/journal/journald-server.c
+--- systemd-208/src/journal/journald-server.c
++++ systemd-208/src/journal/journald-server.c 2013-12-10 16:31:50.770235717 +0000
@@ -21,6 +21,7 @@
#include
From 13e8ceb84e56907d73b6b07418deb37faaf0e66d Mon Sep 17 00:00:00 2001 From: Tero Roponen
Date: Tue, 25 Feb 2014 17:19:35 +0200 Subject: [PATCH] nspawn: fix detection of missing /proc/self/loginuid
Running 'systemd-nspawn -D /srv/Fedora/' gave me this error:
Failed to read /proc/self/loginuid: No such file or directory
Container Fedora failed with error code 1.
This patch fixes the problem.
---
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/nspawn/nspawn.c src/nspawn/nspawn.c
index 1fe641b..92b6728 100644
--- src/nspawn/nspawn.c
+++ src/nspawn/nspawn.c
@@ -1349,7 +1349,7 @@ static int reset_audit_loginuid(void) {
return 0;
r = read_one_line_file("/proc/self/loginuid", &p);
- if (r == -EEXIST)
+ if (r == -ENOENT)
return 0;
if (r < 0) {
log_error("Failed to read /proc/self/loginuid: %s", strerror(-r));
--
1.7.9.2
++++++ 0018-Make-LSB-Skripts-know-about-Required-and-Should.patch ++++++
Should solve the problems of
bug #858864 - LSB "+" dependencies aren't handled properly
bug #857204 - inssrv fails to enable rpcbind
The side effect is that RequiresOverridable= is used for the services
add behind Required-Start
bug #863217 - systemd overrides explicit admin request to disable a service
That is that in this version the Wants= for all services behind
Should-Start, X-Start-Before, and X-Stop-After is not used anymore
---
service.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--- systemd-208/src/core/service.c
+++ systemd-208/src/core/service.c 2014-02-21 14:44:59.066735478 +0000
@@ -380,6 +380,8 @@ static int sysv_translate_facility(const
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
"syslog", NULL,
"time", SPECIAL_TIME_SYNC_TARGET,
+ "all", SPECIAL_DEFAULT_TARGET,
+ "null", NULL,
};
unsigned i;
@@ -389,7 +391,7 @@ static int sysv_translate_facility(const
assert(name);
assert(_r);
- n = *name == '$' ? name + 1 : name;
+ n = (*name == '$' || *name == '+') ? name + 1 : name;
for (i = 0; i < ELEMENTSOF(table); i += 2) {
@@ -816,10 +818,13 @@ static int service_load_sysv_path(Servic
startswith_no_case(t, "Should-Start:") ||
startswith_no_case(t, "X-Start-Before:") ||
startswith_no_case(t, "X-Start-After:")) {
+ UnitDependency d, e;
char *i, *w;
size_t z;
state = LSB;
+ d = startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER;
+ e = startswith_no_case(t, "Required-Start:") ? UNIT_REQUIRES_OVERRIDABLE : _UNIT_DEPENDENCY_INVALID;
FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) {
char *n, *m;
@@ -838,12 +843,18 @@ static int service_load_sysv_path(Servic
continue;
}
+ if (*n == '+')
+ e = UNIT_WANTS;
+
free(n);
if (r == 0)
continue;
- r = unit_add_dependency_by_name(u, startswith_no_case(t, "X-Start-Before:") ? UNIT_BEFORE : UNIT_AFTER, m, NULL, true);
+ if (e != _UNIT_DEPENDENCY_INVALID)
+ r = unit_add_two_dependencies_by_name(u, d, e, m, NULL, true);
+ else
+ r = unit_add_dependency_by_name(u, d, m, NULL, true);
if (r < 0)
log_error_unit(u->id, "[%s:%u] Failed to add dependency on %s, ignoring: %s",
++++++ 0019-make-completion-smart-to-be-able-to-redirect.patch ++++++
--- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:21:03.000000000 +0100
+++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:21:03.000000000 +0100
@@ -1,45 +1,8 @@
----
- shell-completion/bash/coredumpctl | 6 +++++-
- shell-completion/bash/hostnamectl | 6 +++++-
- shell-completion/bash/journalctl | 6 +++++-
- shell-completion/bash/kernel-install | 13 ++++++++++++-
- shell-completion/bash/localectl | 6 +++++-
- shell-completion/bash/loginctl | 6 +++++-
- shell-completion/bash/systemctl.in | 6 +++++-
- shell-completion/bash/systemd-analyze | 6 +++++-
- shell-completion/bash/systemd-run | 14 +++++++++++++-
- shell-completion/bash/timedatectl | 6 +++++-
- shell-completion/bash/udevadm | 6 +++++-
- 11 files changed, 70 insertions(+), 11 deletions(-)
-
-Index: systemd/shell-completion/bash/coredumpctl
-===================================================================
---- systemd.orig/shell-completion/bash/coredumpctl
-+++ systemd/shell-completion/bash/coredumpctl
-@@ -44,6 +44,10 @@ _coredumpctl() {
- [DUMP]='dump gdb'
- )
-
-+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
-+ return 0
-+ fi
-+
- if __contains_word "$prev" '--output -o'; then
- comps=$( compgen -A file -- "$cur" )
- compopt -o filenames
-@@ -82,4 +86,4 @@ _coredumpctl() {
- return 0
- }
-
--complete -F _coredumpctl coredumpctl
-+complete -o default -o bashdefault -F _coredumpctl coredumpctl
-Index: systemd/shell-completion/bash/hostnamectl
-===================================================================
---- systemd.orig/shell-completion/bash/hostnamectl
-+++ systemd/shell-completion/bash/hostnamectl
+--- systemd-208/shell-completion/bash/hostnamectl
++++ systemd-208/shell-completion/bash/hostnamectl 2014-01-17 14:27:16.183272019 +0000
@@ -30,6 +30,10 @@ _hostnamectl() {
local OPTS='-h --help --version --transient --static --pretty
- --no-ask-password -H --host --machine'
+ --no-ask-password -H --host'
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
+ return 0
@@ -48,18 +11,16 @@
if [[ $cur = -* ]]; then
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
return 0
-@@ -61,4 +65,4 @@ _hostnamectl() {
+@@ -58,4 +62,4 @@ _hostnamectl() {
return 0
}
-complete -F _hostnamectl hostnamectl
+complete -o default -o bashdefault -F _hostnamectl hostnamectl
-Index: systemd/shell-completion/bash/journalctl
-===================================================================
---- systemd.orig/shell-completion/bash/journalctl
-+++ systemd/shell-completion/bash/journalctl
-@@ -55,6 +55,10 @@ _journalctl() {
- --root --machine'
+--- systemd-208/shell-completion/bash/journalctl
++++ systemd-208/shell-completion/bash/journalctl 2014-01-17 14:34:30.338737694 +0000
+@@ -49,6 +49,10 @@ _journalctl() {
+ --verify-key'
)
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
@@ -69,16 +30,14 @@
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
case $prev in
--boot|--this-boot|-b)
-@@ -120,4 +124,4 @@ _journalctl() {
+@@ -107,4 +111,4 @@ _journalctl() {
fi
}
-complete -F _journalctl journalctl
+complete -o default -o bashdefault -F _journalctl journalctl
-Index: systemd/shell-completion/bash/kernel-install
-===================================================================
---- systemd.orig/shell-completion/bash/kernel-install
-+++ systemd/shell-completion/bash/kernel-install
+--- systemd-208/shell-completion/bash/kernel-install
++++ systemd-208/shell-completion/bash/kernel-install 2014-01-17 14:34:41.982255874 +0000
@@ -18,11 +18,22 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see http://www.gnu.org/licenses/.
@@ -108,13 +67,11 @@
-complete -F _kernel_install kernel-install
+complete -o default -o bashdefault -F _kernel_install kernel-install
-Index: systemd/shell-completion/bash/localectl
-===================================================================
---- systemd.orig/shell-completion/bash/localectl
-+++ systemd/shell-completion/bash/localectl
-@@ -36,6 +36,10 @@ _localectl() {
+--- systemd-208/shell-completion/bash/localectl
++++ systemd-208/shell-completion/bash/localectl 2014-01-17 14:34:52.546235747 +0000
+@@ -30,6 +30,10 @@ _localectl() {
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
- -H --host --machine'
+ -H --host'
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
+ return 0
@@ -123,19 +80,17 @@
if __contains_word "$prev" $OPTS; then
case $prev in
--host|-H)
-@@ -89,4 +93,4 @@ _localectl() {
+@@ -73,4 +77,4 @@ _localectl() {
return 0
}
-complete -F _localectl localectl
+complete -o default -o bashdefault -F _localectl localectl
-Index: systemd/shell-completion/bash/loginctl
-===================================================================
---- systemd.orig/shell-completion/bash/loginctl
-+++ systemd/shell-completion/bash/loginctl
-@@ -38,6 +38,10 @@ _loginctl () {
- [ARG]='--host -H --kill-who --property -p --signal -s --machine'
- )
+--- systemd-208/shell-completion/bash/loginctl
++++ systemd-208/shell-completion/bash/loginctl 2014-01-17 14:35:03.386245699 +0000
+@@ -37,6 +37,10 @@ _loginctl () {
+ [ARG]='--host -H --kill-who --property -p --signal -s'
+ )
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
+ return 0
@@ -144,17 +99,15 @@
if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in
--signal|-s)
-@@ -107,4 +111,4 @@ _loginctl () {
+@@ -106,4 +110,4 @@ _loginctl () {
return 0
}
-complete -F _loginctl loginctl
+complete -o default -o bashdefault -F _loginctl loginctl
-Index: systemd/shell-completion/bash/systemctl.in
-===================================================================
---- systemd.orig/shell-completion/bash/systemctl.in
-+++ systemd/shell-completion/bash/systemctl.in
-@@ -96,6 +96,10 @@ _systemctl () {
+--- systemd-208/shell-completion/bash/systemctl
++++ systemd-208/shell-completion/bash/systemctl 2014-01-17 14:35:26.506235666 +0000
+@@ -77,6 +77,10 @@ _systemctl () {
[ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root'
)
@@ -165,18 +118,16 @@
if __contains_word "--user" ${COMP_WORDS[*]}; then
mode=--user
else
-@@ -264,4 +268,4 @@ _systemctl () {
+@@ -226,4 +230,4 @@ _systemctl () {
return 0
}
-complete -F _systemctl systemctl
+complete -o default -o bashdefault -F _systemctl systemctl
-Index: systemd/shell-completion/bash/systemd-analyze
-===================================================================
---- systemd.orig/shell-completion/bash/systemd-analyze
-+++ systemd/shell-completion/bash/systemd-analyze
-@@ -47,6 +47,10 @@ _systemd_analyze() {
- [VERIFY]='verify'
+--- systemd-208/shell-completion/bash/systemd-analyze
++++ systemd-208/shell-completion/bash/systemd-analyze 2014-01-17 14:35:38.366736021 +0000
+@@ -37,6 +37,10 @@ _systemd_analyze() {
+ [LOG_LEVEL]='set-log-level'
)
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
@@ -186,16 +137,33 @@
_init_completion || return
for ((i=0; i < COMP_CWORD; i++)); do
-@@ -114,4 +118,4 @@ _systemd_analyze() {
+@@ -83,4 +87,4 @@ _systemd_analyze() {
return 0
}
-complete -F _systemd_analyze systemd-analyze
+complete -o default -o bashdefault -F _systemd_analyze systemd-analyze
-Index: systemd/shell-completion/bash/systemd-run
-===================================================================
---- systemd.orig/shell-completion/bash/systemd-run
-+++ systemd/shell-completion/bash/systemd-run
+--- systemd-208/shell-completion/bash/systemd-coredumpctl
++++ systemd-208/shell-completion/bash/systemd-coredumpctl 2014-01-17 14:35:46.434235632 +0000
+@@ -44,6 +44,10 @@ _coredumpctl() {
+ [DUMP]='dump gdb'
+ )
+
++ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
++ return 0
++ fi
++
+ if __contains_word "$prev" '--output -o'; then
+ comps=$( compgen -A file -- "$cur" )
+ compopt -o filenames
+@@ -82,4 +86,4 @@ _coredumpctl() {
+ return 0
+ }
+
+-complete -F _coredumpctl systemd-coredumpctl
++complete -o default -o bashdefault -F _coredumpctl systemd-coredumpctl
+--- systemd-208/shell-completion/bash/systemd-run
++++ systemd-208/shell-completion/bash/systemd-run 2014-01-17 14:35:55.938236298 +0000
@@ -17,6 +17,13 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see http://www.gnu.org/licenses/.
@@ -210,7 +178,7 @@
__systemctl() {
local mode=$1; shift 1
systemctl $mode --full --no-legend "$@"
-@@ -38,6 +45,11 @@ _systemd_run() {
+@@ -31,6 +38,11 @@ _systemd_run() {
local mode=--system
local i
@@ -222,19 +190,17 @@
for (( i=1; i <= COMP_CWORD; i++ )); do
if [[ ${COMP_WORDS[i]} != -* ]]; then
local root_command=${COMP_WORDS[i]}
-@@ -98,4 +110,4 @@ _systemd_run() {
+@@ -60,4 +72,4 @@ _systemd_run() {
return 0
}
-complete -F _systemd_run systemd-run
+complete -o default -o bashdefault -F _systemd_run systemd-run
-Index: systemd/shell-completion/bash/timedatectl
-===================================================================
---- systemd.orig/shell-completion/bash/timedatectl
-+++ systemd/shell-completion/bash/timedatectl
+--- systemd-208/shell-completion/bash/timedatectl
++++ systemd-208/shell-completion/bash/timedatectl 2014-01-17 14:36:06.182735466 +0000
@@ -30,6 +30,10 @@ _timedatectl() {
local OPTS='-h --help --version --adjust-system-clock --no-pager
- --no-ask-password -H --host --machine'
+ --no-ask-password -H --host'
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
+ return 0
@@ -249,10 +215,8 @@
-complete -F _timedatectl timedatectl
+complete -o default -o bashdefault -F _timedatectl timedatectl
-Index: systemd/shell-completion/bash/udevadm
-===================================================================
---- systemd.orig/shell-completion/bash/udevadm
-+++ systemd/shell-completion/bash/udevadm
+--- systemd-208/shell-completion/bash/udevadm
++++ systemd-208/shell-completion/bash/udevadm 2014-01-17 14:36:16.406236120 +0000
@@ -36,6 +36,10 @@ _udevadm() {
local verbs=(info trigger settle control monitor hwdb test-builtin test)
++++++ 1001-re-enable-by_path-links-for-ata-devices.patch ++++++
--- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:21:03.000000000 +0100
+++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:21:03.000000000 +0100
@@ -22,14 +22,14 @@
Signed-off-by: Robert Milasan
From a14f14976094650e17d39f3a7d15a1c68c93c333 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn
Date: Thu, 27 Feb 2014 11:06:37 +0100 Subject: [PATCH] cdrom_id: use the old MMC fallback
https://bugzilla.redhat.com/show_bug.cgi?id=1038015 The problem seems to be that the your virtual DVD is emulating a really old DVD device, and doing it kind of strangely.
dracut:# /lib/udev/cdrom_id --debug /dev/sr0 probing: '/dev/sr0' INQUIRY: [IMM ][Virtual CD/DVD ][0316] GET CONFIGURATION failed with SK=5h/ASC=24h/ACQ=00h
So your virtual drive rejects the GET CONFIGURATION command as illegal.
Other pre-MMC2 drives that don't accept this command usually return the
error
SK=5h,ASC=20h (invalid/unsupported command code), in which case cdrom_id
tries an older method, and then ID_CDROM_MEDIA_TRACK_COUNT_DATA gets set
and all the /dev/disk/by-label (etc) links get set up.
The virtual drive returns the error SK=5h,ASC=24h (invalid field in
Command Descriptor Block), which cdrom_id doesn't handle, so it gives up
and the links never get made.
The ideal solution would be to make the IMM to emulate a device that's
less than 15 years old, but I'm not going to hold my breath waiting for
that.
So probably cdrom_id should also use the old MMC fallback when the error
is SK=5h,ASC=24h, and then all of this would work as expected.
Suggested-by:Luca Miccini
From d4b687c96adf207f0878aebf3ce3371f6160687f Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Thu, 27 Mar 2014 15:30:09 +0100 Subject: [PATCH] udev: update net_id comments
From bf81e792f3c0aed54edf004c1c95cc6f6d81d0ee Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 27 Mar 2014 21:47:14 +0100 Subject: [PATCH] udev: persistent naming - we cannot use virtio numbers as
Signed-off-by: Robert Milasan
From 3ebdb81ef088afd3b4c72b516beb5610f8c93a0d Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Sun, 13 Apr 2014 19:54:27 -0700 Subject: [PATCH] udev: serialize/synchronize block device event handling with file locks
---
src/udev/udevd.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git src/udev/udevd.c src/udev/udevd.c
index f9ee368..aecd208 100644
--- src/udev/udevd.c
+++ src/udev/udevd.c
@@ -31,6 +31,7 @@
#include
From 1ea972174baba40dbc80c51cbfc4edc49764b59b Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 14 May 2014 00:34:49 +0200 Subject: [PATCH] udev: do not skip the execution of RUN when renaming a network device fails
--- src/test/test-udev.c | 5 ++--- src/udev/udev-event.c | 11 +++++------ src/udev/udev.h | 2 +- src/udev/udevadm-test.c | 13 +++++-------- src/udev/udevd.c | 5 ++--- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git src/test/test-udev.c src/test/test-udev.c index b064744..b057cc8 100644 --- src/test/test-udev.c +++ src/test/test-udev.c @@ -155,9 +155,8 @@ int main(int argc, char *argv[]) { } } - err = udev_event_execute_rules(event, rules, &sigmask_orig); - if (err == 0) - udev_event_execute_run(event, NULL); + udev_event_execute_rules(event, rules, &sigmask_orig); + udev_event_execute_run(event, NULL); out: if (event != NULL && event->fd_signal >= 0) close(event->fd_signal); diff --git src/udev/udev-event.c src/udev/udev-event.c index 2cab42b..5213a4a 100644 --- src/udev/udev-event.c +++ src/udev/udev-event.c @@ -776,13 +776,12 @@ static int rename_netif(struct udev_event *event) return r; } -int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask) +void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask) { struct udev_device *dev = event->dev; - int err = 0; if (udev_device_get_subsystem(dev) == NULL) - return -1; + return; if (streq(udev_device_get_action(dev), "remove")) { udev_device_read_db(dev, NULL); @@ -816,9 +815,10 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, event->name != NULL && !streq(event->name, udev_device_get_sysname(dev))) { char syspath[UTIL_PATH_SIZE]; char *pos; + int r; - err = rename_netif(event); - if (err == 0) { + r = rename_netif(event); + if (r >= 0) { log_debug("renamed netif to '%s'", event->name); /* remember old name */ @@ -881,7 +881,6 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, udev_device_unref(event->dev_db); event->dev_db = NULL; } - return err; } void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask) diff --git src/udev/udev.h src/udev/udev.h index 936adfb..62538bc 100644 --- src/udev/udev.h +++ src/udev/udev.h @@ -84,7 +84,7 @@ int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string, int udev_event_spawn(struct udev_event *event, const char *cmd, char **envp, const sigset_t *sigmask, char *result, size_t ressize); -int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset); +void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset); void udev_event_execute_run(struct udev_event *event, const sigset_t *sigset); int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]); diff --git src/udev/udevadm-test.c src/udev/udevadm-test.c index 6cd311b..6a2f548 100644 --- src/udev/udevadm-test.c +++ src/udev/udevadm-test.c @@ -43,7 +43,6 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) _cleanup_udev_device_unref_ struct udev_device *dev = NULL; _cleanup_udev_event_unref_ struct udev_event *event = NULL; sigset_t mask, sigmask_orig; - int err; int rc = 0, c; static const struct option options[] = { @@ -139,18 +138,16 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) goto out; } - err = udev_event_execute_rules(event, rules, &sigmask_orig); + udev_event_execute_rules(event, rules, &sigmask_orig); udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev)) printf("%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry)); - if (err == 0) { - udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) { - char program[UTIL_PATH_SIZE]; + udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) { + char program[UTIL_PATH_SIZE]; - udev_event_apply_format(event, udev_list_entry_get_name(entry), program, sizeof(program)); - printf("run: '%s'\n", program); - } + udev_event_apply_format(event, udev_list_entry_get_name(entry), program, sizeof(program)); + printf("run: '%s'\n", program); } out: if (event != NULL && event->fd_signal >= 0) diff --git src/udev/udevd.c src/udev/udevd.c index aecd208..bc0696c 100644 --- src/udev/udevd.c +++ src/udev/udevd.c @@ -307,10 +307,9 @@ static void worker_new(struct event *event) } /* apply rules, create node, symlinks */ - err = udev_event_execute_rules(udev_event, rules, &sigmask_orig); + udev_event_execute_rules(udev_event, rules, &sigmask_orig); - if (err == 0) - udev_event_execute_run(udev_event, &sigmask_orig); + udev_event_execute_run(udev_event, &sigmask_orig); /* apply/restore inotify watch */ if (err == 0 && udev_event->inotify_watch) { -- 1.7.9.2 ++++++ 1019-udev-avoid-use-of-uninitialized-err.patch ++++++
From bf9bead187802a52a1f376a03caee762d663e945 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Fri, 16 May 2014 23:46:48 +0200 Subject: [PATCH] udev: avoid use of uninitialized err
After 1ea972174baba40dbc80c51cbfc4edc49764b59b err is no longer set unless we hit a special case. Initialize it to 0 and remove a check that will never fail. --- src/udev/udevd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git src/udev/udevd.c src/udev/udevd.c index bc0696c..1c9488e 100644 --- src/udev/udevd.c +++ src/udev/udevd.c @@ -267,7 +267,7 @@ static void worker_new(struct event *event) struct udev_event *udev_event; struct worker_message msg; int fd_lock = -1; - int err; + int err = 0; log_debug("seq %llu running", udev_device_get_seqnum(dev)); udev_event = udev_event_new(dev); @@ -312,7 +312,7 @@ static void worker_new(struct event *event) udev_event_execute_run(udev_event, &sigmask_orig); /* apply/restore inotify watch */ - if (err == 0 && udev_event->inotify_watch) { + if (udev_event->inotify_watch) { udev_watch_begin(udev, dev); udev_device_update_db(dev); } -- 1.7.9.2 ++++++ 1020-udev-keyboard-also-hook-into-change-events.patch ++++++
From 49804365ea1242456c9763058a59cf68479e07ea Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Mon, 26 May 2014 09:30:21 +0800 Subject: [PATCH] udev: keyboard - also hook into "change" events
Re-apply the keymaps when "udevadm trigger" is called. Hooking into "add" only would just remove all keymap content from the udev database instead of applying the new config. --- rules/60-keyboard.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git rules/60-keyboard.rules rules/60-keyboard.rules index 4e0f366..22f71e7 100644 --- rules/60-keyboard.rules +++ rules/60-keyboard.rules @@ -1,6 +1,6 @@ # do not edit this file, it will be overwritten on update -ACTION!="add", GOTO="keyboard_end" +ACTION=="remove", GOTO="keyboard_end" KERNEL!="event*", GOTO="keyboard_end" ENV{ID_INPUT_KEY}=="", GOTO="keyboard_end" -- 1.7.9.2 ++++++ 1021-udev-re-add-persistent-net-rules.patch ++++++ --- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:21:04.000000000 +0100 +++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:21:04.000000000 +0100 @@ -1,73 +1,7 @@ ---- - Makefile.am | 9 - src/udev/net/link-config.c | 17 + - src/udev/rule_generator/75-persistent-net-generator.rules | 105 ++++++++++ - src/udev/rule_generator/76-net-sriov-names.rules | 18 + - src/udev/rule_generator/net-set-sriov-names | 79 +++++++ - src/udev/rule_generator/rule_generator.functions | 113 +++++++++++ - src/udev/rule_generator/write_net_rules | 141 ++++++++++++++ - 7 files changed, 479 insertions(+), 3 deletions(-) - -Index: systemd-218/Makefile.am -=================================================================== ---- systemd-218.orig/Makefile.am -+++ systemd-218/Makefile.am -@@ -3416,7 +3416,14 @@ dist_udevrules_DATA += \ - rules/75-tty-description.rules \ - rules/78-sound-card.rules \ - rules/80-net-setup-link.rules \ -- rules/95-udev-late.rules -+ rules/95-udev-late.rules \ -+ src/udev/rule_generator/75-persistent-net-generator.rules \ -+ src/udev/rule_generator/76-net-sriov-names.rules -+ -+udevlibexec_PROGRAMS += \ -+ src/udev/rule_generator/rule_generator.functions \ -+ src/udev/rule_generator/write_net_rules \ -+ src/udev/rule_generator/net-set-sriov-names - - nodist_udevrules_DATA += \ - rules/99-systemd.rules -Index: systemd-218/src/udev/net/link-config.c -=================================================================== ---- systemd-218.orig/src/udev/net/link-config.c -+++ systemd-218/src/udev/net/link-config.c -@@ -176,16 +176,29 @@ static bool enable_name_policy(void) { - size_t l; - - r = proc_cmdline(&line); -- if (r < 0) { -+ if (r < 0) - log_warning_errno(r, "Failed to read /proc/cmdline, ignoring: %m"); -+#if defined(NET_IFNAMES) && (NET_IFNAMES == 1) -+# warning Using persistent rules as a default -+ if (r <= 0) -+ return false; -+ -+ FOREACH_WORD_QUOTED(w, l, line, state) -+ if (strneq(w, "net.ifnames=1", l)) -+ return true; -+ -+ return false; -+#else -+# warning Using predictable rules as a default -+ if (r <= 0) - return true; -- } - - FOREACH_WORD_QUOTED(word, l, line, state) - if (strneq(word, "net.ifnames=0", l)) - return false; - - return true; -+#endif - } - - int link_config_load(link_config_ctx *ctx) { -Index: systemd-218/src/udev/rule_generator/75-persistent-net-generator.rules +Index: systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules =================================================================== --- /dev/null -+++ systemd-218/src/udev/rule_generator/75-persistent-net-generator.rules ++++ systemd-210/src/udev/rule_generator/75-persistent-net-generator.rules @@ -0,0 +1,105 @@ +# do not edit this file, it will be overwritten on update + @@ -174,117 +108,10 @@ +ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" + +LABEL="persistent_net_generator_end" -Index: systemd-218/src/udev/rule_generator/76-net-sriov-names.rules -=================================================================== ---- /dev/null -+++ systemd-218/src/udev/rule_generator/76-net-sriov-names.rules -@@ -0,0 +1,18 @@ -+# do not edit this file, it will be overwritten on update -+# -+# rename SRIOV virtual function interfaces -+ -+ACTION=="remove", GOTO="net-sriov-names_end" -+SUBSYSTEM!="net", GOTO="net-sriov-names_end" -+ -+IMPORT{cmdline}="net.ifnames" -+ENV{net.ifnames}=="1", GOTO="net-sriov-names_end" -+ -+SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", NAME=="?*", ENV{INTERFACE_NEW}="$name" -+SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", IMPORT{program}="net-set-sriov-names" -+ -+# rename interface if needed -+ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" -+ENV{INTERFACE_NEW}=="", DRIVERS=="cxgb4vf|igbvf|ixgbevf", NAME="vf$attr{ifindex}" -+ -+LABEL="net-sriov-names_end" -Index: systemd-218/src/udev/rule_generator/net-set-sriov-names -=================================================================== ---- /dev/null -+++ systemd-218/src/udev/rule_generator/net-set-sriov-names -@@ -0,0 +1,79 @@ -+#!/bin/bash -e -+# -+# This script is run to rename virtual interfaces -+# -+ -+if [ -n "$UDEV_LOG" ]; then -+ if [ "$UDEV_LOG" -ge 7 ]; then -+ set -x -+ fi -+fi -+ -+# according to dev_new_index(), ifindex is within [1, INT_MAX] -+int_max=$(/usr/bin/getconf INT_MAX) -+ifindex_before() { -+ a=$1 -+ b=$2 -+ -+ ((0 < (b - a) && (b - a) < int_max / 2 || -+ -1 * int_max < (b - a) && (b - a) < -1 * int_max / 2)) -+} -+ -+rename_interface() { -+ local src_net=$1 -+ local dest_net=$2 -+ local err=0 -+ -+ /sbin/ip link set dev $src_net down -+ /sbin/ip link set dev $src_net name $dest_net -+} -+ -+if [ -z "$INTERFACE" ]; then -+ echo "missing \$INTERFACE" >&2 -+ exit 1 -+fi -+ -+if [ -e "/sys/class/net/$INTERFACE/device/physfn" ]; then -+ pf=$(ls -1 "/sys/class/net/$INTERFACE/device/physfn/net") -+ if [ $(echo "$pf" | wc -l) -ne 1 ]; then -+ echo "too many pf's" >&2 -+ exit 1 -+ fi -+ read vfindex < "/sys/class/net/$INTERFACE/ifindex" -+ read pfindex < "/sys/class/net/$pf/ifindex" -+ if ifindex_before $pfindex $vfindex; then -+ bus_info=$(basename $(readlink "/sys/class/net/$INTERFACE/device")) -+ for virtfn in "/sys/class/net/$pf/device/"virtfn*; do -+ if [ "$(basename $(readlink "$virtfn"))" = "$bus_info" ]; then -+ vfnum=$(basename "$virtfn") -+ vfnum=${vfnum#virtfn} -+ echo "INTERFACE_NEW=$pf.vf$vfnum" -+ exit 0 -+ fi -+ done -+ fi -+fi -+ -+read pfindex < "/sys/class/net/$INTERFACE/ifindex" -+shopt -s nullglob -+for virtfn in "/sys/class/net/$INTERFACE/device/"virtfn*; do -+ vf=$(ls -1 "$virtfn/net") -+ if [ $(echo "$vf" | wc -l) -ne 1 ]; then -+ echo "too many vf's" >&2 -+ exit 1 -+ fi -+ read vfindex < "/sys/class/net/$vf/ifindex" -+ if ifindex_before $vfindex $pfindex; then -+ vfnum=$(basename "$virtfn") -+ vfnum=${vfnum#virtfn} -+ if [ "$INTERFACE_NEW" ]; then -+ new_name=$INTERFACE_NEW -+ else -+ new_name=$INTERFACE -+ fi -+ new_name="$new_name.vf$vfnum" -+ if [ "$vf" != "$new_name" ]; then -+ rename_interface "$vf" "$new_name" -+ fi -+ fi -+done -Index: systemd-218/src/udev/rule_generator/rule_generator.functions +Index: systemd-210/src/udev/rule_generator/rule_generator.functions =================================================================== --- /dev/null -+++ systemd-218/src/udev/rule_generator/rule_generator.functions ++++ systemd-210/src/udev/rule_generator/rule_generator.functions @@ -0,0 +1,113 @@ +# functions used by the udev rule generator + @@ -399,10 +226,10 @@ + $([ -e $RULES_FILE ] && echo $RULES_FILE) \ + 2>/dev/null) +} -Index: systemd-218/src/udev/rule_generator/write_net_rules +Index: systemd-210/src/udev/rule_generator/write_net_rules =================================================================== --- /dev/null -+++ systemd-218/src/udev/rule_generator/write_net_rules ++++ systemd-210/src/udev/rule_generator/write_net_rules @@ -0,0 +1,141 @@ +#!/bin/sh -e + @@ -545,3 +372,161 @@ +unlock_rules_file + +exit 0 +Index: systemd-210/Makefile.am +=================================================================== +--- systemd-210.orig/Makefile.am ++++ systemd-210/Makefile.am +@@ -2552,7 +2552,14 @@ dist_udevrules_DATA += \ + rules/75-tty-description.rules \ + rules/78-sound-card.rules \ + rules/80-net-setup-link.rules \ +- rules/95-udev-late.rules ++ rules/95-udev-late.rules \ ++ src/udev/rule_generator/75-persistent-net-generator.rules \ ++ src/udev/rule_generator/76-net-sriov-names.rules ++ ++udevlibexec_PROGRAMS += \ ++ src/udev/rule_generator/rule_generator.functions \ ++ src/udev/rule_generator/write_net_rules \ ++ src/udev/rule_generator/net-set-sriov-names + + dist_udevhwdb_DATA = \ + hwdb/20-pci-vendor-model.hwdb \ +Index: systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/76-net-sriov-names.rules +@@ -0,0 +1,18 @@ ++# do not edit this file, it will be overwritten on update ++# ++# rename SRIOV virtual function interfaces ++ ++ACTION=="remove", GOTO="net-sriov-names_end" ++SUBSYSTEM!="net", GOTO="net-sriov-names_end" ++ ++IMPORT{cmdline}="net.ifnames" ++ENV{net.ifnames}=="1", GOTO="net-sriov-names_end" ++ ++SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", NAME=="?*", ENV{INTERFACE_NEW}="$name" ++SUBSYSTEM=="net", SUBSYSTEMS=="pci", ACTION=="add", IMPORT{program}="net-set-sriov-names" ++ ++# rename interface if needed ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ENV{INTERFACE_NEW}=="", DRIVERS=="cxgb4vf|igbvf|ixgbevf", NAME="vf$attr{ifindex}" ++ ++LABEL="net-sriov-names_end" +Index: systemd-210/src/udev/rule_generator/net-set-sriov-names +=================================================================== +--- /dev/null ++++ systemd-210/src/udev/rule_generator/net-set-sriov-names +@@ -0,0 +1,79 @@ ++#!/bin/bash -e ++# ++# This script is run to rename virtual interfaces ++# ++ ++if [ -n "$UDEV_LOG" ]; then ++ if [ "$UDEV_LOG" -ge 7 ]; then ++ set -x ++ fi ++fi ++ ++# according to dev_new_index(), ifindex is within [1, INT_MAX] ++int_max=$(/usr/bin/getconf INT_MAX) ++ifindex_before() { ++ a=$1 ++ b=$2 ++ ++ ((0 < (b - a) && (b - a) < int_max / 2 || ++ -1 * int_max < (b - a) && (b - a) < -1 * int_max / 2)) ++} ++ ++rename_interface() { ++ local src_net=$1 ++ local dest_net=$2 ++ local err=0 ++ ++ /sbin/ip link set dev $src_net down ++ /sbin/ip link set dev $src_net name $dest_net ++} ++ ++if [ -z "$INTERFACE" ]; then ++ echo "missing \$INTERFACE" >&2 ++ exit 1 ++fi ++ ++if [ -e "/sys/class/net/$INTERFACE/device/physfn" ]; then ++ pf=$(ls -1 "/sys/class/net/$INTERFACE/device/physfn/net") ++ if [ $(echo "$pf" | wc -l) -ne 1 ]; then ++ echo "too many pf's" >&2 ++ exit 1 ++ fi ++ read vfindex < "/sys/class/net/$INTERFACE/ifindex" ++ read pfindex < "/sys/class/net/$pf/ifindex" ++ if ifindex_before $pfindex $vfindex; then ++ bus_info=$(basename $(readlink "/sys/class/net/$INTERFACE/device")) ++ for virtfn in "/sys/class/net/$pf/device/"virtfn*; do ++ if [ "$(basename $(readlink "$virtfn"))" = "$bus_info" ]; then ++ vfnum=$(basename "$virtfn") ++ vfnum=${vfnum#virtfn} ++ echo "INTERFACE_NEW=$pf.vf$vfnum" ++ exit 0 ++ fi ++ done ++ fi ++fi ++ ++read pfindex < "/sys/class/net/$INTERFACE/ifindex" ++shopt -s nullglob ++for virtfn in "/sys/class/net/$INTERFACE/device/"virtfn*; do ++ vf=$(ls -1 "$virtfn/net") ++ if [ $(echo "$vf" | wc -l) -ne 1 ]; then ++ echo "too many vf's" >&2 ++ exit 1 ++ fi ++ read vfindex < "/sys/class/net/$vf/ifindex" ++ if ifindex_before $vfindex $pfindex; then ++ vfnum=$(basename "$virtfn") ++ vfnum=${vfnum#virtfn} ++ if [ "$INTERFACE_NEW" ]; then ++ new_name=$INTERFACE_NEW ++ else ++ new_name=$INTERFACE ++ fi ++ new_name="$new_name.vf$vfnum" ++ if [ "$vf" != "$new_name" ]; then ++ rename_interface "$vf" "$new_name" ++ fi ++ fi ++done +Index: systemd-210/src/udev/net/link-config.c +=================================================================== +--- systemd-210.orig/src/udev/net/link-config.c ++++ systemd-210/src/udev/net/link-config.c +@@ -193,6 +193,18 @@ static bool enable_name_policy(void) { + r = proc_cmdline(&line); + if (r < 0) + log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r)); ++#if defined(NET_IFNAMES) && (NET_IFNAMES == 1) ++# warning Using persistent rules as a default ++ if (r <= 0) ++ return false; ++ ++ FOREACH_WORD_QUOTED(w, l, line, state) ++ if (strneq(w, "net.ifnames=1", l)) ++ return true; ++ ++ return false; ++#else ++# warning Using predictable rules as a default + if (r <= 0) + return true; + +@@ -201,6 +213,7 @@ static bool enable_name_policy(void) { + return false; + + return true; ++#endif + } + + int link_config_load(link_config_ctx *ctx) { ++++++ 1022-udev-remove-seqnum-API-and-all-assumptions-about-seq.patch ++++++ ++++ 1445 lines (skipped) ++++++ 1023-udev-builtin-keyboard-do-tell-on-which-device-EVIOCS.patch ++++++
From a52ec8ed881537627869afa8f0486db7e20ce2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?=
Date: Fri, 30 May 2014 13:16:56 -0400 Subject: [PATCH] udev-builtin-keyboard: do tell on which device EVIOCSKEYCODE failed.
I am getting
"Error calling EVIOCSKEYCODE (scan code 0xc022d, key code 418): Invalid
argument", the error message does not tell on which specific device the
problem is, add that info.
---
src/udev/udev-builtin-keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/udev/udev-builtin-keyboard.c src/udev/udev-builtin-keyboard.c
index 614e44e..9b66bfd 100644
--- src/udev/udev-builtin-keyboard.c
+++ src/udev/udev-builtin-keyboard.c
@@ -143,7 +143,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo
log_debug("keyboard: mapping scan code %d (0x%x) to key code %d (0x%x)",
map[i].scan, map[i].scan, map[i].key, map[i].key);
if (ioctl(fd, EVIOCSKEYCODE, &map[i]) < 0)
- log_error("Error calling EVIOCSKEYCODE (scan code 0x%x, key code %d): %m", map[i].scan, map[i].key);
+ log_error("Error calling EVIOCSKEYCODE on device node '%s' (scan code 0x%x, key code %d): %m", node, map[i].scan, map[i].key);
}
/* install list of force-release codes */
--
1.7.9.2
++++++ 1024-udev-always-close-lock-file-descriptor.patch ++++++
Based on 3d06f4183470d42361303086ed9dedd29c0ffc1b Mon Sep 17 00:00:00 2001
From: Kay Sievers
From e918a1b5a94f270186dca59156354acd2a596494 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Tue, 3 Jun 2014 16:49:38 +0200 Subject: [PATCH] udev: exclude device-mapper from block device ownership event locking
Signed-off-by: Robert Milasan
From edd32000c806e4527c5f376d138f7bff07724c26 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 11:05:45 +0200 Subject: [PATCH] udevd: inotify - modernizations
Signed-off-by: Robert Milasan
From f3a740a5dae792fb6b2d411022ce8c29ced1c3f1 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 12:16:28 +0200 Subject: [PATCH] udev: synthesize "change' events for partitions when tools change the disk
This should make sure that fdisk-like programs will automatically
cause an update of all partitions, just like mkfs-like programs cause
an update of the partition.
Signed-off-by: Robert Milasan
From edf029b7fd9a5853a87d3ca99aac2922bb8a277e Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Wed, 4 Jun 2014 12:34:23 +0200 Subject: [PATCH] udev: link-config - fix mem leak
Reported by Kay.
Signed-off-by: Robert Milasan
From ede344452a54e1c53f541cad12a06269a4fe96a9 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 13:30:24 +0200 Subject: [PATCH] udev: try first re-reading the partition table
mounted partitions:
# dd if=/dev/zero of=/dev/sda bs=1 count=1
UDEV [4157.369250] change .../0:0:0:0/block/sda (block)
UDEV [4157.375059] change .../0:0:0:0/block/sda/sda1 (block)
UDEV [4157.397088] change .../0:0:0:0/block/sda/sda2 (block)
UDEV [4157.404842] change .../0:0:0:0/block/sda/sda4 (block)
unmounted partitions:
# dd if=/dev/zero of=/dev/sdb bs=1 count=1
UDEV [4163.450217] remove .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)
UDEV [4163.593167] change .../target6:0:0/6:0:0:0/block/sdb (block)
UDEV [4163.713982] add .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)
Signed-off-by: Robert Milasan
From 10fab50a3091e0b819c3ddab5a7c07acf750c050 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 14:09:31 +0200 Subject: [PATCH] udev: guard REREADP logic with open(O_ECXL)
Signed-off-by: Robert Milasan
From e9fc29f4ecc9509ccc02eb8a014341e26c0d7831 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 15:17:15 +0200 Subject: [PATCH] udev: make sure we always get "change" for the disk
The kernel will return 0 for REREADPT when no partition table
is found, we have to send out "change" ourselves.
Signed-off-by: Robert Milasan
From 02ba8fb3357daf57f6120ac512fb464a4c623419 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Wed, 4 Jun 2014 16:21:19 +0200 Subject: [PATCH] udev: guard REREADPT by exclusive lock instead of O_EXCL
Signed-off-by: Robert Milasan
From 638ca89c53e2b897cfb3f627f4acbc7d09af2f4c Mon Sep 17 00:00:00 2001 From: Christian Hesse
Date: Tue, 10 Jun 2014 15:51:15 +0200 Subject: [PATCH] udev: really exclude device-mapper from block device ownership event locking
Arguments were wrong order, no?
This fixes commits:
e918a1b5a94f270186dca59156354acd2a596494
3d06f4183470d42361303086ed9dedd29c0ffc1b
Signed-off-by: Robert Milasan
From 47a3fa0f7679521b85f7aeba9e245c52cc7bb2cb Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen
Date: Wed, 4 Jun 2014 23:40:43 +0200 Subject: [PATCH] udev: check the return value from udev_enumerate_scan_devices
The return value from udev_enumerate_scan_devices was stored but
never used. I assume this was meant to be checked.
Signed-off-by: Robert Milasan
From f8a0bb5285024b6ce372c3157e761e6543ebdcd2 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson
Date: Fri, 13 Jun 2014 18:48:21 +0200 Subject: [PATCH] udev: fix invalid free() in enable_name_policy()
static bool enable_name_policy(...) in ./src/udev/net/link-config.c calls proc_cmdline(...) to get "line" initialized, but proc_cmdline(...) does not guarantee that atleast when both conditions (detect_container(NULL) > 0) and read_full_file(...) returned < 0. --- src/udev/net/link-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/udev/net/link-config.c src/udev/net/link-config.c index a9acc3d..7a9d01b 100644 --- src/udev/net/link-config.c +++ src/udev/net/link-config.c @@ -185,7 +185,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) { } static bool enable_name_policy(void) { - _cleanup_free_ char *line; + _cleanup_free_ char *line = NULL; char *w, *state; int r; size_t l; -- 1.7.9.2 ++++++ 1039-udevadm-settle-fixed-return-code-for-empty-queue.patch ++++++
From 83be2c398589a3d64db5999cfd5527c5219bff46 Mon Sep 17 00:00:00 2001 From: Harald Hoyer
Date: Tue, 20 May 2014 12:25:16 +0200 Subject: [PATCH] udevadm-settle: fixed return code for empty queue
If the udev queue is empty and "/run/udev/queue" does not exist, "udevadm settle" would return with EXIT_FAILURE, because the inotify on "/run/udev/queue" would fail with ENOENT. This patch lets "udevadm settle" exit with EXIT_SUCCESS in this case. --- src/udev/udevadm-settle.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c index 65fc35f..66fd843 100644 --- src/udev/udevadm-settle.c +++ src/udev/udevadm-settle.c @@ -116,7 +116,11 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) } if (inotify_add_watch(pfd[0].fd, "/run/udev/queue" , IN_DELETE) < 0) { - log_debug("watching /run/udev failed"); + /* If it does not exist, we don't have to wait */ + if (errno == ENOENT) + rc = EXIT_SUCCESS; + else + log_debug("watching /run/udev/queue failed"); goto out; } -- 1.7.9.2 ++++++ 1041-libudev-fix-udev_queue_get_queue_is_empty-logic.patch ++++++
From 45e60962b7965f32755a76b79a28126299aac149 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Fri, 27 Jun 2014 14:20:17 +0200 Subject: [PATCH] libudev: fix udev_queue_get_queue_is_empty() logic
---
src/libudev/libudev-queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/libudev/libudev-queue.c src/libudev/libudev-queue.c
index eb0e096..c32a7ef 100644
--- src/libudev/libudev-queue.c
+++ src/libudev/libudev-queue.c
@@ -175,7 +175,7 @@ _public_ int udev_queue_get_udev_is_active(struct udev_queue *udev_queue)
**/
_public_ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue)
{
- return access("/run/udev/queue", F_OK) >= 0;
+ return access("/run/udev/queue", F_OK) < 0;
}
/**
--
1.7.9.2
++++++ 1042-libudev-queue-provide-file-descriptor-to-watch-busy-.patch ++++++
Based on 14cb733684d3c3f50d088a3a370ddf8e8894dfa4 Mon Sep 17 00:00:00 2001
From: Kay Sievers
From 8a7a0c19edd2d971d4aa9d635f7978af841e8278 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Fri, 27 Jun 2014 19:54:45 +0200 Subject: [PATCH] libudev: queue - watch entire directory to allow the re-use of the watch descriptor
--- src/libudev/libudev-queue.c | 2 +- src/udev/udevadm-settle.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git src/libudev/libudev-queue.c src/libudev/libudev-queue.c index d4334b4..8ef1f3d 100644 --- src/libudev/libudev-queue.c +++ src/libudev/libudev-queue.c @@ -245,7 +245,7 @@ _public_ int udev_queue_get_fd(struct udev_queue *udev_queue) { if (fd < 0) return -errno; - r = inotify_add_watch(fd, "/run/udev/queue" , IN_DELETE); + r = inotify_add_watch(fd, "/run/udev" , IN_DELETE); if (r < 0) { r = -errno; close(fd); diff --git src/udev/udevadm-settle.c src/udev/udevadm-settle.c index 79e8b59..fa5b0c2 100644 --- src/udev/udevadm-settle.c +++ src/udev/udevadm-settle.c @@ -135,7 +135,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) } /* wake up when queue is empty */ - if (poll(pfd, 1, 100) > 0 && pfd[0].revents & POLLIN) + if (poll(pfd, 1, MSEC_PER_SEC) > 0 && pfd[0].revents & POLLIN) udev_queue_flush(queue); } -- 1.7.9.2 ++++++ 1044-rules-update-qemu-hid-rules.patch ++++++
From cd31d1884f1ecf38e11bc6268f446d75dfafbc25 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann
Date: Mon, 24 Mar 2014 12:07:41 +0100 Subject: [PATCH] rules: update qemu hid rules
Update comment to be a bit more specific.
Change match to blacklist the serial number of the broken devices
instead of whitelisting the serial number of the fixed devices.
This allows to do something useful with the serial number in the
future.
---
rules/42-usb-hid-pm.rules | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git rules/42-usb-hid-pm.rules rules/42-usb-hid-pm.rules
index 3fd6e8a..c675b5b 100644
--- rules/42-usb-hid-pm.rules
+++ rules/42-usb-hid-pm.rules
@@ -2,14 +2,15 @@
#
# Enable autosuspend for qemu emulated usb hid devices
-# Note that there are buggy qemu versions which advertise remote
-# wakeup support but don't actually implement it correctly. This
-# is the reason why we need a match for the serial number here.
-# The serial number "42" is used to tag the implementations where
+# Note that there are buggy qemu versions (0.13 & older) which
+# advertise remote wakeup support but don't actually implement
+# it correctly. This is the reason why we need a match for the
+# serial number here. Old, broken versions have serial "1".
+# It has been changed to "42" after fixing the bug to indicate
# remote wakeup is working.
-ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
-ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
-ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
+ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}!="1", TEST=="power/control", ATTR{power/control}="auto"
+ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}!="1", TEST=="power/control", ATTR{power/control}="auto"
+ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}!="1", TEST=="power/control", ATTR{power/control}="auto"
# Catch-all for Avocent HID devices. Keyed off interface in order to only
# trigger on HID class devices.
--
1.7.9.2
++++++ 1045-rules-don-t-enable-usb-pm-for-Avocent-devices.patch ++++++
Based on 52fb538361053f8c4abce0e40cd0bae3d28ceb16 Mon Sep 17 00:00:00 2001
From: Tom Hirst
From 01d4590b775661ebc71c7b81b0c62ccd69395268 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
Date: Wed, 2 Jul 2014 15:13:29 +0200 Subject: [PATCH] udev: net_setup_link builtin should print the reason why something fails
Let's tell users what is going wrong. --- src/udev/udev-builtin-net_setup_link.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git src/udev/udev-builtin-net_setup_link.c src/udev/udev-builtin-net_setup_link.c index 3cd384e..6207269 100644 --- src/udev/udev-builtin-net_setup_link.c +++ src/udev/udev-builtin-net_setup_link.c @@ -43,17 +43,17 @@ static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv r = link_config_get(ctx, dev, &link); if (r < 0) { if (r == -ENOENT) { - log_debug("No matching link configuration found"); + log_debug("No matching link configuration found."); return EXIT_SUCCESS; } else { - log_error("Could not get link config"); + log_error("Could not get link config: %s", strerror(-r)); return EXIT_FAILURE; } } r = link_config_apply(ctx, link, dev, &name); if (r < 0) { - log_error("Could not apply link config to %s", udev_device_get_sysname(dev)); + log_error("Could not apply link config to %s: %s", udev_device_get_sysname(dev), strerror(-r)); return EXIT_FAILURE; } @@ -77,18 +77,18 @@ static int builtin_net_setup_link_init(struct udev *udev) { if (r < 0) return r; - log_debug("Created link configuration context"); + log_debug("Created link configuration context."); return 0; } static void builtin_net_setup_link_exit(struct udev *udev) { link_config_ctx_free(ctx); ctx = NULL; - log_debug("Unloaded link configuration context"); + log_debug("Unloaded link configuration context."); } static bool builtin_net_setup_link_validate(struct udev *udev) { - log_debug("Check if link configuration needs reloading"); + log_debug("Check if link configuration needs reloading."); if (!ctx) return false; -- 1.7.9.2 ++++++ 1048-udev-net_setup_link-add-a-bit-more-logging.patch ++++++
From 866ee3682213789f85b877700457fdca05695a0e Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 3 Jul 2014 09:57:27 +0200 Subject: [PATCH] udev: net_setup_link - add a bit more logging
---
src/udev/net/link-config.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git src/udev/net/link-config.c src/udev/net/link-config.c
index 7a9d01b..b8650a6 100644
--- src/udev/net/link-config.c
+++ src/udev/net/link-config.c
@@ -92,14 +92,20 @@ static int link_config_ctx_connect(link_config_ctx *ctx) {
if (ctx->ethtool_fd == -1) {
r = ethtool_connect(&ctx->ethtool_fd);
- if (r < 0)
+ if (r < 0) {
+ log_warning("link_config: could not connect to ethtool: %s",
+ strerror(-r));
return r;
+ }
}
if (!ctx->rtnl) {
r = sd_rtnl_open(&ctx->rtnl, 0);
- if (r < 0)
+ if (r < 0) {
+ log_warning("link_config: could not connect to rtnl: %s",
+ strerror(-r));
return r;
+ }
}
return 0;
--
1.7.9.2
++++++ 1049-udev-link_config-ignore-errors-due-to-missing-MAC-ad.patch ++++++
Based on a669ea9860900d5cdebbc4cb9aaea72db7e28a02 Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From 30632d97d9d68c8202e562f34afae8f8d6e9c377 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Tue, 15 Jul 2014 17:35:53 +0200 Subject: [PATCH] rules: uaccess - add ID_SOFTWARE_RADIO
On Tue, Jul 15, 2014 at 1:52 PM, Alick Zhao
So maybe ID_SOFTWARE_RADIO ?
Hmm, SDR is more a term for a generic technology than for a device class. To me it does not really sound like an administrator would know what this is.
What exactly is the device or subsystem you want to make accessible to locally logged-in users only?
Initially it is bladeRF, but many more are of interest: USRP, rtl-sdr, HackRF, ... [1]
I agree an administrator might not know what SDR is, since it is currently still not widely known, and makes sense only for amateurs and researchers. But as a SDR fan, I see many new SDR peripherals are created recently, and expect to see more. So a generic ID seems reasonable to me.
[1] http://en.wikipedia.org/wiki/List_of_software-defined_radios
src/login/70-uaccess.rules | 3 +++ 1 file changed, 3 insertions(+) diff --git src/login/70-uaccess.rules src/login/70-uaccess.rules index 57f619d..694df2c 100644 --- src/login/70-uaccess.rules +++ src/login/70-uaccess.rules @@ -72,4 +72,7 @@ ENV{DDC_DEVICE}=="?*", TAG+="uaccess" # media player raw devices (for user-mode drivers, Android SDK, etc.) SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess" +# software-defined radio communication devices +ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess" + LABEL="uaccess_end" -- 1.7.9.2 ++++++ 1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch ++++++
From 2e5b17d01347d3c3118be2b8ad63d20415dbb1f0 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Thu, 24 Jul 2014 23:37:35 +0200 Subject: [PATCH] udev: exclude MD from block device ownership event locking
MD instantiates devices at open(). This is incomptible with the
locking logic, as the "change" event emitted when stopping a
device will bring it back.
---
src/udev/udevd.c | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git src/udev/udevd.c src/udev/udevd.c
index a45d324..db935d6 100644
--- src/udev/udevd.c
+++ src/udev/udevd.c
@@ -285,26 +285,17 @@ static void worker_new(struct event *event)
udev_event->exec_delay = exec_delay;
/*
- * Take a "read lock" on the device node; this establishes
+ * Take a shared lock on the device node; this establishes
* a concept of device "ownership" to serialize device
- * access. External processes holding a "write lock" will
+ * access. External processes holding an exclusive lock will
* cause udev to skip the event handling; in the case udev
- * acquired the lock, the external process will block until
+ * acquired the lock, the external process can block until
* udev has finished its event handling.
*/
-
- /*
- *
From 9719859c07aa13539ed2cd4b31972cd30f678543 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Tue, 29 Jul 2014 09:06:14 +0200 Subject: [PATCH] udevd: add --event-timeout commandline option
Some events take longer than the default 30 seconds. Killing those events will leave the machine halfway configured. Add a commandline option '--event-timeout' to handle these cases. --- man/systemd-udevd.service.xml | 19 +++++++++++++++++++ src/udev/udevd.c | 12 +++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git man/systemd-udevd.service.xml man/systemd-udevd.service.xml index f44b7a0..8de43b1 100644 --- man/systemd-udevd.service.xml +++ man/systemd-udevd.service.xml @@ -44,6 +44,7 @@ <arg><option>--debug</option></arg> <arg><option>--children-max=</option></arg> <arg><option>--exec-delay=</option></arg> + <arg><option>--event-timeout=</option></arg> <arg><option>--resolve-names=early|late|never</option></arg> <arg><option>--version</option></arg> <arg><option>--help</option></arg> @@ -96,6 +97,15 @@ </varlistentry> <varlistentry> + <term><option>--event-timeout=</option></term> + <listitem> + <para>Wait for the event to finish up to the given + number of seconds. After this time the event will + be terminated. Default is 30.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>--resolve-names=</option></term> <listitem> <para>Specify when systemd-udevd should resolve names of users and groups. @@ -156,6 +166,15 @@ </listitem> </varlistentry> <varlistentry> + <term><varname>udev.event-timeout=</varname></term> + <term><varname>rd.udev.event-timeout=</varname></term> + <listitem> + <para>Wait for events to finish up to the given number + of seconds. This option might be useful if events are + terminated due to a timeout in large configurations.</para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>net.ifnames=</varname></term> <listitem> <para>Network interfaces are renamed to give them predictable names diff --git src/udev/udevd.c src/udev/udevd.c index db935d6..c5dd739 100644 --- src/udev/udevd.c +++ src/udev/udevd.c @@ -74,6 +74,7 @@ static bool reload; static int children; static int children_max; static int exec_delay; +static int event_timeout = 30; static sigset_t sigmask_orig; static UDEV_LIST(event_list); static UDEV_LIST(worker_list); @@ -312,6 +313,9 @@ static void worker_new(struct event *event) } } + if (event_timeout != 30) + udev_event->timeout_usec = event_timeout * USEC_PER_SEC; + /* apply rules, create node, symlinks */ udev_event_execute_rules(udev_event, rules, &sigmask_orig); @@ -1009,6 +1013,8 @@ static void kernel_cmdline_options(struct udev *udev) children_max = strtoul(opt + 18, NULL, 0); } else if (startswith(opt, "udev.exec-delay=")) { exec_delay = strtoul(opt + 16, NULL, 0); + } else if (startswith(opt, "udev.event-timeout=")) { + event_timeout = strtoul(opt + 16, NULL, 0); } free(s); @@ -1026,6 +1032,7 @@ int main(int argc, char *argv[]) { "debug", no_argument, NULL, 'D' }, { "children-max", required_argument, NULL, 'c' }, { "exec-delay", required_argument, NULL, 'e' }, + { "event-timeout", required_argument, NULL, 't' }, { "resolve-names", required_argument, NULL, 'N' }, { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, @@ -1069,6 +1076,9 @@ int main(int argc, char *argv[]) case 'e': exec_delay = strtoul(optarg, NULL, 0); break; + case 't': + event_timeout = strtoul(optarg, NULL, 0); + break; case 'D': debug = true; log_set_max_level(LOG_DEBUG); @@ -1406,7 +1416,7 @@ int main(int argc, char *argv[]) if (worker->state != WORKER_RUNNING) continue; - if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * USEC_PER_SEC) { + if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > event_timeout * USEC_PER_SEC) { log_error("worker [%u] %s timeout; kill it", worker->pid, worker->event ? worker->event->devpath : "<idle>"); kill(worker->pid, SIGKILL); -- 1.7.9.2 ++++++ 1057-udev-unify-event-timeout-handling.patch ++++++
From dd5eddd28a74a49607a8fffcaf960040dba98479 Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Tue, 29 Jul 2014 15:18:27 +0200 Subject: [PATCH] udev: unify event timeout handling
---
man/systemd-udevd.service.xml | 7 +++---
man/udev.xml | 7 ------
src/test/test-udev.c | 5 ++--
src/udev/udev-event.c | 53 ++++++++++++++++++++++-------------------
src/udev/udev-rules.c | 38 ++++++++---------------------
src/udev/udev.h | 8 +++----
src/udev/udevadm-test.c | 2 +-
src/udev/udevd.c | 32 ++++++++++---------------
8 files changed, 61 insertions(+), 91 deletions(-)
diff --git man/systemd-udevd.service.xml man/systemd-udevd.service.xml
index 8de43b1..3053dc7 100644
--- man/systemd-udevd.service.xml
+++ man/systemd-udevd.service.xml
@@ -99,9 +99,8 @@
<varlistentry>
<term><option>--event-timeout=</option></term>
<listitem>
- <para>Wait for the event to finish up to the given
- number of seconds. After this time the event will
- be terminated. Default is 30.</para>
+ <para>Set the number of seconds to wait for events to finish. After
+ this time the event will be terminated. The default is 30 seconds.</para>
</listitem>
</varlistentry>
@@ -171,7 +170,7 @@
<listitem>
<para>Wait for events to finish up to the given number
of seconds. This option might be useful if events are
- terminated due to a timeout in large configurations.</para>
+ terminated due to kernel drivers taking too long to initialize.</para>
</listitem>
</varlistentry>
<varlistentry>
diff --git man/udev.xml man/udev.xml
index 4e5f8f0..123c073 100644
--- man/udev.xml
+++ man/udev.xml
@@ -516,13 +516,6 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><option>event_timeout=</option></term>
- <listitem>
- <para>Number of seconds an event waits for operations to finish before
- giving up and terminating itself.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><option>string_escape=<replaceable>none|replace</replaceable></option></term>
<listitem>
<para>Usually control and other possibly unsafe characters are replaced
diff --git src/test/test-udev.c src/test/test-udev.c
index b057cc8..26d6537 100644
--- src/test/test-udev.c
+++ src/test/test-udev.c
@@ -80,7 +80,6 @@ out:
return err;
}
-
int main(int argc, char *argv[]) {
_cleanup_udev_unref_ struct udev *udev = NULL;
_cleanup_udev_event_unref_ struct udev_event *event = NULL;
@@ -155,8 +154,8 @@ int main(int argc, char *argv[]) {
}
}
- udev_event_execute_rules(event, rules, &sigmask_orig);
- udev_event_execute_run(event, NULL);
+ udev_event_execute_rules(event, USEC_PER_SEC, rules, &sigmask_orig);
+ udev_event_execute_run(event, USEC_PER_SEC, NULL);
out:
if (event != NULL && event->fd_signal >= 0)
close(event->fd_signal);
diff --git src/udev/udev-event.c src/udev/udev-event.c
index 5213a4a..6ad80d5 100644
--- src/udev/udev-event.c
+++ src/udev/udev-event.c
@@ -48,7 +48,6 @@ struct udev_event *udev_event_new(struct udev_device *dev)
udev_list_init(udev, &event->seclabel_list, false);
event->fd_signal = -1;
event->birth_usec = now(CLOCK_MONOTONIC);
- event->timeout_usec = 30 * 1000 * 1000;
return event;
}
@@ -422,9 +421,10 @@ static int spawn_exec(struct udev_event *event,
}
static void spawn_read(struct udev_event *event,
- const char *cmd,
- int fd_stdout, int fd_stderr,
- char *result, size_t ressize)
+ usec_t timeout_usec,
+ const char *cmd,
+ int fd_stdout, int fd_stderr,
+ char *result, size_t ressize)
{
size_t respos = 0;
int fd_ep = -1;
@@ -467,15 +467,15 @@ static void spawn_read(struct udev_event *event,
struct epoll_event ev[4];
int i;
- if (event->timeout_usec > 0) {
+ if (timeout_usec > 0) {
usec_t age_usec;
age_usec = now(CLOCK_MONOTONIC) - event->birth_usec;
- if (age_usec >= event->timeout_usec) {
+ if (age_usec >= timeout_usec) {
log_error("timeout '%s'", cmd);
goto out;
}
- timeout = ((event->timeout_usec - age_usec) / 1000) + 1000;
+ timeout = ((timeout_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
} else {
timeout = -1;
}
@@ -543,8 +543,9 @@ out:
close(fd_ep);
}
-static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid)
-{
+static int spawn_wait(struct udev_event *event,
+ usec_t timeout_usec,
+ const char *cmd, pid_t pid) {
struct pollfd pfd[1];
int err = 0;
@@ -555,14 +556,14 @@ static int spawn_wait(struct udev_event *event, const char *cmd, pid_t pid)
int timeout;
int fdcount;
- if (event->timeout_usec > 0) {
+ if (timeout_usec > 0) {
usec_t age_usec;
age_usec = now(CLOCK_MONOTONIC) - event->birth_usec;
- if (age_usec >= event->timeout_usec)
+ if (age_usec >= timeout_usec)
timeout = 1000;
else
- timeout = ((event->timeout_usec - age_usec) / 1000) + 1000;
+ timeout = ((timeout_usec - age_usec) / USEC_PER_MSEC) + MSEC_PER_SEC;
} else {
timeout = -1;
}
@@ -657,9 +658,9 @@ out:
}
int udev_event_spawn(struct udev_event *event,
+ usec_t timeout_usec,
const char *cmd, char **envp, const sigset_t *sigmask,
- char *result, size_t ressize)
-{
+ char *result, size_t ressize) {
struct udev *udev = event->udev;
int outpipe[2] = {-1, -1};
int errpipe[2] = {-1, -1};
@@ -728,11 +729,13 @@ int udev_event_spawn(struct udev_event *event,
errpipe[WRITE_END] = -1;
}
- spawn_read(event, cmd,
- outpipe[READ_END], errpipe[READ_END],
- result, ressize);
+ spawn_read(event,
+ timeout_usec,
+ cmd,
+ outpipe[READ_END], errpipe[READ_END],
+ result, ressize);
- err = spawn_wait(event, cmd, pid);
+ err = spawn_wait(event, timeout_usec, cmd, pid);
}
out:
@@ -776,8 +779,9 @@ static int rename_netif(struct udev_event *event)
return r;
}
-void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask)
-{
+void udev_event_execute_rules(struct udev_event *event,
+ usec_t timeout_usec,
+ struct udev_rules *rules, const sigset_t *sigmask) {
struct udev_device *dev = event->dev;
if (udev_device_get_subsystem(dev) == NULL)
@@ -791,7 +795,7 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
if (major(udev_device_get_devnum(dev)) != 0)
udev_watch_end(event->udev, dev);
- udev_rules_apply_to_event(rules, event, sigmask);
+ udev_rules_apply_to_event(rules, event, timeout_usec, sigmask);
if (major(udev_device_get_devnum(dev)) != 0)
udev_node_remove(dev);
@@ -808,7 +812,7 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
udev_watch_end(event->udev, event->dev_db);
}
- udev_rules_apply_to_event(rules, event, sigmask);
+ udev_rules_apply_to_event(rules, event, timeout_usec, sigmask);
/* rename a new network interface, if needed */
if (udev_device_get_ifindex(dev) > 0 && streq(udev_device_get_action(dev), "add") &&
@@ -883,8 +887,7 @@ void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules
}
}
-void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
-{
+void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, const sigset_t *sigmask) {
struct udev_list_entry *list_entry;
udev_list_entry_foreach(list_entry, udev_list_get_entry(&event->run_list)) {
@@ -907,7 +910,7 @@ void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
udev_event_apply_format(event, cmd, program, sizeof(program));
envp = udev_device_get_properties_envp(event->dev);
- udev_event_spawn(event, program, envp, sigmask, NULL, 0);
+ udev_event_spawn(event, timeout_usec, program, envp, sigmask, NULL, 0);
}
}
}
diff --git src/udev/udev-rules.c src/udev/udev-rules.c
index 9864016..aacde38 100644
--- src/udev/udev-rules.c
+++ src/udev/udev-rules.c
@@ -137,7 +137,6 @@ enum token_type {
TK_M_PARENTS_MAX,
TK_M_TEST, /* val, mode_t */
- TK_M_EVENT_TIMEOUT, /* int */
TK_M_PROGRAM, /* val */
TK_M_IMPORT_FILE, /* val */
TK_M_IMPORT_PROG, /* val */
@@ -201,7 +200,6 @@ struct token {
uid_t uid;
gid_t gid;
int devlink_prio;
- int event_timeout;
int watch;
enum udev_builtin_cmd builtin_cmd;
};
@@ -275,7 +273,6 @@ static const char *token_str(enum token_type type)
[TK_M_PARENTS_MAX] = "M PARENTS_MAX",
[TK_M_TEST] = "M TEST",
- [TK_M_EVENT_TIMEOUT] = "M EVENT_TIMEOUT",
[TK_M_PROGRAM] = "M PROGRAM",
[TK_M_IMPORT_FILE] = "M IMPORT_FILE",
[TK_M_IMPORT_PROG] = "M IMPORT_PROG",
@@ -409,9 +406,6 @@ static void dump_token(struct udev_rules *rules, struct token *token)
case TK_A_SECLABEL:
log_debug("%s %s '%s' '%s'", token_str(type), operation_str(op), attr, value);
break;
- case TK_M_EVENT_TIMEOUT:
- log_debug("%s %u", token_str(type), token->key.event_timeout);
- break;
case TK_A_GOTO:
log_debug("%s '%s' %u", token_str(type), value, token->key.rule_goto);
break;
@@ -627,8 +621,9 @@ static int import_file_into_properties(struct udev_device *dev, const char *file
return 0;
}
-static int import_program_into_properties(struct udev_event *event, const char *program, const sigset_t *sigmask)
-{
+static int import_program_into_properties(struct udev_event *event,
+ usec_t timeout_usec,
+ const char *program, const sigset_t *sigmask) {
struct udev_device *dev = event->dev;
char **envp;
char result[UTIL_LINE_SIZE];
@@ -636,7 +631,7 @@ static int import_program_into_properties(struct udev_event *event, const char *
int err;
envp = udev_device_get_properties_envp(dev);
- err = udev_event_spawn(event, program, envp, sigmask, result, sizeof(result));
+ err = udev_event_spawn(event, timeout_usec, program, envp, sigmask, result, sizeof(result));
if (err < 0)
return err;
@@ -942,9 +937,6 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
case TK_A_MODE_ID:
token->key.mode = *(mode_t *)data;
break;
- case TK_M_EVENT_TIMEOUT:
- token->key.event_timeout = *(int *)data;
- break;
case TK_RULE:
case TK_M_PARENTS_MIN:
case TK_M_PARENTS_MAX:
@@ -1462,14 +1454,6 @@ static int add_rule(struct udev_rules *rules, char *line,
rule_add_key(&rule_tmp, TK_A_DEVLINK_PRIO, op, NULL, &prio);
}
- pos = strstr(value, "event_timeout=");
- if (pos != NULL) {
- int tout = atoi(&pos[strlen("event_timeout=")]);
-
- rule_add_key(&rule_tmp, TK_M_EVENT_TIMEOUT, op, NULL, &tout);
- }
-
- pos = strstr(value, "string_escape=");
if (pos != NULL) {
pos = &pos[strlen("string_escape=")];
if (startswith(pos, "none"))
@@ -1829,8 +1813,10 @@ enum escape_type {
ESCAPE_REPLACE,
};
-int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, const sigset_t *sigmask)
-{
+int udev_rules_apply_to_event(struct udev_rules *rules,
+ struct udev_event *event,
+ usec_t timeout_usec,
+ const sigset_t *sigmask) {
struct token *cur;
struct token *rule;
enum escape_type esc = ESCAPE_UNSET;
@@ -2024,10 +2010,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
goto nomatch;
break;
}
- case TK_M_EVENT_TIMEOUT:
- log_debug("OPTIONS event_timeout=%u", cur->key.event_timeout);
- event->timeout_usec = cur->key.event_timeout * 1000 * 1000;
- break;
case TK_M_PROGRAM: {
char program[UTIL_PATH_SIZE];
char **envp;
@@ -2042,7 +2024,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
rules_str(rules, rule->rule.filename_off),
rule->rule.filename_line);
- if (udev_event_spawn(event, program, envp, sigmask, result, sizeof(result)) < 0) {
+ if (udev_event_spawn(event, timeout_usec, program, envp, sigmask, result, sizeof(result)) < 0) {
if (cur->key.op != OP_NOMATCH)
goto nomatch;
} else {
@@ -2078,7 +2060,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
rules_str(rules, rule->rule.filename_off),
rule->rule.filename_line);
- if (import_program_into_properties(event, import, sigmask) != 0)
+ if (import_program_into_properties(event, timeout_usec, import, sigmask) != 0)
if (cur->key.op != OP_NOMATCH)
goto nomatch;
break;
diff --git src/udev/udev.h src/udev/udev.h
index 62538bc..4aca70b 100644
--- src/udev/udev.h
+++ src/udev/udev.h
@@ -43,7 +43,6 @@ struct udev_event {
struct udev_list run_list;
int exec_delay;
usec_t birth_usec;
- usec_t timeout_usec;
int fd_signal;
unsigned int builtin_run;
unsigned int builtin_ret;
@@ -72,7 +71,7 @@ struct udev_rules;
struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names);
struct udev_rules *udev_rules_unref(struct udev_rules *rules);
bool udev_rules_check_timestamp(struct udev_rules *rules);
-int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, const sigset_t *sigmask);
+int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, usec_t timeout_usec, const sigset_t *sigmask);
int udev_rules_apply_static_dev_perms(struct udev_rules *rules);
/* udev-event.c */
@@ -82,10 +81,11 @@ size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string,
char *result, size_t maxsize, int read_value);
int udev_event_spawn(struct udev_event *event,
+ usec_t timeout_usec,
const char *cmd, char **envp, const sigset_t *sigmask,
char *result, size_t ressize);
-void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset);
-void udev_event_execute_run(struct udev_event *event, const sigset_t *sigset);
+void udev_event_execute_rules(struct udev_event *event, usec_t timeout_usec, struct udev_rules *rules, const sigset_t *sigset);
+void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, const sigset_t *sigset);
int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]);
/* udev-watch.c */
diff --git src/udev/udevadm-test.c src/udev/udevadm-test.c
index 6a2f548..52cc26c 100644
--- src/udev/udevadm-test.c
+++ src/udev/udevadm-test.c
@@ -138,7 +138,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[])
goto out;
}
- udev_event_execute_rules(event, rules, &sigmask_orig);
+ udev_event_execute_rules(event, 30 * USEC_PER_SEC, rules, &sigmask_orig);
udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
printf("%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
diff --git src/udev/udevd.c src/udev/udevd.c
index c5dd739..dee7a87 100644
--- src/udev/udevd.c
+++ src/udev/udevd.c
@@ -74,7 +74,7 @@ static bool reload;
static int children;
static int children_max;
static int exec_delay;
-static int event_timeout = 30;
+static usec_t event_timeout_usec = 30 * USEC_PER_SEC;
static sigset_t sigmask_orig;
static UDEV_LIST(event_list);
static UDEV_LIST(worker_list);
@@ -313,13 +313,10 @@ static void worker_new(struct event *event)
}
}
- if (event_timeout != 30)
- udev_event->timeout_usec = event_timeout * USEC_PER_SEC;
-
/* apply rules, create node, symlinks */
- udev_event_execute_rules(udev_event, rules, &sigmask_orig);
+ udev_event_execute_rules(udev_event, event_timeout_usec, rules, &sigmask_orig);
- udev_event_execute_run(udev_event, &sigmask_orig);
+ udev_event_execute_run(udev_event, event_timeout_usec, &sigmask_orig);
/* apply/restore inotify watch */
if (udev_event->inotify_watch) {
@@ -1014,15 +1011,14 @@ static void kernel_cmdline_options(struct udev *udev)
} else if (startswith(opt, "udev.exec-delay=")) {
exec_delay = strtoul(opt + 16, NULL, 0);
} else if (startswith(opt, "udev.event-timeout=")) {
- event_timeout = strtoul(opt + 16, NULL, 0);
+ event_timeout_usec = strtoul(opt + 16, NULL, 0) * USEC_PER_SEC;
}
free(s);
}
}
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
struct udev *udev;
sigset_t mask;
int daemonize = false;
@@ -1077,7 +1073,7 @@ int main(int argc, char *argv[])
exec_delay = strtoul(optarg, NULL, 0);
break;
case 't':
- event_timeout = strtoul(optarg, NULL, 0);
+ event_timeout_usec = strtoul(optarg, NULL, 0) * USEC_PER_SEC;
break;
case 'D':
debug = true;
@@ -1103,6 +1099,7 @@ int main(int argc, char *argv[])
" --debug\n"
" --children-max=<maximum number of workers>\n"
" --exec-delay=
From 9f20a8a376f924c8eb5423cfc1f98644fc1e2d1a Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Wed, 30 Jul 2014 10:10:46 +0200 Subject: [PATCH] udev: fixup commit dd5eddd28a74a49607a8fffcaf960040dba98479
Commit dd5eddd28a74a49607a8fffcaf960040dba98479 accidentally removed one line too many. --- src/udev/udev-rules.c | 1 + 1 file changed, 1 insertion(+) diff --git src/udev/udev-rules.c src/udev/udev-rules.c index 59bc124..cc56215 100644 --- src/udev/udev-rules.c +++ src/udev/udev-rules.c @@ -1436,6 +1436,7 @@ static int add_rule(struct udev_rules *rules, char *line, rule_add_key(&rule_tmp, TK_A_DEVLINK_PRIO, op, NULL, &prio); } + pos = strstr(value, "string_escape="); if (pos != NULL) { pos = &pos[strlen("string_escape=")]; if (startswith(pos, "none")) -- 1.7.9.2 ++++++ 1061-rules-allow-systemd-to-manage-loop-device-partitions.patch ++++++
From b5df2eabf3fdd3e1663bc4c948812472084f3e96 Mon Sep 17 00:00:00 2001 From: Kevin Wells
Date: Thu, 31 Jul 2014 17:38:21 +0200 Subject: [PATCH] rules: allow systemd to manage loop device partitions
SYSTEMD_READY is currently set to 0 for all loop devices (loop[0-9]*)
that do not have a backing_file. Partitioned loop devices (ex. loop0p1),
however, are matched by this rule and excluded by systemd even though
they are active devices.
This change adds an additional check to the rule, ensuring that only
top level loop devices (loop[0-9]+$) are excluded from systemd.
---
rules/99-systemd.rules.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git rules/99-systemd.rules.in rules/99-systemd.rules.in
index c3ef81b..aa435c4 100644
--- rules/99-systemd.rules.in
+++ rules/99-systemd.rules.in
@@ -23,7 +23,7 @@ SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state",
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
# Ignore loop devices that don't have any file attached
-SUBSYSTEM=="block", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
+SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
# Ignore nbd devices in the "add" event, with "change" the nbd is ready
ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0"
--
1.7.9.2
++++++ 1063-udev-path_id-suppress-ID_PATH-for-devices-with-an-un.patch ++++++
Based on e98bbfd2074e2b1079b7059341eac25741baf319 Mon Sep 17 00:00:00 2001
From: Kay Sievers
From 77cf759ea05bea476cdcb8d0dcd04c4e6fb3b2ff Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Tue, 26 Aug 2014 18:27:36 +0200 Subject: [PATCH] udev: hwdb - do not look at "usb_device" parents
Based on a patch from Simon McVittie
From 2e92633dbae52f5ac9b7b2e068935990d475d2cd Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Sat, 30 Aug 2014 11:36:32 +0200 Subject: [PATCH] udev: bump event timeout to 60 seconds
--- src/udev/udevadm-test.c | 2 +- src/udev/udevd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git src/udev/udevadm-test.c src/udev/udevadm-test.c index 8486049..809adb6 100644 --- src/udev/udevadm-test.c +++ src/udev/udevadm-test.c @@ -136,7 +136,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) { goto out; } - udev_event_execute_rules(event, 30 * USEC_PER_SEC, rules, &sigmask_orig); + udev_event_execute_rules(event, 60 * USEC_PER_SEC, rules, &sigmask_orig); udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev)) printf("%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry)); diff --git src/udev/udevd.c src/udev/udevd.c index 9c2b0d5..e72c5b2 100644 --- src/udev/udevd.c +++ src/udev/udevd.c @@ -73,7 +73,7 @@ static bool reload; static int children; static int children_max; static int exec_delay; -static usec_t event_timeout_usec = 30 * USEC_PER_SEC; +static usec_t event_timeout_usec = 60 * USEC_PER_SEC; static sigset_t sigmask_orig; static UDEV_LIST(event_list); static UDEV_LIST(worker_list); -- 1.7.9.2 ++++++ 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch ++++++ --- /var/tmp/diff_new_pack.tGwpSJ/_old 2015-03-09 09:21:04.000000000 +0100 +++ /var/tmp/diff_new_pack.tGwpSJ/_new 2015-03-09 09:21:04.000000000 +0100 @@ -18,10 +18,8 @@ src/udev/scsi_id/scsi_serial.c | 19 +++++++++++++------ 4 files changed, 32 insertions(+), 7 deletions(-) -Index: systemd/rules/60-persistent-storage.rules -=================================================================== ---- systemd.orig/rules/60-persistent-storage.rules -+++ systemd/rules/60-persistent-storage.rules +--- a/rules/60-persistent-storage.rules ++++ b/rules/60-persistent-storage.rules @@ -46,6 +46,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" @@ -33,11 +31,9 @@ # firewire KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" -Index: systemd/src/udev/scsi_id/scsi_id.c -=================================================================== ---- systemd.orig/src/udev/scsi_id/scsi_id.c -+++ systemd/src/udev/scsi_id/scsi_id.c -@@ -43,6 +43,7 @@ static const struct option options[] = { +--- a/src/udev/scsi_id/scsi_id.c ++++ b/src/udev/scsi_id/scsi_id.c +@@ -44,6 +44,7 @@ static const struct option options[] = { { "replace-whitespace", no_argument, NULL, 'u' }, { "sg-version", required_argument, NULL, 's' }, { "verbose", no_argument, NULL, 'v' }, @@ -45,24 +41,24 @@ { "version", no_argument, NULL, 'V' }, /* don't advertise -V */ { "export", no_argument, NULL, 'x' }, { "help", no_argument, NULL, 'h' }, -@@ -54,6 +55,7 @@ static bool dev_specified = false; - static char config_file[MAX_PATH_LEN] = "/etc/scsi_id.config"; +@@ -56,6 +57,7 @@ static char config_file[MAX_PATH_LEN] = static enum page_code default_page_code = PAGE_UNSPECIFIED; static int sg_version = 4; + static int debug = 0; +static bool compat_truncated = false; static bool reformat_serial = false; static bool export = false; static char vendor_str[64]; -@@ -316,6 +318,7 @@ static void help(void) { - " -g --whitelisted Treat device as whitelisted\n" - " -u --replace-whitespace Replace all whitespace by underscores\n" - " -v --verbose Verbose logging\n" +@@ -323,6 +325,7 @@ static void help(void) { + " -g,--whitelisted threat device as whitelisted\n" + " -u,--replace-whitespace replace all whitespace by underscores\n" + " -v,--verbose verbose logging\n" + " --truncated-serial truncated serial for compatibility with systems configured with by-id links created by udev < 184\n" - " -x --export Print values as environment keys\n" - , program_invocation_short_name); - -@@ -387,6 +390,10 @@ static int set_options(struct udev *udev - log_open(); + " --version print version\n" + " -x,--export print values as environment keys\n" + " -h,--help print this help text\n\n"); +@@ -393,6 +396,10 @@ static int set_options(struct udev *udev + debug++; break; + case '9': @@ -72,7 +68,7 @@ case 'V': printf("%s\n", VERSION); exit(0); -@@ -528,6 +535,9 @@ static int scsi_id(struct udev *udev, ch +@@ -535,6 +542,9 @@ static int scsi_id(struct udev *udev, ch util_replace_whitespace(dev_scsi.serial, serial_str, sizeof(serial_str)); util_replace_chars(serial_str, NULL); printf("ID_SERIAL=%s\n", serial_str); @@ -82,7 +78,7 @@ util_replace_whitespace(dev_scsi.serial_short, serial_str, sizeof(serial_str)); util_replace_chars(serial_str, NULL); printf("ID_SERIAL_SHORT=%s\n", serial_str); -@@ -558,7 +568,10 @@ static int scsi_id(struct udev *udev, ch +@@ -565,7 +575,10 @@ static int scsi_id(struct udev *udev, ch if (reformat_serial) { char serial_str[MAX_SERIAL_LEN]; @@ -94,10 +90,8 @@ util_replace_chars(serial_str, NULL); printf("%s\n", serial_str); goto out; -Index: systemd/src/udev/scsi_id/scsi_id.h -=================================================================== ---- systemd.orig/src/udev/scsi_id/scsi_id.h -+++ systemd/src/udev/scsi_id/scsi_id.h +--- a/src/udev/scsi_id/scsi_id.h ++++ b/src/udev/scsi_id/scsi_id.h @@ -43,6 +43,7 @@ struct scsi_id_device { char kernel[64]; char serial[MAX_SERIAL_LEN]; @@ -106,11 +100,9 @@ int use_sg; /* Always from page 0x80 e.g. 'B3G1P8500RWT' - may not be unique */ -Index: systemd/src/udev/scsi_id/scsi_serial.c -=================================================================== ---- systemd.orig/src/udev/scsi_id/scsi_serial.c -+++ systemd/src/udev/scsi_id/scsi_serial.c -@@ -96,7 +96,8 @@ static const char hex_str[]="0123456789a +--- a/src/udev/scsi_id/scsi_serial.c ++++ b/src/udev/scsi_id/scsi_serial.c +@@ -97,7 +97,8 @@ static const char hex_str[]="0123456789a static int do_scsi_page80_inquiry(struct udev *udev, struct scsi_id_device *dev_scsi, int fd, @@ -120,7 +112,7 @@ static int sg_err_category_new(struct udev *udev, int scsi_status, int msg_status, int -@@ -619,7 +620,7 @@ static int do_scsi_page83_inquiry(struct +@@ -620,7 +621,7 @@ static int do_scsi_page83_inquiry(struct unsigned char page_83[SCSI_INQ_BUFF_LEN]; /* also pick up the page 80 serial number */ @@ -129,7 +121,7 @@ memzero(page_83, SCSI_INQ_BUFF_LEN); retval = scsi_inquiry(udev, dev_scsi, fd, 1, PAGE_83, page_83, -@@ -764,7 +765,8 @@ static int do_scsi_page83_prespc3_inquir +@@ -765,7 +766,8 @@ static int do_scsi_page83_prespc3_inquir /* Get unit serial number VPD page */ static int do_scsi_page80_inquiry(struct udev *udev, struct scsi_id_device *dev_scsi, int fd, @@ -139,7 +131,7 @@ { int retval; int ser_ind; -@@ -798,9 +800,14 @@ static int do_scsi_page80_inquiry(struct +@@ -799,9 +801,14 @@ static int do_scsi_page80_inquiry(struct ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]); if (ser_ind < 0) return 1; @@ -155,7 +147,7 @@ } if (serial_short != NULL) { memcpy(serial_short, &buf[4], len); -@@ -876,7 +883,7 @@ int scsi_get_serial(struct udev *udev, +@@ -877,7 +884,7 @@ int scsi_get_serial(struct udev *udev, return 1; if (page_code == PAGE_80) { @@ -164,7 +156,7 @@ retval = 1; goto completed; } else { -@@ -950,7 +957,7 @@ int scsi_get_serial(struct udev *udev, +@@ -951,7 +958,7 @@ int scsi_get_serial(struct udev *udev, for (ind = 4; ind <= page0[3] + 3; ind++) if (page0[ind] == PAGE_80) if (!do_scsi_page80_inquiry(udev, dev_scsi, fd, ++++++ 1067-udev-always-resolve-correctly-database-names-on-chan.patch ++++++
From 368082520b25722575783f06879fb5fc2e4c219c Mon Sep 17 00:00:00 2001 From: Robert Milasan
Date: Sat, 13 Sep 2014 15:18:37 +0200 Subject: [PATCH] udev: always resolve correctly database names on 'change' event
From ad6e5b348fa88f44d6cbfe7aabda7612a1d0463f Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Mon, 8 Sep 2014 14:00:58 +0200 Subject: [PATCH] udev: net_setup_link - export the .link filename applied to
Signed-off-by: Robert Milasan
From e4d7c49050769877c7f10184bbe2a1e77d0b5333 Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Mon, 8 Sep 2014 17:16:24 +0200 Subject: [PATCH] rules: net-setup-link - preserve ID_NET_LINK_FILE and ID_NET_NAME after MOVE
--- rules/80-net-setup-link.rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git rules/80-net-setup-link.rules rules/80-net-setup-link.rules index f390fcb..27c43b9 100644 --- rules/80-net-setup-link.rules +++ rules/80-net-setup-link.rules @@ -4,7 +4,8 @@ SUBSYSTEM!="net", GOTO="net_setup_link_end" IMPORT{builtin}="path_id" -ACTION=="move", IMPORT{db}="ID_NET_DRIVER" +ACTION=="move", IMPORT{db}="ID_NET_DRIVER", IMPORT{db}="ID_NET_LINK_FILE", +IMPORT{db}="ID_NET_NAME" ACTION!="add", GOTO="net_setup_link_end" -- 1.7.9.2 ++++++ 1070-rules-net-setup-link-remove-stray-linebreak.patch ++++++
From 52e231b04635400292179cf51b30d7d9b6323fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?=
Date: Mon, 8 Sep 2014 22:53:39 +0300 Subject: [PATCH] rules: net-setup-link - remove stray linebreak
If not backslash-escaped, it splits the rule in two. --- rules/80-net-setup-link.rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git rules/80-net-setup-link.rules rules/80-net-setup-link.rules index 27c43b9..4207694 100644 --- rules/80-net-setup-link.rules +++ rules/80-net-setup-link.rules @@ -4,8 +4,7 @@ SUBSYSTEM!="net", GOTO="net_setup_link_end" IMPORT{builtin}="path_id" -ACTION=="move", IMPORT{db}="ID_NET_DRIVER", IMPORT{db}="ID_NET_LINK_FILE", -IMPORT{db}="ID_NET_NAME" +ACTION=="move", IMPORT{db}="ID_NET_DRIVER", IMPORT{db}="ID_NET_LINK_FILE", IMPORT{db}="ID_NET_NAME" ACTION!="add", GOTO="net_setup_link_end" -- 1.7.9.2 ++++++ 1071-udev-import-the-full-db-on-MOVE-events-for-devices-w.patch ++++++
From b081b27e1433cdc7ac72b25ae8b4db887d79187f Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Tue, 9 Sep 2014 12:23:19 +0200 Subject: [PATCH] udev: import the full db on MOVE events for devices without dev_t
---
rules/80-net-setup-link.rules | 2 --
src/udev/udev-event.c | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git rules/80-net-setup-link.rules rules/80-net-setup-link.rules
index 4207694..6e411a9 100644
--- rules/80-net-setup-link.rules
+++ rules/80-net-setup-link.rules
@@ -4,8 +4,6 @@ SUBSYSTEM!="net", GOTO="net_setup_link_end"
IMPORT{builtin}="path_id"
-ACTION=="move", IMPORT{db}="ID_NET_DRIVER", IMPORT{db}="ID_NET_LINK_FILE", IMPORT{db}="ID_NET_NAME"
-
ACTION!="add", GOTO="net_setup_link_end"
IMPORT{builtin}="net_setup_link"
diff --git src/udev/udev-event.c src/udev/udev-event.c
index 00cd6d4..18b92ca 100644
--- src/udev/udev-event.c
+++ src/udev/udev-event.c
@@ -805,6 +805,22 @@ void udev_event_execute_rules(struct udev_event *event,
udev_watch_end(event->udev, event->dev_db);
}
+ if (major(udev_device_get_devnum(dev)) == 0 &&
+ streq(udev_device_get_action(dev), "move")) {
+ struct udev_list_entry *entry;
+
+ for ((entry = udev_device_get_properties_list_entry(event->dev_db)); entry; entry = udev_list_entry_get_next(entry)) {
+ const char *key, *value;
+ struct udev_list_entry *property;
+
+ key = udev_list_entry_get_name(entry);
+ value = udev_list_entry_get_value(entry);
+
+ property = udev_device_add_property(event->dev, key, value);
+ udev_list_entry_set_num(property, true);
+ }
+ }
+
udev_rules_apply_to_event(rules, event, timeout_usec, sigmask);
/* rename a new network interface, if needed */
--
1.7.9.2
++++++ 1072-udev-netif_rename-don-t-log-to-kmsg.patch ++++++
Based on 1187f20655de0c37337ea73e1e55823b83cd7c00 Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From ec3281d3b681b002dfe1a4bea0532a504e37557a Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Wed, 10 Sep 2014 07:59:22 +0200 Subject: [PATCH] udev: fix copy-paste error in log message
--- src/udev/udev-rules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/udev/udev-rules.c src/udev/udev-rules.c index cc56215..6de7511 100644 --- src/udev/udev-rules.c +++ src/udev/udev-rules.c @@ -1323,7 +1323,7 @@ static int add_rule(struct udev_rules *rules, char *line, if (cmd < UDEV_BUILTIN_MAX) rule_add_key(&rule_tmp, TK_A_RUN_BUILTIN, op, value, &cmd); else - log_error("IMPORT{builtin}: '%s' unknown %s:%u", value, filename, lineno); + log_error("RUN{builtin}: '%s' unknown %s:%u", value, filename, lineno); } else if (streq(attr, "program")) { enum udev_builtin_cmd cmd = UDEV_BUILTIN_MAX; -- 1.7.9.2 ++++++ 1075-udev-timeout-increase-timeout.patch ++++++
From b5338a19864ac3f5632aee48069a669479621dca Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Wed, 10 Sep 2014 10:56:26 +0200 Subject: [PATCH] udev: timeout - increase timeout
Some kernel modules still take more than one minute to insmod, we no longer rely on the timeout
killing insmod within a given period of time, so just bump this to a much higher value. Its only
purpose is to make sure that nothing stays aronud forever.
---
src/udev/udevd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/udev/udevd.c src/udev/udevd.c
index b023b6e..a7f8cbd 100644
--- src/udev/udevd.c
+++ src/udev/udevd.c
@@ -74,7 +74,7 @@ static bool reload;
static int children;
static int children_max;
static int exec_delay;
-static usec_t event_timeout_usec = 60 * USEC_PER_SEC;
+static usec_t event_timeout_usec = 180 * USEC_PER_SEC;
static sigset_t sigmask_orig;
static UDEV_LIST(event_list);
static UDEV_LIST(worker_list);
--
1.7.9.2
++++++ 1076-udev-timeout-warn-after-a-third-of-the-timeout-befor.patch ++++++
Based on 671174136525ddf208cdbe75d6d6bd159afa961f Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From be2ea723b1d023b3d385d3b791ee4607cbfb20ca Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Sat, 30 Aug 2014 11:34:20 +0200 Subject: [PATCH] udev: remove userspace firmware loading support
---
Makefile.am | 12 ---
README | 9 +--
TODO | 1 -
configure.ac | 20 -----
src/udev/udev-builtin-firmware.c | 154 ---------------------------------------
src/udev/udev-builtin.c | 3 -
src/udev/udev.h | 6 --
src/udev/udevd.c | 13 ----
Index: systemd-210/configure.ac
===================================================================
--- systemd-210.orig/configure.ac
+++ systemd-210/configure.ac
@@ -902,25 +902,6 @@ if test "x$have_myhostname" != "xno"; th
fi
# ------------------------------------------------------------------------------
-AC_ARG_WITH(firmware-path,
- AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
- [Firmware search path (default="")]),
- [], [with_firmware_path=""])
-OLD_IFS=$IFS
-IFS=:
-for i in $with_firmware_path; do
- if test "x${FIRMWARE_PATH}" = "x"; then
- FIRMWARE_PATH="\\\"${i}/\\\""
- else
- FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
- fi
-done
-IFS=$OLD_IFS
-AC_SUBST(FIRMWARE_PATH)
-AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
-
-# ------------------------------------------------------------------------------
AC_ARG_ENABLE([gudev],
AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
[], [enable_gudev=yes])
@@ -1137,7 +1118,6 @@ AC_MSG_RESULT([
Build Python: ${PYTHON}
Installation Python: ${PYTHON_BINARY}
sphinx binary: ${SPHINX_BUILD}
- firmware path: ${FIRMWARE_PATH}
PAM modules dir: ${with_pamlibdir}
PAM configuration dir: ${with_pamconfdir}
D-Bus policy dir: ${with_dbuspolicydir}
Index: systemd-210/Makefile.am
===================================================================
--- systemd-210.orig/Makefile.am
+++ systemd-210/Makefile.am
@@ -2677,18 +2677,6 @@ libudev_core_la_LIBADD = \
$(BLKID_LIBS) \
$(KMOD_LIBS)
-libudev_core_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-
-if ENABLE_FIRMWARE
-libudev_core_la_SOURCES += \
- src/udev/udev-builtin-firmware.c
-
-dist_udevrules_DATA += \
- rules/50-firmware.rules
-endif
-
if HAVE_KMOD
libudev_core_la_SOURCES += \
src/udev/udev-builtin-kmod.c
Index: systemd-210/README
===================================================================
--- systemd-210.orig/README
+++ systemd-210/README
@@ -51,14 +51,14 @@ REQUIREMENTS:
Linux kernel >= 3.8 for Smack support
- Udev will fail to work with the legacy layout:
+ Udev will fail to work with the legacy sysfs layout:
CONFIG_SYSFS_DEPRECATED=n
Legacy hotplug slows down the system and confuses udev:
CONFIG_UEVENT_HELPER_PATH=""
- Userspace firmware loading is deprecated, will go away, and
- sometimes causes problems:
+ Userspace firmware loading is not supported and should
+ be disabled in the kernel
CONFIG_FW_LOADER_USER_HELPER=n
Some udev rules and virtualization detection relies on it:
Index: systemd-210/src/udev/udev-builtin.c
===================================================================
--- systemd-210.orig/src/udev/udev-builtin.c
+++ systemd-210/src/udev/udev-builtin.c
@@ -34,9 +34,6 @@ static const struct udev_builtin *builti
[UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
#endif
[UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-#ifdef HAVE_FIRMWARE
- [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-#endif
[UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
[UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
[UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
Index: systemd-210/src/udev/udev-builtin-firmware.c
===================================================================
--- systemd-210.orig/src/udev/udev-builtin-firmware.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * firmware - Kernel firmware loader
- *
- * Copyright (C) 2009 Piter Punk
From be2ea723b1d023b3d385d3b791ee4607cbfb20ca Mon Sep 17 00:00:00 2001 From: Kay Sievers
Date: Sat, 30 Aug 2014 11:34:20 +0200 Subject: [PATCH] udev: remove userspace firmware loading support
---
Makefile.am | 12 ---
README | 9 +--
TODO | 1 -
configure.ac | 20 -----
src/udev/udev-builtin-firmware.c | 154 ---------------------------------------
src/udev/udev-builtin.c | 3 -
src/udev/udev.h | 6 --
src/udev/udevd.c | 13 ----
Index: systemd-210/configure.ac
===================================================================
--- systemd-210.orig/configure.ac
+++ systemd-210/configure.ac
@@ -902,25 +902,6 @@ if test "x$have_myhostname" != "xno"; th
fi
# ------------------------------------------------------------------------------
-AC_ARG_WITH(firmware-path,
- AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
- [Firmware search path (default="")]),
- [], [with_firmware_path=""])
-OLD_IFS=$IFS
-IFS=:
-for i in $with_firmware_path; do
- if test "x${FIRMWARE_PATH}" = "x"; then
- FIRMWARE_PATH="\\\"${i}/\\\""
- else
- FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
- fi
-done
-IFS=$OLD_IFS
-AC_SUBST(FIRMWARE_PATH)
-AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
-
-# ------------------------------------------------------------------------------
AC_ARG_ENABLE([gudev],
AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
[], [enable_gudev=yes])
@@ -1137,7 +1118,6 @@ AC_MSG_RESULT([
Build Python: ${PYTHON}
Installation Python: ${PYTHON_BINARY}
sphinx binary: ${SPHINX_BUILD}
- firmware path: ${FIRMWARE_PATH}
PAM modules dir: ${with_pamlibdir}
PAM configuration dir: ${with_pamconfdir}
D-Bus policy dir: ${with_dbuspolicydir}
Index: systemd-210/Makefile.am
===================================================================
--- systemd-210.orig/Makefile.am
+++ systemd-210/Makefile.am
@@ -2677,18 +2677,6 @@ libudev_core_la_LIBADD = \
$(BLKID_LIBS) \
$(KMOD_LIBS)
-libudev_core_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-
-if ENABLE_FIRMWARE
-libudev_core_la_SOURCES += \
- src/udev/udev-builtin-firmware.c
-
-dist_udevrules_DATA += \
- rules/50-firmware.rules
-endif
-
if HAVE_KMOD
libudev_core_la_SOURCES += \
src/udev/udev-builtin-kmod.c
Index: systemd-210/README
===================================================================
--- systemd-210.orig/README
+++ systemd-210/README
@@ -51,14 +51,14 @@ REQUIREMENTS:
Linux kernel >= 3.8 for Smack support
- Udev will fail to work with the legacy layout:
+ Udev will fail to work with the legacy sysfs layout:
CONFIG_SYSFS_DEPRECATED=n
Legacy hotplug slows down the system and confuses udev:
CONFIG_UEVENT_HELPER_PATH=""
- Userspace firmware loading is deprecated, will go away, and
- sometimes causes problems:
+ Userspace firmware loading is not supported and should
+ be disabled in the kernel
CONFIG_FW_LOADER_USER_HELPER=n
Some udev rules and virtualization detection relies on it:
Index: systemd-210/src/udev/udev-builtin.c
===================================================================
--- systemd-210.orig/src/udev/udev-builtin.c
+++ systemd-210/src/udev/udev-builtin.c
@@ -34,9 +34,6 @@ static const struct udev_builtin *builti
[UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
#endif
[UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-#ifdef HAVE_FIRMWARE
- [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-#endif
[UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
[UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
[UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
Index: systemd-210/src/udev/udev-builtin-firmware.c
===================================================================
--- systemd-210.orig/src/udev/udev-builtin-firmware.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * firmware - Kernel firmware loader
- *
- * Copyright (C) 2009 Piter Punk
From f901aaadd68050bc575c1c15b84f8f31fd4d494d Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 19:16:54 +0200 Subject: [PATCH] udevadm: hwdb - check return value of fseeko()
Fonud by Coverity. Fixes CID #996255. --- src/udev/udevadm-hwdb.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git src/udev/udevadm-hwdb.c src/udev/udevadm-hwdb.c index 65cbf61..64273fb 100644 --- src/udev/udevadm-hwdb.c +++ src/udev/udevadm-hwdb.c @@ -365,7 +365,12 @@ static int trie_store(struct trie *trie, const char *filename) { fchmod(fileno(t.f), 0444); /* write nodes */ - fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET); + err = fseeko(t.f, sizeof(struct trie_header_f), SEEK_SET); + if (err < 0) { + fclose(t.f); + unlink_noerrno(filename_tmp); + return -errno; + } root_off = trie_store_nodes(&t, trie->root); h.nodes_root_off = htole64(root_off); pos = ftello(t.f); @@ -378,7 +383,12 @@ static int trie_store(struct trie *trie, const char *filename) { /* write header */ size = ftello(t.f); h.file_size = htole64(size); - fseeko(t.f, 0, SEEK_SET); + err = fseeko(t.f, 0, SEEK_SET); + if (err < 0) { + fclose(t.f); + unlink_noerrno(filename_tmp); + return -errno; + } fwrite(&h, sizeof(struct trie_header_f), 1, t.f); err = ferror(t.f); if (err) -- 1.7.9.2 ++++++ 1083-udev-node-warn-if-chmod-chown-fails.patch ++++++
From 543afdc63c02a5af3cf6bd2a264162f23474346a Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 19:22:09 +0200 Subject: [PATCH] udev: node - warn if chmod/chown fails
No functional change, just log the warning.
Fonud by Coverity. Fixes CID #1237544.
---
src/udev/udev-node.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git src/udev/udev-node.c src/udev/udev-node.c
index c164603..8ef7889 100644
--- src/udev/udev-node.c
+++ src/udev/udev-node.c
@@ -281,8 +281,12 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
if ((stats.st_mode & 0777) != (mode & 0777) || stats.st_uid != uid || stats.st_gid != gid) {
log_debug("set permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
- chmod(devnode, mode);
- chown(devnode, uid, gid);
+ err = chmod(devnode, mode);
+ if (err < 0)
+ log_warning("setting mode of %s to %#o failed: %m", devnode, mode);
+ err = chown(devnode, uid, gid);
+ if (err < 0)
+ log_warning("setting owner of %s to uid=%u, gid=%u failed: %m", devnode, uid, gid);
} else {
log_debug("preserve permissions %s, %#o, uid=%u, gid=%u", devnode, mode, uid, gid);
}
--
1.7.9.2
++++++ 1084-udev-ctrl-log-if-setting-SO_PASSCRED-fails.patch ++++++
Based on 4bbdff757ed4e718a3348b93439a03055cc5e3bc Mon Sep 17 00:00:00 2001
From: Tom Gundersen
From 25773e7fc59b4ce53d67da4e18bfe4d13ab0b14b Mon Sep 17 00:00:00 2001 From: Tom Gundersen
Date: Thu, 18 Sep 2014 21:57:49 +0200 Subject: [PATCH] udevd: don't fail if /run/udev exists
--- src/udev/udevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/udev/udevd.c src/udev/udevd.c index 37db81c..29ccb51 100644 --- src/udev/udevd.c +++ src/udev/udevd.c @@ -1155,7 +1155,7 @@ int main(int argc, char *argv[]) { umask(022); r = mkdir("/run/udev", 0755); - if (r < 0) { + if (r < 0 && errno != EEXIST) { log_error("could not create /run/udev: %m"); goto exit; } -- 1.7.9.2 ++++++ 1087-infinit-timeout-for-kmod-loaded-modules.patch ++++++ --- src/udev/udev-event.c | 42 ++++++++++++++++++++++++++++++++++++++++++ src/udev/udev.h | 1 + src/udev/udevd.c | 23 +++++++++++++++++++++-- 3 files changed, 64 insertions(+), 2 deletions(-) --- src/udev/udev-event.c +++ src/udev/udev-event.c 2014-09-24 14:32:53.115639820 +0000 @@ -959,6 +959,46 @@ void udev_event_execute_rules(struct ude } } +#ifdef HAVE_KMOD +static inline void udev_check_and_set_kmod(enum udev_builtin_cmd builtin_cmd, struct udev_event *event) { + char filename[UTIL_PATH_SIZE]; + switch (builtin_cmd) { + case UDEV_BUILTIN_KMOD: + snprintf(filename, sizeof(filename), "/run/udev/kmod/%u", (unsigned)getpid()); + touch(filename); + default: + break; + } +} + +static inline void udev_check_and_unset_kmod(enum udev_builtin_cmd builtin_cmd, struct udev_event *event) { + char filename[UTIL_PATH_SIZE]; + switch (builtin_cmd) { + case UDEV_BUILTIN_KMOD: + snprintf(filename, sizeof(filename), "/run/udev/kmod/%u", (unsigned)getpid()); + unlink(filename); + default: + break; + } +} + +bool udev_check_for_kmod(pid_t pid) { + char filename[UTIL_PATH_SIZE]; + struct stat st; + snprintf(filename, sizeof(filename), "/run/udev/kmod/%u", (unsigned)pid); + if (stat(filename, &st) == 0) { + return true; + } + return false; +} +#else +# define udev_set_kmod (a,b) +# define udev_unset_kmod(a,b) +bool udev_check_for_kmod(pid_t pid) { + return false; +} +#endif + void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, const sigset_t *sigmask) { struct udev_list_entry *list_entry; @@ -970,7 +1010,9 @@ void udev_event_execute_run(struct udev_ char command[UTIL_PATH_SIZE]; udev_event_apply_format(event, cmd, command, sizeof(command)); + udev_check_and_set_kmod(builtin_cmd, event); udev_builtin_run(event->dev, builtin_cmd, command, false); + udev_check_and_unset_kmod(builtin_cmd, event); } else { char program[UTIL_PATH_SIZE]; char **envp; --- src/udev/udevd.c +++ src/udev/udevd.c 2014-09-24 15:02:30.895592379 +0000 @@ -76,6 +76,7 @@ static int children_max; static int exec_delay; static usec_t event_timeout_usec = 180 * USEC_PER_SEC; static usec_t event_timeout_warn_usec = 180 * USEC_PER_SEC / 3; +static bool event_killkmod = false; static sigset_t sigmask_orig; static UDEV_LIST(event_list); static UDEV_LIST(worker_list); @@ -1017,6 +1018,12 @@ static void kernel_cmdline_options(struc } event_timeout_usec *= USEC_PER_SEC; event_timeout_warn_usec = (event_timeout_usec / 3) ? : 1; + } else if (startswith(opt, "udev.killkmod=")) { + r = parse_boolean(opt + 14); + if (r < 0) + log_warning("Invalid udev.killkmod Ignoring: %s", opt + 14); + else + event_killkmod = r; } free(s); @@ -1065,7 +1072,7 @@ int main(int argc, char *argv[]) { } for (;;) { - int option, r; + int option; option = getopt_long(argc, argv, "c:de:DtN:hV", options, NULL); if (option == -1) @@ -1356,6 +1363,12 @@ int main(int argc, char *argv[]) { udev_list_node_init(&event_list); udev_list_node_init(&worker_list); + r = mkdir_p("/run/udev/kmod", 0755); + if (r < 0 && errno != EEXIST) { + log_error("could not create /run/udev/kmod: %m"); + goto exit; + } + for (;;) { static usec_t last_usec; struct epoll_event ev[8]; @@ -1440,7 +1453,13 @@ int main(int argc, char *argv[]) { if (worker->state != WORKER_RUNNING) continue; - +#ifdef HAVE_KMOD + if (udev_check_for_kmod(worker->pid)) { + log_debug("worker [%u] %s is using kmod", worker->pid, worker->event->devpath); + if (!event_killkmod) + continue; + } +#endif ts = now(CLOCK_MONOTONIC); if ((ts - worker->event_start_usec) > event_timeout_warn_usec) { --- src/udev/udev.h +++ src/udev/udev.h 2014-09-24 14:33:33.824008084 +0000 @@ -88,6 +88,7 @@ int udev_event_spawn(struct udev_event * char *result, size_t ressize); void udev_event_execute_rules(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, struct udev_rules *rules, const sigset_t *sigset); +bool udev_check_for_kmod(pid_t pid); void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, const sigset_t *sigset); int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]); ++++++ 1089-fix-cgroup-device-controller.patch ++++++
From eb0f0863f5af48865fb4569e2076d5f9e2313995 Mon Sep 17 00:00:00 2001 From: Lennart Poettering
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
From a42cdff19f2d34f12ceca0f40707421a8aaa2c2f Mon Sep 17 00:00:00 2001 From: Kay Sievers
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?=