]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agobasic/rlimit-util.c: drop duplicate checks 38063/head
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 08:48:14 +0000 (10:48 +0200)] 
basic/rlimit-util.c: drop duplicate checks

parse_sec() and parse_time() already handle "infinity".
TEST(rlimit_parse_format) covered the first case, also extend it to cover
the second case.

4 months agobasic/rlimit-util.c: align table
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 08:47:32 +0000 (10:47 +0200)] 
basic/rlimit-util.c: align table

4 months agotest-dirent-util: remove strange whitespace
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 15:23:08 +0000 (17:23 +0200)] 
test-dirent-util: remove strange whitespace

4 months agotests: use log_tests_skipped more, use shorter form
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 15:22:45 +0000 (17:22 +0200)] 
tests: use log_tests_skipped more, use shorter form

Also change order to handle errors before 0 in one case.

4 months agotest-utf8: drop explicit setting of colors
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 11:13:44 +0000 (13:13 +0200)] 
test-utf8: drop explicit setting of colors

It was added in 82208a9949ff96abfd41ea3dd969fa7501ee4686, but since
13ee93978479b80e980d8551c689a7087bf1817e, we enable colors by default.
I don't think this function is doing anything useful.

4 months agoshared/bus-unit-util: stop unsing strndupa 37665/head
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jul 2025 07:51:00 +0000 (09:51 +0200)] 
shared/bus-unit-util: stop unsing strndupa

Those are user-controlled strings, so let's use heap allocations in the usual
fashion. (Though, with strndupa_safe, the allocations were bounded anyway, so
ultimately this doesn't matter.)

4 months agoshell-completions: add systemd-analyze transient-settings
Zbigniew Jędrzejewski-Szmek [Mon, 2 Jun 2025 18:42:54 +0000 (20:42 +0200)] 
shell-completions: add systemd-analyze transient-settings

The zsh completions only complete one type argument, even though multiple
args are allowed. But the same issue occurs with other completions, e.g.
for options. I don't know how to solve this.

4 months agodocs/TRANSIENT-SETTINGS: update lists
Zbigniew Jędrzejewski-Szmek [Mon, 2 Jun 2025 13:15:38 +0000 (15:15 +0200)] 
docs/TRANSIENT-SETTINGS: update lists

Those lists were partially wrong and partially outdated. We should generate
this document automatically, but let's revisit this topic after the conversion
to sphinx. For now, as a stop-gap solution, I generated the lists from
the new 'systemd-analyze transient-settings' command.

4 months agoanalyze: add transient-settings verb
Zbigniew Jędrzejewski-Szmek [Fri, 30 May 2025 10:15:13 +0000 (12:15 +0200)] 
analyze: add transient-settings verb

Related to https://github.com/systemd/systemd/pull/37641.

The name "transient settings" was used in docs/TRANSIENT-SETTINGS.md.
Using "setting" helps distinguish this from D-Bus "properties", which are
a much larger set, partially overlapping.

4 months agoshared/bus-unit-util: add bus_dump_transient_settings() helper
Zbigniew Jędrzejewski-Szmek [Thu, 29 May 2025 12:37:30 +0000 (14:37 +0200)] 
shared/bus-unit-util: add bus_dump_transient_settings() helper

bus_append_unit_property() and associated functions accept a long list of
properties. But the specific names are only available through code. But it is
useful to be able to know the specific list of properties that is supported, in
particular for shell completions. Thus, add a way to list the properties that
are supported by the code.

In the future we could also turn this into a test for the documentation. For
various reasons, the list of properties listed in the docs is a partially
overlapping set. E.g. for service type, the pull request
https://github.com/systemd/systemd/pull/37661 creates a list with 212 entries,
and this code generates 7 entries less and 184 more. I didn't check all the
differences, but in the few cases I did, the list generated here was actually
correctly supported by 'systemd-run -p'.

A smoke test is added.

4 months agoshared/bus-unit-util: convert to a table
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 17:29:51 +0000 (19:29 +0200)] 
shared/bus-unit-util: convert to a table

4 months agoshared/bus-unit-util: add helper for TimeoutSec=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 16:11:57 +0000 (18:11 +0200)] 
shared/bus-unit-util: add helper for TimeoutSec=

4 months agoshared/bus-unit-util: add define to shorten common append pattern
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 15:18:28 +0000 (17:18 +0200)] 
shared/bus-unit-util: add define to shorten common append pattern

4 months agoshared/bus-unit-util: add helper for AppArmorProfile=/SmackProcessLabel=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:46:32 +0000 (16:46 +0200)] 
shared/bus-unit-util: add helper for AppArmorProfile=/SmackProcessLabel=

4 months agoshared/bus-unit-util: add helper for CPUQuotaPeriodSec=ManagedOOMMemoryPressureDurati...
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:44:01 +0000 (16:44 +0200)] 
shared/bus-unit-util: add helper for CPUQuotaPeriodSec=ManagedOOMMemoryPressureDurationSec=

4 months agoshared/bus-unit-util: add helper for unit deps
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:41:29 +0000 (16:41 +0200)] 
shared/bus-unit-util: add helper for unit deps

4 months agoshared/bus-unit-util: define helper for conditions and asserts
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:37:24 +0000 (16:37 +0200)] 
shared/bus-unit-util: define helper for conditions and asserts

The function has "try" in the name because it dynamically checks
if the field name matches.

4 months agoshared/bus-unit-util: define helper for SuccessActionExitStatus= and friend
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:23:31 +0000 (16:23 +0200)] 
shared/bus-unit-util: define helper for SuccessActionExitStatus= and friend

4 months agoshared/bus-unit-util: add helper for TimersCalendar property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:16:04 +0000 (16:16 +0200)] 
shared/bus-unit-util: add helper for TimersCalendar property

4 months agoshared/bus-unit-util: add helper for TimersMonotonic property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:14:44 +0000 (16:14 +0200)] 
shared/bus-unit-util: add helper for TimersMonotonic property

4 months agoshared/bus-unit-util: add helper for Listen property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:13:03 +0000 (16:13 +0200)] 
shared/bus-unit-util: add helper for Listen property

4 months agoshared/bus-unit-util: use common helper for various strv properties
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:10:30 +0000 (16:10 +0200)] 
shared/bus-unit-util: use common helper for various strv properties

4 months agoshared/bus-unit-util: define helper for SuccessExitStatus= and friends
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:08:52 +0000 (16:08 +0200)] 
shared/bus-unit-util: define helper for SuccessExitStatus= and friends

4 months agoshared/bus-unit-util: define helper for Paths property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:05:33 +0000 (16:05 +0200)] 
shared/bus-unit-util: define helper for Paths property

4 months agotest: drop ProtectHostnameEx, add one test for ProtectHostnameEx
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:38:29 +0000 (13:38 +0200)] 
test: drop ProtectHostnameEx, add one test for ProtectHostnameEx

This is a separate commit because the parent commit is supposed to be
backward compatible, i.e. the tests must pass with both the bogus ProtectHostnameEx
name and ProtectHostname.

A test is added for ProtectHostnameEx to verify that it is still accepted
for backward compat.

4 months agoshared/bus-unit-util: add helper for ProtectHostnameEx and fix naming confusion
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:58:02 +0000 (17:58 +0200)] 
shared/bus-unit-util: add helper for ProtectHostnameEx and fix naming confusion

As with grandparent commit for ImportCredentialEx=, the whole series of commits
that extended ProtectHostname was confused (6746f288548a240148c7c9643e14996bfe960017,
cf48bde7aea52b18ac3fa218d3f60fd3d533ef66e76fcd0e40a6910f4818a374c6a8d854d644ff93),
because it added ProtectHostnameEx in places where parsing of ProtectHostname
should be have been extended.

Accept ProtectHostname=… with the new extended syntax, keep accepting
ProtectHostnameEx=… for compat with release v257. Prefer sending ProtectHostname.

Partially resolves https://github.com/systemd/systemd/issues/37174.

4 months agoshared/bus-unit-util: add a helper function for directory args
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:56:02 +0000 (17:56 +0200)] 
shared/bus-unit-util: add a helper function for directory args

4 months agoshared/bus-unit-util: define helper for ExtensionImages=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:23:26 +0000 (14:23 +0200)] 
shared/bus-unit-util: define helper for ExtensionImages=

4 months agoshared/bus-unit-util: define helper for MountImages=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:23:10 +0000 (14:23 +0200)] 
shared/bus-unit-util: define helper for MountImages=

4 months agoshared/bus-unit-util: define helper for RootImageOptions=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:21:43 +0000 (14:21 +0200)] 
shared/bus-unit-util: define helper for RootImageOptions=

4 months agoshared/bus-unit-util: define helper for RootHashSignature=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:20:51 +0000 (14:20 +0200)] 
shared/bus-unit-util: define helper for RootHashSignature=

4 months agoshared/bus-unit-util: define helper for RootHash=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:19:29 +0000 (14:19 +0200)] 
shared/bus-unit-util: define helper for RootHash=

4 months agoshared/bus-unit-util: define helper for TemporaryFileSystem=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:18:31 +0000 (14:18 +0200)] 
shared/bus-unit-util: define helper for TemporaryFileSystem=

4 months agoshared/bus-unit-util: define helper for BindPaths=/BindReadOnlyPaths=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:17:34 +0000 (14:17 +0200)] 
shared/bus-unit-util: define helper for BindPaths=/BindReadOnlyPaths=

4 months agoshared/bus-unit-util: define helper for RestrictNamespaces=/DelegateNamespaces=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:15:46 +0000 (14:15 +0200)] 
shared/bus-unit-util: define helper for RestrictNamespaces=/DelegateNamespaces=

4 months agoshared/bus-unit-util: add helper for filter lists
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:54:06 +0000 (17:54 +0200)] 
shared/bus-unit-util: add helper for filter lists

4 months agoshared/bus-unit-util: add helper for NUMAMask=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:32:20 +0000 (17:32 +0200)] 
shared/bus-unit-util: add helper for NUMAMask=

4 months agoshared/bus-unit-util: use common helper for NUMAPolicy=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:26:54 +0000 (17:26 +0200)] 
shared/bus-unit-util: use common helper for NUMAPolicy=

4 months agoshared/bus-unit-util: define helper for CPUAffinity=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:07:50 +0000 (14:07 +0200)] 
shared/bus-unit-util: define helper for CPUAffinity=

4 months agoshared/bus-unit-util: define helper for CapabilityBoundingSet=/AmbientCapabilities=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:24:53 +0000 (17:24 +0200)] 
shared/bus-unit-util: define helper for CapabilityBoundingSet=/AmbientCapabilities=

4 months agoshared/bus-unit-util: define helper function for rlimits
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 15:06:12 +0000 (17:06 +0200)] 
shared/bus-unit-util: define helper function for rlimits

Strictly speaking, we call startswith twice now. This duplication
shall be eliminated later.

4 months agoshared/bus-unit-util: define helper for StandardInputData=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:06:32 +0000 (14:06 +0200)] 
shared/bus-unit-util: define helper for StandardInputData=

4 months agoshared/bus-unit-util: define helper for StandardInputText=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:06:23 +0000 (14:06 +0200)] 
shared/bus-unit-util: define helper for StandardInputText=

4 months agoshared/bus-unit-util: define helper functions for StandardInput/Output/Error=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 14:55:34 +0000 (16:55 +0200)] 
shared/bus-unit-util: define helper functions for StandardInput/Output/Error=

4 months agoshared/bus-unit-util: define helper for LogFilterPatterns=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:05:04 +0000 (14:05 +0200)] 
shared/bus-unit-util: define helper for LogFilterPatterns=

4 months agoshared/bus-unit-util: define helper for LogExtraFields=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 14:49:41 +0000 (16:49 +0200)] 
shared/bus-unit-util: define helper for LogExtraFields=

4 months agoTEST-54-CREDS: s/ImportCredentialEx/ImportCredential/ except for one place
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 13:48:55 +0000 (15:48 +0200)] 
TEST-54-CREDS: s/ImportCredentialEx/ImportCredential/ except for one place

This is a separate commit because the tests are supposed to pass with both
the old spelling and the new.

4 months agoshared/bus-unit-util: add helper for ImportCredentialEx= and fix naming confusion
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:03:32 +0000 (14:03 +0200)] 
shared/bus-unit-util: add helper for ImportCredentialEx= and fix naming confusion

We add D-Bus properties like "*Ex" because we cannot change the D-Bus property
type without breaking backward comapatibility. But those names are only for
D-Bus, not for config file stanzas or the command-line parser. There, we can
change the type, or in other words, there is no type, just a free-form string
whose interpretation we can extend or change. Commit
831f208783aeac443e6f2fc2efc3119535a032ef that added ProtectHostnameEx was
confused, because it added ImportCredentialEx in places where parsing of
ImportCredential should be have been extended.

On D-Bus, we send ImportCrednential in preference, and ImportCredentialEx only
when required. This way we send less bytes on the wire and support older
systems that don't understand the new property.

Partially resolves https://github.com/systemd/systemd/issues/37174.

4 months agoshared/bus-unit-util: define helper for LoadCredential=/LoadCredentialEncrypted=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:02:56 +0000 (14:02 +0200)] 
shared/bus-unit-util: define helper for LoadCredential=/LoadCredentialEncrypted=

4 months agoshared/bus-unit-util: define helper for SetCredential=/SetCredentialEncrypted=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 12:02:27 +0000 (14:02 +0200)] 
shared/bus-unit-util: define helper for SetCredential=/SetCredentialEncrypted=

4 months agoshared/bus-unit-util: define helper function for EnvironmentFile=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 14:45:49 +0000 (16:45 +0200)] 
shared/bus-unit-util: define helper function for EnvironmentFile=

4 months agoshared/bus-unit-util: add helper for SocketBindAllow=/SocketBindDeny=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:58:11 +0000 (13:58 +0200)] 
shared/bus-unit-util: add helper for SocketBindAllow=/SocketBindDeny=

4 months agoshared/bus-unit-util: define helper for BPFProgram=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:57:29 +0000 (13:57 +0200)] 
shared/bus-unit-util: define helper for BPFProgram=

4 months agoshared/bus-unit-util: add helper for IPIngressFilterPath=/IPEgressFilterPath=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 14:36:03 +0000 (16:36 +0200)] 
shared/bus-unit-util: add helper for IPIngressFilterPath=/IPEgressFilterPath=

4 months agoshared/bus-unit-util: define helper function for IPAddressAllow=/IPAddressDeny=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 14:18:50 +0000 (16:18 +0200)] 
shared/bus-unit-util: define helper function for IPAddressAllow=/IPAddressDeny=

4 months agoshared/bus-unit-util: define helper for IODeviceLatencyTargetSec=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:54:12 +0000 (13:54 +0200)] 
shared/bus-unit-util: define helper for IODeviceLatencyTargetSec=

4 months agoshared/bus-unit-util: define helper for IODeviceWeight=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:53:25 +0000 (13:53 +0200)] 
shared/bus-unit-util: define helper for IODeviceWeight=

4 months agoshared/bus-unit-util: add helper for group io limits
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:51:47 +0000 (13:51 +0200)] 
shared/bus-unit-util: add helper for group io limits

4 months agoshared/bus-unit-util: define helper for DeviceAllow=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 14:17:50 +0000 (16:17 +0200)] 
shared/bus-unit-util: define helper for DeviceAllow=

4 months agobasic/cgroup-util: align tables
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 13:58:22 +0000 (15:58 +0200)] 
basic/cgroup-util: align tables

4 months agoshared/bus-unit-util: define helper function for CPUQuota=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 13:43:55 +0000 (15:43 +0200)] 
shared/bus-unit-util: define helper function for CPUQuota=

Unfortunately we can't nicely fold it in with the other helpers, because
of the unusual naming mismatch: CPUQuota vs. CPUQuotaPerSecUSec.

4 months agoshared/bus-unit-util: define helper function for resource limits
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 13:28:59 +0000 (15:28 +0200)] 
shared/bus-unit-util: define helper function for resource limits

4 months agoshared/bus-unit-util: define helper for Delegate=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:44:09 +0000 (13:44 +0200)] 
shared/bus-unit-util: define helper for Delegate=

4 months agoshared/bus-unit-util: define helper for StartupAllowedMemoryNodes= and friends
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:43:09 +0000 (13:43 +0200)] 
shared/bus-unit-util: define helper for StartupAllowedMemoryNodes= and friends

4 months agoshared/bus-unit-util: define helper for ManagedOOMMemoryPressureLimit=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 13:24:34 +0000 (15:24 +0200)] 
shared/bus-unit-util: define helper for ManagedOOMMemoryPressureLimit=

4 months agoshared/bus-unit-util: fix appending of IODeviceLatencyTargetSec=
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 12:42:02 +0000 (14:42 +0200)] 
shared/bus-unit-util: fix appending of IODeviceLatencyTargetSec=

4 months agoshared/bus-unit-util: use common helper in one more place
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jun 2025 12:31:18 +0000 (14:31 +0200)] 
shared/bus-unit-util: use common helper in one more place

4 months agoRename STRV_MAKE_EMPTY to just STRV_EMPTY
Zbigniew Jędrzejewski-Szmek [Wed, 4 Jun 2025 07:10:12 +0000 (09:10 +0200)] 
Rename STRV_MAKE_EMPTY to just STRV_EMPTY

Even though this creates a stack allocation, it is not a function macro, so
drop the "make" from the name.

4 months agoshared/bus-unit-util: drop spurious parentheses
Zbigniew Jędrzejewski-Szmek [Thu, 29 May 2025 09:39:48 +0000 (11:39 +0200)] 
shared/bus-unit-util: drop spurious parentheses

4 months agologind: Don't match non-leader processes for utmp TTY determination (#38027)
Lennart Poettering [Thu, 3 Jul 2025 07:20:19 +0000 (09:20 +0200)] 
logind: Don't match non-leader processes for utmp TTY determination (#38027)

This ensures we don't erroneously assign pseudoterminals created by
terminal emulators that use utempter to register themselves in utmp when
run under a GUI session that doesn't have a TTY assigned.

4 months agoFixes for vscode/intellisense parsing (#38040)
Yu Watanabe [Thu, 3 Jul 2025 03:46:57 +0000 (12:46 +0900)] 
Fixes for vscode/intellisense parsing (#38040)

With these two changes the vscode parser works nicely again. Once the
EDG frontend adds support for this feature I'll fix it to check for the
fixed version like for GCC.

4 months agoudev-builtin-uaccess: open device node with O_PATH
Yu Watanabe [Wed, 2 Jul 2025 23:15:51 +0000 (08:15 +0900)] 
udev-builtin-uaccess: open device node with O_PATH

Some device node refuses to be opened with read-write mode.
Let's not open with O_RDWR, but open with O_PATH, and use
FORMAT_PROC_FD_PATH().

Follow-up for 1abb592f2f886913492e4967cc96816c167177a9.

Fixes #38033.

4 months agocore/transaction: minor tweaks for cyclic dependency logging (#38014)
Yu Watanabe [Thu, 3 Jul 2025 03:45:47 +0000 (12:45 +0900)] 
core/transaction: minor tweaks for cyclic dependency logging (#38014)

4 months agomeson: make -Wsequence-point warning critical
Yu Watanabe [Tue, 1 Jul 2025 04:00:08 +0000 (13:00 +0900)] 
meson: make -Wsequence-point warning critical

It detects e.g. multiple evaluations in macro.

4 months agologind: use manager_get_session_by_leader in manager_get_session_by_pidref 38027/head
Myrrh Periwinkle [Wed, 2 Jul 2025 15:18:33 +0000 (22:18 +0700)] 
logind: use manager_get_session_by_leader in manager_get_session_by_pidref

4 months agobuild(deps): bump meson from 1.8.1 to 1.8.2 in /.github/workflows
dependabot[bot] [Tue, 1 Jul 2025 10:54:38 +0000 (10:54 +0000)] 
build(deps): bump meson from 1.8.1 to 1.8.2 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.8.1...1.8.2)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agobuild(deps): bump redhat-plumbers-in-action/advanced-issue-labeler
dependabot[bot] [Tue, 1 Jul 2025 10:35:53 +0000 (10:35 +0000)] 
build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler

Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 3.2.0 to 3.2.2.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/compare/d498805e5c7c0658e336948b3363480bcfd68da6...0db433d412193574252480b4fc22f2e4319a4ea3)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agomacro: EDG compiler frontends doesn't support enum types 38040/head
Luca Boccassi [Thu, 3 Jul 2025 00:23:31 +0000 (01:23 +0100)] 
macro: EDG compiler frontends doesn't support enum types

It declares STDC_VERSION 202311L but still doesn't support this feature:

https://en.cppreference.com/w/c/compiler_support/23

The EDG frontend is used by intellisense, which is the default
engine in VSCode, so parsing is currently broken and tons of
spurious errors are shown. Skip this feature when this
compiler frontend is used.

Follow-up for 92100f14c3b054903053559ed831a1b25033046c

4 months agosd-common: do not fail preprocessor when intellisense is parsing the header
Luca Boccassi [Thu, 3 Jul 2025 00:21:19 +0000 (01:21 +0100)] 
sd-common: do not fail preprocessor when intellisense is parsing the header

Just like coverity or clang analyzer, intellisense will parse _sd-common.h and
fail because of the #error so skip it like the others

4 months agotest-xattr-util.c: migrate to new assertion macros (#38025)
Yaping Li [Thu, 3 Jul 2025 00:06:04 +0000 (17:06 -0700)] 
test-xattr-util.c: migrate to new assertion macros (#38025)

We recently added a new set of assertion macros such as ASSERT_GE,
ASSERT_OK, ASSERT_EQ, ... which show not only the expression that failed
but also the values of the arguments of the expression. Let's use them.

4 months agotest: improve printing of assertion errors, allow more failures (#38004)
Yu Watanabe [Thu, 3 Jul 2025 00:01:22 +0000 (09:01 +0900)] 
test: improve printing of assertion errors, allow more failures (#38004)

4 months agotest-dns-search-domain: several cleanups
Yu Watanabe [Mon, 30 Jun 2025 08:17:22 +0000 (17:17 +0900)] 
test-dns-search-domain: several cleanups

- use STRV_MAKE() macro,
- add several missing assertions,
- use more suitable ASSERT_XYZ() macros,
- drop TEST(dns_search_domain_unlink_all), as it is already tested in
  TEST(dns_search_domain_new_system_limit).

4 months agouserdbctl: Fix error handling
DaanDeMeyer [Wed, 2 Jul 2025 13:15:32 +0000 (15:15 +0200)] 
userdbctl: Fix error handling

4 months agoNEWS: fix typo
Yu Watanabe [Wed, 2 Jul 2025 21:57:23 +0000 (06:57 +0900)] 
NEWS: fix typo

4 months agocore/socket: introduce DeferTrigger= (#37505)
Yu Watanabe [Wed, 2 Jul 2025 21:33:23 +0000 (06:33 +0900)] 
core/socket: introduce DeferTrigger= (#37505)

Follow-up for #37222 and #37421

4 months agopcrlock: include pcrlock features in exit status
Lennart Poettering [Wed, 2 Jul 2025 13:46:34 +0000 (15:46 +0200)] 
pcrlock: include pcrlock features in exit status

Fixes: #38019
4 months agologind: pick up tty info from utmp only for tty sessions (#38034)
Lennart Poettering [Wed, 2 Jul 2025 20:42:56 +0000 (22:42 +0200)] 
logind: pick up tty info from utmp only for tty sessions (#38034)

Alternative for: #38027

4 months agoupdate NEWS with even more features for v258
Lennart Poettering [Wed, 2 Jul 2025 16:21:19 +0000 (18:21 +0200)] 
update NEWS with even more features for v258

4 months agologind: pick up tty info from utmp only for tty sessions 38034/head
Lennart Poettering [Wed, 2 Jul 2025 14:25:42 +0000 (16:25 +0200)] 
logind: pick up tty info from utmp only for tty sessions

Let's tighten the rules for picking up TTY information from utmp: let's
do so only for TTY session, nothing else. Apparently people have issues
with graphical sessions with certain terminal emulators that install
entries in utmp for each emulator window.

Alternative for: #38027

4 months agologind: use memdup_suffix0() where appropiate
Lennart Poettering [Wed, 2 Jul 2025 14:25:00 +0000 (16:25 +0200)] 
logind: use memdup_suffix0() where appropiate

memdup_suffix0() is the call of choice when we are dealing with an input
that might not be NUL terminated. strndup() assumes NUL termination.

4 months agozsh: remove _files prefixes
peelz [Wed, 2 Jul 2025 00:39:42 +0000 (20:39 -0400)] 
zsh: remove _files prefixes

Prefixes would be nice, but they appear to be very buggy.

A few examples:
- `udevadm test-builtin net_setup_link /sys<TAB><TAB>`: `/sysblock/`
- `udevadm test-builtin net_setup_link /sys/<TAB><TAB>`: `/sys/bin/`
- `journalctl /dev<TAB>`: `/dev//dev/`

4 months agologind: Don't match non-leader processes for utmp TTY determination
Myrrh Periwinkle [Wed, 2 Jul 2025 05:53:15 +0000 (12:53 +0700)] 
logind: Don't match non-leader processes for utmp TTY determination

This ensures we don't erroneously assign pseudoterminals created by
terminal emulators that use utempter to register themselves in utmp when
run under a GUI session that doesn't have a TTY assigned.

4 months agotests: print errno name rather than the message 38004/head
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jul 2025 15:43:45 +0000 (17:43 +0200)] 
tests: print errno name rather than the message

The tests are written and consumed by developers. Errno descriptions are good
for users, but for developers the errno "name" is actually more useful, and
we need to always map the description back to the name to compare with the
code. Let's make things simpler for ourselves by printing the errno names
directly.

Example output:

src/test/test-tests.c:15: Assertion failed: Expected "-1" to succeed, but got error: -1/EPERM
src/test/test-tests.c:16: Assertion failed: Expected "-ENOANO" to succeed, but got error: -55/ENOANO
src/test/test-tests.c:20: Assertion failed: Expected "0" to be positive, but it is zero.
src/test/test-tests.c:62: Assertion failed: Expected "RET_NERRNO(mkdir("/i/will/fail/with/enoent", 666))" to fail with error -55/ENOANO, but got -2/ENOENT
src/test/test-tests.c:68: Assertion failed: Expected "0" to fail with errno 2/ENOENT, but it succeeded
src/test/test-tests.c:70: Assertion failed: Expected "mkdir("/i/will/fail/with/enoent", 666)" to fail with errno 55/ENOANO, but got 2/ENOENT

4 months agobasic/errno-list: add helper to print errno names
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 19:34:10 +0000 (21:34 +0200)] 
basic/errno-list: add helper to print errno names

4 months agotest-cgroup-util: print info about process before asserting
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 19:08:19 +0000 (21:08 +0200)] 
test-cgroup-util: print info about process before asserting

If this tests ever fails again, we should have at least a chance
to figure out what went wrong.

4 months agotest-cgroup-util: ignore -ENXIO in more places
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 19:00:16 +0000 (21:00 +0200)] 
test-cgroup-util: ignore -ENXIO in more places

In https://github.com/systemd/systemd/pull/38003, one test failed:
Unit tests / build (CLANG_ASAN_UBSAN):
src/test/test-cgroup-util.c:237: Assertion failed: Expected "r" to succeed, but got error: No such device or address

Checks for specific errors were added in ca82f0cbe2db096bc7ff81280b5683ea1beae534,
partially relaxed in e92d699dde746355bba893b2375b7937a52d9e05.
cg_pidref_get_unit() and cg_pid_get_slice() enter a deep chain of calls,
so it's hard to guess where the failure occurred. But those two calls
expect the cgroup path to be "well formed". When we're running in CI,
we don't have full control over what is happening on the machine,
so let's suppress that error too.

4 months agotest-cgroup-util: minor simplification
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 18:14:06 +0000 (20:14 +0200)] 
test-cgroup-util: minor simplification

4 months agotests: use new ASSERT_OK_OR macro
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 18:12:32 +0000 (20:12 +0200)] 
tests: use new ASSERT_OK_OR macro

4 months agotests: add new ASSERT_OK_OR macro
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 17:11:13 +0000 (19:11 +0200)] 
tests: add new ASSERT_OK_OR macro

IN_SET() fails if __VA_ARGS__ is just one item. I inserted a bogus 0 item into
the check to work around this.

4 months agotests: print numeric error value too on failure
Zbigniew Jędrzejewski-Szmek [Sat, 28 Jun 2025 17:02:50 +0000 (19:02 +0200)] 
tests: print numeric error value too on failure

The error message is not always meaningful. Also, sometimes we care about the
sign of the value, and we ignore the sign of the error in the printing machinery.

The messages for errno are changed to say "errno" instead of "error". The problem with
the previous formalation is that our errors are always negative and errnos are
positive, so when we print the numerical value, we cannot use the word for both.

Example output:
src/test/test-tests.c:15: Assertion failed: Expected "-1" to succeed, but got error: -1/Operation not permitted
src/test/test-tests.c:16: Assertion failed: Expected "-ENOANO" to succeed, but got error: -55/No anode
src/test/test-tests.c:61: Assertion failed: Expected "0" to fail with error -2/"No such file or directory", but it succeeded
src/test/test-tests.c:62: Assertion failed: Expected "RET_NERRNO(mkdir("/i/will/fail/with/enoent", 666))" to fail with error -55/"No anode", but got the following error: -2/No such file or directory
src/test/test-tests.c:68: Assertion failed: Expected "0" to fail with errno 2/"No such file or directory", but it succeeded
src/test/test-tests.c:70: Assertion failed: Expected "mkdir("/i/will/fail/with/enoent", 666)" to fail with errno 55/"No anode", but got the following errno: 2/No such file or directory