1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

67401 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
7ab1a1be1c 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.
2023-09-18 14:44:32 +02:00
Zbigniew Jędrzejewski-Szmek
1a71ac07ad meson: restore tools/meson-vcs-tag.sh
This conceptually reverts e95acdfe1d,
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
2023-09-18 14:37:09 +02:00
Luca Boccassi
ba4d7e8029 meson: fix TODO regarding next meson version 2023-09-18 12:34:14 +01:00
Frantisek Sumsal
e69056d620 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.
2023-09-18 13:11:45 +02:00
Frantisek Sumsal
7b19bd60cf core: limit the LSan shenanigans to PID 1
Addresses https://github.com/systemd/systemd/pull/29194#pullrequestreview-1630530753.
Follow-up to ae5ce7e.
2023-09-18 13:11:45 +02:00
Luca Boccassi
94dd2a1248
Merge pull request #29204 from poettering/pe-section-fix
man: systemd-stub fixes
2023-09-18 11:47:29 +01:00
Lennart Poettering
e75386bd84 man: fix counting of resource types 2023-09-18 11:19:26 +02:00
Lennart Poettering
652d2bfb61 man: link UKI spec from sd-stub 2023-09-18 11:19:17 +02:00
Lennart Poettering
ef3e110a07 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 b6f2e68602, among other things
2023-09-18 11:13:08 +02:00
commondservice
bcf3acea75
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.
2023-09-18 17:38:56 +09:00
Lennart Poettering
8f533730f4 update TODO 2023-09-18 09:59:12 +02:00
Yu Watanabe
d5adff70c0 test-network: add test for multiple IPv6 null addresses
This also merges test_address_null() into test_address_static().
2023-09-18 10:22:08 +09:00
Yu Watanabe
6174dc7d96 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.
2023-09-18 10:22:08 +09:00
Yu Watanabe
381e3cc68b network: rename address_prefix() -> address_ipv4_prefix()
This also makes the function use in4_addr_is_set() and in4_addr_mask()
for readability.
2023-09-18 10:19:51 +09:00
Yu Watanabe
52af8e5ef9 network: drop _fallthrough_ in address_{hash,compare}_func()
No functional change, just refactoring and preparation for later commit.
2023-09-18 10:16:53 +09:00
Luca Boccassi
413ef50af3 meson: add TODO to switch to new 'follow_symlinks' option in the future
Newly added and will be in the next release of Meson
2023-09-17 22:20:52 +02:00
Frantisek Sumsal
c7027516b7 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 3bf7d79637.
2023-09-17 22:18:49 +02:00
Luca Boccassi
23bef849d9
Merge pull request #29119 from yuwata/network-dhcp-server-allow-null-server-address
network/dhcp-server: allow null server address
2023-09-17 12:36:33 +01:00
Frantisek Sumsal
ae5ce7e319 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.
2023-09-17 07:25:05 +02:00
Yu Watanabe
345ed22ef9
Merge pull request #29197 from takaswie/topic/hwdb/ieee1394-unit-function
hwdb: ieee1394 unit function: fulfill Weiss Engieering FireWire models
2023-09-17 07:23:38 +02:00
Takashi Sakamoto
56f62f6f5a 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.
2023-09-17 11:52:28 +09:00
Takashi Sakamoto
618edc0f56 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.
2023-09-17 11:52:28 +09:00
Takashi Sakamoto
042cfb8960 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.
2023-09-17 11:52:28 +09:00
Takashi Sakamoto
7760d8de3d 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.
2023-09-17 11:52:28 +09:00
Michael Kuhn
4eebc002b0 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
2023-09-16 21:52:52 +02:00
Tj
ecac48783c doc: Scope is automatic for IPv6 address
The kernel automatically sets the scope of IPv6 addresses. That is
0 (global), 254 (host), 253 (link).
2023-09-15 16:12:11 +02:00
Mike Yuan
165947382b
Merge pull request #29184 from keszybz/more-pager
Use the pager in more places
2023-09-15 19:53:58 +08:00
Zbigniew Jędrzejewski-Szmek
d73f8ff95f 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.
2023-09-15 09:16:26 +02:00
Zbigniew Jędrzejewski-Szmek
bb8a3296e8 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.
2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
67da7e9a4f 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.
2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
ef86486acf 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.
2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
4454ca1057 man/kernel-install: add more paragraph breaks, fix indentation 2023-09-15 09:00:23 +02:00
Zbigniew Jędrzejewski-Szmek
87cc99332e man: add versioned version of --no-pager, use for systemd-path 2023-09-14 22:33:26 +02:00
Zbigniew Jędrzejewski-Szmek
e441d1d46e 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.
2023-09-14 22:33:18 +02:00
Zbigniew Jędrzejewski-Szmek
c19c5aa5b3 path: rename functions
When this was originally added in 9a00f57a5b,
the lookup function was called sd_path_home. But it was generalized a long time
ago.
2023-09-14 22:32:20 +02:00
Zbigniew Jędrzejewski-Szmek
1535b52f1a path: modernize, return first error 2023-09-14 22:32:20 +02:00
Zbigniew Jędrzejewski-Szmek
eb98074b5c bootctl: use pager in help
The output is more than one page, let's enable the pager.
2023-09-14 22:32:20 +02:00
Zbigniew Jędrzejewski-Szmek
4f9791a36c export: use highlighting in --help 2023-09-14 22:32:20 +02:00
Frantisek Sumsal
5898cef22a Revert "mkosi: pin CentOS9 kernel to working version"
The original issue should be fixed in kernel-5.14.0-362.el9.

This reverts commit b0881b65a6.
2023-09-13 23:22:52 +02:00
Sergey A
aab9e4b2b8 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
2023-09-13 00:32:12 +08:00
Luca Boccassi
93f42f034c
Merge pull request #29156 from bluca/signal_dump_jobs
core: dump jobs list on sigrtmin+18 with 0x500
2023-09-11 20:41:09 +01:00
Lennart Poettering
f96a32c7f0 serialize: don#t allocate 1M on the stack just like that
Prompted by: https://github.com/systemd/systemd/pull/27890#issuecomment-1712841117
2023-09-11 20:40:35 +01:00
Luca Boccassi
e4aab5cf1a 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.
2023-09-11 12:56:00 +01:00
Luca Boccassi
0112c37ce4 core: dump jobs list on sigrtmin+18 with 0x500 2023-09-11 12:24:23 +01:00
Luca Boccassi
0213162743 core: use structured initialization in exec_context_init 2023-09-10 22:57:19 +01:00
Luca Boccassi
fd0a804271
Merge pull request #29130 from poettering/unit-defaults
core: introduce UnitDefaults structure for unit defaults
2023-09-09 19:15:46 +01:00
Luca Boccassi
5cd4613f52
Merge pull request #29142 from poettering/pidref
core: first step towards a pidfd focused future
2023-09-09 18:39:16 +01:00
Luca Boccassi
3cdf7861a0
Merge pull request #29143 from DaanDeMeyer/mkosi-presets
Various mkosi improvements
2023-09-09 16:38:29 +01:00
Daan De Meyer
bcc911a7d7 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.
2023-09-09 15:53:26 +02:00
Daan De Meyer
a940484ee5 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.
2023-09-09 15:45:49 +02:00