Commit Graph

64902 Commits

Author SHA1 Message Date
Yu Watanabe
998db5871f udev: introduce .PART_SUFFIX internal property
To make unify rules for disk and partition.
2023-05-26 16:38:09 +02:00
Zbigniew Jędrzejewski-Szmek
5287b3a87a Merge pull request #27746 from yuwata/unit-bidirectional-dep
core/unit: make unit dependency always bidirectional
2023-05-26 16:20:48 +02:00
Zbigniew Jędrzejewski-Szmek
c4f521a91b Merge pull request #27554 from ElvishJerricco/tmpfiles-c-escapes
tmpfiles: Allow C escapes
2023-05-26 15:42:48 +02:00
Frantisek Sumsal
3aed259328 fstab-generator: use correct swap name var
Follow-up to 9445623363.
2023-05-26 13:47:51 +01:00
Lennart Poettering
0706718c07 Merge pull request #27563 from yuwata/fstab-generator
fstab-generator: support defining mount units through kernel command line
2023-05-26 02:52:19 -07:00
Jordan Rome
b58feca65c core: change 'basename' to 'path_extract_filename'
This is part of a cleanup effort in the TODO doc.

Tested locally: `meson compile -C build && meson test -C build`
2023-05-26 15:45:58 +09:00
Yu Watanabe
831108245e core/unit: update bidirectional dependency simultaneously
Previously, if unit_add_dependency_hashmap() failed, then a
one-directional unit dependency reference might be created, and
triggeres use-after-free. See issue #27742 for more details.

This makes unit dependency always bidirectional, and cleanly revert
partial update on failure.

Fixes #27742.
2023-05-26 15:24:09 +09:00
Yu Watanabe
83123a4498 core/unit: search shared namespace in transitive relation of JoinsNamespaceOf=
Previously, dependency chain of JoinsNamespaceOf= did not work, e.g.
- a.service has JoinsNamespaceOf=b.service
- b.service has JoinsNamespaceOf=c.service
if, first c.service, next a.service, finally b.service is started,
then a.service is not joined to the namespace of c.service. And, as
mentioned in the document, the namespace used by b.service is not
deterministic.

This makes when searching exsiting namespace to be joined, all units in
the transitive dependency of JoinsNamespaceOf= are checked.
2023-05-26 15:23:57 +09:00
Will Fancher
4b6621fef3 tmpfiles: Allow C escapes
Fixes #26955
2023-05-26 00:45:54 -04:00
Will Fancher
5f0ee1b635 tmpfiles: Test C-style escape sequences 2023-05-26 00:45:15 -04:00
Frantisek Sumsal
ba79e8c2cc test: split the ASan wrapper into smaller blocks and tidy it up a bit
No functional change (hopefully), just making it easier on the eyes.
2023-05-26 13:43:07 +09:00
Yu Watanabe
a60f96fcf5 core/unit: make JoinsNamespaceOf= implies the inverse dependency
Previously, even if a.service has JoinsNamespaceOf=b.service, the
inverse direction of reference was not introduced.
Hence, a.service is started earlier than b.service, the namespace will
not shared with b.service.
Also, even if a.service had the reference to b.service, b.service did not.
If b.service is freed earlier, then unit_clear_dependencies() does not clear
the reference from a to b, and will cause use-after-free on unit_free() for
a.service.

Let's make JoinsNamespaceOf=b.service in a.service implies the inverse
dependency, i.e. JoinsNamespaceOf=a.service for b.service. Then, we can safely
free b.service.
2023-05-26 11:50:08 +09:00
Yu Watanabe
512df9de23 core/unit: drop doubled empty line 2023-05-26 11:50:08 +09:00
Yu Watanabe
8493a82d0b test: add tests for JoinsNamespaceOf=
To illustrate the current behavior of the dependency.
2023-05-26 11:50:05 +09:00
Daan De Meyer
75efd16fb0 units: Shut down networkd and resolved on switch-root
Let's explicitly order these against initrd-switch-root.target, so
that they are properly shut down before we switch root. Otherwise,
there's a race condition where networkd might only shut down after
switching root and after we've already we've loaded the unit graph,
meaning it won't be restarted in the rootfs.

Fixes #27718
2023-05-26 06:54:56 +08:00
Stanislaw Gruszka
3d1e78e362 rules: add rule for accel devices
Accel (Compute Acceleration) are new devices for AI/ML computation:
https://docs.kernel.org/accel/introduction.html

They are part of DRM subsystem. Add them to 'render' group since
no other appropriate group in standard linux systems exist. This
can be changed when proper common user-space components will emerge,
and new group for acceleration devices access will be established.

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
2023-05-26 04:17:22 +09:00
David Tardon
9a2982b687 gpt-auto-generator: also honor systemd.swap=no 2023-05-25 19:30:32 +02:00
David Tardon
30765fcb16 man: add trailing = 2023-05-25 19:30:32 +02:00
Daan De Meyer
24039e1207 meson: Create credstore directories
Let's make the creds directories a bit more discoverable and make it
easier for users to use them. This also allows us to fix the
mode to 0700 for /etc instead of the usual 0755 which is what probably
would happen if users had to create this directory themselves.
2023-05-25 19:07:50 +02:00
David Tardon
19038903e1 resolved-dns-rr: use automatic cleanup
Follow-up for #27770.
2023-05-26 00:17:59 +08:00
Lennart Poettering
9c9b9b8915 update TODO 2023-05-25 14:33:45 +02:00
Lennart Poettering
be2e63159f Merge pull request #27358 from bluca/pe_mule
stub: allow loading and verifying kernel command line addons
2023-05-25 03:56:06 -07:00
Daan De Meyer
62c505e1c7 mount-util: Downgrade log message to trace
This debug log message is extremely noisy so let's downgrade it to
trace.
2023-05-25 12:48:14 +02:00
Daan De Meyer
a27f253276 mkosi: Bump default timeout to 180s
Hopefully fixes #27778 where waiting for the root device to appear
times out before systemd-repart has a chance to run and create it.
2023-05-25 12:09:13 +02:00
Lennart Poettering
0f50da0f6b Merge pull request #26959 from poettering/creds-mount-dep-fix
credential ramfs mount order fixes
2023-05-25 02:06:47 -07:00