Commit Graph
63230 Commits
Author SHA1 Message Date
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
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
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
Luca Boccassi 77c26cd62a Merge pull request #26835 from poettering/userdb-modernizations
various userdbd modernizations
2023-03-16 00:25:01 +00:00
OMOJOLA JOSHUA 71243af72f updated usage of SD_BUS_METHOD_WITH_NAMES macros to SD_BUS_METHOD_WIT… (#26840)
* localed: update usage of SD_BUS_METHOD_WITH_NAMES macros to SD_BUS_METHOD_WITH_ARGS
2023-03-15 22:52:24 +00:00
Yu Watanabe b2b5a95227 github: update default and example in template 2023-03-15 20:31:34 +01:00
Yu Watanabe cb6ff2a42c Merge pull request #26771 from YHNdnzj/machinectl-edit
machinectl: add verb edit and cat to operate on .nspawn files
2023-03-16 04:02:11 +09:00
Ludwig Nussel 361cacf49e manager: fix scope for environment generators
fixes regression introduced by 4870133bfa
2023-03-16 03:59:49 +09:00
Dmitry V. Levin f5b28e6bd8 test: fix testsuite-17.10.sh
Make sure /etc/udev/hwdb.d/ exists before creating a file inside it.

Fixes: 95cf8cae77 ("test: add coverage test for udevadm")
2023-03-16 03:59:01 +09:00
Yu Watanabe 0e5b4d767a Merge pull request #26831 from YHNdnzj/edit-util-followup
edit-util: follow-ups
2023-03-16 03:51:55 +09:00
Dmitry V. Levin 3ec58d0cd8 udev-rules: check for conflicting and duplicate expressions
Log an error when a rule line contains conflicting match expressions, e.g.
  NAME=="value", NAME!="value"

Log a warning when a rule line contains duplicate expressions, e.g.
  NAME=="value", NAME=="value"
2023-03-16 03:49:57 +09:00
Cornelius Hoffmann 2ff7856e1e Update github issue template to include systemd-dissect 2023-03-15 16:52:32 +01:00
Lennart Poettering b260be2ca7 userdbd: make static const what we can make so 2023-03-15 16:10:21 +01:00
Lennart Poettering 66a3869e7e userdbd: rework to use sd_event_add_child() instead of manual SIGCHLD
Let's modernize userdbd furzer, and use the common child handling we
nowadays have in sd-event, instead of rolling our own.

This also means we'll start using pidfds where we can.
2023-03-15 15:57:25 +01:00
Lennart Poettering 755424e94f userdbd: make use of FORK_CLOSE_ALL_FDS + FORK_REOPEN_LOG where we can 2023-03-15 15:57:25 +01:00
Lennart Poettering 54f5522664 userdbd: modernize signal handling
Let's make use of SD_EVENT_SIGNAL_PROCMASK so that we don't have to mask
the signals manually. Let's use sd_event_set_exit_signal() instead of
rolling our own SIGTERM/SIGINT handling. Let's use "floating" event
sources instead of keeping references on our own.

Let's also debug log if we can't enable watchdog handling.
2023-03-15 15:57:03 +01:00
Daan De Meyer f5abe8f957 Merge pull request #26784 from DaanDeMeyer/chase-fix
Allow creating files and directories with chase_symlinks_open() and further improvements
2023-03-15 15:51:47 +01:00
Daan De Meyer 39eb3ffaaa fs-util: Drop unlink_noerrno() 2023-03-15 13:27:20 +01:00
Mike Yuan af0292844d test: add testsuite-74.machinectl 2023-03-15 19:56:19 +08:00
Mike Yuan 1ed35a0d93 machinectl: add verb edit and cat to operate on .nspawn files
This allows operating on .nspawn files using machinectl.

Closes #26246
2023-03-15 19:56:19 +08:00
Mike Yuan d3bf024f1a edit-util: log unexpected errors if we fail to remove the parent dir 2023-03-15 19:50:26 +08:00
Daan De Meyer a45332500d Merge pull request #26820 from DaanDeMeyer/dir-fd-is-root
fd-util: Add dir_fd_is_root()
2023-03-15 12:48:14 +01:00
Mike Yuan 00b6baf2be edit-util: use path_equal 2023-03-15 19:45:33 +08:00
Daan De Meyer ea8282b6fc chase-symlinks: Add more assertions
Let's turn some runtime errors into assertions and add a few new
assertions.
2023-03-15 12:38:14 +01:00
Daan De Meyer 47f0e1b5e0 chase-symlinks: Rework open() functions and some chase flags
Currently, when CHASE_PARENT is specified, we chase the parent directory
of the symlink itself. Let's change this and chase the parent directory
of the symlink target so that trying to open the actual file later with
O_NOFOLLOW doesn't fail with ELOOP.

To get the current behavior, callers can add CHASE_NOFOLLOW to chase
the parent directory of the symlink itself.

Currently, when CHASE_MKDIR_0755 is specified, we create all components
of the path as directories. Instead, let's change the flag to only create
parent directories and leave the final component of the PATH untouched.
Also, allow CHASE_NONEXISTENT with CHASE_MKDIR_0755 now that it doesn't
create all components anymore.

Finally, rework chase_symlinks_and_open() and chase_symlinkat_at_and_open()
to always chase the parent directory and use xopenat() to open the final
component of the path. This allows us to pass O_CREAT to create the file or
directory (O_DIRECTORY) if it is missing. If CHASE_PARENT is configured, we
just reopen the parent directory that we chased.
2023-03-15 12:38:11 +01:00
bri d6c623e884 Add rebrands of Medion Akoya notebooks/tablets 2023-03-15 10:59:06 +00:00
Luca Boccassi 1be50af42e Merge pull request #26804 from fbuihuu/fixes-for-test-58-repart
Fixes for test 58 repart
2023-03-15 10:56:07 +00:00
Daan De Meyer af423b4ba9 fd-util: Add dir_fd_is_root() 2023-03-15 11:51:08 +01:00