Lennart Poettering [Tue, 7 Mar 2023 21:50:02 +0000 (22:50 +0100)]
fd-util: move ACQUIRE_NO_XYZ flags to the header the function using them is in
Follow-up for:
b25a930f0e2ebe77bc8b0f0acfac8a3b27ef1f0a
Lennart Poettering [Thu, 9 Mar 2023 11:34:23 +0000 (12:34 +0100)]
mempress: change default PSI window duration to 2s
This changes the PSI window duration we default to for watching memory
pressure events from 1s to 2s. This is because apparently the kernel
will soon disallow window durations other than 2s for unprivileged
processes.
Hence, we'll bump the threshold from 100m to 200ms, and the window from
1s to 2s.
Jeidnx [Thu, 9 Mar 2023 13:43:39 +0000 (14:43 +0100)]
man: fix typo in ukify page
Zbigniew Jędrzejewski-Szmek [Thu, 9 Mar 2023 08:27:31 +0000 (09:27 +0100)]
manager: in dump, show controllers in "Delegate:"
After Delegate= was converted from boolean to a controller list, the dump
output was changed to have a separate line about the delegated controllers:
...
DevicePolicy: auto
DisableControllers:
Delegate: yes
ManagedOOMSwap: auto
ManagedOOMMemoryPressure: auto
ManagedOOMMemoryPressureLimit: 0.00%
ManagedOOMPreference: none
DelegateControllers: cpu memory pids
...
The line with "Delegate:" is redundant, it effectively shows if
"DelegateControllers:" is non-empty. It is nicer to keep the lines
about controllers adjacent. And to avoid duplicate output, Delegate:
will now show which controllers are enabled. This makes the output
for that line again match the configuration stanza Delegate=:
DisableControllers:
Delegate: cpu io memory pids
ManagedOOMSwap: auto
ManagedOOMMemoryPressure: auto
ManagedOOMMemoryPressureLimit: 0.00%
ManagedOOMPreference: none
MemoryPressureWatch: auto
MemoryPressureThresholdSec: 100ms
Dump output is for debugging, we don't need to maintain strict
backwards-compat.
Mike Yuan [Thu, 9 Mar 2023 08:51:24 +0000 (16:51 +0800)]
journalctl: fix when --since, --until and --lines are used altogether
This is a follow-up for #26669 (
81fb5375b3b3bfc22d023d7908ad9eee4b3c1ffb).
After the mentioned commit, we stopped checking if the
entry is within the range of --until if --lines is used.
However, when --since, --until and --lines=N are used
altogether, and the number of lines between --since
and --until is smaller than N, we would seek to --since
later (
f58269510727964cb5c10e7d2f9849c442ea1f80).
This breaks the assumption that if --lines is set,
the boundary is never exceeded because the counter of
outputs gets us covered.
Zbigniew Jędrzejewski-Szmek [Thu, 9 Mar 2023 10:04:20 +0000 (11:04 +0100)]
tests: merge test-tmpfiles.c into test-tmpfile-util.c
The former was added in
65b3903ff576488eaabb51d3c4fbf9c73d867d7c,
but the name is confusing: the test has nothing to do with systemd-tmpfiles.
It had one function that mostly tested functions from tmpfile-util.c, so
just move it into the latter.
Zbigniew Jędrzejewski-Szmek [Thu, 9 Mar 2023 07:51:31 +0000 (08:51 +0100)]
Merge pull request #26038 from lilyinstarlight/fix/fstab-generator-sysroot-without-cmdline
fstab-generator: use correct targets when /sysroot is specificied in fstab only
Yu Watanabe [Thu, 9 Mar 2023 04:14:12 +0000 (13:14 +0900)]
macro: support the case that the number of elements has const qualifier
Follow-up for
5716c27e1f52d2aba9dd02916c01d6271d9d0b16.
Addresses https://github.com/systemd/systemd/pull/26303#issuecomment-
1460712007.
Yu Watanabe [Thu, 9 Mar 2023 04:05:57 +0000 (13:05 +0900)]
Merge pull request #26698 from ldv-alt/udevadm-verify
Implement a udev rules syntax checker in the form of
`udevadm verify [OPTIONS] FILE...` command that is based on
`udev_rules_parse_file` interface and would apply further checks
on top of it in the future.
Resolves: #26606
Zbigniew Jędrzejewski-Szmek [Wed, 8 Mar 2023 17:59:14 +0000 (18:59 +0100)]
localed: print a custom message if libxkbcommon.so is unvailable
Follow-up for
82c2095a5e407bcf041dc7bde84791deec95ff9c.
> I feel like the logging here may be a bit confusing on the new path.
> Previously you did get a message that explained what was going on. Now you get
> an info message that the layout could not be compiled, and … that's all. I can
> imagine this being a confusing red herring if someone was trying to debug a
> problem and saw this message. Perhaps we should log something else instead/as
> well, on the case where libxkbcommon isn't present, to say that's what we're
> logging about and it just means we can't validate the configuration, not that
> it's definitely invalid?
Luca Boccassi [Wed, 8 Mar 2023 21:25:25 +0000 (21:25 +0000)]
Merge pull request #26119 from kraxel/uki.install
kernel-install: improve uki handling
Luca Boccassi [Wed, 8 Mar 2023 21:23:07 +0000 (21:23 +0000)]
Merge pull request #26656 from yuwata/mkdir-error-code
mkdir: fix error code
Dmitry V. Levin [Wed, 8 Mar 2023 20:00:00 +0000 (20:00 +0000)]
CODING_STYLE: note that 'unsigned' form is preferred over 'unsigned int'
Luca Boccassi [Wed, 8 Mar 2023 20:29:18 +0000 (20:29 +0000)]
Merge pull request #26711 from keszybz/man-page-stuff
Man page tweaks
Dmitry V. Levin [Wed, 8 Mar 2023 08:00:00 +0000 (08:00 +0000)]
udev_rules_parse_file: issue diagnostics about line continuation at EOF
When udev rules file ends with a line continuation, the parser
used to silently ignore the line without any diagnostics at all.
It's time to break the vow of silence and let the parser issue some
error diagnostics.
Luca Boccassi [Wed, 8 Mar 2023 18:55:40 +0000 (18:55 +0000)]
Merge pull request #26716 from mrc0mmand/more-tests
test: add a couple of tests for systemd-escape and systemd-id128
Dmitry V. Levin [Mon, 6 Mar 2023 08:00:00 +0000 (08:00 +0000)]
test: check udevadm verify diagnostics of unused labels
Dmitry V. Levin [Sun, 5 Mar 2023 08:00:00 +0000 (08:00 +0000)]
udevadm-verify: check for unused labels
Check for unused labels in the specified udev rules files, report such
labels and exit with a non-zero exit code if any unused labels are
found.
Dmitry V. Levin [Sat, 4 Mar 2023 08:00:00 +0000 (08:00 +0000)]
test: add a test for udevadm verify
Dmitry V. Levin [Fri, 3 Mar 2023 08:00:00 +0000 (08:00 +0000)]
meson.build: check udev rules using udevadm verify
Although udev rules are already being checked by rule-syntax-check.py
script, also check them using udevadm verify which performs more
thorough checks.
Dmitry V. Levin [Tue, 7 Mar 2023 08:00:00 +0000 (08:00 +0000)]
rules: do not use blkid builtin if built without blkid support
When built without blkid, then udev-builtin-blkid is not built,
and the verifier warns about the unknown builtin:
60-persistent-storage.rules:114 Unknown builtin command: blkid --hint=session_offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}
60-persistent-storage.rules:117 Unknown builtin command: blkid --noraid
60-persistent-storage.rules:120 Unknown builtin command: blkid
60-persistent-storage.rules: udev rules check failed
Dmitry V. Levin [Thu, 2 Mar 2023 08:00:00 +0000 (08:00 +0000)]
udevadm: introduce new 'verify' command
We seem to have no tool to verify udev rule files. There is a simple
udev rules syntax checker in the tree, test/rule-syntax-check.py, but
it is too simple to detect less trivial issues not detected by udev,
e.g. redundant comparisons (#26593) or labels without references.
Such a tool would be beneficial not only for maintaining udev rules
distributed along with udev, but also and even more so for maintaining
third party udev rules that are more likely to have issues with syntax
and semantic correctness.
Implement a udev rules syntax and semantics checker in the form of
'udevadm verify [OPTIONS] FILE...' command that is based on
udev_rules_parse_file() interface and would apply further checks
on top of it in subsequent commits.
Resolves: #26606
Dmitry V. Levin [Wed, 1 Mar 2023 08:00:00 +0000 (08:00 +0000)]
udev_rules_parse_file: mark logged issues
Traditionally, all issues found in udev rules by udev_rules_parse_file()
are logged and ignored, so there was no mechanism to propagate the
information about these issues back to the caller.
Introduce such a mechanism by adding a new member to UdevRuleFile.
This new member is a bitmask describing which log levels were used
in messages logged with regards to the rule file.
This mechanism is going to be used by udevadm verify in subsequent
commits.
Zbigniew Jędrzejewski-Szmek [Wed, 8 Mar 2023 18:06:20 +0000 (19:06 +0100)]
Merge pull request #26678 from yuwata/foreach_array
macro: introduce FOREACH_ARRAY() macro
Luca Boccassi [Wed, 8 Mar 2023 12:59:40 +0000 (12:59 +0000)]
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.
Frantisek Sumsal [Wed, 8 Mar 2023 15:18:09 +0000 (16:18 +0100)]
test: add a couple of tests for systemd-id128
Frantisek Sumsal [Wed, 8 Mar 2023 14:40:34 +0000 (15:40 +0100)]
test: add a couple of tests for systemd-escape
Frantisek Sumsal [Wed, 8 Mar 2023 11:58:28 +0000 (12:58 +0100)]
random-seed: drop extraneous "we"
Yu Watanabe [Wed, 8 Mar 2023 15:16:30 +0000 (00:16 +0900)]
Merge pull request #26713 from keszybz/man-getenv
Add note to docs that setenv() cannot be called in parallel with getenv()
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 19:26:20 +0000 (20:26 +0100)]
man: use more references
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 19:25:58 +0000 (20:25 +0100)]
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().
Chitoku [Wed, 8 Mar 2023 10:52:55 +0000 (19:52 +0900)]
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
e05dd7718d0b32e039c9e0f7bf3875079d1a359d.
Zbigniew Jędrzejewski-Szmek [Wed, 8 Mar 2023 08:11:22 +0000 (09:11 +0100)]
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.
5de344704df64d8f31448f1222432bc87ddcfbef 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.)
800f65f827c9828d4c872d44b19ca8a008505690 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.
Zbigniew Jędrzejewski-Szmek [Wed, 8 Mar 2023 08:35:03 +0000 (09:35 +0100)]
Merge pull request #26685 from yuwata/man-missing-services
man: mention two missing services
Frantisek Sumsal [Tue, 7 Mar 2023 17:44:20 +0000 (18:44 +0100)]
test: add a couple of tests for busctl
Luca Boccassi [Tue, 7 Mar 2023 21:34:03 +0000 (21:34 +0000)]
Merge pull request #26706 from jengelh/master
doc: various orthographic fixes
Luca Boccassi [Tue, 7 Mar 2023 20:07:17 +0000 (20:07 +0000)]
Merge pull request #26695 from poettering/dissect-mount-helper
make "systemd-dissect --mount" available as /sbin/mount.ddi
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 15:09:35 +0000 (16:09 +0100)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 15:08:16 +0000 (16:08 +0100)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 15:06:23 +0000 (16:06 +0100)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 15:02:14 +0000 (16:02 +0100)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2023 12:48:09 +0000 (13:48 +0100)]
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.
Daan De Meyer [Tue, 7 Mar 2023 14:49:06 +0000 (15:49 +0100)]
Merge pull request #26709 from DaanDeMeyer/mkosi-drop-debug
mkosi: Various cleanups
Daan De Meyer [Tue, 7 Mar 2023 14:24:13 +0000 (15:24 +0100)]
mkosi: Fix locations of mkosi-check-and-shutdown files
Daan De Meyer [Tue, 7 Mar 2023 14:23:35 +0000 (15:23 +0100)]
mkosi: Drop debug logging
The spurious "connection timed out" errors from nspawn should be
fixed now that we're running the latest version.
Daan De Meyer [Tue, 7 Mar 2023 14:22:59 +0000 (15:22 +0100)]
mkosi: Drop kernel command line masking in CI
These services should be disabled by default and not need explicit
masking anymore.
Daan De Meyer [Tue, 7 Mar 2023 14:25:02 +0000 (15:25 +0100)]
mkosi: Update to latest
So that we don't enable services by default anymore on Debian.
Jan Engelhardt [Tue, 7 Mar 2023 11:51:31 +0000 (12:51 +0100)]
doc: correct wrong use "'s" contractions
Jan Engelhardt [Tue, 7 Mar 2023 12:06:14 +0000 (13:06 +0100)]
doc: replace wrong idiom in homed comment
Jan Engelhardt [Tue, 7 Mar 2023 12:04:21 +0000 (13:04 +0100)]
doc: replace wrong á preposition by à
Luca Boccassi [Tue, 7 Mar 2023 11:26:12 +0000 (11:26 +0000)]
Merge pull request #26648 from bluca/kernel_install_guid
kernel-install: also try to find $BOOT by partition GUID
Yu Watanabe [Sun, 5 Mar 2023 20:56:29 +0000 (05:56 +0900)]
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.
Gerd Hoffmann [Fri, 20 Jan 2023 08:05:18 +0000 (09:05 +0100)]
kernel-install: handle uki installs automatically
Detect image type using "bootctl kernel-identify $kernel",
store result in KERNEL_INSTALL_IMAGE_TYPE.
Extend layout autodetection to check the kernel image type
and pick layout=uki for UKIs.
Resolves: #25822
Gerd Hoffmann [Wed, 25 Jan 2023 12:57:09 +0000 (13:57 +0100)]
kernel-install: remove math slang from man page
Gerd Hoffmann [Fri, 20 Jan 2023 11:59:33 +0000 (12:59 +0100)]
90-uki-copy.install: create $BOOT/EFI/Linux directory if needed
Do not consider a missing 'Linux' subdirectory an error.
Just create it instead.
Gerd Hoffmann [Tue, 24 Jan 2023 09:28:25 +0000 (10:28 +0100)]
bootctl: tweak DOS header magic check
Read the magic first, try reading the full DOS exe header only in case
the magic check succeeds.
This avoids throwing an header read error on small dummy files as used
by test-kernel-install.
Yu Watanabe [Sun, 5 Mar 2023 06:06:11 +0000 (15:06 +0900)]
systemctl: port FOREACH_ARRAY() to systemctl-list-units.c
Yu Watanabe [Sun, 5 Mar 2023 05:56:15 +0000 (14:56 +0900)]
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.
Yu Watanabe [Tue, 7 Mar 2023 03:02:47 +0000 (12:02 +0900)]
Merge pull request #26669 from YHNdnzj/journalctl-lines-since-until
journalctl: fix output when --lines is used with --since or --until
Joshua Goins [Sat, 4 Mar 2023 03:02:02 +0000 (22:02 -0500)]
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
0855ce67726f87a5a67b4fb536d58e0e4428a248.
Fixes: #26600
Lennart Poettering [Mon, 6 Mar 2023 17:48:18 +0000 (18:48 +0100)]
man: document /sbin/mount.ddi
Lennart Poettering [Mon, 6 Mar 2023 17:27:38 +0000 (18:27 +0100)]
test: add test for new /sbin/mount.ddi helper
Lennart Poettering [Mon, 6 Mar 2023 17:25:25 +0000 (18:25 +0100)]
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).
Luca Boccassi [Mon, 6 Mar 2023 21:00:04 +0000 (21:00 +0000)]
Merge pull request #26686 from yuwata/iovec
tree-wide: replace IOVEC_INIT with IOVEC_MAKE
Josef Miegl [Sat, 4 Mar 2023 21:18:34 +0000 (22:18 +0100)]
network: geneve: add InheritInnerProtocol flag
Adrian Vovk [Thu, 2 Mar 2023 18:20:51 +0000 (13:20 -0500)]
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)
Luca Boccassi [Mon, 6 Mar 2023 20:51:06 +0000 (20:51 +0000)]
Merge pull request #26502 from DaanDeMeyer/chase-symlinks-additions
Several chase_symlinks() additions
Luca Boccassi [Mon, 6 Mar 2023 20:50:17 +0000 (20:50 +0000)]
Merge pull request #26687 from yuwata/c2x
C2X support
Yu Watanabe [Mon, 6 Mar 2023 13:02:43 +0000 (22:02 +0900)]
time-util: drop redundant call of tzset()
It is also called at the beginning of `parse_timestamp_maybe_with_tz()`.
Adrian Vovk [Thu, 2 Mar 2023 18:00:28 +0000 (13:00 -0500)]
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
Daan De Meyer [Mon, 6 Mar 2023 15:51:53 +0000 (16:51 +0100)]
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.
Lennart Poettering [Mon, 6 Mar 2023 17:29:07 +0000 (18:29 +0100)]
TODO
Daan De Meyer [Sun, 8 Jan 2023 17:24:38 +0000 (18:24 +0100)]
chase-symlinks: Add chase_symlinks_at_and_open()
Daan De Meyer [Mon, 9 Jan 2023 11:29:12 +0000 (12:29 +0100)]
chase-symlinks: Add CHASE_MKDIR_0755
Daan De Meyer [Fri, 23 Dec 2022 11:08:19 +0000 (12:08 +0100)]
chase-symlinks: Add CHASE_PARENT
Let's simplify chasing the parent directory of some path by adding
CHASE_PARENT.
Daan De Meyer [Thu, 23 Feb 2023 13:24:56 +0000 (14:24 +0100)]
chase-symlinks: Return "." as path from chase_symlinks_at() instead of NULL
Daan De Meyer [Sun, 8 Jan 2023 17:04:20 +0000 (18:04 +0100)]
chase-symlinks: Skip shortcuts if CHASE_PROHIBIT_SYMLINKS is set
Dmitry V. Levin [Tue, 28 Feb 2023 08:00:00 +0000 (08:00 +0000)]
udev_rules_parse_file: do not skip ENOENT
Starting with commit
ed88bcfb7c15029f9fc95ee2380759a9eb782d46,
udev_rules_parse_file() silently skips files it fails to open with
ENOENT error, e.g. when they are broken symlinks. As this behavior is
undocumented and it seems to be unintended, let's treat ENOENT like any
other error. This change would also simplify the implementation of the
udev rules syntax checker mentioned in #26606.
udev_rules_load(), the only user of udev_rules_parse_file(), is not
affected by this change because it essentially ignores the value
returned by the latter, the only visible difference would be a log
message issued for every udev rules file that couldn't be open because
of ENOENT.
Fixes:
ed88bcfb7c15 ("Be more careful when checking for empty files")
Yu Watanabe [Mon, 6 Mar 2023 07:36:34 +0000 (16:36 +0900)]
Merge pull request #26650 from yuwata/udev-trigger
test: generate debugging logs for udevd after restart
Yu Watanabe [Mon, 6 Mar 2023 01:21:47 +0000 (10:21 +0900)]
test: add header build tests for newer C and C++ standards
Cristian Rodríguez [Tue, 3 Jan 2023 17:52:08 +0000 (17:52 +0000)]
Include <threads.h> if possible to get thread_local definition
IN C23, thread_local is a reserved keyword and we shall therefore
do nothing to redefine it. glibc has it defined for older standard
version with the right conditions.
v2 by Yu Watanabe:
Move the definition to missing_threads.h like the way we define e.g.
missing syscalls or missing definitions, and include it by the users.
Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
Yu Watanabe [Mon, 6 Mar 2023 00:25:14 +0000 (09:25 +0900)]
tree-wide: replace IOVEC_INIT with IOVEC_MAKE
We use gnu11 to build, hence we can use structured initializer with
casting, and it is not necessary to use different patterns on
initialization and assignment.
Addresses https://github.com/systemd/systemd/pull/26560#discussion_r1118875447.
Yu Watanabe [Mon, 6 Mar 2023 00:16:07 +0000 (09:16 +0900)]
sd-journal: wrap long line
Addresses https://github.com/systemd/systemd/pull/26560#discussion_r1118875967.
Yu Watanabe [Sun, 5 Mar 2023 22:15:29 +0000 (07:15 +0900)]
man: mention systemd-growfs-root.service
Yu Watanabe [Sun, 5 Mar 2023 22:15:12 +0000 (07:15 +0900)]
man: mention systemd-fsck-usr.service
Zbigniew Jędrzejewski-Szmek [Fri, 3 Mar 2023 15:08:41 +0000 (16:08 +0100)]
meson: adjust for removal of gnu-efi compat
gnu-efi-3.0.11-13.fc39 in Fedora dropped the old include paths.
Yu Watanabe [Sun, 5 Mar 2023 04:01:35 +0000 (13:01 +0900)]
Revert "hwdb: fix swapped buttons for Logitech Lift left"
This reverts commit
81cfea95e51c72da6765b517e7038b3e7e3dec9f.
The modalias seems to match a generic Logitech USB receiver even the
connected mouce is not for left hand.
Fixes #26671 and #26676.
Zbigniew Jędrzejewski-Szmek [Sun, 5 Mar 2023 12:38:55 +0000 (13:38 +0100)]
Merge pull request #26651 from yuwata/meson-cleanups
Several meson cleanups
Mike Yuan [Sat, 4 Mar 2023 11:38:35 +0000 (19:38 +0800)]
journalctl: fix output when --since is used with --lines
Before this commit, if --since is used with --lines=N,
we seek to the place of --since and search afterwards
there, resulting in outputing the first N lines.
After this commit, we only do the above if --since is used without
--reverse and --lines. Otherwise we seek to the tail first and check
if the entry is within the range of --since later.
Daan De Meyer [Sun, 5 Mar 2023 08:41:38 +0000 (09:41 +0100)]
mkosi: Install dnf on centos and fedora
dnf is not installed by default anymore, but it's still useful to
have in our images, so let's install it explicitly.
Mike Yuan [Sat, 4 Mar 2023 11:06:00 +0000 (19:06 +0800)]
journalctl: fix output when --until is used with --lines
Before this commit, when --lines is specified, we jump to the tail and
search afterwards from there, thus breaking --until if used together.
After this commit:
If both --until and any of --reverse and --lines is specified, things get
a little tricky. We seek to the place of --until first. If only --reverse or
--reverse and --lines is specified, we search backwards and let the output
counter handle --lines for us. If only --lines is used, we just jump backwards
arg_lines and search afterwards from there.
Yu Watanabe [Sat, 4 Mar 2023 13:14:22 +0000 (22:14 +0900)]
Merge pull request #26668 from yuwata/man-link-rename
man: add/update example in systemd.link
Yu Watanabe [Sat, 4 Mar 2023 05:57:10 +0000 (14:57 +0900)]
man: add an example to (re-)apply new settings to a network interface
Closes #26601.
Yu Watanabe [Sat, 4 Mar 2023 05:33:10 +0000 (14:33 +0900)]
man: sync the default .link file in example
Yu Watanabe [Fri, 3 Mar 2023 17:53:59 +0000 (02:53 +0900)]
Merge pull request #26653 from poettering/tmpfile-linkable-replace
teach link_tmpfile() to optionally replace files
Frantisek Sumsal [Fri, 3 Mar 2023 16:57:15 +0000 (17:57 +0100)]
README: update CentOS CI URLs to the new instance
Frantisek Sumsal [Fri, 3 Mar 2023 11:17:27 +0000 (12:17 +0100)]
systemctl: explicitly cast the constants to uint64_t
Otherwise under certain conditions `va_arg()` might get garbage instead
of the expected value, i.e.:
$ sudo build-o0/systemctl disable asdfasfaf
sd_bus_message_appendv: Got uint64_t: 0
Failed to disable unit: Unit file asdfasfaf.service does not exist.
$ sudo build-o1/systemctl disable asdfasfaf
sd_bus_message_appendv: Got uint64_t:
7954875719681572864
Failed to disable unit: Invalid argument
(reproduced on an armv7hl machine)
Resolves: #26568
Follow-up to:
bf1bea43f15
Related issue: https://github.com/systemd/systemd/pull/14470#discussion_r362893735
Luca Boccassi [Fri, 3 Mar 2023 15:57:13 +0000 (15:57 +0000)]
Merge pull request #26646 from poettering/nspawn-private
nspawn: ensure all mount propagation is turned off between host and container, except for the "tunnel" dir
Luca Boccassi [Fri, 3 Mar 2023 15:56:53 +0000 (15:56 +0000)]
Merge pull request #26649 from yuwata/parse-timstamp
test: fix and extend test for parse_timestamp()
Yu Watanabe [Fri, 3 Mar 2023 14:19:27 +0000 (23:19 +0900)]
test: trigger new events after all currently queued events are processed
Otherwise, udevd may be busy and udevadm may not receive the reply
for the control packet within the time limit.