platform/upstream/systemd.git
6 years agopo: update Turkish translation (#8783)
Muhammet Kara [Mon, 23 Apr 2018 08:12:03 +0000 (11:12 +0300)]
po: update Turkish translation (#8783)

6 years agoMerge pull request #8520 from drinkcat/upstream-udevadm
Zbigniew Jędrzejewski-Szmek [Mon, 23 Apr 2018 07:37:17 +0000 (09:37 +0200)]
Merge pull request #8520 from drinkcat/upstream-udevadm

udevadm/hwdb: Return non-zero exit code on error

6 years agohoestnamed: Also parse HOME_URL from /usr/lib/os-release (#8779)
Mario Limonciello [Mon, 23 Apr 2018 07:24:39 +0000 (02:24 -0500)]
hoestnamed: Also parse HOME_URL from /usr/lib/os-release (#8779)

64928aa54520b8cad3cda14d7aab0f4f59409acf added parsing to
/etc/os-release.

6 years agoMerge pull request #8675 from fbuihuu/make-sure-device-enter-in-plugged-state
Zbigniew Jędrzejewski-Szmek [Mon, 23 Apr 2018 07:14:42 +0000 (09:14 +0200)]
Merge pull request #8675 from fbuihuu/make-sure-device-enter-in-plugged-state

device: make sure to always retroactively start device dependencies

6 years agoMerge pull request #8769 from keszybz/followups
Yu Watanabe [Mon, 23 Apr 2018 01:24:39 +0000 (10:24 +0900)]
Merge pull request #8769 from keszybz/followups

Three trivial followups for recent patches

6 years agobus-unit-util: fix bus_wait_for_jobs() debug output (#8760)
Lennart Poettering [Mon, 23 Apr 2018 00:24:43 +0000 (02:24 +0200)]
bus-unit-util: fix bus_wait_for_jobs() debug output (#8760)

We shouldn't print 'errno' if its not initialized properly.

6 years agosystemd-hwdb update: Return non-zero exit code on error when --strict is used
Nicolas Boichat [Tue, 27 Mar 2018 03:24:01 +0000 (11:24 +0800)]
systemd-hwdb update: Return non-zero exit code on error when --strict is used

 - Add a new flag --strict to tell systemd-hwdb to return a
   non-zero code on error.
 - Make systemd-hwdb update return an error when any parsing
   error occurs (only if strict flag is set).

6 years agoudevadm/hwdb: Return non-zero exit code on error when --strict is used
Nicolas Boichat [Tue, 20 Mar 2018 05:36:58 +0000 (13:36 +0800)]
udevadm/hwdb: Return non-zero exit code on error when --strict is used

 - Add a new flag --strict to tell udevadm hwdb to return a
   non-zero code on error.
 - Make udevadm hwdb --update return an error when any parsing
   error occurs (only if strict flag is set).

6 years agoMerge pull request #8778 from poettering/cgroup-delegation-doc
Lennart Poettering [Fri, 20 Apr 2018 18:24:10 +0000 (20:24 +0200)]
Merge pull request #8778 from poettering/cgroup-delegation-doc

some docs regarding cgroup delegation and systemd

6 years agodoc: add a bit more documentation about systemd and cgroups and cgroupsv2 and delegation
Lennart Poettering [Fri, 20 Apr 2018 16:10:04 +0000 (18:10 +0200)]
doc: add a bit more documentation about systemd and cgroups and cgroupsv2 and delegation

Ultimately we should replace the relevant wiki texts with documentation
maintained as part of our project tree. This is a start. It can't
replace the wiki documentation in full yet, but I think it's already
very useful.

6 years agoupdate TODO
Lennart Poettering [Fri, 20 Apr 2018 16:09:53 +0000 (18:09 +0200)]
update TODO

6 years agodevice: skip deserialization of device units when udevd is not running
Franck Bui [Tue, 17 Apr 2018 13:12:06 +0000 (15:12 +0200)]
device: skip deserialization of device units when udevd is not running

Do not try to party initialize a device during deserialization if it's not
known by udev (anymore) and therefore hasn't been seen during device
enumeration.

The device unit in this case has not been initialized properly and setting it
in the "plugged" state can be confusing.

Actually this happens during every boots when PID switches to the new rootfs:
PID is reexecuted and enumerates devices but since udev is not running, the
list of enumerated devices is empty.

6 years agodevice: make sure to always retroactively start device dependencies
Franck Bui [Fri, 6 Apr 2018 13:02:10 +0000 (15:02 +0200)]
device: make sure to always retroactively start device dependencies

PID1 updates the state of device units upon 2 different events:

 - when it processes an event sent by udev and in this case the device deps are
   started if the device enters in the "plugged" state.

 - when it enumerates all devices during its startup or when it is asked to
   reload its configuration data but in this case the device deps (if any) are
   not retroactively started.

When udev processes a new "add" kernel event, it first registers the new device
in its databases then sends an event to systemd.

If for any reason, systemd is asked to reload its configuration between the
previous 2 steps, it might see for the first time the new device while scanning
/sys for all devices. Only during a second step, udev will send the event for
the new device.

In this peculiar case the device deps wont be started (even though the device
is first seen by PID1).

Indeed when reloading its configurations, PID1 will put the device unit in the
"plugged" state but without starting the device deps. Thereafter PID1 will get
the event from udev for the new device but the device unit will be in "plugged"
state already therefore it won't see any need to start the device dependencies.

Rather than assuming that during the reloading of systemd manager configuration
all devices listed in udev DBs have been already processed and should be put in
the "plugged" state (done by device_coldplug()), this patch does that only for
devices which have been processed via an udev event (device_dispatch_io())
previously. In this case we set "d->found" to "DEVICE_FOUND_UDEV" and we make
also sure to no more initialize "d->found" while enumerating devices. Instead
this field is now saved/restored while devices are serialized.

6 years agonetworkd: more specific link down while enslaving (#8771)
Tobias Jungel [Fri, 20 Apr 2018 14:30:40 +0000 (16:30 +0200)]
networkd: more specific link down while enslaving (#8771)

Issue #5853 introduced a link_down for every netdev enslaved. This behaviour is
not required on other slave interfaces.

fixes 14b6bb7

6 years agoman: document the new $SYSTEMD_DEBUGGER variable
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 09:28:04 +0000 (11:28 +0200)]
man: document the new $SYSTEMD_DEBUGGER variable

Follow-up for c5896b6a.

6 years agosysusers: use uniform order for variables
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 09:14:41 +0000 (11:14 +0200)]
sysusers: use uniform order for variables

Follow-up for 43e948eea6.

6 years agoremove unused variables (#8768)
Tobias Jungel [Fri, 20 Apr 2018 11:31:17 +0000 (13:31 +0200)]
remove unused variables (#8768)

clang 5.0 complains with -Wunused-variable

6 years agonetworkd: add support to configure IPv6 MTU (#8664)
Susant Sahani [Fri, 20 Apr 2018 09:38:39 +0000 (15:08 +0530)]
networkd: add support to configure IPv6 MTU (#8664)

This patch supports to configure IPv6 MTU.

Closes #8632

6 years agonspawn: when running nspawn, set a $PATH including both bin + sbin by default (#8756)
Lennart Poettering [Fri, 20 Apr 2018 09:36:25 +0000 (11:36 +0200)]
nspawn: when running nspawn, set a $PATH including both bin + sbin by default (#8756)

We don't know what the container payload needs, hence default to a PATH
with both bin and sbin included, as well as / and /usr.

Follow-up for #8324

Fixes: #8698

6 years agoFix typo
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 09:09:44 +0000 (11:09 +0200)]
Fix typo

6 years agoMerge pull request #8754 from poettering/sysusers-fix
Zbigniew Jędrzejewski-Szmek [Thu, 19 Apr 2018 17:39:48 +0000 (19:39 +0200)]
Merge pull request #8754 from poettering/sysusers-fix

two minor memleak fixes for sysusers, fixing #8718

6 years agoMerge pull request #8767 from poettering/urlify-all-things
Zbigniew Jędrzejewski-Szmek [Thu, 19 Apr 2018 16:56:46 +0000 (18:56 +0200)]
Merge pull request #8767 from poettering/urlify-all-things

try to generate clickable links in our output if we can

6 years agosystemctl: format unit file and dropin paths as clickable links in status output
Lennart Poettering [Thu, 19 Apr 2018 15:54:25 +0000 (17:54 +0200)]
systemctl: format unit file and dropin paths as clickable links in status output

6 years agosystemctl: format documentation links in status output as clickable links
Lennart Poettering [Thu, 19 Apr 2018 15:53:58 +0000 (17:53 +0200)]
systemctl: format documentation links in status output as clickable links

6 years agohostnamectl: make the distribution name a pretty clickable link if we can
Lennart Poettering [Thu, 19 Apr 2018 15:52:51 +0000 (17:52 +0200)]
hostnamectl: make the distribution name a pretty clickable link if we can

6 years agohostnamed: expose HOME_URL os-release field on the bus
Lennart Poettering [Thu, 19 Apr 2018 15:52:22 +0000 (17:52 +0200)]
hostnamed: expose HOME_URL os-release field on the bus

6 years agoterminal: add internal API to format URLs for display in capable terminals
Lennart Poettering [Thu, 19 Apr 2018 15:48:53 +0000 (17:48 +0200)]
terminal: add internal API to format URLs for display in capable terminals

Newer terminals (in particular gnome-terminal) understand special escape
sequence for formatting clickable links. Let's support that to make our
tool output more clickable where that's appropriate.

For details see this:

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

The one big issue is that 'less' currently doesn't grok this, and
doesn't ignore sequence like regular terminal implementations do if they
don't support it. Hence for now, let's disable URL output if a pager is
used. We should revisit that though as soon as less added support for it
and enough time passed for it to enter various distributions.

6 years agoMerge pull request #8615 from yuwata/fix-1329
Lennart Poettering [Thu, 19 Apr 2018 14:22:50 +0000 (16:22 +0200)]
Merge pull request #8615 from yuwata/fix-1329

timedated: support multiple NTP services

6 years agoMerge pull request #8765 from poettering/test-fixes
Lennart Poettering [Thu, 19 Apr 2018 14:18:46 +0000 (16:18 +0200)]
Merge pull request #8765 from poettering/test-fixes

some short fixes for the tests

6 years agoMerge pull request #8623 from yuwata/resolvectl
Zbigniew Jędrzejewski-Szmek [Thu, 19 Apr 2018 10:33:05 +0000 (12:33 +0200)]
Merge pull request #8623 from yuwata/resolvectl

resolvectl: rename systemd-resolve to resolvectl

6 years agotree-wide: drop spurious newlines (#8764)
Lennart Poettering [Thu, 19 Apr 2018 10:13:23 +0000 (12:13 +0200)]
tree-wide: drop spurious newlines (#8764)

Double newlines (i.e. one empty lines) are great to structure code. But
let's avoid triple newlines (i.e. two empty lines), quadruple newlines,
quintuple newlines, …, that's just spurious whitespace.

It's an easy way to drop 121 lines of code, and keeps the coding style
of our sources a bit tigther.

6 years agouser-util: trivial coding style fixes
Lennart Poettering [Thu, 19 Apr 2018 09:40:48 +0000 (11:40 +0200)]
user-util: trivial coding style fixes

Use C's downgrade-to-bool feature when comparing pointers against NULL,
as we usually do.

6 years agomkosi: drop dumping all test output to console again
Lennart Poettering [Thu, 19 Apr 2018 09:16:04 +0000 (11:16 +0200)]
mkosi: drop dumping all test output to console again

As it appears meson's test cases nowadays (?) show useful logs for
failing tests anyway, hence there's no need to show them unconditionally
in full every time anymore. Let's hence simplify and drop this.

6 years agotests: compare with correct shell
Lennart Poettering [Thu, 19 Apr 2018 08:35:36 +0000 (10:35 +0200)]
tests: compare with correct shell

We synthesize the passwd record for UID 0, hence we need to compare with
our synthesized data and not with the data stored in /etc/passwd

6 years agocore: don't export per-unit metadata files in test mode
Lennart Poettering [Thu, 19 Apr 2018 08:34:58 +0000 (10:34 +0200)]
core: don't export per-unit metadata files in test mode

We shouldn't clobber the host's /run directories with metadata we export
for our units when we run in test mode.

6 years agomkosi: ensure the 'hostname' tool is available in the build environment
Lennart Poettering [Thu, 19 Apr 2018 08:33:57 +0000 (10:33 +0200)]
mkosi: ensure the 'hostname' tool is available in the build environment

Our test-execute test uses 'hostname' to validate specifiers, hence it
should be available in our mkosi build too, so that the test can pass.

6 years agoMerge pull request #8758 from keszybz/improved-slice-checks
Lennart Poettering [Thu, 19 Apr 2018 09:28:05 +0000 (11:28 +0200)]
Merge pull request #8758 from keszybz/improved-slice-checks

Improved slice checks

6 years agocoredumpctl: Add debug as a gdb alias, and add lldb support (closes #8722) (#8744)
Ryan Gonzalez [Wed, 18 Apr 2018 19:32:17 +0000 (14:32 -0500)]
coredumpctl: Add debug as a gdb alias, and add lldb support (closes #8722) (#8744)

6 years agobash-completion: add completion for resolvectl
Yu Watanabe [Wed, 18 Apr 2018 18:26:54 +0000 (03:26 +0900)]
bash-completion: add completion for resolvectl

6 years agoman: create man page for resolvectl
Yu Watanabe [Wed, 18 Apr 2018 18:25:25 +0000 (03:25 +0900)]
man: create man page for resolvectl

6 years agoresolvectl: change syntax to use verb_dispatch()
Yu Watanabe [Wed, 11 Apr 2018 01:44:51 +0000 (10:44 +0900)]
resolvectl: change syntax to use verb_dispatch()

This makes `resolvectl` use the verb style command line, e.g.,
`resolvectl status` or `resolvectl tlsa tcp fedoraproject.org:443`.
For compatibility, if the invocation name is `systemd-resolve`,
then it accepts the old syntax, e.g. `systemd-resolve --status`.

6 years agoresolvectl: rename systemd-resolve to resolvectl
Yu Watanabe [Wed, 18 Apr 2018 18:24:23 +0000 (03:24 +0900)]
resolvectl: rename systemd-resolve to resolvectl

For the compatibility, `systemd-resolve` will be created as a symbolic
link to `resolvectl`.

6 years agocore: do not allow Delegate= on unsupported unit types
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 18:06:56 +0000 (20:06 +0200)]
core: do not allow Delegate= on unsupported unit types

6 years agocore: fix resetting of Delegate= and properly ignore invalid assignment
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 17:50:07 +0000 (19:50 +0200)]
core: fix resetting of Delegate= and properly ignore invalid assignment

The default is false not true. If we say "ignoring" we must return 0.

6 years agoman: don't place nginx socket in /tmp (#8757)
Lennart Poettering [Wed, 18 Apr 2018 16:50:06 +0000 (18:50 +0200)]
man: don't place nginx socket in /tmp (#8757)

First of all, it's frickin' ugly and wrong, as IPC sockets should be
placed in /run and definitely not under a guessable name under
world-writable /tmp. Secondly, it can't even work as we set
PrivateTmp=yes on the service.

Hence, let's clean up the example, and simply use a socket in /run
instead.

Fixes: #8419

6 years agoMerge pull request #8708 from poettering/namespace-repeat
Lennart Poettering [Wed, 18 Apr 2018 16:46:44 +0000 (18:46 +0200)]
Merge pull request #8708 from poettering/namespace-repeat

pid1 namespacing fixes

6 years agosysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane...
Franck Bui [Wed, 18 Apr 2018 16:32:21 +0000 (18:32 +0200)]
sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737)

To indicate that the there're no more entries, these wrappers return false but
did leave the passed pointed unmodified.

However EOF is not an error and is a very common case so initialize the output
argument to NULL even in this case so callers don't need to do that.

Fixes: #8721

6 years agosysusers: fix minor memory leak
Lennart Poettering [Wed, 18 Apr 2018 15:59:35 +0000 (17:59 +0200)]
sysusers: fix minor memory leak

6 years agosysusers: clarify that we knowingly ignore process_items() return values
Lennart Poettering [Wed, 18 Apr 2018 15:59:22 +0000 (17:59 +0200)]
sysusers: clarify that we knowingly ignore process_items() return values

6 years agosysusers: fix memory leak when /etc/passwd contains multiple identical lines
Lennart Poettering [Wed, 18 Apr 2018 15:58:53 +0000 (17:58 +0200)]
sysusers: fix memory leak when /etc/passwd contains multiple identical lines

Fixes: #8718

6 years agouid-range: remove spurious newline
Lennart Poettering [Wed, 18 Apr 2018 15:58:15 +0000 (17:58 +0200)]
uid-range: remove spurious newline

6 years agoMerge pull request #8709 from poettering/format-table
Lennart Poettering [Wed, 18 Apr 2018 14:20:13 +0000 (16:20 +0200)]
Merge pull request #8709 from poettering/format-table

generic table formatter

6 years agopath-lookup: properly chase paths when reducing with root dir (#8750)
Lennart Poettering [Wed, 18 Apr 2018 14:19:46 +0000 (16:19 +0200)]
path-lookup: properly chase paths when reducing with root dir (#8750)

Let's make this correct.

6 years agoutil-lib: introduce new empty_or_root() helper (#8746)
Lennart Poettering [Wed, 18 Apr 2018 12:20:49 +0000 (14:20 +0200)]
util-lib: introduce new empty_or_root() helper (#8746)

We check the same condition at various places. Let's add a trivial,
common helper for this, and use it everywhere.

It's not going to make things much faster or much shorter, but I think a
lot more readable

6 years agonamespace: rework how we resolve symlinks in mount points
Lennart Poettering [Wed, 4 Apr 2018 08:14:43 +0000 (10:14 +0200)]
namespace: rework how we resolve symlinks in mount points

Before this patch we'd resolve all symlinks of bind mounts and other
mount points to establish for a service in advance, and only then start
mounting them. This is problematic, if symlink chains jump around
between directories in a namespace tree, so that to resolve a specific
symlink chain we need to establish another mount already. A typical case
where this happens is if /etc/resolv.conf is a symlink to some file in
/run: in that case we'd normally resolve and mount /etc/resolv.conf
early on, but that's broken, as to do this properly we'd need to resolve
/etc/resolv.conf first, then figure out that /run needs to be mounted
before we can proceed, and thus reorder the order in which we apply
mounts dynamically.

With this change, whenever we are about to apply a mount, we'll do a
single step of the symlink normalization process, patch the mount entry
accordingly, and then sort the list of mounts to establish again, taking
the new path into account. This means that we can correctly deal with
the example above: we might start with wanting to mount /etc/resolv.conf
early, but after resolving it to the path in /run/ we'd push it to the
end of the list, ensuring that /run is mounted first.

(Note that this also fixes another bug: we were following symlinks on
the bind mount source relative to the root directory of the service,
rather than of the host. That's wrong though as we explicitly document
tha the source of bind mounts is always on the host.)

6 years agonamespace: improve logging when creating mount source nodes
Lennart Poettering [Wed, 4 Apr 2018 09:12:49 +0000 (11:12 +0200)]
namespace: improve logging when creating mount source nodes

6 years agonamespace: split out calls to normalize mount entry list into new function
Lennart Poettering [Wed, 4 Apr 2018 09:03:21 +0000 (11:03 +0200)]
namespace: split out calls to normalize mount entry list into new function

6 years agonamespace: don't consider raw image read-only if /home in it is writable
Lennart Poettering [Wed, 4 Apr 2018 08:14:25 +0000 (10:14 +0200)]
namespace: don't consider raw image read-only if /home in it is writable

6 years agofs-util: export how many iterations chase_symlinks() executes at max
Lennart Poettering [Wed, 4 Apr 2018 15:06:12 +0000 (17:06 +0200)]
fs-util: export how many iterations chase_symlinks() executes at max

6 years agofs-util: add new CHASE_STEP flag to chase_symlinks()
Lennart Poettering [Wed, 4 Apr 2018 15:03:45 +0000 (17:03 +0200)]
fs-util: add new CHASE_STEP flag to chase_symlinks()

If the flag is set only a single step of the normalization is executed,
and the resulting path is returned.

This allows callers to normalize piecemeal, taking into account every
single intermediary path of the normalization.

6 years agoupdate TODO
Lennart Poettering [Wed, 18 Apr 2018 10:42:22 +0000 (12:42 +0200)]
update TODO

6 years agotest-locale-util: show special glyphs
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 08:53:25 +0000 (10:53 +0200)]
test-locale-util: show special glyphs

This is mostly useful as a sanity check.

6 years agotest-utf8: add a smoke test for utf8_console_width()
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 08:57:01 +0000 (10:57 +0200)]
test-utf8: add a smoke test for utf8_console_width()

6 years agologinctl: port loginctl to format-table.[ch]
Lennart Poettering [Wed, 11 Apr 2018 19:37:38 +0000 (21:37 +0200)]
loginctl: port loginctl to format-table.[ch]

6 years agomachinectl: port machinectl to format-table.[ch]
Lennart Poettering [Wed, 11 Apr 2018 18:12:52 +0000 (20:12 +0200)]
machinectl: port machinectl to format-table.[ch]

6 years agobasic: add minimalistic table formatter
Lennart Poettering [Wed, 11 Apr 2018 18:03:39 +0000 (20:03 +0200)]
basic: add minimalistic table formatter

We have plenty of code in our codebase that outputs tables to the
console, and all is homegrown and awful. Let's replace it with a generic
implementation that can do automatically what the old implementations
did manually.

Features:

1. Ellipsation (for fields overly long) and alignment (for
   fields overly short)

2. Sorting of rows

3. automatically copies formatting from the same cell in the row above

4. Heavy use of varargs to make putting together tables easy

5. can expand and compress tables, with weights

6. Has a minimal understanding of unicode wide characters in order to
   match unicode strings to character cell terminals.

7. Columns can be reordered and individually turned off.

8. pretty printing for various data types

And more.

6 years agopager: move pager.[ch] src/shared/ → src/basic/
Lennart Poettering [Wed, 11 Apr 2018 17:57:56 +0000 (19:57 +0200)]
pager: move pager.[ch] src/shared/ → src/basic/

pager.[ch] doesn't use any APIs from src/libsystemd/ or src/shared/
hence there's no reason for it to be in src/shared/, let's move it to
src/basic/ instead.

This enables us to use pager.[ch] APIs from other code in src/basic/,
for example pager_have() and suchlike.

6 years agostring-util: tweak ellipsation a bit
Lennart Poettering [Wed, 11 Apr 2018 17:52:25 +0000 (19:52 +0200)]
string-util: tweak ellipsation a bit

This primarily changes to things:

1. Ellipsation to 0, 1 or 2 characters is now supported. Previously we'd
   hit an assert if the new lengths was < 3, this is now permitted. The
   result strings won't show too much info still of course, but the code
   becomes a bit more generic and robust to use.

2. If a UTF-8 mode is disabled and the input string is pure ASCII, then
   "..." is used for ellipsation, otherwise (as before) "…". This means
   on a pure-ASCII system we should remain pure-ASCII, matching
   behaviour otherwise exposed with special_glyph() and friends. Note
   that we'll use "…" for ellipsiation as soon as either the locale
   settings indicate an UTF-8 mode or the input string already contains
   non-ASCII unicode characters.

Testing for these special cases is improved.

6 years agoutil: add qsort_r_safe(), similar to qsort_safe()
Lennart Poettering [Wed, 11 Apr 2018 17:51:39 +0000 (19:51 +0200)]
util: add qsort_r_safe(), similar to qsort_safe()

6 years agoutf8: add helper call for counting display width of strings
Lennart Poettering [Wed, 11 Apr 2018 17:50:53 +0000 (19:50 +0200)]
utf8: add helper call for counting display width of strings

6 years agolocale: add ellipsis as special glyph
Lennart Poettering [Wed, 11 Apr 2018 17:49:50 +0000 (19:49 +0200)]
locale: add ellipsis as special glyph

6 years agoMerge pull request #8417 from brauner/2018-03-09/add_bind_mount_fallback_to_private_d...
Lennart Poettering [Wed, 18 Apr 2018 09:56:56 +0000 (11:56 +0200)]
Merge pull request #8417 from brauner/2018-03-09/add_bind_mount_fallback_to_private_devices

core: fall back to bind-mounts for PrivateDevices= execution environments

6 years agoMerge pull request #8735 from keszybz/small-docs-updates
Lennart Poettering [Wed, 18 Apr 2018 09:50:56 +0000 (11:50 +0200)]
Merge pull request #8735 from keszybz/small-docs-updates

Small docs updates

6 years agoMerge pull request #8741 from poettering/assorted-stuff2
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 08:31:58 +0000 (10:31 +0200)]
Merge pull request #8741 from poettering/assorted-stuff2

four smaller machinectl/nspawn/machined clean-ups/improvements

6 years agoman: merge two sections into two subsections of one section
Zbigniew Jędrzejewski-Szmek [Mon, 16 Apr 2018 16:00:33 +0000 (18:00 +0200)]
man: merge two sections into two subsections of one section

Those are very close subjects that are a good fit for one section.

6 years agoman: describe unit templating explicitly
Zbigniew Jędrzejewski-Szmek [Mon, 16 Apr 2018 15:57:37 +0000 (17:57 +0200)]
man: describe unit templating explicitly

This patch is heavily based on the text suggested by
archenemies in #3791.

Fixes #3791.

6 years agoman: briefly document Following=
Zbigniew Jędrzejewski-Szmek [Mon, 16 Apr 2018 15:42:10 +0000 (17:42 +0200)]
man: briefly document Following=

Fixes #1914.

6 years agoman: use --option= in more places
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 07:15:28 +0000 (09:15 +0200)]
man: use --option= in more places

6 years agoman: be more explicit about sd-journal-upload input format
Zbigniew Jędrzejewski-Szmek [Mon, 16 Apr 2018 15:20:23 +0000 (17:20 +0200)]
man: be more explicit about sd-journal-upload input format

Fixes #3857.

6 years agoman: add a new page with a general description of common syntax
Zbigniew Jędrzejewski-Szmek [Mon, 16 Apr 2018 15:09:58 +0000 (17:09 +0200)]
man: add a new page with a general description of common syntax

We have a common parser, but for the user it might be
completely unobvious that the same general rules apply
to all those files. Let's add a page about the basic syntax
so that the more specific pages don't have to repeat those
details.

6 years agomeson: fix indentation for systemd-time-sync-wait(5) entries
Zbigniew Jędrzejewski-Szmek [Mon, 16 Apr 2018 15:08:21 +0000 (17:08 +0200)]
meson: fix indentation for systemd-time-sync-wait(5) entries

Those files should not be updated manually, because then automatic updates
contain spurious "changes".

6 years agopath-util: Finish DEFAULT_PATH_NULSTR with an extra NUL (#8745)
Filipe Brandenburger [Wed, 18 Apr 2018 05:46:03 +0000 (22:46 -0700)]
path-util: Finish DEFAULT_PATH_NULSTR with an extra NUL (#8745)

The NULSTR_FOREACH iterator needs to see an empty string at the end, so
we need to insert an extra NUL explicitly.

Also update PATH0_BIN_SBIN(x) to include an extra NUL terminator, rename
it to PATH_BIN_SBIN_NULSTR(x), which is more consistent with the similar
CONF_PATHS_NULSTR(x) macro.

Fixes: 5008da1ec1cf2cf8c15b702c4052e3a49583095d

6 years agotimesync: establish connection when network become online and the manager is not...
Yu Watanabe [Tue, 17 Apr 2018 18:56:12 +0000 (03:56 +0900)]
timesync: establish connection when network become online and the manager is not connected yet (#8727)

This also introduces `manager_is_connected()` helper function, which
returns true when the manager is sending a request, resolving a server
name, or in a poll interval.

Follow-up for 3e85ec072180b6fbec82d715186985536859a29d.
Fixes #8719.

6 years agoMerge pull request #8739 from yuwata/add-description
Lennart Poettering [Tue, 17 Apr 2018 18:33:50 +0000 (20:33 +0200)]
Merge pull request #8739 from yuwata/add-description

bus-util: introduce bus_open_system_watch_bind_with_description()

6 years agomeson: install nspawn tmpfiles snippet only when machined is turned on
Lennart Poettering [Mon, 16 Apr 2018 19:40:26 +0000 (21:40 +0200)]
meson: install nspawn tmpfiles snippet only when machined is turned on

6 years agopolkit: normalize exit values of polkit_agent_open_if_enabled()
Lennart Poettering [Mon, 16 Apr 2018 19:37:12 +0000 (21:37 +0200)]
polkit: normalize exit values of polkit_agent_open_if_enabled()

It's strange eating up the errors here, hence don't. Let's leave this
to the caller.

6 years agoman: minor machinectl updates
Lennart Poettering [Tue, 17 Apr 2018 15:40:10 +0000 (17:40 +0200)]
man: minor machinectl updates

6 years agomachined: some modernizations
Lennart Poettering [Thu, 5 Apr 2018 10:38:25 +0000 (12:38 +0200)]
machined: some modernizations

A couple of minor modernizations:

1. Don't unnecessarily export functions we don't call outside of
   machined.c

2. Use cleanup logic for the manager object.

3. Propagate errors properly from manager_new(). So far if
   sd_event_new() returns EMFILE/ENFILE for some reason we would have
   logged that as log_oom(), which isn#t right, really.

4. Handle SIGTERM/SIGINT cleanly. It's easy, and prettier then letting
   the kernel just abort us. It also makes it possible to valgrind
   machined properly.

6 years agounit,meson: drop .in suffix if no substitution is required (#8740)
Yu Watanabe [Tue, 17 Apr 2018 17:49:10 +0000 (02:49 +0900)]
unit,meson: drop .in suffix if no substitution is required (#8740)

6 years agoMerge pull request #8716 from keszybz/two-nitpicks
Lennart Poettering [Tue, 17 Apr 2018 17:34:27 +0000 (19:34 +0200)]
Merge pull request #8716 from keszybz/two-nitpicks

Two nitpicks

6 years agonetworkd: fix dhcp4 link without routes not being considered ready (#8728)
Anssi Hannula [Tue, 17 Apr 2018 15:12:00 +0000 (18:12 +0300)]
networkd: fix dhcp4 link without routes not being considered ready (#8728)

The dhcp4 code sets link->dhcp4_configured when dhcp4_route_handler()
has processed the last message.

However, in case UseRoutes=no has been set in the [DHCP] section, or
in case the DHCP server simply sends no routes, link_set_dhcp_routes()
will not send any netlink messages and dhcp4_route_handler() will
therefore never be called.

This causes the link to never reach LINK_STATE_CONFIGURED, and e.g.
systemd-networkd-wait-online will not consider the link as ready.

Fix that by setting link->dhcp4_configured = true and calling
link_check_ready() in dhcp4_address_handler() in case
link_set_dhcp_routes() sent no netlink messages (dhcp4_messages is
zero).

6 years agobasic/copy: fix awkward sentence
Zbigniew Jędrzejewski-Szmek [Fri, 13 Apr 2018 10:40:11 +0000 (12:40 +0200)]
basic/copy: fix awkward sentence

6 years agobasic/unit-name: remove duplicate check
Zbigniew Jędrzejewski-Szmek [Fri, 13 Apr 2018 10:38:11 +0000 (12:38 +0200)]
basic/unit-name: remove duplicate check

The check that was right below already covers this case.

6 years agoresolve: set description to bus
Yu Watanabe [Tue, 17 Apr 2018 14:56:17 +0000 (23:56 +0900)]
resolve: set description to bus

6 years agonetwork: set description to bus
Yu Watanabe [Tue, 17 Apr 2018 14:55:27 +0000 (23:55 +0900)]
network: set description to bus

6 years agonetworkd: fix crash if fails to get network file (#8714)
Susant Sahani [Tue, 17 Apr 2018 14:55:04 +0000 (20:25 +0530)]
networkd: fix crash if fails to get network file (#8714)

In some situation if networkd fails to get the network file
then networkd crashes becasse the link->network is not initalized;

```
veth99: Failed to get network dhcp-client-ipv4-only: No such file or directory
Segmentation fault

gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/sus/tt/systemd/build/systemd-networkd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments

Program received signal SIGSEGV, Segmentation fault.
link_load (link=0x55555582ccd0) at ../src/network/networkd-link.c:2973
2973                 r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize);
(gdb) bt
(gdb) p link->network
$1 = (Network *) 0x0
(gdb) list
2968                 if (r < 0) {
2969                         log_link_debug_errno(link, r, "Failed to parse DHCPv4 address %s: %m", dhcp4_address);
2970                         goto dhcp4_address_fail;
2971                 }
2972
2973                 r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize);
2974                 if (r < 0)
2975                         return log_link_error_errno(link, r, "Failed to create DHCPv4 client: %m");
2976
2977                 r = sd_dhcp_client_set_request_address(link->dhcp_client, &address.in);
(gdb) r
```

6 years agohwdb: Add a 2nd accelerometer orientation quirk for the Lenovo Ideapad Miix 320 ...
Hans de Goede [Tue, 17 Apr 2018 14:51:33 +0000 (16:51 +0200)]
hwdb: Add a 2nd accelerometer orientation quirk for the Lenovo Ideapad Miix 320 (#8734)

Different batches of the Lenovo Ideapad Miix 320 use a different sensor
it seems. Add a quirk for the model which uses the SMO8840 (ST) sensor.

6 years agologind: enable limiting of user session scopes using pam context objects (#8397)
Jan Synacek [Tue, 17 Apr 2018 14:42:44 +0000 (16:42 +0200)]
logind: enable limiting of user session scopes using pam context objects (#8397)

6 years agobus-util: introduce bus_open_system_watch_bind_with_description()
Yu Watanabe [Tue, 17 Apr 2018 14:37:52 +0000 (23:37 +0900)]
bus-util: introduce bus_open_system_watch_bind_with_description()

Similar to 56fbd7187a5af44a90c258fbeb1f17114f226bb3, this adds
bus_open_system_watch_bind_with_description() to set description
for busses.

6 years agoMerge pull request #8575 from keszybz/non-absolute-paths
Lennart Poettering [Tue, 17 Apr 2018 13:54:10 +0000 (15:54 +0200)]
Merge pull request #8575 from keszybz/non-absolute-paths

Do not require absolute paths in ExecStart and friends