Commit Graph

83472 Commits

Author SHA1 Message Date
Mike Yuan
ebcb0a07d3 labeler: match src/bootctl/ for sd-boot/bootctl tag
Follow-up for 0b676aab33
2025-09-04 17:32:48 +01:00
val4oss
0c7764f2a7 mkosi conf opensuse: add systemd-journal-remote
* Add the missing package for mkosi opensuse conf, otherwise TEST-04-JOURNAL
  fails with "/usr/lib/systemd/systemd-journal-remote: No such file or
  directory"

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-04 17:32:18 +01:00
Zbigniew Jędrzejewski-Szmek
4abf3694dd Several fixlets for Varlink IDL (#38809) 2025-09-04 14:41:29 +02:00
Yu Watanabe
d8af104fb0 ethtool-util: fix setting advertising link modes
Fixes a regression caused by d307410327.

The link_mode_masks flex array in struct ethtool_link_settings contains
three packed arrays, and the length of each array is given by
link_mode_masks_nwords field:
```
        __u32   link_mode_masks[];
        /* layout of link_mode_masks fields:
         * __u32 map_supported[link_mode_masks_nwords];
         * __u32 map_advertising[link_mode_masks_nwords];
         * __u32 map_lp_advertising[link_mode_masks_nwords];
         */
```
Hence, we cannot use the received data as is through the union, but need
to shift the array to make each map accessible through the union.
2025-09-04 12:57:10 +02:00
Yu Watanabe
2985840855 test: re-enable journal checks for varlink-idl and so on
Previously, we have checked journal after TEST-XX-YYYYY.sh, but it was
forgotten when we switched to mkosi.
This re-enable the check but through ExecStartPost=, and drops unnecessary
workarounds for end.service. Then, this drops unnecessary end.service
and testsuite.target.
2025-09-04 19:50:28 +09:00
Yu Watanabe
13852e1914 network: remove unnecessary fd saved in fd-store
Fixes the following warning:
```
[  130.968170] H systemd-networkd[4288]: Restart operation initiated.
[  130.968265] H systemd-networkd[4288]: Serializing...
[  130.968274] H systemd-networkd[4288]: There is nothing to serialize.
(snip)
[  130.978756] H systemd[1]: Stopped systemd-networkd.service.
(snip)
[  130.991407] H systemd[1]: Starting systemd-networkd.service...
(snip)
[  131.077440] H systemd-networkd[4318]: Enumeration completed.
[  131.077471] H systemd-networkd[4318]: Deserializing...
[  131.077491] H systemd-networkd[4318]: Failed to parse json (line=0, column=0): No data available
[  131.077524] H systemd-networkd[4318]: Failed to deserialize the previous invocation, ignoring: No data available
```
2025-09-04 19:50:28 +09:00
Yu Watanabe
df25e4af16 test: do not call GetUserRecord without "service" argument
Otherwise, following debugging log will be saved and the checker for
the varlink-idl log triggers failure:
```
systemd-userwork: processing[3110]: varlink-6-6: Parameters for method
  io.systemd.UserDatabase.GetUserRecord() didn't pass validation on field 'service': No anode
```
2025-09-04 19:50:28 +09:00
Yu Watanabe
2ce397125f core/varlink: do not call io.systemd.oom.ReportManagedOOMCGroups() with empty "cgroups" parameter
Fixes the following varlink IDL validation error:
```
systemd-oomd[1687]: varlink-11-11: Parameters for method io.systemd.oom.ReportManagedOOMCGroups()
  didn't pass validation on field 'cgroups': No anode
```
2025-09-04 19:50:28 +09:00
Yu Watanabe
f36f374447 core/varlink: do not send unrealized cgroups to oomd
Follow-ups for 23ac08115a.

Since the commit, the cgroup path is set only when it is realized.

Fixes the following varlink IDL validation failure:
```
systemd-oomd[1687]: Varlink-IDL: Mandatory field 'path' is null or missing on object, refusing.
```
2025-09-04 19:50:12 +09:00
Yu Watanabe
83cfc45dfb hostname: add missing varlink IDL fields
Follow-up for bc60034f43.
2025-09-04 18:15:33 +09:00
Yu Watanabe
ce631ae3d9 bootctl: add missing varlink IDL entries
Follow-up for f2751d757f.
2025-09-04 18:15:33 +09:00
Yu Watanabe
b10619484d Cleanups for test/units directory (#38807) 2025-09-04 18:11:27 +09:00
Yu Watanabe
2ddeb2adfd install: follow-up for initrd presets (#38790)
Follow up for 4a8c395167.
2025-09-04 18:03:21 +09:00
Daan De Meyer
67573e8b8b repart: add test case for btrfs specific options and MountPoint=, and update man page (#38756)
Closes #38749.
2025-09-04 09:00:09 +02:00
Daan De Meyer
af5dde2097 core/transaction: fix issue in dropping unmergeable jobs (#38776)
Fixes #38765.
2025-09-04 08:57:59 +02:00
Daan De Meyer
41ae31a9ac install: Fall back to system presets if there are no initrd presets
We might be operating with a newer systemctl on an image with older
systemd and thus without an initrd-preset directory. Before
4a8c395167, we would use the system
presets, let's make sure we keep doing that if we're operating on an
image without initrd presets.

Follow up for 4a8c395167.
2025-09-04 08:55:40 +02:00
Daan De Meyer
c8e1e5814f install: Coding style fixlet 2025-09-04 08:42:32 +02:00
Daan De Meyer
fcb90e6f55 core: fix segfault by drop-in config for masked unit (#38810) 2025-09-04 08:41:26 +02:00
Yu Watanabe
c02f570260 TEST-87-AUX-UTILS-VM: rotate journal at one more place
Follow-ups for ab56a96194.

Fixes the following failure:
```
TEST-87-AUX-UTILS-VM.sh[1196]: + systemd-run --user --wait --pipe -M testuser@.host -- coredumpctl
TEST-87-AUX-UTILS-VM.sh[1840]: Running as unit: run-p1840-i1841.service; invocation ID: 325a026377aa4cffb046c5a63a8906ab
TEST-87-AUX-UTILS-VM.sh[1853]: Hint: You are currently not seeing messages from other users and the system.
TEST-87-AUX-UTILS-VM.sh[1853]:       Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
TEST-87-AUX-UTILS-VM.sh[1853]:       Pass -q to turn off this notice.
TEST-87-AUX-UTILS-VM.sh[1853]: Journal file /var/log/journal/6835d335b6684b6197bf071ad66f2678/user-4711.journal is truncated, ignoring file.
TEST-87-AUX-UTILS-VM.sh[1853]: No coredumps found.
TEST-87-AUX-UTILS-VM.sh[1840]:           Finished with result: exit-code
TEST-87-AUX-UTILS-VM.sh[1840]: Main processes terminated with: code=exited, status=1/FAILURE
TEST-87-AUX-UTILS-VM.sh[1840]:                Service runtime: 154ms
TEST-87-AUX-UTILS-VM.sh[1840]:              CPU time consumed: 78ms
TEST-87-AUX-UTILS-VM.sh[1840]:                    Memory peak: 21.9M (swap: 0B)
```
2025-09-04 08:39:39 +02:00
Yu Watanabe
642744b492 test: move test units to their own directories
This also add test cases for verifying loopy.service and friends,
which was added by e66047ff62 but never
used in integration tests.
2025-09-04 14:36:46 +09:00
Yu Watanabe
b419e927ee test: add comment about custom autorelabel.service
Salvaged from ead814a0b0.
2025-09-04 11:02:13 +09:00
Yu Watanabe
023de38782 TEST-07-PID1: add test cases for mask/unmask unit
For issue #38802.
2025-09-04 10:58:33 +09:00
Yu Watanabe
2ba0eacc6c core/unit: do not load drop-in configs for masked unit files
Otherwise, ExecXYZ= given by drop-ins may be added to a masked unit,
then commands may be unexpectedly executed. For example, if an ExecStop=
is set in a drop-in for a running unit, then 'systemctl mask --now' for
the unit try to invoke the command specified in ExecStop=.

Fixes #38802.
2025-09-04 10:58:33 +09:00
Ricky Tigg
fe3c1b0de6 po: Translated using Weblate (Finnish)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fi/
Translation: systemd/main
2025-09-04 10:14:52 +09:00
Yu Watanabe
975f27a2b5 repart: fix memleak
Fixes a bug in 1a0541d44c (v256).
2025-09-04 06:52:17 +09:00
Yu Watanabe
5b89cc2a5a test: add test case for issue #38765 2025-09-04 02:05:09 +09:00
Yu Watanabe
811af8d534 core/transaction: first drop unmergable jobs for anchor jobs
As you can see, something spurious happens in the logs below.
```
initrd-switch-root.target: Trying to enqueue job initrd-switch-root.target/start/isolate
systemd-repart.service: Looking at job systemd-repart.service/stop conflicted_by=no
systemd-repart.service: Looking at job systemd-repart.service/start conflicted_by=no
systemd-repart.service: Fixing conflicting jobs systemd-repart.service/stop,systemd-repart.service/start by deleting job systemd-repart.service/stop
initrd-switch-root.target: Fixing conflicting jobs initrd-switch-root.target/stop,initrd-switch-root.target/start by deleting job initrd-switch-root.target/stop
systemd-repart.service: Deleting job systemd-repart.service/start as dependency of job initrd-switch-root.target/stop
```

The two conflicting jobs for systemd-repart.service are initially queued
as the following:
- initrd-switch-root.target has Wants=initrd-root-fs.target, and
  initrd-root-fs.target has Wants=systemd-repart.service (through symlink),
  hence starting initrd-switch-root.target tries to start
  systemd-repart.service,
- systemd-repart.service has Conflicts=initrd-switch-root.target, hence
  starting initrd-switch-root.target tries to stop
  systemd-repart.service.

As similar, interestingly(?) starting initrd-switch-root.target tries to
stop initrd-switch-root.target.

So, now there are at least two pairs of conflicting jobs:
- systemd-repart.service: start vs stop,
- initrd-switch-root.target: start vs stop.

As these jobs are induced by starting initrd-switch-root.target, of course
the most important one is the start job for initrd-switch-root.target.

Previously, as you can see in the logs at the beginning, even if
the start job for initrd-switch-root.target is important, we may first
try to resolve the conflict in systemd-repart.service, and may drop the
stop job for systemd-repart.service even if it is relevant to the start
job of initrd-switch-root.target.

This makes first we solve the pair of conflicting jobs for anchor task.
So the stop job for initrd-switch-root.target is dropped first, and the
induced start job for systemd-repart.service is automatically removed,
thus it is not necessary to solve the conflict in systemd-repart.service
anymore.

This is especially important for services that are enabled both in initrd
and after switching root. If a stop job for one of the service is
unexpectedly dropped during switching root, then the service is not stopped
before switching root, and will never start after that.

Fixes #38765.
2025-09-04 02:04:56 +09:00
Yu Watanabe
a1eb53e934 man/repart.d: mention each field of MountPoint= needs to be quoted when contains colon
Closes #38749.
2025-09-04 01:46:11 +09:00
Yu Watanabe
e34f8128b1 TEST-58-REPART: add test case for btrfs specific options and MountPoint= 2025-09-04 01:45:38 +09:00
Yu Watanabe
e4f15fc140 TEST-58-REPART: make sector size test as a normal test case 2025-09-04 01:34:04 +09:00
Luca Boccassi
c4d9f9c9f6 mkosi: update mkosi commit reference to d45142e329550abc9c6fc63c1f1f86e5286d3d67
* 786b8fe1c8 Return false from want_efi() for UKI outputs
* fac86dbc93 mkosi-tools: add qemu/pipewire packages for gui profile for debian
* 3bb98f0e6e Add ncdu to tools tree packages
* 1332b32cb4 config: Fix type for devicetree setting
* eff03569ee initrd: Add intel_pmc_ssram_telemetry module by default
* e04305b030 Make Bootable= determine whether we build a UKI for esp images
* 7252146429 mkosi-obs: use --force also for unzstd
* f58e31e228 mkosi-obs: do not fail if there are no bootloaders in the ESP
* fac3bd4bf1 rhel: Look up entitlement keys and certificates in sandbox
* da814d9634 opensuse: Add support for RISC-V for Tumbleweed
* b1d66c88d0 fedora: Rework rawhide GPG key logic
* b9360f25df Include {sys,conf}ext info in metadata file
* 94c6db6148 Set MakeInitrd=yes in documentation for building custom initrd
* d134013ca8 mkosi-tools: add grub2-common to openSUSE tools tree
* c97d345395 mkosi-tools: virtiofsd is only available on a subset of architectures on debian/ubuntu
2025-09-03 14:27:59 +01:00
Zbigniew Jędrzejewski-Szmek
ed9431dfb5 Translations update from Fedora Weblate (#38792)
Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).



Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)
2025-09-03 13:07:19 +02:00
Sergey A
5b1857134c po: Translated using Weblate (Russian)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main
2025-09-03 13:04:54 +02:00
Jasmine Andrever-Wright
91b7cf7ecf po: Added translation using Weblate (Cornish)
Co-authored-by: Jasmine Andrever-Wright <cam.jpw@gmail.com>
2025-09-03 13:04:54 +02:00
Allison Karlitskaya
5a1b64fee0 man: add docs for ssh.ephemeral-authorized_keys-all
This was added in 071155a1fb ("ssh-generator: support
ssh.ephemeral-key.all-users") without corresponding documentation.  Add
the missing docs now.
2025-09-03 13:04:34 +02:00
Daan De Meyer
1207ba48d7 mkosi: Relax separate branch check in mkosi.sync
There's no guarantee that $GIT_BRANCH is always the same across
stable release branches and main. But we still need to make sure
we switch commits if we're switching between main and release branches.

To make this work, let's not check if the current HEAD commit is an
ancestor of the currently configured origin branch. Instead, let's
check if any of the origin branches contains the current HEAD commit.
This still makes sure that we won't switch commits if we're working
on a local branch while making sure that we do switch commits if we're
switching between main and stable release branches with different
git branches configured for the packaging repo checkout.
2025-09-03 12:11:48 +02:00
Yu Watanabe
9507e118e9 pcrlock: use WRITE_STRING_FILE_LABEL
Fixes #38727.
2025-09-03 11:14:04 +02:00
Yu Watanabe
cbbed2bd44 TEST-45-TIMEDATE: rotate journal before parsing log message
Similar to 04ade57a42.

Fixes the following failure (long line is wrapped):
```
TEST-45-TIMEDATE.sh[234]: + journalctl --sync
TEST-45-TIMEDATE.sh[234]: + for _ in {0..9}
TEST-45-TIMEDATE.sh[234]: + journalctl -q -n 1 '--since=2025-09-01 17:09:25.442936' -p info -t busctl --grep .
TEST-45-TIMEDATE.sh[363]: Sep 01 17:09:25 H busctl[351]: {"type":"signal","endian":"l","flags":1,"version":1,
  "cookie":67,"timestamp-realtime":1756746565578529,"sender":":1.11","path":"/org/freedesktop/timedate1",
  "interface":"org.freedesktop.DBus.Properties","member":"PropertiesChanged","payload":{"type":"sa{sv}as",
    "data":["org.freedesktop.timedate1",{"NTP":{"type":"b","data":false}},[]]}}
TEST-45-TIMEDATE.sh[366]: ++ journalctl -q -n 1 '--since=2025-09-01 17:09:25.442936' -p info -t busctl -o cat
TEST-45-TIMEDATE.sh[367]: ++ jq -r '.payload.data[1].NTP.data'
TEST-45-TIMEDATE.sh[366]: Journal file /run/log/journal/07946b7846564ac0ad1c86e8cabed329/system.journal is truncated, ignoring file.
TEST-45-TIMEDATE.sh[234]: + [[ '' == \f\a\l\s\e ]]
```
2025-09-02 09:38:51 +01:00
Yu Watanabe
5a8b9fd49f NEWS: mention ACLs by "uaccess" is always set by udevd
Follow-up for c960ca2be1 (#36444).
Prompted by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112660.
2025-09-01 10:06:18 +01:00
Sergey A
28e8914f29 po: Translated using Weblate (Russian)
Currently translated at 99.2% (262 of 264 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main
2025-09-01 03:05:44 +09:00
Felix Pehla
823fc6e9f7 man: loader.conf(5): document auto-reboot/auto-poweroff
These options were added in v255 with commit
cb341090d0, but were not documented as
standalone options in loader.conf. See #29440 for more information.
2025-08-31 08:22:44 +09:00
Josh Triplett
8a6128b68b NEWS: Extend note on /run/lock to recommend locking devices directly 2025-08-30 09:56:41 +01:00
Luca Boccassi
dd28a11d57 NEWS: add note about removal of /run/lock/ from our tmpfiles.d 2025-08-30 02:46:15 +09:00
Yu Watanabe
8c0cad97c7 units: portabled requires /dev/loop-control
Fixes #38692.
2025-08-29 14:49:26 +09:00
Matthias Gerstner
1158545ef7 homed: AddSigningKey: only feed data to OpenSSL _after_ Polkit auth
As a hardening measure it makes sense not to process potentially crafted
data in `openssl_pubkey_to_pem()` before we know that the caller is
authorized to perform the action.
2025-08-29 14:49:12 +09:00
Yu Watanabe
a521e76dc8 tree-wide: some trivial fixes around table_*() result check (#38753) 2025-08-29 05:23:26 +09:00
Antonio Alvarez Feijoo
3eb590f2b0 tree-wide: avoid logging 2 error messages if table_print_with_pager() fails
`table_print_with_pager()` already calls `table_log_print_error()` internally if
there is an error.
2025-08-28 14:09:50 +02:00
Antonio Alvarez Feijoo
134fde8666 resolvectl: add missing error check
Follow-up for 45817e9245
2025-08-28 14:09:14 +02:00
Luca Boccassi
e91bfad241 analyze: fix unit-shell/unit-gdb when target unit has exited
Follow-up for 9a08000d18
Follow-up for ad6e02e7b4
2025-08-28 12:11:45 +01:00
Nick Rosbrook
1be088c299 test: ensure that reload updates DNSSEC and DNSOverTLS on link scopes 2025-08-27 22:33:38 +09:00