Commit Graph
78475 Commits
Author SHA1 Message Date
Yu Watanabe 4ea611b8a4 varlink: invert uid check to reduce call of getuid() 2025-01-04 20:57:06 +09:00
Yu Watanabe 93081be64b sd-json: introduce json_dispatch_log_level()
Then, use it in io.systemd.service.SetLogLevel method.
2025-01-04 20:57:06 +09:00
Daan De Meyer 64c4961e80 sd-json: replace ASSERT_PTR() with assert_return() (#35849) 2025-01-04 11:06:36 +01:00
Yu Watanabe c10fbe2cf8 libsystemd: drop duplicated symbol
Follow-up for 107986a33e.
2025-01-04 09:28:14 +01:00
Yu Watanabe 37a393b99e sd-json,sd-varlink: trivial coding style fixlets 2025-01-04 13:20:50 +09:00
Yu Watanabe c882735596 sd-json: replace ASSERT_PTR() with assert_return() in public functions 2025-01-04 13:10:38 +09:00
Yu Watanabe aac9d150ed tpm2: tweaks to PCR mask parsing (#35835) 2025-01-04 12:42:54 +09:00
Lennart Poettering b1fb2d971c nspawn: move uid shift/chown() code into shared/ 2025-01-04 12:23:31 +09:00
Tim Crawford bd07786b90 hwdb: Add newer System76 Pangolins
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2025-01-04 12:05:22 +09:00
Yu Watanabe e10a748400 libsystemd: drop duplicated symbol
Follow-up for 107986a33e.
2025-01-04 12:01:24 +09:00
Daan De Meyer 276890d629 ptyfwd: Add --read-only option 2025-01-03 21:14:47 +01:00
Tim Crawford 83154c8995 hwdb: Add micmute for System76
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2025-01-03 21:06:55 +01:00
Lennart Poettering 57e55f93bb terminal-util: modernize vtnr_from_tty() a bit 2025-01-03 21:05:58 +01:00
Daan De Meyer 496639d02c mkosi: Handle directories in debian/not-installed correctly (#35832)
If a directory is specified without a glob pattern, we have to exclude
all files in that directory, so add a recursive glob to every directory
and enable the bash globstar feature when globbing to '**/*' matches all
files and directories beneath the given directory.
2025-01-03 20:27:05 +01:00
Daan De Meyer d0d647e084 Introduce systemd-pty-forward (#35761)
This allows running a command with tinted terminal background.
2025-01-03 19:34:42 +01:00
Daan De Meyer e965430f57 mkosi: Warn on unpackaged files in the debian package build 2025-01-03 19:33:32 +01:00
Daan De Meyer bcb10ac473 TEST-74-AUX-UTILS: Use tee
Something is failing but we can't see what from the logs so let's use
tee so we can.
2025-01-03 19:32:48 +01:00
Daan De Meyer 8224a48da9 Introduce systemd-pty-forward
This allows running a command with tinted terminal background.
2025-01-03 17:07:33 +01:00
Daan De Meyer 37ce3fd2b7 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.
2025-01-03 16:45:50 +01:00
Lennart Poettering 9f97f2899a dissect-image: rename ReplyParameters → MountImageReplyParameters 2025-01-03 16:44:08 +01:00
Lennart Poettering bacc04bedc dissect: minor simplifications 2025-01-03 16:43:43 +01:00
Lennart Poettering 3866e9ce9d 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.
2025-01-03 16:38:56 +01:00
Daan De Meyer b0d0b08c62 dissect: minor additions to the systemd-dissect tool (#35829) 2025-01-03 16:05:30 +01:00
Daan De Meyer b6507d81ce nspawn: trivial tweaklets (#35831) 2025-01-03 15:54:43 +01:00
Lennart Poettering bde379461d 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
2025-01-03 14:55:50 +01:00
Daan De Meyer 568988bec4 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.
2025-01-03 13:54:09 +01:00
Daan De Meyer b0e9ac018d machine: introduce io.systemd.Machine.BindMount method (#35066)
This PR introduces io.systemd.Machine.BindMount method which is
alternative to DBus's BindMountMachine.
2025-01-03 13:19:48 +01:00
Lennart Poettering 8beb8c3e35 fs-util: teach xopenat_full() to pick automatically if given as MODE_INVALID 2025-01-03 12:58:43 +01:00
Lennart Poettering 4b9203ac65 nspawn: rework userns_mkdir() around chase() 2025-01-03 12:56:52 +01:00
Daan De Meyer d304b95beb mkosi: Handle directories in debian/not-installed correctly
If a directory is specified without a glob pattern, we have to exclude
all files in that directory, so add a recursive glob to every directory
and enable the bash globstar feature when globbing to '**/*' matches all
files and directories beneath the given directory.
2025-01-03 12:53:31 +01:00
Lennart Poettering f8bbf4061b udev: split udev_manager_init() and udev_manager_main() into small pieces (#35735) 2025-01-03 12:27:14 +01:00
Noel Georgi 0ad1fd7a80 fix: sd-measure dtbauto and hwdids arg parsing
Commit 630cf4e7da introduced `.dtbauto`,
but since it's before `.hwdids` commit 4c0b7f4250
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>
2025-01-03 12:23:24 +01:00
Lennart Poettering f5ddba50f5 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
2025-01-03 11:39:55 +01:00
Lennart Poettering 74cbefe1cd hwdb: f23 → touchpad_off 2025-01-03 11:36:43 +01:00
Lennart Poettering 7b649a12ba hwdb: f22 → touchpad_on 2025-01-03 11:36:42 +01:00
Lennart Poettering 27f33c743f hwdb: f21 → touchpad_toggle
Similar to the previous commit.
2025-01-03 11:36:42 +01:00
Lennart Poettering d94efc0906 hwdb: f20 → micmute
See: #34323
2025-01-03 11:36:42 +01:00
Daan De Meyer 470c213bd9 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.
2025-01-03 11:16:16 +01:00
Daan De Meyer 33c1736082 vmspawn: Use vmspawn in drive ID name instead of mkosi 2025-01-03 11:14:09 +01:00
Lennart Poettering 55d47a8988 update TODO 2025-01-03 10:48:07 +01:00
Lennart Poettering f16e08f18e update TODO 2025-01-03 10:44:38 +01:00
Lennart Poettering 3085782020 tpm2-util: refuse hash algorithm/value specification when we only parse a mask
tpm2_parse_pcr_argument_to_mask() is supposed to parse a PCR mask
string, and uses the full blown tpm2_parse_pcr_argument() call at its
core, which parses more than just a mask, i.e. values and algorithms
too. Which is very confusing at times, because commands such as
"systemd-cryptenroll --tpm2-device=auto
--tpm2-public-key-pcrs=1:sha1=09dbdbc7f6cdd8029cc90b57a915c19a0ac21bce"
are very confusing, since they suggest enrollment with a specific
algorithm and has value, but this is not in fact what happens: both are
entirely ignored.

That this was accepted this way was more an accident than intended,
which is already visible in the fact that extensive test case entirely
ignores the fact that strings like this are accepted.
2025-01-03 10:44:26 +01:00
Lennart Poettering 982e791f1c tpm2-util: optionally do wildcard hash check in tpm2_pcr_values_to_mask()
If TPM2_ALG_ERROR (aka "0") is specified as algorithm in
tpm2_pcr_values_to_mask() we'll simply match all algorithms. This allows
us to shorten tpm2_parse_pcr_argument_to_mask() a bit. The function
accepts but ignores a hash algorithm specification currently, hence this
should not really much effect.
2025-01-03 10:39:10 +01:00
Lennart Poettering 0db32a3bfb tpm2-util: drop ret_x prefix from two arguments that are not just return but also input params 2025-01-03 10:39:10 +01:00
Lennart Poettering 2623052e14 nspawn: improve log messages a bit 2025-01-03 10:21:34 +01:00
Lennart Poettering ef99711d0f nspawn: drop some redundant {} 2025-01-03 10:21:27 +01:00
Lennart Poettering bd2fd85501 dissect: employ vpick also if we operate on a directory-based image 2025-01-03 10:14:20 +01:00
Lennart Poettering 8ef117ff4b dissect: add a bit of color to --discover table 2025-01-03 10:13:13 +01:00
Lennart Poettering 41c2a5b0b9 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.
2025-01-03 10:12:23 +01:00
Lennart Poettering 36d2096b84 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
2025-01-03 09:34:50 +01:00