Commit graph

26561 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek e28973ee18 Merge pull request #3757 from poettering/efi-search 2016-07-25 16:34:18 -04:00
Lennart Poettering 1a0b98c437 Merge pull request #3589 from brauner/cgroup_namespace
Cgroup namespace
2016-07-25 22:23:00 +02:00
Martin Pitt c92fcc4f43 units: add graphical-session.target user unit (#3678)
This unit acts as a dynamic "alias" target for any concrete graphical user
session like gnome-session.target; these should declare
"BindsTo=graphical-session.target" so that both targets stop and start at the
same time.

This allows services that run in a particular graphical user session (e. g.
gnome-settings-daemon.service) to declare "PartOf=graphical-session.target"
without having to know or get updated for all/new session types. This will
ensure that stopping the graphical session will stop all services which are
associated to it.
2016-07-25 22:01:35 +02:00
Lennart Poettering 38b383d9fe build-sys: metadata updates for v231 (#3803) 2016-07-25 15:49:47 -04:00
Lennart Poettering 9d372fe9af CODING_STYLE fixes (#3804)
As noted by @evverx:

0b81133fac (r72126018)
0b81133fac (r72126432)
2016-07-25 22:34:42 +03:00
Zbigniew Jędrzejewski-Szmek f86f6f829c Merge pull request #3802 from poettering/id128-fixes
Id128 fixes and more
2016-07-25 15:08:29 -04:00
Lennart Poettering 82fda58bc3 Merge pull request #3800 from keszybz/systemctl-more-cleanup
Systemctl more cleanup
2016-07-25 21:01:01 +02:00
Lennart Poettering 91c8861526 man: extend documentation on the SplitMode= setting (#3801)
Adressing https://github.com/systemd/systemd/issues/3755#issuecomment-234214273
2016-07-25 14:56:24 -04:00
Lennart Poettering 0b81133fac CODING_STYLE: document src/shared ←→ src/basic split
Addresses: https://github.com/systemd/systemd/pull/3580#issuecomment-227931168

While we are at it, also document that we focus on glibc, not any other libcs.
2016-07-25 20:54:34 +02:00
Lennart Poettering 65548c58dd sd-id128: be more liberal when reading files with 128bit IDs
Accept both files with and without trailing newlines. Apparently some rkt
releases generated them incorrectly, missing the trailing newlines, and we
shouldn't break that.
2016-07-25 20:53:26 +02:00
Lennart Poettering 87410f166e fileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()
We can make this smarter one day, to honour $TMPDIR and friends, but for now,
let's just use /tmp.
2016-07-25 20:35:04 +02:00
Lennart Poettering 91fe95e158 man: minor man page fix
Addressing:

b541146bf8 (commitcomment-17997074)
2016-07-25 20:14:13 +02:00
Michael Olbrich 87d41d6244 automount: don't cancel mount/umount request on reload/reexec (#3670)
All pending tokens are already serialized correctly and will be handled
when the mount unit is done.

Without this a 'daemon-reload' cancels all pending tokens. Any process
waiting for the mount will continue with EHOSTDOWN.
This can happen when the mount unit waits for it's dependencies, e.g.
network, devices, fsck, etc.
2016-07-25 20:04:02 +02:00
Michael Olbrich 2de0b9e913 transaction: don't cancel jobs for units with IgnoreOnIsolate=true (#3671)
This is important if a job was queued for a unit but not yet started.
Without this, the job will be canceled and is never executed even though
IgnoreOnIsolate it set to 'true'.
2016-07-25 20:02:55 +02:00
Zbigniew Jędrzejewski-Szmek 9bb7194019 systemctl: use _cleanup_ for UnitCondition 2016-07-25 13:51:34 -04:00
Zbigniew Jędrzejewski-Szmek f8654baa08 systemctl: simplify machine_info_clear
It is only used with info allocated on the stack, so the pointer cannot be
NULL.
2016-07-25 13:51:34 -04:00
Lennart Poettering c8091d92d5 coredump: turn off coredump collection only when PID 1 crashes, not when journald crashes (#3799)
As suggested:

5157879b75 (r71906971)
2016-07-25 20:03:43 +03:00
Zbigniew Jędrzejewski-Szmek 662bea6729 systemctl: avoid "leaking" some strings in UnitStatusInfo
% valgrind --leak-check=full systemctl status multipathd.service --no-pager -n0
...
==431== 16 bytes in 2 blocks are definitely lost in loss record 1 of 2
==431==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==431==    by 0x534AF19: strdup (in /usr/lib64/libc-2.23.so)
==431==    by 0x4E81AEE: free_and_strdup (string-util.c:794)
==431==    by 0x4EF66C1: map_basic (bus-util.c:1030)
==431==    by 0x4EF6A8E: bus_message_map_all_properties (bus-util.c:1153)
==431==    by 0x120487: show_one (systemctl.c:4672)
==431==    by 0x1218F3: show (systemctl.c:4990)
==431==    by 0x4EC359E: dispatch_verb (verbs.c:92)
==431==    by 0x12A3AE: systemctl_main (systemctl.c:7742)
==431==    by 0x12B1A8: main (systemctl.c:8011)
==431==
==431== LEAK SUMMARY:
==431==    definitely lost: 16 bytes in 2 blocks

This happens because map_basic() strdups the strings. Other code in systemctl
assigns strings to UnitStatusInfo without copying them, relying on the fact
that the message is longer lived than UnitStatusInfo. Add a helper function
that is similar to map_basic, but only accepts strings and does not copy them.
The alternative of continuing to use map_basic() but adding proper cleanup
to free fields in UnitStatusInfo seems less attractive because it'd require
changing a lot of code and doing a lot of more allocations for little gain.

(I put "leaking" in quotes, because systemctl is short lived anyway.)
2016-07-25 12:15:57 -04:00
Zbigniew Jędrzejewski-Szmek a733551846 systemctl: use cleanup function for UnitStatusInfo
There is no functional change, but clarity of the code is increased
by splitting out the cleanup part and putting it next to the structure
definition.
2016-07-25 11:53:14 -04:00
Zbigniew Jędrzejewski-Szmek 3d391fa84f Merge pull request #3681 from walyong/systemctl_condition 2016-07-25 11:27:14 -04:00
Lennart Poettering 26598be814 Merge pull request #3798 from keszybz/news-and-man-tweaks
News and man tweaks
2016-07-25 17:24:35 +02:00
Zbigniew Jędrzejewski-Szmek b1ed76ae19 systemctl: style tweaks for the new condition code 2016-07-25 11:20:58 -04:00
Lennart Poettering 43eb109aa9 core: change ExecStart=! syntax to ExecStart=+ (#3797)
As suggested by @mbiebl we already use the "!" special char in unit file
assignments for negation, hence we should not use it in a different context for
privileged execution. Let's use "+" instead.
2016-07-25 16:53:33 +02:00
Zbigniew Jędrzejewski-Szmek 93f07c8789 man: use "search for unit"
To "search something", in the meaning of looking for it, is valid,
but "search _for_ something" is much more commonly used, especially when
the meaning could be confused with "looking _through_ something"
(for some other object).

(C.f. "the police search a person", "the police search for a person".)

Also reword the rest of the paragraph to avoid using "automatically"
three times.
2016-07-25 10:52:38 -04:00
Zbigniew Jędrzejewski-Szmek 1ecbf32ff8 NEWS: reword the text about libshared
"strict versioned dependency" suggests that version "231" of the library
is stable. But the ABI or API might be changed in any patch, so reword
the text to avoid using "version".
2016-07-25 10:47:37 -04:00
Zbigniew Jędrzejewski-Szmek 5164c3b473 man: make chroot less prominent in discussion of nspawn
Not as many people use chroot as before, so make the flow a bit nicer by
talking less about chroot.

"change to the either" is awkward and unclear. Just remove that part,
because all changes are lost, period.
2016-07-25 10:47:37 -04:00
Zbigniew Jędrzejewski-Szmek f777b4345e shared/install: allow "enable" on linked unit files (#3790)
User expectations are broken when "systemctl enable /some/path/service.service"
behaves differently to "systemctl link ..." followed by "systemctl enable".
From user's POV, "enable" with the full path just combines the two steps into
one.

Fixes #3010.
2016-07-25 16:20:16 +02:00
Michal Soltys 5ed020d8d1 getty@.service.m4: add Conflicts=/Before= against rescue.service (#3792)
If user isolates rescue target from multi-user or graphical target (or just
starts the service), IgnoreOnIsolate will cause issues with sulogin which is
directly started on current virtual console. This patch adds necessary
Conflicts= and Before= against rescue.service.

Note that this is not needed for emergency target, as implicit Requires= and
After= against sysinit.target is in effect for this service
(DefaultDependencies=yes).
2016-07-25 16:18:00 +02:00
Martin Pitt e9baf6963a Merge pull request #3796 from poettering/mailmap
documentation, NEWS and mailmap fixes
2016-07-25 15:47:24 +02:00
Alban Crequy 98df8089be namespace: don't fail on masked mounts (#3794)
Before this patch, a service file with ReadWriteDirectories=/file...
could fail if the file exists but is not a mountpoint, despite being
listed in /proc/self/mountinfo. It could happen with masked mounts.

Fixes https://github.com/systemd/systemd/issues/3793
2016-07-25 15:39:46 +02:00
Lennart Poettering 0f1da52b5e NEWS: document the new shared library for internal code 2016-07-25 15:27:10 +02:00
Lennart Poettering 3324079741 update hwdb (#3795)
"make update-hwdb" in preparation for v231.
2016-07-25 15:24:15 +02:00
Lennart Poettering 3990961df0 man: update systemctl man page for unit file commands, in particular "systemctl enable"
Clarify that "systemctl enable" can operate either on unit names or on unit
file paths (also, adjust the --help text to clarify this). Say that "systemctl
enable" on unit file paths also links the unit into the search path.

Many other fixes.

This should improve the documentation to avoid further confusion around #3706.
2016-07-25 15:16:48 +02:00
Lennart Poettering fec46f48b6 NEWS: update mailmap to bring NEWS and "make git-contrib" in line
Let's make sure that "make git-contrib" prints a useful contributors list
directly useful for NEWS and fixes up contributors's IDs a bit.
2016-07-25 15:03:46 +02:00
Zbigniew Jędrzejewski-Szmek 43a569a18b NEWS: more stuff for v231 (#3786) 2016-07-23 10:11:30 +02:00
Martin Pitt 1415e04603 Merge pull request #3785 from keszybz/less-return-errno
Use "return log_error_errno(...)" in more places + related fixes
2016-07-23 10:10:53 +02:00
Zbigniew Jędrzejewski-Szmek 771de3f506 NEWS: remove duplicate names and fix a few typos 2016-07-22 21:40:46 -04:00
Zbigniew Jędrzejewski-Szmek 2880b01d8f Merge pull request #3784 from poettering/NEWS-v231 2016-07-22 21:28:31 -04:00
Zbigniew Jędrzejewski-Szmek 476b8254d9 nspawn: don't skip cleanup on locking error 2016-07-22 21:25:09 -04:00
Zbigniew Jędrzejewski-Szmek 92dfd88bc9 import: don't log "fake" errno values 2016-07-22 21:25:09 -04:00
Zbigniew Jędrzejewski-Szmek d710aaf7a5 Use "return log_error_errno" in more places" 2016-07-22 21:25:09 -04:00
Zbigniew Jędrzejewski-Szmek 31b14fdb6f Merge pull request #3777 from poettering/id128-rework
uuid/id128 code rework
2016-07-22 21:18:41 -04:00
Lennart Poettering fcd30826d4 Populate NEWS a bit, in preparation for v231
(Note complete yet.)
2016-07-22 20:18:34 +02:00
Lennart Poettering 5bd7342617 man: rework resolved.conf's Cache= documentation
Let's not mention the supposed security benefit of turning off caching. It is
really questionnable, and I#d rather not create the impression that we actually
believed turning off caching would be a good idea.

Instead, mention that Cache=no is implicit if a DNS server on the local host is
used.
2016-07-22 20:17:23 +02:00
Lennart Poettering 1137c73b40 mailmap: add a few more names
Let's do something about my OCD and map a numbre of commiters to proper names.
2016-07-22 20:16:58 +02:00
Lennart Poettering c907cba919 Merge pull request #3783 from poettering/fix-3285
coredump: make sure to handle crashes of PID 1 and journald special
2016-07-22 18:37:42 +02:00
Lennart Poettering 5157879b75 coredump: turn off coredump collection entirely after journald or PID 1 crashed
Safe is safe, let's turn off the whole logic if we can, after all it is
unlikely we'll be able to process further crashes in a reasonable way.
2016-07-22 18:01:50 +02:00
Lennart Poettering 78f043f77b coredump: make sure to handle crashes of PID 1 and journald special
Fixes: #3285
2016-07-22 18:01:38 +02:00
Lennart Poettering 5052c4eadd Merge pull request #3753 from poettering/tasks-max-scale
Add support for relative TasksMax= specifications, and bump default for services
2016-07-22 17:40:12 +02:00
Lennart Poettering fec603eb6c coredump: truncate overly long coredump metadata fields (#3780)
Fixes: #3573
Replaces: #3588
2016-07-22 17:39:47 +02:00