1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

67217 Commits

Author SHA1 Message Date
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
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
Daan De Meyer
076a16dee8 mkosi: Move to Fedora 39 2023-09-09 15:45:48 +02:00
Daan De Meyer
aa72f856a1 mkosi: Update to latest 2023-09-09 15:45:41 +02:00
Daan De Meyer
1adae328ed 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.
2023-09-09 14:35:00 +01:00
Mike Yuan
66e089af85
Merge pull request #29117 from Werkov/memory_available
Make MemoryAvailable= more useful
2023-09-09 20:52:05 +08:00
Lennart Poettering
a1f7cdc636 update TODO 2023-09-09 14:11:10 +02:00
Lennart Poettering
d8854ff1ac machined: port over to PidRef too 2023-09-09 14:11:03 +02:00
Lennart Poettering
89bad70f71 logind: also port session leader tracking over to PidRef 2023-09-09 14:10:58 +02:00
Lennart Poettering
894a30ef3f 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.
2023-09-09 14:10:54 +02:00
Lennart Poettering
436cdf0a07 core: also port swap units to PidRef 2023-09-09 14:10:41 +02:00
Lennart Poettering
360f384fd9 core: also port mount units to PidRef 2023-09-09 14:03:31 +02:00
Lennart Poettering
43a19142cb core: convert Socket logic to PidRef too
Just like the previous commit, but for socket rather than service units.
2023-09-09 14:03:31 +02:00
Lennart Poettering
c79ab77cd3 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.
2023-09-09 14:03:31 +02:00
Lennart Poettering
3bda3f17fa 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.)
2023-09-09 14:03:31 +02:00
Daan De Meyer
1e1441d796 mkosi: Allow configuring whether to do secure boot and pcrs from CLI 2023-09-09 10:42:07 +01:00
Michal Koutný
055665d596 dbus: Document org.freedesktop.systemd1.Service.MemoryAvailable property
The value is an optimistic estimate, make it clear in the docs.
2023-09-09 10:42:38 +02:00
Luca Boccassi
9aa642d4e9
Merge pull request #29127 from YHNdnzj/wall-followup
shared/wall: several cleanups
2023-09-09 01:30:51 +01:00
Luca Boccassi
2d17808200
Merge pull request #29116 from yuwata/network-sriov-debug
network/sr-iov: ignore EINVAL in reading dev_port sysfs attribute
2023-09-09 01:28:35 +01:00
Ronan Pigott
47f20650b7 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.
2023-09-09 01:28:07 +01:00
Lennart Poettering
7b9da3861a Revert "tree-wide: Mount file descriptors via /proc/<pid>/fd" 2023-09-08 22:13:09 +01:00
Lennart Poettering
0df7d52576 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
2023-09-08 20:59:44 +01:00
Mike Yuan
7af442cf63
TODO: switch the default wall implementation to sd-login 2023-09-09 03:24:52 +08:00
Mike Yuan
560f15fc8f
shared/wall: fall back to logind if utmpx database doesn't exist 2023-09-09 03:22:25 +08:00
Mike Yuan
056aff96b9
shared/wall: several cleanups
Follow-up for 53c0397b1d

* 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
2023-09-09 03:19:22 +08:00
Mike Yuan
8b2d219316
utmp-wtmp: remove unneeded include 2023-09-09 01:33:32 +08:00
Michal Koutný
8db929a1e2 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.
2023-09-08 19:07:12 +02:00
Michal Koutný
727cea7652 cgroup: Refactor MemoryAvailable= evaluation
unit_get_memory_available() duplicates similar logic contained in
unit_get_memory_current(). Instead, it can call it for each unit it
needs data for.
Additionally, simplify the flow by treating all units from leaf to root
uniformly in one loop.

Functional change when a queried unit does not have MemoryAccounting=yes
(or cgroup_path), we will try getting an estimate from ancestors.
2023-09-08 19:07:12 +02:00
Michal Koutný
3565c709f5 cgroup: Fix MemoryAvailable= by considering physical memory
Currently, querying a unit's available memory would result in infinity
if there are no limits set on the unit or ancestors.
That undermines semantics implied by the name, so look at the physical
memory if the search propagates up to the -.slice.
This makes sense even in systemd user instances, limits of -.slice are
still looked at too.

Also change printed representation of infinite MemoryAvailable which
means we could not figure out a good estimate.
2023-09-08 19:05:52 +02:00
Mike Yuan
93f1da4556 conf-parser: parse main config first only if not symlinked to/as drop-in
Otherwise we'll skip parsing main config directly.

Replaces #27152
Replaces #28956:
chase() is an overkill for determining whether
two files are the same. We only need to check
if the inodes are the same.
2023-09-08 16:25:12 +02:00
Mike Yuan
fc159b2fd9 repart,bootspec: use set_ensure_consume 2023-09-08 16:25:12 +02:00