1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00
Commit Graph

63766 Commits

Author SHA1 Message Date
Yu Watanabe
6fdc9fbc0f udev/scsi_id: rename positional arguments 2023-04-11 06:07:03 +09:00
Yu Watanabe
8352a29b6d device-nodes: rename argument 2023-04-11 05:53:58 +09:00
Luca Boccassi
1dec1c6163
Merge pull request #27182 from mrc0mmand/test-tweaks
test: a couple of stability tweaks
2023-04-10 18:42:34 +01:00
Daan De Meyer
25d598e144
Merge pull request #27184 from yuwata/xfopenat-full
fileio: introduce xfopenat_full()
2023-04-10 11:50:34 +02:00
Дамјан Георгиевски
7b411cf842 ci: add permissions to make a release
follow-up to https://github.com/systemd/systemd/pull/27071
in order to create Github Releases, the job needs permissions to write
contents

also:
- pinned the `softprops/action-gh-release` action to a specific commit
- made it only active on the `systemd` organization repos (so not on
  forks)
2023-04-10 17:23:32 +08:00
Mike Yuan
17409d8488
Merge pull request #27193 from yuwata/analyze-blame
analyze: make 'blame' work even the default target not reached
2023-04-10 17:19:11 +08:00
Daan De Meyer
4fbad6ff05
Merge pull request #27194 from yuwata/chase-cleanups
chase: several cleanups
2023-04-10 07:52:04 +02:00
Yu Watanabe
b4cb4c5cc6 fd-util: slightly optimize dir_fd_is_root()
When STATX_MNT_ID is not supported, we need to manually obtain mount id.
Let's compare inodes earlier.
2023-04-10 10:04:46 +09:00
Yu Watanabe
a6ef5ef707 chase: use dir_fd_is_root() to check if fd points to the root directory
As commented in dir_fd_is_root(), comparing inode is not enough to
determine if we are at the root directory.
2023-04-10 09:55:29 +09:00
Yu Watanabe
4443e3003a chase: use stat_inode_same() at one more place 2023-04-10 09:45:21 +09:00
Yu Watanabe
de68bf7896 test: add tests about iterator position for path_find_{first,last}_component()
When path_find_first_component() returns the last component, the iterator
must be an empty string. The fact is heavily used in chaseat(). Let's
explicitly test it.
2023-04-10 09:39:14 +09:00
Yu Watanabe
3a7ba9f6b9 path-util: make iterator for path_find_last_component() always finish with the beginning of the buffer 2023-04-10 09:30:14 +09:00
Yu Watanabe
a0d3e0ec79 chase: extend comment about CHASE_PARENT 2023-04-10 08:57:01 +09:00
Yu Watanabe
75adfc3b17 chase: drop one redundant call of fstat()
Now, 'st' is always synced with 'fd'. Hence, we can use
stat_verify_directory().
2023-04-10 08:43:31 +09:00
Yu Watanabe
ad66c7f1d3 chase: make struct stat always sync with the opened fd
Previously, struct stat may not be correctly synced with the currently
opened fd, e.g. when a path contains symlink which points to an absolute
path.

This also rename variables for struct stat, to make them consistent with
the corresponding fd.
2023-04-10 08:40:14 +09:00
Yu Watanabe
db0096f2ad chase: drop unnecessary conditions for buffer 2023-04-10 08:17:07 +09:00
Yu Watanabe
32cc2cfac9 test: add another regression test
For #27187, which should be also caused by #26956.
2023-04-10 05:43:09 +09:00
Yu Watanabe
1538136911 test: systemd-analyze blame should succeed now 2023-04-10 05:34:30 +09:00
Yu Watanabe
63d7632d87 analyze: make blame command work even the default target not reached 2023-04-10 03:41:15 +09:00
Yu Watanabe
b98afb23bf kernel-image: make inspect_kernel() optionally take directory fd 2023-04-09 07:10:20 +02:00
Yu Watanabe
46b457e54b fileio: introduce read_one_line_file_at() 2023-04-09 07:08:38 +02:00
Yu Watanabe
61d9982c51 fileio: introduce xfopenat_full()
This unifies call of various xfopenat() variants.
No functional change, just refactoring.
2023-04-08 19:03:46 +09:00
Yu Watanabe
0f585d4116 fileio: use take_fdopen() and friends 2023-04-08 14:34:53 +09:00
Yu Watanabe
728d7382a0
Merge pull request #27160 from yuwata/conf_files_list_at
conf-files: introduce _at() variants of conf file enumerator
2023-04-08 14:25:20 +09:00
Yu Watanabe
37cc68b30c
Merge pull request #27174 from YHNdnzj/edit-util-fixlets
edit-util: several improvements
2023-04-08 13:56:06 +09:00
Frantisek Sumsal
9acb7ee425 test: check if we skip the full setup on daemon-reexec (again)
My original assumption in 61961e693d was wrong, since we do reset
/dev/console during reexec (see make_console_stdio()), so the test was
quite racy. Let's replace it with something, hopefully, more reliable.

Follow-up to 61961e693d.
2023-04-08 13:55:29 +09:00
Yu Watanabe
add762605a test: add tests for conf_files_list_at() and friends 2023-04-08 06:01:10 +09:00
Yu Watanabe
b1229544a0 conf-files: introduce _at() variants of conf_files_list() or friends 2023-04-08 05:09:48 +09:00
Yu Watanabe
1a39bddfbb conf-files: split out logic of copy and sort filenames from hashmap
No functional change, preparation for the next commit.
2023-04-08 05:08:51 +09:00
Yu Watanabe
273426750a conf-files: use path_compare_filename() 2023-04-08 05:08:51 +09:00
Yu Watanabe
6808e00463 path-util: introduce path_compare_filename() 2023-04-08 05:08:51 +09:00
Yu Watanabe
a5af5f80ca conf-files: drop redundant call of chase()
Previously, chase() was called twice in files_add() and path_strv_resolve_uniq().
2023-04-08 05:08:48 +09:00
Yu Watanabe
b6b446cb62 test: handle one more error gracefully
Fixes #27175.
2023-04-07 20:54:23 +02:00
Olivier Gayot
b24b10592d localed: fix invalid free after shifting pointers using strstrip
After manually editing /etc/locale.gen, calling localectl set-locale
sometimes fails. When it fails, the systemd journal shows:
systemd-localed: free() / invalid pointer.

It turned out that it only fails if some of the uncommented lines in
/etc/locale.gen have leading spaces, as in:

  * C.UTF-8       <= OK
  * en_US.UTF-8   <= OK
  *  fr_FR.UTF-8  <= NOK

After parsing a line from /etc/locale.gen, we use strstrip() to obtain
the "trimmed" line (without leading or trailing spaces).

However, we store the result of strstrip() in the original pointer
containing the untrimmed line. This pointer is later passed to free
(this is done automatically using _cleanup_free_).

This is a problem because if any leading space is present, the pointer
will essentially be shifted from its original value. This will result in
an invalid free upon cleanup.

The same issue is present in the locale_gen_locale_supported function.

Fixed by storing the result of strstrip() in a different pointer.
2023-04-08 00:08:43 +08:00
Frantisek Sumsal
cb58571a11 test: bump the timeout for non-qemu runs to 90s
When Ubuntu CI is oversaturated, 60s doesn't seem to be enough.
2023-04-07 17:23:59 +02:00
Frantisek Sumsal
6de6376075 test: enable the systemd-resolved unit in TEST-75
Without enabling itx, there's no symlink to the org.freedesktop.resolve1
dbus service, so there exists a tiny window in which the sequence of
`systemctl start` and `systemctl service-log-level` commands might fail:

[ 1127.615151] H systemd[1]: Started Network Name Resolution.
[ 1127.617768] H testsuite-75.sh[34]: + systemctl service-log-level systemd-resolved.service debug
[ 1127.621251] H dbus-daemon[54]: [system] Activating via systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service' requested by ':1.24' (uid=0 pid=119 comm="systemctl service-log-level systemd-resolved>
[ 1127.621336] H systemd[1]: dbus-org.freedesktop.resolve1.service: Failed to load configuration: No such file or directory
[ 1127.621364] H systemd[1]: dbus-org.freedesktop.resolve1.service: Trying to enqueue job dbus-org.freedesktop.resolve1.service/start/replace
[ 1127.621395] H systemd[1]: D-Bus activation failed for dbus-org.freedesktop.resolve1.service: Unit dbus-org.freedesktop.resolve1.service not found.
[ 1127.621965] H dbus-daemon[54]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
[ 1127.622046] H systemd[1]: systemd-resolved.service: D-Bus name org.freedesktop.resolve1 now owned by :1.25
[ 1127.622130] H systemctl[119]: Failed to set log level of org.freedesktop.resolve1 to debug: Unit dbus-org.freedesktop.resolve1.service not found.

Spotted in a couple of recent Ubuntu CI runs.
2023-04-07 17:00:10 +02:00
Uwe Kleine-König
381ccb4246 man/systemd-mount: Clearify documentation about --bind-device
The documentation suggests that the mount point (i.e. the directory
where the device is mounted) is removed when the device vanishes.
However only stopping of the automount unit is implemented.

So adapt the documentation to reality.
2023-04-07 16:33:46 +02:00
Daan De Meyer
3267fc3885 mkosi: Update to latest
This contains the recently merged fixes to config parsing ordering
and overrides.
2023-04-07 21:56:22 +09:00
b84b9f0414 hwdb: Add support for "Passion Model P612F"
Add hwdb sensor entry for device Passion with accelerometer "MXC6655".
2023-04-07 21:55:25 +09:00
Zbigniew Jędrzejewski-Szmek
ddd43f31e3
Merge pull request #26887 from yuwata/proc-cmdline-filter-arguments
proc-cmdline: filter PID1 arguments on container
2023-04-07 10:55:30 +02:00
Zbigniew Jędrzejewski-Szmek
9c1d3d6fa7
Merge pull request #27161 from pothos/sysext-refresh
systemd-sysext/confext.service: Refresh on start/reload
2023-04-07 10:40:18 +02:00
Daan De Meyer
05f7052732 bootctl: Gracefully handle missing bootloader directory
When --graceful is specified, let's gracefully deal with a missing
bootloader directory.
2023-04-07 10:34:34 +02:00
Ludwig Nussel
4bc14b1790 bootctl: show report state and type in json output 2023-04-07 10:22:37 +02:00
Mike Yuan
77c9bb177a
edit-util: improve log messages 2023-04-07 16:13:00 +08:00
Mike Yuan
bc6c7a58c2
edit-util: introduce overwrite_with_origin switch
Before this commit, if `original_path` is given,
it will always be used to overwrite `path`.
After this commit, it's controlled by the newly-added
switch `overwrite_with_origin`.
2023-04-07 16:13:00 +08:00
Mike Yuan
54ad6aa164
edit-util: make original_path and comment_paths work together 2023-04-07 16:10:57 +08:00
Mike Yuan
6e5d0e319e
edit-util: add DROPIN_MARKER_{START,END} 2023-04-07 16:10:54 +08:00
Cristian Rodríguez
e144a26306
resolve: change DNS_PACKET_UNICAST_SIZE_LARGE_MAX to 1232 (#27171)
The old common default was 4096, until 2020 on which all DNS servers (verified
on BIND9, NSD, Unbound, dnsmasq) switched to 1232 as an agreed max size [1].

[1] https://www.dnsflagday.net/2020/#message-size-considerations
2023-04-07 09:52:52 +02:00
Zbigniew Jędrzejewski-Szmek
1e094cb4ba
Merge pull request #27126 from yuwata/journal-compress
sd-journal: allow to specify compression algorithm through env
2023-04-07 09:28:27 +02:00
Sorah Fukumori
744b04c557 man: netdev: Clarify wireguard IPv6 endpoint format 2023-04-07 08:15:34 +09:00