1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

67393 Commits

Author SHA1 Message Date
Lennart Poettering
0319a28e42 resolved: also expose interface index in server JSON data 2023-09-25 18:45:52 +02:00
Lennart Poettering
8dcce20a27
Merge pull request #29301 from poettering/pcr-extend-rename
rename pcrphase binary to pcrextend
2023-09-25 18:28:03 +02:00
Lennart Poettering
75174a5de9 man: briefly document that we are now keeping an event log in userspace for out measurements 2023-09-25 17:17:20 +02:00
Lennart Poettering
b0d00ec60a pcrextend: make PCR index configurable
Let's make the tool a tiny bit more generic by allowing the PCR index to
measure into to be configurable.
2023-09-25 17:17:20 +02:00
Lennart Poettering
32295fa08f pcrphase: rename binary to pcrextend
The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.

Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.

The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.

While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.
2023-09-25 17:17:20 +02:00
Frantisek Sumsal
7f048f0ed0 test: enable debug logs for the user instances as well
To make debugging [0], hopefully, easier.

[0] https://github.com/systemd/systemd/issues/28504
2023-09-25 15:24:11 +01:00
Luca Boccassi
b7733dfee9
Merge pull request #29303 from abderrahim/syntax-fixes
man: a couple of small fixes
2023-09-25 15:23:48 +01:00
Abderrahim Kitouni
0ee4239437 man: fix docbook syntax for function docs
This fixes sd_bus_error_add_map and man/sd_uid_get_state
2023-09-25 13:34:45 +01:00
Abderrahim Kitouni
d511acdf82 man/kernel-command-line: don't refer early_core_pattern to systemd
It is defined later in the same file
2023-09-25 13:14:34 +01:00
Zbigniew Jędrzejewski-Szmek
61afc53924 docs/FDS: add missing article and reword sentence 2023-09-25 11:30:02 +01:00
Lennart Poettering
02c9d62b30 update TODO 2023-09-25 12:23:29 +02:00
Daan De Meyer
7d376f1dde mkosi: Run meson and ninja as the user invoking mkosi
Latest mkosi sets $MKOSI_UID and $MKOSI_GID to the uid/gid of the
user running mkosi. Let's make use of this to run meson setup and
ninja as the user running mkosi, so that if we execute git as a
subprocess during meson setup, it doesn't complain about unsafe
directories. This also makes sure all the build artifacts are owned
on the host by the user running mkosi.
2023-09-25 11:06:15 +01:00
김인수
e2b8a61919 po: Translated using Weblate (Korean)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main
2023-09-25 12:59:02 +09:00
Alexandre Peixoto Ferreira
13abd00685
sd-dhcp-client: reject NAKs from servers that we did not send an offer to (#29290)
To support multiple DHCP servers in a network.
2023-09-25 11:46:41 +09:00
Takashi Sakamoto
fb86af6399 hwdb: ieee1394-unit-function: add Miglia Technology Harmony Audio (HA02)
This commit adds hwdb entry for Miglia Technology Harmony Audio (HA02).
The device is an application of OXford Semiconductor FW970 and will be
supported by ALSA oxfw driver in future.
2023-09-24 10:56:40 +01:00
Frantisek Sumsal
18c3ffbfcc test: wait for the swtpm socket to appear
On slower/overloaded systems it may take a bit for the swtpm socket
to show up:

I: Started swtpm as PID 189419 with state dir /tmp/tmp.pWqUutuGUj
I: Configured emulated TPM2 device tpm-spapr
+ tee /var/tmp/systemd-test-TEST-70-TPM2_1/console.log
+ timeout --foreground 1200 /bin/qemu-system-ppc64le -smp 4 ...
qemu-system-ppc64le: -chardev socket,id=chrtpm,path=/tmp/tmp.pWqUutuGUj/sock: Failed to connect to '/tmp/tmp.pWqUutuGUj/sock': No such file or directory
E: qemu failed with exit code 1

Spotted regularly in the ppc64le cron job and in some Ubuntu CI/CentOS CI
pr runs [0].

[0] https://github.com/systemd/systemd/pull/29183#issuecomment-1721727927
2023-09-23 11:32:12 +01:00
Frantisek Sumsal
3a89904e45 test: don't panic on soft lockups
We can't do anything about them anyway, and most importantly this seems
to alleviate systemd/systemd-centos-ci#660, which should make the CIs
a bit less angry (at least until the issue is addressed properly).
2023-09-23 14:19:55 +08:00
Luca Boccassi
f5f4486c65
Merge pull request #29254 from yuwata/sd-ndisc-use-usec_t
sd-ndisc: make sd_ndisc return time values in usec
2023-09-22 21:46:50 +01:00
Luca Boccassi
593551a8a2
Merge pull request #29258 from yuwata/sd-dhcp-client-split-out
sd-dhcp-client: preparation for later PR
2023-09-22 21:46:31 +01:00
Yu Watanabe
f9edbb80e9 sd-dhcp-client: split out client_parse_message()
No functional change, just refactoring and preparation for later
commits.
2023-09-23 01:38:21 +09:00
Yu Watanabe
db849df5a1 sd-dhcp-client: introduce dhcp_lease_unref_and_replace() 2023-09-23 01:38:21 +09:00
Yu Watanabe
8fc725052a sd-dhcp-client: do not set fallback subnet mask if it is already set 2023-09-23 01:38:21 +09:00
Yu Watanabe
2ff1e23036 sd-dhcp-client: split out client_enter_requesting()
No functional change, just refactoring and preparation for later
commits.
2023-09-23 01:38:21 +09:00
Yu Watanabe
525717b87c sd-dhcp-client: split out client_enter_bound()
No functional change, just refactoring and preparation for later
commits.
2023-09-23 01:38:21 +09:00
Yu Watanabe
6197db53ba sd-ndisc: make sd_ndisc return time values in usec
This also introduces sd_ndisc_router_get_lifetime_timestamp() and
friends that return timestamp rather than timespan.
2023-09-23 01:34:56 +09:00
Mike Yuan
e504e46515 btrfs-util: fix one memory leak
Follow-up for efb6a76a2a
2023-09-23 00:13:06 +08:00
RoepLuke
c9bb40b133 Add recommended initramfs regeneration
I recently tried adding a FIDO2-Device as an unlocking method to the LUKS2 partition containing my Fedora install.
When trying to do this, I stumbled upon the here edited man files detailing how to do this.
I however could not unlock my partition with my FIDO2-Device after editing /etc/crypttab and rebooting.
As I found out after a while, I needed to regenerate / update my currently running / used initramfs (https://unix.stackexchange.com/a/705809).
This would have most likely solved itself for me with the next kernel update install (as far as I understand).
So I propose changing the files edited here to recommend or at least inform the user about this.
2023-09-22 16:02:44 +01:00
Daan De Meyer
021b0ff405 repart: Don't fail on boot if we can't find the root block device
When booting from virtiofs, we won't be able to find a root block
device. Let's gracefully handle this similar to how we don't fail
if we can't find a GPT partition table.
2023-09-22 16:01:12 +01:00
Luca Boccassi
8bf1d14112
Merge pull request #29282 from YHNdnzj/hibernate-resume-meson
hibernate-resume: minor follow-up for meson and header file
2023-09-22 15:46:09 +01:00
Mike Yuan
17ad085993
hibernate-resume: add missing #pragma once 2023-09-22 21:03:48 +08:00
Mike Yuan
3494a8b904
hibernate-resume: break lines in meson.build files() 2023-09-22 21:02:55 +08:00
Zbigniew Jędrzejewski-Szmek
a0fe45a93f
Merge pull request #29224 from keszybz/netdev-config-parsing
Use a helper to simplify parsing of ranges in netdev config and related changes
2023-09-22 14:29:47 +02:00
Daan De Meyer
fc5473b737 mkosi: Don't skip initrd dependency when building a directory image
mkosi now supports booting directory images in qemu using virtiofs.
However, until distribution kernels build the virtiofs driver directly
into the kernel, we need an initrd to make this work, so make sure to
pull in the initrd preset when building a directory image that could be
bootable to make this work.
2023-09-22 13:52:02 +02:00
Zbigniew Jędrzejewski-Szmek
f75921c7fd netdev/wireguard: define iterator variable in the loop 2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
117843fe95 network: make DEFINE_NETDEV_CAST() assert on input and output
The macro used to return NULL if input was NULL or had the wrong type. Now
it asserts that input is nonnull and it has the expected type.

There are a few places where a missing or mismatched type was OK, but in a
majority of places, we would do both of the asserts. In various places we'd
only do one, but that was by ommission/mistake. So moving the asserts into the
macro allows us to save some lines.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
6c9935ba87 network/netdev: align tables 2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
6fded8dced network/netdev: fix resetting of 'inherit' field
We have two fields: inherit and ttl, and ttl is ignored if inherit is true.
Setting TTL=inherit and later TTL=n would not work because we didn't unset
inherit.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
af14281d2c network: refusing parsing negative flow labels
The docs for FlowLabel= said that the range is 0..1048575, but the code did not
reject negative numbers.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
a893c121ed network/fou-tunnel: simplify parsing of protocol number
Previously, we would call parse_ip_protocol(), which internally calls
safe_atoi(), and then call safe_atou(). This isn't terrible, but it's also
slightly confusing. Use parse_ip_protocol_full() to avoid the second call.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
1b2733b412 shared/ip-procotol-list: generalize and rework parse_ip_protocol()
Optionally, accept protocols that don't have a known name.
Avoid any allocations in the common case.
Return more granular error codes: -ERANGE for negative values,
-EOPNOTSUPP if the protocol is a valid number, but we don't know
the protocol, and -EINVAL only if it's not a numerical string.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
04c2a002e6 network/vxlan: avoid unneccesary temporary variables
parse_ip_port_range() DTRT and only sets the output on success.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
257cebb67a network/netdev: use ASSERT_PTR() more, adjust indentation 2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
851cdffd1b network: use a common helper to parse bounded ranges
This compresses repetetive code and makes it easier to add new options
in networkd. The formatting of error messages becomes uniform. The
error message always specifies the rvalue literally, instead of using
a "descriptive name". This makes the message much easier to handle for
the user.

I opted to add just one parser, and wrap it with inline functions to proxy
the type. This is less verbose than copying functions for each type
separately, and the compiler should be able to get rid of the inline wrapper
almost entirely.

asserts are reordered to use the same order as the parameter list.
This makes the code easier to read.

No functional change intended, apart from the difference in error message
formatting.
2023-09-22 08:16:47 +02:00
Jordan Rome
71e5a35a5b Add mkosi.conf to gitignore 2023-09-22 08:14:10 +02:00
Adam Williamson
537c00c984 find_legacy_keymap: extend variant match bonus again
If the column is "-" and the X context variant specifer only
contains commas, we should also give the match bonus. The variant
string is supposed to be a comma-separated list as long as the
list of layouts, so it's quite natural for consumers to be written
in such a way that they pass a string only containing commas if
there are multiple layouts and no variants. anaconda is a real
world case that does this.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-09-22 08:07:12 +02:00
Yu Watanabe
c650d4cdef sd-journal: refuse entry objects with an empty boot ID
Otherwise, e.g. sd_journal_get_monotonic_usec() return an empty boot ID
when called for such a broken entry object.

Such a broken object may be stored when the system was not cleanly shutdown.

Fixes #29167.
2023-09-22 08:05:53 +02:00
Yu Watanabe
3231f624e6 sd-ndisc: rename function arguments for storing results 2023-09-22 02:17:31 +09:00
Mike Yuan
1365355d14 elf2efi: fix a typo 2023-09-21 19:16:11 +02:00
Luca Boccassi
8ae3c292e3 meson: relax ukify requirements
Installing ukify.py doesn't require a working UEFI architecture, but
only that the bootloader option is enabled (and python3). On Debian
Arch: all packages (like python scripts) can theorethically be built
on any builder with any architecture, so there's no guarantee that
it will actually be an EFI-enabled architecture to do that package build.

Relax the requirement to check only for the ukify config option.
2023-09-21 18:15:57 +02:00
Zbigniew Jędrzejewski-Szmek
67bc612cbc systemctl: link to all non-man-page files in help
For file:// links, we urlify the link so that the user can click and either
open the file in a editor or some viewer. The detection is chosen via some
mechanism implemented by the terminal emulator. This seems too DTRT for text
files and PDFs, which should cover the majority of realistic cases. If the file
is not viable, the terminal emulator will say
  "Could not open file://…. No application is registered to view this file type."
or similar.

For all other links, which are primarily http:// and https://, we just show the
link, letting the terminal handle the hyperlinking. The user can then ctrl-click
and open the file it their browser. If we tried to open the files automatically,
we'd would need to open many pages, and we'd need to figure out what browser to
use, etc. When the user picks whether to open the file, this leads to a nicer
user experience.

Man pages are separated by an empty line from preceding in and following output.
In my testing, this makes the output easier to read. A bit of explicit flushing
is needed to make sure that various outputs are not interleaved.

Fixes https://github.com/systemd/systemd/issues/29061.
2023-09-21 18:09:48 +02:00