]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agosync-docs: add '(latest stable)' next to the latest version in the menu 37663/head
Luca Boccassi [Fri, 30 May 2025 01:03:08 +0000 (02:03 +0100)] 
sync-docs: add '(latest stable)' next to the latest version in the menu

Add visual indicator of what is the latest version in the
version menu

5 months agosync-docs: fix selection menu when opening 'latest' man
Luca Boccassi [Fri, 30 May 2025 01:02:01 +0000 (02:02 +0100)] 
sync-docs: fix selection menu when opening 'latest' man

'devel' will always sort first, so the highest version is the second
entry, not the first one

5 months agosync-docs: fix syntax warning
Luca Boccassi [Fri, 30 May 2025 00:59:15 +0000 (01:59 +0100)] 
sync-docs: fix syntax warning

sync-docs.py:94: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("v?(\d+).*", tag)

5 months agoNEWS: fix typos
Jörg Behrmann [Thu, 29 May 2025 18:30:11 +0000 (20:30 +0200)] 
NEWS: fix typos

5 months agoUse DCS sequence to query terminal name and set $TERM automatically (#37538)
Mike Yuan [Thu, 29 May 2025 19:01:01 +0000 (21:01 +0200)] 
Use DCS sequence to query terminal name and set $TERM automatically (#37538)

This code seems to work quickly and nicely for a bunch of modern
terminals. Setting $TERM automatically removes an common annoyance for
users. This code will not work for all terminal emulators, but by adding
it in systemd we'll entice maintainers of those terminals to add support
for the sequences. For the terminals that don't support the sequence, we
get a bit of a slowdown of `< 1 ms`, which seems hardly noticeable. The
user can always set TERM explicitly to avoid this if upgrading to a
newer terminal emulator is not possible.

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

5 months agopo: Translated using Weblate (Georgian)
Temuri Doghonadze [Thu, 29 May 2025 16:48:14 +0000 (16:48 +0000)] 
po: Translated using Weblate (Georgian)

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main

5 months agobasic/terminal-util: drop now-unused default_term_for_tty 37538/head
Zbigniew Jędrzejewski-Szmek [Tue, 27 May 2025 16:12:00 +0000 (18:12 +0200)] 
basic/terminal-util: drop now-unused default_term_for_tty

5 months agocore: use terminal DCS sequence to set $TERM
Zbigniew Jędrzejewski-Szmek [Tue, 20 May 2025 17:02:31 +0000 (19:02 +0200)] 
core: use terminal DCS sequence to set $TERM

query_term_for_tty() is used in two places: in fixup_environment(),
which affects PID1 itself, and in build_environment(), which affects
spawned services. There is obviously some cost to the extra call,
but I think it's worthwhile to do it. When $TERM is set incorrectly,
basic output works OK, but then there are various annoying corner
cases. In particular, we get the support for color (or lack of it)
wrong, and when output is garbled, users are annoyed. Things like
text editors are almost certain to behave incorrectly. Testing in
test-terminal-util indicates that the time required to make a successful
query is on the order of a dozen microseconds, and an unsuccessful
query costs as much as our timeout, i.e. currently 1/3 ms. I think
this is an acceptable tradeoff.

No caching is used, because fixup_environment() is only called once,
and the other place in build_environment(), only affects services
which are connected to a tty, which is only a handful of services,
and often only started in special circumstances.

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

5 months agobasic/terminal-util: add a heuristic check whether terminfo file exists
Zbigniew Jędrzejewski-Szmek [Mon, 19 May 2025 13:50:42 +0000 (15:50 +0200)] 
basic/terminal-util: add a heuristic check whether terminfo file exists

5 months agotest-terminal-util: print how long the asynchronous queries take
Zbigniew Jędrzejewski-Szmek [Sat, 17 May 2025 14:07:50 +0000 (16:07 +0200)] 
test-terminal-util: print how long the asynchronous queries take

5 months agobasic/terminal-util: query terminal name by DCS
Zbigniew Jędrzejewski-Szmek [Fri, 16 May 2025 13:30:02 +0000 (15:30 +0200)] 
basic/terminal-util: query terminal name by DCS

As requested in https://github.com/systemd/systemd/issues/36994,
use DCS + q name ST. This works, but has limited terminal support:
xterm, foot, kitty.

5 months agoMerge remote-tracking branch 'systemd-security/coredump-d'
Zbigniew Jędrzejewski-Szmek [Thu, 29 May 2025 15:22:19 +0000 (17:22 +0200)] 
Merge remote-tracking branch 'systemd-security/coredump-d'

5 months agologin: receive synthetic events for devices with 'uaccess' tag (#37654)
Luca Boccassi [Thu, 29 May 2025 14:11:14 +0000 (15:11 +0100)] 
login: receive synthetic events for devices with 'uaccess' tag (#37654)

Fixes #37579.

5 months agosysupdate: change status once operation has completed
Luca Boccassi [Wed, 28 May 2025 23:36:47 +0000 (00:36 +0100)] 
sysupdate: change status once operation has completed

Otherwise after the service exits it will still show
"Installing 'foobar'" as the status, which is confusing

5 months agoNEWS: fix description of CopyFiles==::fsverity=copy
Allison Karlitskaya [Thu, 29 May 2025 07:18:30 +0000 (09:18 +0200)] 
NEWS: fix description of CopyFiles==::fsverity=copy

This doesn't enable fs-verity on every file, but preserves the fs-verity
status that was present to start with.

5 months agodocs: add man pages for `sd_device_enumerator_add_match_*` (#37589)
Shubhendra Kushwaha [Thu, 29 May 2025 09:40:18 +0000 (15:10 +0530)] 
docs: add man pages for `sd_device_enumerator_add_match_*` (#37589)

Add man pages for:
- `sd_device_enumerator_add_all_parents`
- `sd_device_enumerator_add_match_parent`
- `sd_device_enumerator_add_match_property`
- `sd_device_enumerator_add_match_property_required`
- `sd_device_enumerator_add_match_subsystem`
- `sd_device_enumerator_add_match_sysattr`
- `sd_device_enumerator_add_match_sysname`
- `sd_device_enumerator_add_match_tag`
- `sd_device_enumerator_add_nomatch_sysname`
- `sd_device_enumerator_allow_uninitialized`.

Related to #20929

5 months agologin: add several debugging logs about synthetic events 37654/head
Yu Watanabe [Thu, 29 May 2025 02:05:29 +0000 (11:05 +0900)] 
login: add several debugging logs about synthetic events

5 months agologin: add device monitor instance to receive events for devices with uaccess tag
Yu Watanabe [Thu, 29 May 2025 01:22:21 +0000 (10:22 +0900)] 
login: add device monitor instance to receive events for devices with uaccess tag

With c960ca2be1cfd183675df581f049a0c022c1c802, logind triggers uevents
for devices with uaccess tag, and waits for the events being processed
by udevd.
However, logind received not all triggered events, and might lose some
events. That causes session and user state file not updated, and many
desktop environment application handled the session and user were inactive.

This introduces one more device monitor instance which monitor events
for devices with 'uaccess' tag. Hence, all triggered events will be
recieved by logind, and session and user state file will be updated.

Follow-up for c960ca2be1cfd183675df581f049a0c022c1c802.
Fixes #37579.

5 months agossh-generator: two cleanups (#37649)
Mike Yuan [Thu, 29 May 2025 00:26:44 +0000 (02:26 +0200)] 
ssh-generator: two cleanups (#37649)

5 months agotest: fix TEST-84-STORAGETM with nvme-cli < 2.7
Luca Boccassi [Wed, 28 May 2025 22:48:27 +0000 (23:48 +0100)] 
test: fix TEST-84-STORAGETM with nvme-cli < 2.7

The -vv parameter was added in version 2.7, check before using it

Follow-up for ebc0514a6507d51e536b269e30a036a7992beeb7

5 months agoDefine helper to call PR_SET_DUMPABLE
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 16:31:13 +0000 (18:31 +0200)] 
Define helper to call PR_SET_DUMPABLE

5 months agocoredump: introduce an enum to wrap dumpable constants
Zbigniew Jędrzejewski-Szmek [Tue, 27 May 2025 18:32:30 +0000 (20:32 +0200)] 
coredump: introduce an enum to wrap dumpable constants

Two constants are described in the man page, but are not defined by a header.
The third constant is described in the kernel docs. Use explicit values to
show that those are values are defined externally.

5 months agocoredump: when %F/pidfd is used, again allow forwarding to containers
Zbigniew Jędrzejewski-Szmek [Tue, 27 May 2025 08:44:32 +0000 (10:44 +0200)] 
coredump: when %F/pidfd is used, again allow forwarding to containers

5 months agocoredump: add support for new %F PIDFD specifier
Luca Boccassi [Sun, 13 Apr 2025 21:10:36 +0000 (22:10 +0100)] 
coredump: add support for new %F PIDFD specifier

A new core_pattern specifier was added, %F, to provide a PIDFD
to the usermode helper process referring to the crashed process.
This removes all possible race conditions, ensuring only the
crashed process gets inspected by systemd-coredump.

5 months agocoredump: get rid of a bogus assertion
Zbigniew Jędrzejewski-Szmek [Mon, 26 May 2025 13:24:04 +0000 (15:24 +0200)] 
coredump: get rid of a bogus assertion

The check looks plausible, but when I started checking whether it needs
to be lowered for the recent changes, I realized that it doesn't make
much sense.

context_parse_iovw() is called from a few places, e.g.:
- process_socket(), where the other side controls the contents of the
  message. We already do other checks on the correctness of the message
  and this assert is not needed.
- gather_pid_metadata_from_argv(), which is called after
  inserting MESSAGE_ID= and PRIORITY= into the array, so there is no
  direct relation between _META_ARGV_MAX and the number of args in the
  iovw.
- gather_pid_metadata_from_procfs(), where we insert a bazillion fields,
  but without any relation to _META_ARGV_MAX.

Since we already separately check if the required stuff was set, drop this
misleading check.

5 months agocoredump: also stop forwarding non-dumpable processes
Zbigniew Jędrzejewski-Szmek [Mon, 5 May 2025 13:48:40 +0000 (15:48 +0200)] 
coredump: also stop forwarding non-dumpable processes

See the comment in the patch for details.

Suggested-by: Qualys Security Advisory <qsa@qualys.com>
5 months agocoredump: use %d in kernel core pattern
Zbigniew Jędrzejewski-Szmek [Tue, 29 Apr 2025 12:47:59 +0000 (14:47 +0200)] 
coredump: use %d in kernel core pattern

The kernel provides %d which is documented as
"dump mode—same as value returned by prctl(2) PR_GET_DUMPABLE".

We already query /proc/pid/auxv for this information, but unfortunately this
check is subject to a race, because the crashed process may be replaced by an
attacker before we read this data, for example replacing a SUID process that
was killed by a signal with another process that is not SUID, tricking us into
making the coredump of the original process readable by the attacker.

With this patch, we effectively add one more check to the list of conditions
that need be satisfied if we are to make the coredump accessible to the user.

Reportedy-by: Qualys Security Advisory <qsa@qualys.com>
In principle, %d might return a value other than 0, 1, or 2 in the future.
Thus, we accept those, but emit a notice.

5 months agoupdate NEWS
Lennart Poettering [Wed, 28 May 2025 20:56:26 +0000 (22:56 +0200)] 
update NEWS

5 months agomeson: improve -ffinite-math-only option detection and silence warning when build...
Mike Yuan [Wed, 28 May 2025 20:42:39 +0000 (22:42 +0200)] 
meson: improve -ffinite-math-only option detection and silence warning when build with -Ofast (#37638)

5 months agossh-generator: add missing newline before [Service] and trailing NL to generated... 37649/head
Mike Yuan [Wed, 28 May 2025 20:30:46 +0000 (22:30 +0200)] 
ssh-generator: add missing newline before [Service] and trailing NL to generated service

5 months agossh-generator: fix typo
Mike Yuan [Wed, 28 May 2025 20:30:39 +0000 (22:30 +0200)] 
ssh-generator: fix typo

5 months agoNEWS: fix typo
Yu Watanabe [Wed, 28 May 2025 19:03:00 +0000 (04:03 +0900)] 
NEWS: fix typo

5 months agoNEWS: fix typos and formatting
Luca Boccassi [Wed, 28 May 2025 18:49:56 +0000 (19:49 +0100)] 
NEWS: fix typos and formatting

5 months agojournal-gatewayd: add /boots endpoint (#37574)
Jan Čermák [Wed, 28 May 2025 18:33:03 +0000 (20:33 +0200)] 
journal-gatewayd: add /boots endpoint (#37574)

Add endpoint for listing boots. Output format mimics `journalctl
--list-boots -o json`, so it's a plain array containing index, boot ID
and timestamps of the first and last entry. Initial implementation
returns boots ordered starting with the current one and doesn't allow
any filtering (i.e. equivalent of --lines argument).

Fixes: #37573
5 months agoMan page fixes (#37645)
Luca Boccassi [Wed, 28 May 2025 18:15:46 +0000 (19:15 +0100)] 
Man page fixes (#37645)

5 months agoNEWS: fix typo, reorganize a few entries
Mike Yuan [Wed, 28 May 2025 17:24:49 +0000 (19:24 +0200)] 
NEWS: fix typo, reorganize a few entries

5 months agoupdate TODO
Lennart Poettering [Wed, 28 May 2025 16:28:35 +0000 (18:28 +0200)] 
update TODO

5 months agoupdate NEWS in preparation for v258
Lennart Poettering [Wed, 28 May 2025 14:29:18 +0000 (16:29 +0200)] 
update NEWS in preparation for v258

5 months agopo: Translated using Weblate (Dutch)
Tim Vangehugten [Wed, 28 May 2025 09:31:44 +0000 (09:31 +0000)] 
po: Translated using Weblate (Dutch)

Currently translated at 92.2% (237 of 257 strings)

Co-authored-by: Tim Vangehugten <timvangehugten@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/nl/
Translation: systemd/main

5 months agoman: better tags, more links, minor grammar and formatting improvements 37645/head
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:20:50 +0000 (15:20 +0200)] 
man: better tags, more links, minor grammar and formatting improvements

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

5 months agoman/systemd.network: reword description of MulticastIGMPVersion=
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:31:19 +0000 (15:31 +0200)] 
man/systemd.network: reword description of MulticastIGMPVersion=

5 months agoman/systemd.timer: change to positive wording
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:30:20 +0000 (15:30 +0200)] 
man/systemd.timer: change to positive wording

5 months agoman: reword descriptions of numerical fields
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:30:05 +0000 (15:30 +0200)] 
man: reword descriptions of numerical fields

A "string" is a concept in C. In a text-based API, this is implicit, especially
if we say that something was "formatted". So change occurences of "decimal
string" to just "decimal". Similarly, "numerics" is unclear, say "digits".

Also, a "timestamp is in a clock" just sounds wrong. Reword those sentences.

5 months agoman/systemd-resolved: update description of routing
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:25:47 +0000 (15:25 +0200)] 
man/systemd-resolved: update description of routing

5 months agoman/systemd-analyze: rewrite "Exit status" section
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:25:23 +0000 (15:25 +0200)] 
man/systemd-analyze: rewrite "Exit status" section

5 months agoman/pam_systemd: use <constant> consistently
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:23:48 +0000 (15:23 +0200)] 
man/pam_systemd: use <constant> consistently

For some reason, <constant> and <literal> were used interchangeably.

5 months agoman: introduce openssl as man page provider and use it for ukify.1
Zbigniew Jędrzejewski-Szmek [Wed, 28 May 2025 13:23:03 +0000 (15:23 +0200)] 
man: introduce openssl as man page provider and use it for ukify.1

5 months agonetwork: fix handling of ENODATA when reading IFLA_MASTER attribute (#37633)
Luca Boccassi [Wed, 28 May 2025 11:20:00 +0000 (12:20 +0100)] 
network: fix handling of ENODATA when reading IFLA_MASTER attribute (#37633)

Fixes #37629.

5 months agosd-bus: rename internal structs and enums
Yu Watanabe [Wed, 28 May 2025 02:14:41 +0000 (11:14 +0900)] 
sd-bus: rename internal structs and enums

This renames e.g. struct bus_body_part -> BusMessageBodyPart to
follow our usual coding style. Also, several struct and enum
declarations are moved to relevant headers.
Also, this introduces bus-forward.h.

5 months agozsh-completion: improve systemd-run
Eisuke Kawashima [Tue, 27 May 2025 06:43:07 +0000 (15:43 +0900)] 
zsh-completion: improve systemd-run

- add missed options
- improve completion for property

5 months agocgroup-util: drop CGROUP_MASK_EXTEND_JOINED; move CGROUP_CPU_SHARES/BLKIO* to nspawn...
Yu Watanabe [Wed, 28 May 2025 00:50:05 +0000 (09:50 +0900)] 
cgroup-util: drop CGROUP_MASK_EXTEND_JOINED; move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci (#37639)

5 months agocore/exec-invoke: don't set $TMPDIR if sandboxing is disabled (#37637)
Yu Watanabe [Wed, 28 May 2025 00:46:06 +0000 (09:46 +0900)] 
core/exec-invoke: don't set $TMPDIR if sandboxing is disabled (#37637)

Follow-ups for #37271.

5 months agocgroup-util: drop CGROUP_MASK_EXTEND_JOINED 37639/head
Mike Yuan [Tue, 27 May 2025 15:42:02 +0000 (17:42 +0200)] 
cgroup-util: drop CGROUP_MASK_EXTEND_JOINED

Also kill the "compat pair invalidation" logic in unit_invalidate_cgroup()

5 months agocgroup-util: move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci
Mike Yuan [Tue, 27 May 2025 15:06:36 +0000 (17:06 +0200)] 
cgroup-util: move CGROUP_CPU_SHARES/BLKIO* to nspawn-oci

These are only used for translation from OCI metadata
to cgroup v2 values.

5 months agobus-print-properties: drop *CPUShares formatter
Mike Yuan [Tue, 27 May 2025 15:00:49 +0000 (17:00 +0200)] 
bus-print-properties: drop *CPUShares formatter

5 months agotest-execute: add test case for PrivateTmp=disconnected + DefaultDependencies=no... 37637/head
Mike Yuan [Tue, 27 May 2025 21:15:10 +0000 (23:15 +0200)] 
test-execute: add test case for PrivateTmp=disconnected + DefaultDependencies=no + sandboxing disabled via '+' prefix

5 months agomeson: also disable -Wmaybe-uninitialized when -Ofast is specified 37638/head
Yu Watanabe [Tue, 27 May 2025 20:43:48 +0000 (05:43 +0900)] 
meson: also disable -Wmaybe-uninitialized when -Ofast is specified

At least with GCC-14, -Ofast produces many false-positive warnings.
```
$ gcc --version
gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
```

5 months agomeson: check -ffinite-math-only in more detail
Yu Watanabe [Tue, 27 May 2025 20:39:37 +0000 (05:39 +0900)] 
meson: check -ffinite-math-only in more detail

Even if -fno-finite-math-only is specified, -ffinite-math-only,
-ffast-math, or -Ofast may be also specified after that. In that case,
-fno-finite-math-only has no effect, and test-json will fail.

Replaces #37603.

5 months agocore/exec-invoke: don't set $TMPDIR if sandboxing is disabled
Mike Yuan [Tue, 27 May 2025 20:35:03 +0000 (22:35 +0200)] 
core/exec-invoke: don't set $TMPDIR if sandboxing is disabled

Follow-up for 6156bec7a464815084fa5218fe782ea6cb20ad52

5 months agotimedate: print better errors when systemd-timesyncd.service unavailable
Nick Rosbrook [Fri, 23 May 2025 21:10:02 +0000 (17:10 -0400)] 
timedate: print better errors when systemd-timesyncd.service unavailable

If the error is a common bus error indicating the service is not
available, print a more user-friendly message indicating so.

5 months agoshared: add optional error parameter in bus_print_all_properties()
Nick Rosbrook [Tue, 27 May 2025 15:58:29 +0000 (11:58 -0400)] 
shared: add optional error parameter in bus_print_all_properties()

While here, remove the unused found_properties parameter.

This is preparation for another commit.

5 months agotest-network: replace unnecessary assertRegex() with assertIn() 37633/head
Yu Watanabe [Tue, 27 May 2025 14:42:33 +0000 (23:42 +0900)] 
test-network: replace unnecessary assertRegex() with assertIn()

This fixes the following warning:
```
/tmp/systemd/test/test-network/systemd-networkd-tests.py:5107: SyntaxWarning: invalid escape sequence '\.'
  self.assertRegex(output, 'inet 10\.234\.77\.111/32.*dummy98')
```

Follow-up for 6479204e567cd55e1bfc5894131fba80ea68a780.

5 months agotest-network: add test case for issue #37629
Yu Watanabe [Tue, 27 May 2025 14:31:48 +0000 (23:31 +0900)] 
test-network: add test case for issue #37629

5 months agonetwork/link: update state file when master ifindex is changed
Yu Watanabe [Tue, 27 May 2025 17:09:52 +0000 (02:09 +0900)] 
network/link: update state file when master ifindex is changed

If master ifindex is non-zero, then the carrier state and operational
state of the interface may be the enslaved state.
As the operational state is saved in link state file, and read by
wait-online, we need to update the state file when the master ifindex is
changed.

5 months agonetwork/link: ENODATA from reading IFLA_MASTER when an interface has no master
Yu Watanabe [Tue, 27 May 2025 14:17:40 +0000 (23:17 +0900)] 
network/link: ENODATA from reading IFLA_MASTER when an interface has no master

When an interface leaved from the master interface, then reading
IFLA_MASTER attribute causes ENODATA. When the interface was previously
enslaved to another interface, we need to remove reference to the
interface from the previous master interface.

This is especially important when
```
ip link set dev eth0 nomaster
```
is called.

Fixes a bug introduced by 0d411b7f8f5407e9ce84dcb4ede0b029ade7fede (v249).
Fixes #37629.

5 months agocgroup-util: minor cleanups (#37630)
Yu Watanabe [Tue, 27 May 2025 17:19:21 +0000 (02:19 +0900)] 
cgroup-util: minor cleanups (#37630)

5 months agomkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2...
Daan De Meyer [Tue, 27 May 2025 16:31:48 +0000 (18:31 +0200)] 
mkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2 (#37632)

5e739ef1ed mkosi-initrd: Optionally match t64 suffix for tss2
libraries
*   ec70393077 Merge pull request https://github.com/systemd/mkosi/pull/3742 from DaanDeMeyer/man
|\
| * 94cc136fbe mkosi-tools: Install man tool and pages as part of misc
profile
| * eda2ed533d Enforce C.UTF-8 locale for all commands we run
* | 9821e9a3e3 sandbox: Support using mkosi-sandbox as a library
* | 4145382edf Serialize pid in state and check if still exists on load
* |   3d119cba07 Merge pull request https://github.com/systemd/mkosi/pull/3736 from DaanDeMeyer/rpm-gpgkey
|\ \
| |/
|/|
| * 0a5d87b7bb Only pick up /etc/pki/tls and /etc/pki/ca-trust as
certificate dirs
| * c30eee187f Look for rpm gpg keys from inside the sandbox
|/
ef2842dfea Fix version bump check if image version was passed on CLI
12b6251153 apt: Install apt sources if apt was installed via base tree
a0b4e1af9a Make sure git doesn't fail when running as root
585a47705d repart: use --append-fstab=auto if available
cec6ae1dda sandbox: handle case where dev node for tty doesn't exist
a60dade823 initrd: shadow-utils removal is only necessary on old
Fedora
ca11acbd5b Use SPDX identifier instead of file path for license in
pyproject.toml
4d031bc57d Revert license-files property
*   c80dd09008 Merge pull request https://github.com/systemd/mkosi/pull/3722 from behrmann/versiontweaks
|\
| * c76e5dc4bc make version test more readable
| * 90ba99dde1 version: add __repr__ to GenericVersion
|/
dd794ec832 Fix licenses path in pyproject.toml
*   7eeb749840 Merge pull request https://github.com/systemd/mkosi/pull/3702 from aafeijoo-suse/initrd-kmp
|\
| * 565b905aa1 mkosi-initrd: handle symlinks under weak-updates
| * a83ccc10c7 mkosi-initrd: perform basic checks on the kernel dir
before calling mkosi
| * 73cad79c9e mkosi-initrd: --kernel-modules-include ->
--kernel-modules
bac76904c3 build(deps): bump github/codeql-action from 3.28.13 to
3.28.16
44161624a2 Supress ssh unit generation if sshd is not present
b8758dac28 Partially revert 640000a861e9cd9a3807e4158e110a098c74d078
6f11937dc6 Don't use default value if optional settings are set to
none
640000a861 Use a default tools tree by default if mkosi.tools.conf
exists
63d91cc285 mkosi: Override misconfigured gitconfig HTTP/HTTPS proxy
with ProxyUrl
a859b5eb13 Make sure we create the default workspace directory as well

5 months agotest: fix test_qdisc_tbf regex with iproute2 v6.15
Luca Boccassi [Tue, 27 May 2025 13:56:32 +0000 (14:56 +0100)] 
test: fix test_qdisc_tbf regex with iproute2 v6.15

iproute2 v6.15 fixed some rounding errors in the reported stats:

https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=d947f365602b30657d1b797e7464000d0ab88d5a

so the current regex doesn't work anymore. Fix it to check for both
old and new values.

systemd-networkd-tests.py[523]: FAIL: test_qdisc_tbf (__main__.NetworkdTCTests.test_qdisc_tbf)
systemd-networkd-tests.py[523]: ----------------------------------------------------------------------
systemd-networkd-tests.py[523]: Traceback (most recent call last):
systemd-networkd-tests.py[523]:   File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5402, in test_qdisc_tbf
systemd-networkd-tests.py[523]:     self.assertRegex(output, 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms')
systemd-networkd-tests.py[523]:     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
systemd-networkd-tests.py[523]: AssertionError: Regex didn't match: 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms' not found in 'qdisc tbf 35: root refcnt 2 rate 1Gbit burst 5000b peakrate 100Gbit minburst 999200b lat 70ms \nqdisc pfifo 37: parent 35: limit 100000p'

5 months agobpf-program: check if a trivial BPF program can be created and loaded
Yu Watanabe [Fri, 23 May 2025 17:38:46 +0000 (02:38 +0900)] 
bpf-program: check if a trivial BPF program can be created and loaded

Re-introduce the check dropped by
ec3c5cfac74e8361a3b0153cc9e8cfdbbcbde0c6,
ad446c8ceb97c03971f06fd43e97720afe33be5a.

For some reasons, if we are running on LXC, even if bpf_program_supported()
returned true, but bpf_program_load_kernel() failed:
```
Attaching device control BPF program to cgroup /system.slice/test-bpf-devices-875b406d56ac7bc3.scope/186c411f6e991777 failed: Operation not permitted
src/test/test-bpf-devices.c:31: Assertion failed: Expected "r" to succeed, but got error: Operation not permitted
```

5 months agoin-addr-util: use s6_addr* macros everywhere
Jan Vaclav [Tue, 27 May 2025 07:55:50 +0000 (09:55 +0200)] 
in-addr-util: use s6_addr* macros everywhere

Currently, the code in in-addr-util.c uses a mix of accessing the
in6_u members directly, as well as using the s6_addr* macros.
Let's unify it so that the s6_addr macros are used everwhere.

5 months agocgroup-util: assert on attribute for cg_{get,set}_attribute() 37630/head
Mike Yuan [Tue, 27 May 2025 12:25:12 +0000 (14:25 +0200)] 
cgroup-util: assert on attribute for cg_{get,set}_attribute()

It makes zero sense to ever perform IO operations on cgroup dirs.

5 months agocgroup-util: make cg_get_attribute_as_bool() return 0/1 directly
Mike Yuan [Tue, 27 May 2025 12:19:41 +0000 (14:19 +0200)] 
cgroup-util: make cg_get_attribute_as_bool() return 0/1 directly

As with getenv_bool() and getxattr_at_bool(), to match
our usual style.

5 months agocgroup-util: rename cg_get_xattr_malloc -> cg_get_xattr
Mike Yuan [Tue, 27 May 2025 12:15:11 +0000 (14:15 +0200)] 
cgroup-util: rename cg_get_xattr_malloc -> cg_get_xattr

This is not a trivial wrapper around user-created-buffer-based
syscall, so do not use _malloc suffix. Most of our functions
return an internally allocated buffer and this one's not special.

5 months agobasic,shared: mark eligible functions with _pure_/_const_ (#37623)
Daan De Meyer [Tue, 27 May 2025 12:24:30 +0000 (14:24 +0200)] 
basic,shared: mark eligible functions with _pure_/_const_ (#37623)

5 months agorepart: Copy fs-verity status for CopyFiles= (#35401)
Zbigniew Jędrzejewski-Szmek [Tue, 27 May 2025 12:01:05 +0000 (14:01 +0200)] 
repart: Copy fs-verity status for CopyFiles= (#35401)

When populating a filesytem with CopyFiles=, we first copy the files to
a temporary directory. Make sure we use the (new) COPY_FS_VERITY flag
when doing that copy so that the `mkfs` that we invoke can see the files
with fs-verity enabled.

Closes #35352

5 months agocore: introduce io.systemd.Unit.List (first PR) (#37432)
Daan De Meyer [Tue, 27 May 2025 10:42:11 +0000 (12:42 +0200)] 
core: introduce io.systemd.Unit.List (first PR) (#37432)

5 months agomountfsd: add ability to create dir owned by foreign UID range in unpriv $HOME (...
Lennart Poettering [Tue, 27 May 2025 10:20:05 +0000 (12:20 +0200)] 
mountfsd: add ability to create dir owned by foreign UID range in unpriv $HOME (#37616)

5 months agoAssorted systemd-machined fixes (#37622)
Lennart Poettering [Tue, 27 May 2025 10:19:46 +0000 (12:19 +0200)] 
Assorted systemd-machined fixes (#37622)

5 months agoci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl ... 37616/head
Lennart Poettering [Mon, 26 May 2025 11:46:21 +0000 (13:46 +0200)] 
ci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl --push-fd=

5 months agovarlinkctl: optionally push fds to server
Lennart Poettering [Mon, 26 May 2025 11:19:14 +0000 (13:19 +0200)] 
varlinkctl: optionally push fds to server

5 months agomountfsd: add call for creating a foreign UID owned dir in dir owned by caller
Lennart Poettering [Mon, 26 May 2025 10:16:43 +0000 (12:16 +0200)] 
mountfsd: add call for creating a foreign UID owned dir in dir owned by caller

In order to fully support unpriv containers placed in directories owned
by the foreign UID range, below some unpriv user $HOME, we need to away
to actually create these hierarchies in the first place.

Let's add a method call for that. It takes a dir fd, then validates that
its ownership matches the client's identity, and then creates a subdir,
chown()ing it to the foreign UID range. It then returns an fd to the
result.

The result could then be passed to MountDirectory() in order to get a
mount which can then be populated by some code running in a dynamic
userns.

5 months agosd-json: add json_dispatch_const_filename()
Lennart Poettering [Mon, 26 May 2025 10:15:27 +0000 (12:15 +0200)] 
sd-json: add json_dispatch_const_filename()

json_dispatch_const_filename() is to json_dispatch_filename() what json_dispatch_const_path() is to json_dispatch_path().

5 months agomachine: fix log message, doesn't have to be scope unit, can by any 37622/head
Lennart Poettering [Mon, 19 May 2025 11:26:07 +0000 (13:26 +0200)] 
machine: fix log message, doesn't have to be scope unit, can by any

5 months agomachine: rework machine_gc()
Lennart Poettering [Mon, 19 May 2025 11:24:14 +0000 (13:24 +0200)] 
machine: rework machine_gc()

Let's check the leader alive state, and let's log about dbus errors.
This mimics (but is not quite identical to) what we do these days in
logind for GC'ing user sessions.

5 months agomachine: shorten code
Lennart Poettering [Mon, 19 May 2025 09:12:35 +0000 (11:12 +0200)] 
machine: shorten code

5 months agomachine: as safety precaution also check parsed machine name
Lennart Poettering [Mon, 19 May 2025 09:12:14 +0000 (11:12 +0200)] 
machine: as safety precaution also check parsed machine name

5 months agomachine: also save/restore vsock CID properly
Lennart Poettering [Mon, 19 May 2025 09:19:33 +0000 (11:19 +0200)] 
machine: also save/restore vsock CID properly

5 months agomachine: modernizations of serializing/deserializing netif data
Lennart Poettering [Mon, 19 May 2025 09:19:17 +0000 (11:19 +0200)] 
machine: modernizations of serializing/deserializing netif data

5 months agomachine: save/restore machine leader pidfdid
Lennart Poettering [Mon, 19 May 2025 09:08:52 +0000 (11:08 +0200)] 
machine: save/restore machine leader pidfdid

5 months agomachine: use the correct escaping calls for machine metadata
Lennart Poettering [Mon, 19 May 2025 09:07:53 +0000 (11:07 +0200)] 
machine: use the correct escaping calls for machine metadata

5 months agomachine: properly remove unit name symlink on removal
Lennart Poettering [Mon, 19 May 2025 09:05:51 +0000 (11:05 +0200)] 
machine: properly remove unit name symlink on removal

5 months agomachine: port machined state files to fopen_tmpfile_linkable()
Lennart Poettering [Mon, 19 May 2025 08:58:16 +0000 (10:58 +0200)] 
machine: port machined state files to fopen_tmpfile_linkable()

Similar to the erlier commit for logind, switch to a more modern way to
write the state files.

5 months agomachine: insist in a valid root directory
Lennart Poettering [Thu, 15 May 2025 10:25:47 +0000 (12:25 +0200)] 
machine: insist in a valid root directory

5 months agologind,machined: expose bus properties for leader PID fd ids, too
Lennart Poettering [Mon, 19 May 2025 15:57:08 +0000 (17:57 +0200)] 
logind,machined: expose bus properties for leader PID fd ids, too

5 months agocore: break line after sd_json_buildo( in varlink-manager.c 37432/head
Ivan Kruglov [Mon, 26 May 2025 14:56:29 +0000 (07:56 -0700)] 
core: break line after sd_json_buildo( in varlink-manager.c

5 months agotest: simple tests for io.systemd.Unit varlink interface
Ivan Kruglov [Mon, 26 May 2025 10:14:28 +0000 (03:14 -0700)] 
test: simple tests for io.systemd.Unit varlink interface

5 months agotest: quote entire path to socket in io.systemd.Manager tests
Ivan Kruglov [Mon, 26 May 2025 10:13:55 +0000 (03:13 -0700)] 
test: quote entire path to socket in io.systemd.Manager tests

5 months agocore: add basic lookup by name/pidref in io.systemd.Unit.List
Ivan Kruglov [Thu, 15 May 2025 10:04:28 +0000 (03:04 -0700)] 
core: add basic lookup by name/pidref in io.systemd.Unit.List

5 months agojson: add unit tests for json_dispatch_const_unit_name()
Ivan Kruglov [Mon, 26 May 2025 10:02:59 +0000 (03:02 -0700)] 
json: add unit tests for json_dispatch_const_unit_name()

5 months agojson: json_dispatch_const_unit_name()
Ivan Kruglov [Fri, 23 May 2025 13:57:02 +0000 (06:57 -0700)] 
json: json_dispatch_const_unit_name()