Commit graph

57079 commits

Author SHA1 Message Date
Lennart Poettering 9e83d3e45f update TODO 2022-03-31 14:39:55 +02:00
Martin Liska 0bd292567a Support -D_FORTIFY_SOURCE=3 by using __builtin_dynamic_object_size.
As explained in the issue, -D_FORTIFY_SOURCE=3 requires usage
of __builtin_dynamic_object_size in MALLOC_SIZEOF_SAFE macro.

Fixes: #22801
2022-03-31 21:13:34 +09:00
Franck Bui f887eab1da meson: build kernel-install man page when necessary 2022-03-31 21:12:05 +09:00
Sebastian Pucilowski f81ac115dc Fix "link-local" language inconsistencies
"Link-local" and "link local" are used throughout man pages and program
output, with the former used far more than the latter. This commit makes
it consistent throughout the project.
2022-03-31 12:08:29 +02:00
Yu Watanabe b2e7ded16b
Merge pull request #22899 from yuwata/network-ignore-carrier-loss
network: automatically determine timeout of waiting for carrier regain
2022-03-31 11:40:30 +09:00
Yu Watanabe da94a69b8d network: shorten code a bit
Currently, there exist only two MTU sources, static and DHCPv4, and they
are exclusive. Hence, it is not necessary to check the existence of the
MTU option in the acquired DHCP lease. Let's unconditionally reset the
MTU. Note that, if the current and original MTU are equivalent, then
link_request_to_set_mtu() handles that gracefully.
2022-03-31 09:29:42 +09:00
Yu Watanabe b732606950 network: automatically determine timeout of waiting for carrier regain
The commit 6706ce2fd2 made
IgnoreCarrierLoss= setting also take timespan, to make users handle
issues like #18738 or #20887. But still users needed to explicitly set
a timespan.

This makes networkd automatically determine the timeout when the
situations #18738 or #19832 is detected. Unfortunately, still users have
issue #20887 need to specify a value.

Closes #19832.
2022-03-31 09:29:42 +09:00
Yu Watanabe a14b9ca2c3
Merge pull request #22913 from yuwata/sd-device-cleanups
sd-device,udev: several cleanups
2022-03-31 09:24:38 +09:00
Zbigniew Jędrzejewski-Szmek 2fe8749de7 veritysetup: fix parsing of root-hash-signature= option
The function was named confusingly and we managed to confused ourselves. The
parameter was assigned incorrectly and then reassigned correctly in the caller.
Let's simplify the whole thing by just saving the optarg param.

I considered moving the unhexmemming and/or reading of the file to the parse
function, but decided against it. I think it's nicer to parse all options
before opening external files.
2022-03-30 23:32:11 +01:00
Yu Watanabe 03a24ce76b udev: rename functions to emphasize whole disk is locked 2022-03-31 07:25:24 +09:00
Yu Watanabe 20ba5a3fe7 udev: ignore one more error in device_get_block_device() 2022-03-31 07:25:24 +09:00
Yu Watanabe df88f02bb1 sd-device: do not ignore critical errors in device_new_from_child() 2022-03-31 07:25:24 +09:00
Yu Watanabe 07c90f02d2 sd-device: use path_extract_directory() at one more place 2022-03-31 07:25:24 +09:00
Yu Watanabe becbcca5b8 sd-device: try to get DISKSEQ from uevent file
Otherwise, if the sd-device object is created from e.g. syspath, then
sd_device_get_diskseq() returns -ENOENT.
2022-03-31 07:25:24 +09:00
Yu Watanabe a43129b0a0 sd-device: drop /sys/subsystem support
Follow-ups for 37cf83d9bf.
2022-03-31 07:25:24 +09:00
Gaël PORTAY e502940be2 man: update root-hash-signature option with value
This documents two possible values expected by the option
root-hash-signature for veritytab and veritysetup-generator.
2022-03-30 23:45:26 +02:00
Yu Watanabe 72151060e8 udev: do not use sd_event_source_disable_unref() at more places
Fixes a bug introduced by 9612da361a.

Follow-up for f777e745a7.
2022-03-31 05:08:23 +09:00
Yu Watanabe fb54461717 udev: do not append unknown errno or signal name
Follow-up for 6467bda59d.

Addresses https://github.com/systemd/systemd/pull/22871#discussion_r837705779.
2022-03-30 17:22:11 +02:00
Lennart Poettering d360eafb36 update TODO 2022-03-30 16:13:41 +02:00
Frantisek Sumsal 5efefcdcff ci: drop clang 11 & add clang 14 2022-03-30 21:11:57 +09:00
Yu Watanabe 8b7378e145 fix typo 2022-03-30 21:10:06 +09:00
Luca Boccassi 8c70e8024b NEWS: specify that public headers are still C89 2022-03-29 21:54:01 +01:00
Luca Boccassi 7503fbd4a6 NEWS: mention that C11 is now used 2022-03-29 21:52:21 +01:00
Zbigniew Jędrzejewski-Szmek 0f6f9dc6cf NEWS: add entry for the unit enablement stuff
It should be merged soon.
2022-03-29 22:39:32 +02:00
Zbigniew Jędrzejewski-Szmek c3a053c241 test-systemctl-enable: skip test for %v if kver is not a valid instance
On arm, we'd fail with:
target@v:5.16.8-200.fc35.armv7hl+lpae.socket: not a valid unit name "target@v:5.16.8-200.fc35.armv7hl+lpae.socket": Invalid argument
2022-03-29 22:39:32 +02:00
наб d66b77b4d8 test-copy: use non-0 data block in copy_holes
Some filesystems (e.g. zfs with compression!=off, which is the default
configuration) automatically hole-punch all-zero blocks ‒ write a block
full of ones instead
2022-03-29 21:10:43 +02:00
Zbigniew Jędrzejewski-Szmek 53877d0385
Merge pull request #22649 from keszybz/symlink-enablement-yet-again-punish-me-harder
Fixups to the unit enablement logic
2022-03-29 21:10:03 +02:00
Zbigniew Jędrzejewski-Szmek f8e07c5cb6
Merge pull request #22871 from yuwata/udev-worker-error-code
udev: append error code on failure
2022-03-29 21:08:44 +02:00
Zbigniew Jędrzejewski-Szmek a6ea4dc13e meson: bump numbers for v251-rc1 2022-03-29 19:46:47 +02:00
Zbigniew Jędrzejewski-Szmek 7384940857 NEWS: update contributor list 2022-03-29 19:45:11 +02:00
Zbigniew Jędrzejewski-Szmek e0a5fc7267 tools/git-contrib: list contributions not only from Weblate
It seems that --invert-grep used to affect --author, but now it doesn't (with
git-2.35.1-1.fc36.x86_64), so effectively we would only show the one entry that
was supposed to be filtered out.
2022-03-29 19:42:01 +02:00
Zbigniew Jędrzejewski-Szmek 942473dcc3 NEWS: two more small features and some rewordings 2022-03-29 19:36:29 +02:00
наб 0017be9d77 Fix typos in user-util.c and dbus-unit.c 2022-03-29 17:58:37 +01:00
Yu Watanabe 10176f0011 test: add tests for worker error code 2022-03-30 01:27:29 +09:00
Yu Watanabe 6467bda59d udev: append error code in broadcasted message
So, libudev listners can easily detect errors.

Addresses https://github.com/systemd/systemd/pull/22717#discussion_r834420878.
2022-03-30 01:27:29 +09:00
Yu Watanabe 71978a79fd sd-device: introduce device_add_propertyf() 2022-03-30 01:27:29 +09:00
Luca Boccassi b586cbdefc NEWS: mention kernel requirement change 3.13 -> 3.15 2022-03-29 17:22:30 +01:00
Zbigniew Jędrzejewski-Szmek 47c6454d76
Merge pull request #22894 from keszybz/hwdb-update
Update hwdb again
2022-03-29 18:17:32 +02:00
Zbigniew Jędrzejewski-Szmek f1589efb7f hwdb: update autosuspend entries 2022-03-29 18:15:06 +02:00
Zbigniew Jędrzejewski-Szmek c53e6f641e hwdb: update for v251
As usual, there are mostly additions of new entries, and some spelling
correction and company renames, no big removals.
2022-03-29 18:15:06 +02:00
Zbigniew Jędrzejewski-Szmek f73d689587 hwdb: fix parser to work with newer pyparsing
The handling of whitespace in pyparsing is a bother. There's some
global state, and per-element state, and it's hard to get a handle on
things. With python3-pyparsing-2.4.7-10.fc36.noarch the grammar would
not match. After handling of tabs was fixed to not accept duplicate tabs,
the grammar passes.

It seems that the entry for usb:v8087p8087*
was generated incorrectly because we treated the interface line
(with two TABs) as a device line (with one TAB).
2022-03-29 18:15:05 +02:00
Zbigniew Jędrzejewski-Szmek 88a65c936e cryptsetup: shorten message a bit
If it is reported as missing, we don't need to say that we assume
it is missing.
2022-03-29 18:14:51 +02:00
Zbigniew Jędrzejewski-Szmek b64f6d841d
Merge pull request #22843 from poettering/bootspec-json
bootctl: bootspec improvements and clean-ups
2022-03-29 18:11:32 +02:00
Zbigniew Jędrzejewski-Szmek b380b64383 Rename UnitFileScope to LookupScope
As suggested in
8b3ad3983f (r837345892)

The define is generalized and moved to path-lookup.h, where it seems to fit
better. This allows a recursive include to be removed and in general makes
things simpler.
2022-03-29 16:17:57 +02:00
Zbigniew Jędrzejewski-Szmek 5c29de29b4 test-systemctl-enable: disable the test for %a for now 2022-03-29 16:17:57 +02:00
Zbigniew Jędrzejewski-Szmek 2a2d002fb0 test-systemctl-enable: also use freshly-built systemd-id128
Tests were failing on centos7 because systemd-id128 is not in path.
2022-03-29 16:17:57 +02:00
Zbigniew Jędrzejewski-Szmek d6c51c485a test-systemctl-enable: use magic syntax to allow inverted tests
Inspired by 7910ec3bcd.
'! true' passes, because it's a conditional expression.
But '( ! true )' fails, because '( … )' creates a subshell, i.e. a separate
program, and '! true' becomes the return value of that program, and the whole
thing apparently is not a conditional expression for the outer shell.

This is shorter, so let's just do this.
2022-03-29 16:17:57 +02:00
Zbigniew Jędrzejewski-Szmek 3fc53351dc shared/install: when creating symlinks, accept different but equivalent symlinks
We would only accept "identical" links, but having e.g. a symlink
/usr/lib/systemd/system/foo-alias.service → /usr/lib/systemd/system/foo.service
when we're trying to create /usr/lib/systemd/system/foo-alias.service →
./foo.service is OK. This fixes an issue found in ubuntuautopkg package
installation, where we'd fail when enabling systemd-resolved.service, because
the existing alias was absolute, and (with the recent patches) we were trying
to create a relative one.

A test is added.
(For .wants/.requires symlinks we were already doing OK. A test is also
added, to verify.)
2022-03-29 16:17:57 +02:00
Zbigniew Jędrzejewski-Szmek 84fdced62c test-systemctl-enable: make shellcheck happy
Quoting is not necessary in many places, but I think it's nicer
to use it consistently.
2022-03-29 16:17:57 +02:00
Zbigniew Jędrzejewski-Szmek 48eadb9d9b shared/install: fix handling of a linked unit file
When we have a symlink that goes outside of our search path, we should just
ignore the target file name. But we were verifying it, and rejecting in
the case where a symlink was created manually.
2022-03-29 16:17:57 +02:00