1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

55523 Commits

Author SHA1 Message Date
Yu Watanabe
8cc8a073a8 test: add test cases for fstab-generator 2022-01-07 00:58:50 +09:00
Yu Watanabe
b322e683ac meson: install test-network-generator-conversion.sh even if networkd is not enabled
Follow-up for 987dd89c775815831ae21736fe60aef59cb7a6fa.
2022-01-06 20:14:39 +09:00
Yu Watanabe
155e1bb4e7 fstab-generator: also skip other network filesystems and live image 2022-01-06 20:14:35 +09:00
Yu Watanabe
77b8e92de8 fstab-generator: skip root directory handling when nfsroot is requested
Fixes RHBZ#2037233 (https://bugzilla.redhat.com/show_bug.cgi?id=2037233).
2022-01-06 20:14:16 +09:00
Michael Biebl
cfd4c84add oomd: move oomctl to bindir
We don't really need oomctl during early boot, so bindir seems like a
more suitable place for the binary.
2022-01-06 12:52:01 +09:00
Mike Gilbert
70652c2a6f test-watchdog: mark as unsafe
If something goes wrong with this test it may result in an unsafe
system restart. Let's avoid running it automatically.

See https://github.com/systemd/systemd/issues/22001.
2022-01-06 02:11:20 +09:00
Jason A. Donenfeld
06511ba559 random-seed: cleanup code nits
This incorporates various nits from the post-merge review on #21986.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-01-06 02:09:22 +09:00
Yu Watanabe
9cca5f4cda
Merge pull request #22018 from keszybz/logind-survive-aborted-suspend
Make logind survive aborted suspend
2022-01-06 02:08:14 +09:00
Yu Watanabe
4c77ed48fb
Merge pull request #22016 from yuwata/small-cleanups
assorted trivial cleanups
2022-01-06 01:18:34 +09:00
Frantisek Sumsal
1b51599f29 test: use full date & time when checking for coredumps
Otherwise we might hit a window where the coredump happens before
midnight, but we check for it after midnight, which yields no results.

E.g.:

```
$ coredumpctl --no-legend --no-pager --file system.journal
Wed 2022-01-05 01:00:06 CET 359 0 0 SIGABRT journal /usr/bin/udevadm n/a
$ coredumpctl --since 23:59:55 --no-legend --no-pager --file system.journal
No coredumps found.
$ coredumpctl --since "2022-01-04 23:59:59" --no-legend --no-pager --file system.journal
Wed 2022-01-05 01:00:06 CET 359 0 0 SIGABRT journal /usr/bin/udevadm n/a
```
2022-01-06 01:18:12 +09:00
Yu Watanabe
a68f95a5dc
Merge pull request #22012 from DaanDeMeyer/journal-full-message
journal: Log a better message when we're rotating because a file is full
2022-01-06 01:17:31 +09:00
Yu Watanabe
defb4dd429
Merge pull request #22014 from keszybz/networkd-reduce-append-logging
Drop detailed error messages for netlink message append operations
2022-01-06 01:17:09 +09:00
Zbigniew Jędrzejewski-Szmek
8207b8321b logind: do not propagate error in delayed action
If the action failed, we should log about the issue, and continue.
Exiting would bring the graphical session down, which of course is not
appreciated by users.

As documented in previous commits, a non-negative return from the callback
doesn't matter, so the callback is simplified a bit.

Fixes #21991.
2022-01-05 15:19:13 +01:00
Zbigniew Jędrzejewski-Szmek
5ca99dfabd man: add example of sd_event_add_child()
The thing with blocking SIGCHLD is rather annoying. I think we could/should
make this automatic.
2022-01-05 15:19:13 +01:00
Zbigniew Jędrzejewski-Szmek
9809a788e4 man: add better descriptions of what event handlers do
The meaning of the return value, the default handlers, and loop exiting are now
described.
2022-01-05 15:19:13 +01:00
Yu Watanabe
f0f6508783 backlight: ignore error if the backlight device is already removed
Fixes #21997.
2022-01-05 12:56:37 +00:00
Frantisek Sumsal
c01b58e454
Merge pull request #21974 from yuwata/test-repart-find-sfdisk
test-repart: find sfdisk
2022-01-05 12:40:11 +00:00
Zbigniew Jędrzejewski-Szmek
a8d50a3575
Merge pull request #21981 from medhefgo/boot-cleanup
boot: Cleanup
2022-01-05 12:55:59 +01:00
Daan De Meyer
5b4a634a03 journal: Log filename when we fail to write an entry 2022-01-05 11:17:47 +00:00
Daan De Meyer
eff79e4e22 journal: Log a better message when we're rotating because a file is full
The previous message was confusing errors. When we're rotating because
we've reached the file size limit, let's log a better message.

Fixes #22007.
2022-01-05 11:17:44 +00:00
Yu Watanabe
e37d30f334 sd-boot: select newest kernel entry matching with the default glob pattern
This fixes a bug introduced by 0c674ce5f24a6e52561ec6520e43a1ca45d90f01.

Fixes #22004.
2022-01-05 12:15:24 +01:00
Yu Watanabe
769020c092 watchdog: adjust comment 2022-01-05 20:13:59 +09:00
Yu Watanabe
e28df39269 resolve: add missing initialization of libgcrypt
Fixes #21951.
2022-01-05 12:12:54 +01:00
Evgeny Vereshchagin
85ed912479 oss-fuzz: drop line-tables-only
It was copy-pasted directly from OSS-Fuzz where it makes sense to
kind of strip binaries to get nice backtraces but when the fuzzers
are built and run locally with gdb it would be nice to have a little
bit more than that.

It was initially discovered in elfutils where I put the same flags
and was surprised when I couldn't run the fuzzer comfortably step
by step, which led to the same change there: https://github.com/google/oss-fuzz/pull/7092
:-)
2022-01-05 12:04:27 +01:00
Zbigniew Jędrzejewski-Szmek
4a55ce8f83 tests: log_tests_skipped() already appends ", skipping tests"
We would say:
test-bpf-lsm: Can't use mlock(), skipping., skipping tests.
2022-01-05 11:59:22 +01:00
Zbigniew Jędrzejewski-Szmek
3bcb5dc1a5 network: move logging from route_set_netlink_message() to the callers
Overall size change for the whole series:
$ size build/systemd-networkd{.0,}
   text	   data	    bss	    dec	    hex	filename
1878634	 394016	     36	2272686	 22adae	build/systemd-networkd.0
1755066	 394080	     36	2149182	 20cb3e	build/systemd-networkd

i.e. 121 kb.
2022-01-05 11:58:13 +01:00
Zbigniew Jędrzejewski-Szmek
7bd36e490f network: move logging from routing_policy_rule_set_netlink_message() to the callers 2022-01-05 11:45:16 +01:00
Zbigniew Jędrzejewski-Szmek
907e277fdd network: move logging from qdisc_configure()/tclass_configure() to the caller 2022-01-05 11:45:16 +01:00
Zbigniew Jędrzejewski-Szmek
bd187da8c4 network: simplify logging in request_process_bridge_fdb() 2022-01-05 11:45:16 +01:00
Zbigniew Jędrzejewski-Szmek
16924f54af network: move logging from tc .fill_message to the callers
Structured initialization is used a bit more.

There were two kinds of log messages: about failed size calculations and
about failed appends to the message. I "downgraded" the first type to log_debug,
and moved the latter to the caller. This way there should be at most one high-priority
message.

I also changed sizeof(<type>) to sizeof(var) — there is less chance of select-and-paste
error in the second form.
2022-01-05 11:45:16 +01:00
Zbigniew Jędrzejewski-Szmek
0d75a90bb6 network: split out neighbor_configure_message(), simplify logging 2022-01-05 11:45:16 +01:00
Zbigniew Jędrzejewski-Szmek
f2b78e0e91 network: split out dhcp4_pd_create_6rd_tunnel_message(), simplify logging 2022-01-05 11:45:16 +01:00
Zbigniew Jędrzejewski-Szmek
51762897c6 network: adjust log message about MACsec associations 2022-01-05 11:45:11 +01:00
Zbigniew Jędrzejewski-Szmek
9e369704a8 network: simplify logging in macsec netdev code 2022-01-05 11:43:36 +01:00
Zbigniew Jędrzejewski-Szmek
b471fc9456 network: simplify logging in l2tp_create_session() and l2tp_create_tunnel()
All the detailed logging is replaced by a simple "Failed to create netlink message",
which should be enough for the user in the unlikely case that this ever fails.
2022-01-05 11:43:36 +01:00
Zbigniew Jędrzejewski-Szmek
bb2f88ff7b network: split out link_configure_fill_message(), simplify logging 2022-01-05 11:43:36 +01:00
Zbigniew Jędrzejewski-Szmek
9a93dabc40 network: move logging from can_set_netlink_message() to the caller 2022-01-05 11:43:36 +01:00
Zbigniew Jędrzejewski-Szmek
2a3cca04c4 network: de-duplicate logging in bridge_vlan_append_info() and the caller
The remaining message is changed, because the user would most likely not
understand that "append VLANs" is just talking about the netlink message.
2022-01-05 11:43:36 +01:00
Zbigniew Jędrzejewski-Szmek
eff692502b network: move logging from ipoib_set_netlink_message() to the caller 2022-01-05 11:43:28 +01:00
Yu Watanabe
838440315c coredump: drop unnecessary initialization 2022-01-05 19:41:42 +09:00
Zbigniew Jędrzejewski-Szmek
2f64865b0e network: split out netdev_fill_fou_tunnel_message(), simplify logging 2022-01-05 11:41:29 +01:00
Zbigniew Jędrzejewski-Szmek
0c50cb50bd network: split out netdev_create_message(), simplify logging 2022-01-05 11:41:29 +01:00
Zbigniew Jędrzejewski-Szmek
81f01be0b8 network: replace more detailed netlink append messages
Some refactoring was needed here to avoid duplicate messages.
Some select-and-paste errors were fixed on the way.

systemd-networkd is thinner by 8k.
2022-01-05 11:41:29 +01:00
Zbigniew Jędrzejewski-Szmek
d15cba9647 network: use SYNTHETIC_ERRNO in one more place 2022-01-05 11:41:29 +01:00
Zbigniew Jędrzejewski-Szmek
5b80ecea55 network: replace detailed netlink append messages with a single generic message
This commit is the first in the series, and they generally follow the same
idea: we had very detailed logging for message append operations which would
only fail either with some type error or intrinsic limit (and then they would
fail everywhere, so this would be noticed during development or in CI), or they
would fail with ENOMEM, in which case the exact location is not very interesting
since this is not repeatable.

I am in general in favour of detailed logging messages, because it helps with
diagnosis of errors, but I think case is an exception. Despite not being very
useful, those messages required a lot of effort, because they were customized
for each and every append operation. In fact some of the messages contained copy
errors. The text of the messages (since they are generally unique) also added up
to a considerable size.

This removes the log messages after each sd_netlink_message_append_*() in
fill_message_create() with a single line in netdev_create(). As described
above, we are just appending fields to a message, so those calls would almost
never fail.

A forgotten 'return' was added in one place.

$ size build/systemd-networkd{.0,}
   text	   data	    bss	    dec	    hex	filename
1878634	 394016	     36	2272686	 22adae	build/systemd-networkd.0
1842450	 394080	     36	2236566	 222096	build/systemd-networkd

… so we save 30k too.
2022-01-05 11:36:04 +01:00
Yu Watanabe
329a5b91d9 test-repart: append /sbin and /usr/sbin to $PATH= to make sfdisk can be found
Fixes #21972.
2022-01-05 09:31:28 +09:00
Yu Watanabe
31cf58864d test-repart: disable pager 2022-01-05 09:29:50 +09:00
Jason A. Donenfeld
da2862ef06 random-seed: hash together old seed and new seed before writing out file
If we're consuming an on-disk seed, we usually write out a new one after
consuming it. In that case, we might be at early boot and the randomness
could be rather poor, and the kernel doesn't guarantee that it'll use
the new randomness right away for us. In order to prevent the new
entropy from getting any worse, hash together the old seed and the new
seed, and replace the final bytes of the new seed with the hash output.
This way, entropy strictly increases and never regresses.

Fixes: https://github.com/systemd/systemd/issues/21983
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-01-04 22:47:56 +00:00
Jan Janssen
948d085e89 boot: Add gdb support and documentation
This will finally allow debugging issues in systemd without resorting to
Print() calls all over the place.
2022-01-04 17:23:01 +01:00
Luca Boccassi
ff97eb4aac
Merge pull request #21977 from systemd/wip/hadess/minipro-uaccess
hwdb: Allow end-users root-less access to TL866 EPROM readers
2022-01-04 15:51:28 +00:00