]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agonetdev/wireguard: define iterator variable in the loop 29224/head
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2023 10:56:37 +0000 (12:56 +0200)] 
netdev/wireguard: define iterator variable in the loop

2 years agonetwork: make DEFINE_NETDEV_CAST() assert on input and output
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2023 10:52:26 +0000 (12:52 +0200)] 
network: make DEFINE_NETDEV_CAST() assert on input and output

The macro used to return NULL if input was NULL or had the wrong type. Now
it asserts that input is nonnull and it has the expected type.

There are a few places where a missing or mismatched type was OK, but in a
majority of places, we would do both of the asserts. In various places we'd
only do one, but that was by ommission/mistake. So moving the asserts into the
macro allows us to save some lines.

2 years agonetwork/netdev: align tables
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 22:14:29 +0000 (00:14 +0200)] 
network/netdev: align tables

2 years agonetwork/netdev: fix resetting of 'inherit' field
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 21:54:18 +0000 (23:54 +0200)] 
network/netdev: fix resetting of 'inherit' field

We have two fields: inherit and ttl, and ttl is ignored if inherit is true.
Setting TTL=inherit and later TTL=n would not work because we didn't unset
inherit.

2 years agonetwork: refusing parsing negative flow labels
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 18:42:43 +0000 (20:42 +0200)] 
network: refusing parsing negative flow labels

The docs for FlowLabel= said that the range is 0..1048575, but the code did not
reject negative numbers.

2 years agonetwork/fou-tunnel: simplify parsing of protocol number
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:48:07 +0000 (12:48 +0200)] 
network/fou-tunnel: simplify parsing of protocol number

Previously, we would call parse_ip_protocol(), which internally calls
safe_atoi(), and then call safe_atou(). This isn't terrible, but it's also
slightly confusing. Use parse_ip_protocol_full() to avoid the second call.

2 years agoshared/ip-procotol-list: generalize and rework parse_ip_protocol()
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:43:16 +0000 (12:43 +0200)] 
shared/ip-procotol-list: generalize and rework parse_ip_protocol()

Optionally, accept protocols that don't have a known name.
Avoid any allocations in the common case.
Return more granular error codes: -ERANGE for negative values,
-EOPNOTSUPP if the protocol is a valid number, but we don't know
the protocol, and -EINVAL only if it's not a numerical string.

2 years agonetwork/vxlan: avoid unneccesary temporary variables
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:13:56 +0000 (12:13 +0200)] 
network/vxlan: avoid unneccesary temporary variables

parse_ip_port_range() DTRT and only sets the output on success.

2 years agonetwork/netdev: use ASSERT_PTR() more, adjust indentation
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:11:34 +0000 (12:11 +0200)] 
network/netdev: use ASSERT_PTR() more, adjust indentation

2 years agonetwork: use a common helper to parse bounded ranges
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:06:19 +0000 (12:06 +0200)] 
network: use a common helper to parse bounded ranges

This compresses repetetive code and makes it easier to add new options
in networkd. The formatting of error messages becomes uniform. The
error message always specifies the rvalue literally, instead of using
a "descriptive name". This makes the message much easier to handle for
the user.

I opted to add just one parser, and wrap it with inline functions to proxy
the type. This is less verbose than copying functions for each type
separately, and the compiler should be able to get rid of the inline wrapper
almost entirely.

asserts are reordered to use the same order as the parameter list.
This makes the code easier to read.

No functional change intended, apart from the difference in error message
formatting.

2 years agobasic/parse-util: add helper to parse bounded unsigned values
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 08:08:12 +0000 (10:08 +0200)] 
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.

2 years agosd-network: modernize log error messages
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 07:56:04 +0000 (09:56 +0200)] 
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.

2 years 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)

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

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

2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

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

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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

2 years 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).

2 years 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

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years agomkosi: Conditionally use tools tree 29143/head
Daan De Meyer [Sat, 9 Sep 2023 10:20:26 +0000 (12:20 +0200)] 
mkosi: Conditionally use tools tree

If the systemd version on the host is too old and there's no local
build directory, use the default tools tree which will build an
image containing all the tooling required to build systemd and use
that to build the other presets.

2 years agomkosi: Only build system preset by default
Daan De Meyer [Sat, 9 Sep 2023 08:20:01 +0000 (10:20 +0200)] 
mkosi: Only build system preset by default

Let's not build all presets by default, but only the system preset.
Also, let's only make the system preset depend on the initrd preset
if we're building a bootable disk image. This means that if we build
the system image as a cpio, uki or directory, the initrd preset will
be skipped as it's not necessary, making the build a little faster.

2 years agomkosi: Move to Fedora 39
Daan De Meyer [Fri, 8 Sep 2023 20:04:28 +0000 (22:04 +0200)] 
mkosi: Move to Fedora 39

2 years agomkosi: Update to latest
Daan De Meyer [Sat, 9 Sep 2023 13:45:41 +0000 (15:45 +0200)] 
mkosi: Update to latest

2 years agomkosi: Make sure custom installkernel scripts are not used
Daan De Meyer [Sat, 9 Sep 2023 09:31:26 +0000 (11:31 +0200)] 
mkosi: Make sure custom installkernel scripts are not used

The kernel has this horrible build system feature where distros
can ship /sbin/installkernel and it'll automatically be used by
make install. Let's make sure that doesn't happen as on Debian this
script puts the kernel under the wrong name causing mkosi build
failures.

2 years agoMerge pull request #29117 from Werkov/memory_available
Mike Yuan [Sat, 9 Sep 2023 12:52:05 +0000 (20:52 +0800)] 
Merge pull request #29117 from Werkov/memory_available

Make MemoryAvailable= more useful

2 years agoupdate TODO 29142/head
Lennart Poettering [Sat, 9 Sep 2023 07:56:29 +0000 (09:56 +0200)] 
update TODO

2 years agomachined: port over to PidRef too
Lennart Poettering [Sat, 9 Sep 2023 10:57:46 +0000 (12:57 +0200)] 
machined: port over to PidRef too

2 years agologind: also port session leader tracking over to PidRef
Lennart Poettering [Sat, 9 Sep 2023 10:35:07 +0000 (12:35 +0200)] 
logind: also port session leader tracking over to PidRef

2 years agocore: don't manually destroy timer when we can't spawn a child
Lennart Poettering [Sat, 9 Sep 2023 10:09:53 +0000 (12:09 +0200)] 
core: don't manually destroy timer when we can't spawn a child

Let's stop manually destroying the timers when we fail to spawn a child.
We don't do this in any of the similar codepaths in any of the unit
types, only in two specific ones in socket/swap. Destroying the timer is
unnecessary, since this is done anyway in the _set_state() call of each
unit type if not appropriate, and every failure path here runs through
that anyway.

This brings all these similar codepaths into sync.

2 years agocore: also port swap units to PidRef
Lennart Poettering [Sat, 9 Sep 2023 09:57:39 +0000 (11:57 +0200)] 
core: also port swap units to PidRef

2 years agocore: also port mount units to PidRef
Lennart Poettering [Sat, 9 Sep 2023 09:52:14 +0000 (11:52 +0200)] 
core: also port mount units to PidRef

2 years agocore: convert Socket logic to PidRef too
Lennart Poettering [Sat, 9 Sep 2023 07:55:50 +0000 (09:55 +0200)] 
core: convert Socket logic to PidRef too

Just like the previous commit, but for socket rather than service units.

2 years agocore: reference main/control pid of .service units via PidRef
Lennart Poettering [Sat, 9 Sep 2023 07:49:22 +0000 (09:49 +0200)] 
core: reference main/control pid of .service units via PidRef

The first conversion to PidRef. It's mostly an excercise of
search/replace, but with some special care taken for life-cycle (i.e. we
need to destroy the structure properly once done, to release the pidfd).

It also uses pidfd based killing for some of the killing but leaves most
as it is to make the conversion minimal.

2 years agopidref: add structure that can reference a pid via both pidfd and pid_t
Lennart Poettering [Sat, 9 Sep 2023 07:29:27 +0000 (09:29 +0200)] 
pidref: add structure that can reference a pid via both pidfd and pid_t

Let's start with the conversion of PID 1 to pidfds. Let's add a simple
structure with just two fields that can be used to maintain a reference
to arbitrary processes via both pid_t and pidfd.

This is an embeddable struct, to keep it in line with where we
previously used a pid_t directly to track a process.

Of course, since this might contain an fd on systems where we have pidfd
this structure has a proper lifecycle.

(Note that this is quite different from sd_event_add_child() event
source objects as that one is only for child processes and collects
process results, while this infra is much simpler and more generic and
can be used to reference any process, anywhere in the tree.)

2 years agomkosi: Allow configuring whether to do secure boot and pcrs from CLI
Daan De Meyer [Sat, 9 Sep 2023 08:15:46 +0000 (10:15 +0200)] 
mkosi: Allow configuring whether to do secure boot and pcrs from CLI

2 years agodbus: Document org.freedesktop.systemd1.Service.MemoryAvailable property 29117/head
Michal Koutný [Thu, 7 Sep 2023 18:00:28 +0000 (20:00 +0200)] 
dbus: Document org.freedesktop.systemd1.Service.MemoryAvailable property

The value is an optimistic estimate, make it clear in the docs.

2 years agoMerge pull request #29127 from YHNdnzj/wall-followup
Luca Boccassi [Sat, 9 Sep 2023 00:30:51 +0000 (01:30 +0100)] 
Merge pull request #29127 from YHNdnzj/wall-followup

shared/wall: several cleanups

2 years agoMerge pull request #29116 from yuwata/network-sriov-debug
Luca Boccassi [Sat, 9 Sep 2023 00:28:35 +0000 (01:28 +0100)] 
Merge pull request #29116 from yuwata/network-sriov-debug

network/sr-iov: ignore EINVAL in reading dev_port sysfs attribute

2 years agozsh: busctl: fix flags parsing for properties
Ronan Pigott [Fri, 8 Sep 2023 22:27:39 +0000 (15:27 -0700)] 
zsh: busctl: fix flags parsing for properties

I'm not quite sure what the original intent of this line was, but it
doesn't work in the one call-site the "required" argument is actually
used. The "writable" flag was indexed as a scalar leaving only the
"e" to compare against.

Instead, let's just sort the parsed flags and compare the whole thing.
Also substitute "required" as a pattern, so that pattern based
comparisons may be supported.

2 years agoRevert "tree-wide: Mount file descriptors via /proc/<pid>/fd"
Lennart Poettering [Fri, 8 Sep 2023 19:28:26 +0000 (21:28 +0200)] 
Revert "tree-wide: Mount file descriptors via /proc/<pid>/fd"

2 years agoserialize: add common deserialize_read_line() helper and use it everywhere
Lennart Poettering [Fri, 8 Sep 2023 15:02:11 +0000 (17:02 +0200)] 
serialize: add common deserialize_read_line() helper and use it everywhere

This introduces a common helper replacing three very similar uses.

Prompted by review of: #27890

2 years agoTODO: switch the default wall implementation to sd-login 29127/head
Mike Yuan [Fri, 8 Sep 2023 11:50:02 +0000 (19:50 +0800)] 
TODO: switch the default wall implementation to sd-login

2 years agoshared/wall: fall back to logind if utmpx database doesn't exist
Mike Yuan [Fri, 8 Sep 2023 18:01:57 +0000 (02:01 +0800)] 
shared/wall: fall back to logind if utmpx database doesn't exist

2 years agoshared/wall: several cleanups
Mike Yuan [Fri, 8 Sep 2023 11:16:46 +0000 (19:16 +0800)] 
shared/wall: several cleanups

Follow-up for 53c0397b1dbc95f144d9a551c2086d132933e8ce

* Split do_wall into wall_utmp and wall_logind
* Don't pass unused arguments
* Add missing asserts
* Modernize error handling
* Don't do anything if neither utmp nor logind is enabled

2 years agoutmp-wtmp: remove unneeded include
Mike Yuan [Fri, 8 Sep 2023 10:44:44 +0000 (18:44 +0800)] 
utmp-wtmp: remove unneeded include

2 years agocgroup: Estimate MemoryAvailable= when DefaultMemoryAccounting=no
Michal Koutný [Thu, 7 Sep 2023 17:48:48 +0000 (19:48 +0200)] 
cgroup: Estimate MemoryAvailable= when DefaultMemoryAccounting=no

Without memory accounting explicitly disabled, we may not obtain current
consumption from all units on the ancestry path.
Use a descendant value as lower bound estimate for ancestors if
ancestor's consumption cannot be directly queried.

This makes MemoryAvailable= an upper bound of available values.