]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 months agocore: do not disconnect from bus when failed to install signal match (#35779)
Daan De Meyer [Fri, 3 Jan 2025 15:45:50 +0000 (16:45 +0100)] 
core: do not disconnect from bus when failed to install signal match (#35779)

If bus_add_match_full() is called without install callback and we failed
to install the signal match e.g. by timeout, then add_match_callback()
will disconnect from the bus. Let's use a custom install handler and
handle failures gracefully.

This does not *solve* the root cause of issue
https://github.com/systemd/systemd/issues/30573, but should improve the
situation when the issue is triggered.

10 months agodissect-image: rename ReplyParameters → MountImageReplyParameters
Lennart Poettering [Mon, 11 Nov 2024 16:20:19 +0000 (17:20 +0100)] 
dissect-image: rename ReplyParameters → MountImageReplyParameters

10 months agodissect: minor simplifications
Lennart Poettering [Tue, 12 Nov 2024 08:45:05 +0000 (09:45 +0100)] 
dissect: minor simplifications

10 months agosd-json: add json_dispatch_const_path() helper
Lennart Poettering [Tue, 19 Nov 2024 13:59:00 +0000 (14:59 +0100)] 
sd-json: add json_dispatch_const_path() helper

The new json_dispatch_const_path() is to json_dispatch_path() what
sd_json_dispatch_const_string() is to sd_json_dispatch_ string(), i.e.
doesn't implicitly strdup() the string, but gives you the pointer into
the JSON structure, and thus requires you to keep it pinned.

10 months agodissect: minor additions to the systemd-dissect tool (#35829)
Daan De Meyer [Fri, 3 Jan 2025 15:05:30 +0000 (16:05 +0100)] 
dissect: minor additions to the systemd-dissect tool (#35829)

10 months agonspawn: trivial tweaklets (#35831)
Daan De Meyer [Fri, 3 Jan 2025 14:54:43 +0000 (15:54 +0100)] 
nspawn: trivial tweaklets (#35831)

10 months agohwdb: replace f20 by micmute in mm kbd database (#34325)
Lennart Poettering [Fri, 3 Jan 2025 13:55:50 +0000 (14:55 +0100)] 
hwdb: replace f20 by micmute in mm kbd database (#34325)

here's a (strawman for now) PR addressing #34323.

don't merge until there's consensus that it's the right time to address
this.

Fixes: #34323
10 months agovmspawn: Switch to virtconsole for headless console (#35836)
Daan De Meyer [Fri, 3 Jan 2025 12:54:09 +0000 (13:54 +0100)] 
vmspawn: Switch to virtconsole for headless console (#35836)

virtconsole is the modern way to set up a headless serial connection
to a virtual machine so let's make use of it instead of -serial. This
also allows us to get rid of the per architecture serial console device
names and makes vmspawn more consistent with mkosi qemu which already
uses
virtconsole.

10 months agomachine: introduce io.systemd.Machine.BindMount method (#35066)
Daan De Meyer [Fri, 3 Jan 2025 12:19:48 +0000 (13:19 +0100)] 
machine: introduce io.systemd.Machine.BindMount method (#35066)

This PR introduces io.systemd.Machine.BindMount method which is
alternative to DBus's BindMountMachine.

10 months agofs-util: teach xopenat_full() to pick automatically if given as MODE_INVALID
Lennart Poettering [Thu, 14 Nov 2024 11:20:07 +0000 (12:20 +0100)] 
fs-util: teach xopenat_full() to pick automatically if given as MODE_INVALID

10 months agonspawn: rework userns_mkdir() around chase()
Lennart Poettering [Thu, 14 Nov 2024 11:23:19 +0000 (12:23 +0100)] 
nspawn: rework userns_mkdir() around chase()

10 months agoudev: split udev_manager_init() and udev_manager_main() into small pieces (#35735)
Lennart Poettering [Fri, 3 Jan 2025 11:27:14 +0000 (12:27 +0100)] 
udev: split udev_manager_init() and udev_manager_main() into small pieces (#35735)

10 months agofix: sd-measure `dtbauto` and `hwdids` arg parsing
Noel Georgi [Fri, 27 Dec 2024 11:50:41 +0000 (17:20 +0530)] 
fix: sd-measure `dtbauto` and `hwdids` arg parsing

Commit 630cf4e7dafb062588a2d9e09cf470806f00bb9e introduced `.dtbauto`,
but since it's before `.hwdids` commit 4c0b7f425024923f37c7e571fa563f602e8bf369
made `dtbauto` the last argument whereas it should have been `hwdids`.

Otherwise the code was measuring the content of hwdids into dtbauto
section and vice-versa.

Found this while adding the new `dtbauto` and `.hwdids` fields in the go
implementation of `sd-measure` at
https://github.com/siderolabs/talos/blob/main/internal/pkg/secureboot/measure/measure.go.

Signed-off-by: Noel Georgi <git@frezbo.dev>
10 months agohwdb: drop some now redundant mappings 34325/head
Lennart Poettering [Wed, 11 Dec 2024 14:23:04 +0000 (15:23 +0100)] 
hwdb: drop some now redundant mappings

According to @jwrdegoede these are now redundant, since the kernel
drivers map these correctly already now that the f20/f21/f23 tweaks are
gone.

Hence, let's just drop this.

All credit to Hans.

As per: https://github.com/systemd/systemd/pull/34325#pullrequestreview-2495482652

10 months agohwdb: f23 → touchpad_off
Lennart Poettering [Mon, 9 Sep 2024 14:14:11 +0000 (16:14 +0200)] 
hwdb: f23 → touchpad_off

10 months agohwdb: f22 → touchpad_on
Lennart Poettering [Mon, 9 Sep 2024 14:12:44 +0000 (16:12 +0200)] 
hwdb: f22 → touchpad_on

10 months agohwdb: f21 → touchpad_toggle
Lennart Poettering [Mon, 9 Sep 2024 14:10:09 +0000 (16:10 +0200)] 
hwdb: f21 → touchpad_toggle

Similar to the previous commit.

10 months agohwdb: f20 → micmute
Lennart Poettering [Mon, 9 Sep 2024 13:56:09 +0000 (15:56 +0200)] 
hwdb: f20 → micmute

See: #34323

10 months agovmspawn: Switch to virtconsole for headless console 35836/head
Daan De Meyer [Fri, 3 Jan 2025 10:14:44 +0000 (11:14 +0100)] 
vmspawn: Switch to virtconsole for headless console

virtconsole is the modern way to set up a headless serial connection
to a virtual machine so let's make use of it instead of -serial. This
also allows us to get rid of the per architecture serial console device
names and makes vmspawn more consistent with mkosi qemu which already uses
virtconsole.

10 months agovmspawn: Use vmspawn in drive ID name instead of mkosi
Daan De Meyer [Fri, 3 Jan 2025 10:14:09 +0000 (11:14 +0100)] 
vmspawn: Use vmspawn in drive ID name instead of mkosi

10 months agoupdate TODO
Lennart Poettering [Sat, 21 Dec 2024 11:54:41 +0000 (12:54 +0100)] 
update TODO

10 months agonspawn: improve log messages a bit 35831/head
Lennart Poettering [Mon, 25 Nov 2024 11:11:53 +0000 (12:11 +0100)] 
nspawn: improve log messages a bit

10 months agonspawn: drop some redundant {}
Lennart Poettering [Mon, 25 Nov 2024 11:15:17 +0000 (12:15 +0100)] 
nspawn: drop some redundant {}

10 months agodissect: employ vpick also if we operate on a directory-based image 35829/head
Lennart Poettering [Thu, 14 Nov 2024 11:14:39 +0000 (12:14 +0100)] 
dissect: employ vpick also if we operate on a directory-based image

10 months agodissect: add a bit of color to --discover table
Lennart Poettering [Tue, 12 Nov 2024 11:48:54 +0000 (12:48 +0100)] 
dissect: add a bit of color to --discover table

10 months agodissect: show all kinds of images in --discover
Lennart Poettering [Tue, 12 Nov 2024 11:48:39 +0000 (12:48 +0100)] 
dissect: show all kinds of images in --discover

Given that systemd-dissect can nowadays operate on plain directories,
let's include directory images in the --discover output too.

Replace the filter with a filter for hidden images instead, as suddenly
the root fs image (which is a directory image ".host") otherwise shows up.

10 months agodebug-generator: rework from post-merge review #35410 (#35696)
Lennart Poettering [Fri, 3 Jan 2025 08:34:50 +0000 (09:34 +0100)] 
debug-generator: rework from post-merge review #35410 (#35696)

- https://github.com/systemd/systemd/pull/35410#discussion_r1893664993
- https://github.com/systemd/systemd/pull/35410#discussion_r1893667581

10 months agohwdb: Add macro keys for HP 430 Programmable Wireless Keypad
Chris Mayo [Thu, 2 Jan 2025 19:22:10 +0000 (19:22 +0000)] 
hwdb: Add macro keys for HP 430 Programmable Wireless Keypad

10 months agorandom-util: our baseline includes getrandom() (v3.17) now (#35816)
Daan De Meyer [Fri, 3 Jan 2025 08:23:06 +0000 (09:23 +0100)] 
random-util: our baseline includes getrandom() (v3.17) now (#35816)

10 months agoresolved: stop mdns/lnrr when config changes to disabled on reload
Luca Boccassi [Thu, 2 Jan 2025 17:30:21 +0000 (17:30 +0000)] 
resolved: stop mdns/lnrr when config changes to disabled on reload

Currently on reload mdns/lnrr are enabled if they were disabled,
but not viceversa. Fix it.

Follow-up for 14a52176798bc2d013297b503ac6fa49a64e2725

10 months agoCorrect ACCEL_MOUNT_MATRIX for Chuwi Hi10 Max
Michael Limiero [Thu, 2 Jan 2025 15:41:28 +0000 (10:41 -0500)] 
Correct ACCEL_MOUNT_MATRIX for Chuwi Hi10 Max

10 months agoterminal-util: introduce terminal_{new,detach}_session helpers (#35811)
Daan De Meyer [Fri, 3 Jan 2025 08:21:19 +0000 (09:21 +0100)] 
terminal-util: introduce terminal_{new,detach}_session helpers (#35811)

10 months agonetwork/dhcp: introduce global setting for DHCPv4 client identifier (#35783)
Daan De Meyer [Fri, 3 Jan 2025 08:19:55 +0000 (09:19 +0100)] 
network/dhcp: introduce global setting for DHCPv4 client identifier (#35783)

Typically, the same client identifier setting is used for all
interfaces. Hence, better to provide the system-wide setting to specify
the client identifier.

10 months agounits: some improvements in breakpoint-* units. 35696/head
Antonio Alvarez Feijoo [Fri, 3 Jan 2025 07:32:43 +0000 (08:32 +0100)] 
units: some improvements in breakpoint-* units.

- Set `RefuseManualStart=yes`.
- Order before shutdown.target and emergency.target.
- Remove wrong `Wants=remote-fs.target` dependency from
breakpoint-pre-switch-root.service.
- Remove unneeded `After=sysroot.mount` from breakpoint-pre-switch-root.service
(implied by initrd.target).

10 months agodebug-generator: use helper to check breakpoint validity
Antonio Alvarez Feijoo [Fri, 3 Jan 2025 07:32:27 +0000 (08:32 +0100)] 
debug-generator: use helper to check breakpoint validity

10 months agoterminal-util: introduce terminal_{new,detach}_session helpers 35811/head
Mike Yuan [Thu, 2 Jan 2025 15:25:40 +0000 (16:25 +0100)] 
terminal-util: introduce terminal_{new,detach}_session helpers

Prompted by #35761

10 months agoterminal-util: regroup some functions
Mike Yuan [Thu, 2 Jan 2025 15:12:35 +0000 (16:12 +0100)] 
terminal-util: regroup some functions

10 months agorandom-util: our baseline includes getrandom() (v3.17) now 35816/head
Mike Yuan [Thu, 2 Jan 2025 19:03:33 +0000 (20:03 +0100)] 
random-util: our baseline includes getrandom() (v3.17) now

Plus, linux/random.h never defined getrandom(), hence remove
the custom machinery for sys/random.h vs linux/random.h
in favor of single HAVE_GETRANDOM.

10 months agorandom-util: drop needless conditionalization of sys/auxv.h
Mike Yuan [Thu, 2 Jan 2025 18:59:56 +0000 (19:59 +0100)] 
random-util: drop needless conditionalization of sys/auxv.h

We assume its existence in basic/build-path.c, shared/userdb.c,
and coredump/coredump.c already, for which nothing has been reported
so far. So this seems safe to drop.

10 months agomissing_syscall: mandate __NR_memfd_create
Mike Yuan [Thu, 2 Jan 2025 19:32:51 +0000 (20:32 +0100)] 
missing_syscall: mandate __NR_memfd_create

Follow-up for 6db5a6e799db9d95185cd0c2a327109e80114aea

For basic system functionality we require memfd nowadays,
so fail the build if syscall number not available.

10 months agoREADME: document kernel version for GRND_INSECURE and close_range()
Mike Yuan [Thu, 2 Jan 2025 19:03:00 +0000 (20:03 +0100)] 
README: document kernel version for GRND_INSECURE and close_range()

10 months agoshared/hibernate-util: handle the case where no swap has available backing dev (...
Mike Yuan [Thu, 2 Jan 2025 18:26:58 +0000 (19:26 +0100)] 
shared/hibernate-util: handle the case where no swap has available backing dev (#35802)

Fixes https://github.com/systemd/systemd/issues/35798
Replaces https://github.com/systemd/systemd/pull/35801

10 months agoask-password: add varlink IPC interface and various other additions and fixes (#35074)
Lennart Poettering [Thu, 2 Jan 2025 17:21:35 +0000 (18:21 +0100)] 
ask-password: add varlink IPC interface and various other additions and fixes (#35074)

10 months agocore/socket: several fixlets (#35637)
Lennart Poettering [Thu, 2 Jan 2025 17:20:48 +0000 (18:20 +0100)] 
core/socket: several fixlets (#35637)

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

10 months agotest: update README's Ubuntu CI section for mkosi changes
Luca Boccassi [Thu, 2 Jan 2025 16:21:42 +0000 (16:21 +0000)] 
test: update README's Ubuntu CI section for mkosi changes

10 months agoTwo doc updates (#35810)
Luca Boccassi [Thu, 2 Jan 2025 16:04:00 +0000 (16:04 +0000)] 
Two doc updates (#35810)

10 months agomachine: tests for io.systemd.Machine.BindMount 35066/head
Ivan Kruglov [Wed, 18 Dec 2024 18:08:00 +0000 (19:08 +0100)] 
machine: tests for io.systemd.Machine.BindMount

10 months agomachine: introduce io.systemd.Machine.BindMount method
Ivan Kruglov [Wed, 18 Dec 2024 18:06:36 +0000 (19:06 +0100)] 
machine: introduce io.systemd.Machine.BindMount method

10 months agotest: add CI test validating the new varlink interface and more 35074/head
Lennart Poettering [Wed, 6 Nov 2024 22:47:37 +0000 (23:47 +0100)] 
test: add CI test validating the new varlink interface and more

10 months agoask-password: add comment with well-known errors from ask_password_auto()
Lennart Poettering [Thu, 7 Nov 2024 14:07:18 +0000 (15:07 +0100)] 
ask-password: add comment with well-known errors from ask_password_auto()

10 months agoask-password: add Varlink API for querying passwords from the user
Lennart Poettering [Wed, 6 Nov 2024 10:56:46 +0000 (11:56 +0100)] 
ask-password: add Varlink API for querying passwords from the user

This turns systemd-ask-password into a small Varlink service, so that
there's an standard IPC way to ask for a password. It mostly directly
exposes the functionality of the Varlink service.

10 months agoask-password-api: add new "hup_fd" field to AskPasswordReq
Lennart Poettering [Thu, 7 Nov 2024 10:38:23 +0000 (11:38 +0100)] 
ask-password-api: add new "hup_fd" field to AskPasswordReq

This new field allows specification of an fd on which the password
prompt logic will look for POLLHUP events for, and if seen will abort
the query.

The usecase for this is that when we query for a pw on behalf of a
Varlink client we can abort the query automatically if the client dies.

10 months agoask-password-api: move timeout into AskPasswordRequest structure too
Lennart Poettering [Thu, 7 Nov 2024 09:41:56 +0000 (10:41 +0100)] 
ask-password-api: move timeout into AskPasswordRequest structure too

10 months agoask-password-api: move tty_fd into AskPasswordRequest structure, too
Lennart Poettering [Thu, 7 Nov 2024 09:30:34 +0000 (10:30 +0100)] 
ask-password-api: move tty_fd into AskPasswordRequest structure, too

10 months agoask-password-api: move 'flag_file' from function parameter into AskPasswordRequest...
Lennart Poettering [Thu, 7 Nov 2024 09:00:53 +0000 (10:00 +0100)] 
ask-password-api: move 'flag_file' from function parameter into AskPasswordRequest structure

10 months agoask-password-agent: send READY=1 when we established inotify watch
Lennart Poettering [Wed, 6 Nov 2024 22:38:17 +0000 (23:38 +0100)] 
ask-password-agent: send READY=1 when we established inotify watch

10 months agoask-password-agent: optionally read pw to reply from env var
Lennart Poettering [Wed, 6 Nov 2024 22:38:01 +0000 (23:38 +0100)] 
ask-password-agent: optionally read pw to reply from env var

10 months agopcrextend: split out varlink server setup into its own function
Lennart Poettering [Wed, 6 Nov 2024 10:58:56 +0000 (11:58 +0100)] 
pcrextend: split out varlink server setup into its own function

10 months agosd-varlink: expose api to get input/output fd separately
Lennart Poettering [Thu, 7 Nov 2024 10:49:33 +0000 (11:49 +0100)] 
sd-varlink: expose api to get input/output fd separately

10 months agodocs: Update code coverage documentation 35810/head
Daan De Meyer [Thu, 2 Jan 2025 15:25:19 +0000 (16:25 +0100)] 
docs: Update code coverage documentation

10 months agodocs: Use mkosi sandbox in test documentation as well
Daan De Meyer [Thu, 2 Jan 2025 15:17:53 +0000 (16:17 +0100)] 
docs: Use mkosi sandbox in test documentation as well

Same change as in HACKING.md, but for running the integration tests.

10 months agoshared/hibernate-util: drop support for kernels lacking /sys/power/resume_offset 35802/head
Mike Yuan [Thu, 2 Jan 2025 03:32:00 +0000 (04:32 +0100)] 
shared/hibernate-util: drop support for kernels lacking /sys/power/resume_offset

The current fallback path is actually unreliable, given
the kernel *supports* setting the resume offset through
cmdline after all, but just not exposed under /sys/.
For v258 let's drop it hence.

I didn't bump the baseline to 4.17, but merely documented
new requirement in README, because there's certainly more
compat stuff to drop between 4.3 and 4.17, and README is
a useful list for things to kill. We'll get to 5.4 eventually.

10 months agoREADME: document a bunch of new kernel APIs we utilize
Mike Yuan [Thu, 2 Jan 2025 14:44:59 +0000 (15:44 +0100)] 
README: document a bunch of new kernel APIs we utilize

10 months agoshared/blockdev-util: shorten the code a bit
Mike Yuan [Thu, 2 Jan 2025 03:22:46 +0000 (04:22 +0100)] 
shared/blockdev-util: shorten the code a bit

If btrfs_get_block_device_fd() returns 0, ret is already initialized.

10 months agoshared/hibernate-util: handle the case where no swap has available backing dev
Mike Yuan [Thu, 2 Jan 2025 03:17:47 +0000 (04:17 +0100)] 
shared/hibernate-util: handle the case where no swap has available backing dev

This also makes find_suitable_hibernation_device() report
more accurate error (ENOSPC -> ESTALE) if there's
no swap space on the system at all but resume= is set.

Fixes #35798
Replaces #35801

10 months agoshared/hibernate-util: don't attempt to fiemap fd if no backing dev available
Mike Yuan [Thu, 2 Jan 2025 03:13:23 +0000 (04:13 +0100)] 
shared/hibernate-util: don't attempt to fiemap fd if no backing dev available

Prompted by #35798

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
10 months agosystemctl: certainly ignore ENOENT in checking inhibitors
Yu Watanabe [Thu, 2 Jan 2025 12:15:02 +0000 (21:15 +0900)] 
systemctl: certainly ignore ENOENT in checking inhibitors

Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.

Follow-up for 084f361b509cbffe7ffd5ab6085469f76f799fe5 and
a1417e5563acb73a0accdc12b3af91e4ec1c7f46.

Note, ERRNO_IS_NEG_DISCONNECT() includes ENONET rather than ENOENT...
So, ENOENT needs to be handled explicitly.

Fixes #35757 and #35806.

10 months agounits/breakpoint-pre-basic.service: explicitly order it before sysroot.mount
Antonio Alvarez Feijoo [Fri, 20 Dec 2024 13:29:05 +0000 (14:29 +0100)] 
units/breakpoint-pre-basic.service: explicitly order it before sysroot.mount

If `rd.systemd.break=pre-mount` is not set during boot, there is no unit that
prevents sysroot.mount from being activated.

10 months agoman/debug-generator: replace "main system" with "host"
Antonio Alvarez Feijoo [Fri, 20 Dec 2024 13:28:36 +0000 (14:28 +0100)] 
man/debug-generator: replace "main system" with "host"

10 months agomkosi: Allow disabling vcs-tag via environment variable
Daan De Meyer [Thu, 2 Jan 2025 12:11:48 +0000 (13:11 +0100)] 
mkosi: Allow disabling vcs-tag via environment variable

10 months agobash-completion/journalctl: list user units when --user is already specified (#35799)
Luca Boccassi [Thu, 2 Jan 2025 11:20:31 +0000 (11:20 +0000)] 
bash-completion/journalctl: list user units when --user is already specified (#35799)

Also, escape the current input before matching listed user units.

Fixes #35794.

10 months agoerrno-list: prefer strerrorname_np() as errno_to_name() provider
Mike Yuan [Tue, 31 Dec 2024 01:46:28 +0000 (02:46 +0100)] 
errno-list: prefer strerrorname_np() as errno_to_name() provider

10 months agobash-completion/journalctl: also escape the current input of user unit 35799/head
Yu Watanabe [Thu, 2 Jan 2025 02:50:38 +0000 (11:50 +0900)] 
bash-completion/journalctl: also escape the current input of user unit

Follow-up for cec82cb943d0fd23dd09309be62c6bcde6b47839.

10 months agobash-completion/journalctl: list user units when --user is already specified
Yu Watanabe [Thu, 2 Jan 2025 02:48:58 +0000 (11:48 +0900)] 
bash-completion/journalctl: list user units when --user is already specified

Follow-up for 52051dd84c45c745ca877d8893be6f71aa27bf97.
Fixes #35794.

10 months ago60-sensor.hwdb: Loosen model mask to include entire series
richfifeg [Mon, 30 Dec 2024 18:07:02 +0000 (10:07 -0800)] 
60-sensor.hwdb: Loosen model mask to include entire series

This sensor is the same for Asus's entire Q5##L series, so match accordingly.

Tested with my Q502LAB.

10 months agopo: Translated using Weblate (German)
Ettore Atalan [Mon, 30 Dec 2024 22:38:37 +0000 (23:38 +0100)] 
po: Translated using Weblate (German)

Currently translated at 96.8% (249 of 257 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main

10 months agoTEST-07-PID1: add test case for #35635 35637/head
Mike Yuan [Mon, 30 Dec 2024 22:35:32 +0000 (23:35 +0100)] 
TEST-07-PID1: add test case for #35635

10 months agotest: move test for MaxConnectionsPerSource= to TEST-07-PID1
Mike Yuan [Mon, 30 Dec 2024 22:04:21 +0000 (23:04 +0100)] 
test: move test for MaxConnectionsPerSource= to TEST-07-PID1

Follow-up for 3456c89ac26872f4befa2bdf7c260529932e3909

10 months agocore/socket: introduce intermediate SOCKET_START_OPEN state
Mike Yuan [Mon, 16 Dec 2024 00:54:11 +0000 (01:54 +0100)] 
core/socket: introduce intermediate SOCKET_START_OPEN state

Prior to this commit, if no Exec*= is defined for socket,
and the unit was in SOCKET_FAILED state, failure of socket_open_fds()
would induce state transition SOCKET_FAILED -> SOCKET_FAILED,
and OnFailure= deps get unexpectedly skipped. Let's introduce
an intermediate state, so that during unit start we enter
UNIT_ACTIVATING at least once.

Fixes #35635

10 months agocore/socket: clean up usbffs handling
Mike Yuan [Mon, 16 Dec 2024 18:59:17 +0000 (19:59 +0100)] 
core/socket: clean up usbffs handling

- Log about errors in socket_open_fds()
- Open parent dir fd and operate under it, instead of constructing paths
  everywhere
- Replace scandir() with readdir_all()

10 months agobasic/recurse-dir: modernize readdir_all()
Mike Yuan [Mon, 16 Dec 2024 15:41:58 +0000 (16:41 +0100)] 
basic/recurse-dir: modernize readdir_all()

10 months agocore/socket: close fds also on SOCKET_CLEAN state
Mike Yuan [Mon, 16 Dec 2024 00:28:02 +0000 (01:28 +0100)] 
core/socket: close fds also on SOCKET_CLEAN state

Follow-up for c968d76a382f905b419cacd23a6b20aa31aca580

We'd only transition to SOCKET_CLEAN state if previously
inactive (see socket_clean()), hence no fds shall be persisted
in this state.

10 months agocore/socket: use correct kill operation for SOCKET_STOP_PRE_SIGTERM
Mike Yuan [Tue, 17 Dec 2024 12:51:24 +0000 (13:51 +0100)] 
core/socket: use correct kill operation for SOCKET_STOP_PRE_SIGTERM

Follow-up for a232ebcc2cd3d5e16b0d0fb0be61549f25fb8239

10 months agocore/socket: trivial coding style cleanups
Mike Yuan [Mon, 16 Dec 2024 00:29:35 +0000 (01:29 +0100)] 
core/socket: trivial coding style cleanups

10 months agosysusers.d/basic: fix alignment
Mike Yuan [Mon, 16 Dec 2024 14:26:02 +0000 (15:26 +0100)] 
sysusers.d/basic: fix alignment

Follow-up for a4c0528f14257e23a8fad8855f178ef71d99978b

10 months agomkosi: switch to github mirror of openSUSE sources from build.opensuse.org (#35789)
Luca Boccassi [Mon, 30 Dec 2024 18:42:29 +0000 (18:42 +0000)] 
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org (#35789)

The commit history of
[src.opensuse.org](https://src.opensuse.org/pool/systemd/src/branch/devel)
has been reset again to 2015 (both branches, factory and devel)... this
is unusable for now. I'd suggest switching to the github mirror of
code.opensuse.org, maintained since 2019 (at least github is not down
that often and the commit history does not change).

10 months agomkosi: switch to github mirror of openSUSE sources from build.opensuse.org 35789/head
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 16:39:16 +0000 (17:39 +0100)] 
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org

The current src.opensuse.org is very unstable and commit hashes are reset (or
even removed) every now and then. While the official repo is not fixed, let's
move to a more stable source, the github mirror of code.opensuse.org, maintained
since 2019.

10 months agomkosi: add libopenssl devel package to openSUSE tools tree
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 16:38:36 +0000 (17:38 +0100)] 
mkosi: add libopenssl devel package to openSUSE tools tree

Otherwise, the build fails with:

```
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /mnt/work/src/systemd/upstream-fork/main/build-mkosi
ninja: Entering directory `/mnt/work/src/systemd/upstream-fork/main/build-mkosi'
[463/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
FAILED: src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
cc -Isrc/shared/libsystemd-shared-258.a.p -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-json -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-path -I../src/libsystemd/sd-resolve -I../src/libsystemd/sd-varlink -I/usr/include/blkid -I/usr/include/libmount -I/usr/include/p11-kit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=3 --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fPIC -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -fvisibility=default -MD -MQ src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -MF src/shared/libsystemd-shared-258.a.p/openssl-util.c.o.d -o src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -c ../src/shared/openssl-util.c
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_read’:
../src/shared/openssl-util.c:1395:65: error: implicit declaration of function ‘UI_method_get_ex_data’; did you mean ‘UI_method_get_reader’? [-Wimplicit-function-declaration]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~
      |                                                                 UI_method_get_reader
../src/shared/openssl-util.c:1395:65: warning: nested extern declaration of ‘UI_method_get_ex_data’ [-Wnested-externs]
../src/shared/openssl-util.c:1395:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                           ^
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_new’:
../src/shared/openssl-util.c:1479:13: error: implicit declaration of function ‘UI_method_set_ex_data’; did you mean ‘UI_method_set_reader’? [-Wimplicit-function-declaration]
 1479 |         if (UI_method_set_ex_data(ui->method, 0, &ui->request) == 0)
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             UI_method_set_reader
../src/shared/openssl-util.c:1479:13: warning: nested extern declaration of ‘UI_method_set_ex_data’ [-Wnested-externs]
[480/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/pkcs11-util.c.o
ninja: build stopped: subcommand failed.
```

10 months agoFollow-ups for recent PRs plus modernizations prompted thereby (#35760)
Mike Yuan [Mon, 30 Dec 2024 15:35:59 +0000 (16:35 +0100)] 
Follow-ups for recent PRs plus modernizations prompted thereby (#35760)

Please backport the first commit to stable.

10 months agomkosi: update openSUSE commit reference
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 10:00:07 +0000 (11:00 +0100)] 
mkosi: update openSUSE commit reference

Force-pushed as usual, now HEAD is v257.1.

10 months agoukify: fix typos
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 08:41:32 +0000 (09:41 +0100)] 
ukify: fix typos

10 months agotest-network: add test cases for global [DHCPv4] ClientIdentifier= setting 35783/head
Yu Watanabe [Mon, 30 Dec 2024 02:18:59 +0000 (11:18 +0900)] 
test-network: add test cases for global [DHCPv4] ClientIdentifier= setting

10 months agonetwork: introduce system wide default setting for DHCPv4 client ID
Yu Watanabe [Mon, 30 Dec 2024 01:16:37 +0000 (10:16 +0900)] 
network: introduce system wide default setting for DHCPv4 client ID

Typically, the same client identifier setting is used for all
interfaces. Hence, better to provide the system-wide setting to specify
the client identifier.

10 months agoman/networkd.conf: update section explanation
Yu Watanabe [Mon, 30 Dec 2024 01:14:07 +0000 (10:14 +0900)] 
man/networkd.conf: update section explanation

These section contains not only DUID related settings.

Follow-up for 418f2dc75564330d4ff6c86193f4a3c8ffbb1f1b.

10 months agoman: change "secureboot-private-key.pem" filename for consistency
cvlc12 [Sat, 28 Dec 2024 18:19:08 +0000 (19:19 +0100)] 
man: change "secureboot-private-key.pem" filename for consistency

10 months agocore: do not disconnect from bus when failed to install signal match 35779/head
Yu Watanabe [Sun, 29 Dec 2024 06:50:43 +0000 (15:50 +0900)] 
core: do not disconnect from bus when failed to install signal match

If bus_add_match_full() is called without install callback and we failed
to install the signal match e.g. by timeout, then add_match_callback()
will disconnect from the bus.
Let's use a custom install handler and handle failures gracefully.

This does not *solve* the root cause of issue #30573, but should improve
the situation when the issue is triggered.

10 months agocore,sd-bus: drop empty lines between function call and error check
Yu Watanabe [Sun, 29 Dec 2024 06:10:53 +0000 (15:10 +0900)] 
core,sd-bus: drop empty lines between function call and error check

10 months agoman: adjust description of PrivateUsers= so it is in line with reality
Michal Sekletar [Fri, 15 Nov 2024 22:08:37 +0000 (23:08 +0100)] 
man: adjust description of PrivateUsers= so it is in line with reality

When the option is not available unit will not even start so there is
no security risk.

Fixes #34983

10 months agotree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v) 35760/head
Mike Yuan [Thu, 26 Dec 2024 19:30:12 +0000 (20:30 +0100)] 
tree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v)

10 months agoshared/condition: use BIT_SET where appropriate
Mike Yuan [Thu, 26 Dec 2024 18:53:23 +0000 (19:53 +0100)] 
shared/condition: use BIT_SET where appropriate