1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-18 21:57:48 +03:00

63823 Commits

Author SHA1 Message Date
Yu Watanabe
fda18ce2b6 boot-entry: use chase_and_fopen_unlocked() to open /etc/kernel/entry-token
Otherwise, when 'root' is specified, the file may be a symlink to a host
file, and we may read wrong entry.
2023-04-12 16:23:03 +09:00
Yu Watanabe
3b5fc5fb1b boot-entry: prioritize machine ID only when it is not randomly generated
Preparation for later commits. The parameter will be used in
kernel-install later.
2023-04-12 08:31:50 +09:00
Daan De Meyer
965b481d9b
Merge pull request #27214 from DaanDeMeyer/firstboot
firstboot: Use root directory file descriptor for everything
2023-04-11 22:30:09 +02:00
Tanishka
fd7623193d Modified to use STRV_MAKE() in strv_env_name_is_valid() function listed in env-util.c 2023-04-11 21:05:22 +02:00
Zbigniew Jędrzejewski-Szmek
f843f8be9c
Merge pull request #27209 from jamacku/patch-1
Don't run release workflow on `systemd-security` & drop checkout action
2023-04-11 20:44:48 +02:00
Mike Yuan
8a826a979a systemctl: suppress error for try-* if unit is masked
Closes #16521
2023-04-11 17:54:02 +01:00
Jan Janssen
b87d6da447 boot: Fix alignment of long long inside structs on x86
On x86 EFI follows the windows ABI, which expects 8-byte aligned long
long. The x86 sysv ELF ABI expects them to be 8-byte aligned when used
alone, but 4-byte aligned when they appear inside of structs:

    struct S {
        int i;
        long long ll;
    };

    // _Static_assert(sizeof(struct S) == 12, "x86 sysv ABI");
    _Static_assert(sizeof(struct S) == 16, "EFI/MS ABI");

To get the behavior we need when building with sysv ELF ABI we need to
pass '-malign-double' to the compiler as done by EDK2.

This in turn will make ubsan unhappy as the stack may not be properly
aligned on entry, so we have to tell the compiler explicitly to re-align
the stack on entry to efi_main.

This fixes loading EFI drivers on x86 that were previously always
rejected as the EFI_LOADED_IMAGE_PROTOCOL had a wrong memory layout.

See also: https://github.com/rhboot/shim/pull/516
2023-04-11 17:09:18 +01:00
Jan Macku
19cdda7c3a ci: drop checkout from release workflow
It's not required as per comment - https://github.com/systemd/systemd/pull/27110#issuecomment-1499653913
2023-04-11 16:59:18 +02:00
Jan Macku
9718afd194 ci: don't run release wf on systemd-security 2023-04-11 16:59:18 +02:00
Bill Peterson
5f8a9e6905
hwdb: add matrix for Asus BR1100F (#27197) 2023-04-11 23:11:16 +09:00
Daan De Meyer
a0657479f5 firstboot: Use root directory file descriptor for everything
There were a few remaining cases where we used arg_root instead of
the root directory file descriptor. Let's port those over to use the
root directory file descriptor as well.
2023-04-11 15:22:08 +02:00
Daan De Meyer
bd595c10e7 user-util: Add default_root_shell_at() 2023-04-11 15:21:51 +02:00
Daan De Meyer
73c43e96e7
Merge pull request #27186 from yuwata/os-release
os-util: several cleanups and introduce _at() variants of os-release parsers
2023-04-11 14:54:56 +02:00
Zbigniew Jędrzejewski-Szmek
ba5a469648
Merge pull request #27169 from yuwata/udev-rule-refuse-unsafe-path
sd-device,udev: refuse unsafe path in SYMLINK= and TAG=
2023-04-11 14:43:50 +02:00
Yu Watanabe
19db450f3a hwdb: fix ambiguous glob pattern for Lenovo machines
Fixes #27195.

Follow-up for a5c0ad9a9a2964079a19a1db42f79570a3582bee.
2023-04-11 13:21:34 +02:00
Yu Watanabe
538d878dbd os-util: introduce several _at() variants of os-release parsers 2023-04-11 18:49:45 +09:00
Yu Watanabe
5cf69e709e os-util: make $SYSTEMD_OS_RELEASE prefixed with the root directory
To make it consistent with other env vars, e.g. $SYSTEMD_ESP_PATH or
$SYSTEMD_XBOOTLDR_PATH.

This is useful when the root is specified by a file descriptor, instead
of a path.
2023-04-11 18:49:23 +09:00
Yu Watanabe
f4a1d32c82 os-util: merge parse_{extension,os}_release() 2023-04-11 18:49:23 +09:00
Yu Watanabe
7ef43c78df os-util: invert order of arguments in extension release parser
For consistency with other functions.
Unfortunately, va_start() requires that the previous argument is a
pointer, hence the order of the arguments in the internal function
cannot be changed.
2023-04-11 18:49:23 +09:00
Yu Watanabe
61acfd8311 os-util: shorten temporal variable names
No functional change, just refactoring.
2023-04-11 18:49:20 +09:00
Yu Watanabe
59c4707594 os-util: log one more error cause 2023-04-11 18:48:58 +09:00
Yu Watanabe
c9d64f8a2c os-util: do not use 'r' for storing loop status
The variable 'r' is usually used for storing return value of functional
call. Let's introduce another boolean to store the current loop status.

No functional change, just refactoring.
2023-04-11 18:48:58 +09:00
Yu Watanabe
7421f20c7e os-util: return earlier when unsupported image class is specified 2023-04-11 18:47:15 +09:00
Yu Watanabe
7213c75045 os-util: return earlier when extension release file is found
No functional change, just refactoring.
2023-04-11 18:44:50 +09:00
Yu Watanabe
a84677e0f4 os-util: split-out open_os_release() from open_extension_release()
The logics of opening os-release and extension-release are completely
different.
No functional change, just refactoring.
2023-04-11 18:44:50 +09:00
Yu Watanabe
6f0f4d1488 os-util: fix fd leak on failure 2023-04-11 18:44:50 +09:00
Yu Watanabe
396ec9587c os-util: make open_extension_release() return O_PATH fd 2023-04-11 18:44:50 +09:00
Yu Watanabe
53cbf5f9a6 os-util: drop fopen_extension_release() 2023-04-11 18:44:50 +09:00
Yu Watanabe
bfeaa62dbc compress: replace compress_blob() with compress_blob_explicit()
And make compress_xyz() return 0 on success, as we know which compression
algorithm is used when calling compress_blob().

Follow-up for 2360352ef02548723ac0c8eaf5ff6905eb9eeca5.
2023-04-11 09:14:34 +02:00
Daan De Meyer
7cb9ed5d38
Merge pull request #27206 from yuwata/udev-rename
udev: rename arguments and options, update comments
2023-04-11 09:12:21 +02:00
Yu Watanabe
0d68cd72b6 chase: drop redundant call of delete_trailing_chars()
In that branch, 'root' is a non-root and absolute path.
Hence, delete_trailing_chars() does not make the path empty.
And, if the path contains redundant slashes at the end, that will be
dropped by path_simplify().
2023-04-11 09:06:05 +02:00
Yu Watanabe
0f9aca9a98
Merge pull request #27207 from masatake/busctl--help-msg
busctl: add --xml-interface to the help message
2023-04-11 14:42:27 +09:00
Yu Watanabe
c689c541a1
Merge pull request #27201 from yuwata/o-path-support
Support O_PATH more
2023-04-11 12:37:37 +09:00
Colin Walters
4e1ac54e1c tree-wide: A few more uses of "unmet" for conditions
This is a followup to
413e8650b71d4404a7453403797f93d73d88c466
> tree-wide: Use "unmet" for condition checks, not "failed"

Since I noticed when running `systemctl status` on a recent
systemd still seeing
`Condition: start condition failed`

To recap the original rationale here for "unmet" is that it's
normal for some units to be conditional, so the term "failure"
here is too strong.
2023-04-11 12:36:53 +09:00
Yu Watanabe
2653ded4d1
Merge pull request #27199 from yuwata/find-esp
path-util: introduce path_prefix_root_cwd(), and use it in find_esp() and friends
2023-04-11 12:36:13 +09:00
Yu Watanabe
562f22dbfc
Merge pull request #27202 from yuwata/os-release-tiny-cleanups
os-util: tiny cleanups
2023-04-11 12:35:34 +09:00
Yu Watanabe
06692fdb5b env-file: introduce parse_env_file_fdv() 2023-04-11 12:33:14 +09:00
Masatake YAMATO
a5efb0cc2b shell-completion: add --xml-interface option of busctl to the rules
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-04-11 11:47:56 +09:00
Masatake YAMATO
c39b8978f6 busctl: add --xml-interface to the help message
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2023-04-11 11:45:26 +09:00
Yu Watanabe
fb4d9bf47f find-esp: use path_prefix_root_cwd()
Unlikely, but even if find_esp() or friends called with unnormalized or
relative 'root', let's make the result path normalized and absolute.

Note, before 63105f33edad423691e2d53bf7071f99c83799ba, these functions
returned an absolute and normalized path. But the commit made the result
path simply concatenated with root.

Follow-up for 63105f33edad423691e2d53bf7071f99c83799ba.
2023-04-11 06:27:11 +09:00
Yu Watanabe
75cc8d7c42 path-util: introduce path_prefix_root_cwd() 2023-04-11 06:27:05 +09:00
Yu Watanabe
adc5b9823c test: update description 2023-04-11 06:07:15 +09:00
Yu Watanabe
6fdc9fbc0f udev/scsi_id: rename positional arguments 2023-04-11 06:07:03 +09:00
Yu Watanabe
8352a29b6d device-nodes: rename argument 2023-04-11 05:53:58 +09:00
Yu Watanabe
8c14d828d4 os-util: drop redundant declaration of load_os_release_pairs() 2023-04-11 05:20:15 +09:00
Yu Watanabe
d67071d2f6 os-util: use _IMAGE_CLASS_INVALID
When extension is not specified, image class is not necessary to be
specified. Let's use _IMAGE_CLASS_INVALID as an indicator that no
extension is specified.
2023-04-11 05:20:15 +09:00
Yu Watanabe
c2cd950817 os-util: move declaration of string table lookup for image class 2023-04-11 05:20:15 +09:00
Yu Watanabe
fe008489f7 portable: always reopen fd of release file
To make it support the case that the fd is O_PATH.
2023-04-11 05:17:52 +09:00
Yu Watanabe
e63d070373 copy: make copy_bytes() support O_PATH fds 2023-04-11 05:17:10 +09:00
Luca Boccassi
1dec1c6163
Merge pull request #27182 from mrc0mmand/test-tweaks
test: a couple of stability tweaks
2023-04-10 18:42:34 +01:00