]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 months agoupdate hwdb 34976/head
Lennart Poettering [Fri, 1 Nov 2024 09:17:58 +0000 (10:17 +0100)] 
update hwdb

12 months agohwdb: import newest autosuspend rules from chromeos
Lennart Poettering [Fri, 1 Nov 2024 09:14:09 +0000 (10:14 +0100)] 
hwdb: import newest autosuspend rules from chromeos

12 months agoman: <strong> is not a valid docbook tag, but <emphasis> is
Lennart Poettering [Fri, 1 Nov 2024 09:03:15 +0000 (10:03 +0100)] 
man: <strong> is not a valid docbook tag, but <emphasis> is

12 months agoupdate NEWS
Lennart Poettering [Fri, 1 Nov 2024 09:02:55 +0000 (10:02 +0100)] 
update NEWS

12 months agocoredump: rework protocol between coredump pattern handler and processing service...
Lennart Poettering [Fri, 1 Nov 2024 07:15:05 +0000 (08:15 +0100)] 
coredump: rework protocol between coredump pattern handler and processing service (#34970)

In
https://github.com/systemd/systemd/commit/68511cebe58977ea68ae4f57c6462e979efd1cff
the ability to pass the
coredump's mount namespace fd from the coredump patter handler was added
to systemd-coredump. For this the protocol was augmented, in attempt to
provide both forward and backward compatibility.

The protocol as of v256: one or more datagrams with journal log fields
about the coredump are sent via an SOCK_SEQPACKET connection. It is
finished with a zero length datagram which carries the coredump fd (this
last datagram is called "sentinel" sometimes).

The protocol after
https://github.com/systemd/systemd/commit/68511cebe58977ea68ae4f57c6462e979efd1cff
is extended
so that after the sentinal a 2nd sentinel is sent, with a pair of fds:
the coredump fd *again* and a mount fd (acquired via open_tree()) of the
container's mount tree. It's a bit ugly to send the coredump fd a 2nd
time, but what's more important the implementation didn't work: since on
SOCK_SEQPACKET a zero sized datagram cannot be distinguished from EOF
(which is a Linux API design mistake), an early EOF would be
misunderstood as a zero size datagram lacking any fd, which resulted in
protocol termination.

Moreover, I think if we touch the protocol we should make the move to
pidfs at the same time.

All of the above is what this protocol rework addresses.

1. A pidfd is now sent as well

2. The protocol is now payload, followed by the coredump fd datagram (as
   before).  But now followed by a second empty datagram with a pidfd,
   and a third empty datagram with the mount tree fd. Of this the latter
   two or last are optional. Thus, it's now a stream of payload
   datagrams with one, two or three fd-laden datagrams as sentinel. If
   we read the 2nd or 3rd sentinel without an attached fd we assume this
   is actually an EOF (whether it actually is one or not doesn't matter
   here). This should provide nice up and down compatibility.

3. The mount_tree_fd is moved into the Context object. The pidfd is
   placed there too, as a PidRef. Thus the data we pass around is now
   the coredump fd plus the context, which is simpler and makes a lot
   more semantical sense I think.

4. The "first" boolean is replaced by an explicit state engine enum

Fixes: https://github.com/systemd/systemd/issues/34130
12 months agocoredump: make check that all argv[] meta data fields are passed strict 34970/head
Lennart Poettering [Thu, 31 Oct 2024 16:02:59 +0000 (17:02 +0100)] 
coredump: make check that all argv[] meta data fields are passed strict

Otherwise, if some field is not supplied we might end up parsing a NULL
string later. Let's catch that early.

12 months agocoredump: use memory_startswith() when looking at a data blob
Lennart Poettering [Thu, 31 Oct 2024 15:53:39 +0000 (16:53 +0100)] 
coredump: use memory_startswith() when looking at a data blob

12 months agoiovw: normalize destructors
Lennart Poettering [Thu, 31 Oct 2024 15:05:49 +0000 (16:05 +0100)] 
iovw: normalize destructors

instead of passing a boolean picking the destruction method just have
different functions. That's much nicer in context of _cleanup_, and how
we usually do things.

12 months agoiovw: add simpler iovw_done() destructor
Lennart Poettering [Thu, 31 Oct 2024 15:00:13 +0000 (16:00 +0100)] 
iovw: add simpler iovw_done() destructor

12 months agocoredump: move to _cleanup_ for destroying iovw object
Lennart Poettering [Thu, 31 Oct 2024 14:44:54 +0000 (15:44 +0100)] 
coredump: move to _cleanup_ for destroying iovw object

12 months agocoredump: parse rlimit field at same place as other fields
Lennart Poettering [Thu, 31 Oct 2024 14:37:09 +0000 (15:37 +0100)] 
coredump: parse rlimit field at same place as other fields

12 months agocoredump: parse signal number at the same time as parsing other fields
Lennart Poettering [Thu, 31 Oct 2024 14:33:44 +0000 (15:33 +0100)] 
coredump: parse signal number at the same time as parsing other fields

12 months agocoredump: rename save_context() → context_parse_iovw()
Lennart Poettering [Thu, 31 Oct 2024 14:15:33 +0000 (15:15 +0100)] 
coredump: rename save_context() → context_parse_iovw()

The function doesn't "save" anything, it just parses iovw into the
individual fields, hence name the function accordingly.

12 months agocoredump: acquire some process fields via pidref
Lennart Poettering [Thu, 31 Oct 2024 14:11:39 +0000 (15:11 +0100)] 
coredump: acquire some process fields via pidref

Use pidref to acquire some fields. This just makes use of the pidref
helpers we already have. We acquire a lot of other data via classic pids
still, but for that we first have to write race-free pidref getters,
hence leave that for another time.

12 months agocoredump: rework protocol between coredump pattern handler and processing service
Lennart Poettering [Thu, 31 Oct 2024 13:52:43 +0000 (14:52 +0100)] 
coredump: rework protocol between coredump pattern handler and processing service

In 68511cebe58977ea68ae4f57c6462e979efd1cff the ability to pass the
coredump's mount namespace fd from the coredump patter handler was added
to systemd-coredump. For this the protocol was augmented, in attempt to
provide both forward and backward compatibility.

The protocol as of v256: one or more datagrams with journal log fields
about the coredump are sent via an SOCK_SEQPACKET connection. It is
finished with a zero length datagram which carries the coredump fd (this
last datagram is called "sentinel" sometimes).

The protocol after 68511cebe58977ea68ae4f57c6462e979efd1cff is extended
so that after the sentinal a 2nd sentinel is sent, with a pair of fds:
the coredump fd *again* and a mount fd (acquired via open_tree()) of the
container's mount tree. It's a bit ugly to send the coredump fd a 2nd
time, but what's more important the implementation didn't work: since on
SOCK_SEQPACKET a zero sized datagram cannot be distinguished from EOF
(which is a Linux API design mistake), an early EOF would be
misunderstood as a zero size datagram lacking any fd, which resulted in
protocol termination.

Moreover, I think if we touch the protocol we should make the move to
pidfs at the same time.

All of the above is what this protocol rework addresses.

1. A pidfd is now sent as well

2. The protocol is now payload, followed by the coredump fd datagram (as
   before).  But now followed by a second empty datagram with a pidfd,
   and a third empty datagram with the mount tree fd. Of this the latter
   two or last are optional. Thus, it's now a stream of payload
   datagrams with one, two or three fd-laden datagrams as sentinel. If
   we read the 2nd or 3rd sentinel without an attached fd we assume this
   is actually an EOF (whether it actually is one or not doesn't matter
   here). This should provide nice up and down compatibility.

3. The mount_tree_fd is moved into the Context object. The pidfd is
   placed there too, as a PidRef. Thus the data we pass around is now
   the coredump fd plus the context, which is simpler and makes a lot
   more semantical sense I think.

4. The "first" boolean is replaced by an explicit state engine enum

Fixes: #34130
12 months agocoredump: correct debug log message
Lennart Poettering [Thu, 31 Oct 2024 13:51:06 +0000 (14:51 +0100)] 
coredump: correct debug log message

12 months agocoredump: minor modernizations
Lennart Poettering [Thu, 31 Oct 2024 13:50:41 +0000 (14:50 +0100)] 
coredump: minor modernizations

12 months agocoredump: rename pid → leader_pid
Lennart Poettering [Thu, 31 Oct 2024 13:45:38 +0000 (14:45 +0100)] 
coredump: rename pid → leader_pid

Let's rename this local variable, since we are not operating on the
coredump process here after all, but on the leader of the namespace the
coredump process in, which is quite different, hence let's make this
very clear via the name.

12 months agoupdate TODO
Lennart Poettering [Thu, 31 Oct 2024 22:07:48 +0000 (23:07 +0100)] 
update TODO

12 months agosd-varlink: suppress one log message when callback already successfully enqueued...
Yu Watanabe [Thu, 31 Oct 2024 19:02:54 +0000 (04:02 +0900)] 
sd-varlink: suppress one log message when callback already successfully enqueued an error response

Follow-up for d2ebf5cc1d59e29139f06efaa3a9b2c184cdaa25.

The detailed error response is already logged, hence not necessary to
log again with the errno converted from the error response, which typically
less informative, e.g.
===
varlink-26-26: Setting state idle-server
varlink-26-26: Received message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{"service":""}}
varlink-26-26: Changing state idle-server → processing-method
varlink-26-26: Sending message: {"error":"io.systemd.UserDatabase.BadService","parameters":{}}
varlink-26-26: Changing state processing-method → processed-method
varlink-26-26: Callback for io.systemd.UserDatabase.GetUserRecord returned error: Invalid request descriptor
varlink-26-26: Changing state processed-method → idle-server
varlink-26-26: Got POLLHUP from socket.
===

12 months agoRework sysupdate meson options (#34832)
Luca Boccassi [Thu, 31 Oct 2024 21:10:28 +0000 (21:10 +0000)] 
Rework sysupdate meson options (#34832)

systemd-sysupdated is still unstable and we'd like to make breaking
changes to it even after the v257 release, so we document it as such and
disable building it by default in release builds. The distro can still
opt-in, and we still build it in developer mode so it has CI coverage

12 months agomeson: add separate option for sysupdated, disable in release builds 34832/head
Zbigniew Jędrzejewski-Szmek [Wed, 30 Oct 2024 13:21:09 +0000 (14:21 +0100)] 
meson: add separate option for sysupdated, disable in release builds

This commit introduces a build-time option to enable/disable sysupdated
separately from sysupdate. 'auto' translated to enabled by default in
developer builds.

12 months agoDrop trailing NUL in .sbat/.sdmagic sections (#34950)
Lennart Poettering [Thu, 31 Oct 2024 20:48:18 +0000 (21:48 +0100)] 
Drop trailing NUL in .sbat/.sdmagic sections (#34950)

12 months agologind/systemctl: one follow-up for DesignatedMaintenanceWindow (#34966)
Lennart Poettering [Thu, 31 Oct 2024 20:47:45 +0000 (21:47 +0100)] 
logind/systemctl: one follow-up for DesignatedMaintenanceWindow (#34966)

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

12 months agomachine: several follow-ups for recent change (#34882)
Lennart Poettering [Thu, 31 Oct 2024 20:43:18 +0000 (21:43 +0100)] 
machine: several follow-ups for recent change (#34882)

Follow-ups for #34761.

12 months agosd-json: don't accidentally convert between unsigned/signed when parsing signal
Lennart Poettering [Thu, 31 Oct 2024 14:39:34 +0000 (15:39 +0100)] 
sd-json: don't accidentally convert between unsigned/signed when parsing signal

12 months agoposix_spawn_wrapper: do not set POSIX_SPAWN_SETSIGDEF flag
Mike Gilbert [Thu, 24 Oct 2024 16:24:35 +0000 (12:24 -0400)] 
posix_spawn_wrapper: do not set POSIX_SPAWN_SETSIGDEF flag

Setting this flag is a noop without a corresponding call to
posix_spawnattr_setsigdefault.

If we call posix_spawnattr_setsigdefault with a full signal set,
it causes glibc's posix_spawn implementation to call sigaction 63 times,
once for each signal. That seems wasteful.

This feature is really only useful for signals which have their
disposition set to SIG_IGN. Otherwise the dispostion gets set to
SIG_DFL automatically, either by clone(CLONE_CLEAR_SIGHAND) or the
subsequent execve.

As far as I can tell, systemd does not have any signals set to SIG_IGN
under normal operating conditions.

12 months agobus-common-errors: use more appropriate errno for BUS_ERROR_DESIGNATED_MAINTENANCE_TI... 34966/head
Mike Yuan [Thu, 31 Oct 2024 14:46:27 +0000 (15:46 +0100)] 
bus-common-errors: use more appropriate errno for BUS_ERROR_DESIGNATED_MAINTENANCE_TIME_NOT_SCHEDULED

Fixes #33429

12 months agosystemctl: don't fall back to immediate shutdown silently if we cannot schedule one
Mike Yuan [Thu, 31 Oct 2024 14:45:15 +0000 (15:45 +0100)] 
systemctl: don't fall back to immediate shutdown silently if we cannot schedule one

The previous behavior of systemctl --when= seems absurd, i.e.
if we fail to schedule shutdown in the future it's performed
immediately. Let's instead hard fail, which also removes the need
of specializing on certain errnos (preparation for later commits).

12 months agologind-dbus: return appropriate errno for unexpected errors
Mike Yuan [Thu, 31 Oct 2024 14:33:07 +0000 (15:33 +0100)] 
logind-dbus: return appropriate errno for unexpected errors

Follow-up for 0e10c3d8724b0a5d07871c9de71565ac91dd55b7

12 months agosystemctl: use the retval of must_be_root()
Mike Yuan [Sat, 17 Aug 2024 18:33:12 +0000 (20:33 +0200)] 
systemctl: use the retval of must_be_root()

12 months agoboot: stop appending NUL to .sdmagic and .sbat sections 34950/head
Zbigniew Jędrzejewski-Szmek [Wed, 30 Oct 2024 14:30:53 +0000 (15:30 +0100)] 
boot: stop appending NUL to .sdmagic and .sbat sections

Those text sections had a trailing NUL byte. It's debatable whether this is a
good idea or not. Correctly written consumers will look at the section size so
they wouldn't need this. Shim doesn't use a trailing NUL, so let's follow suit.

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

898e9edc469f87fdb6018128bac29eef0a5fe698 reworked this code, but didn't actually
change the logic. We have always been appending the trailing zero by using a
NUL-terminated string as the section contents. (I checked this with v253.18
from before the elf2efi rework.)

.sdmagic contains a string like "#### LoaderInfo: systemd-boot 257~devel ####",
which changes with each version, so previous versions would compare unequal
anyway, so we don't need to worry about backwards compatibility.

12 months agomkosi: Install gdb in centos/fedora build image
Daan De Meyer [Thu, 31 Oct 2024 11:44:13 +0000 (12:44 +0100)] 
mkosi: Install gdb in centos/fedora build image

Lack of gdb-add-index has become a fatal error in Rawhide/c10s so
let's install gdb to make rpmbuild happy.

12 months agoresolve: do not try to send varlink error more than once
Yu Watanabe [Thu, 31 Oct 2024 02:59:10 +0000 (11:59 +0900)] 
resolve: do not try to send varlink error more than once

After d2ebf5cc1d59e29139f06efaa3a9b2c184cdaa25, sd_varlink_error() and
friends return negative errno.

Fixes https://github.com/systemd/systemd/pull/34946#discussion_r1823703636.

12 months agomachine: lookup_machine_by_name_or_pidref() returns negative errno on failure 34882/head
Yu Watanabe [Thu, 31 Oct 2024 01:24:06 +0000 (10:24 +0900)] 
machine: lookup_machine_by_name_or_pidref() returns negative errno on failure

This effectively reverts d2c1451b7398f13439b694450a23def3cf31c8db.

After the commit d2ebf5cc1d59e29139f06efaa3a9b2c184cdaa25, sd_varlink_error()
returns negative errno, hence the function always return negative errno
on failure.

12 months agomachine: use JSON_BUILD_PAIR_STRV_ENV_PAIR_NON_EMPTY()
Yu Watanabe [Fri, 25 Oct 2024 17:17:29 +0000 (02:17 +0900)] 
machine: use JSON_BUILD_PAIR_STRV_ENV_PAIR_NON_EMPTY()

Also use JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL().

12 months agosd-json: introduce JSON_BUILD_PAIR_STRV_ENV_PAIR_NON_EMPTY() macro
Yu Watanabe [Fri, 25 Oct 2024 17:09:01 +0000 (02:09 +0900)] 
sd-json: introduce JSON_BUILD_PAIR_STRV_ENV_PAIR_NON_EMPTY() macro

It is similar to JSON_BUILD_PAIR_STRV_NON_EMPTY, but takes the
list of environment variables.

12 months agosd-json: use strv_env_get_merged()
Yu Watanabe [Fri, 25 Oct 2024 17:07:02 +0000 (02:07 +0900)] 
sd-json: use strv_env_get_merged()

12 months agoenv-util: introduce strv_env_get_merged()
Yu Watanabe [Fri, 25 Oct 2024 17:01:19 +0000 (02:01 +0900)] 
env-util: introduce strv_env_get_merged()

12 months agoenv-util: replace 'char **' with 'char**'
Yu Watanabe [Fri, 25 Oct 2024 16:46:39 +0000 (01:46 +0900)] 
env-util: replace 'char **' with 'char**'

12 months agoTEST-13-NSPAWN: add test cases for listing multiple machines
Yu Watanabe [Thu, 31 Oct 2024 02:02:23 +0000 (11:02 +0900)] 
TEST-13-NSPAWN: add test cases for listing multiple machines

12 months agoTEST-13-NSPAWN: trivially kill all processes in the container on termination
Yu Watanabe [Thu, 24 Oct 2024 15:42:28 +0000 (00:42 +0900)] 
TEST-13-NSPAWN: trivially kill all processes in the container on termination

Follow-up for 841988f80d2440501a3baddba712cdb955225ab7.

No functional change, as $PID is 0 when the trap is inserted.

12 months agoTEST-13-NSPAWN: check returned machine list
Yu Watanabe [Thu, 24 Oct 2024 15:24:04 +0000 (00:24 +0900)] 
TEST-13-NSPAWN: check returned machine list

12 months agoTEST-13-NSPAWN: fix race between container exit and varlink call
Yu Watanabe [Wed, 23 Oct 2024 21:00:53 +0000 (06:00 +0900)] 
TEST-13-NSPAWN: fix race between container exit and varlink call

Follow-up for 3cb72c7862d8950bc2a963aaa3ca3255eea374b6.

The test container exits shortly, hence when varlinkctl is called, the
container may be already terminated. Let's make the container live
infinitely.
Also, this makes the os-release files removed after the container is started.

12 months agomachined: ACQUIRE_METADATA_NO is zero
Yu Watanabe [Thu, 24 Oct 2024 10:32:36 +0000 (19:32 +0900)] 
machined: ACQUIRE_METADATA_NO is zero

Follow-ups for a94fbcaa35dc63f32fbf86d25f63f6ac40a0d8b0 and
9de215219c8783e3239af27baf62275730ab51a8.

12 months agomachine: use sd_json_variant_append_arraybo() and JSON_BUILD_PAIR_VARIANT_NON_NULL()
Yu Watanabe [Thu, 24 Oct 2024 10:29:57 +0000 (19:29 +0900)] 
machine: use sd_json_variant_append_arraybo() and JSON_BUILD_PAIR_VARIANT_NON_NULL()

Follow-up for 45755275e5ae747bf79e6c7bdd9a055711ebc71f.

12 months agoNEWS: fix typo
Yu Watanabe [Thu, 31 Oct 2024 01:58:25 +0000 (10:58 +0900)] 
NEWS: fix typo

12 months agosd-varlink: update comment
Yu Watanabe [Thu, 31 Oct 2024 00:43:12 +0000 (09:43 +0900)] 
sd-varlink: update comment

12 months agosd-varlink: change sd_varlink_error() to always return an error
Lennart Poettering [Wed, 30 Oct 2024 14:31:08 +0000 (15:31 +0100)] 
sd-varlink: change sd_varlink_error() to always return an error

Let's make sure that sd_varlink_error() always returns an error code, so
that we can use it in a style "return sd_varlink_error(…);" everywhere,
which has two effects: return a good error reply to clients, and exit
the current stack frame with a failure code.

Interestingly sd_varlink_error_invalid_parameter() already worked like
this in some cases, but sd_varlink_error() itself didn't.

This is an alternative to the error handling tweak proposed in #34882,
but I think is a lot more generically useful, since it establishes a
pattern.

I checked our codebase, and this change should generally be OK without
breaking callsites, since the current callers (with exception of the
machined case from #34882) called sd_varlink_error() in the outermost
varlink method call dispatch stack frame, where this behaviour change
does not alter anything.

This is similar btw, how sd_bus_error_setf() and friends always return
error codes too, synthesized from its parameters.

12 months agosd-varlink: add helper VARLINK_STATE_WANTS_REPLY()
Lennart Poettering [Wed, 30 Oct 2024 14:30:16 +0000 (15:30 +0100)] 
sd-varlink: add helper VARLINK_STATE_WANTS_REPLY()

Let's add a helper that detects whether we still need to reply to a
state. This should make the logic easier to follow.

12 months agosd-varlink: don't show error code we already decoded as part of the log message
Lennart Poettering [Wed, 30 Oct 2024 14:29:29 +0000 (15:29 +0100)] 
sd-varlink: don't show error code we already decoded as part of the log message

12 months agosd-varlink: if we reply to errors without passing to callback, go through regular...
Lennart Poettering [Wed, 30 Oct 2024 14:19:12 +0000 (15:19 +0100)] 
sd-varlink: if we reply to errors without passing to callback, go through regular error path

If replying with an error fails, we should failt the whole connection,
and not leave the connection in a weird state.

12 months agofirstboot: several cleanups (#34958)
Yu Watanabe [Wed, 30 Oct 2024 23:05:39 +0000 (08:05 +0900)] 
firstboot: several cleanups (#34958)

Split out of #33226

12 months agosd-json: don't use C99 bool in public headers
Lennart Poettering [Wed, 30 Oct 2024 20:55:13 +0000 (21:55 +0100)] 
sd-json: don't use C99 bool in public headers

All our public headers strive to C90 compatibility with a few
extensions, and thus avoided stdbool.h and bool.

The sd_json_format_enabled() helper seems like a poor place to start
requiring stdbool.h now.

Also drop __extension__ since we are not using it anywhere else in very
similar inline functions.

(And we probably should drop any _sd_const declarations on inline
functions. Given that the compiler has the function implementation
around always, because it's in the header there's really no reason to
specify this manually, the compiler can trivially figure this out on its
own. But that's for another time.)

12 months agonetwork: support reconfiguring netdev (#34909)
Yu Watanabe [Wed, 30 Oct 2024 22:01:46 +0000 (07:01 +0900)] 
network: support reconfiguring netdev (#34909)

Closes #9627
Closes #27177.
Closes #34907.
Replaces #22557.

12 months agoman: update documentation for 'networkctl reload' 34909/head
Yu Watanabe [Mon, 28 Oct 2024 16:45:08 +0000 (01:45 +0900)] 
man: update documentation for 'networkctl reload'

12 months agotest-network: test for reload of .netdev file of stacked netdev
Yu Watanabe [Sun, 27 Oct 2024 05:23:08 +0000 (14:23 +0900)] 
test-network: test for reload of .netdev file of stacked netdev

For issue #9627, #27177, and #34907.

12 months agonetwork/netdev: replace old NetDev object with newer one on reload
Yu Watanabe [Sun, 27 Oct 2024 07:38:24 +0000 (16:38 +0900)] 
network/netdev: replace old NetDev object with newer one on reload

Then, when a .netdev file of a stacked netdev is modified, the netdev
can be reconfigured with the updated setting by something like the
following way:
```
ip link del vlan99
networkctl reload
```

Note, removing the vlan interface in the above example may not be necessary,
e.g. when only VLAN flags, egress mapping, or ingress mapping are updated.
But, it is necessary when VLAN ID is updated.

Closes #9627.
Closes #27177.
Closes #34907.
Replaces #22557.

12 months agonetwork/netdev: reconfigure netdev if possible
Yu Watanabe [Mon, 28 Oct 2024 14:42:38 +0000 (23:42 +0900)] 
network/netdev: reconfigure netdev if possible

Some netdev configs can be modified after the interface is created.
Let's allow to reconfigure existing interfaces.

12 months agonetwork/netdev: move calls of netdev_attach() and netdev_request_to_create() to netde...
Yu Watanabe [Sun, 27 Oct 2024 07:37:17 +0000 (16:37 +0900)] 
network/netdev: move calls of netdev_attach() and netdev_request_to_create() to netdev_load()

No functional change, preparation for later commits.

12 months agomkosi: Ensure we build with debuginfo
Daan De Meyer [Wed, 30 Oct 2024 18:03:49 +0000 (19:03 +0100)] 
mkosi: Ensure we build with debuginfo

12 months agocoredump: allow only empty messages after first "sentinel"
Michal Sekletar [Wed, 30 Oct 2024 13:55:09 +0000 (14:55 +0100)] 
coredump: allow only empty messages after first "sentinel"

12 months agofirstboot: generalize prompt_loop more 34958/head
Michael Ferrari [Wed, 9 Oct 2024 15:30:44 +0000 (17:30 +0200)] 
firstboot: generalize prompt_loop more

Allows unifying the custom logic for the hostname and root shell. Root
password prompting remains separate as it's logic is substantially
different to the other prompts.

12 months agofirstboot: use consistent wording for prompts
Michael Ferrari [Tue, 8 Oct 2024 23:19:43 +0000 (01:19 +0200)] 
firstboot: use consistent wording for prompts

12 months agofirstboot: clean up welcome message
Michael Ferrari [Tue, 8 Oct 2024 16:58:04 +0000 (18:58 +0200)] 
firstboot: clean up welcome message

12 months agofirstboot: order non-interactive options last
Michael Ferrari [Mon, 7 Oct 2024 09:02:16 +0000 (11:02 +0200)] 
firstboot: order non-interactive options last

12 months agonetwork/tunnel: reuse existing 6rd sit tunnel (#34938)
Yu Watanabe [Wed, 30 Oct 2024 19:04:55 +0000 (04:04 +0900)] 
network/tunnel: reuse existing 6rd sit tunnel (#34938)

split-out of #34909.

12 months agonetwork/netdev: do not try to update several parameters if the interface already...
Yu Watanabe [Wed, 30 Oct 2024 19:04:33 +0000 (04:04 +0900)] 
network/netdev: do not try to update several parameters if the interface already exists (#34937)

split-out of #34909.

12 months agonetwork: several cleanups for reloading .network files (#34933)
Yu Watanabe [Wed, 30 Oct 2024 19:04:10 +0000 (04:04 +0900)] 
network: several cleanups for reloading .network files (#34933)

split-out of #34909.

12 months agonetwork: process queued remove requests on stop (#34871)
Yu Watanabe [Wed, 30 Oct 2024 19:03:11 +0000 (04:03 +0900)] 
network: process queued remove requests on stop (#34871)

Fixes a regression caused by 85a6f300c14d75d161cbfdb3eaf5af9594400ecd
and its later commits.
Fixes #34837.

12 months agomkosi: Update packaging specs to latest (#34951)
Yu Watanabe [Wed, 30 Oct 2024 17:31:03 +0000 (02:31 +0900)] 
mkosi: Update packaging specs to latest (#34951)

12 months agotest-network: add test case for reuse of existing 6rd SIT tunnel 34938/head
Yu Watanabe [Wed, 30 Oct 2024 17:08:20 +0000 (02:08 +0900)] 
test-network: add test case for reuse of existing 6rd SIT tunnel

12 months agoFix display of qrcodes by bsod and other related cleanups (#34914)
Lennart Poettering [Wed, 30 Oct 2024 16:44:40 +0000 (17:44 +0100)] 
Fix display of qrcodes by bsod and other related cleanups (#34914)

12 months agoask-password: Allow configuring the keyring timeout via an environment variable
Daan De Meyer [Wed, 30 Oct 2024 12:53:31 +0000 (13:53 +0100)] 
ask-password: Allow configuring the keyring timeout via an environment variable

In mkosi, we want an easy way to set the keyring timeout for every
tool we invoke that might use systemd-ask-password to query for a
password which is then stored in the kernel keyring. Let's make this
possible via a new $SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC environment
variable.

Using an environment variable means we don't have to modify every separate
tool to add a CLI option allowing to specify the timeout. In mkosi specifically,
we'll set up a new session keyring for the mkosi process linked to the user keyring
so that any pins in the user keyring are used if available, and otherwise we'll query
for and store password in mkosi's session keyring with a zero timeout so that they stay
in the keyring until the mkosi process exits at which point they're removed from the
keyring.

12 months agologind: add BlockWeakInhibited property
Luca Boccassi [Wed, 30 Oct 2024 13:44:00 +0000 (13:44 +0000)] 
logind: add BlockWeakInhibited property

Fixes https://github.com/systemd/systemd/issues/34091
Follow-up for 804874d26ac73e0af07c4c5d7165c95372f03f6d

12 months agocore: make mount(8) and swapon(8) inherit SMACK label from systemd
Łukasz Stelmach [Tue, 29 Oct 2024 14:53:45 +0000 (15:53 +0100)] 
core: make mount(8) and swapon(8) inherit SMACK label from systemd

By default mount(8), umount(8), swapon(8) and swapoff(8) should run with
with the SMACK label inherited from systemd rather than the default one
meant for services.

Fixes: aa5ae9711ef3cd0c69b7fcfbd65bca05fb704a8a
Follow-up-for: 20bbf5ee4c6c80599a91e7a4b7474e931a27db4a

12 months agonetwork/ipvlan: do not try to update MAC address 34937/head
Yu Watanabe [Tue, 29 Oct 2024 16:36:10 +0000 (01:36 +0900)] 
network/ipvlan: do not try to update MAC address

12 months agonetwork/macsec: IFLA_MACSEC_PORT attribute cannot be changed
Yu Watanabe [Tue, 29 Oct 2024 15:22:17 +0000 (00:22 +0900)] 
network/macsec: IFLA_MACSEC_PORT attribute cannot be changed

Also, though currently not supported by networkd,
  IFLA_MACSEC_CIPHER_SUITE, IFLA_MACSEC_ICV_LEN, IFLA_MACSEC_SCI
cannot be updated.

12 months agonetwork/vxlan: do not try to update several parameters
Yu Watanabe [Mon, 28 Oct 2024 20:30:39 +0000 (05:30 +0900)] 
network/vxlan: do not try to update several parameters

Currently, netdev->ifindex is always zero when this function is called.
So, this does not change any behavior. Preparation for later commits.

12 months agonetwork/netdev: introduce netdev_can_set_mac/mtu() helper functions
Yu Watanabe [Tue, 29 Oct 2024 17:01:59 +0000 (02:01 +0900)] 
network/netdev: introduce netdev_can_set_mac/mtu() helper functions

Several netdevs cannot set IFLA_ADDRESS or IFLA_MTU attribute on update.
Currently, the vtable field is unused, as we do not support updating
existing netdevs. Preparation for later commits.

12 months agonetwork: use newly loaded Network object if a referenced NetDev object is updated 34933/head
Yu Watanabe [Mon, 28 Oct 2024 13:39:15 +0000 (22:39 +0900)] 
network: use newly loaded Network object if a referenced NetDev object is updated

Even if .network file is not updated, referenced NetDev object may be
different. In that case, let's use the newly loaded Network object.

12 months agonetwork: drop no-op cleanup
Yu Watanabe [Sun, 27 Oct 2024 07:29:24 +0000 (16:29 +0900)] 
network: drop no-op cleanup

- network_load() is always called with an empty OrderedHashmap, renamed the output
  parameter to 'ret'.
- When netdev_load() is called on startup, the hashmap is NULL. When it is
  called on reloading, the hashmap is not cleaned up.

Hence, then these cleanups are always no-op. Let's drop them.

12 months agonetwork/netdev: update state file when NetDev object assignment is changed
Yu Watanabe [Tue, 29 Oct 2024 15:16:10 +0000 (00:16 +0900)] 
network/netdev: update state file when NetDev object assignment is changed

12 months agonetwork: swap asterisk and space
Yu Watanabe [Sun, 27 Oct 2024 13:58:25 +0000 (22:58 +0900)] 
network: swap asterisk and space

12 months agogithub: drop workaround and use distro mold 34871/head
Yu Watanabe [Thu, 24 Oct 2024 09:27:16 +0000 (18:27 +0900)] 
github: drop workaround and use distro mold

Now, ubuntu-24.04 has mold-2.30.0+dfsg-1build1 .
See https://packages.ubuntu.com/noble/mold .

12 months agotest-network: add test for DHCPv4 address removal on stop
Yu Watanabe [Wed, 23 Oct 2024 20:25:41 +0000 (05:25 +0900)] 
test-network: add test for DHCPv4 address removal on stop

For issue #34837.

12 months agonetwork: process queued remove requests before networkd is stopped
Yu Watanabe [Wed, 23 Oct 2024 19:40:45 +0000 (04:40 +0900)] 
network: process queued remove requests before networkd is stopped

This makes networkd process all queued remove requests when a
terminating or restarting signal is received. Otherwise, e.g. DHCPv4
address will not be removed on stop, especially when
KeepConfiguration=no.

Fixes a bug introduced by 85a6f300c14d75d161cbfdb3eaf5af9594400ecd and
its subsequent commits.

Fixes #34837.

Co-authored-by: Will Fancher <elvishjerricco@gmail.com>
12 months agomkosi: update debian commit reference 34951/head
Daan De Meyer [Wed, 30 Oct 2024 15:31:39 +0000 (16:31 +0100)] 
mkosi: update debian commit reference

2f288667e0 Install sysupdate.feature manpage
384393a955 d/systemd.postrm: delete more internal state directories on purge

12 months agomkosi: update arch commit reference
Daan De Meyer [Wed, 30 Oct 2024 15:29:43 +0000 (16:29 +0100)] 
mkosi: update arch commit reference

62c224b60c Specify --no-rebuild when calling meson install
b5c20dc6b0 fix redirection for dash
7fef8e4cdd upgpkg: 256.7-1: new upstream release

12 months agocoredump: AccessContainer= bunch of followups (#34333)
Luca Boccassi [Wed, 30 Oct 2024 14:37:44 +0000 (14:37 +0000)] 
coredump: AccessContainer= bunch of followups (#34333)

Fixes #34130

12 months agotest-sbat: separate the two sbat sections
Zbigniew Jędrzejewski-Szmek [Wed, 30 Oct 2024 14:19:24 +0000 (15:19 +0100)] 
test-sbat: separate the two sbat sections

12 months agoNEWS: remove duplicated entry
Zbigniew Jędrzejewski-Szmek [Sat, 26 Oct 2024 05:22:01 +0000 (07:22 +0200)] 
NEWS: remove duplicated entry

The same item is described below.

Also reflow some paragraphs (presumably indented with emacs, which does this
wrong).

12 months agocryptenroll,homectl,journalctl: adjust messages before qrcodes 34914/head
Zbigniew Jędrzejewski-Szmek [Mon, 28 Oct 2024 12:59:05 +0000 (13:59 +0100)] 
cryptenroll,homectl,journalctl: adjust messages before qrcodes

Users will generally know what a qrcode is, so let's not treat them as dumb and
explain that it can be scanned. OTOH, we should say what the qrcode contains
and it is useful to give a hint why the users would want to scan it. Reword
messages accordingly.

(Also, don't say "to your phone", when somebody might be using a stolen phone,
or something else then a phone.)

12 months agobsod: make message for qrcode more useful
Zbigniew Jędrzejewski-Szmek [Mon, 28 Oct 2024 12:51:25 +0000 (13:51 +0100)] 
bsod: make message for qrcode more useful

People know what a qrcode is. We don't need to tell them to scan it.
Instead, we should say what the code contains.

While at it, rename "stream" to "f" in line with the usual style.

12 months agoman: warn that sysupdate's API is unstable
Adrian Vovk [Sat, 19 Oct 2024 01:04:41 +0000 (21:04 -0400)] 
man: warn that sysupdate's API is unstable

There's still some breaking changes we want to make to sysupdated, but
they'll potentially take months and we don't want to block the systemd
release for that long. So, we can instead mark sysupdate's API as
unstable

12 months agotest: add test coverage for EnterNamespace= 34333/head
Michal Sekletar [Fri, 6 Sep 2024 17:23:09 +0000 (19:23 +0200)] 
test: add test coverage for EnterNamespace=

12 months agocoredump: return correct error variable
Michal Sekletár [Tue, 29 Oct 2024 17:41:55 +0000 (17:41 +0000)] 
coredump: return correct error variable

12 months agocoredump: rename AccessContainer= to EnterNamespace=
Michal Sekletar [Tue, 10 Sep 2024 17:32:57 +0000 (19:32 +0200)] 
coredump: rename AccessContainer= to EnterNamespace=

12 months agocoredump: rework gather_pid_mount_tree_fd()
Michal Sekletar [Tue, 10 Sep 2024 17:15:46 +0000 (19:15 +0200)] 
coredump: rework gather_pid_mount_tree_fd()

12 months agocoredump: use FORK_WAIT
Michal Sekletar [Mon, 9 Sep 2024 16:48:48 +0000 (18:48 +0200)] 
coredump: use FORK_WAIT