summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-20nspawn: add -E as alias for --setenvZbigniew Jędrzejewski-Szmek
v2: - "=" is required, so remove the <optional> tags that v1 added
2016-04-20basic/terminal-util: cache value for colors_enabledZbigniew Jędrzejewski-Szmek
After all it's something that we query over and over. For example, systemctl calls colors_enabled() four times for each failing service. The compiler is unable to optimize those calls away because they (potentially) accesses external and global state through on_tty() and getenv().
2016-04-19Merge pull request #3055 from keszybz/preset-fixesLennart Poettering
Another bunch of improvements to the installation code
2016-04-19coredump: create unnamed temporary files if possible (O_TMPFILE) (#3065)Evgeny Vereshchagin
Don't leave temporary files if the coredump service is aborted during the operation Yeah, these are temporary files that systemd-coredump needs while processing the coredumps. Of course, if the coredump service is aborted during the operation we better shouldn't leave those files around. This is hence a bug to fix in our coredumping code. See https://github.com/systemd/systemd/issues/2804#issuecomment-210578147 Another option is to simply use O_TMPFILE, and when it is not available fall back to the current behaviour. After all, the files are cleaned up eventually, through normal tmpfiles aging, and the offending file systems are pretty exotic these days, or not in the upstream kernel. See https://github.com/systemd/systemd/issues/2804#issuecomment-211496707
2016-04-19run: change --tty option to --pty as documentedZbigniew Jędrzejewski-Szmek
Keep the previous option name as hidden, for compatibility. Fixes #3054.
2016-04-19systemctl: warning about missing install info for template unitsZbigniew Jędrzejewski-Szmek
The advice string didn't talk about template units at all. Extend it and print when trying to enable a template unit without install info. Fixes #2345.
2016-04-19shared/install: change value of _UNIT_FILE_CHANGE_TYPE_INVALIDZbigniew Jędrzejewski-Szmek
-1 could be confused with -EPERM. But we still need a negative enum value to force gcc to use int for the enum type, even though it is unused. Otherwise we get warnings.
2016-04-19shared/install,systemctl,core: report offending file on installation errorZbigniew Jędrzejewski-Szmek
Fixes #2191: $ systemctl --root=/ enable sddm Created symlink /etc/systemd/system/display-manager.service, pointing to /usr/lib/systemd/system/sddm.service. $ sudo build/systemctl --root=/ enable gdm Failed to enable unit, file /etc/systemd/system/display-manager.service already exists and is a symlink to /usr/lib/systemd/system/sddm.service. $ sudo build/systemctl --root= enable sddm $ sudo build/systemctl --root= enable gdm Failed to enable unit: File /etc/systemd/system/display-manager.service already exists and is a symlink to /usr/lib/systemd/system/sddm.service. (I tried a few different approaches to pass the error information back to the caller. Adding a new parameter to hold the error results in a gigantic patch and a lot of hassle to pass the args arounds. Adding this information to the changes array is straightforward and can be more easily extended in the future.) In case local installation is performed, the full set of errors can be reported and we do that. When running over dbus, only the first error is reported.
2016-04-19sleep: Add debug feature to bypass hibernation memory checks. (#3064)Vittorio G (VittGam)
This new feature bypasses checking if a swap partition is mounted or if there is enough swap space available for hibernation to succeed. This can be useful when a system with a Solid State Disk (SSD) has no normal swap partition or file configured, and a custom systemd unit is used to mount a swap file just before hibernating and unmount it just after resuming. Signed-off-by: Vittorio Gambaletta <git-systemd@vittgam.net>
2016-04-19zsh-completion: remove non-portable uses of \s in awk (#3063)Felipe Sateler
2016-04-18shared/install: add helper function unit_file_changes_have_modification()Zbigniew Jędrzejewski-Szmek
As suggested in review of #3049.
2016-04-18Various formatting and style fixesZbigniew Jędrzejewski-Szmek
2016-04-18Add zsh completion for networkctl (#3062)Felipe Sateler
2016-04-18Master minutes (#3060)mulkieran
* man: change time unit specifier for minutes to "m", not "min". To alert the reader to the fact that the ambiguous prefix "m" will be interpreted as minutes, not months. * man: change 'journal files' to 'archived journal files'. So that the user may be reminded why they see log entries in the journal from a time previous to the one they specified when using --vacuum-time.
2016-04-18Mark nbd as inactive until connected (#2422)Wouter Verhelst
Currently, 99-systemd.rules.in contains a line for network block devices, which mark them as inactive until the first change event, and as active from then on forward. This is not correct. A network block device can be connected or disconnected; this state is signalled by the presence or absense of a "pid" file, which contains the PID of the nbd client userspace process that started the connection. Update the rules file so that it checks for the presence of that file to decide what to set SYSTEMD_READY to. Note that current kernels do issue a change event upon connecting the device, but not yet upon disconnecting. While it's possible to wait until that's been fixed, the behaviour of the rule with TEST!="pid" in the absence of a proper uevent is exactly the same as the behaviour of the old rule; so it should be safe to apply now. Signed-off-by: Wouter Verhelst <w@uter.be>
2016-04-18basic: user-utils.c needs missing.h for secure_getenv (#3059)michaelolbrich
Otherwise building may fail with: src/basic/user-util.c: In function 'get_home_dir': src/basic/user-util.c:343:9: error: implicit declaration of function 'secure_getenv' [-Werror=implicit-function-declaration]
2016-04-18networkd: allow setting of multicast querier for linux bridge (#3051)Susant Sahani
2016-04-18hwdb: add touchpad resolutions for the Dell XPS 15 9550 (#3057)Peter Hutterer
https://bugs.freedesktop.org/show_bug.cgi?id=94773
2016-04-17conf-parser: Set EXTRACT_RETAIN_ESCAPE when extracting words (#2917)Dan Nicholson
If you reference another unit with an escaped name, the escaped characters should remain in the extracted word. This used to work correctly prior to commit 34f253f0. The problem can be seen when units with escaped names are referenced. $ cat "/usr/lib/systemd/system/dev-disk-by\x2dlabel-eos\x2dswap.swap" [Swap] What=/dev/disk/by-label/eos-swap [Install] WantedBy=dev-disk-by\x2dlabel-eos\x2dswap.device $ systemctl enable "dev-disk-by\x2dlabel-eos\x2dswap.swap" Created symlink /etc/systemd/system/dev-disk-byx2dlabel-eosx2dswap.device.wants/dev-disk-by\x2dlabel-eos\x2dswap.swap, pointing to /usr/lib/systemd/system/dev-disk-by\x2dlabel-eos\x2dswap.swap. The wants directory should be created with the x2ds escaped with \.
2016-04-17tree-wide: fall back to now(CLOCK_MONOTONIC) if CLOCK_BOOTTIME unsupported ↵Lubomir Rintel
(#3037) It was added in 2.6.39, and causes an assertion to fail when running in mock hosted on 2.6.32-based RHEL-6: Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at systemd/src/basic/time-util.c:70, function now(). Aborting.
2016-04-17Merge pull request #3049 from keszybz/preset-fixesLennart Poettering
Fixes for preset-all handling and a few related issues
2016-04-17man: systemd.exec: Clarify InaccessibleDirectories (#3048) (#3048)Nicolas Braud-Santoni
2016-04-16install: allow paths like LookupPath.generator to be NULLZbigniew Jędrzejewski-Szmek
Fixes #3047.
2016-04-16tree-wide: introduce PATH_IN_SET macroZbigniew Jędrzejewski-Szmek
2016-04-16systemctl/core: ignore masked units in preset-allZbigniew Jędrzejewski-Szmek
With any masked unit that would that would be enabled by presets, we'd get: test@rawhide $ sudo systemctl preset-all Failed to execute operation: Unit file is masked. test@rawhide $ sudo systemctl --root=/ preset-all Operation failed: Cannot send after transport endpoint shutdown Simply ignore those units: test@rawhide $ sudo systemctl preset-all Unit xxx.service is masked, ignoring.
2016-04-16tree-wide: use ERFKILL instead of ESHUTDOWN for "unit masked"Zbigniew Jędrzejewski-Szmek
If the error code ever leaks (we print the strerror error instead of providing our own), the message for ESHUTDOWN is "Cannot send after transport endpoint shutdown", which can be misleading. In particular it suggest that some mishandling of the dbus connection occured. Let's change that to ERFKILL which has the advantage that a) it sounds implausible as actual error, b) has the connotation of disabling something manually.
2016-04-16journald: rewrite function with switch, fix handling of -ESHUTDOWNZbigniew Jędrzejewski-Szmek
The comments and the log messages are next to one another, so it's easier to check that the messages match the comments. The sign was omitted in the check for -ESHUTDOWN, so it was never matched.
2016-04-16sd-bus: use IN_SETZbigniew Jędrzejewski-Szmek
2016-04-16systemctl: make --root=/ disable dbus againZbigniew Jędrzejewski-Szmek
Before 0f03c2a4c093 specifying any path would cause the systemctl client to do the installation itself, instead of going over dbus. Restore that behaviour.
2016-04-14core/mount-setup.c: also relabel /dev/shm for selinux (#3039)Harald Hoyer
daemons, which wish to transition state from the initramfs to the real root, might use /dev/shm for their state. As /dev is not relabeled across mount points, /dev/shm has to be relabled explicitly.
2016-04-14Merge pull request #3036 from evverx/add-ldlDaniel Mack
build-sys: add missing -ldl
2016-04-14networkd: Add support to configure proxy arp support to interfaces (#3020)Susant Sahani
Fixes: #2889
2016-04-14Merge pull request #3029 from ipuustin/supplementary-gidsDaniel Mack
sd-bus: query pid also when requesting supplementary gids information
2016-04-14Merge pull request #3033 from keszybz/code-cleanupsMartin Pitt
Code cleanups
2016-04-13systemctl: fix leakZbigniew Jędrzejewski-Szmek
CID #1354670.
2016-04-13shared/path-lookup: fix leakZbigniew Jędrzejewski-Szmek
CID #1354671: char **l would be leaked. Also rename l to paths, to make the code easier to read, and do strv deduplication immediately when extending. No need to allocate strings to remove them a few lines down.
2016-04-13test-strv: add a test that extending empty strv works as expectedZbigniew Jędrzejewski-Szmek
Just making sure :)
2016-04-14build-sys: add missing -ldlEvgeny Vereshchagin
Fixes #3035
2016-04-13tests: don't rely on the host's systemd-nspawn, don't register test machine ↵Evgeny Vereshchagin
(#3023) Fixes: $ cd test/TEST-07-ISSUE-1981/ $ sudo make clean setup run ... timeout: failed to run command ‘systemd-nspawn’: No such file or directory ... TEST RUN: https://github.com/systemd/systemd/issues/1981 [FAILED] Makefile:10: recipe for target 'run' failed make: *** [run] Error 1
2016-04-13sd-bus: query pid also when searching for supplementary gidsIsmo Puustinen
If the SD_BUS_CREDS_SUPPLEMENTARY_GIDS value is requested, the pid is queried to find out the supplementary gids value from /proc/pid/status. Otherwise sd_bus_creds_get_supplementary_gids() won't work unless some other value in mask triggered fetching the pid information.
2016-04-13tree-wide: remove useless NULLs from strjoinaZbigniew Jędrzejewski-Szmek
The coccinelle patch didn't work in some places, I have no idea why.
2016-04-13basic/util: silence stupid gcc warnings about unitialized variableZbigniew Jędrzejewski-Szmek
2016-04-12Merge pull request #2973 from poettering/search-pathMartin Pitt
Many fixes, in particular to the install logic
2016-04-12load-fragment: Resolve specifiers in DeviceAllow (#3019)Nicolas Braud-Santoni
Closes #1602
2016-04-12systemctl: when we want to know whether there's a native unit file, don't ↵Lennart Poettering
choke on ELOOP ELOOP indicates that there's a symlink in /etc for a native unit file, and that's completely OK.
2016-04-12test-dnssec: drop unused variableLennart Poettering
2016-04-12core: make sure we always free the list of changesLennart Poettering
2016-04-12man: shorten the list of unit file paths a bitLennart Poettering
Let's make this more digestable to read by making the list of documented unit file paths a bit shorter. Specifically, let's drop references to $XDG_CONFIG_HOME and $XDG_DATA_HOME, as their default values are listed too already. Given that the fact that the XDG basedir spec makes these paths configurable is probably not a strong point of the spec, let's drop the reference to the env vars, and keep only the literal, default paths for them in the list. Of course, we do support the full XDG basedir spec in this regard, but it's one thing to implement it and another one to recommend it by documenting it. Replace "$HOME" by "~", because UNIX.
2016-04-12core: keep track of the mtime of the transient unit file we wroteLennart Poettering
Otherwise "systemctl status" will immediately report that our unit file is out of date.
2016-04-12update TODOLennart Poettering