1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-03 17:47:28 +03:00

63568 Commits

Author SHA1 Message Date
Xiaotian Wu
a4a2077df5 basic: update the Arch tuples for LoongArch
After this commit[1], LoongArch now uses these Multiarch specs:

- Double float: loongarch64-linux-gnu
- Single float: loongarch64-linux-gnuf32
- Soft float: loongarch64-linux-gnusf

You can visit here[2] to view the full documentation.

[1]: 55dbaadaaa
[2]: https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html
2023-03-30 15:44:03 +02:00
Zbigniew Jędrzejewski-Szmek
e61bab2b55
Merge pull request #26883 from yuwata/rm-rf
rm-rf: also chmod directory if cannot be opened
2023-03-30 14:54:59 +02:00
Daan De Meyer
65e179a1e7 tmpfiles: Try to take a BSD lock on files as well
Similar to what we do for directories, just before we remove a file,
let's try to take a BSD lock on it. If that fails, skip removing the
file.
2023-03-30 11:45:05 +02:00
Daan De Meyer
5ccf06074a
Merge pull request #27064 from DaanDeMeyer/chase-fixes
Chase fixes
2023-03-30 11:44:33 +02:00
Daan De Meyer
ee6fea2b7f
Merge pull request #27063 from yuwata/chase-graceful
chase: gracefully drop CHASE_AT_RESOLVE_IN_ROOT when AT_FDCWD is specified
2023-03-30 11:44:17 +02:00
Daan De Meyer
1b07fd3c22
Merge pull request #27041 from poettering/fdstore-dump
add ability to show contents of service fdstore + teach systemd-notify passing fds into the fdstore
2023-03-30 09:32:13 +02:00
Yu Watanabe
8bf26bfe26 chase: add CHASE_AT_RESOLVE_IN_ROOT only when it is necessary 2023-03-30 16:29:45 +09:00
Yu Watanabe
e115daa6a8 chase: drop CHASE_AT_RESOLVE_IN_ROOT when AT_FDCWD or root dir fd is specified
If we get AT_FDCWD or root dir fd, we always resolve symlinks relative to the host's root.
Hence, the flag is meaningless.
2023-03-30 16:29:37 +09:00
Yu Watanabe
0362953e9a test-kernel-install: several cleanups
- allow to run without $PROJECT_BUILD_ROOT,
- drop unnecessary export for bootctl,
- enable -x option to show commands,
- use 'test ! -e' to check the nonexistence of files,
- show more debugging logs.
2023-03-30 09:23:07 +02:00
Yu Watanabe
85db5602e0 man: drop trailing space and mention uki_generator at one more place
Follow-up for 600362aa11af5af90125aacc8ad7612a5cb80a68.
2023-03-30 09:20:56 +02:00
Daan De Meyer
708e88704b chase: Simplify chase_and_open() and chase_and_openat()
xopenat() now calls fd_reopen() if an empty path is specified, so
let's make use of that to simplify the chase open helpers.
2023-03-30 09:04:14 +02:00
Daan De Meyer
fedceeba2e fs-util: Strip O_NOFOLLOW in xopenat() when calling fd_reopen()
We definitely want to follow symlinks when calling fd_reopen() so
let's strip O_NOFOLLOW when we call it from xopenat().
2023-03-30 09:04:14 +02:00
Daan De Meyer
16859751ca chase: Fix error code check 2023-03-30 09:04:14 +02:00
Daan De Meyer
11659e4830 chase: Fix formatting 2023-03-30 09:04:14 +02:00
Daan De Meyer
47ef19d6b9
Merge pull request #27062 from yuwata/chase-trivial
chase: trivial cleanups
2023-03-30 08:45:38 +02:00
Lennart Poettering
d53bda316b service: drop redundant unit_ref_unset() call
The immediately preceeding service_close_socket_fd() call does that
internally anyway. No need to do this again right after.
2023-03-30 08:44:59 +02:00
Daan De Meyer
2e82d82445
Merge pull request #27060 from yuwata/fd-get-path
fd-util: make fd_get_path() support AT_FDCWD
2023-03-30 07:59:25 +02:00
Yu Watanabe
6d5d3e207b chase: fix indentation 2023-03-30 14:52:13 +09:00
Yu Watanabe
52576a7503 chase: fix comment 2023-03-30 14:52:13 +09:00
Daan De Meyer
c4406ff710
Merge pull request #27061 from yuwata/test-chase
test: split out tests for chase() and friends
2023-03-30 07:17:40 +02:00
Yu Watanabe
8f22fe3207 test: split-out tests for chase() and friends to test-chase.c 2023-03-30 12:18:40 +09:00
Yu Watanabe
564a7545aa test: rename test-chase -> test-chase-manual 2023-03-30 12:18:40 +09:00
Yu Watanabe
46693a7925 fd-util: make fd_get_path() support AT_FDCWD 2023-03-30 12:03:33 +09:00
Yu Watanabe
8067fe86ff test: add tests for fd_get_path() 2023-03-30 12:03:33 +09:00
Lennart Poettering
62c72c60b5 units: let's establish the coredump socket before writting core_pattern sysctl
It's a bit nicer if we only write the sysctl core_pattern once the
coredump socket is established, since it's the backend for the handler.

Given the systemd-coredump.socket basically has no dependencies that run
before it this should not really make things slower or so, it just
removes the tiny window where core pattern is in effect that wants to
connect to the backend socket but cannot.

The status quo isn't terrible, and not too different in effect: either
way, until the socket unit is up we won't process coredumps. It's mostly
what kind of behaviour you get then: an error due to /bin/false being
invoked, or an error because systemd-coredump can't connect to its
socket. After this patch we'll exclusively see the former.
2023-03-30 08:53:52 +09:00
Mike Yuan
c884484956
Merge pull request #27053 from DaanDeMeyer/firstboot-followups
Firstboot followups
2023-03-30 04:22:16 +08:00
Lennart Poettering
2e34aed32b
Merge pull request #26971 from poettering/autostart-dead-failed
pid1: introduce new SERVICE_{DEAD|FAILED}_BEFORE_AUTO_RESTART service…
2023-03-29 21:41:31 +02:00
Lennart Poettering
a7b6eee4ac
Merge pull request #26968 from DaanDeMeyer/exec-runtime
core: Introduce unit private exec runtime
2023-03-29 21:40:48 +02:00
Lennart Poettering
3739c2fdfc update TODO 2023-03-29 19:09:10 +02:00
Lennart Poettering
b0717f1b82 test: add test case for fdstore dumping logic, and systemd-notify --fd= 2023-03-29 19:09:10 +02:00
Lennart Poettering
6e4a324574 notify: add support for sending fds with notification messages
This exposes the fd passing we support via sd_pid_notify_with_fds() also
via the command line tool systemd-notify.
2023-03-29 19:09:10 +02:00
Lennart Poettering
e829f28c1b fdset: add new fdset_consume() helper 2023-03-29 19:09:10 +02:00
Lennart Poettering
bdcad22e8e fdset: add new helper to convert an fdset to an array 2023-03-29 19:09:10 +02:00
Lennart Poettering
08a0ebc6be fdset: minor modernizations
Let's use more _cleanup_ expressions. Various other modernizations. No
actual code changes, except for maybe a conversion to use heap memory
when generating an array of fds, instead of stack as before. Given that
fdstores are typically user controlled, that should be a wise idea.
2023-03-29 19:09:10 +02:00
Lennart Poettering
5f43c97cd2 analyze: add new fdstore verb 2023-03-29 19:09:10 +02:00
Lennart Poettering
2ea24611b9 pid1: add DumpFileDescriptorStore() bus call that returns fdstore content info 2023-03-29 18:53:20 +02:00
Lennart Poettering
522f12224c format-table: add new cell type for displaying major/minor devnums 2023-03-29 18:27:05 +02:00
Lennart Poettering
bd33207bb1 format-table: add inode type cell type 2023-03-29 18:27:05 +02:00
Lennart Poettering
b2b84f4b23 fd-util: add helper for converting O_RDONLY/WRONLY/RDWR to strings 2023-03-29 18:27:05 +02:00
Lennart Poettering
d80e2a1ed3 devnum-util: add new devnum_is_zero() helper 2023-03-29 18:27:05 +02:00
Lennart Poettering
d83ce13636 stat-util: add inode_type_to_string() helper for showing mode_t inode type as string 2023-03-29 18:27:04 +02:00
Daan De Meyer
df00c5162f firstboot: Refactor should_configure() 2023-03-29 18:05:04 +02:00
Daan De Meyer
fe75d5bcfa firstboot: Check for errors returned by dir_fd_is_root() 2023-03-29 17:59:50 +02:00
Daan De Meyer
fe58566282 user-util: Rename ETC_PASSWD_LOCK_NAME to ETC_PASSWD_LOCK_FILENAME 2023-03-29 17:52:35 +02:00
Lennart Poettering
8d12e219c5 pid1: add debug log about selected restart interval 2023-03-29 17:22:07 +02:00
Lennart Poettering
a1d315730f pid1: introduce new SERVICE_{DEAD|FAILED}_BEFORE_AUTO_RESTART service substates
When a service deactivates and is then automatically restarted via
Restart= we currently quickly transition through
SERVICE_DEAD/SERVICE_FAILED. Which is weird given it's not the
normal ("permanent") dead/failed state, but a transitory one we
immediately leave from again. We do this so that software that looks for
failures/successes can take notice, even if we restart as a consequence
of the deactivation.

Let's clean this up a bit: let's introduce two new states:
SERVICE_DEAD_BEFORE_AUTO_RESTART and SERVICE_FAILED_BEFORE_AUTO_RESTART
that are used for the transitory states. Both the SERVICE_DEAD and
SERVICE_DEAD_BEFORE_AUTO_RESTART will map to the high-level
UNIT_INACTIVE state though. (and similar for the respective failed
states). This means the high-level state machine won't change by this,
only the low-level one.

This clearly seperates the substates, which makes the state engine
cleaner, and allows clients to follow precisely whether we are in a
transitory dead/failed state, or a permanent one, by looking at the
service substate. Moreover it allows us to remove the 'n_keep_fd_store'
which so far we used to ensure the fdstore was not released during this
transitory dead/failed state but only during the permanent one. Since we
can now distinguish these states properly we can just use that.

This has been bugging me for a while. Let's clean this up.

Note that the unit restart logic is already nicely covered in the
testsiute, hence this adds no new tests for that.

And yes, this could be considered a compat break, but sofar we took the
liberty to make changes to the low-level state machine (i.e. SERVICE_xyz
states, sometimes called "substates") without considering this a bad
breakage – the high-level state machine (i.e.  UNIT_xyz states) should
be considered API that cannot be changed.
2023-03-29 17:22:07 +02:00
Zbigniew Jędrzejewski-Szmek
8732cfb4bf
Merge pull request #26707 from DaanDeMeyer/firstboot-modernize
firstboot: modernize path handling
2023-03-29 17:08:44 +02:00
Daan De Meyer
6fdd30fb7c mkosi: Drop python-docutils
We don't seem to use anything from python-docutils at all, so let's
drop the dependency.
2023-03-29 14:33:06 +02:00
Daan De Meyer
77c3cd2086
Merge pull request #27049 from DaanDeMeyer/update-mkosi
mkosi: Update to latest
2023-03-29 13:48:37 +02:00
Daan De Meyer
94c9855a18 mkosi: Update to latest
- Drop Netdev= as it was removed in mkosi
- Always install python-psutil in the final image (required for networkd tests)
- Always Install python-pytest in the final image (required for ukify tests)
- Use the narrow glob for all centos python packages
- Drop the networkd mkosi config files (the default image can be used instead)
- Use ".conf" as the mkosi config file suffix everywhere
- Copy src/ to /root/src in the final image and set gdb substitute path in
  .gdbinit to make gdb work properly
2023-03-29 13:27:19 +02:00