Commit Graph

62961 Commits

Author SHA1 Message Date
Dmitry V. Levin
ba1ca5ef26 CODING_STYLE: note that 'unsigned' form is preferred over 'unsigned int' 2023-03-08 21:17:23 +00:00
Luca Boccassi
79fb1d4e7e Merge pull request #26711 from keszybz/man-page-stuff
Man page tweaks
2023-03-08 20:29:18 +00:00
Luca Boccassi
82c63b0731 Merge pull request #26716 from mrc0mmand/more-tests
test: add a couple of tests for systemd-escape and systemd-id128
2023-03-08 18:55:40 +00:00
Zbigniew Jędrzejewski-Szmek
ad078f59fa Merge pull request #26678 from yuwata/foreach_array
macro: introduce FOREACH_ARRAY() macro
2023-03-08 19:06:20 +01:00
Luca Boccassi
af2fb2f250 core: log message when reloading finishes
Reloading might be slow, especially when under memory pressure, and watchdogs
might be triggered. It is useful to have timestamped telemetry in the journal
to see how long a reload takes.
2023-03-08 18:41:07 +01:00
Frantisek Sumsal
bb076d77f4 test: add a couple of tests for systemd-id128 2023-03-08 16:28:37 +01:00
Frantisek Sumsal
c38cad7aea test: add a couple of tests for systemd-escape 2023-03-08 16:28:37 +01:00
Frantisek Sumsal
8fc58b35ea random-seed: drop extraneous "we" 2023-03-08 16:28:37 +01:00
Yu Watanabe
0744ed0f26 Merge pull request #26713 from keszybz/man-getenv
Add note to docs that setenv() cannot be called in parallel with getenv()
2023-03-09 00:16:30 +09:00
Zbigniew Jędrzejewski-Szmek
d329bae3e6 man: use more references 2023-03-08 15:32:59 +01:00
Zbigniew Jędrzejewski-Szmek
8c51e1520b man: add mention that libsystemd uses getenv()
See #26688: getenv() is not thread-safe, and could a possible source of
problems when a multi-threaded program calls setenv()/putenv()/unsetenv() in
parallel. It is not possible to avoid getenv() calls in general, since $PATH,
$LANG, $SHELL, $USER, $HOME, $TZ may need to be accessed at any time.
Add a warning to our docs so that people are aware of the issue.

Closes #26688. (Real fixes will need to be in glibc and gnome-shell or other
programs.)

The text is added to threads-aware.xml to be included in various places. By
including it in libsystemd-pkgconfig.xml, it is automatically added to all sd-*
pages. The text is also included explicitly in pages for a few other functions
which are call getenv().
2023-03-08 15:32:59 +01:00
Chitoku
0f9c8d0291 timesync: stop re-sync on network configuration change when no link servers are configured (#26708)
This commit fixes an issue where systemd-timesyncd re-synchronizes the
system clock every time the network configuration is updated, no matter
whether link servers are actually changed.

Fixes a bug introduced by e05dd7718d.
2023-03-08 19:52:55 +09:00
Zbigniew Jędrzejewski-Szmek
82c2095a5e localed: skip verification when libxkbcommon is not installed
When compliled without libxkbcommon, we do no verification and accept the
arguments as given. When compliled against with, if dlopen() works, we do the
verification. But if dlopen() fails, we would refuse the call and return
SD_BUS_ERROR_INVALID_ARGS. 5de344704d added things
this way when converting to dlopen(), but it seems not very useful: it can be
expected that when the library is supported but missing at runtime, we degrade
softly, and that the behaviour is something inbetween the cases of hard disable
at compilation time and full support. But right now we behave more strictly then
if disabled at compilation. Change the code to just warn if dlopen fails, but
accept the arguments.

(There are various minimization scenarios where forcing the installation of
libxkbcommon is not useful. E.g. a small installation where we want to set the
keymap via logind, but the configuration is managed by a configuration
management system and is known to be valid. Verification via libxkbcommon is
just overhead in this case.)

800f65f827 moved the check earlier, so now even
a noop case of setting the values that were already in place can fail.
C.f. https://bugzilla.redhat.com/show_bug.cgi?id=2175244.
2023-03-08 19:44:12 +09:00
Zbigniew Jędrzejewski-Szmek
81707069fc Merge pull request #26685 from yuwata/man-missing-services
man: mention two missing services
2023-03-08 09:35:03 +01:00
Frantisek Sumsal
16600a8661 test: add a couple of tests for busctl 2023-03-08 12:53:44 +09:00
Luca Boccassi
e079120505 Merge pull request #26706 from jengelh/master
doc: various orthographic fixes
2023-03-07 21:34:03 +00:00
Luca Boccassi
ce0cac4c8e Merge pull request #26695 from poettering/dissect-mount-helper
make "systemd-dissect --mount" available as /sbin/mount.ddi
2023-03-07 20:07:17 +00:00
Zbigniew Jędrzejewski-Szmek
695e39dd63 man: adjust description of CPUAccounting=
For any user on a semi-recent kernel, effectively this setting is pointless.
We should deprecate it once not needed anymore for the v1 hierarchy. For
now, adjust the description.
2023-03-07 16:22:13 +01:00
Zbigniew Jędrzejewski-Szmek
dca031d229 man: add a note about session autogrouping
When cpu controller is disabled, thing would often still behave as if
it was. And since the cpu controller can be enabled "magically" e.g. by
starting user@1000, add a note for users to be careful. Autogrouping
is described well in the man page, incl. how to enable or disable it,
so it should be enough to refer to that.
2023-03-07 16:22:13 +01:00
Zbigniew Jędrzejewski-Szmek
396d298d6b man: tweak details in descriptions of pids and cpu configuration
For CPUWeight=: there is an important distinction between our default of
[not set], and the kernel default of "100". Let's not say that our default
is "100" because then 'systemctl show' output is hard to explain.

For task accounting, it's the kernel that does the accounting, not systemd.
2023-03-07 16:22:13 +01:00
Zbigniew Jędrzejewski-Szmek
253d0d591b man: describe how cgroup controllers are turned on
For a user, information which cgroup controllers are enabled based on
the unit configuration is rather important. Not only because it determines
what resource control is peformed by the kernel, but also because controllers
have a non-negligible cost, especially for deep nesting, and users may want
to *not* have controllers enabled.

Our documentation did its best to avoid the topic so far. This was partially
caused by the support for cgroup v1, which meant that any discussion of
controllers had to be conditional and messy. But v1 is deprecated on its way
out, so it should be fine to just describe what happens with v2.

The text is extended with a discussion of how controllers are enabled and
disabled, and an example, and for various settings that enable controllers
the relevant controller is now mentioned.
2023-03-07 16:22:13 +01:00
Zbigniew Jędrzejewski-Szmek
87291a26f5 man: explain route-only domains a bit more
The details discussion of how search and route-only domains work is in
systemd-resolved.service(8). But users are more likely to look at
resolved.conf(5), because that's where Domains= is described. So let's add a
reference to the other man page there, and also strengthen the text a bit. In
particular, in systemd-resolved.service(8) we say "route-only", which makes
the distinction with search domains clearer. Let's use the same in the other
man page too.

This is based on feedback from Lukáš Nykrýn that the man page is not clear
enough.
2023-03-07 16:22:13 +01:00
Daan De Meyer
1a87882635 Merge pull request #26709 from DaanDeMeyer/mkosi-drop-debug
mkosi: Various cleanups
2023-03-07 15:49:06 +01:00
Daan De Meyer
2f88bb9aee mkosi: Fix locations of mkosi-check-and-shutdown files 2023-03-07 15:25:19 +01:00
Daan De Meyer
925bb83ea5 mkosi: Drop debug logging
The spurious "connection timed out" errors from nspawn should be
fixed now that we're running the latest version.
2023-03-07 15:25:19 +01:00
Daan De Meyer
8d29e401ce mkosi: Drop kernel command line masking in CI
These services should be disabled by default and not need explicit
masking anymore.
2023-03-07 15:25:19 +01:00
Daan De Meyer
523d71076d mkosi: Update to latest
So that we don't enable services by default anymore on Debian.
2023-03-07 15:25:02 +01:00
Jan Engelhardt
18fe76eba5 doc: correct wrong use "'s" contractions 2023-03-07 13:39:31 +01:00
Jan Engelhardt
e6faa51a84 doc: replace wrong idiom in homed comment 2023-03-07 13:06:43 +01:00
Jan Engelhardt
3ff1721c21 doc: replace wrong á preposition by à 2023-03-07 13:06:43 +01:00
Luca Boccassi
0531ac585a Merge pull request #26648 from bluca/kernel_install_guid
kernel-install: also try to find $BOOT by partition GUID
2023-03-07 11:26:12 +00:00
Yu Watanabe
9d0d39ee53 conf-files: fix potential memleak in conf_files_list_strv_internal() on failure
This also changes the used hash_ops from path_hash_ops to
string_hash_ops, as the key is not a path, but a filename.
2023-03-07 18:43:34 +09:00
Yu Watanabe
9ecacf1eae systemctl: port FOREACH_ARRAY() to systemctl-list-units.c 2023-03-07 13:27:18 +09:00
Yu Watanabe
5716c27e1f macro: introduce FOREACH_ARRAY() macro
The pattern that runs all array element is quite common.
But, sometimes, the number of element may be in a signed integer, or the
array may be NULL.
2023-03-07 13:27:16 +09:00
Yu Watanabe
9200e520ad Merge pull request #26669 from YHNdnzj/journalctl-lines-since-until
journalctl: fix output when --lines is used with --since or --until
2023-03-07 12:02:47 +09:00
Joshua Goins
ebc03f5d7a udev: Don't mark as tablet if device has relative coordinates
Tablets don't typically have relative coordinates (they are separated on
the kernel device layer). However, some Logitech mice report similar
supported events, so use the existence of EV_REL to determiner whether or
not the device is really a tablet.

Fixes bug introduced by 0855ce6772.

Fixes: #26600
2023-03-07 09:42:11 +09:00
Lennart Poettering
92828ba603 man: document /sbin/mount.ddi 2023-03-06 23:00:52 +01:00
Lennart Poettering
4601243375 test: add test for new /sbin/mount.ddi helper 2023-03-06 22:54:52 +01:00
Lennart Poettering
a164d9d5aa dissect: implement external helper plugin interface for /bin/mount
With this change we'll install a symlink /sbin/mount.ddi →
systemd-dissect. If invoked that way we'll do the equivalent of
systemd-dissect --mount.

This makes DDIs mountable directly via the "mount" command, by
specifying the "-t ddi" pseudo file system type. Moreover you can now
mount DDIs directly via /etc/fstab, by specifying "ddi" in the file
system column (3rd column).
2023-03-06 22:52:20 +01:00
Luca Boccassi
df40b7ef5a Merge pull request #26686 from yuwata/iovec
tree-wide: replace IOVEC_INIT with IOVEC_MAKE
2023-03-06 21:00:04 +00:00
Josef Miegl
417283c5c3 network: geneve: add InheritInnerProtocol flag 2023-03-06 20:58:30 +00:00
Adrian Vovk
27e695840c base-filesystem: Support Arch-style multilib
On distros like Arch and on carbonOS, libraries end up in /usr/lib.
Thus, /lib64 should point to /usr/lib. This commit adds this
functionality as a final fallback (if neither Debian-style nor
Fedora-style multilib can be detected)
2023-03-06 20:53:43 +00:00
Luca Boccassi
db73b9d2ab Merge pull request #26502 from DaanDeMeyer/chase-symlinks-additions
Several chase_symlinks() additions
2023-03-06 20:51:06 +00:00
Luca Boccassi
52bdfbf7d7 Merge pull request #26687 from yuwata/c2x
C2X support
2023-03-06 20:50:17 +00:00
Yu Watanabe
84d0dc53ac time-util: drop redundant call of tzset()
It is also called at the beginning of `parse_timestamp_maybe_with_tz()`.
2023-03-06 20:39:37 +00:00
Adrian Vovk
d249c23211 gpt-auto: Check for /boot before putting ESP there
We prefer /efi as a mount point for the ESP, and use /boot as a fallback
if /efi doesn't exist. However, when root=tmpfs, neither /efi nor /boot
exist. gpt-auto should mount to /efi in this case, but it mounted to
/boot instead. This is because gpt-auto didn't check for the existence
of /boot. Here, we correct this
2023-03-06 20:37:57 +00:00
Daan De Meyer
9cc018fa93 mkosi: Update to latest
Latest version builds nspawn from source which hopefully gets rid of
the spurious "Connection timed out" errors we've been seeing in CI.
2023-03-06 19:30:40 +01:00
Lennart Poettering
c8170f9c39 TODO 2023-03-06 18:49:09 +01:00
Daan De Meyer
9a98c0f2b1 chase-symlinks: Add chase_symlinks_at_and_open() 2023-03-06 13:53:01 +01:00
Daan De Meyer
e864dfa671 chase-symlinks: Add CHASE_MKDIR_0755 2023-03-06 13:42:43 +01:00