1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
Commit Graph

63306 Commits

Author SHA1 Message Date
Jan Macku
a33d7c4cc9 ci: limit permissions for differential-shellcheck 2023-03-22 06:56:34 +01:00
Jan Macku
50ba79710e ci: trigger differential-shellcheck workflow on push
Also update `differential-shellcheck` to latest version - https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases

Fixes: https://github.com/redhat-plumbers-in-action/differential-shellcheck/issues/215
2023-03-22 06:56:34 +01:00
Daan De Meyer
f3e03bd04e
Merge pull request #26828 from DaanDeMeyer/tmpfile-at
tmpfile-util: Add open_tmpfile_linkable_at() and link_tmpfile_at()
2023-03-21 20:52:17 +01:00
Lennart Poettering
42db4a8db7 fd-util: make sure fd_reopen() works with AT_FDCWD systematically
Prompted by:

https://github.com/systemd/systemd/pull/26827#pullrequestreview-1341171981
2023-03-21 20:51:55 +01:00
Daan De Meyer
1c2e550ec4
Merge pull request #26866 from DaanDeMeyer/chase-fix
chase-symlinks: Add CHASE_FILENAME and more at() helpers
2023-03-21 20:50:48 +01:00
Daan De Meyer
4d62ee559d execute: Add kernel cmdline arguments for tty term, rows and columns
Let's allow configuring tty term and size using kernel cmdline arguments
so that when running in a VM we can communicate the terminal TERM and size
from the host via SMBIOS extra kernel cmdline arguments.
2023-03-21 20:50:17 +01:00
Daan De Meyer
c84d14c525 docs: Fix vscode debugging section in HACKING.md
Let's account for the recent changes in mkosi in the debugging
with vscode section.
2023-03-21 17:47:51 +00:00
Daan De Meyer
12ef261794 chase-symlinks: Add more chase_symlinks_at() helpers
Copies of the corresponding chase_symlinks() helpers.
2023-03-21 16:08:35 +01:00
Daan De Meyer
88f2ee8601 chase-symlinks: Return zero from access() and stat() helpers
We never check if r > 0 when using these helpers, so let's just
return zero like we usually do.
2023-03-21 16:08:35 +01:00
Daan De Meyer
63bfd52f48 chase-symlinks: Add CHASE_EXTRACT_FILENAME flag
Useful in combination with CHASE_PARENT to get a directory file
descriptor to the parent directory of the resolved path and the
filename of the resolved path in the parent directory (which might
not be the same as the filename of the input path because of symlinks).
2023-03-21 16:08:29 +01:00
Thomas Blume
c5ba7a2a4d udev-rules: fix nvme symlink creation on namespace changes
The nvme by-id symlink changes to the latest namespace when a new namespace gets
added, for example by connecting multiple NVMe/TCP host controllers via nvme
connect-all.
That is incorrect for persistent device links.
The persistent symbolic device link should continue to point to the same NVMe
namespace throughout the lifetime of the current boot.
Therefore the namespace id needs to be added to the link name.
2023-03-21 15:46:45 +01:00
Daan De Meyer
d294857ea6 tmpfile-util: Add open_tmpfile_linkable_at() and link_tmpfile_at() 2023-03-21 15:20:01 +01:00
Daan De Meyer
14460a8a2b fs-util: Add open_parent_at() 2023-03-21 15:20:01 +01:00
Daan De Meyer
aea3ca3613 lock-util: Add make_lock_file_at() 2023-03-21 15:19:33 +01:00
Yu Watanabe
2415a0c7aa
Merge pull request #26893 from yuwata/uki-util-update-log
util: rename uki-util.[ch] -> kernel-image.[ch]
2023-03-21 19:06:18 +09:00
Daan De Meyer
26f51ae430 mkosi: Default to debug log level for udev as well
Unlike CI, the debug output just goes to the journal, so there's no
harm in enabling it, even if it's noisy.
2023-03-21 11:01:34 +01:00
Antonio Alvarez Feijoo
9baeb58fcd man/network-generator: replace dracut.kernel reference with dracut.cmdline
`dracut.kernel.7` is just a symlink to `dracut.cmdline.7`, so the web reference
points to a non-existent URL
(https://man7.org/linux/man-pages/man7/dracut.kernel.7.html).
2023-03-21 19:00:00 +09:00
Antonio Alvarez Feijoo
dd23292c08 gpt-auto-generator: fix typo 2023-03-21 18:57:59 +09:00
Zbigniew Jędrzejewski-Szmek
cd36f4d79f
Merge pull request #26867 from dtardon/list-dependencies-circular
Fix printing of circular dependencies
2023-03-21 09:40:46 +01:00
Yu Watanabe
5689e161cf util: rename uki-util.[ch] -> kernel-image.[ch]
As the file contains functions not only for UKI.
2023-03-21 16:49:26 +09:00
Yu Watanabe
fe3198df66 uki-util: rename KernelType -> KernelImageType
The name KernelType is slightly ambiguous. The type is about kernel
image. Let's rename the enum to clarify that.
2023-03-21 16:44:52 +09:00
Yu Watanabe
fc56666cc2 uki-util: rename uki -> f
As the function is not only for UKI.
2023-03-21 16:40:39 +09:00
Yu Watanabe
b3e26aa2d9 uki-util: update log messages 2023-03-21 16:38:40 +09:00
Dmitry V. Levin
f0a16c9ae8 udev-rules: add another check for conflicting expressions
Log an error when a rule line contains the following kind of conflicting
match expressions:

  KEY=="foo", KEY=="bar"
2023-03-21 09:34:50 +09:00
OMOJOLA JOSHUA DAMILOLA
92035969e0 compare-operator: added unit tests 2023-03-20 17:54:02 +00:00
Yu Watanabe
719bbb365b
Merge pull request #26875 from yuwata/core-transaction
core/transaction: several fixes for merge_unit_ids()
2023-03-21 00:42:30 +09:00
Yu Watanabe
00546c18fd strv: introduce strv_print_full() 2023-03-20 09:32:09 +01:00
Frantisek Sumsal
7af15421e3 ci: drop clang-13, add clang-16 2023-03-20 13:58:58 +09:00
Yu Watanabe
de2c62e847 bootctl: fix wrong type comparison 2023-03-20 13:58:20 +09:00
Yu Watanabe
a9b402e4d2
Merge pull request #26886 from ldv-alt/udevadm-verify
udev-rules: fix matching of token types that support alternative patterns
2023-03-20 13:58:08 +09:00
Yu Watanabe
432f1fa8c7 loop-util: add more debugging logs in loop_configure() 2023-03-19 20:32:09 +09:00
Dmitry V. Levin
5004aa84ac udev-rules: fix check for conflicting and duplicate expressions
Fix check for conflicting and duplicate expressions of types that
support alternative patterns.

Fixes: 3ec58d0cd8 ("udev-rules: check for conflicting and duplicate expressions")
2023-03-19 11:32:09 +00:00
Dmitry V. Levin
8c499a61c4 Revert "udev: prepare memory for extra NUL termination for NULSTR"
This reverts commit cd3c8a117c which was
papering over the bug instead of a proper fix made by the previous
commit.
2023-03-19 11:32:09 +00:00
Dmitry V. Levin
c43ff248f9 udev-rules: fix matching of token types that support alternative patterns
For those token types that support matching of alternative patterns,
their token values are interpreted as nulstr, so make sure the parser
does the right thing and makes these token values terminated by two
subsequent NULs so they could be safely interpreted as nulstr.

Before this fix, the following rules would result to "echo foo" invocation:
  ENV{foo}=", RUN"
  ENV{foo}=="bar", RUN+="echo foo"
because the value of `ENV{foo}` is treated as nulstr, and it used to match
against alternative patterns, in this case `bar`, `, RUN`, and `="echo foo`.

Fixes: 25de7aa7b9 ("udev: modernize udev-rules.c")
2023-03-19 11:32:09 +00:00
taniishkaaa
c22dcc80d0
hwdb: fix Wifi toggling for Haier 7G-Series/JWU (#25293) (#26878) 2023-03-19 14:16:00 +09:00
Yu Watanabe
55882f648e
Merge pull request #26884 from YHNdnzj/tmpfiles-unit-name-update
Update references to obsolete systemd-tmpfiles.service
2023-03-19 12:18:10 +09:00
Yu Watanabe
3867264c78
Merge pull request #26880 from yuwata/test-tmpfiles
tmpfiles: cleanups
2023-03-19 02:49:11 +09:00
Yu Watanabe
9edf5752e5
Merge pull request #26879 from mrc0mmand/cocci
tree-wide: simplify x ? x : y to x ?: y where applicable
2023-03-19 02:48:39 +09:00
Mike Yuan
7d33146dbc
docs: update unit name for sd-tmpfiles-setup 2023-03-19 01:32:50 +08:00
Mike Yuan
23c4c03406
unit: sysext: update unit name for sd-tmpfiles-setup
Fixes #26882
2023-03-19 01:29:48 +08:00
Yu Watanabe
458e8d6dd0 test-systemd-tmpfiles.py: create global temporary directory
For some unknown reasons, the temporary directory created by the test
below is not removed:
```
 # Test the case that a valid symlink is in the path.
 label = 'valid_symlink-deep'
 test_content('f= {} - - - - ' + label, label, user=user, subpath='/deep/1/2', path_cb=valid_symlink)
```
To keep /tmp clean, let's create the global temprary directory.
2023-03-18 22:27:41 +09:00
Yu Watanabe
015ddd4bf0 test-systemd-tmpfiles.py: use test_content() at one more place 2023-03-18 22:27:41 +09:00
Yu Watanabe
056ff0b455 tmpfiles: show file type in octal, instead of hex 2023-03-18 22:27:41 +09:00
Frantisek Sumsal
1da3cb8141 tree-wide: simplify x ? x : y to x ?: y where applicable 2023-03-18 14:23:11 +01:00
Frantisek Sumsal
64254629f7 coccinelle: add a transformation for GNU conditionals
i.e. x ? x : y => x ?: y
2023-03-18 14:23:11 +01:00
Frantisek Sumsal
d3a2a25fb4 coccinelle: respect spacing from the semantic patch 2023-03-18 14:23:11 +01:00
Yu Watanabe
f5c0edd166 man: explicitly list three command syntax at the beginning 2023-03-18 20:22:08 +08:00
Yu Watanabe
0bc2bcf4fe
Merge pull request #26759 from medhefgo/boot-stack-protector
boot: Add support for stack protector/trapping math/ubsan
2023-03-18 15:07:45 +09:00
Daan De Meyer
cafd2c0be4 units: Order user@.service after systemd-oomd.service
The user manager connects to oomd over varlink. Currently, during
shutdown, if oomd is stopped before any user manager, the user
manager will try to reconnect to the socket, leading to a warning
from pid 1 about a conflicting transaction.

Let's fix this by ordering user@.service after systemd-oomd.service,
so that user sessions are stopped before systemd-oomd is stopped,
which makes sure that the user sessions won't try to start oomd via
its socket after systemd-oomd is stopped.
2023-03-18 15:05:43 +09:00
Yu Watanabe
a9938fb3cb
Merge pull request #26862 from yuwata/uki-util
uki-util: export functions of inspecting kernel
2023-03-18 15:04:54 +09:00