]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
16 months agoefi: share setting of generic efivars between sd-stub/sd-boot 33493/head
Lennart Poettering [Wed, 26 Jun 2024 13:18:57 +0000 (15:18 +0200)] 
efi: share setting of generic efivars between sd-stub/sd-boot

We have very similar code for setting generic efi vars in sd-stub and
sd-boot. Let's share it.

This changes behaviour in a minor way: if you chainload multiple
versions of an sd-boot you'll see the efi vars of the first one now in
the OS, not of the last one.

But this should not matter, invocation like that should generally not
happen.

16 months agomeasure: normalize error paths
Lennart Poettering [Wed, 26 Jun 2024 13:05:33 +0000 (15:05 +0200)] 
measure: normalize error paths

Always put the success path at least indentation, and indent the error
paths.

16 months agostub: rework linux handover to take "struct iovec"
Lennart Poettering [Wed, 26 Jun 2024 11:16:18 +0000 (13:16 +0200)] 
stub: rework linux handover to take "struct iovec"

16 months agostub: turn lookup_name() into shorter and more generic function that turns sectin...
Lennart Poettering [Wed, 26 Jun 2024 10:35:46 +0000 (12:35 +0200)] 
stub: turn lookup_name() into shorter and more generic function that turns sectin into char* string

16 months agostub: add helper that turns PE section into char16_t* string
Lennart Poettering [Wed, 26 Jun 2024 10:35:12 +0000 (12:35 +0200)] 
stub: add helper that turns PE section into char16_t* string

16 months agostub: reorder variables
Lennart Poettering [Wed, 26 Jun 2024 10:23:57 +0000 (12:23 +0200)] 
stub: reorder variables

16 months agostub: reorder things a bit, so that initrds are generated/looked up together
Lennart Poettering [Wed, 26 Jun 2024 10:22:33 +0000 (12:22 +0200)] 
stub: reorder things a bit, so that initrds are generated/looked up together

16 months agostub: uniformly process "measured" flags
Lennart Poettering [Wed, 26 Jun 2024 10:13:45 +0000 (12:13 +0200)] 
stub: uniformly process "measured" flags

Always pass the pointer through so that the functions combine the flags
directly, instead of doing that in the caller.

16 months agostub: split out function that determines main cmdline
Lennart Poettering [Wed, 26 Jun 2024 10:11:46 +0000 (12:11 +0200)] 
stub: split out function that determines main cmdline

16 months agostub: normalize error handling when looking for PE sections
Lennart Poettering [Wed, 26 Jun 2024 10:05:04 +0000 (12:05 +0200)] 
stub: normalize error handling when looking for PE sections

16 months agostub: slightly reorder things
Lennart Poettering [Wed, 26 Jun 2024 10:02:06 +0000 (12:02 +0200)] 
stub: slightly reorder things

Let's do the section measurement first, before we use any data of it.

Let's bring up the boot splash next, so that it covers anything else we
might do.

16 months agostub: split out code that displays boot splash
Lennart Poettering [Wed, 26 Jun 2024 10:00:46 +0000 (12:00 +0200)] 
stub: split out code that displays boot splash

16 months agostub: split out code that loads all addons from disk into function of its own
Lennart Poettering [Wed, 26 Jun 2024 09:58:17 +0000 (11:58 +0200)] 
stub: split out code that loads all addons from disk into function of its own

16 months agostub: merge separate lists for addon cmdlines/devicetrees into one
Lennart Poettering [Wed, 26 Jun 2024 09:36:03 +0000 (11:36 +0200)] 
stub: merge separate lists for addon cmdlines/devicetrees into one

Instead of keeping the lists for the global and per-UKI addons separate
throughout, just merge them. We apply them in the same order after all.

16 months agostub: don't make up errors
Lennart Poettering [Wed, 26 Jun 2024 09:21:26 +0000 (11:21 +0200)] 
stub: don't make up errors

16 months agostub: add DevicetreeAddon structure
Lennart Poettering [Wed, 26 Jun 2024 09:18:51 +0000 (11:18 +0200)] 
stub: add DevicetreeAddon structure

Instead of keeping three parallel arrays of dt base, dt size and dt
filename, just introduce a proper structure and use an array of that,
greatly simplifying DT handling.

16 months agostub: split out call that loads embedded device tree
Lennart Poettering [Wed, 26 Jun 2024 08:48:49 +0000 (10:48 +0200)] 
stub: split out call that loads embedded device tree

16 months agostub: split out code that sets EFI vars indicating measured PCRs
Lennart Poettering [Wed, 26 Jun 2024 08:39:22 +0000 (10:39 +0200)] 
stub: split out code that sets EFI vars indicating measured PCRs

16 months agostub: move initialization of kernel iovec to the end, where it's used
Lennart Poettering [Wed, 26 Jun 2024 08:37:29 +0000 (10:37 +0200)] 
stub: move initialization of kernel iovec to the end, where it's used

16 months agostub: split out code that finds embedded initrds
Lennart Poettering [Wed, 26 Jun 2024 08:34:09 +0000 (10:34 +0200)] 
stub: split out code that finds embedded initrds

16 months agostub: split out code that generates embedded initrds
Lennart Poettering [Wed, 26 Jun 2024 08:31:23 +0000 (10:31 +0200)] 
stub: split out code that generates embedded initrds

16 months agostub: split out calls that generate sidecar initrds
Lennart Poettering [Wed, 26 Jun 2024 08:25:25 +0000 (10:25 +0200)] 
stub: split out calls that generate sidecar initrds

16 months agostub: rework initrd handling around "struct iovec"
Lennart Poettering [Wed, 26 Jun 2024 08:20:26 +0000 (10:20 +0200)] 
stub: rework initrd handling around "struct iovec"

Let's maintain an array of "struct iovec" for the initrds. It becomes a
ton easier and shorter to process/combine the various initrds then.

16 months agostub: split out code that finds the uname among PE sections
Lennart Poettering [Wed, 26 Jun 2024 07:27:28 +0000 (09:27 +0200)] 
stub: split out code that finds the uname among PE sections

16 months agostub: split out code that appends smbios command line
Lennart Poettering [Wed, 26 Jun 2024 07:20:54 +0000 (09:20 +0200)] 
stub: split out code that appends smbios command line

16 months agostub: split out code that measures our own PE sections
Lennart Poettering [Tue, 25 Jun 2024 20:49:24 +0000 (22:49 +0200)] 
stub: split out code that measures our own PE sections

16 months agostub: split out random seed part out of run()
Lennart Poettering [Tue, 25 Jun 2024 20:45:57 +0000 (22:45 +0200)] 
stub: split out random seed part out of run()

16 months agoefi: introduce PeSectionVector structure, and use it for referencing PE sections
Lennart Poettering [Mon, 24 Jun 2024 15:52:10 +0000 (17:52 +0200)] 
efi: introduce PeSectionVector structure, and use it for referencing PE sections

16 months agope: use more correct section name comparison function
Lennart Poettering [Mon, 24 Jun 2024 15:50:34 +0000 (17:50 +0200)] 
pe: use more correct section name comparison function

we should only compare up to 8 chars

16 months agope: tighten validity checks of DOS and PE headers
Lennart Poettering [Mon, 24 Jun 2024 15:40:32 +0000 (17:40 +0200)] 
pe: tighten validity checks of DOS and PE headers

Let's make sure we validate that the DOS/PE header offsets are actually
reasonable, and do not cause overflows when added to the base addresses.

(This shouldn're really be a problem URL, since the DOS header offset is
16bit only, but let's be extra careful with this)

16 months agope: be more careful when loading PE section list into memory
Lennart Poettering [Mon, 24 Jun 2024 13:25:07 +0000 (15:25 +0200)] 
pe: be more careful when loading PE section list into memory

Let's put a limit on how much memory we'll allocate for the section. And
let's add a safety overflow check.

(This is more a theoretic than a real problem, since on all PE archs
NumberOfSections is 16bit only.)

16 months agoutil: make file_read() 64bit offset safe
Lennart Poettering [Wed, 26 Jun 2024 13:43:28 +0000 (15:43 +0200)] 
util: make file_read() 64bit offset safe

File offsets in UEFI are 64bit on all archs, hence let's use that typo
too, and not create artificial confusion around types.

16 months agoiovec-util: make "struct iovec" and some helpers also available in EFI mode
Lennart Poettering [Wed, 26 Jun 2024 08:17:26 +0000 (10:17 +0200)] 
iovec-util: make "struct iovec" and some helpers also available in EFI mode

The construct is a POSIX invention, but it's just so useful, let's also
define it in EFI mode, so that we can use similar constructs in EFI mode
and userspace.

16 months agomacro: move PTR_TO_SIZE() macros to fundamental
Lennart Poettering [Mon, 24 Jun 2024 14:08:50 +0000 (16:08 +0200)] 
macro: move PTR_TO_SIZE() macros to fundamental

16 months agomacro: also move FOREACH_ARRAY()/FOREACH_ELEMENT() to fundamental
Lennart Poettering [Mon, 24 Jun 2024 13:54:47 +0000 (15:54 +0200)] 
macro: also move FOREACH_ARRAY()/FOREACH_ELEMENT() to fundamental

This is also very useful in EFI code.

16 months agomacro: move sizeof_field() macro into src/fundamental/
Lennart Poettering [Mon, 24 Jun 2024 13:52:00 +0000 (15:52 +0200)] 
macro: move sizeof_field() macro into src/fundamental/

Let's make this macro available for our EFI code too.

16 months agodocs: Add section to HACKING.md on distribution packages
Daan De Meyer [Wed, 26 Jun 2024 13:35:30 +0000 (15:35 +0200)] 
docs: Add section to HACKING.md on distribution packages

16 months agoimport-generator: open up NotifyAccess for varlinkctl
Mike Yuan [Tue, 25 Jun 2024 12:50:11 +0000 (14:50 +0200)] 
import-generator: open up NotifyAccess for varlinkctl

So that it can report errors through VARLINKERROR=.

16 months agomkosi: update fedora commit reference
Daan De Meyer [Tue, 25 Jun 2024 14:34:28 +0000 (16:34 +0200)] 
mkosi: update fedora commit reference

8153d9b0f9 Revert "Remove tmpfiles snippet for /home and /srv"
a76669ee22 Remove tmpfiles snippet for /home and /srv
b3e1d52cb4 Soft-disable tmpfiles --purge until a good use case comes up
4a29ab3f3b Version 256.1
ebf352d292 disable auto-features when bootstrapping
1ae0516ae7 Version 256
b32641170e Restore patch to drop varlink method call
421f0041b3 Version 256~rc4
65d9b49791 Fix typo
c56891fb68 Drop sysusers.d/basic.conf
69472997b9 Renumber sources and make order more consistent

16 months agomkosi: update debian commit reference
Daan De Meyer [Tue, 25 Jun 2024 14:18:02 +0000 (16:18 +0200)] 
mkosi: update debian commit reference

3b4368d4b8 d/not-installed: fix shutdown.standalone path
2de05155e8 Update changelog for 256.1-2 release
cd98bcef06 autopkgtest: add dependency on libcryptsetup-dev in unit-tests suite
e220ce22f1 Bump breaks/replaces to conflicts for DEP17

16 months agoMerge pull request #33451 from yuwata/core-exec-use-write
Luca Boccassi [Tue, 25 Jun 2024 12:44:21 +0000 (14:44 +0200)] 
Merge pull request #33451 from yuwata/core-exec-use-write

core: use write() instead of send()

16 months agoMerge pull request #33450 from yuwata/network-ndisc-do-not-override-static-routes
Luca Boccassi [Tue, 25 Jun 2024 12:40:06 +0000 (14:40 +0200)] 
Merge pull request #33450 from yuwata/network-ndisc-do-not-override-static-routes

network/NDisc: do not override static routes

16 months agoMerge pull request #33003 from poettering/repart-progress
Lennart Poettering [Tue, 25 Jun 2024 12:08:04 +0000 (14:08 +0200)] 
Merge pull request #33003 from poettering/repart-progress

repart: draw progress bar during CopyBlocks= operation and other tweaks

16 months agoMerge pull request #33078 from poettering/import-generator
Lennart Poettering [Tue, 25 Jun 2024 12:07:46 +0000 (14:07 +0200)] 
Merge pull request #33078 from poettering/import-generator

importd: add import generator

16 months agonetwork/ndisc: fix spurious log messages
Yu Watanabe [Tue, 25 Jun 2024 07:33:15 +0000 (16:33 +0900)] 
network/ndisc: fix spurious log messages

- Fix swapped arguments:

Before:
veth99: Prefix 'in deny list' is 2002:da8:1::/64, ignoring
After:
veth99: Prefix '2002:da8:1::/64' is in deny list, ignoring.

- Drop unnecessary DEBUG_LOGGING.

16 months agomkosi: add support for TEST_SAVE_JOURNAL to integration test wrapper
Luca Boccassi [Mon, 24 Jun 2024 14:20:11 +0000 (15:20 +0100)] 
mkosi: add support for TEST_SAVE_JOURNAL to integration test wrapper

Same variable and values as supported by the shell suite

16 months agoci: add small test case for /dev/urandom as source for CopyBlocks= 33003/head
Lennart Poettering [Tue, 25 Jun 2024 08:24:47 +0000 (10:24 +0200)] 
ci: add small test case for /dev/urandom as source for CopyBlocks=

16 months agorepart: show progress bar when initializing partition via CopyBlocks=
Lennart Poettering [Fri, 24 May 2024 12:00:21 +0000 (14:00 +0200)] 
repart: show progress bar when initializing partition via CopyBlocks=

This might take a while, hence make it pretty.

16 months agorepart: allow reading from char device for CopyBlocks=
Lennart Poettering [Fri, 24 May 2024 11:57:56 +0000 (13:57 +0200)] 
repart: allow reading from char device for CopyBlocks=

Sometimes it is useful to allow initializing a partition with randomized
data, hence allow reading from a char device as source for CopyBlocks=

16 months agorepart: make prefix argument to clear_progress_bar() optional
Lennart Poettering [Fri, 24 May 2024 11:56:47 +0000 (13:56 +0200)] 
repart: make prefix argument to clear_progress_bar() optional

In this case, let's try to override the whole line, not just the first
few chars.

16 months agoupdate TODO 33078/head
Lennart Poettering [Sat, 11 May 2024 15:02:26 +0000 (17:02 +0200)] 
update TODO

16 months agoci: add test for importd varlink interface + import generator
Lennart Poettering [Mon, 27 May 2024 17:05:48 +0000 (19:05 +0200)] 
ci: add test for importd varlink interface + import generator

16 months agoimport: add generator that synthesizes download jobs from kernel cmdline
Lennart Poettering [Tue, 25 Jun 2024 07:55:16 +0000 (09:55 +0200)] 
import: add generator that synthesizes download jobs from kernel cmdline

16 months agoimportd: allow activation in early boot, and make it socket activatable
Lennart Poettering [Wed, 8 May 2024 09:11:43 +0000 (11:11 +0200)] 
importd: allow activation in early boot, and make it socket activatable

Previously, importd was only accessible via D-Bus, which required it to
be a late boot service. Now that we have Varlink we can rearrange things
to become early-boot activated, just after the image directories are
mounted.

This will later allow us to have generator that auto-downloads images on
boot.

16 months agoimportd: add simple varlink API
Lennart Poettering [Wed, 8 May 2024 08:42:48 +0000 (10:42 +0200)] 
importd: add simple varlink API

For now, let's just support Pull() and ListTransfers(), but this is just
a start.

16 months agoimport: add generic enum for choosing between tar + raw downloads
Lennart Poettering [Sat, 11 May 2024 12:00:25 +0000 (14:00 +0200)] 
import: add generic enum for choosing between tar + raw downloads

16 months agovarlink: add varlink_many_*() helpers that send messages to a set of connections...
Lennart Poettering [Wed, 29 May 2024 07:33:27 +0000 (09:33 +0200)] 
varlink: add varlink_many_*() helpers that send messages to a set of connections at once

If we have a Varlink interface that allows man subscribers to the same
source of events we typically want to notify all of them at once with
the same message.

Let's add some helpers for this purpose: varlink_many_*() can be used to
send messages, similar to the corresponding varlink_*() calls, but they
take a Set of Varlink objects and we issue the operation on every
connection once.

This ports over one existing case where this is beneficial, but the main
user for this is supposed to be importd later.

16 months agoMerge pull request #33461 from poettering/boot-measured-flag-rework
Lennart Poettering [Tue, 25 Jun 2024 07:48:38 +0000 (09:48 +0200)] 
Merge pull request #33461 from poettering/boot-measured-flag-rework

stub: rework how we combine the "measured" flags in sd-stub

16 months agoMerge pull request #33454 from YHNdnzj/user-service-working-dir-relax
Luca Boccassi [Mon, 24 Jun 2024 22:48:37 +0000 (00:48 +0200)] 
Merge pull request #33454 from YHNdnzj/user-service-working-dir-relax

core: verify WorkingDirectory= is outside of API VFS only under mount namespacing

16 months agostub: fix reporting of dtb measurement 33461/head
Lennart Poettering [Mon, 24 Jun 2024 10:52:57 +0000 (12:52 +0200)] 
stub: fix reporting of dtb measurement

Let's properly return the measurement flag tristate, rather than a
boolean. Otherwise we'll mistake "nothing to measure" as "not measured",
which are two different things, and means we'll miscombine the flag
later, claiming to userspace that we measured no dtb data even if there
was.

16 months agostub: unify how we combine 'measured' flags
Lennart Poettering [Mon, 24 Jun 2024 10:44:32 +0000 (12:44 +0200)] 
stub: unify how we combine 'measured' flags

We have the same non-trivial ternary op expression at various places,
let's unify it in one call, to make this easier to read and remove
duplication.

16 months agouefi: drop redundant local variable
Lennart Poettering [Mon, 24 Jun 2024 15:38:29 +0000 (17:38 +0200)] 
uefi: drop redundant local variable

16 months agouefi: drop ill-placed empty line
Lennart Poettering [Mon, 24 Jun 2024 10:52:38 +0000 (12:52 +0200)] 
uefi: drop ill-placed empty line

Let's not place empty lines between function calls and their immediate
error handling.

16 months agologin: Add a new SecureAttentionKey dbus signal when Ctrl+Alt+Shift+Esc is pressed
nerdopolis [Tue, 12 Mar 2024 02:09:07 +0000 (22:09 -0400)] 
login: Add a new SecureAttentionKey dbus signal when Ctrl+Alt+Shift+Esc is pressed

16 months agotest-execute: add a test case for issue #33299 33451/head
Yu Watanabe [Sun, 23 Jun 2024 06:52:53 +0000 (15:52 +0900)] 
test-execute: add a test case for issue #33299

16 months agocore: do not filter out write() if required in the very late stage
Yu Watanabe [Mon, 24 Jun 2024 20:10:04 +0000 (05:10 +0900)] 
core: do not filter out write() if required in the very late stage

Before 12001b1bf067339db089d52e08fd0b4c6a9945df, write() is required for
if Type=exec. However, with the previous commit, now write() is also used
for sending handoff timestamp. Let's allow write() if necessary.

Fixes a regression caused by 12001b1bf067339db089d52e08fd0b4c6a9945df.
Fixes #33299.

16 months agocore: use write() to send handoff timestamp
Yu Watanabe [Sun, 23 Jun 2024 06:15:30 +0000 (15:15 +0900)] 
core: use write() to send handoff timestamp

Before 12001b1bf067339db089d52e08fd0b4c6a9945df, the timestamp is sent
with write(), but the commit made the timestamp sent by send(), and
causes regressin #33299.

Note the invocation will still fail if write() is filtered by seccomp.
But, that is an old issue since Type=exec is introduced
(5686391b006ee82d8a4559067ad9818e3e631247).

Partially fixes a regression caused by 12001b1bf067339db089d52e08fd0b4c6a9945df.
Partially fixes #33299.

16 months agoseccomp-util: split out seccomp_filter_set_add_by_name()
Yu Watanabe [Mon, 24 Jun 2024 20:08:17 +0000 (05:08 +0900)] 
seccomp-util: split out seccomp_filter_set_add_by_name()

16 months agoMerge pull request #33042 from poettering/machined-unpriv
Luca Boccassi [Mon, 24 Jun 2024 18:45:37 +0000 (20:45 +0200)] 
Merge pull request #33042 from poettering/machined-unpriv

machined: unprivileged machine registration

16 months agoMerge pull request #33000 from poettering/ssh-proxy-machine
Luca Boccassi [Mon, 24 Jun 2024 18:35:07 +0000 (20:35 +0200)] 
Merge pull request #33000 from poettering/ssh-proxy-machine

systemd-ssh-proxy: look for VSOCK CIDs in machined

16 months agoMerge pull request #33466 from YHNdnzj/open-file-graceful-log
Yu Watanabe [Mon, 24 Jun 2024 18:26:04 +0000 (03:26 +0900)] 
Merge pull request #33466 from YHNdnzj/open-file-graceful-log

core/exec-invoke: clean up OpenFile= logging

16 months agoFix typo in CAP_BPF description (#33464)
Eugeny Shcheglov [Mon, 24 Jun 2024 18:23:50 +0000 (21:23 +0300)] 
Fix typo in CAP_BPF description (#33464)

description_good and description_bad are mixed up. Disabling CAP_BPF results in the inability to load BPF, not the other way around.

16 months agohwdb: fix keyboard of RedmiBook Pro 15 2022 (#33465)
oldherl [Mon, 24 Jun 2024 18:22:37 +0000 (04:22 +1000)] 
hwdb: fix keyboard of RedmiBook Pro 15 2022 (#33465)

Fix two problems of the keyboard of RedmiBook Pro 15 2022.
- Enter key in the main area was mapped to KP_Enter.
- When Fn is locked (to use F1-F12 without pressing Fn),
  Right Ctrl was mapped to Menu. Keeping it as Right Ctrl is more useful.

16 months agotest-network: check if static routes not overridden by NDisc routes 33450/head
Yu Watanabe [Sun, 23 Jun 2024 05:37:01 +0000 (14:37 +0900)] 
test-network: check if static routes not overridden by NDisc routes

16 months agonetwork/ndisc: do not remove static routes when received RA with zero lifetime
Yu Watanabe [Mon, 24 Jun 2024 07:20:27 +0000 (16:20 +0900)] 
network/ndisc: do not remove static routes when received RA with zero lifetime

Similar to the previous commit, but for preventing from removing static
routes on receiving RA with zero lifetime.

Fixes a regresson caused by 479d3e1994a2e4ff7070dc2a0cb1615af7120b0c.
Fixes #33346.

16 months agonetwork/ndisc: do not override conflicting static routes
Yu Watanabe [Sun, 23 Jun 2024 05:36:08 +0000 (14:36 +0900)] 
network/ndisc: do not override conflicting static routes

We have already ignored conflicting address configurations requested by
NDisc protocol. See ndisc_request_address().
Let's follow the same rule for routes. That is, if there are conflicting
static routes configured or requested, do not override them by NDisc.

Also, swap the order of checking existing route and existing request.

Fixes a regression caused by 972f1d17ab461a51142a142609dd3ec50bae8440.
Prompted by #33346.

16 months agocore/exec-invoke: clean up OpenFile= logging 33466/head
Mike Yuan [Mon, 24 Jun 2024 16:30:00 +0000 (18:30 +0200)] 
core/exec-invoke: clean up OpenFile= logging

Make collect_open_file_fds() the only logging function,
and downgrade various usual errors to debug level
if OPENFILE_GRACEFUL is set.

Fixes #33458

16 months agocore/exec-invoke: reopen OpenFile= fds with O_NOCTTY
Mike Yuan [Mon, 24 Jun 2024 16:26:15 +0000 (18:26 +0200)] 
core/exec-invoke: reopen OpenFile= fds with O_NOCTTY

16 months agouefi: emphasize a bit that EV_IPL event logs is the past, EV_EVENT_TAG the future
Lennart Poettering [Mon, 24 Jun 2024 10:18:03 +0000 (12:18 +0200)] 
uefi: emphasize a bit that EV_IPL event logs is the past, EV_EVENT_TAG the future

16 months agocore: verify WorkingDirectory= is outside of API VFS only under mount namespacing 33454/head
Mike Yuan [Sun, 23 Jun 2024 16:12:33 +0000 (18:12 +0200)] 
core: verify WorkingDirectory= is outside of API VFS only under mount namespacing

The purpose of the check is to prevent leaking API VFS fds
from host into a mount namespace/container. When mountns
is not used at all, the check is pointless and causes
inconvenience. E.g. file managers might need to be spawned
under those directories, and they surely won't run in mountns.

Suggested in https://github.com/systemd/systemd/pull/33454#issuecomment-2186351467
Fixes #33361

16 months agocore/load-fragment: use ASSERT_PTR where appropriate
Mike Yuan [Sun, 23 Jun 2024 16:29:29 +0000 (18:29 +0200)] 
core/load-fragment: use ASSERT_PTR where appropriate

16 months agoMerge pull request #33401 from yuwata/journal-revert-source-boottime-timestamp
Mike Yuan [Mon, 24 Jun 2024 13:34:16 +0000 (15:34 +0200)] 
Merge pull request #33401 from yuwata/journal-revert-source-boottime-timestamp

journal: partially revert recent changes

16 months agoMerge pull request #33456 from yuwata/terminal-util
Mike Yuan [Mon, 24 Jun 2024 13:29:36 +0000 (15:29 +0200)] 
Merge pull request #33456 from yuwata/terminal-util

terminal-util: use colon as separator for specifying color

16 months agovmspawn: define QEMU_MACHINE_TYPE for loongarch64
Robin Lee [Mon, 24 Jun 2024 05:48:32 +0000 (13:48 +0800)] 
vmspawn: define QEMU_MACHINE_TYPE for loongarch64

Use ["virt"](https://www.qemu.org/docs/master/system/loongarch/virt.html) as a commonly used generic platform on loongarch64.

16 months agoterminal-util: several cleanups for ColorMode 33456/head
Yu Watanabe [Sun, 23 Jun 2024 19:18:04 +0000 (04:18 +0900)] 
terminal-util: several cleanups for ColorMode

- introduce or rename usual enum values _MAX and _INVALID,
- introduce and use string table lookup functions,
- split out implementation of get_color_mode() to _impl(),
- add tests for get_color_mode().

16 months agoterminal-util: merge COLOR_ON with COLOR_24BIT
Yu Watanabe [Sun, 23 Jun 2024 19:12:45 +0000 (04:12 +0900)] 
terminal-util: merge COLOR_ON with COLOR_24BIT

Currently, we assume that there is no restriction on coloring when
COLOR_24BIT. Let's merge the two values.

Follow-up for a5efbf468c96190c9562bc8121eda32310dfd112.

16 months agoterminal-util: use colon as separator for specifying color
Yu Watanabe [Mon, 24 Jun 2024 08:55:17 +0000 (17:55 +0900)] 
terminal-util: use colon as separator for specifying color

Then, terminal will safely ignore unsupported features, like colored
underline.

Fixes a regression caused by 891abc9cf1d3d7afd7b740b4077551dcfb5f8e16.
Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074073.
Fixes #33449.

16 months agoMerge pull request #33452 from bluca/repart_pkg
Luca Boccassi [Sun, 23 Jun 2024 12:19:30 +0000 (13:19 +0100)] 
Merge pull request #33452 from bluca/repart_pkg

mkosi: install new split-out systemd packages

16 months agomkosi: bump Debian Salsa commit to latest 33452/head
Luca Boccassi [Sun, 23 Jun 2024 09:20:27 +0000 (10:20 +0100)] 
mkosi: bump Debian Salsa commit to latest

16 months agomkosi: install new split-out systemd packages
Luca Boccassi [Sun, 23 Jun 2024 09:10:26 +0000 (10:10 +0100)] 
mkosi: install new split-out systemd packages

repart and cryptsetup tools were moved out of the main package
to reduce dependencies.

16 months agobus-unit-util: add PrivateTmpEx to bus_append_execute_property()
Mike Yuan [Sat, 22 Jun 2024 10:28:08 +0000 (12:28 +0200)] 
bus-unit-util: add PrivateTmpEx to bus_append_execute_property()

Follow-up for 9d50d053f327e5471a514bc36487bfc3358c15d8

16 months agohwdb: Fix Logitech G915 TKL (Bluetooth) appearing as a mouse
Stuart Hayhurst [Sat, 22 Jun 2024 19:25:21 +0000 (20:25 +0100)] 
hwdb: Fix Logitech G915 TKL (Bluetooth) appearing as a mouse

16 months agoman: fix double is typo in systemd-tmpfiles
Diego Viola [Sat, 22 Jun 2024 02:46:32 +0000 (23:46 -0300)] 
man: fix double is typo in systemd-tmpfiles

Signed-off-by: Diego Viola <diego.viola@gmail.com>
16 months agotree-wide: fix type of read() return variable at a couple of places
Lennart Poettering [Fri, 21 Jun 2024 07:41:43 +0000 (09:41 +0200)] 
tree-wide: fix type of read() return variable at a couple of places

read() returns ssize_t (i.e. 64bit typically). We assigned it to int
variables in some cases (i.e. 32bit typically). Let's not be so sloppy,
and not accidentally drop 32bit on the floor.

(of course, this is not an issue IRL since we'll not have allocations
above 2^32 ever we could read into, but still, let's clean this up)

16 months agovarlink: yet another fix around handling of IDL comments
Lennart Poettering [Fri, 21 Jun 2024 15:05:26 +0000 (17:05 +0200)] 
varlink: yet another fix around handling of IDL comments

Skip over them when validating a message against the IDL.

Add test case that tests this.

16 months agoMerge pull request #33439 from YHNdnzj/private-tmp-followup
Yu Watanabe [Sat, 22 Jun 2024 07:34:55 +0000 (16:34 +0900)] 
Merge pull request #33439 from YHNdnzj/private-tmp-followup

core: several follow-ups for recent changes to PrivateTmp

16 months agoMerge pull request #33408 from poettering/install-change-fix
Yu Watanabe [Sat, 22 Jun 2024 07:24:47 +0000 (16:24 +0900)] 
Merge pull request #33408 from poettering/install-change-fix

install: some follow-up fixes to #33254

16 months agoupdate TODO 33042/head
Lennart Poettering [Mon, 27 May 2024 14:43:13 +0000 (16:43 +0200)] 
update TODO

16 months agounits: register vmspawn VMs started via systemd-vmspawn@.service by default with...
Lennart Poettering [Mon, 27 May 2024 11:32:02 +0000 (13:32 +0200)] 
units: register vmspawn VMs started via systemd-vmspawn@.service by default with machined

16 months agovmspawn: by default, let machined register a cgroup for VMs
Lennart Poettering [Mon, 27 May 2024 11:30:31 +0000 (13:30 +0200)] 
vmspawn: by default, let machined register a cgroup for VMs

This mimics what we do in nspawn: if registration is enabled we'll let
machined allocate a scope unit for us. When --keep-unit is used we'll
register without creating a new scope.

This brings behaviour more inline with what nspawn does, exposing the
same sets of options.