]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agoudev: "handle" oom in path_id 7415/head
Zbigniew Jędrzejewski-Szmek [Wed, 22 Nov 2017 09:32:45 +0000 (10:32 +0100)] 
udev: "handle" oom in path_id

path_prepend returned a status code, but it wasn't looked at anywhere.
Adding checks for the return value in all the bazillion places where it
is called is not very attractive, so let's just make the whole program
abort cleanly if the (very unlikely) oom is encountered.

7 years agoudev: modernize style in path_id
Zbigniew Jędrzejewski-Szmek [Wed, 22 Nov 2017 09:23:45 +0000 (10:23 +0100)] 
udev: modernize style in path_id

No functional change.

7 years agonetworkd: introduce vxcan netdev. (#7150)
Susant Sahani [Wed, 22 Nov 2017 07:23:22 +0000 (12:53 +0530)] 
networkd: introduce vxcan netdev. (#7150)

Similar to the virtual ethernet driver veth, vxcan implements a
local CAN traffic tunnel between two virtual CAN network devices.
When creating a vxcan, two vxcan devices are created as pair
When one end receives the packet it appears on its pair and vice
versa. The vxcan can be used for cross namespace communication.

7 years agoMerge pull request #7395 from poettering/nametohandleat-loop
Zbigniew Jędrzejewski-Szmek [Wed, 22 Nov 2017 07:20:36 +0000 (08:20 +0100)] 
Merge pull request #7395 from poettering/nametohandleat-loop

name_to_handle_at() EOVERFLOW handling

7 years agonetworkd:DHCP-client ignore default route if classless static route is set (#6885)
Susant Sahani [Wed, 22 Nov 2017 06:43:55 +0000 (12:13 +0530)] 
networkd:DHCP-client ignore default route if classless static route is set (#6885)

According to RFC 3442:

If the DHCP server returns both a Classless Static Routes option and
a Router option, the DHCP client MUST ignore the Router option.

fixes #5695.

7 years agoMerge pull request #7381 from poettering/cgroup-unified-delegate-rework
Zbigniew Jędrzejewski-Szmek [Wed, 22 Nov 2017 06:42:08 +0000 (07:42 +0100)] 
Merge pull request #7381 from poettering/cgroup-unified-delegate-rework

Fix delegation in the unified hierarchy + more cgroup work

7 years agoMerge pull request #7389 from shawnl/warning
Zbigniew Jędrzejewski-Szmek [Wed, 22 Nov 2017 06:38:51 +0000 (07:38 +0100)] 
Merge pull request #7389 from shawnl/warning

tree-wide: adjust fall through comments so that gcc is happy

7 years agoREADME: add requirements for IPAddress{Allow,Deny} (#7414)
Andrew Jeddeloh [Tue, 21 Nov 2017 22:54:20 +0000 (14:54 -0800)] 
README: add requirements for IPAddress{Allow,Deny} (#7414)

Document kernel options needed for IPAddress{Allow,Deny}.

7 years agotest: fix UDEV-WANTS testcase for non-bash shells (#7407)
Lennart Poettering [Tue, 21 Nov 2017 16:38:43 +0000 (17:38 +0100)] 
test: fix UDEV-WANTS testcase for non-bash shells (#7407)

testsuite.sh uses "set -o pipefile", which is a bashism, hence use bash
to invoke the script.

7 years agoDocs: Fix spelling and capitalization (#7408)
longersson [Tue, 21 Nov 2017 13:37:16 +0000 (14:37 +0100)] 
Docs: Fix spelling and capitalization (#7408)

7 years agomeson: "upgrade" -Wimplicit-fallthrough to 5 7389/head
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 13:23:40 +0000 (14:23 +0100)] 
meson: "upgrade" -Wimplicit-fallthrough to 5

5 means that only the explicit attribute introduced in previous commit
is accepted. We don't want the comments anymore.

7 years agocore/exec: Restore SmackProcessLabel setting (#7378)
jobol [Tue, 21 Nov 2017 11:01:13 +0000 (12:01 +0100)] 
core/exec: Restore SmackProcessLabel setting (#7378)

Smack LSM needs the capability CAP_MAC_ADMIN to allow
setting of the current Smack exec label. Consequently,
dropping capabilities must be done after changing the
current exec label.

This is only related to Smack LSM. But for clarity and
regularity, all setting of security context moved before
dropping capabilities.

See Issue 7108

7 years agoMerge pull request #7335 from poettering/dissect-meta-info
Lennart Poettering [Tue, 21 Nov 2017 10:58:31 +0000 (11:58 +0100)] 
Merge pull request #7335 from poettering/dissect-meta-info

beef up image dissection, to gather image metadata

7 years agoMerge pull request #7363 from poettering/success-action
Lennart Poettering [Tue, 21 Nov 2017 10:57:42 +0000 (11:57 +0100)] 
Merge pull request #7363 from poettering/success-action

Generalize FailureAction=, and add SuccessAction=

7 years agonetworkd: cleanup do not call link_enter_set_routes after label is set. (#6935)
Susant Sahani [Tue, 21 Nov 2017 10:54:14 +0000 (16:24 +0530)] 
networkd: cleanup do not call link_enter_set_routes after label is set. (#6935)

Remove link_enter_set_routes after label is set.

7 years agotest: fix UDEV-WANTS testcase for non-bash shells 7381/head
Lennart Poettering [Tue, 21 Nov 2017 10:08:22 +0000 (11:08 +0100)] 
test: fix UDEV-WANTS testcase for non-bash shells

testsuite.sh uses "set -o pipefile", which is a bashism, hence use bash
to invoke the script.

7 years agoman: clarify that the controllers listed on Delegate= might not be the only ones
Lennart Poettering [Mon, 20 Nov 2017 11:40:08 +0000 (12:40 +0100)] 
man: clarify that the controllers listed on Delegate= might not be the only ones

7 years agotest: add a test case that validates cgroup delegation
Lennart Poettering [Fri, 17 Nov 2017 19:06:26 +0000 (20:06 +0100)] 
test: add a test case that validates cgroup delegation

This test runs on the unified hierarchy, and ensures that cgroup
delegation works properly, i.e. writ access is granted and the requested
controllers are enabled.

7 years agocgroup: fix delegation on the unified hierarchy
Lennart Poettering [Fri, 17 Nov 2017 18:25:18 +0000 (19:25 +0100)] 
cgroup: fix delegation on the unified hierarchy

Make sure to add the delegation mask to the mask of controllers we have
to enable on our own unit. Do not claim it was a members mask, as such
a logic would mean we'd collide with cgroupv2's "no processes on inner
nodes policy".

This change does the right thing: it means any controller enabled
through Controllers= will be made available to subcrgoups of our unit,
but the unit itself has to still enable it through
cgroup.subtree_control (which it can since that file is delegated too)
to be inherited further down.

Or to say this differently: we only should manipulate
cgroup.subtree_control ourselves for inner nodes (i.e. slices), and
for leaves we need to provide a way to enable controllers in the slices
above, but stay away from the cgroup's own cgroup.subtree_control —
which is what this patch ensures.

Fixes: #7355
7 years agocgroup: properly determine cgroups zombie processes belong to
Lennart Poettering [Fri, 17 Nov 2017 18:24:06 +0000 (19:24 +0100)] 
cgroup: properly determine cgroups zombie processes belong to

When a process becomes a zombie its cgroup might be deleted. Let's add
some minimal code to detect cases like this, so that we can still
attribute this back to the original cgroup.

7 years agocgroup-util: optimization — open subtree_control file only once for all controllers
Lennart Poettering [Fri, 17 Nov 2017 17:03:22 +0000 (18:03 +0100)] 
cgroup-util: optimization — open subtree_control file only once for all controllers

7 years agoupdate TODO
Lennart Poettering [Fri, 17 Nov 2017 17:03:00 +0000 (18:03 +0100)] 
update TODO

7 years agocore: unify common code for preparing for forking off unit processes
Lennart Poettering [Fri, 17 Nov 2017 15:43:08 +0000 (16:43 +0100)] 
core: unify common code for preparing for forking off unit processes

This introduces a new function unit_prepare_exec() that encapsulates a
number of calls we do in preparation for spawning off some processes in
all our unit types that do so.

This allows us to neatly unify a bit of code between unit types and
shorten our code.

7 years agocgroup-util: move Set* allocation into cg_kernel_controllers()
Lennart Poettering [Fri, 17 Nov 2017 15:27:13 +0000 (16:27 +0100)] 
cgroup-util: move Set* allocation into cg_kernel_controllers()

Previously, callers had to do this on their own. Let's make the call do
that instead, making the caller code a bit shorter.

7 years agonspawn: minor optimization
Lennart Poettering [Fri, 17 Nov 2017 12:42:58 +0000 (13:42 +0100)] 
nspawn: minor optimization

no need to prepare the target path if we quite the loop anyway one step
later.

7 years agonspawn-mount: rework get_controllers() a bit
Lennart Poettering [Fri, 17 Nov 2017 12:35:56 +0000 (13:35 +0100)] 
nspawn-mount: rework get_controllers() a bit

Let's rename get_controllers() → get_process_controllers(), in order to
underline the difference to cg_kernel_controllers(). After all, one
returns the controllers available to the process, the other the
controllers enabled in the kernel at all).

Let's also update the code to use read_line() and set_put_strdup() to
shorten the code a bit, and make it more robust.

7 years agonspawn: rework mount_systemd_cgroup_writable() a bit
Lennart Poettering [Fri, 17 Nov 2017 12:05:30 +0000 (13:05 +0100)] 
nspawn: rework mount_systemd_cgroup_writable() a bit

We shouldn't call alloca() as part of function calls, that's not really
defined in C. Hence, let's first do our stack allocations, and then
invoke functions.

Also, some coding style fixes, and minor shuffling around.

No functional changes.

7 years agocgroup: move cgroup controller names def.h → cgroup-util.h
Lennart Poettering [Fri, 17 Nov 2017 12:02:14 +0000 (13:02 +0100)] 
cgroup: move cgroup controller names def.h → cgroup-util.h

These definitions are clearly cgroup specific, hence let's move them out
of def.h

7 years agonetworkd: support incoming/outgoing device for rule matching (#7223)
Susant Sahani [Tue, 21 Nov 2017 10:51:50 +0000 (16:21 +0530)] 
networkd: support incoming/outgoing device for rule matching (#7223)

Closes #7210

7 years agotest: fix UDEV-WANTS testcase for non-bash shells 7395/head
Lennart Poettering [Tue, 21 Nov 2017 10:08:22 +0000 (11:08 +0100)] 
test: fix UDEV-WANTS testcase for non-bash shells

testsuite.sh uses "set -o pipefile", which is a bashism, hence use bash
to invoke the script.

7 years agoudev: port udev_has_devtmpfs() to use path_get_mnt_id()
Lennart Poettering [Mon, 20 Nov 2017 15:08:06 +0000 (16:08 +0100)] 
udev: port udev_has_devtmpfs() to use path_get_mnt_id()

This means there's a good chance the code also works on kernels that
lack name_to_handle_at().

7 years agomount-util: add new path_get_mnt_id() call that queries the mnt ID of a path
Lennart Poettering [Mon, 20 Nov 2017 15:05:41 +0000 (16:05 +0100)] 
mount-util: add new path_get_mnt_id() call that queries the mnt ID of a path

This is a simple wrapper around name_to_handle_at_loop() and
fd_fdinfo_mnt_id() to query the mnt ID of a path. It uses
name_to_handle_at() where it can, and falls back to to
fd_fdinfo_mnt_id() where that doesn't work.

This is a best-effort thing of course, since neither name_to_handle_at()
nor the fdinfo logic work on all kernels.

7 years agomount-util: add name_to_handle_at_loop() wrapper around name_to_handle_at()
Lennart Poettering [Mon, 20 Nov 2017 14:29:53 +0000 (15:29 +0100)] 
mount-util: add name_to_handle_at_loop() wrapper around name_to_handle_at()

As it turns out MAX_HANDLE_SZ is a lie, the handle buffer we pass into
name_to_handle_at() might need to be larger than MAX_HANDLE_SZ, and we
thus need to invoke name_to_handle_at() in a loop, growing the buffer as
needed.

This adds a new wrapper name_to_handle_at_loop() around
name_to_handle_at() that does the necessary looping, and ports over all
users.

Fixes: #7082
7 years agoshared: silence gcc warning (#7402)
Shawn Landden [Tue, 21 Nov 2017 07:24:12 +0000 (23:24 -0800)] 
shared: silence gcc warning (#7402)

[346/1860] Compiling C object 'src/shared/systemd-shared-235@sha/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]
[543/1860] Compiling C object 'src/shared/systemd-shared-235@sta/firewall-util.c.o'.
../src/shared/firewall-util.c: In function ‘entry_fill_basics’:
../src/shared/firewall-util.c:81:79: warning: logical ‘and’ of equal expressions [-Wlogical-op]

7 years agoNEWS: fix minor error (#7399)
Shawn Landden [Tue, 21 Nov 2017 02:05:57 +0000 (18:05 -0800)] 
NEWS: fix minor error (#7399)

7 years agotree-wide: adjust fall through comments so that gcc is happy
Shawn Landden [Sun, 19 Nov 2017 18:06:10 +0000 (10:06 -0800)] 
tree-wide: adjust fall through comments so that gcc is happy

Distcc removes comments, making the comment silencing
not work.

I know there was a decision against a macro in commit
ec251fe7d5bc24b5d38b0853bc5969f3a0ba06e2

7 years agohwdb: Add ACCEL_MOUNT_MATRIX for the Acer Aspire Switch 10 convertible
lukas [Mon, 20 Nov 2017 12:43:48 +0000 (13:43 +0100)] 
hwdb: Add ACCEL_MOUNT_MATRIX for the Acer Aspire Switch 10 convertible
SW5-012 (#7394)

7 years agotest: fall back to /boot if bootctl -p fails (#7397)
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 19:08:11 +0000 (20:08 +0100)] 
test: fall back to /boot if bootctl -p fails (#7397)

It doesn't really matter why.

7 years agonetworkd: configure link even if no routes have been received by dhcp (#6886)
Susant Sahani [Mon, 20 Nov 2017 18:23:34 +0000 (23:53 +0530)] 
networkd: configure link even if no routes have been received by dhcp (#6886)

Fixes #3752

 networkctl
IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 eth0             ether              no-carrier  configuring
  5 host             ether              routable    configured <==========

5 links listed.

7 years agoMerge pull request #6910 from ssahani/issue-6359
Lennart Poettering [Mon, 20 Nov 2017 18:21:36 +0000 (19:21 +0100)] 
Merge pull request #6910 from ssahani/issue-6359

networkd: For IPv6 addresses do not treat IFA_F_DEPRECATED as not ready. (Fix #6359)

7 years agoMerge pull request #6918 from ssahani/issue-5625
Lennart Poettering [Mon, 20 Nov 2017 18:20:23 +0000 (19:20 +0100)] 
Merge pull request #6918 from ssahani/issue-5625

networkd: ndisc - do not stop ndisc client incase of conf error.

7 years agonetworkd: address - support for /31 IPv4 addresses (rfc3021) (#6938)
Susant Sahani [Mon, 20 Nov 2017 18:16:01 +0000 (23:46 +0530)] 
networkd: address - support for /31 IPv4 addresses (rfc3021) (#6938)

When configuring a network address with /31 using networkd, a /31 without a
broadcast specified should be present.

 A /31 which has neither a network nor a broadcast address. See
https://tools.ietf.org/html/rfc3021

Fixes #4038

7 years agonetworkd: Do not send requests to create netdevs if they exists. (#6973)
Susant Sahani [Mon, 20 Nov 2017 17:58:06 +0000 (23:28 +0530)] 
networkd: Do not send requests to create netdevs if they exists. (#6973)

If the netdev already exists we should not send requests to
kernel to create them.

fixes #5448

7 years agonetworkd: Set RoutingPolicyRule in link_configure (#7235)
Susant Sahani [Mon, 20 Nov 2017 16:50:48 +0000 (22:20 +0530)] 
networkd: Set RoutingPolicyRule in link_configure (#7235)

The RoutingPolicyRules are not added when we are calling from set_address
the link->message++ and link->message-- never reaches to zero in the callback function
resulting routes are never gets added.

Closes #7200

7 years agomachinectl: show (some) of the new image metadata bits in "status-image" output 7335/head
Lennart Poettering [Tue, 14 Nov 2017 22:28:57 +0000 (23:28 +0100)] 
machinectl: show (some) of the new image metadata bits in "status-image" output

Let's hook it all up, and show the image metadata among the rest of the
output.

7 years agomachined: port machined's bus APIs to use new image metadata API
Lennart Poettering [Tue, 14 Nov 2017 22:27:14 +0000 (23:27 +0100)] 
machined: port machined's bus APIs to use new image metadata API

Let's rework the D-Bus APIs GetImageOSRelease() to use the new internal
metadata API, to query what it needs to know. Augment it with
GetImageHostname(), GetImageMachineID(), GetImageMachineInfo(), that
expose the other new APIS.

7 years agomachine-image: add a generic API to determine metadata of any image
Lennart Poettering [Tue, 14 Nov 2017 22:25:13 +0000 (23:25 +0100)] 
machine-image: add a generic API to determine metadata of any image

This adds an internal API that permits querying metadata from any type
of image, including both subvol/dir images, and raw/block images. In the
latter case we use the new dissection API we just added.

7 years agodissect: update dissect tool to show image metadata
Lennart Poettering [Tue, 14 Nov 2017 22:24:13 +0000 (23:24 +0100)] 
dissect: update dissect tool to show image metadata

Pretty straight-forward: just use the new metadata dissection API to
figure out what an image contains.

7 years agodissect: add an API that can read various metadata bits out of a dissected image
Lennart Poettering [Tue, 14 Nov 2017 22:22:46 +0000 (23:22 +0100)] 
dissect: add an API that can read various metadata bits out of a dissected image

We focus on four kinds of metadata:

1. /etc/hostname
2. /etc/machine-id
3. /etc/machine-info
4. /etc/os-release or /usr/lib/os-release

This makes dissected images nicely self-contained as we can figure out
what they are just by dissecting them.

7 years agostrv: introduce strv_free_and_replace()
Lennart Poettering [Tue, 14 Nov 2017 22:21:57 +0000 (23:21 +0100)] 
strv: introduce strv_free_and_replace()

it's like free_and_replace() but uses strv_free()

7 years agosignal-util: use a slightly less likely to conflict variable name instead of 't'
Lennart Poettering [Tue, 14 Nov 2017 22:21:43 +0000 (23:21 +0100)] 
signal-util: use a slightly less likely to conflict variable name instead of 't'

7 years agohostname-util: rework read_hostname_config() a bit
Lennart Poettering [Tue, 14 Nov 2017 18:51:06 +0000 (19:51 +0100)] 
hostname-util: rework read_hostname_config() a bit

First of all, let's rename it to read_etc_hostname(), to make clearer
what kind of configuration it actually reads: the file format defined in
/etc/hostname and nothing else.

Secondly: let's port this to use read_line(), i.e. the new way to read
lines from a file in a safe, bounded way.

Thirdly: let's strip leading/trailing whitespace from what we are
reading. Given that we are already pretty lenient what we read (comments
and empty lines), let's be permissive regarding whitespace too.

Fourthly: let's actually validate the hostname when reading it. So far
we tried to make it valid, but that's not always possible (for example,
we can't make an empty hostname valid, ever).

7 years agoupdate TODO 7363/head
Lennart Poettering [Thu, 16 Nov 2017 14:21:06 +0000 (15:21 +0100)] 
update TODO

7 years agotest: add testcase for FailureAction=/SuccessAction=
Lennart Poettering [Thu, 16 Nov 2017 14:58:11 +0000 (15:58 +0100)] 
test: add testcase for FailureAction=/SuccessAction=

it also ensures that rebooting once gets us back up. Yay!

7 years agocore: introduce SuccessAction= as unit file property
Lennart Poettering [Thu, 16 Nov 2017 14:18:01 +0000 (15:18 +0100)] 
core: introduce SuccessAction= as unit file property

SuccessAction= is similar to FailureAction= but declares what to do on
success of a unit, rather than on failure. This is useful for running
commands in qemu/nspawn images, that shall power down on completion. We
frequently see "ExecStopPost=/usr/bin/systemctl poweroff" or so in unit
files like this. Offer a simple, more declarative alternative for this.

While we are at it, hook up failure action with unit_dump() and
transient units too.

7 years agocore: generalize FailureAction= move it from service to unit
Lennart Poettering [Thu, 16 Nov 2017 14:02:56 +0000 (15:02 +0100)] 
core: generalize FailureAction= move it from service to unit

All kinds of units can fail, hence it makes sense to offer this as
generic concept for all unit types.

7 years agoMerge pull request #7375 from poettering/readme-updates
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 13:46:02 +0000 (14:46 +0100)] 
Merge pull request #7375 from poettering/readme-updates

some README updates

7 years agoman: fix description of --force in halt(8) (#7392)
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 13:27:46 +0000 (14:27 +0100)] 
man: fix description of --force in halt(8) (#7392)

https://bugzilla.redhat.com/show_bug.cgi?id=1449751

7 years agoMerge pull request #7154 from keszybz/bootspec
Lennart Poettering [Mon, 20 Nov 2017 12:06:33 +0000 (13:06 +0100)] 
Merge pull request #7154 from keszybz/bootspec

List bootspec entries in bootctl and use the default for kexec

7 years agoMerge pull request #7387 from yuwata/fix-7370
Lennart Poettering [Mon, 20 Nov 2017 11:51:40 +0000 (12:51 +0100)] 
Merge pull request #7387 from yuwata/fix-7370

core: load() should fail when the corresponding unit file does not exist

7 years agoREADME,sysusers: complete and order list of default udev groups we need 7375/head
Lennart Poettering [Mon, 20 Nov 2017 11:30:42 +0000 (12:30 +0100)] 
README,sysusers: complete and order list of default udev groups we need

Let's make sure the list of default udev groups we need are ordered in
README and in the sysusers.d snippet, and both are complete.

7 years agoREADME: slightly update the section about split /usr
Lennart Poettering [Fri, 17 Nov 2017 10:39:48 +0000 (11:39 +0100)] 
README: slightly update the section about split /usr

It's fine if /usr is actually on a separate fs. What matters is that it
is mounted early enough. Say so.

7 years agoREADME: document that prefix *must* be /usr and nss-systemd is not an option
Lennart Poettering [Fri, 17 Nov 2017 10:39:14 +0000 (11:39 +0100)] 
README: document that prefix *must* be /usr and nss-systemd is not an option

See: #7374

7 years agomeson: add -Wimplicit-fallthrough=3 to compilation options (#7393)
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 11:14:47 +0000 (12:14 +0100)] 
meson: add -Wimplicit-fallthrough=3 to compilation options (#7393)

At some point before gcc-7 was released, -Wimplicit-fallthrough=3 was included
in -Wextra. The documentation for gcc-7.2.1-2.fc27.x86_64 still says that, but
empirical testing shows that it's not. The documentation also misstates that
-Wimplicit-fallthrough is equivalent to -Wimplicit-fallthrough=3.

Let's add -Wimplicit-fallthrough=3 explicitly to get the warnings if we regress.

Prompted by #7389.

7 years agoMerge pull request #7373 from poettering/analyze-calendar
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 10:25:55 +0000 (11:25 +0100)] 
Merge pull request #7373 from poettering/analyze-calendar

add nifty little "systemd-analyze calendar" command

7 years agosystemctl: elapsation → elapse 7373/head
Lennart Poettering [Mon, 20 Nov 2017 09:54:21 +0000 (10:54 +0100)] 
systemctl: elapsation → elapse

7 years agoupdate TODO
Lennart Poettering [Fri, 17 Nov 2017 09:34:52 +0000 (10:34 +0100)] 
update TODO

7 years agoanalyze: add new "calendar" command
Lennart Poettering [Fri, 17 Nov 2017 09:33:22 +0000 (10:33 +0100)] 
analyze: add new "calendar" command

This little new command can parse, validate, normalize calendar events,
and calculate when they will elapse next. This should be useful for
anyone writing calendar events and who'd like to validate the expression
before running them as timer units.

7 years agoman: Requires= stops this unit when dependencies get deactivated (#7391)
John Lin [Mon, 20 Nov 2017 09:55:52 +0000 (17:55 +0800)] 
man: Requires= stops this unit when dependencies get deactivated (#7391)

Fixes: #7372
7 years agoutil: add new helper in_utc_timezone()
Lennart Poettering [Mon, 20 Nov 2017 09:52:20 +0000 (10:52 +0100)] 
util: add new helper in_utc_timezone()

As the name suggests it checks whether we are running in an UTC
timezone.

7 years agocalendarspec: rework destructor to return its own type
Lennart Poettering [Fri, 17 Nov 2017 09:32:48 +0000 (10:32 +0100)] 
calendarspec: rework destructor to return its own type

Let's make it more alike most of our other destructors.

7 years agomeson: bump required meson version to 0.41 (#7385)
Zbigniew Jędrzejewski-Szmek [Mon, 20 Nov 2017 07:08:43 +0000 (08:08 +0100)] 
meson: bump required meson version to 0.41 (#7385)

We need data_dirs argument for i18n.merge_file, added in 0.40.1-11-g82492f5d76.

7 years agocore/swap: load() should fail when neither of corresponding unit file nor /proc/swap... 7387/head
Yu Watanabe [Sun, 19 Nov 2017 16:00:34 +0000 (01:00 +0900)] 
core/swap: load() should fail when neither of corresponding unit file nor /proc/swap entry does not exist

It is not necessary to label as loaded to a swap unit when neither of
corresponding unit file nor entry in /proc/swap does not exist.
This makes swap_load() to fail such a case.

Partially fixes #7370.

7 years agocore/automount: load() should fail when the unit file does not exist
Yu Watanabe [Sun, 19 Nov 2017 07:45:35 +0000 (16:45 +0900)] 
core/automount: load() should fail when the unit file does not exist

It is not necessary to label as loaded to automount unit when its unit
file does not exist. So, let's make automount_load() to fail when the
unit file does not exist.

Partially fixes #7370.

7 years agoMerge pull request #7376 from keszybz/simplify-root-options
Lennart Poettering [Sun, 19 Nov 2017 18:50:03 +0000 (19:50 +0100)] 
Merge pull request #7376 from keszybz/simplify-root-options

Simplify root configuration options

7 years agoMerge pull request #7198 from poettering/stdin-stdout
Lennart Poettering [Sun, 19 Nov 2017 18:49:11 +0000 (19:49 +0100)] 
Merge pull request #7198 from poettering/stdin-stdout

Add StandardInput=data, StandardInput=file:... and more

7 years agoMerge pull request #7379 from yuwata/follow-up-7309
Lennart Poettering [Sun, 19 Nov 2017 18:47:24 +0000 (19:47 +0100)] 
Merge pull request #7379 from yuwata/follow-up-7309

networkd: small fixes

7 years agoMerge pull request #7386 from keszybz/spdx
Lennart Poettering [Sun, 19 Nov 2017 18:46:52 +0000 (19:46 +0100)] 
Merge pull request #7386 from keszybz/spdx

Add some missing license headers and add SPDX identifiers

7 years agoAdd license headers and SPDX identifiers to meson.build files 7386/head
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 17:32:01 +0000 (18:32 +0100)] 
Add license headers and SPDX identifiers to meson.build files

So far I avoided adding license headers to meson files, but they are pretty
big and important and should carry license headers like everything else.
I added my own copyright, even though other people modified those files too.
But this is mostly symbolic, so I hope that's OK.

7 years agoAdd SPDX license headers to shell completion scripts
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 17:21:19 +0000 (18:21 +0100)] 
Add SPDX license headers to shell completion scripts

7 years agoAdd SPDX license headers to various assorted files
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 17:18:16 +0000 (18:18 +0100)] 
Add SPDX license headers to various assorted files

7 years agoAdd missing headers and SPDX identifiers to man pages
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:52:56 +0000 (17:52 +0100)] 
Add missing headers and SPDX identifiers to man pages

7 years agoAdd SPDX license headers to unit files
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:35:03 +0000 (17:35 +0100)] 
Add SPDX license headers to unit files

7 years agoAdd SPDX license headers to python scripts
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:32:46 +0000 (17:32 +0100)] 
Add SPDX license headers to python scripts

7 years agoAdd SPDX indentifier to hwdb/parse_hwdb.py
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:26:32 +0000 (17:26 +0100)] 
Add SPDX indentifier to hwdb/parse_hwdb.py

7 years agoAdd SPDX license identifiers to man pages
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:22:32 +0000 (17:22 +0100)] 
Add SPDX license identifiers to man pages

7 years agoAdd SPDX license identifiers to catalog and po files
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:17:35 +0000 (17:17 +0100)] 
Add SPDX license identifiers to catalog and po files

7 years agoAdd SPDX license identifiers to source files under the GPL
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:14:42 +0000 (17:14 +0100)] 
Add SPDX license identifiers to source files under the GPL

7 years agoAdd SPDX license identifiers to source files under the LGPL
Zbigniew Jędrzejewski-Szmek [Sat, 18 Nov 2017 16:09:20 +0000 (17:09 +0100)] 
Add SPDX license identifiers to source files under the LGPL

This follows what the kernel is doing, c.f.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.

7 years agoMerge pull request #7388 from keszybz/doc-tweak
Lennart Poettering [Sun, 19 Nov 2017 16:50:35 +0000 (17:50 +0100)] 
Merge pull request #7388 from keszybz/doc-tweak

Add link to kernel docs about no_new_privs and drop note about CPU controller

7 years agomachined: support "machinectl bind" on non-directories (#7349)
Lennart Poettering [Sun, 19 Nov 2017 13:23:29 +0000 (14:23 +0100)] 
machined: support "machinectl bind" on non-directories (#7349)

Fixes: #7195
7 years agoman: remove note about CPU controller being unmerged 7388/head
Zbigniew Jędrzejewski-Szmek [Sun, 19 Nov 2017 13:15:42 +0000 (14:15 +0100)] 
man: remove note about CPU controller being unmerged

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0d5936344f30aba0f6ddb92b030cb6a05168efe6

In principle we shouldn't merge this until after 4.15 is released, but the
chances of a revert upstream are low, and in that unlikely scenario we can just
revert this patch, it's a trivial documentation update after all.

7 years agoMerge pull request #7365 from poettering/nspawn-bind-userns
Zbigniew Jędrzejewski-Szmek [Sun, 19 Nov 2017 13:01:39 +0000 (14:01 +0100)] 
Merge pull request #7365 from poettering/nspawn-bind-userns

nspawn: document --bind= and --private-users relationship, and make recursive chown()ing safe

7 years agotest: do not hardcode location of EFI partition 7154/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 13:09:11 +0000 (14:09 +0100)] 
test: do not hardcode location of EFI partition

7 years agobootctl: add a convenient way to print the path to EFI
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 12:55:05 +0000 (13:55 +0100)] 
bootctl: add a convenient way to print the path to EFI

7 years agobootctl: rename r2 and r to r and k
Zbigniew Jędrzejewski-Szmek [Fri, 17 Nov 2017 12:50:08 +0000 (13:50 +0100)] 
bootctl: rename r2 and r to r and k

r2 was assigned first despite the name. This scheme is different than
what is used elsewhere in the code. Rename to make it easier to read.

7 years agosystemctl: make sure the kernel is loaded before kexec'ing
Zbigniew Jędrzejewski-Szmek [Sat, 21 Oct 2017 08:55:32 +0000 (10:55 +0200)] 
systemctl: make sure the kernel is loaded before kexec'ing

We just load the same kernel that would be loaded by default by sd-boot, with
the same options. Changing the kernel or initramfs or options is left for
later.

Now we will refuse to continue if loading fails. This makes 'systemctl kexec'
more predictable: it will not fall back to normal reboot if the kernel is
not loaded.

7 years agoman: add link to kernel docs about no_new_privs
Zbigniew Jędrzejewski-Szmek [Sun, 19 Nov 2017 10:58:45 +0000 (11:58 +0100)] 
man: add link to kernel docs about no_new_privs

7 years agonetworkd: fix indentation 7379/head
Yu Watanabe [Fri, 17 Nov 2017 16:24:07 +0000 (01:24 +0900)] 
networkd: fix indentation

7 years agonetworkd: remove debug message and unref when error
Yu Watanabe [Fri, 17 Nov 2017 16:22:34 +0000 (01:22 +0900)] 
networkd: remove debug message and unref when error

Follow-up for 8006aa32ee29538ef1d7978d60d6427a0bf31e80.