Commit Graph
63255 Commits
Author SHA1 Message Date
Yu Watanabe 458e8d6dd0 test-systemd-tmpfiles.py: create global temporary directory
For some unknown reasons, the temporary directory created by the test
below is not removed:
```
 # Test the case that a valid symlink is in the path.
 label = 'valid_symlink-deep'
 test_content('f= {} - - - - ' + label, label, user=user, subpath='/deep/1/2', path_cb=valid_symlink)
```
To keep /tmp clean, let's create the global temprary directory.
2023-03-18 22:27:41 +09:00
Yu Watanabe 015ddd4bf0 test-systemd-tmpfiles.py: use test_content() at one more place 2023-03-18 22:27:41 +09:00
Yu Watanabe 056ff0b455 tmpfiles: show file type in octal, instead of hex 2023-03-18 22:27:41 +09:00
Yu Watanabe f5c0edd166 man: explicitly list three command syntax at the beginning 2023-03-18 20:22:08 +08:00
Yu Watanabe 0bc2bcf4fe Merge pull request #26759 from medhefgo/boot-stack-protector
boot: Add support for stack protector/trapping math/ubsan
2023-03-18 15:07:45 +09:00
Daan De Meyer cafd2c0be4 units: Order user@.service after systemd-oomd.service
The user manager connects to oomd over varlink. Currently, during
shutdown, if oomd is stopped before any user manager, the user
manager will try to reconnect to the socket, leading to a warning
from pid 1 about a conflicting transaction.

Let's fix this by ordering user@.service after systemd-oomd.service,
so that user sessions are stopped before systemd-oomd is stopped,
which makes sure that the user sessions won't try to start oomd via
its socket after systemd-oomd is stopped.
2023-03-18 15:05:43 +09:00
Yu Watanabe a9938fb3cb Merge pull request #26862 from yuwata/uki-util
uki-util: export functions of inspecting kernel
2023-03-18 15:04:54 +09:00
Yu Watanabe aa5ef80130 Merge pull request #26861 from yuwata/exec-util
exec-util: introduce execute_strv() and EXEC_DIR_SKIP_REMAINING
2023-03-18 15:04:16 +09:00
Yu Watanabe 1f3792bfca Merge pull request #26855 from DaanDeMeyer/repart-fixes
Repart fixes
2023-03-18 15:03:38 +09:00
Mike Yuan 6c2caf5053 Merge pull request #26863 from yuwata/kernel-install-cleanups
kernel-install: cleanups
2023-03-18 02:28:50 +08:00
Mike Yuan f05b4bb9a7 sleep: fix default values unmatched with manual 2023-03-18 02:28:22 +08:00
Mike Yuan 212272f32b Merge pull request #26871 from weblate/weblate-systemd-master
Translations update from Fedora Weblate
2023-03-18 02:22:54 +08:00
Velislav Ivanov bc268740d2 po: Translated using Weblate (Bulgarian)
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Velislav Ivanov <velislav.bg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/bg/
Translation: systemd/main
2023-03-17 16:20:30 +01:00
Yu Watanabe b0e339547f kernel-install: check all entry candidates first, then check existence of $pref/loader/entries only once
If we have multiple entries in $ENTRY_TOKEN_SEARCH, and $pref/loader/entries
exists, then previously we would always exit after the first candidate and
ignore the second and later candidates.

Follow-up for 1b43f86893.
2023-03-17 20:41:17 +09:00
Yu Watanabe 561d801370 Revert "kernel-install: also try to find $BOOT by partition GUID"
This reverts commit 41f39e2144.

From the post merge comment in #26648:

> Hmm, this is highly problematic, no? if I boot from my ssd and then
> plug in a fedora live usb stick, then there will be two ESPs around,
> the one from my ssd and the one from the live usb one, and this code
> might find the wrong one and bad things will happen
2023-03-17 20:41:17 +09:00
Yu Watanabe 16af02cd97 uki-util: move functions for inspecting kernel to uki-util.[ch] 2023-03-17 20:40:34 +09:00
Yu Watanabe c8eced395b bootctl: introduce inspect_kernel()
Then, now verb_kernel_identify() and verb_kernel_inspect() can share
most of the code.
2023-03-17 20:40:34 +09:00
Yu Watanabe 8102ff2e3d bootctl: introduce uki_read_pretty_name()
No functional change, just prepration for later commits.
2023-03-17 20:40:34 +09:00
Yu Watanabe 748b15c277 bootctl: find matching section in read_pe_section()
No functional change, just refactoring.
2023-03-17 20:40:34 +09:00
Yu Watanabe 03221e746d bootctl: return 0 instead of EXIT_SUCCESS 2023-03-17 20:40:34 +09:00
Yu Watanabe ab94d98b29 bootctl: move verb_kernel_identity()
No functional change, just for making beautify later diffs.
2023-03-17 20:40:34 +09:00
Yu Watanabe 58f5f60f1a os-util: add missing headers
For 'bool' and 'usec_t'.
2023-03-17 20:40:34 +09:00
Yu Watanabe 6ad9af0b13 exec-util: introduce EXEC_DIR_SKIP_REMAINING flag
Will be used in later commits.
2023-03-17 20:38:15 +09:00
Yu Watanabe f691157b87 exec-util: extract the core logic of execute_directories() as execute_strv()
Then, we can use it with a custom enumerator of executables.

No functional change, preparation for later commits.
2023-03-17 20:38:15 +09:00
Yu Watanabe 753e38d984 exec-util: enumerate executables earlier
Then, return earlier if no executable found.
2023-03-17 20:38:15 +09:00
Yu Watanabe fb0e5f12c6 exec-util: drop meaningless casts 2023-03-17 20:38:15 +09:00
Yu Watanabe 8e8df8292a exec-util: tighten variable scope a bit 2023-03-17 20:38:15 +09:00
Daan De Meyer dfb487ef74 Merge pull request #26849 from DaanDeMeyer/fwd-colors
journald-console: Add colors when forwarding to console
2023-03-17 12:02:35 +01:00
Jan Janssen 1e7ff4ba88 boot: Add undefined sanitizer support
Sadly, no stack traces, but this is better than nothing.
2023-03-17 10:39:39 +01:00
Jan Janssen 0b482b37f9 meson: Share more C flags 2023-03-17 10:39:32 +01:00
Jan Janssen f64f82aa8d boot: Add support for -ftrapv 2023-03-17 10:35:29 +01:00
Jan Janssen 48e1b2c250 boot: Add support for -fstack-protector 2023-03-17 10:35:29 +01:00
Jan Janssen a05f03225e boot: Detect nested assertions 2023-03-17 10:35:29 +01:00
Daan De Meyer 6742397921 Merge pull request #26783 from yuwata/loop-ref-follow-up
udev: slightly extend comment and add more tests
2023-03-17 10:00:43 +01:00
Yu Watanabe 58dfcc57f2 test: add a testcase that dir_fd_is_root() is not confused by bind mount
See the comment in dir_fd_is_root() and
https://github.com/systemd/systemd/pull/26820#issuecomment-1469554966.
2023-03-17 09:49:21 +01:00
Yu Watanabe 77c6bb895a Merge pull request #26803 from yuwata/udevadm-verify-summary
udevadm-verify: print a short summary
2023-03-17 12:14:04 +09:00
Daan De Meyer 58caedadbb mkosi: Enable some debugging options by default 2023-03-17 12:13:26 +09:00
Addison Snelling 0c868e3fad man: fix misspelled executable name (#26858) 2023-03-17 11:36:32 +09:00
Daan De Meyer e21be7976a repart: Report better errors if partition sizes are too small 2023-03-16 23:15:19 +01:00
Daan De Meyer d28c6ce62c repart: Zero full verity signature partition size
systemd-dissect requires the entirety of the partition following the
signature to be zeroed, so let's do just that.
2023-03-16 22:11:31 +01:00
Daan De Meyer 6eccec00fb repart: Make sure we seek to beginning of partition target before copy 2023-03-16 22:10:50 +01:00
Daan De Meyer 9f94d2741f mkosi: Use default timeout of 10s
Let's override the default timeout to something more reasonable for
mkosi builds.
2023-03-16 18:19:37 +01:00
Frantisek Sumsal e912bef85d test: wrap mkfs.*/mksquashfs/mkswap binaries when running w/ ASan 2023-03-16 12:56:40 +00:00
Daan De Meyer a4180c0fb3 journald-console: Add colors when forwarding to console
Let's color output when we're forwarding to the console. To make this
work, we inherit TERM from pid 1 and use it to decide whether we should
output colors or not.
2023-03-16 11:22:58 +01:00
Daan De Meyer 197dd3a9a4 terminal-util: Don't assume terminal is dumb if connected to /dev/null
If we're connected to /dev/null, we're likely going to be writing
colors to something that's not stdout/stderr, so let's fall back to
checking TERM if that's the case.
2023-03-16 11:21:28 +01:00
Luca Boccassi e0b8bbbdbe doc: update ELF_PACKAGE_METADATA to use linker flag instead of manual script
bfd/gold/mold/lld support this flag, so document it explicitly, and drop the
manually written linker script which is no longer necessary
2023-03-16 08:38:39 +01:00
Yu Watanabe 7b4cae904b test: add tests for summary output of udevadm verify 2023-03-16 14:54:46 +09:00
Yu Watanabe f99deb1e94 test: reindent testsuite-17.11.sh 2023-03-16 14:54:46 +09:00
Yu Watanabe 7ec4e184ba udevadm-verify: add a short summary 2023-03-16 14:54:46 +09:00
Yu Watanabe 3b1b0f1aeb sd-journal: fix segfault
Unfortunately, journal_file_next_entry() returns 0 when the next entry
not found. The commit cc938e4a0a adds
FIXME comment about that. We should really fix that, but the function and
its return value are used in many place, hence checking all usecases is not
easy. So, let's workaround that here, and handle the 0 return value by
the caller.

Follow-up for 34af74946e.

Fixes #26822.
2023-03-16 00:26:22 +00:00