]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agoMerge pull request #29231 from poettering/cgroup-utils-tweaklets
Mike Yuan [Wed, 20 Sep 2023 05:06:16 +0000 (13:06 +0800)] 
Merge pull request #29231 from poettering/cgroup-utils-tweaklets

minor tweaks/modernizations in cgroup-util.[ch]

9 months agopidref: add pidref_equal() helper
Lennart Poettering [Tue, 19 Sep 2023 14:09:26 +0000 (16:09 +0200)] 
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.

9 months agoscope: slightly simplify scope_enter_running() error handling
Lennart Poettering [Tue, 19 Sep 2023 20:01:29 +0000 (22:01 +0200)] 
scope: slightly simplify scope_enter_running() error handling

9 months agoMerge pull request #29230 from poettering/scope-tweaks
Mike Yuan [Wed, 20 Sep 2023 05:00:56 +0000 (13:00 +0800)] 
Merge pull request #29230 from poettering/scope-tweaks

pid1: minor scope tweaks

9 months agoboot: skip loading DTBs in type 1 when secure boot is enabled
Luca Boccassi [Sat, 16 Sep 2023 23:23:37 +0000 (00:23 +0100)] 
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.

9 months agocgroup-util: tighten range check before casting to pid_t 29231/head
Lennart Poettering [Tue, 19 Sep 2023 14:04:34 +0000 (16:04 +0200)] 
cgroup-util: tighten range check before casting to pid_t

9 months agocgroup-util: initialize return param on all success returns
Lennart Poettering [Tue, 19 Sep 2023 14:03:56 +0000 (16:03 +0200)] 
cgroup-util: initialize return param on all success returns

As per coding style.

9 months agocgroup-util: rename return param to 'ret', as per coding style
Lennart Poettering [Tue, 19 Sep 2023 14:03:27 +0000 (16:03 +0200)] 
cgroup-util: rename return param to 'ret', as per coding style

9 months agoscope: only stop watching processes when we go down 29230/head
Lennart Poettering [Tue, 19 Sep 2023 14:24:32 +0000 (16:24 +0200)] 
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.

9 months agoscope: add trailing comma to array initialization
Lennart Poettering [Tue, 19 Sep 2023 14:24:23 +0000 (16:24 +0200)] 
scope: add trailing comma to array initialization

9 months agomkfs-util: Only unshare mount namespace if needed
Daan De Meyer [Tue, 19 Sep 2023 09:44:54 +0000 (11:44 +0200)] 
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

9 months agohwdb: add mic mute key mappings for Acer Predator Triton 300 SE
IllusionMan1212 [Tue, 19 Sep 2023 16:25:23 +0000 (18:25 +0200)] 
hwdb: add mic mute key mappings for Acer Predator Triton 300 SE

9 months agopo: Translated using Weblate (Czech)
Daniel Rusek [Tue, 19 Sep 2023 14:35:58 +0000 (16:35 +0200)] 
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

9 months agoMerge pull request #29150 from abderrahim/version-info-dbus
Luca Boccassi [Tue, 19 Sep 2023 15:04:41 +0000 (16:04 +0100)] 
Merge pull request #29150 from abderrahim/version-info-dbus

man: add version information for dbus interfaces

9 months agoMerge pull request #29122 from yuwata/network-allow-multiple-ipv6-null-addresses
Zbigniew Jędrzejewski-Szmek [Tue, 19 Sep 2023 14:13:42 +0000 (16:13 +0200)] 
Merge pull request #29122 from yuwata/network-allow-multiple-ipv6-null-addresses

network: allow multiple IPv6 null addresses

9 months agoMerge pull request #29215 from AdamWill/kmm-layoutorder-variant
Zbigniew Jędrzejewski-Szmek [Tue, 19 Sep 2023 14:05:46 +0000 (16:05 +0200)] 
Merge pull request #29215 from AdamWill/kmm-layoutorder-variant

Some fixes for xkb -> console keyboard layout conversion

9 months agoboot: use separate SBAT project names for stub and boot
Luca Boccassi [Sat, 16 Sep 2023 23:55:55 +0000 (00:55 +0100)] 
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.

9 months agoupdate-dbus-docs: don't consider mentions in the History 29150/head
Abderrahim Kitouni [Sun, 10 Sep 2023 22:41:35 +0000 (23:41 +0100)] 
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.

9 months agoman: add version information for dbus interfaces
Abderrahim Kitouni [Sun, 10 Sep 2023 13:40:03 +0000 (14:40 +0100)] 
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.

9 months agoMerge pull request #29221 from keszybz/fedora-cloud-latest
Daan De Meyer [Tue, 19 Sep 2023 13:32:57 +0000 (15:32 +0200)] 
Merge pull request #29221 from keszybz/fedora-cloud-latest

man: update Fedora release information

9 months agoman: update Fedora release information 29221/head
Zbigniew Jędrzejewski-Szmek [Tue, 19 Sep 2023 11:13:02 +0000 (13:13 +0200)] 
man: update Fedora release information

9 months agoMerge pull request #29218 from DaanDeMeyer/kernel-modules
Daan De Meyer [Tue, 19 Sep 2023 10:22:16 +0000 (12:22 +0200)] 
Merge pull request #29218 from DaanDeMeyer/kernel-modules

mkosi: Stop installing kernel-modules on Fedora

9 months agoman: condense version information for functions
Abderrahim Kitouni [Mon, 18 Sep 2023 16:44:26 +0000 (17:44 +0100)] 
man: condense version information for functions

Use a more compact form like 'a, b, and c were added in version x'

9 months agomkosi: Stop installing kernel-modules on Fedora 29218/head
Daan De Meyer [Tue, 19 Sep 2023 08:53:24 +0000 (10:53 +0200)] 
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.

9 months agomkosi: Bump Fedora CI to Fedora 39
Daan De Meyer [Tue, 19 Sep 2023 09:47:41 +0000 (11:47 +0200)] 
mkosi: Bump Fedora CI to Fedora 39

9 months agoMerge pull request #29217 from behrmann/typofixes
Luca Boccassi [Tue, 19 Sep 2023 09:46:45 +0000 (10:46 +0100)] 
Merge pull request #29217 from behrmann/typofixes

Various typo fixes

9 months agoman: remove quotes around default values 29217/head
Joerg Behrmann [Tue, 19 Sep 2023 08:05:06 +0000 (10:05 +0200)] 
man: remove quotes around default values

9 months agotreewide: fix typos
Joerg Behrmann [Tue, 19 Sep 2023 08:02:05 +0000 (10:02 +0200)] 
treewide: fix typos

- mostly: usecase -> use case
- continously -> continuously
- single typos in docs/FILE_DESCRIPTOR_STORE.md

9 months agoupdate TODO
Lennart Poettering [Tue, 19 Sep 2023 07:47:29 +0000 (09:47 +0200)] 
update TODO

9 months agoMerge pull request #29159 from poettering/socket-pause
Lennart Poettering [Tue, 19 Sep 2023 07:40:27 +0000 (09:40 +0200)] 
Merge pull request #29159 from poettering/socket-pause

core: add new "PollLimit" settings to .socket units

9 months agoMerge pull request #29152 from poettering/pidref-more
Luca Boccassi [Tue, 19 Sep 2023 00:12:09 +0000 (01:12 +0100)] 
Merge pull request #29152 from poettering/pidref-more

pid1: port more code over to PidRef (i.e. pidfd based operation)

9 months agofind_legacy_keymap: try matching with layout order reversed 29215/head
Adam Williamson [Fri, 15 Sep 2023 23:02:29 +0000 (16:02 -0700)] 
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>
9 months agofind_legacy_keymap: fix empty variant matching
Adam Williamson [Fri, 15 Sep 2023 22:35:36 +0000 (15:35 -0700)] 
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>
9 months agorepart: Fix a check for CopyBlocks on data partition
Valentin David [Mon, 18 Sep 2023 19:01:52 +0000 (21:01 +0200)] 
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.

9 months agosystemd.time.7: rewrite Parsing Timestamps section
наб [Fri, 8 Sep 2023 16:00:12 +0000 (18:00 +0200)] 
systemd.time.7: rewrite Parsing Timestamps section

9 months agotest: only load tpm_ibmvtpm kernel module on PowerPC hw
Dan Streetman [Mon, 18 Sep 2023 18:31:54 +0000 (14:31 -0400)] 
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

9 months agoman: update version information
Abderrahim Kitouni [Mon, 18 Sep 2023 15:03:38 +0000 (16:03 +0100)] 
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 ec07c3c80b2b1bfa6788500202006ff85f5ae4f4

9 months agopath: make arg_pager_flags static
Lennart Poettering [Mon, 18 Sep 2023 15:25:12 +0000 (17:25 +0200)] 
path: make arg_pager_flags static

Follow-up for: e441d1d46e8cd640ffac9d9231e5b16852fd9c28

9 months agoMerge pull request #29186 from keszybz/man-notifications-and-fd-store
Luca Boccassi [Mon, 18 Sep 2023 23:36:24 +0000 (00:36 +0100)] 
Merge pull request #29186 from keszybz/man-notifications-and-fd-store

man: notifications and fd store

9 months agocore: port unit_fork_helper_process() and unit_fork_and_watch_rm_rf() to PidRef 29152/head
Lennart Poettering [Sun, 10 Sep 2023 14:41:43 +0000 (16:41 +0200)] 
core: port unit_fork_helper_process() and unit_fork_and_watch_rm_rf() to PidRef

9 months agocore: port unit_main_pid() + unit_control_pid() to PidRef and drop unit_kill_common()
Lennart Poettering [Sun, 10 Sep 2023 14:25:02 +0000 (16:25 +0200)] 
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.

9 months agopidref: add sigqueue() helper
Lennart Poettering [Sun, 10 Sep 2023 14:17:35 +0000 (16:17 +0200)] 
pidref: add sigqueue() helper

9 months agocore: port over unit_kill_context() to PidRef
Lennart Poettering [Sun, 10 Sep 2023 13:12:59 +0000 (15:12 +0200)] 
core: port over unit_kill_context() to PidRef

9 months agocore: port service_set_main_pid() to PidRef
Lennart Poettering [Sun, 10 Sep 2023 12:49:16 +0000 (14:49 +0200)] 
core: port service_set_main_pid() to PidRef

9 months agoci: add test for poll limit 29159/head
Lennart Poettering [Mon, 18 Sep 2023 16:05:27 +0000 (18:05 +0200)] 
ci: add test for poll limit

9 months agoman: document the new PollLimitIntervalSec=/PollLimitBurst= settings
Lennart Poettering [Mon, 18 Sep 2023 15:51:49 +0000 (17:51 +0200)] 
man: document the new PollLimitIntervalSec=/PollLimitBurst= settings

9 months agocore: add new "PollLimit" settings to .socket units
Lennart Poettering [Sat, 9 Sep 2023 12:46:32 +0000 (14:46 +0200)] 
core: add new "PollLimit" settings to .socket units

This adds a new "PollLimit" pair of settings to .socket units, very
similar to existing "TriggerLimit" logic. The differences are:

* PollLimit focusses on the polling on the sockets, and pauses that
  temporarily if a ratelimit on that is reached. TriggerLimit otoh
  focusses on the triggering effect of socket units, and stops
  triggering once the ratelimit is hit.

* While the trigger limit being hit is an action that causes the socket
  unit to fail the polling limit being reached will just temporarily
  disable polling on the socket fd, and it is resumed once the ratelimit
  interval is over.

* When a socket unit operates on multiple socket fds (e,g, ListenStream=
  on both some ipv6 and an ipv4 address or so). Then the PollLimit will
  be specific to each fd, while the trigger limit is specific to the
  whole unit.

Implementation-wise this is mostly a wrapper around sd-event's
sd_event_source_set_ratelimit(), which exposes the desired behaviour
directly.

Usecase for all of this: socket services which when overloaded with
connections should just slow down reception of it, but not fail
persistently.

9 months agoMerge pull request #29206 from mrc0mmand/lsan-followup
Mike Yuan [Mon, 18 Sep 2023 15:00:04 +0000 (23:00 +0800)] 
Merge pull request #29206 from mrc0mmand/lsan-followup

core: limit the LSan shenanigans to PID 1

9 months agoupdate TODO
Lennart Poettering [Mon, 18 Sep 2023 14:20:44 +0000 (16:20 +0200)] 
update TODO

9 months agoman: Mention that JSON user record files should have the .user extension
Daan De Meyer [Mon, 18 Sep 2023 11:23:58 +0000 (13:23 +0200)] 
man: Mention that JSON user record files should have the .user extension

9 months agologind: slightly tweak error message about not enough swap for hibernation
Lennart Poettering [Mon, 18 Sep 2023 08:41:50 +0000 (10:41 +0200)] 
logind: slightly tweak error message about not enough swap for hibernation

Let's tweak the message if not enough swap is around slightly: systems
might have plenty swap backed by incompatible storage (specifically:
swap files on btrfs), but we (currently) do not support hibernating to
that.

Hence let's say *suitable* swap space and talk about *compatibility* of
backing storage.

Hopefully this will make things a bit clearer to users.

Prompted by: #29189

9 months agodoc: add a markdown doc giving an overview over the fdstore
Lennart Poettering [Mon, 18 Sep 2023 11:33:06 +0000 (13:33 +0200)] 
doc: add a markdown doc giving an overview over the fdstore

And link it up everywhere.

9 months agoman/daemon: s/init system/service manager/ 29186/head
Zbigniew Jędrzejewski-Szmek [Mon, 18 Sep 2023 12:44:32 +0000 (14:44 +0200)] 
man/daemon: s/init system/service manager/

As pointed out in the review, all this applies to the user services too, so are
not managed by the "init system", but by the more generic "service manager".

Also:
- use oxford comma
- change "employ" to "use" in various places
- change "the init system forwards messages to syslog" to "are forwarded to
  syslog". This is done by systemd-journald, so really there is no forwarding,
  because systemd-journald just writes them to a file in the common setup,
  so let's use the passive form to avoid specifying who does this.

9 months agomeson: restore tools/meson-vcs-tag.sh
Zbigniew Jędrzejewski-Szmek [Mon, 11 Sep 2023 14:46:04 +0000 (16:46 +0200)] 
meson: restore tools/meson-vcs-tag.sh

This conceptually reverts e95acdfe1d3a790e18617bb992a712b34f41800d,
but the actual contents of the script are taken from the command invocation
in meson with all the updates that happened in the meantime.

One small change is that I replaced () by {}: this avoids one subprocess spawn.
People were worried about the cost of vcs_tag(), and this microoptimization may
help a bit. I measured the speed on machine, and noop rebuilds are still about
100–120 ms.

The logic is entirely moved to the script. This makes the meson config simpler
and also makes it easier to use it externally.

The script is needed for in-place rpm builds, see README.build-in-place.md [1],
where it is invoked from the spec file to determine the project version.

[1] https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/README.build-in-place.md

9 months agomeson: fix TODO regarding next meson version
Luca Boccassi [Mon, 18 Sep 2023 11:30:53 +0000 (12:30 +0100)] 
meson: fix TODO regarding next meson version

9 months agovimrc: explicitly set shiftwidth for the C file type 29206/head
Frantisek Sumsal [Mon, 18 Sep 2023 10:36:11 +0000 (12:36 +0200)] 
vimrc: explicitly set shiftwidth for the C file type

If you start editing a shell script and then open a buffer with a C
file, the shiftwidth set by the previous autocommand for the sh file
type would not be reset to the original (global) 8ch. Let's fix this by
explicitly setting the shiftwidth in the C file type autocommand as
well.

9 months agocore: limit the LSan shenanigans to PID 1
Frantisek Sumsal [Mon, 18 Sep 2023 10:34:42 +0000 (12:34 +0200)] 
core: limit the LSan shenanigans to PID 1

Addresses https://github.com/systemd/systemd/pull/29194#pullrequestreview-1630530753.
Follow-up to ae5ce7e.

9 months agoMerge pull request #29204 from poettering/pe-section-fix
Luca Boccassi [Mon, 18 Sep 2023 10:47:29 +0000 (11:47 +0100)] 
Merge pull request #29204 from poettering/pe-section-fix

man: systemd-stub fixes

9 months agoman: fix counting of resource types 29204/head
Lennart Poettering [Mon, 18 Sep 2023 09:19:26 +0000 (11:19 +0200)] 
man: fix counting of resource types

9 months agoman: link UKI spec from sd-stub
Lennart Poettering [Mon, 18 Sep 2023 09:19:17 +0000 (11:19 +0200)] 
man: link UKI spec from sd-stub

9 months agoman: drop duplicate .uname documentation, add .sbat documentation
Lennart Poettering [Mon, 18 Sep 2023 09:08:55 +0000 (11:08 +0200)] 
man: drop duplicate .uname documentation, add .sbat documentation

This fixes the PE section documentation in the systemd-stub man page:
for some reason .uname was listed twice, and .sbat was still missing.
Address that.

Also, let's reorder things to to match the "canonical" ordering we also
use for measurement in sd-stub. The order makes sense and there's really
no reason to depart from that here.

Minor other tweaks.

Reverts b6f2e6860220aa89550f690b12246c4e8eb6e908, among other things

9 months agohwdb: Add quirk for teclast x3 plus (G4K3) rotation (#29202)
commondservice [Mon, 18 Sep 2023 08:38:56 +0000 (16:38 +0800)] 
hwdb: Add quirk for teclast x3 plus (G4K3) rotation (#29202)

Original info:
acpi:KIOX000A:KIOX000A:

dmi:bvnTECLAST:bvrG4K3_A1tPAD3.01:bd08/25/2017:br5.12:efr14.4:svnTECLAST:pnX3Plus:pvrDefaultstring:rvnTECLAST:rnX3Plus:rvrDefaultstring:cvnDefaultstring:ct30:cvrDefaultstring:skuG4K3_A1:

It seems that teclast x3 plus has another sku G4K2. Not owning that sku, I decide not to cover the change on G4K2.

9 months agoupdate TODO
Lennart Poettering [Mon, 18 Sep 2023 07:59:12 +0000 (09:59 +0200)] 
update TODO

9 months agotest-network: add test for multiple IPv6 null addresses 29122/head
Yu Watanabe [Fri, 8 Sep 2023 01:17:32 +0000 (10:17 +0900)] 
test-network: add test for multiple IPv6 null addresses

This also merges test_address_null() into test_address_static().

9 months agonetwork: allow to configure multiple IPv6 null addresses with different prefix length
Yu Watanabe [Sun, 10 Sep 2023 15:30:14 +0000 (00:30 +0900)] 
network: allow to configure multiple IPv6 null addresses with different prefix length

Previously, even if a .network file contains multiple IPv6 null
addresses with different prefix length, only the first setting is applied,
as the remainings are deduped in network_drop_invalid_addresses().

Even though the kernel allows us to change the prefix length of an existing
IPv6 address, we cannot safely change the prefix length of an address
that is originally requested as a null address, as the prefix of the
address may conflict with other addresses if we change it.

We already prohibit to change the prefix length of an existing IPv6
address that is originally requested as a null address. So, we can
safely allow to configure multiple IPv6 addresses from null addresses by
relaxing the dedup logic. The dedup is govern by the hash_ops. This adds
a special handling for IPv6 null addresses.

9 months agonetwork: rename address_prefix() -> address_ipv4_prefix()
Yu Watanabe [Mon, 18 Sep 2023 01:19:47 +0000 (10:19 +0900)] 
network: rename address_prefix() -> address_ipv4_prefix()

This also makes the function use in4_addr_is_set() and in4_addr_mask()
for readability.

9 months agonetwork: drop _fallthrough_ in address_{hash,compare}_func()
Yu Watanabe [Mon, 18 Sep 2023 01:16:53 +0000 (10:16 +0900)] 
network: drop _fallthrough_ in address_{hash,compare}_func()

No functional change, just refactoring and preparation for later commit.

9 months agomeson: add TODO to switch to new 'follow_symlinks' option in the future
Luca Boccassi [Sun, 17 Sep 2023 11:51:15 +0000 (12:51 +0100)] 
meson: add TODO to switch to new 'follow_symlinks' option in the future

Newly added and will be in the next release of Meson

9 months agoRevert "ci: temporarily disable Packit's i386"
Frantisek Sumsal [Sun, 17 Sep 2023 17:37:45 +0000 (19:37 +0200)] 
Revert "ci: temporarily disable Packit's i386"

The original issue [0] should be resolved in the current Rawhide.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=2237392

This reverts commit 3bf7d7963784669f876fab46e13f71faaf61cb27.

9 months agoMerge pull request #29119 from yuwata/network-dhcp-server-allow-null-server-address
Luca Boccassi [Sun, 17 Sep 2023 11:36:33 +0000 (12:36 +0100)] 
Merge pull request #29119 from yuwata/network-dhcp-server-allow-null-server-address

network/dhcp-server: allow null server address

9 months agocore: redirect LSan's report to /dev/console during manager exit
Frantisek Sumsal [Sat, 16 Sep 2023 19:44:48 +0000 (21:44 +0200)] 
core: redirect LSan's report to /dev/console during manager exit

When exiting PID 1 we most likely don't have stdio/stdout open, so the
final LSan check would not print any actionable information and would
just crash PID 1 leading up to a kernel panic, which is a bit annoying.
Let's instead attempt to open /dev/console, and if we succeed redirect
LSan's report there.

The result is a bit messy, as it's slightly interleaved with the kernel
panic, but it's definitely better than not having the stack trace at
all:

[  OK  ] Reached target final.target.
[  OK  ] Finished systemd-poweroff.service.
[  OK  ] Reached target poweroff.target.

=================================================================
3 1m  43.251782] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[   43.252838] CPU: 2 PID: 1 Comm: systemd Not tainted 6.4.12-200.fc38.x86_64 #1
==[1==ERR O R :4 3Le.a2k53562] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc38 04/01/2014
[   43.254683] Call Trace:
[   43.254911]  <TASK>
[   43.255107]  dump_stack_lvl+0x47/0x60
S[ a  43.n2555i05]  panic+t0x192/0x350
izer[   :43.255966 ]  do_exit+0x990/0xdb10
etec[   43.256504]  do_group_exit+0x31/0x80
[   43.256889]  __x64_sys_exit_group+0x18/0x20
[   43.257288]  do_syscall_64+0x60/0x90
o_user_mod leaks[   43.257618]  ? syscall_exit_t

+0x2b/0x40
[   43.258411]  ? do_syscall_64+0x6c/0x90
1mDirect le[   43.258755]  ak of 21 byte(s)? exc_page_fault+0x7f/0x180
[   43.259446]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
 [   43.259901] RiIP: 0033:0x7f357nb8f3ad4
 1 objec[   43.260354] Ctode: 48 89 (f7 0f 05 c3 sf3 0f 1e fa b8 3b 00 00 00) 0f 05 c3 0f 1f 4 0 00 f3 0f 1e fa 50 58 b8 e7 00 00 00 48 83 ec 08 48 63 ff 0f 051
[   43.262581] RSP: 002b:00007ffc25872440 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7
a RBX: 00007f357be9b218 RCX: 00007f357b8f3ad4m:ffd
[   43.264512] RDX: 0000000000000001 RSI: 00007f357b933b63 RDI: 0000000000000001
[   43.265355] RBP: 00007f357be9b218 R08: efffffffffffffff R09: 00007ffc258721ef
[   43.266191] R10: 000000000000003f R11: 0000000000000202 R12: 00000fe6ae9e0000
[   43.266891] R13: 00007f3574f00000 R14: 0000000000000000 R15: 0000000000000007
[   43.267517]  </TASK>

    #0 0x7f357b8814a8 in strdup (/lib64/libasan.so.8+0x814a8) (BuildId: e5f0a0d511a659fbc47bf41072869139cb2db47f)
    #1 0x7f3578d43317 in cg_path_decode_unit ../src/basic/cgroup-util.c:1132
    #2 0x7f3578d43936 in cg_path_get_unit ../src/basic/cgroup-util.c:1190
    #3 0x7f3578d440f6 in cg_pid_get_unit ../src/basic/cgroup-util.c:1234
    #4 0x7f35789263d7 in bus_log_caller ../src/shared/bus-util.c:734
    #5 0x7f357a9cf10a in method_reload ../src/core/dbus-manager.c:1621
    #6 0x7f3578f77497 in method_callbacks_run ../src/libsystemd/sd-bus/bus-objects.c:406
    #7 0x7f3578f80dd8 in object_find_and_run ../src/libsystemd/sd-bus/bus-objects.c:1319
    #8 0x7f3578f82487 in bus_process_object ../src/libsystemd/sd-bus/bus-objects.c:1439
    #9 0x7f3578fe41f1 in process_message ../src/libsystemd/sd-bus/sd-bus.c:3007
    #10 0x7f3578fe477b in process_running ../src/libsystemd/sd-bus/sd-bus.c:3049
    #11 0x7f3578fe75d1 in bus_process_internal ../src/libsystemd/sd-bus/sd-bus.c:3269
    #12 0x7f3578fe776e in sd_bus_process ../src/libsystemd/sd-bus/sd-bus.c:3296
    #13 0x7f3578feaedc in io_callback ../src/libsystemd/sd-bus/sd-bus.c:3638
    #14 0x7f35791c2f68 in source_dispatch ../src/libsystemd/sd-event/sd-event.c:4187
    #15 0x7f35791cc6f9 in sd_event_dispatch ../src/libsystemd/sd-event/sd-event.c:4808
    #16 0x7f35791cd830 in sd_event_run ../src/libsystemd/sd-event/sd-event.c:4869
    #17 0x7f357abcd572 in manager_loop ../src/core/manager.c:3244
    #18 0x41db21 in invoke_main_loop ../src/core/main.c:1960
    #19 0x426615 in main ../src/core/main.c:3125
    #20 0x7f3577c49b49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
    #21 0x7f3577c49c0a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
    #22 0x408494 in _start (/usr/lib/systemd/systemd+0x408494) (BuildId: fe61e1b0f00b6a36aa34e707a98c15c52f6b960a)

SUMMARY: AddressSanitizer: 21 byte(s) leaked in 1 allocation(s).
[   43.295912] Kernel Offset: 0x7000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[   43.297036] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]---

Originally noticed in https://github.com/systemd/systemd/pull/28579.

9 months agoMerge pull request #29197 from takaswie/topic/hwdb/ieee1394-unit-function
Yu Watanabe [Sun, 17 Sep 2023 05:23:38 +0000 (07:23 +0200)] 
Merge pull request #29197 from takaswie/topic/hwdb/ieee1394-unit-function

hwdb: ieee1394 unit function: fulfill Weiss Engieering FireWire models

9 months agohwdb: ieee1394-unit-function: add Weiss Engieering MAN301 29197/head
Takashi Sakamoto [Sun, 17 Sep 2023 02:52:28 +0000 (11:52 +0900)] 
hwdb: ieee1394-unit-function: add Weiss Engieering MAN301

Michele Perrone contributes configuration ROM image for Weiss MAN301, which
includes two units for 1394TA AV/C devices 1.0 and TCAT general protocol.

* https://lore.kernel.org/alsa-devel/20230822135807.GA470519@workstation.local/

This commit adds hwdb entry for the model.

9 months agohwdb: ieee1394-unit-function: add Weiss Engineering INT203 entry with older firmware
Takashi Sakamoto [Sun, 17 Sep 2023 02:52:28 +0000 (11:52 +0900)] 
hwdb: ieee1394-unit-function: add Weiss Engineering INT203 entry with older firmware

Michele Perrone reported that the model ID for INT203 with initial firmware
is 0x00000a.

* https://lore.kernel.org/alsa-devel/a5b63c37-7f6f-46f3-a87f-e4e7c0c9b5c8@weiss.ch/

This commit fulfills the entry corresponding to it as well as supplemental
comment denoting to it.

9 months agohwdb: ieee1394-unit-function: add Weiss Engineering DAC202 (Maya edition)
Takashi Sakamoto [Sun, 17 Sep 2023 02:52:28 +0000 (11:52 +0900)] 
hwdb: ieee1394-unit-function: add Weiss Engineering DAC202 (Maya edition)

Michele Perrone and Ralf Anderegg contribute to ALSA dice driver to support
products of Weiss Engineering. Their patch includes support for DAC202 Maya
edition.

* https://lore.kernel.org/alsa-devel/24703333-9250-40bf-e736-a5f3c4862034@weiss.ch/

This commit fulfulls an entry for the model as well as supplemental comment
to DAC2/Minerva.

9 months agohwdb: ieee1394-unit-function: remove superfluous Weiss Engineering DAC1 entry
Takashi Sakamoto [Sun, 17 Sep 2023 02:52:28 +0000 (11:52 +0900)] 
hwdb: ieee1394-unit-function: remove superfluous Weiss Engineering DAC1 entry

Michele Perrone and Rolf Anderegg reported that their product with
model_id 0x000005 was experimental for internal use and never for
consumer market.

* https://lore.kernel.org/alsa-devel/a5b63c37-7f6f-46f3-a87f-e4e7c0c9b5c8@weiss.ch/

This commit deletes corresponding entry.

9 months agohwdb: Add Logitech G502 X
Michael Kuhn [Sat, 16 Sep 2023 17:54:48 +0000 (19:54 +0200)] 
hwdb: Add Logitech G502 X

The already existing entry refers to the Logitech G502 X LIGHTSPEED,
rename it accordingly.

DPI and frequency were taken from Logitech G HUB and
https://www.logitech.com/assets/66240/2/g502-x-corded-gaming-mice-artanis.pdf

9 months agodoc: Scope is automatic for IPv6 address
Tj [Fri, 15 Sep 2023 08:20:04 +0000 (09:20 +0100)] 
doc: Scope is automatic for IPv6 address

The kernel automatically sets the scope of IPv6 addresses. That is
0 (global), 254 (host), 253 (link).

9 months agoMerge pull request #29184 from keszybz/more-pager
Mike Yuan [Fri, 15 Sep 2023 11:53:58 +0000 (19:53 +0800)] 
Merge pull request #29184 from keszybz/more-pager

Use the pager in more places

9 months agoman/daemon: recommend status notications, mention fd store
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2023 07:16:26 +0000 (09:16 +0200)] 
man/daemon: recommend status notications, mention fd store

This is just a small update. We probably should write a much longer document
that describes how to write a daemon in the XXI century.

9 months agoman/sd_notify: change recommendations about unsupported notifications
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2023 06:58:46 +0000 (08:58 +0200)] 
man/sd_notify: change recommendations about unsupported notifications

In principle, arbitrary notifications may be sent via sd_notify. But in
practice, this is not useful at all, since the manager only accepts
notifications from services and ignores anything except a few specific
ones. The others will be logged if debugging is enabled. OTOH, the manager
produces EXIT_STATUS, but nothing in systemd looks at it, which is rather
confusing.

So remove the recommendation to use X_ prefixes, and instead say that other
messages will be ignored. Also, mention that mkosi uses this. Having an example
may be useful to understand what is going on.

Strangely, this is the first reference to mkosi in our man pages. Even more
strangely, debian is the only place which hosts the mkosi man page (among
the sites we have definitions for), so I linked to that version.

9 months agoman: make the description of fd storage a bit more accessible
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2023 06:38:28 +0000 (08:38 +0200)] 
man: make the description of fd storage a bit more accessible

The text is split into paragraphs about specific topics. The advice
and recommendations parts are moved to the end.

9 months agoman/sd_notify: split out variable descriptions to a separate section
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2023 06:10:13 +0000 (08:10 +0200)] 
man/sd_notify: split out variable descriptions to a separate section

This just moves the text around with miminal text added to refer to the new
section.

9 months agoman/kernel-install: add more paragraph breaks, fix indentation
Zbigniew Jędrzejewski-Szmek [Thu, 7 Sep 2023 10:29:38 +0000 (12:29 +0200)] 
man/kernel-install: add more paragraph breaks, fix indentation

9 months agoman: add versioned version of --no-pager, use for systemd-path 29184/head
Zbigniew Jędrzejewski-Szmek [Thu, 14 Sep 2023 20:28:23 +0000 (22:28 +0200)] 
man: add versioned version of --no-pager, use for systemd-path

9 months agopath: add --no-pager option, enable pager by default
Zbigniew Jędrzejewski-Szmek [Thu, 14 Sep 2023 20:30:14 +0000 (22:30 +0200)] 
path: add --no-pager option, enable pager by default

When called with no argument, to list all known values, it is likely that it's
used by somebody to look at all the whole list. The output is more than a page,
so let's enable the pager.

9 months agopath: rename functions
Zbigniew Jędrzejewski-Szmek [Thu, 14 Sep 2023 10:45:43 +0000 (12:45 +0200)] 
path: rename functions

When this was originally added in 9a00f57a5ba7ed431e6bac8d8b36518708503b4e,
the lookup function was called sd_path_home. But it was generalized a long time
ago.

9 months agopath: modernize, return first error
Zbigniew Jędrzejewski-Szmek [Thu, 14 Sep 2023 10:42:50 +0000 (12:42 +0200)] 
path: modernize, return first error

9 months agobootctl: use pager in help
Zbigniew Jędrzejewski-Szmek [Tue, 12 Sep 2023 14:45:22 +0000 (16:45 +0200)] 
bootctl: use pager in help

The output is more than one page, let's enable the pager.

9 months agoexport: use highlighting in --help
Zbigniew Jędrzejewski-Szmek [Tue, 12 Sep 2023 14:44:52 +0000 (16:44 +0200)] 
export: use highlighting in --help

9 months agoRevert "mkosi: pin CentOS9 kernel to working version"
Frantisek Sumsal [Wed, 6 Sep 2023 19:20:01 +0000 (21:20 +0200)] 
Revert "mkosi: pin CentOS9 kernel to working version"

The original issue should be fixed in kernel-5.14.0-362.el9.

This reverts commit b0881b65a69e83decab3df0d2b23206cea59bb1b.

9 months agopo: Translated using Weblate (Russian)
Sergey A [Tue, 12 Sep 2023 14:35:50 +0000 (16:35 +0200)] 
po: Translated using Weblate (Russian)

Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Sergey A <sw@atrus.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ru/
Translation: systemd/main

9 months agoMerge pull request #29156 from bluca/signal_dump_jobs
Luca Boccassi [Mon, 11 Sep 2023 19:41:09 +0000 (20:41 +0100)] 
Merge pull request #29156 from bluca/signal_dump_jobs

core: dump jobs list on sigrtmin+18 with 0x500

9 months agoserialize: don#t allocate 1M on the stack just like that
Lennart Poettering [Mon, 11 Sep 2023 10:21:14 +0000 (12:21 +0200)] 
serialize: don#t allocate 1M on the stack just like that

Prompted by: https://github.com/systemd/systemd/pull/27890#issuecomment-1712841117

9 months agologind: add PrepareForShutdownWithMetadata signal
Luca Boccassi [Wed, 30 Aug 2023 18:51:13 +0000 (19:51 +0100)] 
logind: add PrepareForShutdownWithMetadata signal

The existing signal doesn't say which type of shutdown is going to happen.
With the introduction of soft-reboot, it is useful to have this information
broadcasted, so that clients can choose to do different things based on the
reboot type.
Add a{sv} as the payload so that more metadata can be added later if
needed, without needing to add yet another signal.
Send both old and new signal for backward compatibility, and send the new
one first so that clients can just wait for the first one on both old and
new systems.

9 months agocore: dump jobs list on sigrtmin+18 with 0x500 29156/head
Luca Boccassi [Sun, 10 Sep 2023 21:52:05 +0000 (22:52 +0100)] 
core: dump jobs list on sigrtmin+18 with 0x500

9 months agocore: use structured initialization in exec_context_init
Luca Boccassi [Fri, 1 Sep 2023 01:30:09 +0000 (02:30 +0100)] 
core: use structured initialization in exec_context_init

9 months agoMerge pull request #29130 from poettering/unit-defaults
Luca Boccassi [Sat, 9 Sep 2023 18:15:46 +0000 (19:15 +0100)] 
Merge pull request #29130 from poettering/unit-defaults

core: introduce UnitDefaults structure for unit defaults

9 months agoMerge pull request #29142 from poettering/pidref
Luca Boccassi [Sat, 9 Sep 2023 17:39:16 +0000 (18:39 +0100)] 
Merge pull request #29142 from poettering/pidref

core: first step towards a pidfd focused future

9 months agoMerge pull request #29143 from DaanDeMeyer/mkosi-presets
Luca Boccassi [Sat, 9 Sep 2023 15:38:29 +0000 (16:38 +0100)] 
Merge pull request #29143 from DaanDeMeyer/mkosi-presets

Various mkosi improvements