Commit Graph

5215 Commits

Author SHA1 Message Date
Lennart Poettering c60bc8d4fb
Merge pull request #15745 from keszybz/one-more-specifier
Add %l as specifier for short hostname
2020-05-07 22:18:59 +02:00
Lennart Poettering 7c5137329d
Merge pull request #15713 from poettering/home-discard-when-offline
homed: optionally, issue FITRIM ioctl when logging out
2020-05-07 19:17:48 +02:00
Lennart Poettering bb5da6c385 meson: re-run ninja update-man-rules
Split out of #15703, because it has nothing to do with that.

Follow-up for: 4f07ddfa9b
2020-05-07 19:00:59 +02:00
Zbigniew Jędrzejewski-Szmek e97708fa3e Add %l as specifier for the hostname without any domain component
As described in #15603, it is a fairly common setup to use a fqdn as the
configured hostname. But it is often convenient to use just the actual
hostname, i.e. until the first dot. This adds support in tmpfiles, sysusers,
and unit files for %l which expands to that.

Fixes #15603.
2020-05-07 17:36:44 +02:00
Zbigniew Jędrzejewski-Szmek 6dbf40256b man: put all pages which mention a specifier in the index
I wasn't 100% convinced that this is the right thing to do, hence the separate
commit. But e.g. for paths we index all mentions, so I think it's reasonable to
do the same here.
2020-05-07 16:30:10 +02:00
Zbigniew Jędrzejewski-Szmek 6552874506 man: fix indentation in sysusers.d.xml 2020-05-07 16:30:10 +02:00
Lennart Poettering c0440512e6 docs: document the new offline discard logic 2020-05-07 16:13:07 +02:00
Lennart Poettering 6d68a0b3dd man: document homed key management
Fixes: #15235
2020-05-07 15:46:00 +02:00
Zbigniew Jędrzejewski-Szmek 0d525a3e93 man: add specifiers section to directives index
The hack with getparent().txt is not very pretty, but the whole
thing seems to work well enough. It is useful to figure out whihc
specifiers are supported where.
2020-05-07 14:59:24 +02:00
Zbigniew Jędrzejewski-Szmek 282230882c tools: move directive index template to separate file
In the beginning, it was rather short, and reasonable to include inline.
Now it is long and unwieldy, let's split it out.

While at it, let's reindent and wrap using our current standards.
2020-05-07 14:40:10 +02:00
Zbigniew Jędrzejewski-Szmek c62e7d041f man: update rules
Forgotten in 4f07ddfa9b.
2020-05-07 14:05:17 +02:00
Zbigniew Jędrzejewski-Szmek 06689b8d11 meson: rename make-man-rules.py to update-man-rules.py
The name of the helper didn't match the name of the meson target, which was
always confusing me. With this change, we consistenly use "update" to
re-generate things which we otherwise keep in vc, and "make" for things
which are generated during each build.
2020-05-07 14:01:09 +02:00
Zbigniew Jędrzejewski-Szmek 1f63c72d2e man: suffix pam options with "=" where arg is required too 2020-05-07 13:28:39 +02:00
Lennart Poettering 4ad5bf7865 man: bring example PAM snippet of pam_systemd and pam_systemd_home back in sync
Let's make it the same snippet, just highlight different lines.
2020-05-06 22:30:43 +02:00
Lennart Poettering c6472bb019 man: highlight relevant lines in pam_systemd_home.so example PAM snippet
let's do this like we do in the NSS module man pages.
2020-05-06 22:30:27 +02:00
Zbigniew Jędrzejewski-Szmek 0894f08bf1 resolve: fix type of parameter and update man page
The "a" got dropped in eff7c2d3c9.
2020-05-06 15:02:38 +02:00
Zbigniew Jędrzejewski-Szmek ba5a389d24 Merge pull request #15473 from keszybz/bus-introspection 2020-05-06 15:00:07 +02:00
Eric Anderson 9e12d5bf63 socket-proxy: Support exit-on-idle
This adds the --exit-idle-time argument that causes
systemd-socket-proxyd to exit when there has been an idle period. An
open connection prevents the idle period from starting, even if there is
no activity on that connection.

When combined with another service that uses StopWhenUnneeded=, the
proxy exiting can trigger a resource-intensive process to exit. So
although the proxy may consume minimal resources, significant resources
can be saved indirectly.

Fixes #2106
2020-05-06 13:58:57 +02:00
Daan De Meyer eff7c2d3c9 sd-bus: Add a nicer way of specifying sd-bus vtable method arguments
SD_BUS_NAMES_WITH_ARGS is a less error-prone way of specifying D-Bus
method arguments.
2020-05-06 10:22:54 +02:00
Zbigniew Jędrzejewski-Szmek b61cc5fdad man: update login1(5) for SetType()
Added in db72aea4a9.
2020-05-06 09:13:42 +02:00
Zbigniew Jędrzejewski-Szmek b856b346c1 man: add stub for home1(5) 2020-05-06 09:13:42 +02:00
Lennart Poettering c92391f52f
Merge pull request #15692 from keszybz/preset-cleanup
Make systemctl list-unit-files output more useful
2020-05-06 08:19:37 +02:00
Zbigniew Jędrzejewski-Szmek 1a0e562a5b man: add description of org.freedesktop.LogControl1
I'm not sure if the LogTarget property is sufficiently general to be made into
a property that can be generally implemented. It is very closely tied to the internal
systemd logic. The other two seem fine thoough.
2020-05-05 22:41:23 +02:00
Zbigniew Jędrzejewski-Szmek 81e06775be meson: add man/update-dbus-docs target 2020-05-05 22:41:23 +02:00
Zbigniew Jędrzejewski-Szmek 7cb4f4145f man: drop LogLevel from resolve1(5)
Removed in 4c4520789d.
2020-05-05 22:41:23 +02:00
Zbigniew Jędrzejewski-Szmek 38b52b6918 man: drop CanMultiSession from documention
Removed in 8f8cc84ba4.
2020-05-05 22:41:23 +02:00
Zbigniew Jędrzejewski-Szmek 48f99d7c06 man: use --bus-introspect to autogenerate dbus api docs
This has the advantage that the executables are always in place and we don't
need any units to exist on the bus, so we can eventually hook this up into
a normal build system. (Probably as a build time check.)
2020-05-05 22:41:23 +02:00
Zbigniew Jędrzejewski-Szmek 15d7ab87c4 systemctl: add new enablement state "alias"
For units which are aliases of other units, reporting preset status as
"enabled" is rather misleading. For example, dbus.service is an alias of
dbus-broker.service. In list-unit-files we'd show both as "enabled".  In
particular, systemctl preset ignores aliases, so showing any preset status at
all is always going to be misleading. Let's introduce a new state "alias" and
use that for all aliases.

I was trying to avoid adding a new state, to keep compatibility with previous
behaviour, but for alias unit files it simply doesn't seem very useful to show
any of the existing states. It seems that the clearly showing that those are
aliases for other units will be easiest to understand for users.
2020-05-05 21:50:38 +02:00
Chris Down 87afd40b5a man: systemd.service: systemd-analyze exit-codes -> exit-status
5238d9a83a renames this to exit-status, but systemd.service was not
updated.

The rest of the doc seems a bit inconsistent in its use of the terms
"exit code" and "exit status", but it's not that confusing, so leave
those alone for now.
2020-05-05 21:38:29 +02:00
Zbigniew Jędrzejewski-Szmek eaf7ac4929
Merge pull request #15645 from poettering/calender-expression-doc-fix
some calendar expression fixes and documentation updates
2020-05-05 16:07:11 +02:00
Zbigniew Jędrzejewski-Szmek 640ebaa952
Merge pull request #15648 from poettering/journalctl-cat-beefup
journalctl: honour --output-fields= in -o cat mode
2020-05-05 14:00:26 +02:00
Lennart Poettering c83347b49d man: migrate more specifier explanations to standard-specifiers.xml
We probably can migrate even more, but for now let's just migrate those
which have the 1:1 identical text everywhere.

(Also, let's add the % entry to all specifier tables)
2020-05-05 11:33:13 +02:00
Lennart Poettering e0e3d38726 man: document the new -o cat feature 2020-05-05 09:22:27 +02:00
Lennart Poettering 2edc7aea7a man: expand on the star…end/repetition time expressions
And attempt to explain what is requested in #15030, but still be
concise.

Fixes: #15030
2020-05-05 08:57:14 +02:00
Frantisek Sumsal 2d4f8cf467 man: fix few spelling errors
Reported by Fossies.org.
2020-05-03 10:23:25 +02:00
Lennart Poettering 6eb35fd695
Merge pull request #15547 from kkdwivedi/notify-barrier
Introduce sd_notify_barrier
2020-05-01 08:48:42 +02:00
Zbigniew Jędrzejewski-Szmek b76ef59756
Merge pull request #13512 from msekletar/freezer
core: introduce support for cgroup freezer
2020-05-01 07:52:29 +02:00
Kumar Kartikeya Dwivedi 5ec7a9947e
man: sd_notify() race is gone with sd_notify_barrier()
Add note for change of behaviour in systemd-notify, where parent pid trick
is only used when --no-block is passed, and with enough privileges ofcourse.

Also, fix a small error in systemd(1).
2020-05-01 03:22:59 +05:30
Kumar Kartikeya Dwivedi 4f07ddfa9b
Introduce sd_notify_barrier
This adds the sd_notify_barrier function, to allow users to synchronize against
the reception of sd_notify(3) status messages. It acts as a synchronization
point, and a successful return gurantees that all previous messages have been
consumed by the manager. This can be used to eliminate race conditions where
the sending process exits too early for systemd to associate its PID to a
cgroup and attribute the status message to a unit correctly.

systemd-notify now uses this function for proper notification delivery and be
useful for NotifyAccess=all units again in user mode, or in cases where it
doesn't have a control process as parent.

Fixes: #2739
2020-05-01 03:22:47 +05:30
Kenny Levinsen cb5a46b845 core: Add optional FDPOLL=0 argument to fdstore
A service can specify FDSTORE=1 FDPOLL=0 to request that PID1 does not
poll the fd to remove them on error. If set, fds will only be removed on
FDSTOREREMOVE=1 or when the service is done.

Fixes: #12086
2020-04-30 19:42:26 +02:00
Michal Sekletár d9e45bc3ab core: introduce support for cgroup freezer
With cgroup v2 the cgroup freezer is implemented as a cgroup
attribute called cgroup.freeze. cgroup can be frozen by writing "1"
to the file and kernel will send us a notification through
"cgroup.events" after the operation is finished and processes in the
cgroup entered quiescent state, i.e. they are not scheduled to
run. Writing "0" to the attribute file does the inverse and process
execution is resumed.

This commit exposes above low-level functionality through systemd's DBus
API. Each unit type must provide specialized implementation for these
methods, otherwise, we return an error. So far only service, scope, and
slice unit types provide the support. It is possible to check if a
given unit has the support using CanFreeze() DBus property.

Note that DBus API has a synchronous behavior and we dispatch the reply
to freeze/thaw requests only after the kernel has notified us that
requested operation was completed.
2020-04-30 19:02:51 +02:00
Lennart Poettering 9dcd43b149 notify: beef up --pid= logic
Prompted by the discussions on #15547.
2020-04-30 18:36:05 +02:00
Zbigniew Jędrzejewski-Szmek 26b8190841 man: mention that ProtectSystem= also takes care of /efi 2020-04-30 09:54:00 +02:00
nabijaczleweli e81f5fc4e8
link: Allow configuring RX mini and jumbo ring sizes, too
This now covers all ethtool_ringparam configurables (as of v5.6;
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h?h=v5.6#n488)
2020-04-29 18:57:13 +02:00
nabijaczleweli 80af9bdabe
link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementation slightly 2020-04-29 18:55:42 +02:00
Lennart Poettering 503298b724 man: document new specifiers 2020-04-28 23:14:28 +02:00
Daan De Meyer bac1b83217 sd-bus: Add sd_bus_query_sender_creds/privilege docs 2020-04-28 19:38:04 +02:00
Daan De Meyer 8653422b6a sd-bus: Add sd_bus_get_creds_mask docs 2020-04-28 19:30:49 +02:00
Daan De Meyer 7b679a188e sd-bus: Cite sd_bus_creds_unref in sd_bus_get_name_creds docs 2020-04-25 10:01:18 +02:00
Zbigniew Jędrzejewski-Szmek c13f4643f4 Merge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs 2020-04-24 08:29:41 +02:00