Commit Graph

3449 Commits

Author SHA1 Message Date
Lennart Poettering c7a54cd67b
Merge pull request #7419 from keszybz/tmpfiles-fixes
Tmpfiles --user mode and various fixes
2017-12-06 19:50:26 +01:00
Zbigniew Jędrzejewski-Szmek 0deb073a66 man: improve formatting in systemd.unit.xml 2017-12-06 10:30:26 +01:00
Zbigniew Jędrzejewski-Szmek 5a8575ef01 tmpfiles: also add %t/%S/%C/%L specifiers
sd_path_home() returns ENXIO when a variable (such as $XDG_RUNTIME_DIR) is not
defined. Previously we used ENOKEY for unresolvable specifiers. To avoid having
two codes, or translating ENXIO to ENOKEY, I replaced ENOKEY use with ENXIO.

v2:
- use sd_path_home and change to ENXIO everywhere
2017-12-06 10:30:26 +01:00
Zbigniew Jędrzejewski-Szmek cfdda37c9f Hook up systemd-tmpfiles as user units
An explicit --user switch is necessary because for the user@0.service instance
systemd-tmpfiles is running as root, and we need to distinguish that from
systemd-tmpfiles running in systemd-tmpfiles*.service.

Fixes #2208.

v2:
- restore "systemd-" prefix
- add systemd-tmpfiles-clean.{service,timer}, systemd-setup.service to
  systemd-tmpfiles(8)
2017-12-06 10:19:35 +01:00
Zbigniew Jędrzejewski-Szmek f2b5ca0e4e tmpfiles: add --user switch 2017-12-06 10:19:29 +01:00
ayekat ca23eeb54c tmpfiles: Add specifiers to allow running as user instance
This commit adds specifiers %U, %u and %h for the user UID, name and
home directory, respectively.

[zj: drop untrue copy-pasted comments and move the next text
     to the new "Specifiers" section.
     Now that #7444 has been merged, also drop the specifier functions.]
2017-12-06 10:19:22 +01:00
Zbigniew Jędrzejewski-Szmek 751223fecf Fail on unknown (alphanumerical) specifiers
The code intentionally ignored unknown specifiers, treating them as text. This
needs to change because otherwise we can never add a new specifier in a backwards
compatible way. So just treat an unknown (potential) specifier as an error.

In principle this is a break of backwards compatibility, but the previous
behaviour was pretty much useless, since the expanded value could change every
time we add new specifiers, which we do all the time.

As a compromise for backwards compatibility, only fail on alphanumerical
characters. This should cover the most cases where an unescaped percent
character is used, like size=5% and such, which behave the same as before with
this patch. OTOH, this means that we will not be able to use non-alphanumerical
specifiers without breaking backwards compatibility again. I think that's an
acceptable compromise.

v2:
- add NEWS entry

v3:
- only fail on alphanumerical
2017-12-06 10:17:37 +01:00
Lennart Poettering b57b372a05 man: fix binary path in systemd(1) (#7550)
Otherwise people might assume that systemd was installed in the $PATH,
but it is not. Do the same as for systemd-vconsole-setup.service and
friends: let's include the full path in the man page.
2017-12-05 21:46:58 +01:00
Yu Watanabe 3db93b3fc8 man: journal-remote: add missing options
This adds documents about supported, mainly SSL related,  options
in jurnal-remote, journal-upload, and journal-gatewayd.
2017-12-05 23:30:50 +09:00
Yu Watanabe bf2d3d7cae man: fix typo 2017-12-05 23:30:47 +09:00
Yu Watanabe e7ff71281d man: include standard-options.xml in systemd-hwdb(8) 2017-12-05 23:30:44 +09:00
Yu Watanabe c94c581c7b man: add missing options to and use standard-options.xml in udevadm(8) 2017-12-05 23:30:41 +09:00
Yu Watanabe a135d27105 man: lists short options in systemd-udevd.service(8)
Follow-up for 2d19c17e8e.
2017-12-04 21:05:38 +09:00
Yu Watanabe db9b9fb99d man: convert info to information or informational 2017-12-04 21:05:18 +09:00
Yu Watanabe af8cbf4741 man: add missing options 2017-12-04 21:02:09 +09:00
Zbigniew Jędrzejewski-Szmek 2df36d096d man: specifiers are allow for argument field in tmpfiles 2017-12-01 18:58:54 +01:00
Zbigniew Jędrzejewski-Szmek d9daae55d5 tmpfiles: add a special return code for syntax failures
In this way, individual errors in files can be treated differently than a
failure of the whole service.

A test is added to check that the expected value is returned.
Some parts are commented out, because it is not. This will be fixed in
a subsequent commit.
2017-12-01 18:58:54 +01:00
Lennart Poettering 1a2d4d7084
Merge pull request #7237 from keszybz/growfs
Create and grow filesystems
2017-12-01 17:58:58 +01:00
Zbigniew Jędrzejewski-Szmek 58e0ac3349 man: add docs for systemd-growfs and systemd-makefs 2017-11-30 20:46:30 +01:00
Mathieu Trudel-Lapierre c1a3890410 Add a "RequiredForOnline=" Link attribute for .network files (#7347)
RequiredForOnline= denotes a link/network that does/does not require being up
for systemd-networkd-wait-online to consider the system online; this makes it
possible to ignore devices without modifying parameters to wait-online.
2017-11-30 18:03:50 +01:00
Yu Watanabe 606df9a5a5 man: fix typo (#7511) 2017-11-30 12:02:20 +01:00
Lennart Poettering e78ee06de1 core: add a new sd_notify() message for removing fds from the FD store again
Currenly the only way to remove fds from the fdstore is to fully
stop the service, or to somehow trigger POLLERR/POLLHUP on the fd, in
which case systemd will remove the fd automatically.

Let's add another way: a new message that can be sent to remove fds
explicitly, given their name.
2017-11-27 17:04:04 +01:00
Lennart Poettering 8d1ab18a46 man: slightly improve the sd_notify() documentation regarding READY=1
READY=1 may be used to signal when a service finished startup, but also
when it finished reloading. Say so.
2017-11-27 17:01:09 +01:00
Lennart Poettering c45d11cb30 service: reorder sd_notify() handling a bit
Let's keep handling of WATCHDOG= and WATCHDOG_USEC= together. No
functional changes.
2017-11-27 16:59:52 +01:00
Zbigniew Jędrzejewski-Szmek 559d215b67 meson: restore building of man pages on demand even if -Dman=false
I want to configure -Dman=false for speed, but be able to build a specific
man page sometimes to check my edits. Commit 5b316b9ea6 broke this by mistake.
Let's adjust the condition to better match the logic of disabling tests only
if xsltproc is really not found.
2017-11-24 14:00:29 +01:00
Lennart Poettering b8afec2107 man: reorder/add sections to systemd.exec(5) (#7412)
The long long list of settings is getting too confusing, let's add some
sections and reorder things in them.

This makes no changes regarding contents, it only reorders things,
sometimes reindents them, and adds sections that made sense to me to
some degree.

Within each sections the settings are ordered by relevance (at least
according to how relevant I personally find them), and not
alphabetically.
2017-11-23 21:20:48 +01:00
Zbigniew Jędrzejewski-Szmek bfbcf21d75
Merge pull request #7406 from poettering/timestamp-rework
timestamping rework
2017-11-22 11:55:04 +01:00
Susant Sahani d6df583c87 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.
2017-11-22 08:23:22 +01:00
Zbigniew Jędrzejewski-Szmek ffb70e4424
Merge pull request #7381 from poettering/cgroup-unified-delegate-rework
Fix delegation in the unified hierarchy + more cgroup work
2017-11-22 07:42:08 +01:00
Lennart Poettering 0b0c55fafd
Merge pull request #7363 from poettering/success-action
Generalize FailureAction=, and add SuccessAction=
2017-11-21 11:57:42 +01:00
Lennart Poettering 99f3baa983 man: clarify that the controllers listed on Delegate= might not be the only ones 2017-11-21 11:54:08 +01:00
Susant Sahani 762e2659b9 networkd: support incoming/outgoing device for rule matching (#7223)
Closes #7210
2017-11-21 11:51:50 +01:00
Lennart Poettering 213242a36b man: bootup(7) is one of our own man pages 2017-11-21 11:01:34 +01:00
Lennart Poettering e7dfbb4e74 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.
2017-11-20 16:37:22 +01:00
Lennart Poettering 53c35a766f 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.
2017-11-20 16:37:22 +01:00
Zbigniew Jędrzejewski-Szmek 5d9adb5b60 man: fix description of --force in halt(8) (#7392)
https://bugzilla.redhat.com/show_bug.cgi?id=1449751
2017-11-20 14:27:46 +01:00
Lennart Poettering 4ff183d419
Merge pull request #7154 from keszybz/bootspec
List bootspec entries in bootctl and use the default for kexec
2017-11-20 13:06:33 +01:00
Zbigniew Jędrzejewski-Szmek f9753b0c79
Merge pull request #7373 from poettering/analyze-calendar
add nifty little "systemd-analyze calendar" command
2017-11-20 11:25:55 +01:00
Lennart Poettering 6d86f4bd11 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.
2017-11-20 10:57:41 +01:00
John Lin e79eabdb1b man: Requires= stops this unit when dependencies get deactivated (#7391)
Fixes: #7372
2017-11-20 10:55:52 +01:00
Lennart Poettering 0133d5553a
Merge pull request #7198 from poettering/stdin-stdout
Add StandardInput=data, StandardInput=file:... and more
2017-11-19 19:49:11 +01:00
Zbigniew Jędrzejewski-Szmek 3a726fcd08 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.
2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek f48f7543ca Add missing headers and SPDX identifiers to man pages 2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek 572eb058cf Add SPDX license identifiers to man pages 2017-11-19 19:08:15 +01:00
Lennart Poettering 5c856d1e6c
Merge pull request #7388 from keszybz/doc-tweak
Add link to kernel docs about no_new_privs and drop note about CPU controller
2017-11-19 17:50:35 +01:00
Lennart Poettering d3590acede machined: support "machinectl bind" on non-directories (#7349)
Fixes: #7195
2017-11-19 14:23:29 +01:00
Zbigniew Jędrzejewski-Szmek c12ad58c41 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.
2017-11-19 14:15:42 +01:00
Zbigniew Jędrzejewski-Szmek 34b3f471f8
Merge pull request #7365 from poettering/nspawn-bind-userns
nspawn: document --bind= and --private-users relationship, and make recursive chown()ing safe
2017-11-19 14:01:39 +01:00
Zbigniew Jędrzejewski-Szmek 30b5047762 bootctl: add a convenient way to print the path to EFI 2017-11-19 12:36:20 +01:00
Zbigniew Jędrzejewski-Szmek a6fabe384d man: add link to kernel docs about no_new_privs 2017-11-19 11:58:45 +01:00