Commit Graph
67462 Commits
Author SHA1 Message Date
Mike Yuan c8d44d818f Merge pull request #29231 from poettering/cgroup-utils-tweaklets
minor tweaks/modernizations in cgroup-util.[ch]
2023-09-20 13:06:16 +08:00
Lennart Poettering 3b74b4958b pidref: add pidref_equal() helper
This compares two PidRef structures via the pid_t field. Ideally we'd do
a stricter comparison here, that is safe towards PID reuse, but so far
the pidfd API lacks suitable mechanisms for that, hence do the best we
can do.
2023-09-20 13:02:21 +08:00
Lennart Poettering 648cb0248d scope: slightly simplify scope_enter_running() error handling 2023-09-20 13:01:53 +08:00
Mike Yuan d40886a36f Merge pull request #29230 from poettering/scope-tweaks
pid1: minor scope tweaks
2023-09-20 13:00:56 +08:00
Luca Boccassi 4b4d612d86 boot: skip loading DTBs in type 1 when secure boot is enabled
The kernel loads the DTB from EFI before ExitBootServices():

https://github.com/torvalds/linux/blob/v6.5/drivers/firmware/efi/libstub/fdt.c#L245

DTBs can map and assign arbitrary memory ranges. The kernel refuses
to load one from the dtb= kernel command line parameter when secure
boot is enabled, as it's not safe. Let's do the same for type 1
entries, as they are unverified.

This only affects arm64 and riscv64, firmwares do not support DTB
on x86.
2023-09-19 23:21:57 +01:00
Lennart Poettering 5ed7cdfb8f cgroup-util: tighten range check before casting to pid_t 2023-09-19 22:43:06 +02:00
Lennart Poettering 8ab40789d9 cgroup-util: initialize return param on all success returns
As per coding style.
2023-09-19 22:43:06 +02:00
Lennart Poettering aef43552fc cgroup-util: rename return param to 'ret', as per coding style 2023-09-19 22:43:06 +02:00
Lennart Poettering 05d1630e70 scope: only stop watching processes when we go down
Let's not stop watching processes on every scope state change. This
corrects behaviour when a scope is being enqueued and hasn't started
yet, but has processes associated to it already. previously, if we'd doa
full PID 1 reload we'd stop watching those pids. With this change we'll
continue watching them in that case, and only stop watching them when
the scope unit really shuts down after first being up.
2023-09-19 22:28:42 +02:00
Lennart Poettering fff7c34ce7 scope: add trailing comma to array initialization 2023-09-19 22:28:42 +02:00
Yu Watanabe a00076113b sd-dhcp-server: store lifetime and friends in usec_t 2023-09-20 05:04:03 +09:00
Yu Watanabe ca515c961b libsystemd-network: introduce several helper functions to handle time values
These will be used in later commits.
2023-09-20 05:04:03 +09:00
Daan De Meyer e078490175 mkfs-util: Only unshare mount namespace if needed
We only need a separate mount namespace if we're operating on a
btrfs block device so let's make sure we only unshare the mount
namespace if that's the case.

Replaces #29214
2023-09-19 21:52:42 +02:00
IllusionMan1212 df4535a5c0 hwdb: add mic mute key mappings for Acer Predator Triton 300 SE 2023-09-19 19:17:52 +02:00
Daniel Rusek 0b9b0bfb81 po: Translated using Weblate (Czech)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Daniel Rusek <mail@asciiwolf.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/cs/
Translation: systemd/main
2023-09-19 19:11:33 +02:00
Franck Bui c76f2fb0e5 Reflect the fact that main config files can be installed in /usr 2023-09-19 17:48:02 +02:00
Franck Bui 58849483a4 config files: more recommendations of systemd-analyze cat-config
Follow-up for 3b0754b16c.
2023-09-19 17:47:57 +02:00
Luca Boccassi 02ee98d46f Merge pull request #29150 from abderrahim/version-info-dbus
man: add version information for dbus interfaces
2023-09-19 16:04:41 +01:00
Zbigniew Jędrzejewski-Szmek c71404fdd2 Merge pull request #29122 from yuwata/network-allow-multiple-ipv6-null-addresses
network: allow multiple IPv6 null addresses
2023-09-19 16:13:42 +02:00
Zbigniew Jędrzejewski-Szmek 9682f08bc4 Merge pull request #29215 from AdamWill/kmm-layoutorder-variant
Some fixes for xkb -> console keyboard layout conversion
2023-09-19 16:05:46 +02:00
Luca Boccassi c9bebec872 boot: use separate SBAT project names for stub and boot
The implementations are not 100% overlapping, so use different identifiers, so
that revocations can be done independently. e.g.: a bug that affects only
sd-boot won't necessarily cause old UKIs to be revoked.
2023-09-19 15:57:14 +02:00
Mike Yuan 2b344ea808 test: introduce TEST-83-BTRFS
The Ubuntu CIs are deny-listed because the shipped
btrfs-progs is too old, i.e. doesn't support the
recently-added 'filesystem mkswapfile' command.
2023-09-19 21:45:27 +08:00
Mike Yuan efb6a76a2a btrfs-util: introduce btrfs_get_file_physical_offset_fd
This calculates the physical offset of a file on btrfs,
similar to what FIEMAP does on other filesystems.

The implementation should generally be kept in sync with
btrfs-progs' inspect-internal map-swapfile command:
https://github.com/kdave/btrfs-progs/blob/92d04d4780886a9850716e5529f1dace97779931/cmds/inspect.c#L1516

Preparation for #25130
2023-09-19 21:45:27 +08:00
Mike Yuan 79de6eb1a7 tree-wide: explicitly compare return value of fd_is_fs_type with 0
According to our coding style.
2023-09-19 21:45:27 +08:00
Abderrahim Kitouni d0c0c1069b update-dbus-docs: don't consider mentions in the History
Being mentioned in the History section as added in a specific version isn't
enough to consider a member documented.
2023-09-19 14:33:34 +01:00
Abderrahim Kitouni d9d2d16aea man: add version information for dbus interfaces
These only go back to version 250 which is the first version to provide the
export-dbus-interfaces build target.
2023-09-19 14:33:34 +01:00
Daan De Meyer 33ec8d7610 Merge pull request #29221 from keszybz/fedora-cloud-latest
man: update Fedora release information
2023-09-19 15:32:57 +02:00
Zbigniew Jędrzejewski-Szmek 076a82c575 man: update Fedora release information 2023-09-19 13:13:02 +02:00
Daan De Meyer 701a945e44 Merge pull request #29218 from DaanDeMeyer/kernel-modules
mkosi: Stop installing kernel-modules on Fedora
2023-09-19 12:22:16 +02:00
Abderrahim Kitouni 00f95506e2 man: condense version information for functions
Use a more compact form like 'a, b, and c were added in version x'
2023-09-19 10:48:15 +01:00
Daan De Meyer 2a55ebb2e9 mkosi: Stop installing kernel-modules on Fedora
squashfs has been moved to kernel-modules-core so no need to install
kernel-modules anymore on Fedora.
2023-09-19 11:47:57 +02:00
Daan De Meyer 755012d37d mkosi: Bump Fedora CI to Fedora 39 2023-09-19 11:47:41 +02:00
Luca Boccassi b0003b86fb Merge pull request #29217 from behrmann/typofixes
Various typo fixes
2023-09-19 10:46:45 +01:00
Joerg Behrmann 477eac0a62 man: remove quotes around default values 2023-09-19 10:05:38 +02:00
Joerg Behrmann 7227dd816f treewide: fix typos
- mostly: usecase -> use case
- continously -> continuously
- single typos in docs/FILE_DESCRIPTOR_STORE.md
2023-09-19 10:05:38 +02:00
Lennart Poettering 90eabfe6d1 update TODO 2023-09-19 09:47:40 +02:00
Lennart Poettering 60936158d1 Merge pull request #29159 from poettering/socket-pause
core: add new "PollLimit" settings to .socket units
2023-09-19 09:40:27 +02:00
Zbigniew Jędrzejewski-Szmek 3b6cabd806 basic/parse-util: add helper to parse bounded unsigned values
"parse_range" is already used for stuff like "a-b", so use "bounded" here to
avoid confusion.
2023-09-19 09:35:52 +02:00
Zbigniew Jędrzejewski-Szmek f31fa08057 sd-network: modernize log error messages
SYNTHETIC_ERRNO() is used where appropriate.

Splits in message format strings are removed, so that it's easier to
read/grep/copy them.
2023-09-19 09:35:52 +02:00
Luca Boccassi 498ef07dd8 Merge pull request #29152 from poettering/pidref-more
pid1: port more code over to PidRef (i.e. pidfd based operation)
2023-09-19 01:12:09 +01:00
Adam Williamson a22567f54e find_legacy_keymap: try matching with layout order reversed
The lines in kbd-model-map date back to ye olde times (RH's old
system-config-keyboard), and I think predate this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1039185

where we got strong feedback that, for 'switched' layout setups
like Russian, US English should be the *first* layout and the
native layout the *second* one. This is how anaconda and, as of
recently, gnome-initial-setup configure such cases - but that
means, if we try to use localed to convert these configurations
using kbd-model-map, we get the wrong result (we get "us" as the
console layout). See also:

https://bugzilla.redhat.com/show_bug.cgi?id=1912609

where we first noticed this wasn't working right, but sadly, we
'fixed' it with a not-really-correct bodge in anaconda instead
of doing it properly.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-09-18 17:06:02 -07:00
Adam Williamson bf09ab0184 find_legacy_keymap: fix empty variant matching
We should give a match bonus if the X context variant is empty
and the xvariant column in kbd-model-map is "-" (which means
none). Currently, we don't, which means that if you call this
on a context with layouts bg,us and no variant, you get the
console layout bg_pho-utf8 instead of bg_bds-utf8 (because both
score the same, and the bg_pho-utf8 row comes first). You should
get bg_bds-utf8 in this case.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-09-18 17:06:02 -07:00
Valentin David 5a77fbb81f repart: Fix a check for CopyBlocks on data partition
The check was verifying that the verity partition had CopyBlocks set instead of
the associated data partition.
2023-09-19 00:53:29 +01:00
наб eed99fe995 systemd.time.7: rewrite Parsing Timestamps section 2023-09-19 00:50:08 +01:00
Dan Streetman 948d460ea6 test: only load tpm_ibmvtpm kernel module on PowerPC hw
This module is only available on PPC hw, so avoid trying to load it elsewhere, as it generates a misleading error message in the logs:

modprobe: FATAL: Module tpm_ibmvtpm not found in directory /lib/modules/5.15.0-83-generic
2023-09-19 00:38:10 +01:00
Abderrahim Kitouni aefdc1124f man: update version information
As I noticed a lot of missing information when trying to implement checking
for missing info. I reimplemented the version information script to be more
robust, and here is the result.

Follow up to ec07c3c80b
2023-09-19 00:37:37 +01:00
Lennart Poettering 6b66407080 path: make arg_pager_flags static
Follow-up for: e441d1d46e
2023-09-19 00:37:01 +01:00
Luca Boccassi c2077ae0c4 Merge pull request #29186 from keszybz/man-notifications-and-fd-store
man: notifications and fd store
2023-09-19 00:36:24 +01:00
Lennart Poettering 4775b55db0 core: port unit_fork_helper_process() and unit_fork_and_watch_rm_rf() to PidRef 2023-09-18 19:08:09 +02:00
Lennart Poettering 37eb258e91 core: port unit_main_pid() + unit_control_pid() to PidRef and drop unit_kill_common()
This ports over unit_main_pid() + unit_control_pid() to return PidRef*
pointers (which also means the underlying UnitVTable function pointers
are changed accordingly).

This then uses te functions to simplify the unit_kill() call, by
avoiding the kill() vtable indirection and instead just suing
unit_main_pid() and unit_control_pid() directly.
2023-09-18 19:08:09 +02:00