Yu Watanabe
396ec9587c
os-util: make open_extension_release() return O_PATH fd
2023-04-11 18:44:50 +09:00
Yu Watanabe
53cbf5f9a6
os-util: drop fopen_extension_release()
2023-04-11 18:44:50 +09:00
Yu Watanabe
bfeaa62dbc
compress: replace compress_blob() with compress_blob_explicit()
...
And make compress_xyz() return 0 on success, as we know which compression
algorithm is used when calling compress_blob().
Follow-up for 2360352ef0 .
2023-04-11 09:14:34 +02:00
Daan De Meyer
7cb9ed5d38
Merge pull request #27206 from yuwata/udev-rename
...
udev: rename arguments and options, update comments
2023-04-11 09:12:21 +02:00
Yu Watanabe
0d68cd72b6
chase: drop redundant call of delete_trailing_chars()
...
In that branch, 'root' is a non-root and absolute path.
Hence, delete_trailing_chars() does not make the path empty.
And, if the path contains redundant slashes at the end, that will be
dropped by path_simplify().
2023-04-11 09:06:05 +02:00
Yu Watanabe
0f9aca9a98
Merge pull request #27207 from masatake/busctl--help-msg
...
busctl: add --xml-interface to the help message
2023-04-11 14:42:27 +09:00
Yu Watanabe
c689c541a1
Merge pull request #27201 from yuwata/o-path-support
...
Support O_PATH more
2023-04-11 12:37:37 +09:00
Colin Walters
4e1ac54e1c
tree-wide: A few more uses of "unmet" for conditions
...
This is a followup to
413e8650b7
> tree-wide: Use "unmet" for condition checks, not "failed"
Since I noticed when running `systemctl status` on a recent
systemd still seeing
`Condition: start condition failed`
To recap the original rationale here for "unmet" is that it's
normal for some units to be conditional, so the term "failure"
here is too strong.
2023-04-11 12:36:53 +09:00
Yu Watanabe
2653ded4d1
Merge pull request #27199 from yuwata/find-esp
...
path-util: introduce path_prefix_root_cwd(), and use it in find_esp() and friends
2023-04-11 12:36:13 +09:00
Yu Watanabe
562f22dbfc
Merge pull request #27202 from yuwata/os-release-tiny-cleanups
...
os-util: tiny cleanups
2023-04-11 12:35:34 +09:00
Yu Watanabe
06692fdb5b
env-file: introduce parse_env_file_fdv()
2023-04-11 12:33:14 +09:00
Masatake YAMATO
a5efb0cc2b
shell-completion: add --xml-interface option of busctl to the rules
...
Signed-off-by: Masatake YAMATO <yamato@redhat.com >
2023-04-11 11:47:56 +09:00
Masatake YAMATO
c39b8978f6
busctl: add --xml-interface to the help message
...
Signed-off-by: Masatake YAMATO <yamato@redhat.com >
2023-04-11 11:45:26 +09:00
Yu Watanabe
fb4d9bf47f
find-esp: use path_prefix_root_cwd()
...
Unlikely, but even if find_esp() or friends called with unnormalized or
relative 'root', let's make the result path normalized and absolute.
Note, before 63105f33ed , these functions
returned an absolute and normalized path. But the commit made the result
path simply concatenated with root.
Follow-up for 63105f33ed .
2023-04-11 06:27:11 +09:00
Yu Watanabe
75cc8d7c42
path-util: introduce path_prefix_root_cwd()
2023-04-11 06:27:05 +09:00
Yu Watanabe
adc5b9823c
test: update description
2023-04-11 06:07:15 +09:00
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
Yu Watanabe
8c14d828d4
os-util: drop redundant declaration of load_os_release_pairs()
2023-04-11 05:20:15 +09:00
Yu Watanabe
d67071d2f6
os-util: use _IMAGE_CLASS_INVALID
...
When extension is not specified, image class is not necessary to be
specified. Let's use _IMAGE_CLASS_INVALID as an indicator that no
extension is specified.
2023-04-11 05:20:15 +09:00
Yu Watanabe
c2cd950817
os-util: move declaration of string table lookup for image class
2023-04-11 05:20:15 +09:00
Yu Watanabe
fe008489f7
portable: always reopen fd of release file
...
To make it support the case that the fd is O_PATH.
2023-04-11 05:17:52 +09:00
Yu Watanabe
e63d070373
copy: make copy_bytes() support O_PATH fds
2023-04-11 05:17:10 +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