]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoAdd support for systemd-pkcs11 libcryptsetup plugin. 19797/head
Ondrej Kozina [Thu, 20 May 2021 13:37:08 +0000 (15:37 +0200)] 
Add support for systemd-pkcs11 libcryptsetup plugin.

Add support for systemd-pkcs11 based LUKS2 device activation
via libcryptsetup plugin. This make the feature (pkcs11 sealed
LUKS2 keyslot passphrase) usable from both systemd utilities
and cryptsetup cli.

The feature is configured via -Dlibcryptsetup-plugins combo
with default value set to 'auto'. It get's enabled automatically
when cryptsetup 2.4.0 or later is installed in build system.

4 years agopkcs11-util: split pkcs11_token_login function
Ondrej Kozina [Fri, 4 Jun 2021 14:21:30 +0000 (16:21 +0200)] 
pkcs11-util: split pkcs11_token_login function

Future systemd-pkcs11 plugin requires unlock via single
call with supplied pin. To reduce needless code duplication
in plugin itself split original pkcs_11_token_login call in
two calls:

new pkcs11_token_login_by_pin and the former where loop
for retrying via PIN query callback remains.

4 years agocryptsetup-pkcs11: move pkcs11_callback and data in shared utils.
Ondrej Kozina [Wed, 2 Jun 2021 16:45:42 +0000 (18:45 +0200)] 
cryptsetup-pkcs11: move pkcs11_callback and data in shared utils.

To be used later by both (future) systemd-pkcs11 libcryptsetup
plugin and cryptsetup-pkcs11.

4 years agoAdd support for systemd-fido2 libcryptsetup plugin.
Ondrej Kozina [Mon, 17 May 2021 13:26:14 +0000 (15:26 +0200)] 
Add support for systemd-fido2 libcryptsetup plugin.

Add support for systemd-fido2 based LUKS2 device activation
via libcryptsetup plugin. This make the feature (fido2 sealed
LUKS2 keyslot passphrase) usable from both systemd utilities
and cryptsetup cli.

The feature is configured via -Dlibcryptsetup-plugins combo
with default value set to 'auto'. It get's enabled automatically
when cryptsetup 2.4.0 or later is installed in build system.

4 years agopo: Translated using Weblate (Sinhala)
Hela Basa [Thu, 19 Aug 2021 07:04:49 +0000 (09:04 +0200)] 
po: Translated using Weblate (Sinhala)

Currently translated at 0.5% (1 of 189 strings)

Co-authored-by: Hela Basa <r45xveza@pm.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/si/
Translation: systemd/main

4 years agocreds-util: fix possible divide-by-zero
Yu Watanabe [Wed, 18 Aug 2021 07:05:02 +0000 (16:05 +0900)] 
creds-util: fix possible divide-by-zero

input_size may be zero.

Fixes #20469.

4 years agosd-boot: Use UEFI provided CRC32
Jan Janssen [Tue, 17 Aug 2021 09:44:21 +0000 (11:44 +0200)] 
sd-boot: Use UEFI provided CRC32

4 years agoudev: make RxChannels= or friends also accept "max"
Yu Watanabe [Wed, 18 Aug 2021 07:41:11 +0000 (16:41 +0900)] 
udev: make RxChannels= or friends also accept "max"

Follow-up for 406041b7de767316674eb6a2f98ad466577ce8a4.

Also, this makes
- the settings accept an empty string,
- if the specified value is too large, also use the advertised maximum
  value.
- mention the range of the value in the man page.

4 years agotree-wide: fix typo
Yu Watanabe [Wed, 18 Aug 2021 10:14:31 +0000 (19:14 +0900)] 
tree-wide: fix typo

4 years agodocs: portable services are no longer in preview 20470/head
Luca Boccassi [Tue, 17 Aug 2021 23:00:46 +0000 (00:00 +0100)] 
docs: portable services are no longer in preview

Reword the intro to the document, as portable services are a stable interface
and no longer a preview.

4 years agofstab-generator: Respect nofail when ordering
Vladimir Panteleev [Tue, 17 Aug 2021 18:30:29 +0000 (18:30 +0000)] 
fstab-generator: Respect nofail when ordering

4 years agoFix typo in dbus property name ("OnSuccesJobMode")
Vladimir Panteleev [Tue, 17 Aug 2021 17:56:41 +0000 (17:56 +0000)] 
Fix typo in dbus property name ("OnSuccesJobMode")

4 years agoMerge pull request #20460 from yuwata/udevadm-test-builtin-introduce-action
Yu Watanabe [Wed, 18 Aug 2021 06:59:40 +0000 (15:59 +0900)] 
Merge pull request #20460 from yuwata/udevadm-test-builtin-introduce-action

udevadm: introduce --action option for test-builtin

4 years agoudev: Support "max" string for BufferSize options (#20458)
Daan De Meyer [Wed, 18 Aug 2021 06:59:13 +0000 (07:59 +0100)] 
udev: Support "max" string for BufferSize options (#20458)

"max" indicates the hardware advertised maximum queue buffer size
should be used.

The max sizes can be checked by running `ethtool -g <dev>` (Preset maximums).
Since the buffer sizes can't be set to 0 by users, internally we use 0 to
indicate that the hardware advertised maximum should be used.

4 years agoMerge pull request #20456 from tomty89/man
Yu Watanabe [Wed, 18 Aug 2021 06:58:06 +0000 (15:58 +0900)] 
Merge pull request #20456 from tomty89/man

Adding a few notes in the systemd.network man page

4 years agonetwork: do not assume the highest priority when Priority= is unspecified
Yu Watanabe [Tue, 17 Aug 2021 05:03:19 +0000 (14:03 +0900)] 
network: do not assume the highest priority when Priority= is unspecified

Previously, when Priority= is unspecified, networkd configured the rule with
the highest (=0) priority. This commit makes networkd distinguish the case
the setting is unspecified and one explicitly specified as Priority=0.

Note.
1) If the priority is unspecified on configure, then kernel dynamically picks
   a priority for the rule.
2) The new behavior is consistent with 'ip rule' command.

Replaces #15606.

4 years agoudevadm: introduce -a|--action option for test-builtin command 20460/head
Yu Watanabe [Tue, 17 Aug 2021 14:14:29 +0000 (23:14 +0900)] 
udevadm: introduce -a|--action option for test-builtin command

As net_setup_link builtin requires that a device action is set for the
sd_device object.

4 years agoman: network: mention that RouteMetric= in [DHCPv4] is also applied to the prefix... 20456/head
Tom Yan [Tue, 17 Aug 2021 14:53:49 +0000 (22:53 +0800)] 
man: network: mention that RouteMetric= in [DHCPv4] is also applied to the prefix route

4 years agoman: network: mention that Promiscuous= can be used to set nopromisc for passthru...
Tom Yan [Tue, 17 Aug 2021 14:53:29 +0000 (22:53 +0800)] 
man: network: mention that Promiscuous= can be used to set nopromisc for passthru MACV{LAN,TAP}

4 years agoMerge pull request #20448 from medhefgo/boot
Lennart Poettering [Tue, 17 Aug 2021 14:26:25 +0000 (16:26 +0200)] 
Merge pull request #20448 from medhefgo/boot

sd-boot: UI improvements

4 years agoshell-completion: add missing uevent actions for udevadm
Yu Watanabe [Tue, 17 Aug 2021 14:13:07 +0000 (23:13 +0900)] 
shell-completion: add missing uevent actions for udevadm

4 years agoudevadm: introduce parse_device_action() helper function
Yu Watanabe [Tue, 17 Aug 2021 13:57:04 +0000 (22:57 +0900)] 
udevadm: introduce parse_device_action() helper function

4 years agoudevadm: introduce find_device_with_action() helper function
Yu Watanabe [Tue, 17 Aug 2021 13:46:32 +0000 (22:46 +0900)] 
udevadm: introduce find_device_with_action() helper function

4 years agoMerge pull request #20281 from bluca/ext_release_naming
Lennart Poettering [Tue, 17 Aug 2021 14:06:26 +0000 (16:06 +0200)] 
Merge pull request #20281 from bluca/ext_release_naming

extension-release: allow fallback when image name is mangled after build, improve docs

4 years agodocs: document layered images in PORTABLE_SERVICES.md 20281/head
Luca Boccassi [Fri, 23 Jul 2021 15:07:05 +0000 (16:07 +0100)] 
docs: document layered images in PORTABLE_SERVICES.md

4 years agoman: further document extension-release
Luca Boccassi [Fri, 23 Jul 2021 13:45:38 +0000 (14:45 +0100)] 
man: further document extension-release

4 years agoextension-release: search for other files if expected name not found
Luca Boccassi [Thu, 22 Jul 2021 19:41:34 +0000 (20:41 +0100)] 
extension-release: search for other files if expected name not found

In some cases image names are unpredictable - some orchestrators/deployment
tools like to mangle names to suit their internal formats. In these cases,
the requirement that the extension-release file matches exactly the image
name where it's contained cannot work.

Allow falling back to loading the first regular file which name starts with
'extension-release' located in /usr/lib/extension-release.d/ and tagged with
a user.extension-release.strict extended attribute with a true value, if the
one with the expected name cannot be found.

4 years agoxattr-util: add fgetxattrat_fake_malloc variant
Luca Boccassi [Mon, 16 Aug 2021 14:58:09 +0000 (15:58 +0100)] 
xattr-util: add fgetxattrat_fake_malloc variant

4 years agosd-boot: Draw custom edit cursor 20448/head
Jan Janssen [Sun, 15 Aug 2021 11:44:35 +0000 (13:44 +0200)] 
sd-boot: Draw custom edit cursor

Firmware likes to draw the EFI provided cursor in a weird way that
makes it invisible sometimes. This is even more likely to happen
if unusual colors are picked. It also fails to draw attention to the
user by being very small and not blinking.

Additionally, to make it more clear that we are in edit mode, we
now default to inverting the general default color and use that for
our line edit.

Fixes: #19301
4 years agosd-boot: Add compile-time color support
Jan Janssen [Sat, 14 Aug 2021 12:38:43 +0000 (14:38 +0200)] 
sd-boot: Add compile-time color support

Fixes: #10139
4 years agosd-boot: Improve key bindings
Jan Janssen [Sat, 14 Aug 2021 12:26:12 +0000 (14:26 +0200)] 
sd-boot: Improve key bindings

Making keys case insensitive should help if caps lock is on.
We are not advertising them at runtime or in the manual to
reduce the noise.

This also hides the quit and version commands from the help
string. They are mostly for devs and otherwise have little
to no use to normal users. The latter overlaps with print
status which is still advertised.

4 years agosd-boot: Render title entries centered and not to entire screen width
Jan Janssen [Sat, 14 Aug 2021 12:10:35 +0000 (14:10 +0200)] 
sd-boot: Render title entries centered and not to entire screen width

4 years agosd-boot: Introduce print_at helper function
Jan Janssen [Sat, 14 Aug 2021 12:02:16 +0000 (14:02 +0200)] 
sd-boot: Introduce print_at helper function

4 years agosd-boot: Fix marking EFI var default entry
Jan Janssen [Sat, 14 Aug 2021 11:44:12 +0000 (13:44 +0200)] 
sd-boot: Fix marking EFI var default entry

Fixes: #18072
4 years agoenv-util: add unsetenv_erase() helper
Lennart Poettering [Mon, 16 Aug 2021 14:41:34 +0000 (16:41 +0200)] 
env-util: add unsetenv_erase() helper

Let's unify how we remove secrets from the env block.

4 years agoMerge pull request #20420 from poettering/import-beef-up
Lennart Poettering [Tue, 17 Aug 2021 09:53:18 +0000 (11:53 +0200)] 
Merge pull request #20420 from poettering/import-beef-up

import: modernizations, and various additions

4 years agoimport: drop some now unused functions from import-common.c 20420/head
Lennart Poettering [Fri, 26 Feb 2021 21:49:38 +0000 (22:49 +0100)] 
import: drop some now unused functions from import-common.c

4 years agodocs: document how to turn off btrfs quota support in importd
Lennart Poettering [Wed, 3 Feb 2021 20:50:27 +0000 (21:50 +0100)] 
docs: document how to turn off btrfs quota support in importd

Fixes: #18421 #15903
4 years agoimport-fs: make various options controllable via cmdline/env var
Lennart Poettering [Thu, 25 Feb 2021 12:09:30 +0000 (13:09 +0100)] 
import-fs: make various options controllable via cmdline/env var

This basically does what the previous two commits did for systemd-import
+ systemd-pull but for systemd-import-fs.

This commit is a bit simpler though, as a --direct mode doesn't change
that much. It's mostly about not searching for existing, conflicting
images and not much else.

4 years agopull: add --direct mode + make various eatures optional + explicit checksum verification
Lennart Poettering [Wed, 9 Jun 2021 15:19:15 +0000 (17:19 +0200)] 
pull: add --direct mode + make various eatures optional + explicit checksum verification

This does what the previous commit did for systemd-import the same way
for systemd-pull.

It also adds one more thing: the checksum validation is extended, in
addition of doing SHA256SUMS/gpg verification it is now possible to
immediately specify a hash value on the command line that the download
needs to match. This is particularly useful in --direct mode as we can
download/decompress/unpack arbitrary files and check the hash of the
downloaded file on-the-fly.

4 years agoimport: add new "--direct" mode + add controls for turning certain features on/off
Lennart Poettering [Fri, 22 Jan 2021 16:40:51 +0000 (17:40 +0100)] 
import: add new "--direct" mode + add controls for turning certain features on/off

This reworks/modernizes the tar/raw import logic and adds the following
new features:

- Adds the ability to control btrfs subvol and quota behaviour which was
  previously always on via an env var and cmdline arg

- Adds control whether to sync() stuff after writing it, similar via env
  var + cmdline arg

- Similar, the QCOW2 unpacking logic that was previously the implied
  default may now be controlled via env var + cmdline arg.

- adds a "direct" mode. In this mode, the systemd-import tool can be
  used as a simple tool for decompressing/unpacking/installing arbitrary
  files, without all the additional meta data and auxiliary resources,
  i.e.  outside of the immediate disk image context. Via the new
  --offset= and --size-max= switches the downloaded data can be written
  to specific locations of a file (which is particularly useful to use
  the tool to download fs images and write them to a partition location
  before actually creating the partition).

We'll later use the latter feature for "sysupdate" concept, where images
can be directly be written to partitions. That way the systemd-import
binary will be used as backend for both "systemd-importd" and
"systemd-sysupdate" and share most of the same code.

4 years agoshared: add generic helper tools for installing files/dir trees
Lennart Poettering [Fri, 26 Feb 2021 16:41:30 +0000 (17:41 +0100)] 
shared: add generic helper tools for installing files/dir trees

This adds a bit of generic helper tools for installing files/dir trees.
"installing" is supposed to mean the final step when preparing a disk
image or directory tree, where the result is renamed to its final name.
It has some bells and whistles, as it is able to replace existing files
sanely, can fsync() things carefully and can mark things read-only in a
nice way.

This is supposed to be generic, unified code that can be used eventually
for any of our tools that prepare disk images/directory trees, including
importd, nspawn's --template= mechanism, the discover-image.c logic,
and more.

4 years agopo: Translated using Weblate (Portuguese (Brazil))
Gustavo Costa [Tue, 17 Aug 2021 07:04:48 +0000 (09:04 +0200)] 
po: Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Gustavo Costa <xfgusta@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pt_BR/
Translation: systemd/main

4 years agoMerge pull request #20450 from yuwata/ethtool-cleanups
Yu Watanabe [Mon, 16 Aug 2021 20:22:40 +0000 (05:22 +0900)] 
Merge pull request #20450 from yuwata/ethtool-cleanups

ethtool: trivial cleanups

4 years agoMerge pull request #20443 from yuwata/network-conf-parser-cleanups
Yu Watanabe [Mon, 16 Aug 2021 17:42:27 +0000 (02:42 +0900)] 
Merge pull request #20443 from yuwata/network-conf-parser-cleanups

network: conf parser cleanups

4 years agounit: coldplug both job and nop_job if possible
Geass-LL [Fri, 2 Apr 2021 03:27:59 +0000 (11:27 +0800)] 
unit: coldplug both job and nop_job if possible

Sometimes, both job and nop_job are deserialized. In this case,
if we only cold plug the job, the nop_job will also stuck in the
job list.

4 years agoMerge pull request #20442 from yuwata/network-can-introduce-many-settings
Yu Watanabe [Mon, 16 Aug 2021 17:40:32 +0000 (02:40 +0900)] 
Merge pull request #20442 from yuwata/network-can-introduce-many-settings

network: introduce several CAN interface related settings

4 years agonetwork: add address label on dhcpv4
Maxime de Roucy [Sat, 14 Aug 2021 20:50:14 +0000 (22:50 +0200)] 
network: add address label on dhcpv4

Fixes: #13967
4 years agonetwork: allow users to forbid passthru MACVLAN from putting its link into promiscuou...
Tom Yan [Mon, 16 Aug 2021 10:00:42 +0000 (18:00 +0800)] 
network: allow users to forbid passthru MACVLAN from putting its link into promiscuous mode

While we haven't implemented a key for users to set MACVLAN/MACVTAP flags,
we can at least allow them to make use of the Promiscuous= key of
the corresponding link to set the nopromisc flag.

4 years agoethtool: make ethtool_set_features() return earlier when nothing is requested 20450/head
Yu Watanabe [Mon, 16 Aug 2021 15:44:00 +0000 (00:44 +0900)] 
ethtool: make ethtool_set_features() return earlier when nothing is requested

4 years agoethtool: make the size of 'features' array static
Yu Watanabe [Mon, 16 Aug 2021 14:47:40 +0000 (23:47 +0900)] 
ethtool: make the size of 'features' array static

4 years agoman: address label can be set only for IPv4 addresses 20443/head
Yu Watanabe [Mon, 16 Aug 2021 03:57:18 +0000 (12:57 +0900)] 
man: address label can be set only for IPv4 addresses

4 years agosd-boot: Allow automatic entries to be default
Jan Janssen [Sat, 14 Aug 2021 11:06:37 +0000 (13:06 +0200)] 
sd-boot: Allow automatic entries to be default

4 years agosd-boot: Improve selection of initial entries to show
Jan Janssen [Sat, 14 Aug 2021 11:04:29 +0000 (13:04 +0200)] 
sd-boot: Improve selection of initial entries to show

4 years agoMerge pull request #20438 from medhefgo/boot
Lennart Poettering [Mon, 16 Aug 2021 13:35:08 +0000 (15:35 +0200)] 
Merge pull request #20438 from medhefgo/boot

sd-boot: Better self-detection and windows loader title

4 years agonetwork: can: allow to specify bit-timing with TimeQuantaNSec= and friends 20442/head
Yu Watanabe [Sun, 15 Aug 2021 18:36:58 +0000 (03:36 +0900)] 
network: can: allow to specify bit-timing with TimeQuantaNSec= and friends

Closes #19424 and #20435.

4 years agonetwork: SamplePoint= should be specified only when BitRate= is specified
Yu Watanabe [Sun, 15 Aug 2021 17:41:15 +0000 (02:41 +0900)] 
network: SamplePoint= should be specified only when BitRate= is specified

See can_get_bittiming() in drivers/net/can/dev/bittiming.c of kernel.

4 years agonetwork: can: make Termination= optionally take a raw resistor value
Yu Watanabe [Sun, 15 Aug 2021 17:16:53 +0000 (02:16 +0900)] 
network: can: make Termination= optionally take a raw resistor value

Note that this slightly breaks backward compatibility when
Termination=1. Previously, this is handled as boolean true, then 120 ohm
was used. But now with this commit, it is handled as 1 ohm.

4 years agonetwork: can: add missing control modes
Yu Watanabe [Sun, 15 Aug 2021 16:53:26 +0000 (01:53 +0900)] 
network: can: add missing control modes

4 years agonetwork: can: introduce config_parse_can_control_mode()
Yu Watanabe [Sun, 15 Aug 2021 16:03:25 +0000 (01:03 +0900)] 
network: can: introduce config_parse_can_control_mode()

4 years agonetwork: can: refuse too large restart sec earlier
Yu Watanabe [Sun, 15 Aug 2021 15:45:23 +0000 (00:45 +0900)] 
network: can: refuse too large restart sec earlier

4 years agosd-boot: Detect windows boot loader title from BCD 20438/head
Jan Janssen [Fri, 13 Aug 2021 17:03:35 +0000 (19:03 +0200)] 
sd-boot: Detect windows boot loader title from BCD

4 years agosd-boot: Add memmem_safe and memory_startswith
Jan Janssen [Fri, 13 Aug 2021 17:03:35 +0000 (19:03 +0200)] 
sd-boot: Add memmem_safe and memory_startswith

4 years agosd-boot: Try harder to detect ourselves
Jan Janssen [Fri, 13 Aug 2021 17:03:35 +0000 (19:03 +0200)] 
sd-boot: Try harder to detect ourselves

By moving our magic string into its own PE section, we can forego
grepping for it.

4 years agosd-boot: Fix PE section parsing
Jan Janssen [Fri, 13 Aug 2021 16:55:32 +0000 (18:55 +0200)] 
sd-boot: Fix PE section parsing

We only need the PE header offset from the DOS header, not
its size. Previously, the section table could be cut off in the middle.

While we are at it, also modernize the remaining code.

4 years agonetwork: check validity before copying the input string
Yu Watanabe [Mon, 16 Aug 2021 03:48:04 +0000 (12:48 +0900)] 
network: check validity before copying the input string

Prompted by https://github.com/systemd/systemd/pull/20440#discussion_r689136337.

4 years agonetwork: rebreak conf parser arguments
Yu Watanabe [Mon, 16 Aug 2021 03:41:34 +0000 (12:41 +0900)] 
network: rebreak conf parser arguments

4 years agonetwork: can: move function
Yu Watanabe [Sun, 15 Aug 2021 15:32:10 +0000 (00:32 +0900)] 
network: can: move function

4 years agobasic/linux: update linux uapi headers
Yu Watanabe [Sun, 15 Aug 2021 16:06:11 +0000 (01:06 +0900)] 
basic/linux: update linux uapi headers

4 years agoDon't open /var journals in volatile mode when runtime_journal==NULL
Milo Turner [Fri, 13 Aug 2021 14:28:58 +0000 (10:28 -0400)] 
Don't open /var journals in volatile mode when runtime_journal==NULL

4 years agoMerge pull request #20432 from yuwata/network-recreate-stacked-netdevs
Yu Watanabe [Fri, 13 Aug 2021 08:31:28 +0000 (17:31 +0900)] 
Merge pull request #20432 from yuwata/network-recreate-stacked-netdevs

network: recreate stacked netdevs when underlying device is re-added

4 years agomeson: Make unused-function an error
Jan Janssen [Thu, 12 Aug 2021 14:18:10 +0000 (16:18 +0200)] 
meson: Make unused-function an error

4 years agoresolved: retry on SERVFAIL before downgrading feature level
Steven Siloti [Sun, 11 Jul 2021 18:05:26 +0000 (11:05 -0700)] 
resolved: retry on SERVFAIL before downgrading feature level

The SERVFAIL RCODE can be generated for many reasons which may not be related
to lack of feature support. For example, the Stubby resolver generates
SERVFAIL when a request times out. Such transient failures can cause
unnecessary downgrades to both the transaction and the server's feature level.
The consequences of this are especially severe if the server is in DNSSEC
strict mode. In this case repeated downgrades eventually cause the server to
stop resolving entirely with the error "incompatible-server".

To avoid unnecessary downgrades the request should be retried once with the
current level before the transaction's feature level is downgraded.

4 years agoMerge pull request #20233 from maanyagoenka/log-error
Lennart Poettering [Fri, 13 Aug 2021 07:22:48 +0000 (09:22 +0200)] 
Merge pull request #20233 from maanyagoenka/log-error

systemd-analyze: add option to return an error value when unit verification fails

4 years agoMerge pull request #20350 from medhefgo/boot
Lennart Poettering [Fri, 13 Aug 2021 07:22:12 +0000 (09:22 +0200)] 
Merge pull request #20350 from medhefgo/boot

Grab bag of sd-boot improvements

4 years agosystemd-analyze: option to exit with an error when 'verify' fails 20233/head
Maanya Goenka [Mon, 26 Jul 2021 20:02:17 +0000 (13:02 -0700)] 
systemd-analyze: option to exit with an error when 'verify' fails

The commit introduces a callback invoked from log_syntax_internal.
Use it from systemd-analyze to gather a list of units that contain
syntax warnings. A new command line option is added to make use of this.

The new option --recursive-errors takes in three possible modes:

1. yes - which is the default. systemd-analyze exits with an error when syntax warnings arise during verification of the
 specified units or any of their dependencies.
3. no - systemd-analyze exits with an error when syntax warnings arise during verification of only the selected unit.
Analyzing and loading any dependencies will be skipped.
4. one - systemd-analyze exits with an error when syntax warnings arise during verification
 of only the selected units and their direct dependencies.

Below are two service unit files that I created for the purposes of testing:

1. First, we run the commands on a unit that does not have dependencies but has a non-existing key-value setting (i.e. foo = bar).

> cat <<EOF>testcase.service

[Unit]
foo = bar

[Service]
ExecStart = echo hello
EOF

OUTPUT:

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify testcase.service
/home/maanya-goenka/systemd/testcase.service:2: Unknown key name 'foo' in section 'Unit', ignoring.
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify --recursive-errors=yes testcase.service
/home/maanya-goenka/systemd/testcase.service:2: Unknown key name 'foo' in section 'Unit', ignoring.
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify --recursive-errors=no testcase.service
/home/maanya-goenka/systemd/testcase.service:2: Unknown key name 'foo' in section 'Unit', ignoring.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify --recursive-errors=one testcase.service
/home/maanya-goenka/systemd/testcase.service:2: Unknown key name 'foo' in section 'Unit', ignoring.
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

2. Next, we run the commands on a unit that is syntactically valid but has a non-existing dependency (i.e. foo2.service)

> cat <<EOF>foobar.service

[Unit]
Requires = foo2.service

[Service]
ExecStart = echo hello
EOF

OUTPUT:

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify foobar.service
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
foobar.service: Failed to create foobar.service/start: Unit foo2.service not found.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify --recursive-errors=yes foobar.service
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
foobar.service: Failed to create foobar.service/start: Unit foo2.service not found.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify --recursive-errors=no foobar.service
maanya-goenka@debian:~/systemd (log-error)$ echo $?
0

maanya-goenka@debian:~/systemd (log-error)$ sudo build/systemd-analyze verify --recursive-errors=one foobar.service
/usr/lib/systemd/system/plymouth-start.service:15: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
/usr/lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file accordingly.
/usr/lib/systemd/system/gdm.service:30: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
foobar.service: Failed to create foobar.service/start: Unit foo2.service not found.
maanya-goenka@debian:~/systemd (log-error)$ echo $?
1

4 years agomanager: add a test flag to ignore dependencies
Maanya Goenka [Thu, 8 Jul 2021 01:28:20 +0000 (18:28 -0700)] 
manager: add a test flag to ignore dependencies

The MANAGER_TEST_RUN_IGNORE_DEPENDENCIES flag was added in order to allow the caller
to skip the recursive loading of dependency units when loading specific
unit files. This includes the default dependencies, the specified dependencies, the slice.
This will be used by systemd-analyze to allow checking individual unit files in isolation.

4 years agomanager: use FLAGS_SET when checking for MANAGER_TEST_RUN_MINIMAL
Maanya Goenka [Thu, 29 Jul 2021 20:01:08 +0000 (13:01 -0700)] 
manager: use FLAGS_SET when checking for MANAGER_TEST_RUN_MINIMAL

Allows multiple flags to be set, for example, in systemd-analyze.

4 years agosd-boot: Allow on/off and t/f for booleans too 20350/head
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Allow on/off and t/f for booleans too

4 years agosd-boot: Provide error messages when parsing a config option fails
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Provide error messages when parsing a config option fails

4 years agosd-boot: Rework console input handling
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Rework console input handling

Fixes: #15847
Probably fixes: #19191

4 years agoMerge pull request #20199 from ddstreet/unit_cgroup_catchup
Lennart Poettering [Thu, 12 Aug 2021 14:04:40 +0000 (16:04 +0200)] 
Merge pull request #20199 from ddstreet/unit_cgroup_catchup

cgroup: do 'catchup' for unit cgroup inotify watch files

4 years agosystemd-analyze: parse ip_filters_custom_egress correctly
Maanya Goenka [Tue, 10 Aug 2021 21:30:46 +0000 (14:30 -0700)] 
systemd-analyze: parse ip_filters_custom_egress correctly

Fixed bug in original assignment of security_info variable: ip_filters_custom_egress.

4 years agonetwork: fix configuring of CAN devices
Yu Watanabe [Thu, 12 Aug 2021 04:39:53 +0000 (13:39 +0900)] 
network: fix configuring of CAN devices

Fix a bug introduced by 7558f9e717381eef0ddc8ddfb5a754ea4b0f3e6c.

Fixes #20428.

4 years agosd-boot: Use StrSize where it makes sense
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Use StrSize where it makes sense

4 years agosd-boot: Assert all the things!
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Assert all the things!

4 years agosd-boot: Add assert implementation
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Add assert implementation

There is a ASSERT() macro from gnu-efi, but that does not show any
output to ConOut. Having to do some additional setup just to get
some debug output is tedious and outright difficult on real hardware.

4 years agosd-boot: Fix possible null pointer dereference
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Fix possible null pointer dereference

Auto entries are showing garbage for the version in print_status()
because StrDuplicate does not expect null pointers.

4 years agosd-boot: Don't use magic integer constants
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Don't use magic integer constants

4 years agosd-boot: Unify error handling
Jan Janssen [Wed, 11 Aug 2021 12:59:46 +0000 (14:59 +0200)] 
sd-boot: Unify error handling

log_error_stall() and log_error_status_stall() will ensure the user has
a chance to catch an error message by stalling and also forcing a
lightred/black color on it. Also, convert several Print() calls to it
since they are actually error messages.

4 years agoMerge pull request #20418 from yuwata/hostnamed-fix-20417
Lennart Poettering [Thu, 12 Aug 2021 07:34:21 +0000 (09:34 +0200)] 
Merge pull request #20418 from yuwata/hostnamed-fix-20417

hostname: fix off-by-one issue in gethostname()

4 years agotest-network: add a testcase for recreating stacked netdevs 20432/head
Yu Watanabe [Thu, 12 Aug 2021 05:45:40 +0000 (14:45 +0900)] 
test-network: add a testcase for recreating stacked netdevs

4 years agonetwork: recreate stacked netdevs when underlying device is re-added
Yu Watanabe [Thu, 12 Aug 2021 05:31:27 +0000 (14:31 +0900)] 
network: recreate stacked netdevs when underlying device is re-added

Closes #20430.

4 years agonetwork: adjust log messages, function names, etc.
Yu Watanabe [Thu, 12 Aug 2021 05:38:34 +0000 (14:38 +0900)] 
network: adjust log messages, function names, etc.

4 years agonetwork: use netdev_enter_failed() instead of netdev_drop() on error
Yu Watanabe [Thu, 12 Aug 2021 05:23:54 +0000 (14:23 +0900)] 
network: use netdev_enter_failed() instead of netdev_drop() on error

Preparation for later commits to support reconfiguring netdevs.

4 years agonetwork: introduce a helper function netdev_is_stacked_and_independent()
Yu Watanabe [Thu, 12 Aug 2021 05:10:45 +0000 (14:10 +0900)] 
network: introduce a helper function netdev_is_stacked_and_independent()

4 years agohostname: introduce gethostname_full() and use it in various gethostname() variants 20418/head
Yu Watanabe [Tue, 10 Aug 2021 18:44:24 +0000 (03:44 +0900)] 
hostname: introduce gethostname_full() and use it in various gethostname() variants

4 years agohostname: fix off-by-one issue in gethostname()
Yu Watanabe [Tue, 10 Aug 2021 15:12:40 +0000 (00:12 +0900)] 
hostname: fix off-by-one issue in gethostname()

gethostname() returns null-terminated hostname.

Fixes #20309 and #20417.

4 years agoMerge pull request #20423 from yuwata/dhcp-server-static-lease-outside-pool
Luca Boccassi [Wed, 11 Aug 2021 17:40:00 +0000 (18:40 +0100)] 
Merge pull request #20423 from yuwata/dhcp-server-static-lease-outside-pool

sd-dhcp-server: support static lease outside of pool

4 years agoshared/copy: add a new flag COPY_ALL_XATTRS
Andrej Lajovic [Sun, 8 Aug 2021 23:43:54 +0000 (01:43 +0200)] 
shared/copy: add a new flag COPY_ALL_XATTRS

When the flag COPY_ALL_XATTRS is set, it causes the complete set of xattrs
to be copied. If the flag is unset, only xattrs from the "user" namespace
are copied.

Fixes #17178.