Commit Graph

83463 Commits

Author SHA1 Message Date
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
Nick Rosbrook
f818c3d6b6 test: use numeric prefixes in resolved.conf.d overrides
There are a lot of resolved.conf.d drop-ins used in these tests. Use
proper numeric prefixes, especially to avoid confusion with sorting
relative to test.conf.

Make the test base config 10-test.conf, and use 90-*.conf elsewhere.
2025-08-27 22:33:38 +09:00
Nick Rosbrook
6d22472089 resolve: re-create link unicast scopes on reload
On reload, resolved does not apply new DNSSEC= (or DNSOverTLS=) settings
on links, because the link unicast scopes are not re-created. However,
the servers and link states are updated correctly, so resolvectl and link
state files do show the new setting, leading users to believe the change
took effect immediately, the same way `resolvectl dnssec` does.

Fix this by freeing all of the link unicast scopes during reload, so
that they are re-created with the new settings in link_allocate_scopes().
2025-08-27 22:33:38 +09:00
Nick Rosbrook
71da422058 resolve: include DNSSEC and DNSOverTLS modes in dumps
This is useful for testing and debugging. E.g., one can examine the
active DNSSEC mode of the scope using:

$ resolvectl show-cache
2025-08-27 22:33:38 +09:00
Yu Watanabe
5bb434e317 shell-completion: support -i option for journalctl
Follow-up for dde54b8a85.
2025-08-26 19:24:39 +01:00
Lennart Poettering
c663d7e3ea update TODO 2025-08-26 17:35:58 +02:00
Yu Watanabe
37d1f1573b bootctl: do not fail on removing unfied kernel image
A boot loader entry for a unified kernel image has
BootEntry.kernel : path to the image relative to ESP or XBOOTLDR,
BootEntry.path   : path to the image.
Hence, these two effectively point to the same file.

Hence, by unlink command, the image is removed by
```
deref_unlink_file(&known_files, e->kernel, e->root);
```
then later tried again by
```
r = chase_and_unlink(e->path, root, ...);
```
and of course it fails with -ENOENT.

Let's ignore the failure there. We already ignore ENOENT on removal
at various places, especially in deref_unlink_file().

Fixes #38706.
Follow-ups for 8702496bfb.
2025-08-26 15:45:44 +02:00
Lennart Poettering
3ef74e44b8 nsresourced: use a hashed rather than a mangled name as fallback
If we are asked to come up with our own name for the namespace to
allocate (because client enabled "mangle"), then we so far created a
randomized name if shortening what was proposed didn't work. This broke
polkit authorization however, because when polkit is in the mix, we
process method calls twice, submitting the polkit request on the first
and then assuming a response is known on the second invocation. But if
we generate a randomized name for the two checks we'll not be ablet to
match up the requests because it's going to be different. Let's fix that
by not using a randomized name, but one hashed from the socket
connection we are processing mixed with the client provided name. This
will ensure that for the same method call we'll generate the same name,
but different calls (i.e. calls with different names on the same socket,
or with any name on any socket) we'll end up with different names,
minimizing chance of collision.

This ensures PK starts to work with nsresourced userns registration when
a bad or no name is specified, which previously would end up in a PK
query loop.
2025-08-26 15:30:39 +02:00
Lennart Poettering
06de39b3bd import-generator: disable timeout for downloaded images
Downloading images can take arbitrary amounts of time, hence disable the
timeout for it.

Inspired by https://github.com/systemd/particleos/issues/80
2025-08-26 15:23:41 +02:00
Kamil Páral
2f615ec1d1 70-mouse.hwdb: Add Razer Basilisk V3, Asus Cerberus, +2 more
All mice were measured using mouse-dpi-tool, and the measurements match vendors
specs, with the exception of Asus Cerberus (it officially has
500/*1000/1500/2500 DPI, but my measurements were quite different, so I opted
to include the real values).
2025-08-26 10:17:20 +01:00