]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 days agotest: Add integration test for btrfs compression in repart 39597/head
Chris Down [Thu, 6 Nov 2025 15:36:19 +0000 (23:36 +0800)] 
test: Add integration test for btrfs compression in repart

Add testcase_btrfs_compression() to verify that btrfs partitions with
Compression= and CopyFiles= directives work correctly.

The test verifies the fix for issue #39584, where mkfs.btrfs would fail
with "ERROR: --compression must be used with --rootdir" when repart
tried to create compressed btrfs filesystems.

The test creates a partition definition with Format=btrfs,
Compression=zstd, and CopyFiles=, then validates:

1. systemd-repart output shows "Rootdir from:" and "Compress:",
   confirming that the --rootdir code path is used
2. mkfs.btrfs is invoked with both --compress and --rootdir options
3. The file is successfully copied to the filesystem
4. Compression is actually applied (verified via compsize output
   containing "zstd")

11 days agorepart: Force --rootdir population for btrfs with compression
Chris Down [Thu, 6 Nov 2025 15:17:01 +0000 (23:17 +0800)] 
repart: Force --rootdir population for btrfs with compression

When a btrfs partition is configured with both Compression= and
CopyFiles=, we need to ensure files are copied during filesystem
creation using mkfs.btrfs --rootdir, rather than copying files
afterwards via loop device mounting.

This is required because mkfs.btrfs can only apply compression settings
when files are provided via --rootdir during filesystem creation. If we
format the filesystem first and then mount it to copy files, the
compression setting is meaningless.

Modify the partition_needs_populate() condition to force the --rootdir
code path when the format is btrfs and compression is requested.

This ensures that partition_populate_directory() runs and creates a
temporary directory with the files, which is then passed to
make_filesystem() as the root parameter, allowing mkfs.btrfs to create
the filesystem with compression applied.

Fixes: https://github.com/systemd/systemd/issues/39584
11 days agomkfs-util: Ignore btrfs compression when there is no dir to copy
Chris Down [Thu, 6 Nov 2025 15:11:55 +0000 (23:11 +0800)] 
mkfs-util: Ignore btrfs compression when there is no dir to copy

mkfs.btrfs requires that the --compress option be used together with
--rootdir, as compression only makes sense in that context (because
compression is not a persistent setting).

Right now, If --compress is specified without --rootdir, mkfs.btrfs
fails with:

  ERROR: --compression must be used with --rootdir

This can occur when repart is configured with Compression= but the
partition populate logic doesn't use the --rootdir code path (eg. when
using loop device mounting to copy files after mkfs).

Add a defensive check to skip compression and emit a user-friendly
warning when compression is requested but no root directory is
provided. The warning message references the repart directive names
(Compression= and CopyFiles=) rather than low-level mkfs options to
help users understand the requirement.

This prevents crashes but doesn't enable compression, that requires
ensuring the --rootdir code path is used, which it currently is not and
will be addressed in the next patch.

Fixes: https://github.com/systemd/systemd/issues/39584
11 days agoreread-partition-table: trigger change events when we failed to lock device
Yu Watanabe [Thu, 6 Nov 2025 15:35:34 +0000 (00:35 +0900)] 
reread-partition-table: trigger change events when we failed to lock device

Before aa47d8ade18cc4a079fef5a1aaa37d763507104e, when we failed to lock
the device node, we simply trigger change events for the device and its
partitions. But the commit killed the fallback logic. Let's restore that.

Fixes #39544.

11 days agologind: handle session leader termination during deserialization more gracefully...
Yu Watanabe [Fri, 7 Nov 2025 07:35:32 +0000 (16:35 +0900)] 
logind: handle session leader termination during deserialization more gracefully (#39607)

Closes https://github.com/systemd/systemd/issues/39556

12 days agoman: systemd-measure. Remove 'tpm2-pcrs=' from cryptenroll command (#39590)
cvlc12 [Thu, 6 Nov 2025 20:54:06 +0000 (21:54 +0100)] 
man: systemd-measure. Remove 'tpm2-pcrs=' from cryptenroll command (#39590)

This is now default since 4b840414be3b2d6520599d86d2b718a37574aabf.

12 days agoTwo fixes for homectl (#39591)
Yu Watanabe [Thu, 6 Nov 2025 20:52:20 +0000 (05:52 +0900)] 
Two fixes for homectl (#39591)

12 days agotest: ensure test checking status runs first
Luca Boccassi [Thu, 6 Nov 2025 17:13:16 +0000 (17:13 +0000)] 
test: ensure test checking status runs first

The test messes a bit with the ESP, which might cause bootctl status output to change.
Run the test that simply checks status without changing anything first.

[  188.633908] TEST-87-AUX-UTILS-VM.sh[1101]: + bootctl status --quiet
[  188.681082] TEST-87-AUX-UTILS-VM.sh[1155]: System:
[  188.681082] TEST-87-AUX-UTILS-VM.sh[1155]:       Firmware: UEFI 2.70 (EDK II 1.00)
[  188.681082] TEST-87-AUX-UTILS-VM.sh[1155]:  Firmware Arch: x64
[  188.681082] TEST-87-AUX-UTILS-VM.sh[1155]:    Secure Boot: enabled (user)
<...>
[  198.938717] TEST-87-AUX-UTILS-VM.sh[1679]: ++ printf '\6\0\0\0\1'
[  198.939235] TEST-87-AUX-UTILS-VM.sh[1678]: + cmp /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c /dev/fd/63
[  198.944957] TEST-87-AUX-UTILS-VM.sh[1678]: + cmp /sys/firmware/efi/efivars/SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c /dev/fd/63
[  198.945808] TEST-87-AUX-UTILS-VM.sh[1681]: ++ printf '\6\0\0\0\0'
[  198.950459] TEST-87-AUX-UTILS-VM.sh[1684]: + bootctl status
[  198.951357] TEST-87-AUX-UTILS-VM.sh[1685]: + grep -q 'Secure Boot: enabled'
[  199.004142] TEST-87-AUX-UTILS-VM.sh[1086]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-87-AUX-UTILS-VM.bootctl.sh failed'

Follow-up for 5ae58ac2b93a4046fbae4e0c825b8cc9d03d10d8

Fixes https://github.com/systemd/systemd/issues/39598

12 days agoreread-part: fix error propagation
Luca Boccassi [Thu, 6 Nov 2025 18:04:40 +0000 (18:04 +0000)] 
reread-part: fix error propagation

[   49.514556] (udev-synth)[1385]: Assertion '(_error) != 0' failed at src/shared/reread-partition-table.c:260, function reread_partition_table_full(). Aborting.

Follow-up for 757887d01dd96125be1774f4b23b12f2fbda9a8b

Fixes https://github.com/systemd/systemd/issues/39603

12 days agonss-systemd: fix memory leak
jouyouyun [Thu, 6 Nov 2025 03:18:10 +0000 (11:18 +0800)] 
nss-systemd: fix memory leak

12 days agologind: handle session leader termination during deserialization more gracefully 39607/head
Mike Yuan [Tue, 4 Nov 2025 20:13:49 +0000 (21:13 +0100)] 
logind: handle session leader termination during deserialization more gracefully

We track session leaders by pidfd precisely to make restarts reliable,
as leader exiting before deserialization is somewhat expected.
Such case is already handled gracefully (we'd GC sessions without leader
before kicking off the new cycle), but let's also tweak the log message
a bit to reduce annoyance.

Closes #39556

12 days agologind: fix potential fd leak in deliver_session_leader_fd_consume()
Mike Yuan [Thu, 6 Nov 2025 18:31:18 +0000 (19:31 +0100)] 
logind: fix potential fd leak in deliver_session_leader_fd_consume()

Follow-up for 45eea629e3b3a640bf6a5cd13f4c73c86b426b11

12 days agotest: sync journal after the test unit finishes
Frantisek Sumsal [Thu, 6 Nov 2025 13:40:56 +0000 (14:40 +0100)] 
test: sync journal after the test unit finishes

In these two cases we need to sync the journal _after_ the unit finishes
as well, because we try to match messages from systemd itself, not
(only) from the unit, and the messages about units are dispatched
asynchronously.

That is, in the first case (silent-success.service) we want to make sure
that LogLevelMax= filters out messages _about_ units (from systemd) as
well, including messages like "Deactivated..."  and "Finished...", which
are sent out only when/after the unit is stopped.

In the second case we try to match messages with the "systemd" syslog
tag, but these messages come from systemd (obviously) and are sent out
asynchronously, which means they might not reach the journal before we
call `journalctl --sync` from the test unit itself, like happened here:

[ 1754.150391] TEST-04-JOURNAL.sh[13331]: + systemctl start verbose-success.service
[ 1754.172256] bash[13692]: success
[ 1754.221210] TEST-04-JOURNAL.sh[13694]: ++ journalctl -b -q -u verbose-success.service -t systemd
[ 1754.221493] TEST-04-JOURNAL.sh[13331]: + [[ -n '' ]]
[ 1754.175709] systemd[1]: Starting verbose-success.service - Verbose successful service...
[ 1754.221697] TEST-04-JOURNAL.sh[122]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-04-JOURNAL.journal.sh failed'
[ 1754.221697] TEST-04-JOURNAL.sh[122]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-04-JOURNAL.journal.sh failed
[ 1754.221697] TEST-04-JOURNAL.sh[122]: + return 1
[ 1754.205408] systemd[1]: verbose-success.service: Deactivated successfully.
[ 1754.205687] systemd[1]: Finished verbose-success.service - Verbose successful service.

By syncing the journal after the unit is stopped we have much bigger
chance that the systemd messages already reached the journal - the race
is technically still there, but the chance we'd hit it should be pretty
negligible.

Resolves: #39555

12 days agoresolvectl: add --json support for status commands (#38960)
Zbigniew Jędrzejewski-Szmek [Thu, 6 Nov 2025 14:34:10 +0000 (15:34 +0100)] 
resolvectl: add --json support for status commands (#38960)

Add --json support for all status commands in resolvectl by making use
of the new DumpDNSConfiguration varlink method. E.g,

```
$ resolvectl --json=pretty status eth0
[
        {
                "ifname" : "eth0",
                "ifindex" : 9,
                "defaultRoute" : true,
                "currentServer" : {
                        "addressString" : "10.148.181.1",
                        "address" : [
                                10,
                                148,
                                181,
                                1
                        ],
                        "family" : 2,
                        "port" : 53,
                        "ifindex" : 9,
                        "accessible" : true
                },
                "servers" : [
                        {
                                "addressString" : "10.148.181.1",
                                "address" : [
                                        10,
                                        148,
                                        181,
                                        1
                                ],
                                "family" : 2,
                                "port" : 53,
                                "ifindex" : 9,
                                "accessible" : true
                        }
                ],
                "searchDomains" : [
                        {
                                "name" : "local",
                                "routeOnly" : false,
                                "ifindex" : 9
                        }
                ],
                "dnssec" : "allow-downgrade",
                "dnsOverTLS" : "no",
                "llmnr" : "no",
                "mDNS" : "no",
                "scopes" : [
                        {
                                "protocol" : "dns",
                                "ifindex" : 9,
                                "ifname" : "eth0",
                                "dnssec" : "allow-downgrade",
                                "dnsOverTLS" : "no"
                        }
                ]
        }
]
```

Like the regular status output, fields are omitted all together when
empty, unless explicitly requested via one of the sub-commands dns,
domain, nta, etc.

Closes https://github.com/systemd/systemd/issues/33036.

12 days agoFix systemd-ssh-generator printing a bogus hint (#39578)
Zbigniew Jędrzejewski-Szmek [Thu, 6 Nov 2025 14:30:35 +0000 (15:30 +0100)] 
Fix systemd-ssh-generator printing a bogus hint (#39578)

12 days agoask-password-api: return if read_credential() failed 39591/head
David Tardon [Thu, 6 Nov 2025 13:04:32 +0000 (14:04 +0100)] 
ask-password-api: return if read_credential() failed

The current code causes assertion in strv_parse_nulstr() if
read_credential() results in an error different from ENXIO or ENOENT
(strace shows I'm getting EACCES):

 # homectl create waldo --real-name=Waldo --disk-size=200M

Before:

 Assertion 's || l <= 0' failed at src/basic/nulstr-util.c:32, function strv_parse_nulstr_full(). Aborting.

After:

 Failed to acquire password: Permission denied

Follow-up-for: 8806bb4bc7fa15d6ca46e81b8d535730209a3b66

12 days agohomectl: fix memory leak
David Tardon [Thu, 6 Nov 2025 12:54:35 +0000 (13:54 +0100)] 
homectl: fix memory leak

 # valgrind --leak-check=full homectl create waldo --real-name=Waldo --disk-size=200M --setopt=FOO=bar

Before:

==25155== HEAP SUMMARY:
==25155==     in use at exit: 12,879 bytes in 39 blocks
==25155==   total heap usage: 90 allocs, 51 frees, 53,964 bytes allocated
==25155==
==25155== 8 bytes in 1 blocks are definitely lost in loss record 4 of 38
==25155==    at 0x4845866: malloc (vg_replace_malloc.c:446)
==25155==    by 0x547FC2E: strdup (strdup.c:42)
==25155==    by 0x4B2647C: strv_env_replace_strdup_passthrough (env-util.c:435)
==25155==    by 0x42D547: parse_argv (homectl.c:3909)
==25155==    by 0x43999C: run (homectl.c:5606)
==25155==    by 0x4399F5: main (homectl.c:5613)
==25155==
==25155== LEAK SUMMARY:
==25155==    definitely lost: 8 bytes in 1 blocks

After:

==25224== HEAP SUMMARY:
==25224==     in use at exit: 12,871 bytes in 38 blocks
==25224==   total heap usage: 90 allocs, 52 frees, 53,964 bytes allocated
==25224==
==25224== LEAK SUMMARY:
==25224==    definitely lost: 0 bytes in 0 blocks

Follow-up-for: aaf057c4bbc6055040d7d2c1ec3655ff89249ebd

12 days agotest: expand testcases to include resolvectl --json usage 38960/head
Nick Rosbrook [Fri, 10 Oct 2025 19:56:36 +0000 (15:56 -0400)] 
test: expand testcases to include resolvectl --json usage

12 days agoresolvectl: implement --json flag for resolvectl status
Nick Rosbrook [Fri, 10 Oct 2025 19:56:36 +0000 (15:56 -0400)] 
resolvectl: implement --json flag for resolvectl status

Add --json support for all status commands in resolvectl by making use
of the new DumpDNSConfiguration varlink method. E.g,

$ resolvectl --json=pretty status eth0
[
{
"ifname" : "eth0",
"ifindex" : 9,
"defaultRoute" : true,
"currentServer" : {
                        "addressString" : "10.148.181.1",
"address" : [
10,
148,
181,
1
],
"family" : 2,
"port" : 53,
"ifindex" : 9,
"accessible" : true
},
"servers" : [
{
                                "addressString" : "10.148.181.1",
"address" : [
10,
148,
181,
1
],
"family" : 2,
"port" : 53,
"ifindex" : 9,
"accessible" : true
}
],
"searchDomains" : [
{
"name" : "local",
"routeOnly" : false,
"ifindex" : 9
}
],
"dnssec" : "allow-downgrade",
"dnsOverTLS" : "no",
"llmnr" : "no",
"mDNS" : "no",
"scopes" : [
{
"protocol" : "dns",
"ifindex" : 9,
"ifname" : "eth0",
"dnssec" : "allow-downgrade",
"dnsOverTLS" : "no"
}
]
}
]

Like the regular status output, fields are omitted all together when
empty, unless explicitly requested via one of the sub-commands dns,
domain, nta, etc.

12 days agoresolve: add DumpDNSConfiguration to varlink API
Nick Rosbrook [Fri, 10 Oct 2025 19:56:35 +0000 (15:56 -0400)] 
resolve: add DumpDNSConfiguration to varlink API

Add io.systemd.Resolve.DumpDNSConfiguration. This provides the same
information as io.systemd.Resolve.Monitor.SubscribeDNSConfiguration,
but just returns the configuration once without the subscription logic.

In order to use the same definitions for DNSConfiguration et al. between
both interfaces, move the definitions to io.systemd.Resolve, and include
them in io.systemd.Resolve.Monitor.

This will be used to implement --json for resolvectl status.

12 days agowait-online: ignore unused DNSConfiguration fields when dispatching JSON
Nick Rosbrook [Fri, 17 Oct 2025 16:12:18 +0000 (12:12 -0400)] 
wait-online: ignore unused DNSConfiguration fields when dispatching JSON

The io.systemd.Resolve.Monitor.DNSConfiguration type is being expanded,
but we do not need the extra information for determining online status.

Ignore these fields when dispatching JSON to avoid "Unrecognized object field"
messages adding noise to systemd-networkd-wait-online debug output.

12 days agowait-online: dispatch DNSConfiguration with SD_JSON_ALLOW_EXTENSIONS
Nick Rosbrook [Fri, 17 Oct 2025 16:14:13 +0000 (12:14 -0400)] 
wait-online: dispatch DNSConfiguration with SD_JSON_ALLOW_EXTENSIONS

Currently if an unknown field is encountered in the JSON, it is a fatal
error. Dispatch with SD_JSON_ALLOW_EXTENSIONS to avoid this.

12 days agoresolve: add formatted address string to DNSServer
Nick Rosbrook [Fri, 10 Oct 2025 20:06:47 +0000 (16:06 -0400)] 
resolve: add formatted address string to DNSServer

Although the JSON output is mostly intended to be machine readable,
humans also consume the output through logs and scripts.

Add an addressString field to DNSServer to improve human-readability.

12 days agoresolve: add fallback servers list to DNSConfiguration
Nick Rosbrook [Fri, 10 Oct 2025 19:56:35 +0000 (15:56 -0400)] 
resolve: add fallback servers list to DNSConfiguration

This is one of several commits to expand the DNSConfiguration varlink
type to include the necessary information for resolvectl status output.

12 days agoresolve: add resolv.conf mode to DNSConfiguration
Nick Rosbrook [Fri, 10 Oct 2025 19:56:34 +0000 (15:56 -0400)] 
resolve: add resolv.conf mode to DNSConfiguration

This is one of several commits to expand the DNSConfiguration varlink
type to include the necessary information for resolvectl status output.

12 days agoresolve: add all protocol modes to DNSConfiguration
Nick Rosbrook [Fri, 10 Oct 2025 19:56:34 +0000 (15:56 -0400)] 
resolve: add all protocol modes to DNSConfiguration

This is one of several commits to expand the DNSConfiguration varlink
type to include the necessary information for resolvectl status output.

12 days agoresolve: add DNS scope info to DNSConfiguration
Nick Rosbrook [Fri, 10 Oct 2025 19:56:34 +0000 (15:56 -0400)] 
resolve: add DNS scope info to DNSConfiguration

This is one of several commits to expand the DNSConfiguration varlink
type to include the necessary information for resolvectl status output.

12 days agoresolve: add negative trust anchors to DNSConfiguration
Nick Rosbrook [Fri, 10 Oct 2025 19:56:33 +0000 (15:56 -0400)] 
resolve: add negative trust anchors to DNSConfiguration

This is one of several commits to expand the DNSConfiguration varlink
type to include the necessary information for resolvectl status output.

12 days agoresolve: add delegate info to DNSConfiguration
Nick Rosbrook [Fri, 10 Oct 2025 19:56:33 +0000 (15:56 -0400)] 
resolve: add delegate info to DNSConfiguration

This is one of several commits to expand the DNSConfiguration varlink
type to include the necessary information for resolvectl status output.

12 days agoresolve: add {global,link}_dns_configuration_json_append() helpers
Nick Rosbrook [Fri, 10 Oct 2025 19:56:33 +0000 (15:56 -0400)] 
resolve: add {global,link}_dns_configuration_json_append() helpers

No functional change, just add these helpers to improve readability in
dns_configuration_json_append(). This is preparation for later commits.

12 days agoman: clarify what “failed” means
Christoph Anton Mitterer [Sun, 2 Nov 2025 19:13:35 +0000 (20:13 +0100)] 
man: clarify what “failed” means

systemd.service(5)’s documentation of `ExecCondition=` uses “failed” with
respect to the unit active state.
In particular the unit won’t be considered failed when `ExecCondition=`’s
command exits with a status of 1 through 254 (inclusive). It will however, when
it exits with 255 or abnormally (e.g. timeout, killed by a signal, etc.).

The table “Defined $SERVICE_RESULT values” in systemd.exec(5) uses “failed”
however rather with respect to the condition.

Tests seem to have shown that, if the exit status of the `ExecCondition=`
command is one of 1 through 254 (inclusive), `$SERVICE_RESULT` will be
`exec-condition`, if it is 255, `$SERVICE_RESULT` will be `exit-code` (but
`$EXIT_CODE` and `$EXIT_STATUS` will be empty or unset), if it’s killed because
of `SIGKILL`, `$SERVICE_RESULT` will `signal` and if it times out,
`$SERVICE_RESULT` will be `timeout`.

This commit clarifies the table at least for the case of an exit status of 1
through 254 (inclusive).
The others (signal, timeout and 255 are probably also still ambiguous (e.g.
`signal` uses “A service process”, which could be considered as the actual
service process only).

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
12 days agosystemctl.xml: unify ellipsis (#39586)
Managor [Thu, 6 Nov 2025 09:34:57 +0000 (11:34 +0200)] 
systemctl.xml: unify ellipsis (#39586)

The reverts in #39423 brought this back. This PR will unify the page.

12 days agossh-generator: filter out bogus vsock addresses 39578/head
Zbigniew Jędrzejewski-Szmek [Wed, 5 Nov 2025 17:39:09 +0000 (18:39 +0100)] 
ssh-generator: filter out bogus vsock addresses

When VirtIO VSOCK device is not present, IOCTL_VM_SOCKETS_GET_LOCAL_CID
returns VMADDR_CID_LOCAL/1, and we issue a hint to connect to vsock%1.
This does not work. Filter out VMADDR_CID_LOCAL and VMADDR_CID_HOST,
those are not real addresses that can be used from the outside.

13 days agonss-resolve: fix the ip addr family validity check method
jouyouyun [Wed, 5 Nov 2025 10:03:34 +0000 (18:03 +0800)] 
nss-resolve: fix the ip addr family validity check method

`i` only counts the number of matches with the current family,
while `n_addresses` counts the number of matches with the family INET or INET6.
If the address contains both INET and INET6, `assert(i == n_addresses)` will fail.

13 days agosystemctl: Support --timestamp for otherwise named properties
Chris Down [Wed, 5 Nov 2025 09:46:40 +0000 (17:46 +0800)] 
systemctl: Support --timestamp for otherwise named properties

`systemctl show`'s `--timestamp` flag is supposed to reformat all
timestamp-based properties. However, the logic for detecting these
properties was incomplete and only checked if the name ended in
Timestamp.

Expand the check to explicitly include some non-"timestamp" named
properties that really are timestamps.

Fixes: https://github.com/systemd/systemd/issues/39282
13 days agoman: fix username prefix mentioned in manual for capsule users (#39573)
Nils K [Wed, 5 Nov 2025 22:33:56 +0000 (23:33 +0100)] 
man: fix username prefix mentioned in manual for capsule users (#39573)

13 days agotest: wait until the nspawn process is completely dead (#39576)
Luca Boccassi [Wed, 5 Nov 2025 19:39:10 +0000 (19:39 +0000)] 
test: wait until the nspawn process is completely dead  (#39576)

Before calling io.systemd.MachineImage.List.

The systemd-nspawn process takes a lock in the run() function in
nspawn.c and holds it for the entire runtime of that function. If we
call `machinectl terminate` the machine gets unregistered _before_ we
release the lock, so the original `machinectl status` check would return
early, allowing for a race where we call io.systemd.MachineImage.List
over Varlink when systemd-nspawn still holds the lock because the
process is still running.:

```
[   41.691826] TEST-13-NSPAWN.sh[1102]: + machinectl terminate long-running
[   41.695009] systemd-nspawn[2171]: Trying to halt container by sending TERM to container PID 1. Send SIGTERM again to trigger immediate termination.
[   41.698235] systemd-machined[1192]: Machine long-running terminated.
[   41.709520] TEST-13-NSPAWN.sh[1102]: + systemctl kill --signal=KILL systemd-nspawn@long-running.service
[   41.709169] systemd-nspawn[2171]: Failed to unregister machine: No machine 'long-running' known
[   41.720869] TEST-13-NSPAWN.sh[2346]: + varlinkctl --more call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{}'
[   41.723359] TEST-13-NSPAWN.sh[2347]: + grep long-running
...
[   41.735453] TEST-13-NSPAWN.sh[2352]: + varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running", "acquireMetadata": "yes"}'
[   41.736222] TEST-13-NSPAWN.sh[2353]: + grep OSRelease
[   41.739500] TEST-13-NSPAWN.sh[2352]: Method call io.systemd.MachineImage.List() failed: Device or resource busy
[   41.740641] systemd[1]: Received SIGCHLD.
[   41.740670] systemd[1]: Child 2171 (systemd-nspawn) died (code=killed, status=9/KILL)
[   41.740725] systemd[1]: systemd-nspawn@long-running.service: Child 2171 belongs to systemd-nspawn@long-running.service.
[   41.740748] systemd[1]: systemd-nspawn@long-running.service: Main process exited, code=killed, status=9/KILL
[   41.740755] systemd[1]: systemd-nspawn@long-running.service: Will spawn child (service_enter_stop_post): systemd-nspawn
[   41.740872] systemd[1]: systemd-nspawn@long-running.service: About to execute: systemd-nspawn --cleanup --machine=long-running
...
```

Let's mitigate this by waiting until the corresponding
systemd-nspawn@.service instance enters the 'inactive' state where the
lock should be properly released.

Resolves: https://github.com/systemd/systemd/issues/39547

13 days agotest-network: fix issues when running with sanitizers (#39572)
Luca Boccassi [Wed, 5 Nov 2025 17:40:29 +0000 (17:40 +0000)] 
test-network: fix issues when running with sanitizers (#39572)

13 days agotest: wait for the backgrounded socat job
Frantisek Sumsal [Wed, 5 Nov 2025 14:47:46 +0000 (15:47 +0100)] 
test: wait for the backgrounded socat job

It should exit on its own anyway and this will work even if the job has
already finished* (unlike kill).

[*] assuming job control is off, as it's the case when running the
    test suite

Resolves: #39543

13 days agobasic/vsock: report result of IOCTL_VM_SOCKETS_GET_LOCAL_CID
Zbigniew Jędrzejewski-Szmek [Fri, 24 Oct 2025 08:29:03 +0000 (10:29 +0200)] 
basic/vsock: report result of IOCTL_VM_SOCKETS_GET_LOCAL_CID

13 days agotest: wait until the nspawn process is completely dead 39576/head
Frantisek Sumsal [Wed, 5 Nov 2025 17:13:58 +0000 (18:13 +0100)] 
test: wait until the nspawn process is completely dead

Before calling io.systemd.MachineImage.List.

The systemd-nspawn process takes a lock in the run() function in
nspawn.c and holds it for the entire runtime of that function. If we
call `machinectl terminate` the machine gets unregistered _before_ we
release the lock, so the original `machinectl status` check would return
early, allowing for a race where we call io.systemd.MachineImage.List
over Varlink when systemd-nspawn still holds the lock because the
process is still running.:

[   41.691826] TEST-13-NSPAWN.sh[1102]: + machinectl terminate long-running
[   41.695009] systemd-nspawn[2171]: Trying to halt container by sending TERM to container PID 1. Send SIGTERM again to trigger immediate termination.
[   41.698235] systemd-machined[1192]: Machine long-running terminated.
[   41.709520] TEST-13-NSPAWN.sh[1102]: + systemctl kill --signal=KILL systemd-nspawn@long-running.service
[   41.709169] systemd-nspawn[2171]: Failed to unregister machine: No machine 'long-running' known
[   41.720869] TEST-13-NSPAWN.sh[2346]: + varlinkctl --more call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{}'
[   41.723359] TEST-13-NSPAWN.sh[2347]: + grep long-running
...
[   41.735453] TEST-13-NSPAWN.sh[2352]: + varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running", "acquireMetadata": "yes"}'
[   41.736222] TEST-13-NSPAWN.sh[2353]: + grep OSRelease
[   41.739500] TEST-13-NSPAWN.sh[2352]: Method call io.systemd.MachineImage.List() failed: Device or resource busy
[   41.740641] systemd[1]: Received SIGCHLD.
[   41.740670] systemd[1]: Child 2171 (systemd-nspawn) died (code=killed, status=9/KILL)
[   41.740725] systemd[1]: systemd-nspawn@long-running.service: Child 2171 belongs to systemd-nspawn@long-running.service.
[   41.740748] systemd[1]: systemd-nspawn@long-running.service: Main process exited, code=killed, status=9/KILL
[   41.740755] systemd[1]: systemd-nspawn@long-running.service: Will spawn child (service_enter_stop_post): systemd-nspawn
[   41.740872] systemd[1]: systemd-nspawn@long-running.service: About to execute: systemd-nspawn --cleanup --machine=long-running
...

Let's mitigate this by waiting until the corresponding
systemd-nspawn@.service instance enters the 'inactive' state where the
lock should be properly released.

Resolves: #39547

13 days agotest: terminate the test containers cleanly on SIGTERM
Frantisek Sumsal [Wed, 5 Nov 2025 17:12:39 +0000 (18:12 +0100)] 
test: terminate the test containers cleanly on SIGTERM

So they exit with 0 instead of 143 when we call `machinectl terminate`
on them.

13 days agotest-network: disable several more sandbox features when running with sanitizers 39572/head
Yu Watanabe [Wed, 5 Nov 2025 15:03:16 +0000 (00:03 +0900)] 
test-network: disable several more sandbox features when running with sanitizers

These settings also imply seccomp.
Hopefully fixes #39567.

13 days agotest-network: read default values from environment variables
Yu Watanabe [Wed, 5 Nov 2025 15:21:22 +0000 (00:21 +0900)] 
test-network: read default values from environment variables

Nowadays, the test script is run as a service, and no argument about
sanitizers are passed. Let's read them from the environment variables.

13 days agocore: Only apply unprivileged userns logic to user managers
Chris Down [Wed, 5 Nov 2025 10:41:17 +0000 (18:41 +0800)] 
core: Only apply unprivileged userns logic to user managers

Commit 38748596f078 ("core: Make DelegateNamespaces= work for user
managers with CAP_SYS_ADMIN") refactored the logic for when an
unprivileged process should create a new user namespace for sandboxing.

This refactor inadvertently removed a check (`params->runtime_scope !=
RUNTIME_SCOPE_USER`) that differentiated between system services and user
services.

This causes a regression in rootless containers where systemd runs
unprivileged. When starting a system service (like `dbus-broker`) that
uses sandboxing features (eg. with `PrivateTmp=yes`), systemd now
incorrectly creates a new, minimal `PRIVATE_USERS_SELF` namespace.

This new namespace only maps UID/GID 0. When dbus-broker attempts to
drop privileges to the `dbus` user (GID 81), the `setresgid(81, 81, 81)`
call fails because GID 81 is not mapped.

Restore the check to ensure that the special unprivileged sandboxing
logic is only applied to user services, as was the original intent.
System services in a rootless context will now correctly run in the
container's main user namespace, where all necessary UIDs/GIDs are
mapped.

Fixes: https://github.com/systemd/systemd/issues/39563
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2391343
13 days agocore/manager: small cleanups (#39562)
Yu Watanabe [Wed, 5 Nov 2025 12:17:54 +0000 (21:17 +0900)] 
core/manager: small cleanups (#39562)

13 days agocore/manager: rearrange several struct fields 39562/head
Mike Yuan [Sun, 26 Oct 2025 20:26:58 +0000 (21:26 +0100)] 
core/manager: rearrange several struct fields

13 days agocore/manager: drop unneeded "struct"
Mike Yuan [Sun, 26 Oct 2025 20:23:34 +0000 (21:23 +0100)] 
core/manager: drop unneeded "struct"

13 days agocore/manager: kill unused default_unit_job_id field
Mike Yuan [Sun, 26 Oct 2025 20:23:55 +0000 (21:23 +0100)] 
core/manager: kill unused default_unit_job_id field

While at it, make sure the "Queued ... job for default target"
message is always logged, i.e. also when we fall back to
start job instead of isolate.

13 days agotpm2-setup: fix typo
Yu Watanabe [Wed, 5 Nov 2025 09:18:46 +0000 (18:18 +0900)] 
tpm2-setup: fix typo

Follow-up for 8a6e77f1a8088bb6c7877e256bcc1f1e71552819.

13 days agotar-util: fix typo
Yu Watanabe [Wed, 5 Nov 2025 09:17:20 +0000 (18:17 +0900)] 
tar-util: fix typo

Follow-up for 4ded7f7a434c59534f65a0f9d391c55961eb110d.

13 days agotree-wide: cleanup headers (#39559)
Daan De Meyer [Wed, 5 Nov 2025 07:41:14 +0000 (08:41 +0100)] 
tree-wide: cleanup headers (#39559)

2 weeks agoTEST-64-UDEV-STORAGE: generate debugging logs
Yu Watanabe [Tue, 4 Nov 2025 18:18:25 +0000 (03:18 +0900)] 
TEST-64-UDEV-STORAGE: generate debugging logs

Let's see if it provides something useful for debugging issue #39544.

2 weeks agosd-dns-resolver: move header to src/systemd 39559/head
Yu Watanabe [Sun, 2 Nov 2025 08:45:43 +0000 (17:45 +0900)] 
sd-dns-resolver: move header to src/systemd

This also adds missing license header.

Follow-up for ee2108dcd5f62593a3081b57cc92b3535d8096fa.

2 weeks agolibsystemd: drop unused header
Yu Watanabe [Tue, 4 Nov 2025 17:42:19 +0000 (02:42 +0900)] 
libsystemd: drop unused header

Follow-up for 2dbf1c0f1556bcf8fbab2491ec0f23a85884c551.

2 weeks agotree-wide: add missing '#pragma once'
Yu Watanabe [Sun, 2 Nov 2025 08:43:14 +0000 (17:43 +0900)] 
tree-wide: add missing '#pragma once'

2 weeks agotest: rework dmsetup test to wait for device to disappear
Luca Boccassi [Tue, 4 Nov 2025 16:54:11 +0000 (16:54 +0000)] 
test: rework dmsetup test to wait for device to disappear

There might be a delay between an umount and a refcounted device
to disappear, so the test can be flaky:

[   36.107128] TEST-50-DISSECT.sh[1662]: ++ dmsetup ls
[   36.108314] TEST-50-DISSECT.sh[1663]: ++ grep loop
[   36.109283] TEST-50-DISSECT.sh[1664]: ++ grep -c verity
[   36.110284] TEST-50-DISSECT.sh[1360]: + test 1 -eq 1
[   36.111555] TEST-50-DISSECT.sh[1360]: + umount -R /tmp/TEST-50-IMAGES.hxm/mount
[   36.112237] TEST-50-DISSECT.sh[1668]: ++ dmsetup ls
[   36.113039] TEST-50-DISSECT.sh[1669]: ++ grep loop
[   36.113833] TEST-50-DISSECT.sh[1670]: ++ grep -c verity
[   36.114517] TEST-50-DISSECT.sh[1360]: + test 0 -eq 1
[   36.116734] TEST-50-DISSECT.sh[1000]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-50-DISSECT.dissect.sh failed'

https://github.com/systemd/systemd/actions/runs/19062162467/job/54444112653?pr=39540#logs

Switch to searching for the dm entry and check for it specifically,
and wait for it to disappear before checking that it is no longer
in the dm table.

Follow-up for 10fc43e504da5962fa5f04341ae8ba92a9981be9

2 weeks agocore/service: reload fixlets (#39376)
Yu Watanabe [Tue, 4 Nov 2025 17:54:38 +0000 (02:54 +0900)] 
core/service: reload fixlets (#39376)

Fixes https://github.com/systemd/systemd/issues/37515

2 weeks agocore/exec-invoke: gracefully handle lack of privilege for initgroups() in user mode...
Yu Watanabe [Tue, 4 Nov 2025 17:53:05 +0000 (02:53 +0900)] 
core/exec-invoke: gracefully handle lack of privilege for initgroups() in user mode (#39039)

Fixes #39038

2 weeks agosysext: Check for /etc/initrd-release in given --root= tree (#39473)
Yu Watanabe [Tue, 4 Nov 2025 17:51:25 +0000 (02:51 +0900)] 
sysext: Check for /etc/initrd-release in given --root= tree (#39473)

2 weeks agosd-json: accept NULL path in sd_json_parse_file_at() too, port one manual fdopen...
Yu Watanabe [Tue, 4 Nov 2025 16:40:27 +0000 (01:40 +0900)] 
sd-json: accept NULL path in sd_json_parse_file_at() too, port one manual fdopen() to it (#39538)

2 weeks agocgls: print error messages when --unit and --user-unit are used together
jouyouyun [Tue, 4 Nov 2025 08:10:31 +0000 (16:10 +0800)] 
cgls: print error messages when --unit and --user-unit are used together

Mixing the `--unit` and `--user-unit` options will result in error messages.
During the parsing phase, only the `arg_show_unit` record of the last
occurrence of the option is used; all names are placed in the same `arg_names`,
thus mixing the two types of units in the query.

For example, `-u foo --user-unit bar` will also treat `foo` as a user unit and
query it in the user service.

2 weeks agosystemctl: Fix shutdown time parsing across DST changes
Chris Down [Tue, 4 Nov 2025 10:19:07 +0000 (18:19 +0800)] 
systemctl: Fix shutdown time parsing across DST changes

When parsing an absolute time specification like `hh:mm` for the
`shutdown` command, the code interprets a time in the past as "tomorrow
at this time". It currently implements this by adding a fixed 24-hour
duration (`USEC_PER_DAY`) to the timestamp.

This assumption breaks across DST transitions, as the day might not be
24 hours long. This can cause the shutdown to be scheduled at the wrong
time (typically off by one hour in either direction).

Change the logic to perform calendar arithmetic instead of timestamp
arithmetic. If the calculated time is in the past, we increment
`tm.tm_mday` and call `mktime_or_timegm_usec()` a second time.

This delegates all date normalization logic to `mktime()`, which
correctly handles all edge cases, including DST transitions, month-end
rollovers, and leap years.

Fixes: https://github.com/systemd/systemd/issues/39232
2 weeks agonss-myhostname: use FAMILY_ADDRESS_SIZE instead of the integer 16 when copying ip...
jouyouyun [Tue, 4 Nov 2025 12:59:01 +0000 (20:59 +0800)] 
nss-myhostname: use FAMILY_ADDRESS_SIZE instead of the integer 16 when copying ip addr

To avoid copying extra characters when using IPv4.

2 weeks agomachined/import: allow running in per-user mode (#38728)
Daan De Meyer [Tue, 4 Nov 2025 16:27:43 +0000 (17:27 +0100)] 
machined/import: allow running in per-user mode (#38728)

2 weeks agocore: use proper service type of TEST-07-PID.user-namespace-path.sh
Quentin Deslandes [Tue, 4 Nov 2025 13:45:15 +0000 (14:45 +0100)] 
core: use proper service type of TEST-07-PID.user-namespace-path.sh

TEST-07-PID.user-namespace-path.sh is flaky as Type=simple is used
(implicitly), explicitly use Type=exec instead to ensure the namespaces
are created before starting another service reusing the same namespaces.

Fixes #39546.

2 weeks agotest: stop piping post-test journalctl commands to /failed
Luca Boccassi [Tue, 4 Nov 2025 12:51:09 +0000 (12:51 +0000)] 
test: stop piping post-test journalctl commands to /failed

We can't see what the actual issues are when tests fail at that point, eg:

https://github.com/systemd/systemd/actions/runs/19034752357/job/54356278052

2 weeks agoupdate TODO 38728/head
Lennart Poettering [Wed, 27 Aug 2025 09:29:43 +0000 (11:29 +0200)] 
update TODO

2 weeks agotest: add test case
Lennart Poettering [Mon, 25 Aug 2025 15:07:20 +0000 (17:07 +0200)] 
test: add test case

2 weeks agotar-util: squash high UIDs in user mode
Lennart Poettering [Fri, 22 Aug 2025 15:28:50 +0000 (17:28 +0200)] 
tar-util: squash high UIDs in user mode

2 weeks agotar-util: add support for acls
Lennart Poettering [Fri, 22 Aug 2025 09:05:38 +0000 (11:05 +0200)] 
tar-util: add support for acls

2 weeks agotar-util: add support for file flags
Lennart Poettering [Thu, 21 Aug 2025 20:40:59 +0000 (22:40 +0200)] 
tar-util: add support for file flags

2 weeks agotar-util: properly deal with sparse files
Lennart Poettering [Thu, 21 Aug 2025 17:08:01 +0000 (19:08 +0200)] 
tar-util: properly deal with sparse files

The extractor already deals with sparse files properly (because
archive_read_data_into_fd() does).

Let's also make sure the archiver also does this, and attaches the
necessary sparse file metadata to each file.

2 weeks agotar-util: recognize hardlinks when generating tarballs
Lennart Poettering [Thu, 21 Aug 2025 12:27:54 +0000 (14:27 +0200)] 
tar-util: recognize hardlinks when generating tarballs

2 weeks agotar-util: include xattrs in generated tarballs
Lennart Poettering [Thu, 21 Aug 2025 10:28:06 +0000 (12:28 +0200)] 
tar-util: include xattrs in generated tarballs

We can already unpack them, let's pack them up to.

2 weeks agoacl-util: add new acl_set_perm() helper
Lennart Poettering [Fri, 22 Aug 2025 09:04:56 +0000 (11:04 +0200)] 
acl-util: add new acl_set_perm() helper

2 weeks agosysext: Check for /etc/initrd-release in given --root= tree 39473/head
Kai Lueke [Tue, 28 Oct 2025 11:56:45 +0000 (20:56 +0900)] 
sysext: Check for /etc/initrd-release in given --root= tree

Both sysext and confext used the host's /etc/initrd-release file even
when --root=/somewhere was specified. A workaround was the
SYSTEMD_IN_INITRD= env var but without knowing this it was quite
confusing. Aside from users validating their extensions, the primary
use case for this to matter is when the extensions are set up from the
initrd where the initrd-release file is present when running but we want
to prepare the extensions for the final system and thus should match
for the right scope.
Make systemd-sysext check for /etc/initrd-release inside the given
--root= tree. An alternative would be to always ignore the
initrd-release check when --root= is passed but this way it is more
consistent. The image policy logic for EFI-loader-passed extensions
won't take effect when --root= is used, though.

2 weeks agotest: Add missing test cleanup for the last sysext test
Kai Lueke [Tue, 28 Oct 2025 15:08:42 +0000 (00:08 +0900)] 
test: Add missing test cleanup for the last sysext test

The last sysext test leaked things into new tests added later,
uncovered by any new tests leftover check.
Remove the mutable folder state through a trap as done in other tests.

2 weeks agovarlink-idl: add infra to test our enum parsers against varlink IDL enums
Lennart Poettering [Tue, 4 Nov 2025 09:35:00 +0000 (10:35 +0100)] 
varlink-idl: add infra to test our enum parsers against varlink IDL enums

In many cases we want to expose enums for which we have the usual
xyz_to_string()/xyz_from_string() via Varlink as enums. Let's add some
infra to test the tables against each other, to automatically detect
when they deviate.

In order to implement this properly, let's export/introduce clean
json_underscorefy()/json_dashify(), for dealing with the fact that our
enums usually use dash separates ames, but Varlink doesn't allow that.

(This does not add the test cases for all enum types we expose right
now, but only adds the general infra).

2 weeks agoTEST-80-NOTIFYACCESS: add test case for #37515 39376/head
Mike Yuan [Tue, 21 Oct 2025 23:34:04 +0000 (01:34 +0200)] 
TEST-80-NOTIFYACCESS: add test case for #37515

2 weeks agocore/service: rework ExecReload= + Type=notify-reload interaction, add ExecReloadPost=
Mike Yuan [Sun, 19 Oct 2025 21:23:17 +0000 (23:23 +0200)] 
core/service: rework ExecReload= + Type=notify-reload interaction, add ExecReloadPost=

When Type=notify-reload got introduced, it wasn't intended to be
mutually exclusive with ExecReload=. However, currently ExecReload=
is immediately forked off after the service main process is signaled,
leaving states in between essentially undefined. Given so broken
it is I doubt any sane user is using this setup, hence I took a stab
to rework everything:

1.  Extensions are refreshed (unchanged)
2.  ExecReload= is forked off without signaling the process
3a. If RELOADING=1 is sent during the ExecReload= invocation,
    we'd refrain from signaling the process again, instead
    just transition to SERVICE_RELOAD_NOTIFY directly and
    wait for READY=1
3b. If not, signal the process after ExecReload= finishes
    (from now on the same as Type=notify-reload w/o ExecReload=)
4.  To accomodate the use case of performing post-reload tasks,
    ExecReloadPost= is introduced which executes after READY=1

The new model greatly simplifies things, as no control processes
will be around in SERVICE_RELOAD_SIGNAL and SERVICE_RELOAD_NOTIFY
states.

See also: https://github.com/systemd/systemd/issues/37515#issuecomment-2891229652

2 weeks agomacro: add 21st case for IN_SET
Mike Yuan [Sun, 19 Oct 2025 23:03:12 +0000 (01:03 +0200)] 
macro: add 21st case for IN_SET

2 weeks agoman/org.freedesktop.systemd1: fix typo (ExecStop -> -Post)
Mike Yuan [Sun, 19 Oct 2025 23:35:08 +0000 (01:35 +0200)] 
man/org.freedesktop.systemd1: fix typo (ExecStop -> -Post)

2 weeks agocore/service: fix missing error handling for refresh-extensions control process
Mike Yuan [Sun, 19 Oct 2025 23:42:57 +0000 (01:42 +0200)] 
core/service: fix missing error handling for refresh-extensions control process

2 weeks agocore/service: reset all reload-related states once a cycle completes
Mike Yuan [Sun, 19 Oct 2025 20:34:42 +0000 (22:34 +0200)] 
core/service: reset all reload-related states once a cycle completes

Fixes #37515

2 weeks agocore/service: consolidate where to initialize reload_result
Mike Yuan [Sun, 19 Oct 2025 20:33:03 +0000 (22:33 +0200)] 
core/service: consolidate where to initialize reload_result

2 weeks agocore/service: forbid reverting STOPPING=1
Mike Yuan [Sun, 19 Oct 2025 19:35:52 +0000 (21:35 +0200)] 
core/service: forbid reverting STOPPING=1

We don't permit state transition from STOPPING back to RUNNING,
hence refrain from resetting notify_state too.

2 weeks agocore/service: split out service_notify_message_process_state()
Mike Yuan [Sun, 19 Oct 2025 19:32:59 +0000 (21:32 +0200)] 
core/service: split out service_notify_message_process_state()

No functional change, preparation for later changes.

2 weeks agocore/service: add missing serialization for notify_state
Mike Yuan [Sun, 19 Oct 2025 19:56:33 +0000 (21:56 +0200)] 
core/service: add missing serialization for notify_state

This really should be persisted across daemon-reload since
it might contain deferred state transitions.

2 weeks agocore/service: remove effectively unused NOTIFY_UNKNOWN state
Mike Yuan [Sun, 19 Oct 2025 19:47:54 +0000 (21:47 +0200)] 
core/service: remove effectively unused NOTIFY_UNKNOWN state

We usually use _INVALID enum value as placeholder.

While at it, reset notify_state in service_enter_dead() for consistency.

2 weeks agocore/service: avoid duplicate unit_add_to_dbus_queue() call
Mike Yuan [Sun, 19 Oct 2025 19:26:48 +0000 (21:26 +0200)] 
core/service: avoid duplicate unit_add_to_dbus_queue() call

If we're changing state anyways, service_set_state() -> unit_notify()
will take care of dbus signaling for us.

2 weeks agocore/service: introduce SERVICE_STATE_WITH_WATCHDOG
Mike Yuan [Sun, 19 Oct 2025 18:27:42 +0000 (20:27 +0200)] 
core/service: introduce SERVICE_STATE_WITH_WATCHDOG

2 weeks agocore: drop redundant pidref_done() calls
Mike Yuan [Sun, 19 Oct 2025 18:14:08 +0000 (20:14 +0200)] 
core: drop redundant pidref_done() calls

{service,socket}_unwatch_control_pid() -> unit_unwatch_pidref_done()
is unconditionally called everywhere.

2 weeks agocore/service: merge service_enter_reload_mounting() into _refresh_extensions()
Mike Yuan [Sun, 19 Oct 2025 17:41:13 +0000 (19:41 +0200)] 
core/service: merge service_enter_reload_mounting() into _refresh_extensions()

2 weeks agocore/service: restore spuriously changed comment
Mike Yuan [Sun, 19 Oct 2025 18:16:05 +0000 (20:16 +0200)] 
core/service: restore spuriously changed comment

Not sure why dfdeb0b1cbb05a213f0965eedfe0e7ef06cd39d3
touched it at all.

2 weeks agocore/service: do not set reload_begin_usec when refreshing confexts
Mike Yuan [Sun, 19 Oct 2025 16:37:41 +0000 (18:37 +0200)] 
core/service: do not set reload_begin_usec when refreshing confexts

reload_begin_usec is a barrier for determining whether RELOADING=1
came after the main process got signaled, unrelated to refreshing.

2 weeks agocore/service: no need for STATUS_TEXT_MAX to reside in header
Mike Yuan [Sun, 19 Oct 2025 19:43:27 +0000 (21:43 +0200)] 
core/service: no need for STATUS_TEXT_MAX to reside in header

2 weeks agocore/job: use UNIT_IS_* helpers
Mike Yuan [Wed, 22 Oct 2025 18:16:55 +0000 (20:16 +0200)] 
core/job: use UNIT_IS_* helpers

2 weeks agocore/job: drop pure qualifier for static inline functions
Mike Yuan [Wed, 22 Oct 2025 18:53:15 +0000 (20:53 +0200)] 
core/job: drop pure qualifier for static inline functions

The impl is directly visible to the compiler so it can apply
all sorts of optimizations wherever it sees fit. And with
the previous commit they are actually "const".

2 weeks agocore/job: mark job_type_lookup_merge() and _is_redundant() as const
Mike Yuan [Wed, 22 Oct 2025 18:50:17 +0000 (20:50 +0200)] 
core/job: mark job_type_lookup_merge() and _is_redundant() as const

They don't take pointers, hence are eligible for stronger guarantees.