1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

65305 Commits

Author SHA1 Message Date
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
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
Nick Rosbrook
c5ea147104 tree-wide: fix typos of "boottime"/"BOOTTIME" 2023-06-09 21:59:36 +02:00
Luca Boccassi
1d6f1e2fa1 serialize: add deserialize_strv helper 2023-06-09 00:49:19 +01:00
Luca Boccassi
71588cb6ad test-execute: add unit tests for *DirectorySymlink= 2023-06-08 23:11:42 +01:00
Lennart Poettering
986a514bab xdg-autostart-generator: extend start timeout
The current start + stop timeouts for xdg autostart files are *very*
short with 5s. On a busy system this might be too easy to hit even in
unintended case.

Apparently, the intention here was to cut the shutdown logic short.
(https://github.com/systemd/systemd/issues/27919#issuecomment-1580576178)
Let's hence stick to the very short timeout for that (under the
assumption that apps are written in a safe enough style to not lose data
if killed too early). But for starting XGD autostrat services, use our
regular timeouts.

See: #27919
2023-06-08 22:52:42 +01:00
Jan Janssen
7da9db535c boot: Fix memory leak 2023-06-08 20:41:16 +01:00
Luca Boccassi
4021e9e3e9
Merge pull request #26059 from DaanDeMeyer/cred-glob
creds: Add ImportCredential=
2023-06-08 20:40:37 +01:00
Luca Boccassi
d45ed5bf25
Merge pull request #26848 from yuwata/kernel-install
kernel-install: rewrite in C
2023-06-08 20:23:10 +01:00
Alfred Klomp
a2160ba061 integritysetup: support mode=(journal|bitmap|direct)
Add a parameter to the integritytab file to set the mode in which to
open the integrity volume. The mode can be journaled (the default),
bitmap without a journal, or direct mode without a journal or a bitmap.

This change removes the `no-journal' option because it is redundant,
being replaced with `mode=direct'.

Supercedes commit bcc1ee56c, from a week ago, which implemented
`no-journal'.

Resolves #27587
2023-06-08 20:21:59 +01:00
Philip Withnall
e6d712430b man/os-release: Add VENDOR_NAME= and VENDOR_URL= keys to os-release
These will be used in UIs to refer to the company or organization which
produces the OS separately from referring to the OS itself.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #27777
2023-06-08 18:54:56 +01:00
Lennart Poettering
3122f4d752 man: document that "systemctl mask" doesn't work for units whose file is in /etc
Fixes: #27965
2023-06-08 18:53:01 +01:00
Luca Boccassi
ccc14f0812
Merge pull request #27712 from ddstreet/tpm2_simplify_srk
Tpm2 simplify srk
2023-06-08 18:52:31 +01:00
Mike Yuan
2221aaff0f ac-power: fix a typo 2023-06-08 16:44:15 +02:00
Lennart Poettering
dbbf0618d0 man: reference naming of triggered services of timer unit
Fixes: #27116
2023-06-08 14:54:30 +02:00
Lennart Poettering
e6cac8b540
Merge pull request #27968 from poettering/may-gc-tweaks
pid1: some minor GC logic tweaks
2023-06-08 14:54:09 +02:00
Mike Yuan
842248b05e
Merge pull request #27961 from poettering/journalctl-user-unit-man-fix
journalctl: fix --user when invoked by system users
2023-06-08 20:19:07 +08:00
Daan De Meyer
1ab6ae1957 units: Use ImportCredential= where applicable 2023-06-08 14:09:36 +02:00
Daan De Meyer
bbfb25f4b9 creds: Add ImportCredential=
ImportCredential= takes a credential name and searches for a matching
credential in all the credential stores we know about it. It supports
globs which are expanded so that all matching credentials are loaded.
2023-06-08 14:09:18 +02:00