Commit Graph
34349 Commits
Author SHA1 Message Date
Susant Sahani 03d2d9e18f network: fdb - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani c75165cade network: dhcp6 - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani fb8ac4cf3e network: address label - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani b77071b898 network: wireguard - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani c26f9a9d8c network: netdev - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani c6194e8825 generator: Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani 1346c36d5a basic: introuce hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani 65ca9b5343 homed: use ordered_set_ensure_put 2021-01-15 14:29:42 +01:00
Zbigniew Jędrzejewski-Szmek 3b41c4dfbc Merge pull request #18244 from anitazha/systemctledit
systemctl-edit fixes
2021-01-15 11:07:02 +01:00
Zbigniew Jędrzejewski-Szmek 5b935a388c basic/env-util: modernization 2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek d2b99ed7c5 nspawn: minor modernization 2021-01-15 10:33:29 +01:00
Lennart Poettering f1c86dd9ab Merge pull request #18124 from ryncsn/initrd
initrd: add an env variable to accept non-ramfs rootfs
2021-01-15 09:58:17 +01:00
Lucas Werkmeister 8d7dab1fda Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and
StandardError=, similar to the existing append:PATH. The code is mostly
copied from the related append: code. Fixes #8983.
2021-01-15 09:54:50 +01:00
Gaël PORTAY 0141102f10 veritysetup-generator: add support for verity root options
This adds support for a new kernel root verity command line option
"verity_root_options=" which controls the behaviour of dm-verity by
forwarding options directly to systemd-veritysetup.

See `veritysetup(8)` for more details.
2021-01-14 19:41:41 -05:00
Gaël PORTAY cb0198a13c veritysetup: add support for dm-verity options
This patch allows controlling the behaviour of dm-verity by reusing the
fifth argument that was used to set the roothash signature.

That argument is now a comma-separated list of dm-verity options in the
given format: option[=value]. The option is the name of the long option
in the world of veritysetup.

See `veritysetup(8)` for more details.

Note: The former ROOTHASHSIG the positional argument is now deprecated
in favour of the option root-hash-signature=(base64:SIG|FILE). However,
the previous format is maintained and a warning is logged.
2021-01-14 19:23:37 -05:00
Anita Zhang e4d22a9f32 systemctl-edit: Add missing ret_dropin_paths argument in retry path
find_paths_to_edit() makes 2 calls to unit_find_paths(), one of which is
a retry client-side. ret_dropin_paths should be passed the same in
both cases.
2021-01-14 15:05:30 -08:00
Anita Zhang 98199724cb systemctl-edit: fix abort in find_paths_to_edit()
After 85c5d313b5, if you, for example,
create a drop-in for -.slice without a corresponding -.slice file, you will
get the following:

  # put some valid stuff in /etc/systemd/system/-.slice.d/override.conf

  [root@image ~]# systemctl daemon-reload
  [root@image ~]# systemctl edit -- -.slice
  Assertion 'path' failed at src/systemctl/systemctl-edit.c:425, function
  find_paths_to_edit(). Aborting.
  Aborted

The aforementioned commit sets the ret_dropin_paths argument for
unit_find_paths(). Thus, unit_find_paths() returns 1 in the example above
because it finds a relevant drop-in. However find_paths_to_edit() was written
to expect 1 only if the unit file itself exists (it does not in this example).

To make this behave more like the version of `systemctl edit` prior to
this commit, add an additional check so the code enters the
"unit file not found" code branch.
2021-01-14 15:05:27 -08:00
Lennart Poettering b420e6f0ce systemctl: unit_file_find_fragment() doesn't log about errors, hence do it in the caller 2021-01-14 15:03:57 +01:00
Lennart Poettering 1842c1b2ab systemctl: explicitly comment two cases where we don't log on error cases, on purpose 2021-01-14 15:02:27 +01:00
Lennart Poettering d5427dd297 systemctl: properly initialize return params in all success cases 2021-01-14 15:01:55 +01:00
Lennart Poettering 98fac96c10 unit-file: downgrade log message to debug
In the other error paths unit_file_find_fragment() doesn't log beyond
debug level, i.e. is of the non-logging library-like kind. Make sure
this error path is handled the same, so that the caller can log.
2021-01-14 15:00:48 +01:00
Lennart Poettering f60671860e unit-file: fix indentation 2021-01-14 15:00:29 +01:00
Kairui Song b562b9c68c initrd: do a debug log if /etc/initrd-release doesn't take effect
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-14 21:51:12 +08:00
Susant Sahani 7e27a7458c sd-netlink: mcvlan - add new attributes 2021-01-14 14:01:58 +01:00
Susant Sahani c9b31b1750 sd-netlink: Supprt netlink types bitfield and reject 2021-01-14 14:01:56 +01:00
Susant Sahani 60e49cf9e1 basic: Add macvlan netlink attributes 2021-01-14 14:01:38 +01:00
Luca Boccassi c17b2155e5 Merge pull request #18226 from mrc0mmand/actions-flake-workarounds
ci: assorted workarounds for recent flakes
2021-01-14 10:00:24 +00:00
Josh Triplett 225d08b879 Add install-sysconfdir=no-samples option for (non-)installation of sample configs
By default, systemd installs various sample configuration files
containing commented-out defaults. Systems seeking to minimize the
number of files in /etc may wish to install directories and
configuration files that have semantic effects, but not install not
commented-out sample configuration files.

Turn install-sysconfdir into a multi-valued option, with a "no-samples"
value to skip installing sample-only configuration files.
2021-01-14 15:22:06 +09:00
Frantisek Sumsal f1a8fed286 ci: skip test-execute on GH Actions under ASan
It seems to suffer from the same issue as on Travis CI, where the test
randomly fails due to timeouts in its subtests.

See: https://github.com/systemd/systemd/issues/10696#issuecomment-758501797
2021-01-13 21:59:48 +01:00
Yu Watanabe 983cbd91a8 udev: add missing short option name
Follow-up for 4fcc033b54.

Fixes CID#1442307.
2021-01-13 21:53:13 +01:00
Lennart Poettering ce0079d75e Merge pull request #18227 from yuwata/network-dhcp6-pd-manage-temporary-address
network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
2021-01-13 21:52:44 +01:00
Kairui Song 3b9b916968 initrd: do a debug log if failed to detect rootfs type 2021-01-14 01:24:56 +08:00
Kairui Song 1f22621ba3 initrd: extend SYSTEMD_IN_INITRD to accept non-ramfs rootfs
Sometimes, non-ramfs initrd root are useful. Eg, for kdump, because
initramfs is memory consuming, so mount a compressed image in earlier
initrd, chroot into it then let systemd do the rest of job is a good
solution.

But systemd doesn't recognize the initrd environment if rootfs is not a
temporary fs. This is a reasonable check, because switch-root in initrd
will wipe the whole rootfs, will be a disaster if there are any
misdetect.

So extend SYSTEMD_IN_INITRD environment variable, now it accepts boolean
value and two extra keyword, "auto" and "lenient". "auto" is same as
before, and it's the default value. "lenient" will let systemd bypass
the rootfs check.
2021-01-14 01:19:09 +08:00
Yu Watanabe 414cbc3c73 Merge pull request #9864 from ximion/master
localed: Run locale-gen if available to generate missing locale
2021-01-14 00:20:04 +09:00
Yu Watanabe cb2ae9f8b9 Merge pull request #18170 from OnkelUlla/udev_introduce_TxQueueLen=_setting
udev: introduce TxQueueLength= setting
2021-01-14 00:19:29 +09:00
Yu Watanabe fec1b650ad network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
The setting is enabled by default, as NDisc also enabled the flag by
default.

Closes #18208.
2021-01-14 00:17:05 +09:00
Yu Watanabe 8b76ee89d7 network: drop a function argument which is always constant 2021-01-14 00:16:10 +09:00
Felix Stupp 4327574fc1 Added option --check-inhibitors for non-tty usage
As described in #2680, systemctl did ignore inhibitors if it is not
attached to a tty to allow scripts to ignore inhibitors automatically.
This pull request preserves this behavior but allows scripts to
explicit check inhibitors if required.

The new parameter '--check-inhibitors=yes' enables this feature.
The old parameter '-i'/'--ignore-inhibitors' was deprecated in favor
of '--check-inhibitors=no', the default behaviour can be specified
with '--check-inhibitors=auto'.
The new parameter is also described in the documentations and shell
completions found here.
2021-01-13 16:07:36 +01:00
Yu Watanabe 65ab27211c Merge pull request #18225 from poettering/tmpfiles-argument
tmpfiles: fix documentation about quoting the "argument" field in tmpfiles.d snippets
2021-01-13 15:57:42 +09:00
Ulrich Ölmann ef4a91a7e8 udev: introduce TxQueueLength= setting
Enable udev to set the transmit queue length of a device via a new directive to
be used in link files. The kernel stores this parameter as an unsigned 32 bit
integer. As typical values currently range in the order of 10 to a few 10,000
packets reduce the domain of valid values for this directive to 0..4294967294
and take the excluded 4294967295 == UINT32_MAX to indicate that the directive
is unset.
2021-01-13 06:41:06 +01:00
Ulrich Ölmann 42e15a6f1a link-config: amend log message for failed application of settings
This has been forgotten in pull request #17628 ("udev: Add support to
configure Generic Segment Offload"), see [1].

[1] https://github.com/systemd/systemd/pull/17628
2021-01-13 06:26:28 +01:00
Matthias Klumpp 8f20232fcb localed: Run locale-gen if available to generate missing locale
This change improves integration with distributions using locale-gen to
generate missing locale on-demand, like Debian-based distributions
(Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux.
We only ever enable new locales for generation, and never disable them.
Furthermore, we only generate UTF-8 locale.

This feature is only used if explicitly enabled at compile-time, and
will also be inert at runtime if the locale-gen binary is missing.
2021-01-12 23:15:12 +01:00
Matthias Klumpp bd47b0dac4 Add helper for case-independent string equality checks 2021-01-12 22:53:53 +01:00
Yu Watanabe 537ae584c8 network: reconfigure interface when wifi iftype is updated
Follow-up for a66a402da4.

Fixes #18059.
2021-01-13 06:42:02 +09:00
Lennart Poettering c33e405f20 import: mangle untarred OS images after pull-tar, too
We do this for import-tar and import-fs, we should do it for pull-tar,
too.

Fixes: #17563
2021-01-12 22:03:38 +01:00
Lennart Poettering 3f532a5930 tmpfiles: add ANSI highlighting to our help text
As it is common now in our tools.
2021-01-12 22:00:35 +01:00
Lennart Poettering fa67d9c0d6 extract-word: don't rely on C's downgrade-to-bool feature for chars
The `quote` char variable ectually contains a character, not a pointer
or boolean. hence do an explicit comparison rather than rely on C's
downgrade to bool feature, as per our coding style.
2021-01-12 22:00:35 +01:00
Yu Watanabe 09db85080a Merge pull request #18216 from yuwata/dhcp-user-class-length
dhcp: length of each user class field must be positive
2021-01-13 05:43:10 +09:00
Yu Watanabe 048be097d2 Merge pull request #18157 from ssahani/vlan-qos
network: Allow to configure VLan egress qos maps
2021-01-13 05:42:53 +09:00
Yu Watanabe 7c5869530c Merge pull request #17628 from ssahani/network-gso
udev: Add support to configure Generic Segment Offload
2021-01-13 05:42:23 +09:00