]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
16 months agobus-util: add log message when exiting because of idle 33045/head
Lennart Poettering [Wed, 8 May 2024 08:39:29 +0000 (10:39 +0200)] 
bus-util: add log message when exiting because of idle

16 months agobus-util: add env var for disabling exit-on-idle
Lennart Poettering [Wed, 8 May 2024 08:38:52 +0000 (10:38 +0200)] 
bus-util: add env var for disabling exit-on-idle

16 months agoMerge pull request #32961 from YHNdnzj/starttime-main
Yu Watanabe [Wed, 12 Jun 2024 10:12:37 +0000 (19:12 +0900)] 
Merge pull request #32961 from YHNdnzj/starttime-main

core/service: try to query for new main process's starttime

16 months agoMerge pull request #32805 from YHNdnzj/no-cred-mount-unit
Yu Watanabe [Wed, 12 Jun 2024 10:09:00 +0000 (19:09 +0900)] 
Merge pull request #32805 from YHNdnzj/no-cred-mount-unit

core/mount: stop generating mount units for cred mounts

16 months agorepart: Use crypt_reencrypt_run() if available
Daan De Meyer [Sun, 2 Jun 2024 14:24:52 +0000 (16:24 +0200)] 
repart: Use crypt_reencrypt_run() if available

crypt_reencrypt() is deprecated, so let's look for and prefer
crypt_reencrypt_run() if it is available.

16 months agoresolved: permit dnssec rrtype questions when we aren't validating
Ronan Pigott [Fri, 8 Mar 2024 20:40:08 +0000 (13:40 -0700)] 
resolved: permit dnssec rrtype questions when we aren't validating

This check introduced in 91adc4db33f6 is intended to spare us from
encountering broken resolver behavior we don't want to deal with.
However if we aren't validating we more than likely don't know the state
of the upstream resolver's support for dnssec. Let's let clients try
these queries if they want.

This brings the behavior of sd-resolved in-line with previouly stated
change in the meaning of DNSSEC=no, which now means "don't validate"
rather than "don't validate, because the upstream resolver is declared to
be dnssec-unaware".

Fixes: 9c47b334445a ("resolved: enable DNS proxy mode if client wants DNSSEC")
16 months agoMerge pull request #33074 from keszybz/bpf-fd-handling
Yu Watanabe [Wed, 12 Jun 2024 09:44:30 +0000 (18:44 +0900)] 
Merge pull request #33074 from keszybz/bpf-fd-handling

Small cleanups in bpf code

16 months agoMerge pull request #33071 from keszybz/sd_event_source-cleanup
Yu Watanabe [Wed, 12 Jun 2024 09:42:14 +0000 (18:42 +0900)] 
Merge pull request #33071 from keszybz/sd_event_source-cleanup

Clean up calls to sd_event_source_set_enabled()

16 months agoMerge pull request #32972 from keszybz/small-cleanups
Yu Watanabe [Wed, 12 Jun 2024 09:38:09 +0000 (18:38 +0900)] 
Merge pull request #32972 from keszybz/small-cleanups

Small cleanups

16 months agovsock-mux ssh proxy
Дамјан Георгиевски [Mon, 20 May 2024 14:36:56 +0000 (16:36 +0200)] 
vsock-mux ssh proxy

allow the ssh-proxy to connect to cloud-hypervisor/Firecracker guests,
via their unix-domain socket to AF_VSOCK multiplexer:

https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/vsock.md
https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md

16 months agoMerge pull request #32933 from YHNdnzj/faccessat-empty-path
Yu Watanabe [Wed, 12 Jun 2024 09:35:13 +0000 (18:35 +0900)] 
Merge pull request #32933 from YHNdnzj/faccessat-empty-path

fs-util: several cleanups

16 months agocore: invoke_main_loop() does not return MANAGER_RELOAD
Yu Watanabe [Sun, 19 May 2024 05:21:28 +0000 (14:21 +0900)] 
core: invoke_main_loop() does not return MANAGER_RELOAD

Follow-up for 5409c6fcc55e6700360546c42edd4a021ee5014e.

16 months agotpm2-setup: Don't fail if we can't access the TPM due to authorization failure
Daan De Meyer [Fri, 17 May 2024 14:20:11 +0000 (16:20 +0200)] 
tpm2-setup: Don't fail if we can't access the TPM due to authorization failure

The TPM might be password/pin protected for various reasons even if
there is no SRK yet. Let's handle those cases gracefully instead of
failing the unit as it is enabled by default.

16 months agoMerge pull request #32847 from YHNdnzj/exitrd
Yu Watanabe [Wed, 12 Jun 2024 09:28:33 +0000 (18:28 +0900)] 
Merge pull request #32847 from YHNdnzj/exitrd

shutdown: several cleanups, rename initrd to exitrd

16 months agoMerge pull request #32720 from poettering/hostnamed-no-varlink-exit-on-idle
Yu Watanabe [Wed, 12 Jun 2024 09:25:24 +0000 (18:25 +0900)] 
Merge pull request #32720 from poettering/hostnamed-no-varlink-exit-on-idle

hostnamed: exit-on-idle tweaks

16 months agoMerge pull request #32603 from YHNdnzj/install-basename
Yu Watanabe [Wed, 12 Jun 2024 09:22:10 +0000 (18:22 +0900)] 
Merge pull request #32603 from YHNdnzj/install-basename

shared/install: modernize and eliminate the use of basename()

16 months agocore/exec-credential: drop unused unit_add_default_credential_dependencies 32805/head
Mike Yuan [Tue, 14 May 2024 13:28:33 +0000 (21:28 +0800)] 
core/exec-credential: drop unused unit_add_default_credential_dependencies

16 months agoRevert "core/credential,mount: re-read /proc/self/mountinfo before invoking umount...
Mike Yuan [Tue, 14 May 2024 10:47:42 +0000 (18:47 +0800)] 
Revert "core/credential,mount: re-read /proc/self/mountinfo before invoking umount command"

This reverts commit 1e1225614ca1106116dcad9fb37aaeb6106408ab.

This was an incomplete workaround of the race. Now that
we stop generating mount units for credential mounts,
the logic could be dropped.

16 months agocore/mount: stop generating mount units for cred mounts
Mike Yuan [Tue, 14 May 2024 10:33:32 +0000 (18:33 +0800)] 
core/mount: stop generating mount units for cred mounts

While @poettering wants to keep mount units for credential
mounts, this has brought nothing but pain in real life.

By generating mount units for each cred mount, we had trouble
with default dependencies on them, which causes their stop jobs
to race with unmounting through exec_context_destroy_credentials().
There were several attempts to workaround the problem, but
none seems very graceful: #26959, #28787, #28957, #31360, #32011.
Also, we want to carry over credentials for services that
survive soft-reboot to the new mount tree, and during the practice
the stop of mount units are irritating.

The mentioned problems are ultimately resolved by disabling
default deps: #32799. But after doing that, maybe the next question
should be "why do we generate these mount units at all?"

Let's revisit the whole concept here. First of all, the credential
dirs are supposed to be opaque to users, and hence nobody should
really reference to these mounts directly. Secondly, the lifetime
of credentials is strictly bound to the service units, but nothing
else. Moreover, as more and more users of credentials pop up,
we could end up with hundreds of such mount units, which is
something we handle poorly. And we emit useless UnitRemoved signals,
etc...

As discussed, it seems that eliminating these mount units
is the correct way to go. No real use cases are impacted,
and the lifetime management becomes sane again.

Replaces #32011

16 months agoudev: tag MTD devices for systemd
Ian Abbott [Thu, 30 May 2024 10:20:41 +0000 (11:20 +0100)] 
udev: tag MTD devices for systemd

Allow systemd units to require/bind to MTD devices.  One use case is for
using a systemd service to attach an MTD device to an UBI controller,
which cannot be done until the MTD device has been probed.

Fixes #33096

16 months agocore/socket: allow MPTCP protocol
Matthieu Baerts (NGI0) [Mon, 20 May 2024 16:37:17 +0000 (18:37 +0200)] 
core/socket: allow MPTCP protocol

Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension
that enables a TCP connection to use different paths. It allows a device
to make use of multiple interfaces at once to send and receive TCP
packets over a single MPTCP connection. MPTCP can aggregate the
bandwidth of multiple interfaces or prefer the one with the lowest
latency, it also allows a fail-over if one path is down, and the traffic
is seamlessly re-injected on other paths.

To benefit from MPTCP, both the client and the server have to support
it. Multipath TCP is a backward-compatible TCP extension that is enabled
by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...).
Multipath TCP is included in the Linux kernel since version 5.6 [2]. To
use it on Linux, an application must explicitly enable it when creating
the socket:

  int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP);

No need to change anything else in the application.

This patch allows MPTCP protocol in the Socket unit configuration. So
now, a <unit>.socket can contain this to use MPTCP instead of TCP:

  [Socket]
  SocketProtocol=mptcp

MPTCP support has been allowed similarly to what has been already done
to allow SCTP: just one line in core/socket.c, a very simple addition
thanks to the flexible architecture already in place.

On top of that, IPPROTO_MPTCP has also been added in the list of allowed
protocols in two other places, and in the doc. It has also been added to
the missing_network.h file, for systems with an old libc -- note that it
was also required to include <netinet/in.h> in this file to avoid
redefinition errors.

Link: https://www.rfc-editor.org/rfc/rfc8684.html
Link: https://www.mptcp.dev
16 months agocore: populate $REMOTE_ADDR for AF_UNIX sockets
Kamil Szczęk [Mon, 3 Jun 2024 15:56:42 +0000 (17:56 +0200)] 
core: populate $REMOTE_ADDR for AF_UNIX sockets

Set the $REMOTE_ADDR environment variable for AF_UNIX socket connections
when using per-connection socket activation (Accept=yes). $REMOTE_ADDR
will now contain the remote socket's file system path (starting with a
slash "/") or its address in the abstract namespace (starting with an
at symbol "@").

This information is essential for identifying the remote peer in AF_UNIX
socket connections, but it's not easy to obtain in a shell script for
example without pulling in a ton of additional tools. By setting
$REMOTE_ADDR, we make this information readily available to the
activated service.

16 months agocore/manager: enclose debug info acquirement in 'if (DEBUG_LOGGING)'
Mike Yuan [Fri, 7 Jun 2024 21:55:43 +0000 (23:55 +0200)] 
core/manager: enclose debug info acquirement in 'if (DEBUG_LOGGING)'

16 months agorules: Limit the number of device units generated for serial ttys
Daan De Meyer [Mon, 10 Jun 2024 10:59:58 +0000 (12:59 +0200)] 
rules: Limit the number of device units generated for serial ttys

As per the suggestion in https://github.com/systemd/systemd/issues/33242.

This reduces the number of /dev/ttySXX device units generated in
mkosi from 32 to 4.

16 months agoudev: rewrite token_match_attr() to make it easier for Coverity to understand
Yu Watanabe [Tue, 11 Jun 2024 16:16:55 +0000 (01:16 +0900)] 
udev: rewrite token_match_attr() to make it easier for Coverity to understand

No functional change.

Closes CID#1469719.

16 months agosd-dhcp-server: clear buffer before receive
Yu Watanabe [Tue, 11 Jun 2024 15:48:56 +0000 (00:48 +0900)] 
sd-dhcp-server: clear buffer before receive

I do not think this is necessary, but all other places in
libsystemd-network we clear buffer before receive. Without this,
Coverity warns about use-of-uninitialized-values.
Let's silence Coverity.

Closes CID#1469721.

16 months agobus-util: check sd_bus_pending_method_calls() when determining whether a service... 32720/head
Lennart Poettering [Wed, 8 May 2024 11:08:38 +0000 (13:08 +0200)] 
bus-util: check sd_bus_pending_method_calls() when determining whether a service is idle

16 months agosd-bus: add new sd_bus_pending_method_calls() call
Lennart Poettering [Wed, 8 May 2024 11:05:40 +0000 (13:05 +0200)] 
sd-bus: add new sd_bus_pending_method_calls() call

16 months agotree-wide: never consider service idle if polkit authentication is still pending
Lennart Poettering [Thu, 23 May 2024 07:46:04 +0000 (09:46 +0200)] 
tree-wide: never consider service idle if polkit authentication is still pending

Let's be correct on this.

16 months agohostnamed: don't allow hostnamed to exit on idle if varlink connections are still...
Lennart Poettering [Wed, 8 May 2024 08:38:11 +0000 (10:38 +0200)] 
hostnamed: don't allow hostnamed to exit on idle if varlink connections are still ongoing

And while we are at it, ongoing PK authorizations are also a reason to
block exit on idle.

16 months agounit-file,portable: replace streq + basename with path_equal_filename 32603/head
Mike Yuan [Wed, 1 May 2024 09:09:52 +0000 (17:09 +0800)] 
unit-file,portable: replace streq + basename with path_equal_filename

16 months agoshared/install: use FOREACH_ARRAY at one more place
Mike Yuan [Wed, 1 May 2024 09:21:33 +0000 (17:21 +0800)] 
shared/install: use FOREACH_ARRAY at one more place

16 months agoshared/install: replace streq + basename with path_equal_filename
Mike Yuan [Wed, 1 May 2024 07:44:07 +0000 (15:44 +0800)] 
shared/install: replace streq + basename with path_equal_filename

16 months agoshared/install: use path_extract_filename in install_info_traverse
Mike Yuan [Wed, 1 May 2024 07:53:54 +0000 (15:53 +0800)] 
shared/install: use path_extract_filename in install_info_traverse

16 months agoshared/install: modernize unit_file_get_list, use key destructor
Mike Yuan [Wed, 1 May 2024 08:26:05 +0000 (16:26 +0800)] 
shared/install: modernize unit_file_get_list, use key destructor

The rest of the basename()s are easy to drop.

16 months agoshared/install: modernize unit_file_link
Mike Yuan [Wed, 1 May 2024 07:44:37 +0000 (15:44 +0800)] 
shared/install: modernize unit_file_link

Also eliminate one more use of basename(), yay!

16 months agoinstall,dbus-manager: make unit_file_* take (char* const*) for strv
Mike Yuan [Wed, 1 May 2024 11:18:44 +0000 (19:18 +0800)] 
install,dbus-manager: make unit_file_* take (char* const*) for strv

16 months agoshared/install: modernize install_info_add
Mike Yuan [Wed, 1 May 2024 07:39:53 +0000 (15:39 +0800)] 
shared/install: modernize install_info_add

16 months agoshared/install: modernize find_symlinks and friends
Mike Yuan [Wed, 1 May 2024 07:32:21 +0000 (15:32 +0800)] 
shared/install: modernize find_symlinks and friends

16 months agoshared/install: modernize remove_marked_symlink_fd
Mike Yuan [Wed, 1 May 2024 07:05:03 +0000 (15:05 +0800)] 
shared/install: modernize remove_marked_symlink_fd

Note that we now collect errors from
install_changes_add(), too.

16 months agoshared/install: return bool where appropriate
Mike Yuan [Wed, 1 May 2024 07:00:29 +0000 (15:00 +0800)] 
shared/install: return bool where appropriate

16 months agoshared/dropin: minor modernization
Mike Yuan [Mon, 13 May 2024 08:48:32 +0000 (16:48 +0800)] 
shared/dropin: minor modernization

16 months agomeson: update version to 257~devel
Luca Boccassi [Tue, 11 Jun 2024 21:55:29 +0000 (22:55 +0100)] 
meson: update version to 257~devel

16 months agoNEWS: add placeholder for 257
Luca Boccassi [Tue, 11 Jun 2024 21:55:03 +0000 (22:55 +0100)] 
NEWS: add placeholder for 257

16 months agoFinalize NEWS and version for v256 v256
Luca Boccassi [Tue, 11 Jun 2024 21:42:06 +0000 (22:42 +0100)] 
Finalize NEWS and version for v256

16 months agoUpdate hwdb
Luca Boccassi [Tue, 11 Jun 2024 17:30:29 +0000 (18:30 +0100)] 
Update hwdb

ninja -C build update-hwdb

16 months agotpm2-util: tighten rules on the nvindex handle range we allocate from
Lennart Poettering [Mon, 10 Jun 2024 16:58:54 +0000 (18:58 +0200)] 
tpm2-util: tighten rules on the nvindex handle range we allocate from

Let's follow the conventions set by "Registry of Reserved TPM 2.0 Handles
and Localities" and only allocate nvindex currently not assigned to any
vendor.

For details see:

https://trustedcomputinggroup.org/resource/registry/

Section 2.2

16 months agohwdb: add keyboard mappings for the Ayaneo Kun face buttons
Tobias Jakobi [Thu, 6 Jun 2024 21:17:00 +0000 (23:17 +0200)] 
hwdb: add keyboard mappings for the Ayaneo Kun face buttons

See comment in hwdb file for details.

16 months agoshared: fix typo: dito -> ditto
Yu Watanabe [Tue, 11 Jun 2024 17:34:11 +0000 (02:34 +0900)] 
shared: fix typo: dito -> ditto

Follow-up for bc9e5a4c67f5fff536d122118e16a53dfb592acd and
3572d3df8f822d4cf1601428401a837f723771cf.

16 months agoman: document that separate /usr/local/ must not be used for config
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 17:12:17 +0000 (19:12 +0200)] 
man: document that separate /usr/local/ must not be used for config

Since we document /usr/local/lib/systemd/ and other paths for various things,
add notes that this is not supported if /usr/local is a separate partition. In
systemd.unit, I tried to add the footnote in the table where
/usr/local/lib/systemd/ is listed, but that get's rendered as '[sup]a[/sup]'
with a mangled footnote at the bottom of the table :( .

Also, split paragraphs in one place where the subject changes without any
transition.

Follow-up for 02f35b1c905ac63ba62f94efebf858412e961fc1.
Replaces https://github.com/systemd/systemd/pull/33231.

16 months agobus-unit-util: extend the bus call timeout for UnitFreezer
Zbigniew Jędrzejewski-Szmek [Tue, 11 Jun 2024 10:19:39 +0000 (12:19 +0200)] 
bus-unit-util: extend the bus call timeout for UnitFreezer

Follow-up for 1d617b35fef5f7783287965f766c8bb85e932b8e.
Should fix https://github.com/systemd/systemd/issues/33269.

From the logs in the bug:
Jun 10 22:55:37 systemd-logind[909]: The system will suspend now!
Jun 10 22:55:37 ModemManager[996]: <msg> [sleep-monitor-systemd] system is about to suspend
...
Jun 10 22:55:48 systemd-sleep[422408]: Failed to freeze unit 'user.slice': Connection timed out
Jun 10 22:55:48 systemd-sleep[422408]: Performing sleep operation 'suspend'...

The delay is ~11 s, consistent with the patch that set the timeout to 10 s.
Looks like this is not enough. It's the freeze operation that fails, but
thawing might be slow too, so just bump the timeout again.

16 months agochase: Tighten "." and "./" check
Daan De Meyer [Thu, 6 Jun 2024 20:59:36 +0000 (22:59 +0200)] 
chase: Tighten "." and "./" check

Currently the check also succeeds if the input path starts with a dot, whereas
we only want it to succeed for "." and "./". Tighten the check and add a test.

16 months agotest-network: wait a while for addresses to be dropped
Yu Watanabe [Tue, 11 Jun 2024 08:41:28 +0000 (17:41 +0900)] 
test-network: wait a while for addresses to be dropped

Hopefully fixes the following failure:
```
======================================================================
FAIL: test_ipv6_token_prefixstable (__main__.NetworkdRATests.test_ipv6_token_prefixstable)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5705, in test_ipv6_token_prefixstable
    self.assertNotIn('2002:da8:1:0:b47e:7975:fc7a:7d6e/64', output) # the 1st prefixstable
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '2002:da8:1:0:b47e:7975:fc7a:7d6e/64' unexpectedly found in
  '19: veth99@veth-peer: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000\n
       inet6 2002:da8:1:0:b47e:7975:fc7a:7d6e/64 scope global tentative dynamic mngtmpaddr noprefixroute \n
          valid_lft 2100sec preferred_lft 1000sec\n
       inet6 2002:da8:1:0:da5d:e50a:43fd:5d0f/64 scope global dynamic mngtmpaddr noprefixroute \n
          valid_lft 2100sec preferred_lft 1000sec\n
       inet6 fe80::1034:56ff:fe78:9abc/64 scope link proto kernel_ll \n
          valid_lft forever preferred_lft forever'
----------------------------------------------------------------------
```

16 months agoman/systemd-soft-reboot.service: upgrade drop-in to unit file for slice
Zbigniew Jędrzejewski-Szmek [Tue, 11 Jun 2024 08:41:44 +0000 (10:41 +0200)] 
man/systemd-soft-reboot.service: upgrade drop-in to unit file for slice

Follow-up for d91c7c91bf5de3b12cc2b29dd8b5ad49f29448ef.
Closes https://github.com/systemd/systemd/issues/33260.

16 months agoshell-completion: update bash completion for networkctl
Yu Watanabe [Tue, 11 Jun 2024 06:44:20 +0000 (15:44 +0900)] 
shell-completion: update bash completion for networkctl

16 months agoshell-completion: update bash-completion for udevadm
Yu Watanabe [Tue, 11 Jun 2024 06:19:56 +0000 (15:19 +0900)] 
shell-completion: update bash-completion for udevadm

- Add missing options.
- Show device nodes when supported.

Closes #33265.

16 months agohomed: fix typo
Yu Watanabe [Tue, 11 Jun 2024 06:49:04 +0000 (15:49 +0900)] 
homed: fix typo

Follow-up for c4b5de7eff3d3b51ae88e74fecba09e4fbea4464.

16 months agologin: re-used -> reused
Yu Watanabe [Tue, 11 Jun 2024 06:50:12 +0000 (15:50 +0900)] 
login: re-used -> reused

Suggested by Fossies.

16 months agoMerge pull request #33264 from bluca/mkosi_dlopen_install
Luca Boccassi [Mon, 10 Jun 2024 20:57:04 +0000 (21:57 +0100)] 
Merge pull request #33264 from bluca/mkosi_dlopen_install

mkosi: install dlopen optional dependencies for debian/ubuntu builds

16 months agomkosi: install dlopen optional dependencies for debian/ubuntu builds 33264/head
Luca Boccassi [Mon, 10 Jun 2024 03:06:39 +0000 (04:06 +0100)] 
mkosi: install dlopen optional dependencies for debian/ubuntu builds

16 months agomkosi: update to latest
Luca Boccassi [Mon, 10 Jun 2024 13:17:10 +0000 (14:17 +0100)] 
mkosi: update to latest

16 months agouser-util: fix fgetxxent_sane on musl
Mike Gilbert [Fri, 7 Jun 2024 16:28:41 +0000 (12:28 -0400)] 
user-util: fix fgetxxent_sane on musl

musl's implementation does not set errno to ENOENT when the end of file
is reached. It returns NULL and leaves errno unchanged.

16 months agomkosi.prepare: do not install build dependencies with NO_BUILD
Luca Boccassi [Sun, 9 Jun 2024 19:14:45 +0000 (20:14 +0100)] 
mkosi.prepare: do not install build dependencies with NO_BUILD

16 months agoNEWS: fix typo
Luca Boccassi [Sun, 9 Jun 2024 21:08:41 +0000 (22:08 +0100)] 
NEWS: fix typo

17 months agoMerge pull request #33241 from DaanDeMeyer/noble
Luca Boccassi [Sat, 8 Jun 2024 22:29:56 +0000 (23:29 +0100)] 
Merge pull request #33241 from DaanDeMeyer/noble

ci: Switch to Ubuntu 24.04

17 months agomkosi: Stop using tools tree 33241/head
Daan De Meyer [Fri, 7 Jun 2024 16:54:17 +0000 (18:54 +0200)] 
mkosi: Stop using tools tree

Noble has all the tooling we need so let's stop using a tools tree
and just install the dependencies we need on the host system.

17 months agomkosi: Replace sysusers.d with useradd for test user
Daan De Meyer [Fri, 7 Jun 2024 20:32:08 +0000 (22:32 +0200)] 
mkosi: Replace sysusers.d with useradd for test user

sysusers.d is not intended for regular users, so let's use useradd
instead.

17 months agoci: Switch to Ubuntu 24.04
Daan De Meyer [Fri, 7 Jun 2024 08:55:53 +0000 (10:55 +0200)] 
ci: Switch to Ubuntu 24.04

17 months agomkosi: Update to latest
Daan De Meyer [Fri, 7 Jun 2024 16:50:54 +0000 (18:50 +0200)] 
mkosi: Update to latest

17 months agopresets: Don't enable systemd-homed-firstboot.service by default
Daan De Meyer [Fri, 7 Jun 2024 15:21:48 +0000 (17:21 +0200)] 
presets: Don't enable systemd-homed-firstboot.service by default

Enabling this service by default means every CI image without a
regular user now gets stuck on first boot due to the password prompt
from systemd-homed-firstboot.service. Let's not enable the service
by default but instead require users to enable it explicitly if they
want its behavior.

Fixes #33249

17 months agodev-setup: Follow /dev/console symlinks when locking /dev/console
Daan De Meyer [Fri, 7 Jun 2024 13:10:58 +0000 (15:10 +0200)] 
dev-setup: Follow /dev/console symlinks when locking /dev/console

systemd-nspawn sets up /dev/console as a symlink to a pty, so let's
make sure we follow the symlink when trying to lock /dev/console so
we don't fail with ELOOP.

17 months agoman: note that templated surviving units need a drop-in for their slice
Luca Boccassi [Thu, 6 Jun 2024 21:10:23 +0000 (22:10 +0100)] 
man: note that templated surviving units need a drop-in for their slice

As reported on the mailing list, this is non-obvious, so document it.

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050351.html

17 months agoMerge pull request #33237 from bluca/dlopen_deps
Luca Boccassi [Fri, 7 Jun 2024 10:18:26 +0000 (11:18 +0100)] 
Merge pull request #33237 from bluca/dlopen_deps

mkosi: enable noble-backports for ubuntu and update debian packaging commit

17 months agomkosi: update debian packaging commit id 33237/head
Luca Boccassi [Thu, 6 Jun 2024 22:01:10 +0000 (23:01 +0100)] 
mkosi: update debian packaging commit id

17 months agomkosi: enable noble-backports for ubuntu
Luca Boccassi [Thu, 6 Jun 2024 22:00:44 +0000 (23:00 +0100)] 
mkosi: enable noble-backports for ubuntu

Required to get the new dh-dlopenlibdeps package

17 months agoUpdate version and finalize NEWS for 256~rc4 v256-rc4
Luca Boccassi [Thu, 6 Jun 2024 19:39:50 +0000 (20:39 +0100)] 
Update version and finalize NEWS for 256~rc4

17 months agorun: do not pass the pty slave fd to transient service in a machine
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 11:30:09 +0000 (13:30 +0200)] 
run: do not pass the pty slave fd to transient service in a machine

Follow-up for 28459ba1f4df824d5ef7f7d1a9acb6953ea24045

The pty path returned by OpenMachinePTY() cannot be opened from outside
the machine, hence let's use the plain Standard{Input,Output,Error}=tty
in such a case. This means if --machine= is specified, #32916 would occur.
A comprehensive fix requires a new dbus method in machined, which shall
be material for v257.

See also: https://github.com/systemd/systemd/pull/33216#discussion_r1628020429

Replaces #33216

Co-authored-by: Mike Yuan <me@yhndnzj.com>
17 months agoMerge pull request #33232 from bluca/chores
Luca Boccassi [Thu, 6 Jun 2024 19:37:11 +0000 (20:37 +0100)] 
Merge pull request #33232 from bluca/chores

Chores for RC4

17 months agomkosi: Stop skipping pkcs11 test on opensuse
Daan De Meyer [Thu, 6 Jun 2024 15:29:51 +0000 (17:29 +0200)] 
mkosi: Stop skipping pkcs11 test on opensuse

A fix was made to the softhsm package so the test now passes.

17 months agoNEWS: update contributors 33232/head
Luca Boccassi [Thu, 6 Jun 2024 16:57:47 +0000 (17:57 +0100)] 
NEWS: update contributors

17 months agoUpdate syscalls tables
Luca Boccassi [Thu, 6 Jun 2024 16:56:12 +0000 (17:56 +0100)] 
Update syscalls tables

ninja -C build update-syscall-tables update-syscall-header

17 months agoUpdate hwdb
Luca Boccassi [Thu, 6 Jun 2024 16:54:03 +0000 (17:54 +0100)] 
Update hwdb

ninja -C build update-hwdb

17 months agoRevert "network: add "mac" to alternatives name policy by default" (#33227)
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 16:35:46 +0000 (18:35 +0200)] 
Revert "network: add "mac" to alternatives name policy by default" (#33227)

This reverts commit 0f5a529217f1327f020ab54deed09e6fae1f1fef.

As discussed in https://github.com/systemd/systemd/issues/33104,
that patch caused problems in Debian which has a udev drop-in with

  [Match]
  Path=*-usb-*

  [Link]
  NamePolicy=mac

The rename fails:
   eth0: Policy *mac* yields "enx00*".
   eth0: /usr/lib/udev/rules.d/80-net-setup-link.rules:11 NAME 'enx00*'
   eth0: /usr/lib/udev/rules.d/99-systemd.rules:69 RUN '/usr/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$
   eth0: sd-device: Created database file '/run/udev/data/n9' for '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:
   eth0: Failed to rename network interface 9 from 'eth0' to 'enx00*': File exists
   eth0: sd-device: Created database file '/run/udev/data/n9' for '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:01.0/0000:05:00.0/0000:
   eth0: Failed to process device, ignoring: File exists

Two network interfaces have the same MAC and it's not marked NET_ADDR_STOLEN.
In this case the conflict is very visible because it causes the rename to fail,
but it would also occur in other cases, for alternative names.

A patch has been submitted for r8152 to properly set NET_ADDR_STOLEN:
https://lore.kernel.org/linux-usb/20240605153340.25694-1-gmazyland@gmail.com/T/#u

Let's revert this now to avoid a regression. We can try again after the kernel
issue is resolved.

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

17 months agoMerge pull request #33218 from DaanDeMeyer/initrd-modules
Daan De Meyer [Thu, 6 Jun 2024 16:01:00 +0000 (18:01 +0200)] 
Merge pull request #33218 from DaanDeMeyer/initrd-modules

mkosi: Include fewer modules in the initramfs

17 months agoMerge pull request #33189 from bluca/fscrypt_flush
Luca Boccassi [Thu, 6 Jun 2024 15:34:20 +0000 (16:34 +0100)] 
Merge pull request #33189 from bluca/fscrypt_flush

homed: flush fscrypt key on lock/deactivate

17 months agomkosi: Include fewer modules in the initramfs 33218/head
Daan De Meyer [Wed, 5 Jun 2024 16:22:22 +0000 (18:22 +0200)] 
mkosi: Include fewer modules in the initramfs

Let's only use mkosi's default list of modules instead of all of
them.

17 months agomkosi: Update to latest
Daan De Meyer [Wed, 5 Jun 2024 16:57:31 +0000 (18:57 +0200)] 
mkosi: Update to latest

17 months agohomed: flush fscrypt key on lock/deactivate 33189/head
Luca Boccassi [Tue, 4 Jun 2024 02:17:42 +0000 (03:17 +0100)] 
homed: flush fscrypt key on lock/deactivate

The fscrypt key is added to the user keyring, and needs to be flushed out too.

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

17 months agomkosi: do a sparse checkout of debian/ubuntu packaging repo
Luca Boccassi [Wed, 5 Jun 2024 23:14:37 +0000 (00:14 +0100)] 
mkosi: do a sparse checkout of debian/ubuntu packaging repo

The repository on Salsa includes the full upstream sources, which means
they are duplicated, taking extra space and showing duplicated grep results.
But we only need the debian/ subfolder, so do a sparse clone and checkout.

17 months agoutil: add keyring_describe helper and move to basic
Luca Boccassi [Tue, 4 Jun 2024 12:23:30 +0000 (13:23 +0100)] 
util: add keyring_describe helper and move to basic

So that it can be used from libsystemd. No external dependencies.

17 months agonetwork/ndisc: use router lifetime as one for redirect route
Yu Watanabe [Mon, 3 Jun 2024 20:29:59 +0000 (05:29 +0900)] 
network/ndisc: use router lifetime as one for redirect route

Previously, we did not set lifetime for redirect route, and redirect
routes were removed only when received a RA from the target address.
Thus, routes that redirect on-link addresses were never removed.

RFCs mention nothing about the lifetime of redirection. But the previous
implementation does not pass the IPv6 Core Conformance Tests.

This makes
- remember all received RAs and manage them by the sender address
  (previously, remembered only one with the highest preference),
- then use the router lifetime as one for redirect route,
- remove redirect route also when the router corresponds to the sender
  address is dropped (previously, considered only target address).

Note, even if we recieve a new RA, we do not update existing redirect
routes. The lifetime of the redirect route is updated only when a new
Redirect message is received.

Closes #32527.

17 months agoman: document /usr/local/lib in search paths
Jörg Behrmann [Wed, 5 Jun 2024 15:08:57 +0000 (17:08 +0200)] 
man: document /usr/local/lib in search paths

17 months agoMerge pull request #33198 from keszybz/update-distro-hash
Luca Boccassi [Thu, 6 Jun 2024 09:22:15 +0000 (10:22 +0100)] 
Merge pull request #33198 from keszybz/update-distro-hash

Add helper script to update distro packaging hashes

17 months agomkosi: update fedora commit reference 33198/head
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 08:01:46 +0000 (10:01 +0200)] 
mkosi: update fedora commit reference

1f94b56cee Partially backport PR #33016 to fix crashes in KDE 6.3.0

17 months agomkosi: update debian commit reference
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jun 2024 08:01:43 +0000 (10:01 +0200)] 
mkosi: update debian commit reference

5b9607385d debian/tests/storage: without scsi_debug, skip test
8a195a6327 debian/extra: use a dropin to configure Nice=-1 on systemd-journald.service
5436d49288 debian/extra: use a drop-in resolved.conf to configure Cache=no-negative
596a99d2d3 debian/extra: set ManagedOOMSwap=auto on -.slice
07ba81b14d LimitCORE: restore default hard limit to infinity
df3a9a91e8 Restart managers on libc-upgrade dpkg trigger

17 months agomkosi: set -o nounset for scripts
Zbigniew Jędrzejewski-Szmek [Tue, 4 Jun 2024 13:25:03 +0000 (15:25 +0200)] 
mkosi: set -o nounset for scripts

Those scripts are written with the expectation that all input variables are set
and will not behave correctly if something is ommitted. In particular, the
non-chrooted scripts (mkosi.clean, mkosi.sync) might wreak havoc if called
without the full environment.

17 months agotools/update-distro-hash: add a helper script to sync submodule
Zbigniew Jędrzejewski-Szmek [Tue, 4 Jun 2024 13:10:15 +0000 (15:10 +0200)] 
tools/update-distro-hash: add a helper script to sync submodule

17 months agopo: update and correction translation (Chinese (Traditional) (zh_TW))
hanjinpeng [Wed, 5 Jun 2024 17:25:28 +0000 (01:25 +0800)] 
po: update and correction translation (Chinese (Traditional) (zh_TW))

17 months agoRevert "mkosi: Don't install wireguard-tools on Debian"
Daan De Meyer [Wed, 5 Jun 2024 17:01:27 +0000 (19:01 +0200)] 
Revert "mkosi: Don't install wireguard-tools on Debian"

wireguard-tools was added back to debian testing.

This reverts commit 8c335463d9fe6c2e2f3d9584d7c26871800065e2.

17 months agomkosi: Disable scratch device by default
Daan De Meyer [Wed, 5 Jun 2024 15:51:57 +0000 (17:51 +0200)] 
mkosi: Disable scratch device by default

We include scratch space in the rootfs image itself so we don't have
need for the scratch device so let's disable it by default.