Commit graph

8740 commits

Author SHA1 Message Date
Lennart Poettering dc9a56d83e man: add a few missing entries to kernel-command-line man page 2024-02-28 15:33:51 +01:00
Lennart Poettering 78266a54f1 tree-wide: use "_" rather than "-" as separator in kernel cmdline options
Most of our kernel cmdline options use underscores as word separators in
kernel cmdline options, but there were some exceptions. Let's fix those,
and also use underscores.

Since our /proc/cmdline parsers don't distinguish between the two
characters anyway this should not break anything, but makes sure our own
codebase (and in particular docs and log messages) are internally
consistent.
2024-02-28 15:33:51 +01:00
Luca Boccassi 0cad991c4c
Merge pull request #31293 from ragazenta/netdev_rps
udevd: Add ReceivePacketSteeringCPUMask for systemd.link
2024-02-28 13:37:28 +00:00
Susant Sahani 00386d5b3f netdev: bond - add support for peer_notif_delay
Specify the delay, in milliseconds, between each peer
notification (gratuitous ARP and unsolicited IPv6
Neighbor Advertisement) when they are issued after
a failover event. This delay should be a multiple of
the MII link monitor interval (miimon).

 The valid range is 0 - 300s. The default value is 0,
which means to match the value of the MII link monitor interval.
2024-02-28 17:31:02 +05:30
Yu Watanabe 39af486a7f network/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()
This effectively reverts 9175002864.

The retrans time field in RA message is for neighbor solicitation,
and the commit d4c8de21a0 makes the value
assigned to the correct sysctl property.

Let's deprecate the option, and drop the redundant functions.
2024-02-28 11:05:00 +00:00
Renjaya Raga Zenta 0f30bf5886 udevd: Add ReceivePacketSteeringCPUMask for systemd.link
Takes a list of CPU indices or ranges separated by either whitespace or commas. Alternatively,
takes the special value "all" in which will include all available CPUs in the mask.
CPU ranges are specified by the lower and upper CPU indices separated by a dash (e.g. "2-6").
This option may be specified more than once, in which case the specified CPU affinity masks are merged.
If an empty string is assigned, the mask is reset, all assignments prior to this will have no effect.
Defaults to unset and RPS CPU list is unchanged. To disable RPS when it was previously enabled, use the
special value "disable".

Currently, this will set CPU mask to all `rx` queue of matched device (if it has multiple queues).

The `/sys/class/net/<dev>/queues/rx-<n>/rps_cpus` only accept cpu bitmap mask in hexadecimal.

Fix: #30323
2024-02-28 11:35:36 +07:00
Luca Boccassi 47c2a6e958
Merge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch
Small cleanups after review of stable batch
2024-02-27 20:07:18 +00:00
Zbigniew Jędrzejewski-Szmek 3e6b040bec man/sd_bus_service_reconnect.c: normalize whitespace
For man pages, we generally indent with 2 spaces and wrap to ~80 columns.
2024-02-27 18:15:51 +01:00
Štěpán Němec c959e17823 man, shell-completion: fix a few typos/language issues 2024-02-27 16:57:33 +00:00
Luca Boccassi e5191faf44
Merge pull request #31000 from flatcar-hub/krnowak/mutable-overlays
systemd-sysext: Implement optional mutability for extensions
2024-02-26 16:17:11 +00:00
Lennart Poettering 795ec90cda vmspawn: use our own ptyfwd code for the console of a VM
Let's make systemd-nspawn use our own ptyfwd logic to handle the TTY by
default.

This adds a new setting --console=, inspired by nspawn's setting of the
same name. If --console=interactive= is used, then we'll do the TTY
dance on our own via ptyfwd, and thus get tinting, our usual hotkey
handling and similar.

Since qemu's own console is useful too, let's keep it around via
--console=native.

FInally, replace the --qemu-gui switch by --console=gui.
2024-02-26 11:54:37 +01:00
Thilo Fromm ea29a87f23 man/systemd-sysext.xml: document mutable extensions
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2024-02-23 19:17:50 +01:00
Sam Leonard 5df0159ef2 ssh-generator: add mention of ssh.authorized_keys.root to man page 2024-02-23 12:52:28 +00:00
Yu Watanabe 3976c43092 network: introduce per-interface IP forwarding settings
This deprecates IPForward= setting, which unconditionally controled
the global setting, even though it is a setting in .network file.

Instead, this introduces new IPv4Forwarding= and IPv6Forwarding=
settings both in .network and networkd.conf.
If these settings are specified in a .network file, then the
per-interface forwarding setting will be configured.
If specified in networkd.conf, then the global IP forwarding setting will
be configured.

Closes #30648.
2024-02-22 19:24:12 +00:00
Luca Boccassi 909c4f8587
Merge pull request #31414 from poettering/bsod-tweaks
bsod: some small bsod tweaks
2024-02-22 12:48:38 +00:00
Luca Boccassi a0d2c41ed6
Merge pull request #31432 from poettering/vmspawn-qemu-rename
vmspawn: drop "qemu" word from most switches
2024-02-22 11:04:45 +00:00
Susant Sahani 9adafeddac netdev/macvlan: allow to set the broadcast queueing threshold
Allow to set the broadcast queueing threshold
on macvlan devices. This controls which multicast packets will be
processed in a workqueue instead of inline.
2024-02-22 09:36:19 +09:00
Lennart Poettering 2c0061c784 vmspawn: rename "qemu" specific switches to not carry the "qemu" prefix
This renames a few of the switches vmspawn takes, such as --qemu-mem=
and --qemu-smp= to names without the "qemu" moniker and uses less
cryptic names (i.e. --ram= and --cpus=).

I think it's a bit unsystematic that so far we use the "qemu" prefix for
some options but not for others. At least I could not figure out a
system when we use it and when we don't. Hence let's clean it up and
just use simpler names without suffix.

After all we might want to plug other hypervisors behind vmspawn one
day, hence I think there's value in sticking to generic names for these
switches that allow us to switch out backends easily. In particular for
--ram= and --cpus= which are probably the most fundamental of VM settings
there are.

The old switches are support for compat, but not advertised in man page
or --help text anymore.

I left "--qemu-gui" under its current name, since it fundamentally is a
a qemu concept, exposing a qemu specific graphical UI.
2024-02-21 16:35:53 +01:00
Lennart Poettering cf9de8ef21 vspawn: prefer "VSOCK" spelling over "vsock" and "VSock"
The vsock(7) man page appears to prefer "VSOCK" spelling for the
concept, let's also use it as much as we can.
2024-02-21 16:18:24 +01:00
Lennart Poettering 9655cd3c95 bsod: add new option --tty= to specify TTY to output on
If specified we'll not try to find a free V, but instead just output
directly to the specified TTY. This is particularly useful for
debugging, as it means "systemd-bsod --tty=/dev/tty" just works.
2024-02-21 15:11:27 +01:00
Luca Boccassi 14975aaef8
Merge pull request #31326 from CodethinkLabs/vmspawn/extra_drives
vmspawn: add --extra-drive= and correctly escape ',' in certain  qemu arguments
2024-02-21 13:52:22 +00:00
Martin Ivicic ea932bd34d networkd: support setting dhcp server port 2024-02-21 19:33:27 +09:00
Sam Leonard 1ec3218e82
vmspawn: add --extra-drive= 2024-02-21 10:22:40 +00:00
Yu Watanabe 3c6d9d1c39
Merge pull request #31405 from yuwata/network-ndisc-reachable-time
network/ndisc: set neighbor reachable time
2024-02-21 14:29:01 +09:00
Luca Boccassi 5605b7d61a
Merge pull request #31400 from poettering/askpw-rework
Password Asking rework
2024-02-20 23:45:52 +00:00
Zbigniew Jędrzejewski-Szmek 0615abef62 analyze: always recommend saving the output to a file
The command will refuse to write to a TTY, so give a strong hint
that redirecting to a file is recommended. This makes the synopsis,
man page text, and --help output consistent.

Also drop the space after the redirection operator everywhere.
2024-02-20 19:35:58 +00:00
Lennart Poettering 732285eb8c man: tweak cryptsetup credentials docs a bit
Let's bring the credentials into a better order, in order of relevance.

Also, let's clarify what the generic LUKS PIN is about.

Finally, list the credentials in system-credentials(7) too, after all
people might want to unlock a disk with this via SMBIOS Type 11 or so.
2024-02-20 16:50:00 +01:00
Lennart Poettering 0fceb5539d man: now that the crdentials used by systemd-cryptenroll are in order, document them
Replaces: #31370
2024-02-20 16:50:00 +01:00
Yu Watanabe 1452d49741 network/ndisc: set IPv6 neighbor reachable time
Closes #31402.
2024-02-20 15:31:39 +09:00
runiq 793166aea5 udev: String substitutions can be done in ENV, too
Precedence for example in ac63c8df30/rules.d/99-systemd.rules.in (L75).

Add ENV to the list of keys where string substitutions can be used.

While I'm at it, also sort the list in that paragraph alphabetically.
2024-02-20 13:10:30 +09:00
Yu Watanabe 4b6d8de09c home: fix typo
Follow-up for 25c89b8977 and
a4d72746c7.
2024-02-20 09:25:30 +09:00
Luca Boccassi 4086a16742
Merge pull request #31357 from keszybz/cleanups-vmspawn
Cleanups vmspawn
2024-02-19 16:45:42 +00:00
Adrian Vovk 25c89b8977 homectl: Add flags to edit blob directories
This makes it possible to edit blob directories using homectl. The
following syntax is available:

* `--blob-directory=/path/somewhere`: Replaces the entire blob directory
with the contents of /path/somewhere

* `--blob-directory=foobar=/path/somewhere`: Replaces just the file
foobar in the blob directory with the contents of /path/somewhere

* `--blob-directory=foobar=`: Deletes the file foobar from the blob
directory

* `--blob-directory=`: Resets all previous flags

* `--avatar=`, etc: Shortcuts for `--blob-directory=FILENAME=` for the
known files in the blob directory
2024-02-19 11:18:11 +00:00
Adrian Vovk a4d72746c7 homework: Handle Update & Create w/ blob dir
Introduces new extended variants of the various incarnations of
Create and Update, which take a map of filenames to FDs. This map is
then used to populate the bulk directory.

FDs are used to prevent the client from abusing homed's blob directory
permissions (everything is made world-readable by homed) to open files
that they normally aren't allowed to open. Passing along an FD ensures
that the client has read access to the file it wants homed to make
world-readable.

Internally, homework uses the map to overwrite the system blob dir.
Later, homework's existing blob dir reconciliation logic will propagate
the new contents from the system blob dir into the embedded blob
dir
2024-02-19 11:18:11 +00:00
Adrian Vovk c3d50255fc homed: Create & advertise blob directory
This ensures that a user-specific blob directory exists in
/var/cache/systemd/homed for as long as the user exists, and gets
deleted if the user gets deleted.

It also advertises this blob directory via the user record, so that
clients can find and use it.
2024-02-19 11:18:11 +00:00
Luca Boccassi 034569150f
Merge pull request #31364 from bluca/vpick_ext
core: add support for vpick for ExtensionImages=/ExtensionDirectories=
2024-02-19 11:15:54 +00:00
Zbigniew Jędrzejewski-Szmek 9eb195701e man: reword paragraph about --forward-journal= and adjust spacing
The previous text did not look right when rendered.

The text is much easier to read when paragraphs are separated by an empty
line, latex-style.
2024-02-19 11:56:28 +01:00
Luca Boccassi 8d2a38ef6c man: fix typo in uid0.xml
Follow-up for 72eb3081b2
2024-02-18 13:01:21 +00:00
Luca Boccassi 622efc544d core: add support for vpick for ExtensionDirectories= 2024-02-17 11:20:00 +00:00
Luca Boccassi 5e79dd96a8 core: add support for vpick for ExtensionImages= 2024-02-17 11:20:00 +00:00
Luca Boccassi 7fa428cf44 man: create reusable snippet for 'vpick' entries 2024-02-17 11:20:00 +00:00
Yu Watanabe e21dd22040
Merge pull request #31338 from ssahani/network-bond-missed
network: netdev - bond add support for ARP missed max
2024-02-17 06:16:42 +09:00
Luca Boccassi 92d1419eb8
Merge pull request #31218 from CodethinkLabs/vmspawn/journal_forwarding
vmspawn: support journal forwarding
2024-02-16 12:09:52 +00:00
Susant Sahani b33bba0434 network: netdev - bond add support for ARP missed max
Allows to configure bond arp_missed_max is the maximum number of arp_interval monitor cycle
for missed ARP replies. If this number is exceeded, link is reported as
down.
2024-02-16 14:44:51 +05:30
Luca Boccassi e07e7017bb man: enchance sd_bus_set_watch_bind() example to handle one more failure
In case the D-Bus policy is not set up correctly the example just
loops forever. Check the return of sd_bus_request_name_async() in
a callback and exit if the error is not temporary.

Follow-up for 34bbda18a5
2024-02-15 14:19:39 +00:00
Sam Leonard 258d26940f
vmspawn: add --forward-journal= 2024-02-15 14:08:21 +00:00
Sam Leonard f31cff849d
journald: implement socket forwarding
This commit adds a new way of forwarding journal messages - forwarding
over a socket.

The socket can be any of AF_INET, AF_INET6, AF_UNIUX or AF_VSOCK.

The address to connect to is retrieved from the "journald.forward_address" credential.

It can also be specified in systemd-journald's unit file with ForwardAddress=
2024-02-15 14:08:20 +00:00
Benjamin Franzke 614d09a37d nspawn: add support for owneridmap bind option
owneridmap bind option will map the target directory owner from inside the
container to the owner of the directory bound from the host filesystem.
This will ensure files and directories created in the container will be owned
by the directory owner of the host filesystem. All other users will remain
unmapped. Files to be written as other users in the container will not be
allowed.

Resolves: #27037
2024-02-15 11:49:54 +01:00
Winterhuman 6c6ec5f728 Improve IgnoreSIGPIPE description
Reword the description of the `IgnoreSIGPIPE=` service option to be more grammatical.
2024-02-14 17:31:18 +00:00
Mike Yuan 3725766266 systemctl: don't warn unit needs reload if --no-warn 2024-02-15 00:37:19 +08:00
Lennart Poettering 955502121d man: update D-Bus docs with new calls 2024-02-14 15:08:03 +01:00
Lennart Poettering 6e9bf0ad29 logind: add ability to upgrade session class from 'user-incomplete' to 'user' 2024-02-14 15:00:46 +01:00
Lennart Poettering 53ebde6db4 logind: add new 'user-incomplete' session class 2024-02-14 14:58:37 +01:00
Luca Boccassi 25d80c2203
Merge pull request #31283 from CodethinkLabs/vmspawn/start_from_template
vmspawn: Support being invoked from a template unit
2024-02-14 13:55:04 +00:00
Adrian Vovk 49e55abb7f
user-record: Add languages field
This field is like preferredLanguage, but takes a priority list of
languages instead. If an app isn't translated into a user's primary
language, it can fall back to one of the other languages in the list
thus making the app more accessible to the user.

For instance: in my experience, many Ukrainians are fluent in Russian,
often significantly better than English (especially if they are of a
generation that grew up during the USSR). Such a person might set this
new variable to ["uk_UA.UTF-8", "ru_UA.UTF-8"] so that software that
lacks Ukrainian translations will first try Russian translations before
defaulting to English.

Fixes #31290
2024-02-13 17:39:14 -05:00
Sam Leonard 811ad9e6b2
vmspawn: support multiple initrds via merging 2024-02-13 12:26:33 +00:00
Lennart Poettering c9cdbaed17
Merge pull request #30380 from keszybz/tmpfiles-dry-run
Make tmpfiles/sysusers nicer with local files and implement tmpfiles --dry-run
2024-02-13 09:45:50 +01:00
Ondrej Kozina c5daf14c88 cryptsetup: Add optional support for linking volume key in keyring.
cryptsetup 2.7.0 adds feature to link effective volume key in custom
kernel keyring during device activation. It can be used later to pass
linked volume key to other services.

For example: kdump enabled systems installed on LUKS2 device.
This feature allows it to store volume key linked in a kernel keyring
to the kdump reserved memory and reuse it to reactivate LUKS2 device
in case of kernel crash.
2024-02-13 09:45:08 +01:00
cunshunxia c18c7e2322 Fix OOMPolicy= version in manpage of systemd.scope
OOMPolicy in scope units is separately supported in
version v253, so I think it cannot be directly used
in the manpage with the version from the service.

fix:#30836
2024-02-12 16:49:42 +00:00
Lennart Poettering a85daa97d9
Merge pull request #31233 from poettering/pcrlock-varlink
pcrlock: add simple Varlink API + some varlinkctl tweaks
2024-02-12 15:48:03 +01:00
Lennart Poettering 8b68a199c2
Merge pull request #31242 from poettering/socket-uid-account
pid1: make MaxConnectionsPerSource= do something useful on AF_UNIX sockets
2024-02-12 14:07:51 +01:00
Zbigniew Jędrzejewski-Szmek 9e90d4f42e tmpfiles: implement --dry-run
The idea is simple: skip the final operation that creates or removes things
or changes the attributes, but otherwise go through the rest of the code.
This results in quite a lot of fairly repetitive conditions in the low-level
code. Another approach would be to print earlier, at a higher level, but then
we'd have less precise information about what is about to happen.
2024-02-12 13:33:30 +01:00
Lennart Poettering a66ab6d801
Merge pull request #31076 from CodethinkLabs/vmspawn/directory_image_support
[vmspawn] directory type image support
2024-02-12 12:20:16 +01:00
Mike Yuan 4d0b06d535
Merge pull request #31181 from fbuihuu/gpt-auto-more-defensive
gpt-auto-generator: be more defensive when checking the presence of E…
2024-02-12 19:12:17 +08:00
Lennart Poettering 7781d28fd7 varlinkctl: add new --collect switch
It exposes the varlink_collect() call we internally provide: it collects
all responses of a method call that is issued with the "more" method
call flag. It then returns the result as a single JSON array.
2024-02-12 12:04:18 +01:00
Lennart Poettering 48930a5ded pid1: make MaxConnectionsPerSource= also work for AF_UNIX sockets
The setting currently puts limits on connections per IP address and
AF_UNIX CID. Let's extend it to cover AF_UNIX too, where it puts a limit
on connections per UID.

This is particularly useful for the various Accept=yes Varlink services
we now have, as it means, the number of per-user instance services
cannot grow without bounds.
2024-02-12 11:57:16 +01:00
Sam Leonard a8f940c4b5
vmspawn: add support for --bind(-ro)= 2024-02-12 09:46:02 +00:00
Sam Leonard 7fe9c9909d
vmspawn: document --directory and --private-users 2024-02-12 09:46:01 +00:00
Franck Bui 8a1326581d gpt-auto-generator: be more defensive when checking the presence of ESP in fstab
Looking for the ESP node is useful to shortcut things but if we're told that
the node is not referenced in fstab that doesn't necessarily mean that ESP is
not mounted via fstab. Indeed the check is not reliable in all cases. Firstly
because it assumes that udev already set the symlinks up. This is not the case
for initrd-less boots. Secondly the devname of the ESP partition can be wrongly
constructed by the dissect code. For example, the approach which consists in
appending "p<partnum>" suffix to construct the partition devname from the disk
devname doesn't work for DM devices.

Hence this patch makes the logic more defensive and do not mount neither ESP
nor XBOOTLDR automatically if any path in paths that starts with /efi or /boot
exists.
2024-02-12 09:30:35 +01:00
Mike Yuan 189a08e83d
core/service: allow RestartForceExitStatus= for oneshot services
I think this was just overlooked in #13754, which removed
the restriction of Restart= on Type=oneshot services.
There's no reason to prevent RestartForceExitStatus=
now that Restart= has been allowed.

Closes #31148
2024-02-10 21:19:36 +08:00
Mike Yuan a5d9df35ac
man/systemd.service: document that Restart=always/on-success are refused
by oneshot services
2024-02-10 21:19:35 +08:00
Daan De Meyer 1a0541d44c repart: Add --generate-fstab= and --generate-crypttab= options
These can be used along with two new settings MountPoint= and
EncryptedVolume= to write fstab and crypttab entries to the given
paths respectively in the root directory that repart is operating on.

This is useful to cover scenarios that aren't covered by the
Discoverable Partitions Spec. For example when one wants to mount
/home as a separate btrfs subvolume. Because multiple btrfs subvolumes
can be mounted from the same partition, we allow specifying MountPoint=
multiple times to add multiple entries for the same partition.
2024-02-10 13:07:02 +01:00
Luca Boccassi 769ca9ab55
Merge pull request #31261 from bluca/repart_engine
repart: support engines and providers
2024-02-09 21:28:59 +00:00
Zbigniew Jędrzejewski-Szmek b1935cc943 tmpfiles: use dir_cleanup() for R and D
... i.e. apply nested config (exclusions and such) when executing R and D.

This fixes a long-standing RFE. The existing logic seems to have been an
accident of implementation. After all, if somebody specifies a config with
'R /foo; x /tmp/bar', then probably the goal is to remove stuff from under /foo,
but keep /tmp/bar. If they just wanted to nuke everything, then would not specify
the second item.

This also makes R and D use O_NOATIME, i.e. the access times of the directories
that are accessed will not be changed by the cleanup.

Obviously, we'll have to add this to NEWS and such.
Looking at the whole tmpfiles.d config in Fedora, this change has no effect.

The test cases are adjusted as appropriate. I also added another test case for
'R'/'D' with a file, just to test this code path more.

Replaces #20641.
Fixes #1633.
2024-02-09 17:57:42 +01:00
Zbigniew Jędrzejewski-Szmek 9c8a0ca69e tmpfiles: split out verbs in help
One of the three must always be specified, but they buried in a long list of
options in the output of --help. Make them more visible to draw the eye.

Also, drop "marked" from the description. It's supposed to mean "configured",
but it's a strange way to say that, and also it's generally obvious that the
program does what its configuration tells it to, and it's not going to remove
all files found on the system.
2024-02-09 17:57:41 +01:00
Zbigniew Jędrzejewski-Szmek f7862b2a00 tree-wide: use normal spelling of "reopen"
It's a commonly used verb meaning "to open again".
2024-02-09 17:57:41 +01:00
Zbigniew Jędrzejewski-Szmek ec3917d282 tmpfiles,sysusers: rework path argument handling
Previously, if given an absolute path, we would open the file, but when given a
relative path, we'd attempt to search the directories. If the user wants to open
a file from the search path, allowing paths is very confusing. E.g. with a path
like 'sysusers/foo.conf', we'd try to open '/etc/sysusers.d/sysusers/foo.conf',
'/run/sysusers.d/sysusers/foo.conf', …, and with '../foo.conf', we'd try to open
'/etc/sysusers.d/../foo.conf', '/run/sysusers.d/../foo.conf', …. This just isn't
useful, and in fact for a scheme like sysusers.d and tmpfiles.d where there we
have a flat directory with config files, only searching for plain names can
result in success. When a user specifies a relative path, it's more likely that
they wanted to open some local file. OTOH, to correctly open a local file, e.g.
one that they're just writing, this interface is also awkward, because something
like '$PWD/file.conf' has to be used to open a file with a relative path.

This patch changes the interface so that any path (i.e. an argument with "/") is
used to open a file directly, and only plain basenames are used for searching.

(Note that tpmfiles and sysusers are somewhat special here: their "config files"
make sense without the other config and users are likely to want to test them
without the other config. I was trying to do just that when writing a spec file
for a package and attempting to convert the existing scripts to sysusers and
tmpfiles. The same logic wouldn't apply for example to units or udev rules,
because they generally can only be interpreted with the whole rest of config
also available.)
2024-02-09 17:57:41 +01:00
Luca Boccassi 0a8264080a repart: support OpenSSL engines/providers for signing
The provider API which is new requires providers, which are not
widely available and don't work very well yet, so also use a
fallback with the legacy engine API.
2024-02-09 15:11:25 +00:00
Sam Leonard 51747b3444
vmspawn: accept kvm/vhost-vsock device fds through sd_listen 2024-02-09 12:46:44 +00:00
Sam Leonard 75331bedeb
vmspawn: add nic configuration 2024-02-09 12:46:43 +00:00
Sam Leonard 88af28d170
vmspawn: add initrd configuration option 2024-02-09 12:46:43 +00:00
Sam Leonard 0f25e3e443
vmspawn: add kernel configuration options 2024-02-09 11:43:19 +00:00
Sam Leonard cf3beb273b
vmspawn: add swtpm feature 2024-02-09 11:43:18 +00:00
Daan De Meyer 7bf52f5d1c Add systemd.default_debug_tty=
Let's allow configuring the debug tty independently of enabling/disabling
the debug shell. This allows mkosi to configure the correct tty while
leaving enabling/disabling the debug tty to the user.
2024-02-09 11:47:53 +01:00
Yu Watanabe 6a32108812 man: add missing "=" after setting name
Follow-up for b93bf1bf9f.
2024-02-09 19:03:56 +09:00
Yu Watanabe d2eb27eb7b man: fix typo
Follow-up for 631cf7f004.
2024-02-09 17:49:48 +09:00
Luca Boccassi 82047a6aa7 portable: add --copy=mixed to copy images and link profiles
This new mode copies resources provided by the client, so that they
remain available for inspect/detach even if the original images are
deleted, but symlinks the profile as that is owned by the OS, so that
updates are automatically applied.
2024-02-08 21:11:26 +00:00
Zbigniew Jędrzejewski-Szmek eb47031694 man: mention that preset-all is performed during early boot
The intro of systemd-firstboot is rewritten to make it clearer how it fits into
the big picture. Systemd does some machine-id and presets and
systemd-firstboot.service is used to interactively fill in the blanks.

Closes #22225.
2024-02-08 20:36:44 +01:00
Lennart Poettering 9d99f1686a
Merge pull request #30766 from polarina/cryptenroll-tpm2-unlock
cryptenroll: Add support for unlocking through TPM2 enrollments
2024-02-08 17:41:03 +01:00
Sam Leonard a759d3239d vmspawn: fix incorrect mention of container 2024-02-08 16:04:42 +01:00
Yu Watanabe 7dc431839e network/dhcp4: disable IPv6OnlyMode= by default
As explained in #30891, IPv6OnlyMode= should be enabled with 464XLAT
support, but we do not support it yet. Let's disable by default.

Fixes #30891.
2024-02-07 23:30:17 +00:00
Yu Watanabe 3092bd7aa1
Merge pull request #31176 from yuwata/network-required-for-online
network: adjust default value of RequiredForOnline=
2024-02-08 05:26:12 +09:00
Ivan Shapovalov 00fcd79e65 nspawn: permit --ephemeral with --link-journal=try-* (treat as =no)
Common sense says that to "try" something means "to not fail if
something turns out not to be possible", thus do not make this
combination a hard error.

The actual implementation ignores any --link-journal= setting when
--ephemeral is in effect, so the semantics are upheld.
2024-02-03 03:03:41 +09:00
Vladimir Stoiakin 85686b37b0 cryptenroll: allow to use a public key on a token
This patch allows systemd-cryptenroll to enroll directly with a public key if a certificate is missing on a token.

Fixes: #30675
2024-02-03 03:00:51 +09:00
Antonio Alvarez Feijoo e104d77da2 man/systemd-bsod: fix command path 2024-02-03 02:59:44 +09:00
Yu Watanabe a853cc99e6 network: adjust default RequiredForOnline= and RequiredFamilyForOnline= setting
E.g. a bonding port does not support addressing, hence the default
should be 'enslaved'.

Follow-up for 3255bda698.

Closes #27724.
2024-02-02 15:38:30 +09:00
Yu Watanabe c89efaf9e5 man: fix default behavior of RequiredFamilyForOnline= 2024-02-02 15:38:30 +09:00
Yu Watanabe 04a755466b man/creds: fix typo
Follow-up for 7704c3474d.
2024-02-02 09:25:57 +09:00
Yu Watanabe 49d6e3c8a8 man: fix typo
Follow-up for 34bbda18a5.
2024-02-02 09:24:25 +09:00
Gabríel Arthúr Pétursson 631cf7f004 cryptenroll: Add support for unlocking through TPM2 enrollments 2024-02-01 12:37:12 +00:00
Lennart Poettering 3557f1a62a resolvectl: add JSON output support for "resolvectl query"
It's easy to add. Let's do so.

This only covers record lookups, i.e. with the --type= switch.

The higher level lookups are not covered, I opted instead to print a
message there to use --type= instead.

I am a bit reluctant to defining a new JSON format for the high-level
lookups, hence I figured for now a helpful error is good enough, that
points people to the right use.

Fixes: #29755
2024-01-31 16:13:16 +01:00
Franck Bui 887b2529eb man: always install bootctl
Since dedb925eaf /usr/bin/bootctl is always built
so does its man page.
2024-01-31 10:32:46 +00:00
Adrian Vovk 691b99160d homed: Add InhibitSuspend() method
This returns an FD that can be used to temporarily inhibit the automatic
locking on system suspend behavior of homed. As long as the FD is open,
LockAllHomes() won't lock that home directory on suspend. This allows
desktop environments to implement custom more complicated behavior
2024-01-31 09:48:23 +01:00
Lennart Poettering b45f47aaad
Merge pull request #30968 from poettering/per-user-creds
per-user encrypted credentials
2024-01-31 09:47:12 +01:00
Franck Bui d537bf72ae meson: fix installation of html doc aliases
Apparently since 9289e093ae, "ln_s" takes
*absolute* paths only.
2024-01-30 17:56:48 +00:00
Lennart Poettering f65d44d1f6
Merge pull request #31124 from keszybz/various-small-tweaks
Various small tweaks
2024-01-30 17:08:21 +01:00
Lennart Poettering 7704c3474d man: document new user-scoped credentials 2024-01-30 17:07:47 +01:00
Zbigniew Jędrzejewski-Szmek 8835a6ff0c man/networkd.conf: remove strange comment
Does anyone even read those pages‽
2024-01-30 11:27:31 +01:00
Mike Yuan 5d4cf5a87d
man/systemd-notify: don't say "the latter" if more than 2 options 2024-01-30 03:27:36 +08:00
Lennart Poettering a667107594 man: document the new APIs 2024-01-29 14:43:05 +01:00
Luca Boccassi 34bbda18a5 man: add working example for sd_bus_set_watch_bind()
This example is able to deal with D-Bus going away and reappearing,
like on soft-reboot, so link it in both manpages.
2024-01-26 14:41:20 +00:00
Lennart Poettering b68f4cade4 dissect: add --make-archive option to convert DDI to tarball 2024-01-25 18:47:39 +01:00
Daan De Meyer 6811774510 man: Document ranges for distributions config files and local config files
Let's recommend that config files and drop-ins in /usr use the range
0-49 and config files in /etc and /run use the range 50-99 so that
files in /run and /etc will generally always override files from
/usr.
2024-01-25 18:46:24 +01:00
Andrew Sayers cd752b2590 Make RestartPreventExitStatus= documentation resemble SuccessExitStatus=
The documentation for `RestartPreventExitStatus=` differs from that for `SuccessExitStatus=` in ways that are sometimes confusing (e.g. using `numeric exit codes` instead of `numeric termination statuses`), and other times plain incorrect (e.g. not mentioning `termination status names`, which I've just confirmed to work in systemd 255).

This patch modifies the documentation to be as similar as possible, so as to reduce the reader's cognitive load.
2024-01-24 18:00:53 +01:00
Daan De Meyer 98118c44ae Remove a few references to dracut
Let's remove some explicit references to dracut as we prefer initrds
built with mkosi these days.
2024-01-24 17:54:38 +01:00
Lennart Poettering ed4498a193
Merge pull request #31067 from RA-Kooi/xen-uuid
machine-id-setup: Generate stable machine IDs on Xen virtual machines.
2024-01-24 09:35:30 +01:00
Rafaël Kooi 9fe1f1ca95 man: Describe how machine ID is initialized on Xen 2024-01-24 02:19:00 +01:00
Ivan Shapovalov a97476c8ac hostname-setup: read hostname from system.hostname credential
`system.hostname` credential is treated similarly to the pre-existing
`system.machine_id` credential. It is considered after /etc/hostname,
but prior to the kernel defaults or os-release defaults.

Fixes #30667.

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
2024-01-23 22:03:06 +00:00
Luca Boccassi f70daee8f2
Merge pull request #30130 from poettering/pcrlock-root
pcrlock: add support for unlocking a root fs with a pcrlock file
2024-01-23 21:41:02 +00:00
Lennart Poettering 3d8ba7b83f nspawn: optionally tint the background color of a container 2024-01-23 16:45:37 +01:00
Frantisek Sumsal 43b238f1c1 man: suffix signals with ()
Since signals can take arguments, let's suffix them with () as we
already do with functions. To make sure we remain consistent, make the
`update-dbus-docs.py` script check & fix any occurrences where this is
not the case.

Resolves: #31002
2024-01-23 16:27:50 +01:00
Lennart Poettering 3bda8bc58c
Merge pull request #31057 from aafeijoo-suse/bootctl-print-fix
bootctl: return earlier with `--print-esp-path`
2024-01-23 14:26:25 +01:00
Lennart Poettering 0db917f759
Merge pull request #31019 from poettering/hostnamed-full-os-release
hostnamed: expose full /etc/os-release data in hostnamectl's --json= output
2024-01-23 12:28:41 +01:00
Antonio Alvarez Feijoo 597a3cfd52
man/bootctl: typo in --print-boot-path description 2024-01-23 10:33:26 +01:00
Sam Leonard 22ce047394 vmspawn: document -q/--quiet 2024-01-22 22:01:01 +00:00
Matt Muggeridge d4c8de21a0 IPv6 RA: Support the Retrans Timer field (IPv6 Conformance Test: v6LC.2.1.5)
The RA's Retransmission Timer field was being ignored. This resolves the IPv6
Core Conformance test, v6LC.2.1.5 [1].

Retransmission Timer is a 32-bit unsigned integer. The time, in milliseconds,
between retransmitted Neighbor Solicitation messages. Used by the Address
Resolution and Neighbor Unreachability Detection (NUD) algorithm.

Support setting a default value for the neighbour retransmission timer value with:

    [Network]
    IPv6RetransmissionTimeSec=<int>

By default, upon receiving a Router Advertisement with the Retransmission Timer
field set to a non-zero value, it will update the kernel's retransmit timer value.
To disable this behaviour, configure the UseIPv6RetransmissionTime= under the
[IPv6AcceptRA] section.

    [IPv6AcceptRA]
    UseIPv6RetransmissionTime=<bool>

RFC4861: Neighbor Discovery in IPv6
  * Section 4.2 RA Message Format.
  * Section 6.3.4 Processing Received Router Advertisements

A Router Advertisement field (e.g., Cur Hop Limit, Reachable Time,
and Retrans Timer) may contain a value denoting that it is
unspecified. In such cases, the parameter should be ignored and the
host should continue using whatever value it is already using. In
particular, a host MUST NOT interpret the unspecified value as
meaning change back to the default value that was in use before the
first Router Advertisement was received.

The RetransTimer variable SHOULD be copied from the Retrans Timer
field, if the received value is non-zero.

References
[1] IPv6 Core Conformance Spec (PDF)
2024-01-23 03:18:01 +09:00
Lennart Poettering e8ce204d86 vmspawn: rework firmware selection logic
Let's make the firmware file to choose configurable, and enumeratable.

This adds --firmware= to select the formare, and in particular
--firmware=list to show available options.
2024-01-22 16:24:00 +01:00
Lennart Poettering 452486cdf6 man: document new rootfs support for pcrlock policies 2024-01-22 15:56:32 +01:00
Lennart Poettering 2bf618331d hostnamectl: add -j switch for quick json output
We already support -j as shortcut for JSON mode in various tools. Let's
add one more. We probably should add this systematically (at least where
it doesn't conflict with an existing -j switch with other purpose). But
I am too lazy to add that now.
2024-01-22 14:39:22 +01:00
nl6720 934288757c tree-wide: link to docs.kernel.org for kernel documentation
https://www.kernel.org/ links to https://docs.kernel.org/ for the documentation.
These URLs are shorter and nicer looking.
2024-01-22 10:50:33 +00:00
Luca Boccassi c03a321ef6 man: clarify description of Attach/Detach flags 2024-01-19 15:56:18 +00:00
Antonio Alvarez Feijoo f14686c1d2 Revert "man: add missing <cmdsynopsis> wrapper"
This reverts commit 35fc10756b.

Although DocBook 4.5 states that `cmdsynopsis` can be used within `term` [1],
and `term` within `varlistentry`, `man` does not display the list of commands
after this change. FWIW, `cmdsynopsis` is used tree-wide within `refsynopsisdiv`
only.

[1] https://tdg.docbook.org/tdg/4.5/term
2024-01-19 15:03:34 +09:00
Nick Cao 4be1fc8443 network: Add L3MasterDevice= into routing policy 2024-01-19 00:17:50 +00:00
Luca Boccassi 12af3f1834
Merge pull request #30988 from bluca/dbus_docs
A couple of clarification for D-Bus methods
2024-01-18 22:45:24 +00:00
Luca Boccassi 803bcc434f man: explicitly say that portable1's Attach/Detach are synchronous 2024-01-18 17:22:12 +00:00
Luca Boccassi d156e66f82 man: add more suggestions on how to use StartUnit and JobRemoved
This is not immediately clear for users, so spell out the preferred pattern
clearly in the D-Bus documentation.
2024-01-18 17:22:12 +00:00
Lennart Poettering 75f8b0fe70 man: don't suggest using pam_unix.so's use_authtok switch
Our dumbed down example PAM stacks do not contain cracklib/pwq modules,
hence using use_authtok on the pam_unix.so password change stack won't
work, because it has the effect that pam_unix.so never asks for a
password on its own, expecting the cracklib/pwq modules to have
queried/validated them beforehand.

I noticed this issue because of #30969: Debian's PAM setup suffers by
the same issue – even though they don't actually use our suggested PAM
fragments at all.

See: #30969
2024-01-17 23:59:05 +00:00
Mike Yuan ea54517476
loginctl: add --json= and -j, decouple list-* from --output=
--output= is documented to only affect journal output in *-status.
Let's use --json= and -j standard options for list-* instead.
2024-01-17 11:30:04 +08:00
Mike Yuan b3cb952c03
logind-dbus: introduce ListSessionsEx() call
As per https://github.com/systemd/systemd/pull/30884#discussion_r1448938737
2024-01-17 11:25:48 +08:00
Mike Yuan 7fbdd8c323
man: don't use versioned standard-options
no-pager-255 was added in #29184, which I reviewed and agreed.
However, as #30887 came up, I reconsidered it a bit, and now
I actually think that this should be removed.

We add new tools that refer to these standard options. During
the process, some options are also promoted to be standard ones.
I think a more sane practice is to generally keep old tools in
the loop, rather than overloading the standard-options with versions.
2024-01-17 11:25:45 +08:00
Yu Watanabe 3255bda698 network: make 'carrier' as the default required operational state for CAN device
As CAN devices do not support IP address, hence the state never goes to
higher than 'carrier'.

Prompted by https://github.com/linux-can/can-utils/issues/68#issuecomment-1327987724.
2024-01-17 04:05:43 +09:00
Mike Yuan f2723ca745
man/systemd-sleep.conf: document the operation of s2h more thoroughly 2024-01-15 03:05:25 +08:00
Lennart Poettering 535252dc26 networkd: expose nsid via dbus 2024-01-12 21:43:34 +01:00
Lennart Poettering 14adc1ab4b man: fix typo AV_VSOCK → AF_VSOCK
A reported by Arian van Putten:

https://github.com/systemd/systemd/pull/30777#pullrequestreview-1816817988
2024-01-12 13:50:32 +00:00
Yu Watanabe 967cd1712c
Merge pull request #30867 from dtardon/udev-conf-dropins
Allow dropins for udev.conf
2024-01-12 06:37:23 +09:00
Lennart Poettering 28795e4dca
Merge pull request #30777 from poettering/ssh-generator
ssh-generator which makes VMs and containers accessible to ssh via AF_UNIX and AF_VSOCK
2024-01-11 21:31:28 +01:00
Lennart Poettering 25f8d3856a
Merge pull request #30884 from poettering/logind-background-light
logind: add "background-light" + "manager" session classes
2024-01-11 21:20:01 +01:00
David Tardon 810a5895e6 man: update udev.conf man page 2024-01-12 05:12:44 +09:00
Lennart Poettering a50666e376 id128: add --no-pager, --no-legend, --json=/-j switches to systemd-id128 tool 2024-01-11 17:54:19 +01:00
Lennart Poettering 0f6827bdd1 man: document the expanded catalogue of session classes 2024-01-11 17:47:41 +01:00
Lennart Poettering 0abd510f7f ssh-proxy: add ssh ProxyCommand tool that can connect to AF_UNIX + AF_VSOCK sockets
This adds a tiny binary that is hooked into SSH client config via
ProxyCommand and which simply connects to an AF_UNIX or AF_VSOCK socket
of choice.

The syntax is as simple as this:

     ssh unix/some/path     # (this connects to AF_UNIX socket /some/path)

or:

     ssh vsock/4711

I used "/" as separator of the protocol ID and the value since ":" is
already taken by SSH itself when doing sftp. And "@" is already taken
for separating the user name.
2024-01-11 16:05:20 +01:00
Lennart Poettering 0e3220684c ssh-generator: add simple new generator 2024-01-11 16:05:20 +01:00
Lennart Poettering 658dc909dc man: fix references to systemd.exec(5)
For some reason the section for the systemd.exec man page was added
incorrectly and then copypasted everywhere else incorrectly too. Let's
fix that.
2024-01-11 12:19:44 +00:00
Antonio Alvarez Feijoo 5e16328506 analyze: clarify that security --offline=true requires an argument
Without `--root` or `--image`, the `security` command inspects all currently
loaded service units if no unit name is specified. But with `--root` or
`--image` with `--offline=true`, the `security` command exits silently if no
unit name is specified.

Also, fixed description of `--root` and `--image` in the man page, and added
missing `--unit` option to help text.
2024-01-11 12:19:20 +00:00
Carlos Garnacho 501d8b8bc6 logind: Mark LidClosed property as "emits change"
It may be useful for DEs to follow changes on this property, esp. now that
recent UPower has removed its own lid handling code.

Related: 07565ef6a1
2024-01-10 19:31:06 +00:00
Lennart Poettering 9a70dc02c6
Merge pull request #30786 from yuwata/udev-net-link-property
udev/net: introduce [Link] Property= setting and friends
2024-01-10 15:56:29 +01:00
Lennart Poettering a795ec8100
Merge pull request #30839 from yuwata/detect-virt-google
detect-virt: add Google Compute Engine support
2024-01-10 09:55:44 +01:00
Yu Watanabe 046286e863 udev/net: introduce [Link] Property=, ImportProperty=, and UnsetProperty= settings
The applied order is equivalent to Environment=, PassEnvironment=, and
UnsetEnvironment= for [Service] or so.
2024-01-10 04:33:51 +09:00
Yu Watanabe 12b1e04073 man: fix indentation 2024-01-10 03:50:32 +09:00
Yu Watanabe 9b0688f491 virt: add Google Compute Engine support
See https://cloud.google.com/run/docs/container-contract#sandbox
2024-01-10 03:08:31 +09:00
Mike Yuan 435e1098ee
core: allow fstab-style nodes in mount/swap What=
Closes #28989
2024-01-10 02:07:18 +08:00
Luca Boccassi c3f4d9f9a4
Merge pull request #30842 from aafeijoo-suse/analyze-q-man-help-fix
analyze: minor fixes
2024-01-09 10:40:19 +00:00
Antonio Alvarez Feijoo ca02969379
analyze: man and --help fixes
man:
- `verify` requires an argument
- `security` does not require an argument
- `fdstore` requires an argument
- `image-policy` requires an argument

`--help` text:
- missing `image-policy` command
- `cat-config` requires NAME or PATH
2024-01-09 10:11:59 +01:00
Antonio Alvarez Feijoo 7c0e0bbb6b
analyze: fix -q option
Follow-up to 52117f5af8
2024-01-09 09:05:50 +01:00
Mike Yuan fa724cd52c
networkd/wireguard: support network.wireguard.* credentials
Closes #26702
2024-01-09 15:25:30 +08:00
Yu Watanabe 10b8bb5495 man: drop unexpected dot 2024-01-09 10:52:18 +09:00
Lennart Poettering a1bb30de7f varlink: add "ssh:" transport
This uses openssh 9.4's -W support for AF_UNIX. Unfortunately older versions
don't work with this, and I couldn#t figure a way that would work for
older versions too, would not be racy and where we'd still could keep
track of the forked off ssh process.

Unfortunately, on older versions -W will just hang (because it tries to
resolve the AF_UNIX path as regular host name), which sucks, but hopefully this
issue will go away sooner or later on its own, as distributions update.

Fedora is still stuck at 9.3 at the time of posting this (even on
Fedora), even though 9.4, 9.5, 9.6 have all already been released by
now.

Example:
        varlinkctl call -j ssh:root@somehost:/run/systemd/io.systemd.Credentials io.systemd.Credentials.Encrypt '{"text":"foobar"}'
2024-01-08 23:24:45 +01:00
Lennart Poettering c9f096969a
Merge pull request #30827 from poettering/network-generator-creds
network-generator: pick up .netdev/.link/.network configuration via c…
2024-01-08 15:02:02 +01:00
Lennart Poettering 1a30285590 network-generator: pick up .netdev/.link/.network configuration via credentials
To me this is the last major basic functionality that couldn't be
configured via credentials: the network.

We do not invent any new format for this, but simply copy relevant creds
1:1 into /run/systemd/network/ to open up the full functionality of
networkd to VM hosts.
2024-01-08 12:59:08 +01:00
Lennart Poettering 19b8e712d8 hostnamed: expose local AF_VSOCK CID among other host info
This is a host identifier of major relevance, since it is how you
connect to this system if it is a VM, hence expose this nicely.
2024-01-08 10:30:41 +01:00
Lennart Poettering 8ef31e1f13
Merge pull request #29692 from H5117/fix_pkcs11_uri
cryptenroll: change class in provided PKCS#11 URI if necessary
2024-01-05 12:14:26 +01:00
Yu Watanabe c270e41f5e man: fix typo
Follow-up for 7d93e4af80.
2024-01-05 19:08:12 +09:00
Adrian Vovk cc51085a41 core: Add %D specifier for $XDG_DATA_HOME
We already have specifiers that resolve to $XDG_STATE_HOME, and
$XDG_CONFIG_HOME. $XDG_DATA_HOME is in a similar vein.

It allows units belonging to the user service manager to correctly look
into ~/.local/share. I imagine this would be most useful inside of
condition checks (i.e. only run a service on session startup if some
data is not found in ~/.local/share) or in the inotify monitoring of a
.path unit
2024-01-05 11:03:06 +01:00
Vladimir Stoiakin 85828ef920 cryptenroll: change class in provided PKCS#11 URI if necessary
cryptenroll accepts only PKCS#11 URIs that match both a certificate and a private key in a token.
This patch allows users to provide a PKCS#11 URI that points to a certificate only, and makes possible to use output of some PKCS#11 tools directly.
Internally the patch changes 'type=cert' in the provided PKCS#11 URI to 'type=private' before storing in a LUKS2 header.

Fixes: #23479
2024-01-05 12:32:36 +03:00
Sergei Zhmylev 25aa35d465 journalctl: add --exclude-identifier option 2024-01-04 23:21:39 +01:00
Lennart Poettering 6d78dc2827 creds: rename "tpm2-absent" encryption to "null" encryption
This is what it is after all: encryption with a NULL key. This is more
descriptive, but also relevant since we want to use this kind of
credentials in a different context soon: for carrying pcrlock data into
a UKI. In that case we don#t want encryption, since the pcrlock data is
intended to help unlocking secrets, hence should not be a secret itself.

This only changes the code labels and the way this is labelled in the
output. We retain compat with the old name.
2024-01-04 22:56:48 +01:00
Luca Boccassi 81a183800f tmpfiles: add --purge switch
Any file/directory created by a tmpfiles.d will be deleted. Useful for
purge/factory reset patterns.
2024-01-04 17:36:43 +01:00
Mike Yuan 5317451f12
man/loginctl: document "self" and "auto" special session IDs
session-status automatically uses "auto" if no ID is specified,
but show-session shows the manager's properties. Let's document
these special values so that users of show-session can benefit too.
2024-01-04 19:26:47 +08:00
Mike Yuan 771240fa3d
man/loginctl: use <literal> to quote possible values of --kill-whom= 2024-01-04 18:59:38 +08:00
Lennart Poettering 2a02a8db91
Merge pull request #26663 from poettering/vpick
add new "vpick" concept for automatically picking newest resource from .v/ dir containing versioned files
2024-01-03 22:17:32 +01:00
Yu Watanabe 82a1597778
Merge pull request #28797 from Werkov/eff_limits
Add MemoryMaxEffective=, MemoryHighEffective= and TasksMaxEff…  …ective= properties
2024-01-04 05:38:06 +09:00
Michal Sekletar 508b4786e8 logind: don't setup idle session watch for lock-screen and greeter
Reason to skip the idle session logic for these session classes is that
they are idle by default.
2024-01-04 05:27:41 +09:00
Yu Watanabe aea57b1415
Merge pull request #28836 from msekletar/aux-scope
core/manager: add dbus API to create auxiliary scope from running service
2024-01-04 04:52:39 +09:00
Lennart Poettering 7d93e4af80 man: document the new vpick concept 2024-01-03 18:38:46 +01:00
Lennart Poettering de84484e7b
Merge pull request #29940 from poettering/stub-confext-pickup
stub/sysext: pick up confexts from ESP, too
2024-01-03 17:40:36 +01:00
Michal Sekletar 84c01612de core/manager: add dbus API to create auxiliary scope from running service
This commit introduces new D-Bus API, StartAuxiliaryScope(). It may be
used by services as part of the restart procedure. Service sends an
array of PID file descriptors corresponding to processes that are part
of the service and must continue running also after service restarts,
i.e. they haven't finished the job why they were spawned in the first
place (e.g. long running video transcoding job). Systemd creates new
scope unit for these processes and migrates them into it. Cgroup
properties of scope are copied from the service so it retains same
cgroup settings and limits as service had.
2024-01-03 13:50:41 +01:00
Lennart Poettering 4e1f0037b8 units: add a tpm2.target synchronization point and small generator that pulls in
Distributions apparently only compile a subset of TPM2 drivers into the
kernel. For those not compiled it but provided as kmod we need a
synchronization point: we must wait before the first TPM2 interaction
until the driver is available and accessible.

This adds a tpm2.target unit as such a synchronization point. It's
ordered after /dev/tpmrm0, and is pulled in by a generator whenever we
detect that the kernel reported a TPM2 to exist but we have no device
for it yet.

This should solve the issue, but might create problems: if there are TPM
devices supported by firmware that we don't have Linux drivers for we'll
hang for a bit. Hence let's add a kernel cmdline switch to disable (or
alternatively force) this logic.

Fixes: #30164
2024-01-03 13:49:02 +01:00
Michal Koutný 93f8e88d23 cgroup: Restrict effective limits with global resource provision
Global resource (whole system or root cg's (e.g. in a container)) is
also a well-defined limit for memory and tasks, take it into account
when calculating effective limits.
2024-01-03 13:43:04 +01:00
Michal Koutný 4fb0d2dc14 cgroup: Add EffectiveMemoryMax=, EffectiveMemoryHigh= and EffectiveTasksMax= properties
Users become perplexed when they run their workload in a unit with no
explicit limits configured (moreover, listing the limit property would
even show it's infinity) but they experience unexpected resource
limitation.

The memory and pid limits come as the most visible, therefore add new
unit read-only properties:
- EffectiveMemoryMax=,
- EffectiveMemoryHigh=,
- EffectiveTasksMax=.

These properties represent the most stringent limit systemd is aware of
for the given unit -- and that is typically(*) the effective value.

Implement the properties by simply traversing all parents in the
leaf-slice tree and picking the minimum value. Note that effective
limits are thus defined even for units that don't enable explicit
accounting (because of the hierarchy).

(*) The evasive case is when systemd runs in a cgroupns and cannot
reason about outer setup. Complete solution would need kernel support.
2024-01-03 13:37:08 +01:00
Lennart Poettering 39e0c237f1 stub: pick up confexts from the ESP as well
This does what we do for system extension also for configuration
extension.

This is complicated by the fact that we previously looked for
<uki-binary>.d/*.raw for system extensions. We want to measure sysexts
and confexts to different PCRs (13 vs. 12) hence we must distinguish
them, but *.raw would match both kinds.

This commit solves this via the following mechanism: we'll load confexts
from *.confext.raw and sysexts from *.raw but will then enclude
*.confext.raw from the latter. This preserves compatibility but allows
us to somewhat reasonable distinguish both types of images.

The documentation is updated not going into this detail though, and
instead now claims that sysexts shall be *.sysext.raw and confexts
*.confext.raw even though we actually are more lenient than this. This
is simply to push people towards using the longer, more descriptive
suffixes.

I added an XML comment (<!-- … -->) about this to the docs, so that
whenever somebody notices the difference between code and docs
understands why and leaves it that way.
2024-01-03 10:38:34 +01:00
Yu Watanabe 778823fd52 backlight: supprt ID_LEDS_CLAMP udev property for leds subsystem devices
Closes #30507.
2024-01-03 09:30:41 +09:00
Yu Watanabe cb0a3b8c14 network/route: drop TTL propagate support for MPLS routes
This effectively reverts 9b88f20aba.

We do not support MPLS routes, only IPv4 or IPv6 routes are supported.
2024-01-03 08:41:53 +09:00
Chris Simons 9ef362bf3d
machinectl: add restart convenience alias (#30625) 2023-12-28 07:09:42 +09:00
David Tardon af29d0b179 man: rewrite as <group> 2023-12-26 13:10:36 +01:00
David Tardon 0fd5f9fb50 man: fix markup
<arg> is not allowed inside <title>.
2023-12-26 13:10:36 +01:00
David Tardon 7f9d96d4c5 man: move </variablelist> to the right place 2023-12-26 13:10:35 +01:00
David Tardon b239fc7250 man: fix <cmdsynopsis> content
Inline text is not allowed.
2023-12-26 13:10:35 +01:00
David Tardon 20dcd73a28 man: fix markup
<option> is not allowed in <cmdsynopsis>.
2023-12-26 13:10:35 +01:00
David Tardon dfa6c32ad9 man: restrict <command> to the actual command 2023-12-26 13:10:35 +01:00
David Tardon 996de3397b man: move macro decls. out of <funcsynopsis>
<funcsynopsis> doesn't allow block content.
2023-12-26 13:10:35 +01:00
David Tardon 932abebf4d man: fix markup
<arg> is not allowed inside <term>.
2023-12-26 13:10:35 +01:00
David Tardon b3579feb59 man: fix indentation 2023-12-26 08:59:53 +01:00
David Tardon 0f095802ad man: add required <title> 2023-12-25 17:59:50 +01:00
David Tardon 70601fa571 man: match doctype and root element 2023-12-25 15:51:47 +01:00
David Tardon eea10b26f7 man: use same version in public and system ident. 2023-12-25 15:51:47 +01:00
Yu Watanabe f73509d90f
Merge pull request #30616 from dtardon/docbook-valid-2
DocBook validation fixes (part 2)
2023-12-25 20:00:23 +09:00
David Tardon bc6fdcbf5d man: use <refsect1> instead of <refsection>
DocBook document model doesn't allow mixing of <refsection> with the
numbered variants (<refsect1> etc.). Therefore, any document that
included something from standard-conf.xml was invalid. Fortunately, all
the includes are at the 1st level, hence let's just change
standard-conf.xml to use <refsect1> to fix that.
2023-12-25 10:50:13 +01:00
David Tardon cfcdee7c16 man: drop an extra <member>
Follow-up for 13a69c120b .
2023-12-25 10:43:18 +01:00
David Tardon 9e25422299 man: move macro decls. out of <funcsynopsis>
<funcsynopsis> doesn't allow block content.
2023-12-25 10:40:40 +01:00
David Tardon e353998eb6 man: fix markup 2023-12-25 10:40:40 +01:00
David Tardon eb066221e9 man: fix markup
<arg> is not allowed inside <title>.
2023-12-25 10:40:40 +01:00
David Tardon 1ab6ecd109 man: fix markup
<arg> is not allowed inside <title>.
2023-12-25 10:40:40 +01:00
David Tardon c101b65619 man: make ID valid
The id attribute is of type ID, defined at
https://www.w3.org/TR/1998/REC-xml-19980210#id . It may contain only
selected non-alphanumeric characters; '@' is not among them.
2023-12-25 10:40:40 +01:00
David Tardon d2c0c05f51 man: add an extra <refsect2>
DocBook's document model doesn't allow block content after a section.
2023-12-25 10:39:36 +01:00
David Tardon df93996fd6 man: drop output redir. from cmd. synopsis
<cmdsynopsis> doesn't allow inline content, like the redir. operator
here. And std. output is not an argument anyway...
2023-12-25 10:36:07 +01:00
David Tardon 8f39acd005 man: fix xpointer expression 2023-12-25 10:00:43 +01:00
David Tardon 617b85d10e man: use <warning> for warnings 2023-12-25 10:00:43 +01:00
David Tardon f37841c0b7 man: add a missing space 2023-12-25 10:00:43 +01:00
David Tardon ee5bf48f7d man: sprinkle some more markup around 2023-12-25 10:00:43 +01:00
David Tardon 28ed1ba9bd man: use better-fitting markup 2023-12-25 10:00:43 +01:00
David Tardon 2dfeb64bcd man: use <simplelist> at one more place 2023-12-25 10:00:43 +01:00
David Tardon afc7ad8cd5 man: fix plural 2023-12-25 09:15:53 +01:00
Yu Watanabe 891e81edf4
Merge pull request #30615 from dtardon/docbook-valid-1
DocBook validation fixes (part 1)
2023-12-24 19:27:26 +09:00
David Tardon 7e59b569a1 man: adjust indentation 2023-12-24 10:46:55 +01:00
David Tardon 74512bbc38 man: use the right element for untitled example 2023-12-24 09:43:22 +01:00
David Tardon 74cd284ad0 man: fix markup 2023-12-24 09:43:22 +01:00
David Tardon b2e6aae674 man: fix option value 2023-12-24 09:43:22 +01:00
David Tardon 1eb07e6ffa man: fix markup 2023-12-24 09:43:22 +01:00
David Tardon 5b297dcec8 man: drop stray empty paragraph 2023-12-24 09:32:29 +01:00
David Tardon 3c2b711f4a man: wrap sentinel in <parameter> 2023-12-24 09:32:28 +01:00
David Tardon 08b96745dd man: use just one <listitem> for the description
<varlistentry> allows one or more <term>s, but exactly one <listitem>.
2023-12-24 09:32:28 +01:00
David Tardon 7a0f2298b8 man: wrap the whole description in <listitem>
Unfortunately, version-info includes and standard-options includes are
not composable...
2023-12-24 09:32:28 +01:00
David Tardon 35fcba4a8c man: move misplaced </varlistentry> 2023-12-24 09:32:28 +01:00
David Tardon d9655d11bc man: move </listitem> to the right position 2023-12-24 09:32:28 +01:00
David Tardon a5fcbfea45 man: add missing <listitem> 2023-12-24 09:32:28 +01:00
David Tardon 35fc10756b man: add missing <cmdsynopsis> wrapper 2023-12-24 09:32:28 +01:00
David Tardon af355f198e man: add required <title> 2023-12-24 09:32:26 +01:00
David Tardon bbd0645a3e man: match doctype and root element 2023-12-24 09:23:53 +01:00
Raito Bezarius b49595503d networkd: support proxy_arp_pvlan sysctl
The proxy ARP private VLAN sysctl is useful for VLAN aggregation, see
https://sysctl-explorer.net/net/ipv4/proxy_arp_pvlan/ for details.
2023-12-24 03:40:03 +09:00
Yu Watanabe 24f4144a08
Merge pull request #30600 from dtardon/see-also-simplelist
man: use `<simplelist>` for 'See also' sections
2023-12-23 19:08:31 +09:00
Luca Boccassi d45ca9a905 man: conditionalize sd-pcrlock and sd-measure on the same variable as their binaries
The binaries are built and installed if HAVE_TPM2 is set, and ignore ENABLE_BOOTLOADER,
so do the same for the manpages.

For the sd-pcrlock case this also installs the manpage aliases for the units, which
are not installed with -Dbootloader=disabled, but there's no way to conditionalize
the aliases, so on balance it's better to have too much documentation rather than
too little.

Fixes https://github.com/systemd/systemd/issues/30588
2023-12-23 18:04:08 +08:00
David Tardon 59b4437973 man: capitalize "also" for consistency
Almost all our man pages write it that way.
2023-12-23 08:28:57 +01:00
David Tardon 13a69c120b man: use <simplelist> for 'See also' sections
This is just a slight markup improvement; there should be no difference
in rendering.
2023-12-23 08:28:57 +01:00
Yu Watanabe 4e22097489
Merge pull request #30541 from yuwata/network-address-empty
network/address: make Address= in [Network] support an empty string
2023-12-22 11:50:44 +09:00
Lennart Poettering 66f3da245b
Merge pull request #30284 from YHNdnzj/fstab-wantedby-defaultdeps
fstab-generator: disable default deps if x-systemd.{wanted,required}-by= is used
2023-12-21 22:47:54 +01:00
Lennart Poettering dc6522b18f
Merge pull request #28658 from H5117/enroll_with_ec
cryptsetup: Add support for EC keys in PKCS#11 tokens
2023-12-21 22:45:40 +01:00
Lennart Poettering 2118b179ca man: try to improve wording on --slice-inherit docs 2023-12-21 19:15:01 +01:00
Lennart Poettering 2f0b4d578b run/uid0: tint the terminal background color (and add new --background= switch)
This adds a new --background= switch that allows specifiying a
background color for the terminal while the tool runs.

It also teaches the tool when invoked as uid0 to tint the terminal in a
reddish hue when operating as root, and in a yellowish hue when
operating as any other user.

This should highlight nicely when the user is operating with elevated
privileges, or changed privileges.
2023-12-21 19:15:01 +01:00
Lennart Poettering 1072d94731 run: optionally set the "ignore-failure" flag for ExecStart= lines 2023-12-21 19:14:43 +01:00
Lennart Poettering 72eb3081b2 run: when invoked as "uid0", expose some sudo-like behaviour
This turns "systemd-run" into a multi-call binary. When invoked under
the name "uid0", then it behaves a bit more like traditional "sudo".
This mostly means defaults appropriuate for that, for example a PAM
stack, interactivity and more.

Fixes: #29199
2023-12-21 19:14:43 +01:00
Lennart Poettering d1a5be82ef core: imply SetLoginEnvironment= if PAMName= is set
This geneally makes sense as setting up a PAM session pretty much
defines what a login session is.

In context of #30547 this has the benefit that we can take benefit of
the SetLoginEnvironment= effect without having to set it explicitly,
thus retaining some compat of the uid0 client towards older systemd
service managers.
2023-12-21 10:14:21 +01:00
Yu Watanabe a61738b3a6 network/address: make Address= in [Network] support an empty string
Closes #30485.
2023-12-21 04:08:53 +09:00
Mike Yuan bc9e592c4f systemctl: configure boot loader options only when going through firmware
Fixes #30497
2023-12-21 01:35:55 +09:00
Yu Watanabe 63d0491bbc
Merge pull request #30536 from yuwata/network-bridge-vlan-debugging-logs
network/bridge-vlan: add debugging logs and documentation update
2023-12-20 23:46:01 +09:00
Yu Watanabe 8f876e8d98
Merge pull request #30525 from YHNdnzj/networkctl-mask
networkctl: introduce verb mask and unmask
2023-12-20 21:00:36 +09:00
Yu Watanabe 03a46b5eca man,NEWS: mention that all previously assigned VLAN IDs are cleared
Addresses https://github.com/systemd/systemd/pull/29987#issuecomment-1863934902.
2023-12-20 19:22:53 +09:00
Yu Watanabe b9e6e92510 man: fix indentation 2023-12-20 19:21:11 +09:00
Yu Watanabe 044149e615 man: environment value -> udev property
These are not environment variables, but udev properties.

Follow-up for 3b2e7dc5a2.
2023-12-20 15:08:52 +09:00
Mike Yuan 28bb29cbb4
networkctl: introduce verb mask and unmask
Suggested in https://github.com/systemd/systemd/pull/29928#discussion_r1386626565
2023-12-20 12:46:46 +08:00
Lukas Nykryn 3b2e7dc5a2 udev: allow/denylist for reading sysfs attributes when composing a NIC name
Users can currently pick specific versions of NIC naming, but that
does not guarantee that NIC names won't change after the kernel adds
a new sysfs attribute.

This patch allows for an allow/deny list of sysfs attributes
that could be used when composing the name.

These lists can be supplied as an hwdb entry in the form of
/etc/udev/hwdb.d/50-net-naming-allowlist.hwdb
net:naming:drvirtio_net
  ID_NET_NAME_ALLOW=0
  ID_NET_NAME_ALLOW_ACPI_INDEX=1
  ID_NET_NAME_ALLOW_ADDR_ASSIGN_TYPE=1
  ID_NET_NAME_ALLOW_ADDRESS=1
  ID_NET_NAME_ALLOW_ARI_ENABLED=1
  ID_NET_NAME_ALLOW_DEV_PORT=1
  ID_NET_NAME_ALLOW_FUNCTION_ID=1
  ID_NET_NAME_ALLOW_IFLINK=1
  ID_NET_NAME_ALLOW_INDEX=1
  ID_NET_NAME_ALLOW_LABEL=1
  ID_NET_NAME_ALLOW_PHYS_PORT_NAME=1
  ID_NET_NAME_ALLOW_TYPE=1
2023-12-19 19:15:52 +09:00
Vladimir Stoiakin 3d05c05873 cryptsetup: Add support for EC keys in PKCS#11 tokens
Since EC keys doesn't support encryption directly, we use ECDH protocol.
We generate a pair of EC keys in the same EC group, then derive a shared secret using the generated private key and the public key in the token.
The derived shared secret is used as a volume key. The generated public key is stored in the LUKS2 JSON token header area. The generated private key is erased.
To unlock a volume, we derive the shared secret with the stored public key and a private key in the token.

Co-authored-by: MkfsSion <mkfssion@mkfssion.com>
2023-12-19 13:14:16 +03:00
Frantisek Sumsal 31dcc1b4ba man: avoid potential shell expansion in systemctl's example
Resolves: #30014
2023-12-18 17:09:06 +01:00
Lennart Poettering 3ccadbce33 homectl: add "firstboot" command
This extends what systemd-firstboot does and runs on first boots only
and either processes user records passed in via credentials to create,
or asks the user interactively to create one (only if no regular user
exists yet).
2023-12-18 11:10:53 +01:00
Lennart Poettering 68f74b0af2
Merge pull request #30479 from keszybz/man-pages-synopsis-layout
Man pages synopsis layout
2023-12-18 10:44:58 +01:00
Zbigniew Jędrzejewski-Szmek ace3e93fee man: use <simplelist> for two more lists 2023-12-15 14:32:50 +01:00
Zbigniew Jędrzejewski-Szmek 73e97bb064 man: use <simplelist> for file lists in synopsis
With <para><filename>…</filename></para>, we get a separate "paragraph" for
each line, i.e. entries separated by empty lines. This uses up a lot of space
and was only done because docbook makes it hard to insert a newline. In some
other places, <literallayout> was used, but then we cannot indent the source
text (because the whitespace would end up in the final page). We can get the
desired result with <simplelist>.

With <simplelist> the items are indented in roff output, but not in html
output. In some places this looks better then no indentation, and in others it
would probably be better to have no indent. But this is a minor issue and we
cannot control that.

(I didn't convert all spots. There's a bunch of other man pages which have two
lines, e.g. an executable and service file, and it doesn't matter there so
much.)
2023-12-15 14:27:28 +01:00
Andrew Sayers ff47602f5e Fix a typo in the org.freedesktop.systemd1 man page 2023-12-15 07:39:05 +09:00
Zbigniew Jędrzejewski-Szmek f36c796e0f man/tmpfiles: update summary
It hasn't been just about "volatile" and "files" for a long time.
2023-12-14 12:52:28 +01:00
Zbigniew Jędrzejewski-Szmek 0b4cf0a540
Merge pull request #30232 from keszybz/ukify-imports
Use exec() to import ukify
2023-12-13 14:38:03 +01:00
Yu Watanabe 0977039bdc
Merge pull request #30433 from yuwata/network-nexthop-cleanups
network: introduce ManageForeignNextHops=
2023-12-13 14:16:27 +09:00
Will Springer e014a19420 man: make minor corrections to smbios-type-11(7)
- Correct initial version of io.systemd.credential* to 252
- Fix leftover copy-pasted heading
2023-12-13 00:58:23 +00:00
Yu Watanabe bbc05bec98 network/nexthop: introduce ManageForeignNextHops= boolean setting
Closes #29034.
2023-12-12 23:51:10 +09:00
Mike Yuan f611721fa2
man/systemd.mount: tmpfs automatically gains After=swap.target dep 2023-12-12 00:34:32 +08:00
Mike Yuan 39a4c452d2
fstab-generator: disable default deps if x-systemd.{wanted,required}-by= is used
Fixes #30273
2023-12-12 00:34:32 +08:00
Mike Yuan d3a7602d83
man/systemd.mount: update implicit deps on device unit
See also: 707ecf1423
2023-12-12 00:34:32 +08:00
Yu Watanabe a753d30303 systemctl: fix typo
Follow-up for 329050c5e2.
2023-12-10 14:26:33 +09:00
Luca Boccassi 6c75eff6af core: create workdir/upperdir when mounting a Type=overlay mount unit
So far we created the target directory, and the source for bind mounts,
but not workdir/upperdir for overlays, so it has to be done separately
and strictly before the unit is started, which is annoying. Check the
options when creating directories, and if upper/work directories are
specified, create them.
2023-12-08 11:22:14 +09:00
Shulhan 59b13e07f2 man: correct the path for location of "machinectl edit" setting file
The correct path where setting file located should be
"under /etc/systemd/nspawn", not "under /etc".
2023-12-07 14:51:05 +00:00
Yu Watanabe 786a337817
Merge pull request #30060 from poettering/analyze-archs
analyze: add "archs" verb that lists all known architectures
2023-12-07 15:47:30 +09:00
Daan De Meyer b952663cd1 gpt-auto-generator: Pass cryptsetup credentials to cryptsetup
cryptsetup reads a bunch of credentials now but we don't pass import
those in any service units yet. Let's pass through all cryptsetup
prefixed credentials to the systemd-cryptsetup@root instance.
2023-12-06 23:37:32 +01:00
Zbigniew Jędrzejewski-Szmek 34f4fcb59f
Merge pull request #30302 from keszybz/systemd-edit-stdin
systemctl edit --stdin
2023-12-06 22:28:02 +01:00
Zbigniew Jędrzejewski-Szmek fd72d1e794
Merge pull request #30085 from YHNdnzj/networkctl-edit-runtime
networkctl: introduce --runtime for editing network config under /run/
2023-12-06 22:27:01 +01:00
Zbigniew Jędrzejewski-Szmek bfa95c369a
Merge pull request #29987 from yuwata/network-bridge-vlan
network: remove unnecessary bridge vlan IDs
2023-12-06 22:25:42 +01:00
Zbigniew Jędrzejewski-Szmek d1f9a39ef4
Merge pull request #29853 from YHNdnzj/sleep-automated
logind: support Sleep() that automatically choose a sleep operation
2023-12-06 22:25:13 +01:00
Samuel BF 435c372ce5 journal-gatewayd: add since/until parameters for /entries
Request with Range header like 'entries=<cursor>:' (with a colon at the end,
invalid syntax per the doc), is now rejected with error 400 Bad Request.

fix #4883
2023-12-06 22:22:27 +01:00
Lennart Poettering fb8cc599ed analyze: add "architectures" verb that lists all known architectures 2023-12-06 22:18:14 +01:00
Luca Boccassi f08d1fea30
Merge pull request #30295 from yuwata/hostnamectl-machine-id
hostnamectl: read machine ID and boot ID through DBus
2023-12-06 21:12:36 +00:00
Lennart Poettering ffc1ec73b3 pid1: add ProtectSystem= as system-wide configuration, and default it to true in the initrd
This adds a new ProtectSystem= setting that mirrors the option of the
same of services, but in a more restrictive way. If enabled will remount
/usr/ to read-only, very early at boot. Takes a special value "auto"
(which is the default) which is equivalent to true in the initrd, and
false otherwise.

Unlike the per-service option we don't support full/strict modes, but
the door is open to eventually support that too if it makes sense. It's
not entirely trivial though as we have very little mounted this early,
and hence the mechanism might not apply 1:1. Hence in this PR is a
conservative first step.

My primary goal with this is to lock down initrds a bit, since they
conceptually are mostly immutable, but they are unpacked into a mutable
tmpfs. let's tighten the screws a bit on that, and at least make /usr/
immutable.

This is particularly nice on USIs (i.e. Unified System Images, that pack
a whole OS into a UKI without transitioning out of it), such as
diskomator.
2023-12-06 22:10:20 +01:00
Daan De Meyer 8e3dc737b2
Merge pull request #30241 from poettering/journalctl-short-file-switch
journalctl: add short option "-i" for "--file="
2023-12-06 22:07:41 +01:00
Luca Boccassi f9a284f02d
Merge pull request #30214 from bluca/wants_mounts_for
Add WantsMountsFor= and use it in the cryptsetup generator
2023-12-06 21:00:37 +00:00
Yu Watanabe 5db7eb21f9 hostname: expose machine ID and boot ID through DBus
Fixes #30293.
2023-12-06 20:51:13 +09:00
Zbigniew Jędrzejewski-Szmek 329050c5e2 systemctl: add "edit --stdin"
This is a fancy wrapper around "cat <<EOF", but:
- the user doesn't need to figure out the file name,
- parent directories are created automatically,
- daemon-reload is implied,
so it's a convenient way to create units or drop-ins.

Closes https://github.com/systemd/systemd/issues/21862.
2023-12-05 18:47:19 +01:00
Mike Yuan 5b3562898a
systemctl: add support for Sleep() logind call 2023-12-05 22:18:32 +08:00
Mike Yuan cd4dd90b99
logind: introduce Sleep() call and action that automatically choose a sleep operation 2023-12-05 22:18:32 +08:00
huyubiao 3769ba7570 fix: The example2 in hwdb.xml is unreasonable
use evdev:atkbd:dmi:bvnAcer:bvr:bdXXXXX:bd08/05/2010:svnAcer:pnX123: instead of evdev:atkbd:dmi:bvnAcer:bdXXXXX:bd08/05/2010:svnAcer:pnX123
2023-12-05 14:09:18 +01:00
Zbigniew Jędrzejewski-Szmek 465a9d2af8 man/systemctl: fix indentation of <xi:include>'s 2023-12-02 21:21:52 +01:00
Mike Yuan 2b98926f98
networkctl: introduce --runtime for editing network config under /run/ 2023-12-02 17:04:57 +08:00
Zbigniew Jędrzejewski-Szmek ef126bbe89 man/ukify: link to competing tools
Right now each of the three invocations yields a part of the picture.
Let's make it easier for users to discover the right tools.
2023-12-01 10:29:39 +01:00
Joerg Behrmann d4506301f9 man: document how to properly use a target as the Unit= of a timer 2023-11-30 17:14:31 +00:00
Lennart Poettering dde54b8a85 journalctl: add short option "-i" for "--file="
I see myself frequently typing in "journalctl --file=…". That's a lot to
type. Let's add a short switch too. Unfortunately, "-f" and "-F" are
already taken, hence let's pick "-i".
2023-11-30 16:21:00 +01:00
Lennart Poettering 12f2576854 man: add '=' suffix to journalctl switches that take parameter
As per coding style recommendations.
2023-11-30 16:21:00 +01:00
Luca Boccassi c9be8e420e cryptsetup: use WantsMountsFor= for key/header when nofail is set
The header and keyfile are necessary only for opening the device, not
for closing, so it is not necessary to deactivate the generated
cryptsetup unit when the header or keyfile backing store are removed.

This is especially useful in the case of softreboot, when the new
mount root is setup under /run/nextroot/ but we don't want to close
the cryptsetup devices for encrypted /var/ or so, and we simply
mount it directly on /run/nextroot/var/ before the soft-reboot.
2023-11-29 11:04:59 +00:00
Luca Boccassi 9e615fa3aa core: add WantsMountsFor=
This is the equivalent of RequiresMountsFor=, but adds Wants= instead
of Requires=. It will be useful for example for the autogenerated
systemd-cryptsetup units.

Fixes https://github.com/systemd/systemd/issues/11646
2023-11-29 11:04:59 +00:00
Дамјан Георгиевски 51219be992 man: typo, it's DHCP not DCHP in DHCPPrefixDelegation= 2023-11-29 04:00:15 +09:00
Yu Watanabe 2601482b85 man: also SIGKILL is sent on soft-reboot 2023-11-28 18:28:17 +09:00
Zbigniew Jędrzejewski-Szmek 467cd9f0a5 man/systemd-vconsole-setup: improve markup 2023-11-25 13:15:31 +01:00
Zbigniew Jędrzejewski-Szmek 963ea30a5d man: reword the list of PE sections in systemd-stub
Let's put the section name at the beginning of each sentence. This way we
can avoid awkward constructs like "kernel is looked for in the .linux section".
Also, since the paragraph above says that this is a list of "PE sections", we
can just say "section". In other places, it is often useful to say "PE section"
to avoid ambiguity.

Also fix the off-by-one in the count of sections.
2023-11-24 15:21:58 +01:00
Zbigniew Jędrzejewski-Szmek 99ad526f2a man: drop recommendation to use absolute paths in ExecStart*=
The only reason to recommend this would be if people had multiple commands
with the same name in the search path. This probably was never the best idea,
and it happens rarely anyway. Since the patch that dropped requirement for full
paths was introduced, we have dropped support for unmerged-usr and we're planning
to drop support for split-bin at some point too. Many people effectively have just
one directory in the search path, so there is even less reason to use an absolute
path. So let's recommend just using the command name, which makes the unit file
shorter and nicer to read.
2023-11-23 13:23:44 +01:00
Zbigniew Jędrzejewski-Szmek 83d0edf565 man/sd_bus_process: fix confusion about "synchronous"
An event loop is not "synchronous". So we shouldn't say that the client must
"synchrounusly poll" if we recommend an event loop. Let's just say it should
poll, and say that "sd_bus_wait()" is blocking, which is clearer and more
correct than "synchronous".
2023-11-23 13:23:44 +01:00
Luca Boccassi 31897753fb
Merge pull request #30024 from keszybz/one-doc-thingy
Serialize units ratelimits and document StartLimitIntervalSec=infinity
2023-11-22 17:42:51 +00:00
Yu Watanabe cf289b1415 network/dhcp: disable RapidCommit= by default when AllowList=/DenyList= is specified
AllowList= and DenyList= filter only DHCPOFFER messages. So, if
RapidCommit= is enabled, then networkd unconditionally accepts a rapid
ACK message even if its sender is filtered out by the lists.

As AllowList=/DenyList= implemented earlier than RapidCommit=, so
enabling RapidCommit= unconditionally by default may break existing
setups that use AllowList=/DenyList=.

Let's disable RapidCommit= by default when AllowList=/DenyList= is
enabled. Still the setting can be enabled by setting explicitly even
AllowList=/DenyList= is also specified.
2023-11-22 05:24:18 +09:00
Yu Watanabe 24bb67ed12 man: [DHCPv4] RapidCommit= is disabled when Anonymize=yes 2023-11-22 04:57:05 +09:00
Nils K 76d2b8da96 Fix references to ReadOnly=
PartitionReadOnly is not a valid property and ReadOnly was meant instead.
2023-11-21 19:16:15 +00:00
Luca Boccassi b595fd62e4 man: correct version tags in systemd-vmspawn
We ended up merging some changes earlier

Fixes https://github.com/systemd/systemd/issues/30091
2023-11-21 09:01:40 +09:00
Vito Caputo 165fb931ea man: add note about journald forwarding being sync
This footgun should at least be documented, if there's not going
to be a shortcut setting to establish the async `journalctl
--follow` equivalent.

Fixes: https://github.com/systemd/systemd/issues/2815
2023-11-20 12:00:36 +00:00
Martin Joerg 42c50fdf31 man: Fix example for systemd-run 2023-11-20 11:58:44 +00:00
Frantisek Sumsal f1e02423a9 login: mark the TTY property as "emits change"
Triggered by the SetTTY() method.

Follow-up to 092e6cd19a.
Addresses: https://github.com/systemd/systemd/pull/30043#pullrequestreview-1733628935
2023-11-16 11:26:26 +00:00
Frantisek Sumsal 236cb01622 login: mark the Display property as "emits change"
With the introduction of SetDisplay() method in 4885d7490b the Display
property emits a "properties changed" message every time the display is
changed using this method, so mark it appropriately.

Caught by systemd/systemd#30029:

systemd-logind[1366]: Got message type=method_call sender=:1.165 destination=org.freedesktop.login1 path=/org/freedesktop/login1/session/_310 interface=org.freedesktop.login1.Session member=SetDisplay  cookie=8 reply_cookie=0 signature=s error-name=n/a error-message=n/a
systemd-logind[1366]: Assertion 'v->vtable->flags & SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE || v->vtable->flags & SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION' failed at src/libsystemd/sd-bus/bus-objects.c:2141, function emit_properties_changed_on_interface(). Ignoring.

Follow-up to 4885d7490b.
2023-11-15 22:41:24 +01:00
Zbigniew Jędrzejewski-Szmek ea97ec6cd0 man: document StartLimitIntervalSec=infinity
This seems to work as expected. In the issue, doubts were raised whether it
works fine with daemon-reload/daemon-reexec, and it seems to work fine.
(The property cannot be set via set-property, the dbus property is 'const'.
We could relax this, but that'd be a separate feature.)

Closes #29574.
2023-11-15 17:36:10 +01:00
Mike Yuan dfb210c8fb
man/systemd-creds: fix a typo 2023-11-15 22:28:52 +08:00
Yu Watanabe 58cde42f65 core: rename MemoryZswapCurrent -> MemoryZSwapCurrent
Follow-up for 26caa66867.
2023-11-13 13:54:56 +01:00
Florian Schmaus 26caa66867 cgroup: add support for memory.zswap.current 2023-11-12 21:10:40 +01:00
Yu Watanabe 228693af47 network/brvlan: remove unnecessary bridge vlan IDs
When an interface is being reconfigured with different bridge vlan
settings, this makes old vlan IDs on the interface removed.

This also makes the PVID= setting support negative boolean value, e.g. "no",
in which case, the currently assigned PVID (typically, assigned by the
kernel when an interface is joined to a bridge) is dropped.
This feature is requested by #15291.

Note, if a .network file has no settings about bridge vlan, networkd
keeps the currently assigned vlan IDs. That's intended, to make not
break existing setups.
When a .network file has only PVID=no line in [BridgeVLAN] section, then
all assigned vlan IDs are removed.

Fixes #29975.
Closes #15291.
2023-11-13 03:58:46 +09:00
Yu Watanabe f269016c3e network/brvlan: make [BridgeVLAN] settings support an empty string
This also renames Network.pvid and friends.
2023-11-13 03:58:46 +09:00
Mike Yuan 214bed77e8
Merge pull request #29941 from Flowdalic/cgroup-memory-swap-peak
cgroup: add support for memory.swap.peak and memory.swap.current
2023-11-12 16:21:44 +08:00
Florian Schmaus 37533c9432 cgroup: add support for memory.swap.current
In systemctl-show we only show current swap if ever swapped or non-zero. This
reduces the noise on swapless systems, that would otherwise always show a swap
value that never has the chance to become non-zero. It further reduces the
noise for services that never swapped.
2023-11-11 12:16:29 +01:00
Florian Schmaus aac3384e56 cgroup: add support for memory.swap.peak 2023-11-11 12:14:07 +01:00
cvlc12 f712b11df6 Update kernel-install man page, Ukify is the default UKI_GENERATOR
Ukify is the default generator, and will be used if UKI_GENERATOR is unset. See https://github.com/systemd/systemd/pull/28687
2023-11-11 12:25:37 +09:00
Luca Boccassi be0916f77c
Merge pull request #29955 from poettering/repart-seal-key
repart: add --tpm2-seal-key= support, matching the recently added support cryptenroll has
2023-11-10 16:52:00 +00:00
Luca Boccassi d8beda5023
Merge pull request #29947 from poettering/srk-beefup
tpm2: make SRK easily accessible for use with systemd-cryptenroll --tpm2-device-key=
2023-11-10 16:47:46 +00:00
Lennart Poettering 342c70da7c man: update --tpm2-device-key= docs to reference the new ways to get the SRK 2023-11-09 12:49:29 +01:00
Lennart Poettering d30693f39b analyze: add "srk" verb to extract current srk from TPM2 chip
This is pretty low-level functionality, hence placed in systemd-analyze.
This is useful for working with systemd-cryptenroll --tpm2-device-key=,
as it acquires the SRK without requiring the full tpm2-tss tool set.
2023-11-09 12:48:27 +01:00
Lennart Poettering fbe7db47f4 tpm2-setup: also save the SRK to the file system in TPM2_PUBLIC format
We already save it in PEM format, also store it TPM2_PUBLIC format next
to it. This is useful for usage with systemd-cryptenroll's
--tpm2-device-key= switch.
2023-11-09 12:47:24 +01:00
Lennart Poettering 78fdf0f68b repart: add --tpm2-device-key= to repart, too
This adds what was added to systemd-cryptenroll recently to
systemd-repart too.

Follow-up for: c3a2a681be
2023-11-09 12:27:43 +01:00
Sam Leonard 6b30cad5e9
vmspawn: update man page to include vsock options 2023-11-09 10:36:26 +00:00
Lennart Poettering b6be6a6721 man: document explicitly tha ReadWritePaths= cannot undo superblock read-only settings
Fixes: #29266
2023-11-09 09:39:12 +01:00
Michal Sekletar e5883df89f man: document nameserver= option 2023-11-08 17:45:35 +00:00
Yu Watanabe 0fd9bea38e man: fix typo
Follow-up for a9d54de66d.
2023-11-09 00:09:13 +09:00
Lennart Poettering d33121d27d man: document that changing --uid= doesn't work
Fixes: #28982
2023-11-08 14:28:10 +01:00
Lennart Poettering 28e3359fdc man: document that Domains=local bind the domain to unicast DNS, not mDNS
Fixes: #28983
2023-11-08 14:28:10 +01:00
Lennart Poettering 28562194c4 service: say explicitly that people should not use different NonBlocking= settings if they share socket units between multiple service units
Fixes: #29600
2023-11-08 14:28:10 +01:00
Lennart Poettering 244101876c man: explicitly document compat guarantees of cryptenroll vs. cryptsetup
Fixes: #29743
2023-11-08 14:28:10 +01:00
Lennart Poettering 7480859a11 man,doc: document some aspects of user record management/homed a bit better
Fixes: #29759
2023-11-08 12:40:08 +01:00
Lennart Poettering 3cb938bd12 man: be even clearer that tmpfiles user/group/mode are applied on existing inodes
I think it was clear already, but let's be even clearer.

Fixes: #29774
2023-11-08 12:39:19 +01:00
Lennart Poettering a9d54de66d man: update COREDUMP_xyz journal fields docs
This completes/corrects the documentation for the following fields:

    COREDUMP_CGROUP= - doc where wrong, actually covered COREDUMP_PROC_CGROUP=
    COREDUMP_CMDLINE= → undocumented so far
    COREDUMP_PROC_CGROUP= → docs where there but incorrectly assigned to COREDUMP_CGROUP=
    COREDUMP_PROC_AUXV= → undocumented so far
    COREDUMP_SESSION= → undocumented so far

Fixes: #29832
2023-11-08 12:38:27 +01:00
Lennart Poettering 2e290d55fd man: add missing unit file section name to example
Fixes: #29917
2023-11-08 12:37:26 +01:00
Lennart Poettering e3c5842732
Merge pull request #28519 from ddstreet/tpm2_external_seal
Update systemd-cryptenroll to enroll TPM using only public key
2023-11-08 10:28:28 +01:00
Yu Watanabe b2622db0df
Merge pull request #29910 from yuwata/rapid-commit
dhcp: about rapid commit
2023-11-08 12:20:17 +09:00
Luca Boccassi 9871279cde
Merge pull request #29913 from keszybz/vmspawn-ci
Build vmspawn in CI and fix one test failure
2023-11-07 23:35:48 +00:00
Luca Boccassi 00666ec71f
Merge pull request #6763 from kinvolk/iaguis/no-new-privs
core: allow using seccomp without no_new_privs when unprivileged
2023-11-07 21:34:49 +00:00