Commit Graph

79350 Commits

Author SHA1 Message Date
Mike Yuan
63ed611579 string-util: modernize strextendn() a bit
l == SIZE_MAX requires no special handling, since we assert
on (s || l == 0) above.
2025-02-10 19:39:22 +01:00
Mike Yuan
146b2ed6a6 string-util: drop now unused strnappend() 2025-02-10 19:39:22 +01:00
Mike Yuan
ea5fbc3938 env-util: use strextendn() instead of strnappend() where appropriate 2025-02-10 19:39:21 +01:00
Mike Yuan
ce0a510667 cryptsetup: port to strprepend() 2025-02-10 19:39:21 +01:00
Mike Yuan
b40694f5fc string-util: introduce strprepend() helper 2025-02-10 19:39:21 +01:00
Lennart Poettering
fd2a114061 bootctl: fix potential uninitialized memory access (#36329) 2025-02-10 15:34:38 +01:00
Lennart Poettering
ceebfc3fbe escape: apply the minimal ansi highlighting on --help we usually do (#36339) 2025-02-10 15:33:59 +01:00
Lennart Poettering
a3196d4e9e update TODO 2025-02-10 10:05:01 +01:00
Jan Kalabza
c19451f840 po: Translated using Weblate (Czech)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Jan Kalabza <jan.kalabza@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main
2025-02-10 11:59:59 +09:00
Lennart Poettering
37252381d2 bootctl,kernel-install: suffix some paths referring to dirs in log messages with / 2025-02-10 01:15:52 +01:00
Lennart Poettering
592b715f4f update TODO 2025-02-09 23:44:00 +01:00
Lennart Poettering
af5b961ad8 bootctl: minor reordering of fields in output
Let's move the currently used/default/oneshot entry output after the
basic info about the boot loader itself, since conceptually these are
objects kinda "one level down" from the boot loader perspective. Hence,
let's *first* show all info about the boot loader itself before we
display the objects it manages.

This is just a trivial change in output, just swaps th elines for these
fields with the ones showing where the boot loader is installed.
2025-02-09 23:34:29 +01:00
Luca Boccassi
2ac8fcf656 ukify: add --pcr-certificate= parameter
Public keys and certificates are not the same, as the latter embeds more
information that the former, and other tools like sd-measure have distinct
parameters for each of them.
Add a new --pcr-certificate= parameter to ukify, and use it to pass certs
down to sd-measure, as an alternative to --pcr-public-key=. Do not allow
specifying both.
2025-02-09 22:24:00 +00:00
Lennart Poettering
df418fa234 bootctl: suppress output of empty partition info if we also have no idea about EFI binary path
So far we'd output both the partition and the binary path always, even
if we didn't know either (but in that case show empty information).
Let's address this, and show partition info only if we know it, or if we
know the EFI binary path, but suppress both if we know neither.

Note that we'll show the partition info if we don't know it still if we
know the EFI binary path used for boot, since it is relative to the
partition of course, and hence it's really strange to know one but not
the other, hence it deserves some mentioning in the output.
2025-02-09 23:23:38 +01:00
Lennart Poettering
26bfd97216 bootctl: also shown whether stub loader partition data was passed
Let's make the stub and loader output sections more alike, and say in
both cases whether we recieved that data from the boot phase or not the
same way.
2025-02-09 23:21:14 +01:00
Lennart Poettering
df28afe9b2 bootctl: fix potential uninitialized memory access
And while we are at it, let' get rid of have_xyz_partition_uuid
variables, to simplify things.
2025-02-09 23:19:46 +01:00
Yu Watanabe
5dbd751ccc tmpfiles: 3 trivial cleanups (#36332) 2025-02-10 02:33:33 +09:00
Yu Watanabe
869b0dfe6e core: remove path to transient unit file from unit name maps on stop (#36186)
Fixes #35190.
2025-02-10 00:48:01 +09:00
Michael Olbrich
e91c5cf06a missing_sched: add CLONE_PIDFD
CLONE_PIDFD was introduced in v5.2 and in sched.h in glibc-2.31 so
without this, building with older version fails with:

src/basic/raw-clone.h:41:108: error: 'CLONE_PIDFD' undeclared (first use in this function); did you mean 'CLONE_FILES'?
2025-02-10 00:43:53 +09:00
Yu Watanabe
aaa274ed7f xattr-util: try new *xattrat() family syscalls first (#36228)
While killing cgroup v1 I want to turn all cg_* helpers to take
cgroupfs_fd + cg path, which means all relevant path operations must
support openat() semantics. `removexattrat()` is currently missing. I
took the chance to do a bigger refactor for xattr-util.
2025-02-10 00:41:38 +09:00
Daan De Meyer
dc90f083d0 storagetm: Check if /sys/kernel/config is a mountpoint
Otherwise we'll fail with an unclear error later on so let's check
this first before continuing.
2025-02-09 16:40:45 +01:00
Mike Yuan
8dc4f9a944 tmpfiles: drop redundant proc_mounted() check
Follow-up for 01131684ac

After the mentioned commit, the execution of tmpfiles
is aborted without /proc/. No need to check for individual
operations.
2025-02-09 15:39:25 +01:00
Mike Yuan
7b66a950db tmpfiles: use prefix_roota() where appropriate 2025-02-09 15:39:24 +01:00
Mike Yuan
6f91e7a3be tmpfiles: fix copypasta in create_symlink() (FIFO -> symlink) 2025-02-09 15:39:22 +01:00
Enrico Tagliavini
1740bbc98b hwdb: add accel orientation and location for the BMAX Y14
The BMAX MaxBook Y14 has 2 acceleromenter sensors, one seems to be in
the display, the other in the base. With the default ACCEL_MOUNT_MATRIX
monitor-sensor would report the display to be rotate of 180 degrees
compared to its real position, i.e. upside down when normal and vice
versa. Left up and right up are also swapped.

Correcting the ACCEL_MOUNT_MATRIX for the display sensor solves the
issue and monitor-sensor reports the correct values.

For the Y13 model the Z axis value was also inverted. For the Y14 to
work correctly, this is not necessary, but I'm not sure how to double
check this.

Sensors info:

P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX010A:00/iio:device0
M: iio:device0
R: 0
U: iio
T: iio_device
D: c 237:0
N: iio:device0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX010A:00/iio:device0
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device0
E: DEVTYPE=iio_device
E: MAJOR=237
E: MINOR=0
E: USEC_INITIALIZED=25931869
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

P: /devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-3/i2c-KIOX020A:00/iio:device1
M: iio:device1
R: 1
U: iio
T: iio_device
D: c 237:1
N: iio:device1
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-3/i2c-KIOX020A:00/iio:device1
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device1
E: DEVTYPE=iio_device
E: MAJOR=237
E: MINOR=1
E: USEC_INITIALIZED=26000295
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

accel-display
acpi:KIOX010A:KIOX010A:
dmi:bvnAmericanMegatrendsInternational,LLC.:bvr5.00_002:bd05/13/2024:br5.27:efr1.1:svnAMI:pnIntel:pvrDefaultstring:rvnAMI:rnIntel:rvrDefaultstring:cvnDefaultstring:ct31:cvrDefaultstring:skuH8Y6:

accel-base
acpi:KIOX020A:KIOX020A:
2025-02-09 23:36:06 +09:00
Mike Yuan
3c06e2efb8 smack-util: several cleanups
- Make _read_at and _apply_at variants the "canonical" functions
  (which leverage xsetxattr()/xremovexattr()), turn others
  into static inline helpers
- Unexport string table lookup (not used anywhere else)
- Define nop functions as static inline if !ENABLE_SMACK
2025-02-09 14:51:04 +01:00
Mike Yuan
61b3d116ee tmpfiles,chown-recursive: port to xsetxattr()/xremovexattr() 2025-02-09 14:51:04 +01:00
Mike Yuan
d228afd792 test-xattr-util: add test cases for symlinks 2025-02-09 14:51:04 +01:00
Mike Yuan
b8df25dcfe xattr-util: try new *xattrat() family syscalls first
Added in 6140be90ec

However, when O_PATH fds are encountered we'd have to go by
/proc/self/fd/ still, since the kernel people are reluctant
to make the new syscalls work with them
(https://lore.kernel.org/linux-fsdevel/20250206-steril-raumplanung-733224062432@brauner/)
Hence getxattrat() and listxattrat() are not employed.

While at it, remove the discrepancy between path being NULL
and empty - I don't grok the "security issue" claimed earlier,
but nowadays even the kernel treats the two as identical:
e896474fe4
2025-02-09 14:51:04 +01:00
Mike Yuan
baca3581ea xattr-util: modernize getcrtime_at() and friends
- Drop fd_ prefix for openat()-like function
- Make fd_setcrtime() accept O_PATH fds too
- Use statx_timestamp_load()
2025-02-09 14:51:03 +01:00
Mike Yuan
a0924d96cb missing_syscall: add {set,remove}xattrat() 2025-02-09 14:51:03 +01:00
Mike Yuan
0f633e5257 missing_syscall: drop more defs below our kernel baseline 2025-02-09 14:51:03 +01:00
Mike Yuan
6f271fafc3 missing_ioprio: remove outdated comment now that linux/ioprio.h exists 2025-02-09 14:51:03 +01:00
Mike Yuan
d43dc71e99 meson: glibc now provides wrapper for sched_setattr()
C.f. 21571ca0d7
2025-02-09 14:51:03 +01:00
Mike Yuan
587a173ed2 compress: mark string table lookup funcs as _const_/_pure_
Follow-up for cfaf78001c
2025-02-09 12:28:43 +01:00
Lennart Poettering
9ccc369ff3 network: mark container/VM/namespace networks as not required for online + disable DHCP lease persistency
These networks are not connections to upstream routers, but where we are
ourselves are the upstream router, hence it doesn't make too much sense
to require them to be up as default to determine if we are "online",
because they lead "in the wrong direction".

Also, disable DHCP lease persistency for these networks, since
container/VM/namespaces are generally shortlived, and typically have no
persistent identity. Moreover, the IP range we assign each VM/container
connection is just too small to permit persistency, as otherwise we'll
run out of leases way too quickly if VM/containers are restarted a bunch of
times with different MAC addresses (which I ran into).

I think these are better defaults, but of course these are only
defaults.
2025-02-09 19:37:38 +09:00
Lennart Poettering
f90efd2d13 bootctl: improve output regarding random seed if we cannot access ESP 2025-02-09 09:14:21 +01:00
Lennart Poettering
a341ea5c01 import-generator: fix copy/paste issue 2025-02-09 08:49:12 +01:00
Lennart Poettering
a5e4a89b90 update TODO 2025-02-09 08:02:52 +01:00
Yu Watanabe
52e9bc2deb journal-remote,journal-upload: added compression support (#34822) 2025-02-09 13:33:33 +09:00
Matthew Schwartz
88a0a54314 hwdb: add front button support for MSI Claw 7 AI+ A2VM 2025-02-09 10:12:13 +09:00
Alexander Shopov
6e538ffa28 Update Bulgarian translation
Update po-file based on latest generated from source
Update systemd.bg.catalog.in based on latest in source

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2025-02-09 10:09:56 +09:00
Luca Boccassi
92d2206534 repart: do not fail if no key/cert provided and verity-sig is deferred 2025-02-09 00:09:25 +00:00
Yu Watanabe
ed8063d143 udevadm-test: show result in json format (#36284)
This adds `--json=MODE` command line option to `udevadm test`.
This may be useful for parsing e.g. network interface name or device
node symlinks.

Closes #23661.
2025-02-08 15:50:04 +09:00
Yu Watanabe
576e98a72c meson: fix suite of alignment check tests
Follow-up for 97318131fd.

By default, suite of each built test is determined by the directory of
the source file. Hence, before the mentioned commit, all tests in
src/boot/efi/ are in the 'efi' suite. The commit changed the directory
tree, but forgot to update the name of the test suite.
2025-02-08 00:13:28 +00:00
Luca Boccassi
382e8a03ca network: allow to configure routing policy rule even if requesting interface is not activated yet (#36257)
Fixes a regression caused by 4f8b153d90
(v257).
Fixes #36244.
2025-02-07 22:56:36 +00:00
Luca Boccassi
3477e9bd45 ukify: add --pcrsig and --join-pcrsig arguments to append offline signature (#36181)
Add a build parameter to take an existing UKI and attach a .pcrsig
section
to it. This allows one to create a UKI with a .pcrpkey section with
--policy-digest to get the json output from sd-measure, sign the digest
offline, and attach the .pcrsig section with the signature later.
2025-02-07 17:14:45 +00:00
Lennart Poettering
8135d37f81 import: update to current fedora keyring
Add a bunch of more released keys. Kinda a follow-up for c8c5ce5772
2025-02-08 01:43:21 +09:00
Yu Watanabe
c26db05640 man/udevadm: add examples to get predictable interface name and persistent device node symlinks
Closes #23661.
2025-02-08 01:39:35 +09:00
Yu Watanabe
ac722389a7 udevadm-test: allow to dump result in json format
This adds --json=MODE option for 'udevadm test' command.
When specified, all messages, except for the final result, will be
written to stderr, and the final result is shown in JSON format to
stdout. It may be useful for parsing the test result.
2025-02-08 01:39:35 +09:00