Commit Graph

65325 Commits

Author SHA1 Message Date
Lennart Poettering
18cad4ebda Merge pull request #27846 from keszybz/link-mode-generation
Autogenerate list of link modes
2023-06-13 23:03:51 +02:00
김인수
09c24f81ff po: Translated using Weblate (Korean)
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main
2023-06-13 22:53:09 +02:00
Yu Watanabe
331aa7aa15 udev-node: optimize device node symlink creation
If multiple devices requested the same device node symlink with the same
priority, then previously we read O(N^2) of files saved in
/run/udev/links.

This makes if the requested symlink already exists with equal or higher
priority, then the symlink is kept, and skip to read all existing files,
except for one related to the current device node, in /run/udev/links.
Hence, the total amount of file read becomes O(N).

This improves performance of testcase_simultaneous_events_2 added by the
previous commit about 30%.
Before (32.8 sec):
```
 ## 3 iterations start: 11:13:44.690953163
 ## 3 iterations end: 11:14:17.493974927
```
After (23.8 sec):
```
 ## 3 iterations start: 11:17:53.869938387
 ## 3 iterations end: 11:18:17.624268345
```

This is based on the idea and analysis by Franck Bui.

Replaces #25839.

Co-authored-by: Franck Bui <fbui@suse.com>
2023-06-13 22:51:00 +02:00
Daniele Medri
0b75d6579b it.po: minor updates 2023-06-13 21:18:16 +01:00
Lennart Poettering
c27e8cd272 Merge pull request #28020 from DaanDeMeyer/followups
Followups
2023-06-13 22:14:33 +02:00
Luca Boccassi
59936b66d1 Merge pull request #27952 from mrc0mmand/drop-TEST-61
test: merge TEST-61-UNITTESTS-QEMU with TEST-02-UNITTESTS
2023-06-13 21:13:14 +01:00
Daan De Meyer
22afd5cb2c Merge pull request #27977 from DaanDeMeyer/update-mkosi
Update mkosi
2023-06-13 16:56:54 +02:00
Anatoli Babenia
5c193a7c3c man: document "s" is default --vacuum-time= suffix 2023-06-13 16:14:30 +02:00
Daan De Meyer
a6ae99363d rm-rf: Fix assertion
This doesn't cover every case but cases where people try to do
rm_rf(dir_fd, ".") are covered by unlinkat() simply failing.
2023-06-13 16:13:49 +02:00
Daan De Meyer
549a9a671a fd-util: Add extra shortcut to path_is_root_at() 2023-06-13 16:13:43 +02:00
Daan De Meyer
e089efd7a7 btrfs-util: Drop redundant parentheses 2023-06-13 16:13:22 +02:00
Daan De Meyer
fd9b68d925 repart: Store dm_name in DecryptedPartitionTarget
This means we don't have to do a fallible allocation in the
DecryptedPartitionTarget destructor. Also use log_warning_error_errno()
for the failure we ignore in the destructor.
2023-06-13 16:13:19 +02:00
Daan De Meyer
6aca147f82 mkosi: Remove explicit /testok check
vsock should work properly after the latest release of mkosi. But
to make sure it works, let's exit with 123 in case of success and
check for that in Github Actions.
2023-06-13 16:04:10 +02:00
Daan De Meyer
abeecde242 mkosi: Update to latest
We update our configuration to replace the removed
RepositoryDirectories= option with the new PackageManagerTrees=
option.
2023-06-13 16:04:08 +02:00
Daan De Meyer
33d960cbed mkosi: Make sure we build custom kernels with EROFS support 2023-06-13 15:42:17 +02:00
Daan De Meyer
63e5ee4096 mkosi: Add bpftool to final image
Useful for debugging bpf.
2023-06-13 15:42:17 +02:00
Daan De Meyer
569bbc1f43 mkosi: Add socat to the final image
Useful for debugging vsock stuff
2023-06-13 15:42:17 +02:00
Daan De Meyer
17f5942f8a Merge pull request #28010 from DaanDeMeyer/vsock-type
Vsock improvements
2023-06-13 15:41:58 +02:00
David Tardon
1b6e11f58d udevadm-control: fix error message
Extracted from #25523 by Lennart.
2023-06-13 15:31:29 +02:00
Daan De Meyer
7f78d3431b sd-daemon: Add vsock fallback to SOCK_STREAM
SOCK_SEQPACKET is only supported on recent kernels. Let's add a
fallback to SOCK_STREAM if it is not supported.

To accomodate SOCK_STREAM, we also modify
pid_notify_with_fds_internal() to do sendmsg() in a loop as with
SOCK_STREAM, sendmsg() is not guaranteed to write all data in a single
syscall or fail otherwise.
2023-06-13 14:24:44 +02:00
Daan De Meyer
56d02f2969 sd-daemon: Use socket type from vsock address if set
If a socket type is explicitly provided in the vsock address, let's
make sure we try only that socket type.
2023-06-13 14:24:44 +02:00
Daan De Meyer
c31984e3d0 socket-util: Allow specifying socket type in vsock address 2023-06-13 14:24:44 +02:00
Lennart Poettering
768fcd779f socket: bump listen() backlog to INT_MAX everywhere
This is a rework of #24764 by Cristian Rodríguez
<crodriguez@owncloud.com>, which stalled.

Instead of assigning -1 we'll use a macro defined to INT_MAX however.
2023-06-13 14:17:25 +02:00
Lennart Poettering
39b5f49f28 Merge pull request #28014 from bluca/portable_fixes
portabled fixes
2023-06-13 13:19:02 +02:00
Lennart Poettering
05d53d529a Merge pull request #28017 from poettering/link-tmpfile-flags
teach link_tmpfile_at() to properly sync
2023-06-13 13:18:42 +02:00
Luca Boccassi
7d812d7ca1 portable: make sure to fsync after extracting/copying
Just in case we are on a flimsy filesystem/disk
2023-06-13 10:12:00 +01:00
Frantisek Sumsal
fb310ba9eb test: re-enable TEST-02 on ppc64le 2023-06-13 10:15:27 +02:00
Frantisek Sumsal
f087837c46 test: make sure ping works for unprivileged users 2023-06-13 10:15:27 +02:00
Frantisek Sumsal
a6695a431f test: copy file xattrs (if any) as well 2023-06-13 10:15:27 +02:00
Frantisek Sumsal
bdee55672a test: merge TEST-61-UNITTESTS-QEMU with TEST-02-UNITTESTS
The test was originally introduced for Ubuntu CI, as it uses
PREFER_NSPAWN=1, but it was subsequently disabled two years ago [0], so
it was pretty much useless. Let's merge it into TEST-02 and tweak it a
bit to run only certain tests under QEMU when $TEST_PREFER_NSPAWN is
set.

[0] b152adbfa9
2023-06-13 10:15:27 +02:00
Frantisek Sumsal
d5a937a62a proc-cmdline: parse the whole /proc/cmdline
The kernel command line may contain newlines which kernel happily
accepts, but we'd ignore everything past the first newline. Let's fix
that by replacing read_one_line_file() with read_full_file().
2023-06-13 09:54:02 +02:00
Lennart Poettering
8dfd099b50 tree-wide: start properly syncing at various places we so far didn't
Let's better be safe than sorry, and install files fully safely now that
is is easy.
2023-06-13 09:50:10 +02:00
Lennart Poettering
74402bf01a coredump: port over code to new LINK_TMPFILE_SYNC flag 2023-06-13 09:49:35 +02:00
Lennart Poettering
ce67bf366f tmpfile-util: add new LINK_TMPFILE_SYNC flag for syncing properly before/after linking in the file
This syncs the data before linking it in, and both data + dir once done.
This should give us proper semantics for installing files safely into
the fs.
2023-06-13 09:45:39 +02:00
Lennart Poettering
27e18c23bc tmpfile-util: turn last parameter of link_tmpfile() into a proper flags
This changes a boolean param into a proper bitflag field.

Given this only defines a single flag for now this doesn't look like
much of an improvement. But we'll add another flag shortly, where it
starts to make more sense.
2023-06-13 09:40:53 +02:00
Luca Boccassi
5a41a142ba portable: do not extract empty unit files
Bare minimum sanity check, an empty unit is an invalid unit so
skip it early.
2023-06-13 00:33:21 +01:00
Lennart Poettering
0f85a0d38f update TODO 2023-06-12 23:00:47 +02:00
Jan Janssen
b4eb2de7e3 boot: Unify protocol opening
We are using HandleProtocol everywhere except in these few cases. This
unifies on HandleProtocol as it is simpler to use and equivalent to
OpenProtocol.

The only difference between the two is that OpenProtocol attributes the
opened protocol to a firmware-owned handle instead of our image handle.
This has no real use for regular UEFI applications as any protocols
opened via BY_HANDLE or GET_PROTOCOL is not required to be closed. In
fact, when a protocol is uninstalled it will do nothing more than reduce
the open count for these.
2023-06-12 21:12:11 +01:00
Lennart Poettering
2efddcb245 man: explain timesyncd epoch mtime touch files in a bit more detail
Let's mention what /usr/lib/clock-epoch precisely does, and underline we
only *advance* the time based on it.

Inspired by Darkdragon-001's #23214.

Replaces #23214
2023-06-12 14:29:25 +01:00
Lennart Poettering
2d5d4f2f3e Merge pull request #27989 from poettering/message-append-string-set
common helpers for serializing Set of strings into bus message
2023-06-12 14:12:05 +02:00
Lennart Poettering
fefefcd573 bus-util: add bus_property_get_string_set() helper
This is a common implementation of a property getter for a Set of
strings.
2023-06-12 11:35:52 +02:00
Lennart Poettering
9298af8dd3 bus-util: add bus_message_append_string_set() helper
This new helper adds all strings from a Set object as a string array to
a message.

Various places where we have similar code are then ported over to this.
2023-06-12 11:34:26 +02:00
Yu Watanabe
2824385c4e test: drop test for IFLA_NUM_RX_QUEUES
The attribute is not included in the netlink message if the kernel
built with CONFIG_RPS disabled.

Fixes #27969.
2023-06-12 09:37:11 +02:00
Luca Boccassi
d30d9bf0ac meson: add systemd.pc and udev.pc to 'devel' target/tag
Same as the other pkg-config files, it is useful to install these in a specific
target that doesn't require compiling anything
2023-06-12 14:45:42 +09:00
Frantisek Sumsal
581427bd65 test: make coverage runs happy again 2023-06-11 12:29:59 +01:00
Yu Watanabe
628d56bcf6 Merge pull request #27980 from bluca/tests
add unit tests for *DirectorySymlink= and deserialize_strv helper
2023-06-10 17:46:10 +09:00
Lennart Poettering
fcc0668282 execute: fix minor type confusion
The .gl_pathc field is size_t, hence count in size_t too, to not
accidentally drop 32 of 64bits on the floor.
2023-06-10 15:12:40 +09:00
Benjamin Raison
4fd7c712dc hwdb: fix arrow keys on HP Elite Dragonfly G3 2023-06-10 15:05:27 +09:00
Mike Yuan
13119207da battery-util: debug log when we're unsure about the battery level 2023-06-09 22:00:34 +02:00
Luca Boccassi
3397a14327 man: 'flag' parameter in portable1 spec is now used
It has been used for a while, and it is described fully a couple of
paragraphs below, but this snippet was not deleted.
2023-06-09 21:59:51 +02:00