]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agohomectl: show full list of selected groups as they are added 36271/head
Lennart Poettering [Thu, 6 Feb 2025 11:19:52 +0000 (12:19 +0100)] 
homectl: show full list of selected groups as they are added

9 months agohomectl: optionally force interactive firstboot query
Lennart Poettering [Thu, 6 Feb 2025 10:59:40 +0000 (11:59 +0100)] 
homectl: optionally force interactive firstboot query

9 months agohomectl: clarify that we pick the default shell if the prompt is skipped
Lennart Poettering [Wed, 5 Feb 2025 09:58:36 +0000 (10:58 +0100)] 
homectl: clarify that we pick the default shell if the prompt is skipped

9 months agofirstboot: add auto-completion to various fields
Lennart Poettering [Wed, 5 Feb 2025 09:55:48 +0000 (10:55 +0100)] 
firstboot: add auto-completion to various fields

This adds TAB-based auto-completion to various fields we query from the
user, such as locale, keymap, timezone, group membership.

It makes it a lot easier to quickly iterate through firstboot without
typing too much.

9 months agoterminal-util: beef up show_menu()
Lennart Poettering [Thu, 6 Feb 2025 11:02:24 +0000 (12:02 +0100)] 
terminal-util: beef up show_menu()

This modernizes the function a bit, and adds some bits:

1. whether to show numbers before entries is now optional, and if they
   are shown they are displayed in grey.

2. a common prefix can now be grayed out (later useful for completion
   support)

3. some variables have been named to clarify their purpose

4. the table display dimensions can now be auto-sized (by specifying
   SIZE_MAX and number of columns and column width)

9 months agoterminal-util: tweak any_key_to_proceed() a bit
Lennart Poettering [Wed, 5 Feb 2025 08:35:51 +0000 (09:35 +0100)] 
terminal-util: tweak any_key_to_proceed() a bit

1. Make the message a bit more visible, by adding ANSI color. This
   matters in particular during boot, where the message otherwise might
   be overprinted by other output

2. Let's turn off terminal echo so that whatever key is entered is not
   made visible on screen, and we can handle newline and other keys
   reasonably uniformly.

9 months agoask-password-api: refuse control characters in passwords
Lennart Poettering [Wed, 5 Feb 2025 08:39:09 +0000 (09:39 +0100)] 
ask-password-api: refuse control characters in passwords

Just some extra safety

9 months agoutf8: add helper that determines length in bytes of last UTF-8 character in string
Lennart Poettering [Wed, 5 Feb 2025 09:44:19 +0000 (10:44 +0100)] 
utf8: add helper that determines length in bytes of last UTF-8 character in string

9 months agostrv-util: add strv_filter_prefix() helper
Lennart Poettering [Thu, 6 Feb 2025 11:00:10 +0000 (12:00 +0100)] 
strv-util: add strv_filter_prefix() helper

9 months agostring-util: add str_common_prefix() helper that determines length of common prefix...
Lennart Poettering [Wed, 5 Feb 2025 09:40:06 +0000 (10:40 +0100)] 
string-util: add str_common_prefix() helper that determines length of common prefix of two strings

9 months agomkfs-util: Add support for btrfs compression
Daan De Meyer [Tue, 3 Sep 2024 06:18:31 +0000 (08:18 +0200)] 
mkfs-util: Add support for btrfs compression

Corresponding PR in btrfs-progs: https://github.com/kdave/btrfs-progs/pull/882

9 months agoupdate TODO
Lennart Poettering [Sat, 15 Feb 2025 07:35:27 +0000 (08:35 +0100)] 
update TODO

9 months agomkosi: update debian commit reference
Luca Boccassi [Sun, 16 Feb 2025 23:25:43 +0000 (23:25 +0000)] 
mkosi: update debian commit reference

08eb5e1eff Set tty device node mode to 0600
e3955d1ca2 initramfs-tools: copy hwdb.bin to initramfs
aff03b8933 d/rules: fix bpftool path discovery on ubuntu
cab4f15666 Update changelog for 257.3-1 release
9bfeffe2a3 autopkgtest: fix mkosi config section
44487bfe02 ukify: depend on python3-zstandard and recommend python3-lz4
0a20294f18 d/rules: adjust vmlinux.h path for Ubuntu
94fa0939ed Drop fallback for missing linux-bpf-dev package
b0b75e3f4b systemd-boot: check that bootvar really points to sd-boot
464453cbd6 systemd-boot: fix creating bootvar on arm64
ce4a878ef7 systemd-boot: warn if efibootmgr is not installed
cce6971f68 Install new udev rule for hidraw
0c483fbd26 d/t/control: do not pull in gdm3 on loong64
52451a0c14 d/t/control: depend on debian-archive-keyring and ubuntu-keyring

9 months agodissect: fix log_debug_errno assert due to r=0
Luca Boccassi [Mon, 17 Feb 2025 01:04:33 +0000 (01:04 +0000)] 
dissect: fix log_debug_errno assert due to r=0

systemd-dissect[612]: Assertion '(_error) != 0' failed at src/shared/dissect-image.c:3436, function dissected_image_load_verity_sig_partition(). Aborting.

9 months agoukify: Fix --sign-profile= check for main profile
Daan De Meyer [Sun, 16 Feb 2025 15:57:11 +0000 (16:57 +0100)] 
ukify: Fix --sign-profile= check for main profile

opts.profile is always an env file so we have to parse the default
value as well to check if it's in --sign-profile= or not.

9 months agojournal-remote: several follow-ups for compression support, and trivial cleanups...
Luca Boccassi [Sun, 16 Feb 2025 14:33:47 +0000 (14:33 +0000)] 
journal-remote: several follow-ups for compression support, and trivial cleanups (#36334)

Follow-ups for cfaf78001c3451d549bcb1ee4adca3e85b934e56 (#34822).

9 months agomacro-fundamental: add _nonnull_if_nonzero_ and use it in basic/ (#36395)
Yu Watanabe [Sun, 16 Feb 2025 11:21:08 +0000 (20:21 +0900)] 
macro-fundamental: add _nonnull_if_nonzero_ and use it in basic/ (#36395)

9 months agojournal-upload: several follow-ups for Accept-Encoding header handling 36334/head
Yu Watanabe [Sun, 9 Feb 2025 20:29:12 +0000 (05:29 +0900)] 
journal-upload: several follow-ups for Accept-Encoding header handling

This makes,
- When a wildcard value '*' is specified, use the first supported
  compression algorithm,
- disable compression if Accept-Encoding header is unspecified or
  no supported compression algorithm specified in the header,
- ignore all errors in parsing the header.

9 months agojournal-upload: split-out update_content_encoding_header()
Yu Watanabe [Tue, 11 Feb 2025 08:13:13 +0000 (17:13 +0900)] 
journal-upload: split-out update_content_encoding_header()

No functional change, just refactoring and preparation for later commit.

9 months agojournal-remote: several follow-ups for Compression= option handling
Yu Watanabe [Tue, 11 Feb 2025 07:49:46 +0000 (16:49 +0900)] 
journal-remote: several follow-ups for Compression= option handling

Follow-ups for cfaf78001c3451d549bcb1ee4adca3e85b934e56.

- use OrderedHashmap to manage configured compression algorithms, then
  drop CompressionArgs,
- rename CompressionOpts -> CompressionConfig,
- refuse 'none' in Compression= setting, but accept boolean false, which
  disables compression,
- when Compression= option is unspecified, enable all supported compression
  algorithms by default,
- do not set 'none' to the Accept-Encoding header.

9 months agojournal-remote: replace extract_first_word() with simple strchr()
Yu Watanabe [Tue, 11 Feb 2025 07:36:12 +0000 (16:36 +0900)] 
journal-remote: replace extract_first_word() with simple strchr()

9 months agojournal-remote: assume received data is not compressed when Content-Encoding header...
Yu Watanabe [Tue, 11 Feb 2025 07:42:59 +0000 (16:42 +0900)] 
journal-remote: assume received data is not compressed when Content-Encoding header is not set

Also, refuse spurious header `Content-Encoding: none`.

9 months agojournal-remote: copy positional arguments
Yu Watanabe [Tue, 11 Feb 2025 04:19:20 +0000 (13:19 +0900)] 
journal-remote: copy positional arguments

This also fixes several memory leaks.

9 months agojournal-remote: trivial coding style fix
Yu Watanabe [Sun, 9 Feb 2025 20:34:48 +0000 (05:34 +0900)] 
journal-remote: trivial coding style fix

9 months agorepart: Delay private key and certificate check until actual use
Daan De Meyer [Sat, 15 Feb 2025 23:24:52 +0000 (00:24 +0100)] 
repart: Delay private key and certificate check until actual use

For many reasons, we might not actually sign a verity signature
partition, even if ope is specified in the partition definition files.
It might already exist, it might be deferred, it might be excluded, ...

Since we cannot check if partition already exists when reading the
configuration, let's delay the check for whether a certificate and
key have been provided until we're actually about to sign a roothash.

9 months agobasic: use _nonnull_if_nonzero_ where appropriate 36395/head
Mike Yuan [Sat, 15 Feb 2025 22:45:54 +0000 (23:45 +0100)] 
basic: use _nonnull_if_nonzero_ where appropriate

9 months agobasic/escape: swap 'bad' and 'len' params for decescape()
Mike Yuan [Sat, 15 Feb 2025 22:43:11 +0000 (23:43 +0100)] 
basic/escape: swap 'bad' and 'len' params for decescape()

To follow our usual coding style.

9 months agobasic/escape: accept SIZE_MAX and perform overflow check in cescape_length() and...
Mike Yuan [Sat, 15 Feb 2025 22:25:14 +0000 (23:25 +0100)] 
basic/escape: accept SIZE_MAX and perform overflow check in cescape_length() and decescape() too

While at it, make cescape() static inline.

9 months agobasic/escape: octescape() doesn't really take 'bad' param
Mike Yuan [Sat, 15 Feb 2025 22:35:54 +0000 (23:35 +0100)] 
basic/escape: octescape() doesn't really take 'bad' param

9 months agomacro-fundamental: add _nonnull_if_nonzero_
Mike Yuan [Sat, 15 Feb 2025 22:02:52 +0000 (23:02 +0100)] 
macro-fundamental: add _nonnull_if_nonzero_

Introduced in gcc 15:
https://github.com/gcc-mirror/gcc/commit/19fe55c4801de50deee03b333e94d007aae222e3

9 months agomkosi: Install systemd in Fedora build image
Daan De Meyer [Sat, 15 Feb 2025 20:47:50 +0000 (21:47 +0100)] 
mkosi: Install systemd in Fedora build image

rpm pulls in systemd-standalone-sysusers now by default to get
systemd-sysusers which causes a conflict later on during the prepare
script when systemd is pulled in as a dependency of device-mapper so
let's install systemd in the initial transaction so systemd provides
systemd-sysusers and systemd-standalone-sysusers is never installed
in the first place.

9 months agoman/networkd.conf: add missing whitespace between words
Louis Sautier [Sat, 15 Feb 2025 23:05:13 +0000 (00:05 +0100)] 
man/networkd.conf: add missing whitespace between words

Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
9 months agoREADME: fix broken link in OBS badge
Luca Boccassi [Sat, 15 Feb 2025 01:32:39 +0000 (01:32 +0000)] 
README: fix broken link in OBS badge

The badge link was updated, but the URL link was not

Follow-up for 13871aa65690f14fcc22a7cc4b2a4280665497c5

9 months agohwdb.d: add ANP09 Intel n100 tablet sensor configuration (#36390)
Volodymyr Shkriabets [Sat, 15 Feb 2025 00:39:50 +0000 (00:39 +0000)] 
hwdb.d: add ANP09 Intel n100 tablet sensor configuration (#36390)

I propose fix for ACCEL_MOUNT_MATRIX for popular on China markets Intel
n100 7" tablet. I can't find any information about manufacturer.

P:
/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00
M: i2c-BOSC0200:00
R: 00
J: +i2c:i2c-BOSC0200:00
U: i2c
V: bmc150_accel_i2c
E:
DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00
E: SUBSYSTEM=i2c
E: DRIVER=bmc150_accel_i2c
E: MODALIAS=acpi:BOSC0200:BOSC0200:
E: USEC_INITIALIZED=3546649
E: ID_VENDOR_FROM_DATABASE=BOS

P:
/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00/iio:device0
M: iio:device0
R: 0
J: c238:0
U: iio
T: iio_device
D: c 238:0
N: iio:device0
L: 0
E:
DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00/iio:device0
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device0
E: DEVTYPE=iio_device
E: MAJOR=238
E: MINOR=0
E: USEC_INITIALIZED=3556556
E: ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, -1
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

DMI tablet string

dmi:bvnAmericanMegatrendsInternational,LLC.:bvrANP09_INTEL001:bd08/16/2024:br5.27:efr0.0:svn:pn:pvrDefaultstring:rvn:rn:rvrDefaultstring:cvnDefaultstring:ct10:cvrDefaultstring:sku:

9 months agomkosi: Fix mkosi.clangd (#36387)
Luca Boccassi [Fri, 14 Feb 2025 20:02:45 +0000 (20:02 +0000)] 
mkosi: Fix mkosi.clangd (#36387)

- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
  subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
  jump into system headers anymore if they don't exist on the host,
  we can find a way to add this back later if it turns out to be
  crucial.

9 months agomkosi: Fix mkosi.clangd 36387/head
Daan De Meyer [Fri, 14 Feb 2025 14:22:05 +0000 (15:22 +0100)] 
mkosi: Fix mkosi.clangd

- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
  subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
  jump into system headers anymore if they don't exist on the host,
  we can find a way to add this back later if it turns out to be
  crucial.

9 months agomkosi: Update to latest
Daan De Meyer [Fri, 14 Feb 2025 14:21:04 +0000 (15:21 +0100)] 
mkosi: Update to latest

9 months agoukify: fixes with kernel compression (#36381)
Zbigniew Jędrzejewski-Szmek [Fri, 14 Feb 2025 15:47:49 +0000 (16:47 +0100)] 
ukify: fixes with kernel compression (#36381)

9 months agohwdb.d: add support for Akoya P15645
fishears [Fri, 14 Feb 2025 13:45:36 +0000 (13:45 +0000)] 
hwdb.d: add support for Akoya P15645

9 months agoresolve: fix use-after-free (#36353)
Yu Watanabe [Fri, 14 Feb 2025 15:03:21 +0000 (00:03 +0900)] 
resolve: fix use-after-free (#36353)

Fixes a bug introduced by 81ae2237c1792943a1ec712ae2e630bcc592175b.
Fixes #36351.

9 months agoTEST-75-RESOLVED: skip a testcase when running on sanitizer 36353/head
Yu Watanabe [Wed, 12 Feb 2025 16:01:28 +0000 (01:01 +0900)] 
TEST-75-RESOLVED: skip a testcase when running on sanitizer

9 months agoTEST-75-RESOLVED: keep IPv6 stack enabled
Yu Watanabe [Wed, 12 Feb 2025 11:25:28 +0000 (20:25 +0900)] 
TEST-75-RESOLVED: keep IPv6 stack enabled

To make the issue #36351 easily reproduced.

9 months agoTEST-75-RESOLVED: assume knot 3.0 or newer is installed
Yu Watanabe [Wed, 12 Feb 2025 10:56:25 +0000 (19:56 +0900)] 
TEST-75-RESOLVED: assume knot 3.0 or newer is installed

And make the test failed if knot is installed but older than 3.0.

9 months agomkosi: wrap several more commands when running on sanitizers
Yu Watanabe [Wed, 12 Feb 2025 10:58:10 +0000 (19:58 +0900)] 
mkosi: wrap several more commands when running on sanitizers

They are used in TEST-75-RESOLVED.

9 months agoresolve: clear previous assignments of RefuseRecordTypes= on reload
Muhammad Nuzaihan Bin Kamal Luddin [Wed, 12 Feb 2025 05:40:04 +0000 (13:40 +0800)] 
resolve: clear previous assignments of RefuseRecordTypes= on reload

Follow-up for 81ae2237c1792943a1ec712ae2e630bcc592175b.

9 months agoresolve: fix use-after-free
Yu Watanabe [Tue, 11 Feb 2025 14:17:05 +0000 (23:17 +0900)] 
resolve: fix use-after-free

Fixes a bug introduced by 81ae2237c1792943a1ec712ae2e630bcc592175b.
Fixes #36351.

9 months agoREADME: new mount API was introduced in v5.2
Mike Yuan [Fri, 14 Feb 2025 11:52:25 +0000 (12:52 +0100)] 
README: new mount API was introduced in v5.2

Follow-up for d75c74e7bf2b6c786bd68ff81cbba712f97a7417

9 months agoukify: do not insist on a stub being available when joining pcrsigs 36381/head
Luca Boccassi [Fri, 14 Feb 2025 02:05:48 +0000 (02:05 +0000)] 
ukify: do not insist on a stub being available when joining pcrsigs

It is not used in this case, so skip it, otherwise it will need to be
installed even if it is not used

Follow-up for 9876e88e23ad1ecbffd7c69b2e0a4cbff283f681

9 months agoukify: if the specified kernel is not a valid PE file try to decompress it
Luca Boccassi [Thu, 13 Feb 2025 19:44:12 +0000 (19:44 +0000)] 
ukify: if the specified kernel is not a valid PE file try to decompress it

On some distros on some architectures (e.g.: Ubuntu arm64) the kernel is shipped as
a gzipped file, which the UEFI firmware does not understand.
If pefile fails to parse it, try to decompress it.

9 months agoukify: fix zboot parsing with zstd
Luca Boccassi [Thu, 13 Feb 2025 19:43:00 +0000 (19:43 +0000)] 
ukify: fix zboot parsing with zstd

The header starts with 'zstd', not 'zstd22':

$ ukify build --linux vmlinuz-6.13+unreleased-cloud-arm64 --initrd /boot/initrd.img-6.12.12-amd64 --output uki
Kernel version not specified, starting autodetection 😖.
Real-Mode Kernel Header magic not found
+ readelf --notes vmlinuz-6.13+unreleased-cloud-arm64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Traceback (most recent call last):
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2510, in <module>
    main()
    ~~~~^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2499, in main
    make_uki(opts)
    ~~~~~~~~^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 1328, in make_uki
    opts.uname = Uname.scrape(linux, opts=opts)
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 384, in scrape
    version = func(filename, opts=opts)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 374, in scrape_generic
    text = maybe_decompress(filename)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 221, in maybe_decompress
    return get_zboot_kernel(f)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 201, in get_zboot_kernel
    raise NotImplementedError(f'unknown compressed type: {comp_type!r}')
NotImplementedError: unknown compressed type: b'zstd\x00\x00'

9 months agoukify: switch from zstd to zstandard
Luca Boccassi [Thu, 13 Feb 2025 19:38:45 +0000 (19:38 +0000)] 
ukify: switch from zstd to zstandard

The zstd library does not support stream decompression, and it
requires the zstd header to contain extra metadata, that the kernel
build does not append:

$ file -k vmlinuz-6.13+unreleased-cloud-arm64
vmlinuz-6.13+unreleased-cloud-arm64: PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows, 2 sections\012- data
$ ukify build --linux vmlinuz-6.13+unreleased-cloud-arm64 --initrd /boot/initrd.img-6.12.12-amd64 --output uki
Kernel version not specified, starting autodetection 😖.
Real-Mode Kernel Header magic not found
+ readelf --notes vmlinuz-6.13+unreleased-cloud-arm64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Traceback (most recent call last):
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2508, in <module>
    main()
    ~~~~^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2497, in main
    make_uki(opts)
    ~~~~~~~~^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 1326, in make_uki
    opts.uname = Uname.scrape(linux, opts=opts)
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 382, in scrape
    version = func(filename, opts=opts)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 372, in scrape_generic
    text = maybe_decompress(filename)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 219, in maybe_decompress
    return get_zboot_kernel(f)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 199, in get_zboot_kernel
    return cast(bytes, zstd.uncompress(f.read(size)))
                       ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
zstd.Error: Input data invalid or missing content size in frame header.

This appears to be by design:

https://github.com/sergey-dryabzhinsky/python-zstd/issues/53

Switch to python3-zstandard, which works.

9 months agojournal-remote: fix typo
Yu Watanabe [Fri, 14 Feb 2025 04:22:28 +0000 (13:22 +0900)] 
journal-remote: fix typo

Follow-ups for cfaf78001c3451d549bcb1ee4adca3e85b934e56.

9 months agoTODO: fix typo
Yu Watanabe [Fri, 14 Feb 2025 04:20:17 +0000 (13:20 +0900)] 
TODO: fix typo

Follow-ups for 0eeeb36bd5361ed43cf7bc27132ac0aaad562376 and
3fd11dbcd94880541d1a8856b1881ac24aea448e.

9 months agoREADME: mention fsopen() is since kernel v5.2
Yu Watanabe [Fri, 14 Feb 2025 04:05:39 +0000 (13:05 +0900)] 
README: mention fsopen() is since kernel v5.2

It is introduced by the following commit.
https://github.com/torvalds/linux/commit/24dcb3d90a1f67fe08c68a004af37df059d74005

9 months agocore/mount: rework GracefulOptions= as x-systemd.graceful-option= (#36356)
Yu Watanabe [Fri, 14 Feb 2025 04:01:14 +0000 (13:01 +0900)] 
core/mount: rework GracefulOptions= as x-systemd.graceful-option= (#36356)

Prompted by #36337

9 months agocore/service: drop unneeded unit_add_to_gc_queue() (#36368)
Yu Watanabe [Fri, 14 Feb 2025 03:51:48 +0000 (12:51 +0900)] 
core/service: drop unneeded unit_add_to_gc_queue() (#36368)

9 months agomkosi: Update to latest
Daan De Meyer [Thu, 13 Feb 2025 18:56:34 +0000 (19:56 +0100)] 
mkosi: Update to latest

9 months agovarlink idl fixes (#36376)
Luca Boccassi [Thu, 13 Feb 2025 21:16:04 +0000 (21:16 +0000)] 
varlink idl fixes (#36376)

9 months agofmf: Don't fail if we can't modify sysctl values
Daan De Meyer [Thu, 13 Feb 2025 13:41:21 +0000 (14:41 +0100)] 
fmf: Don't fail if we can't modify sysctl values

If the script is running unprivileged we might not be able to modify
these so let's skip in that case.

9 months agocore/condition: fix segfault when key not found in os-release
Zbigniew Jędrzejewski-Szmek [Thu, 13 Feb 2025 14:49:50 +0000 (15:49 +0100)] 
core/condition: fix segfault when key not found in os-release

'ConditionOSRelease=|ID_LIKE$=*rhel*' results in a segfault.
The key 'ID_LIKE' is not present in Fedora's os-release file.

I think the most reasonable behaviour is to treat missing keys as empty.
This matches the "shell-like" sprit, since in a shell empty keys would
by default be treated as empty too. Thus, "ID_LIKE=" would match, if
ID_LIKE is not present in the file, and ID_LIKE=!$foo" would also match.
The other option would be to make those matches fail, but I think that'd
make the feature harder to use, esp. with negative matches.

Documentation is updated to clarify the new behaviour.

https://bugzilla.redhat.com/show_bug.cgi?id=2345544

9 months agologind: map enum strings to underscores in logind 36376/head
Lennart Poettering [Thu, 13 Feb 2025 17:16:18 +0000 (18:16 +0100)] 
logind: map enum strings to underscores in logind

Varlink doesn't know dashes in enums, we use them all the time. Convert
dashes to underscores hence before we pass them through varlink.

9 months agovarlink: fix IDL for errno error
Lennart Poettering [Thu, 13 Feb 2025 17:15:52 +0000 (18:15 +0100)] 
varlink: fix IDL for errno error

9 months agoupdate TODO
Lennart Poettering [Thu, 13 Feb 2025 16:38:54 +0000 (17:38 +0100)] 
update TODO

9 months agoupdate TODO
Lennart Poettering [Thu, 13 Feb 2025 16:35:59 +0000 (17:35 +0100)] 
update TODO

9 months agosysupdate: Don't use compression extension for UKIs in manpage
Daan De Meyer [Thu, 13 Feb 2025 12:03:39 +0000 (13:03 +0100)] 
sysupdate: Don't use compression extension for UKIs in manpage

UKIs should generally not be compressed since the kernel image and
initrd in them will already be compressed so let's remove the compression
suffix from the examples in the sysupdate manpage.

9 months agoptyfwd: Forward various signals to forked process (#36345)
Daan De Meyer [Thu, 13 Feb 2025 10:30:34 +0000 (11:30 +0100)] 
ptyfwd: Forward various signals to forked process (#36345)

9 months agoUpdate TODO 36345/head
Daan De Meyer [Thu, 13 Feb 2025 08:42:36 +0000 (09:42 +0100)] 
Update TODO

9 months agoptyfwd: Forward various signals to forked process
Daan De Meyer [Mon, 10 Feb 2025 22:59:04 +0000 (23:59 +0100)] 
ptyfwd: Forward various signals to forked process

We want systemd-pty-forward to be something that can be dropped in
somewhere without too much thought. To enable this, let's make sure
we forward various signals to the forked process. This makes sure that
any signals are delivered to the actual child process regardless of whether
it's running within systemd-pty-forward or not.

9 months agologin: Queue session for garbage collection on leader death (#36364)
Lennart Poettering [Thu, 13 Feb 2025 08:10:06 +0000 (09:10 +0100)] 
login: Queue session for garbage collection on leader death (#36364)

This ensures sessions are cleaned up properly in case the user service
manager was manually stopped.

How to reproduce:
- Install Fedora 41
- Log in
- Run `systemctl --user exit`
- Log in again
- Run `loginctl`

Expected results:
- Only 1 `manager` session

Actual results:
- More than 1 `manager` session

9 months agologin: Queue session for garbage collection on leader death 36364/head
msizanoen [Wed, 12 Feb 2025 14:27:25 +0000 (21:27 +0700)] 
login: Queue session for garbage collection on leader death

This ensures sessions are cleaned up properly in case the user service
manager was manually stopped.

9 months agologin: Continue watching leader pidfd after stop
msizanoen [Wed, 12 Feb 2025 15:09:01 +0000 (22:09 +0700)] 
login: Continue watching leader pidfd after stop

This ensures that garbage collection will be triggered when the leader
process dies.

9 months agoupdate TODO
Lennart Poettering [Wed, 12 Feb 2025 21:02:04 +0000 (22:02 +0100)] 
update TODO

9 months agoupdate TODO
Lennart Poettering [Wed, 12 Feb 2025 20:55:57 +0000 (21:55 +0100)] 
update TODO

9 months agomkosi: Update to latest
Daan De Meyer [Wed, 12 Feb 2025 10:09:36 +0000 (11:09 +0100)] 
mkosi: Update to latest

In https://github.com/systemd/mkosi/pull/3497, mkosi has started parsing
options passed after the verb as regular mkosi options instead of options
for the invoked command. We adapt to this change by adding '--' as a delimiter
everywhere where required.

9 months agocore/mount: log only once about fs not supporting new mount API 36356/head
Mike Yuan [Tue, 11 Feb 2025 18:44:59 +0000 (19:44 +0100)] 
core/mount: log only once about fs not supporting new mount API

9 months agomountpoint-util: assume fsopen() works in mount_option_supported()
Mike Yuan [Wed, 12 Feb 2025 14:44:13 +0000 (15:44 +0100)] 
mountpoint-util: assume fsopen() works in mount_option_supported()

Our baseline includes it now.

9 months agocore/mount: rework GracefulOptions= to be just x-systemd.graceful-option=
Mike Yuan [Tue, 11 Feb 2025 17:43:25 +0000 (18:43 +0100)] 
core/mount: rework GracefulOptions= to be just x-systemd.graceful-option=

09fbff57fcde47782a73f23b3d5cfdcd0e8f699b introduced new knob
for such functionality. However, that seems unnecessary.

The mount option string is ubiquitous in that all of fstab,
kernel cmdline, credentials, systemd-mount, ... speak it.
And we already have x-systemd.device-bound= that's parsed
by pid1 instead of fstab-generator. It feels hence more natural
for graceful options to be an extension of that, rather than
its own property.

There's also one nice side effect that the setting itself
is now more graceful for systemd versions not supporting
such feature.

9 months agocore/service: drop unneeded unit_add_to_gc_queue() 36368/head
Mike Yuan [Wed, 12 Feb 2025 16:38:47 +0000 (17:38 +0100)] 
core/service: drop unneeded unit_add_to_gc_queue()

Follow-up for a1d315730ffddf283d4bb9d73878fbcd97a4d244
and 6ac62d61db737b01ad3776a7688d8a4c57b3f7d9

With the aforementioned commits, unit_release_resources()
is dispatched in a dedicated queue, and Service.n_keep_fd_store
has been dropped, hence the comment is outdated. Moreover,
the unit is added to GC queue in unit_notify() already.
No other unit types do this in corresponding _enter_dead()
functions, nor does Service need it anymore.

9 months agocore/unit: use UNIT_IS_INACTIVE_OR_FAILED at one more place
Mike Yuan [Wed, 12 Feb 2025 16:48:59 +0000 (17:48 +0100)] 
core/unit: use UNIT_IS_INACTIVE_OR_FAILED at one more place

9 months agobus-unit-util: add missing assertions
Mike Yuan [Tue, 11 Feb 2025 17:13:01 +0000 (18:13 +0100)] 
bus-unit-util: add missing assertions

9 months agocore/dbus-mount: add missing ReloadResult and CleanResult properties
Mike Yuan [Mon, 10 Feb 2025 19:24:22 +0000 (20:24 +0100)] 
core/dbus-mount: add missing ReloadResult and CleanResult properties

9 months agocore/mount: trivial coding style cleanups
Mike Yuan [Wed, 12 Feb 2025 13:56:34 +0000 (14:56 +0100)] 
core/mount: trivial coding style cleanups

9 months agocore/mount: report accurate can_start and can_reload
Mike Yuan [Mon, 10 Feb 2025 19:22:09 +0000 (20:22 +0100)] 
core/mount: report accurate can_start and can_reload

9 months agocore/mount: check parameters_fragment first in mount_enter_(re)mounting()
Mike Yuan [Sun, 9 Feb 2025 19:41:20 +0000 (20:41 +0100)] 
core/mount: check parameters_fragment first in mount_enter_(re)mounting()

I.e. don't perform any action if we can't spawn mount task anyway.
Later the same check would be added to mount_can_start/reload(),
so this makes things more coherent too.

9 months agocore/mount: filter out "fail" option as well
Mike Yuan [Sun, 9 Feb 2025 19:25:21 +0000 (20:25 +0100)] 
core/mount: filter out "fail" option as well

9 months agocore/dbus-service: fix alignment
Mike Yuan [Sun, 9 Feb 2025 18:59:13 +0000 (19:59 +0100)] 
core/dbus-service: fix alignment

9 months agoudev: several improvements for debugging logs (#36357)
Daan De Meyer [Wed, 12 Feb 2025 13:35:46 +0000 (14:35 +0100)] 
udev: several improvements for debugging logs (#36357)

9 months agosocket: resolve unit specifiers in BindToDevice
Paul Fertser [Tue, 11 Feb 2025 13:33:15 +0000 (13:33 +0000)] 
socket: resolve unit specifiers in BindToDevice

There are cases where templated Socket unit files are used for network services
with interface name used as an instance. This patch allows using %i for
BindToDevice setting to limit the scope automatically.

9 months agoudev-watch: do not try to remove invalid watch handle 36357/head
Yu Watanabe [Wed, 12 Feb 2025 00:23:33 +0000 (09:23 +0900)] 
udev-watch: do not try to remove invalid watch handle

When a new device is processed, there should be no watch handle for
the device, hence udev_watch_clear() provides -1. Let's not try to call
inotify_rm_watch() in that case.

This should not change any behavior. Just for suppressing spurious
debugging log:
=====
(udev-worker)[3626140]: zram1: Removing watch handle -1.
=====

9 months agoudev-watch: mention that the failure is ignored
Yu Watanabe [Wed, 12 Feb 2025 00:22:49 +0000 (09:22 +0900)] 
udev-watch: mention that the failure is ignored

9 months agoudev-worker: add debugging log about success of flock() for whole block device
Yu Watanabe [Wed, 12 Feb 2025 00:20:51 +0000 (09:20 +0900)] 
udev-worker: add debugging log about success of flock() for whole block device

9 months agonspawn: add @keyring to default syscall allow_list
Anthony Messina [Tue, 11 Feb 2025 00:38:11 +0000 (18:38 -0600)] 
nspawn: add @keyring to default syscall allow_list

Keyring namespacing introduced in kernel version v5.3-rc1 https://github.com/torvalds/linux/commit/c84ca912b07901be528e5184fd254fca1dddf2ac

Fixes #17606

9 months agoFollow-ups for xattr-util (#36335)
Yu Watanabe [Tue, 11 Feb 2025 22:59:24 +0000 (07:59 +0900)] 
Follow-ups for xattr-util (#36335)

9 months agoman: Fix a minor typo in the org.freedesktop.login1 man page
Philip Withnall [Tue, 11 Feb 2025 16:38:14 +0000 (16:38 +0000)] 
man: Fix a minor typo in the org.freedesktop.login1 man page

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
9 months agotest-xattr-util: return early if not privileged enough to set trusted.* 36335/head
Mike Yuan [Mon, 10 Feb 2025 12:33:43 +0000 (13:33 +0100)] 
test-xattr-util: return early if not privileged enough to set trusted.*

9 months agotest-xattr-util: relax listxattr() retval check
Mike Yuan [Sun, 9 Feb 2025 22:18:05 +0000 (23:18 +0100)] 
test-xattr-util: relax listxattr() retval check

Follow-up for d228afd792d713a754e4368c014c1f43f10cf5b7

Apparently security.selinux might get set on the file too,
behind our back.

9 months agoxattr-util: drop unnecessary nofollow normalization
Mike Yuan [Sun, 9 Feb 2025 21:56:00 +0000 (22:56 +0100)] 
xattr-util: drop unnecessary nofollow normalization

Follow-up for b8df25dcfe674e37ceb3d54e00a31e1d33e96057

This is some leftover from get/listxattrat() usage which
got dropped later.

9 months agoresolve: add an option to explicitly disable query AAAA, SRV, MX, etc... (#34165)
Muhammad Nuzaihan Bin Kamal Luddin [Tue, 11 Feb 2025 09:29:39 +0000 (17:29 +0800)] 
resolve: add an option to explicitly disable query AAAA, SRV, MX, etc... (#34165)

Based on this patch i had submitted to RedHat
(https://issues.redhat.com/browse/RHEL-56280), i am submitting this
patch to this upstream systemd.

There is no way to explicitly enable/disable IPv6 AAAA queries.

Problem was that i am using RHEL9 and some applications does not use a
newer glibc that supports `no-aaaa` option in `/etc/resolv.conf`. So
some applications will still resolve IPv6 AAAA even with `no-aaaa`
option and it is inconsistent across the system where some work and some
don't.

So this systemd-resolved patch catch-all queries and disable IPv6 AAAA
queries for all applications in the OS by having an option
`RefuseRecordTypes=AAAA` to disable IPv6 AAAA queries.

Although https://github.com/systemd/systemd/pull/28136 tries to fix this
automatically but it still does not work with
`net.ipv6.conf.all.disable_ipv6 = 1`. Also tried with explicitly
removing the conditional and force set `family = AF_INET` and still
resolves AAAA records.

The issue is that i want to explicitly disable IPv6 AAAA queries instead
of systemd-resolved to figure out itself which address family it is
using, which always have problems.

9 months agostring-util: introduce strprepend(), drop effectively unused strnappend() (#36343)
Yu Watanabe [Tue, 11 Feb 2025 09:09:03 +0000 (18:09 +0900)] 
string-util: introduce strprepend(), drop effectively unused strnappend() (#36343)

Split out from #36337

9 months agopo: Translated using Weblate (Bulgarian)
Alexander Shopov [Tue, 11 Feb 2025 01:17:15 +0000 (02:17 +0100)] 
po: Translated using Weblate (Bulgarian)

Currently translated at 100.0% (259 of 259 strings)

Co-authored-by: Alexander Shopov <ash@kambanaria.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/bg/
Translation: systemd/main