1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
Commit Graph

60030 Commits

Author SHA1 Message Date
Daan De Meyer
3dd73ea77e dissect: Process verity sig partitions if a root hash is specified
If a root hash is specified, we should be checking that it matches
the root hash in the verity signature partition, so let's not skip
processing of the verity signature partitions if a root hash is
specified.
2022-09-23 12:24:09 +02:00
Daan De Meyer
3c5f7ec4ca test: Install openssl 3 extra library dependencies 2022-09-23 12:24:09 +02:00
Daan De Meyer
738edfe667 dissect: Log when we fail to load the verity signature partition 2022-09-23 12:24:09 +02:00
Daan De Meyer
bc259e2338 repart: Rename verity integration test definition files 2022-09-23 12:24:09 +02:00
Daan De Meyer
9c98e277e9 repart: Improve missing libcryptsetup error message 2022-09-23 12:24:09 +02:00
Daan De Meyer
b6db96a2a6 repart: Rename context_verity() to context_verity_hash() 2022-09-23 12:24:09 +02:00
Daan De Meyer
c8f38bf077
Merge pull request #24797 from yuwata/networkctl
networkctl: several table format updates
2022-09-23 08:45:47 +02:00
Yu Watanabe
f8d7c0c55e networkctl: re-order entries in status command
Also fixes "Speed:" field, which may show empty value.
2022-09-23 11:20:26 +09:00
Yu Watanabe
767bc538c5 test-network: fix matching string
This partially reverts 5515f2169c.
As the commit changes 'networkctl list', not 'networkctl status'.
2022-09-23 10:43:17 +09:00
Yu Watanabe
3874765735 networkctl: use "-" for empty LLDP entries 2022-09-23 10:39:42 +09:00
Yu Watanabe
67c3e1f63a udev: support by-path devlink for multipath nvme block devices
If multipath feature is enabled, nvme block devices may belong to the
"nvme-subsystem" subsystem, instead of "nvme" subsystem.
(What a confusing name...)

Then, the syspath is something like the following,
    /sys/devices/virtual/nvme-subsystem/nvme-subsys0/nvme0n1
Hence, we need to find the 'real parent' device, such as
    /sys/devices/pci0000:00/0000:00:1c.4/0000:3c:00.0/nvme/nvme0

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2031810.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2124964.
Replaces #24748.
2022-09-23 10:21:46 +09:00
Yu Watanabe
68f2134954
Merge pull request #24790 from poettering/run-chdir
run: let's make --working-directory= just work with --scope
2022-09-23 10:20:14 +09:00
Adam Williamson
97f9950698 kbd-model-map: add a mapping for switched czech qwerty/us
See https://bugzilla.redhat.com/show_bug.cgi?id=2121106 for the
background on this. One of Fedora's QA folks ran an install
and chose two keyboard layouts: Czech (qwerty) and US. Due to
the sad details of how the whole logic flow for trying to decide
what kbd layout best matches a given xkb config works (see
details in the bug comments), we wound up deciding the best-
matching kbd layout for this situation was cz-us-qwertz, which
is a czech/us switched layout, but is qwertz, not qwerty. This
seems like a poor outcome. Adding this line should result in us
picking cz-qwerty in this case. Which may be the 'legacy'
cz-qwerty.map from upstream kbd project (which is switched
cz/us), or may be the auto-converted xkb layout (which obviously
isn't switched). But either way, at least its primary mode is
Czech qwerty, which seems like a *better* choice than a layout
whose primary mode is Czech qwertz.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-09-23 10:19:41 +09:00
Luca Boccassi
c9d65b921b
Merge pull request #24771 from poettering/destroy-pcr11
extend boot phase information into PCR 11 during boot
2022-09-22 20:08:27 +01:00
Antonio Alvarez Feijoo
b5f8a35f39 man/portablectl: fix references to options 2022-09-22 20:04:49 +01:00
Daan De Meyer
e3a1cd9e98
Merge pull request #24746 from DaanDeMeyer/repart-split
repart: Add --split option to generate split artifacts
2022-09-22 19:09:12 +02:00
Lennart Poettering
7dad781102 update TODO 2022-09-22 16:57:58 +02:00
Lennart Poettering
1a9c67a98a measure: clarify we actually try to calculate for all four banks by default 2022-09-22 16:56:57 +02:00
Lennart Poettering
a434e25f52 measure: make --public-key= optional if "sign" is called
We can derive the public key from the private key, so let's do that, to
make things a bit easier.
2022-09-22 16:55:56 +02:00
Lennart Poettering
6ca0016398 measure: allow pre-calculating PCR values for multiple boot phases 2022-09-22 16:54:48 +02:00
Lennart Poettering
40f1856791 units: add pcrphase units 2022-09-22 16:53:34 +02:00
Lennart Poettering
708d752479 boot: add new pcrphase tool to measure barrier strings into PCR 11 2022-09-22 16:52:06 +02:00
Lennart Poettering
c5bf1f85cb tpm2-util: add helper for determining enabled/used PCR banks 2022-09-22 16:50:53 +02:00
Lennart Poettering
59fafaee5d tpm2-util: split out code that checks if bank has 24 pcrs into helper function of its own
Just some refactoring, not change in behaviour.
2022-09-22 16:49:47 +02:00
Lennart Poettering
1421943a71 tpm2-util: pick up Esys_PCR_Extend() symbol too 2022-09-22 16:48:11 +02:00
Zbigniew Jędrzejewski-Szmek
28f619d174
Merge pull request #24781 from DaanDeMeyer/link-remove-check
systemctl: Remove check that linked unit files must contain a "/"
2022-09-22 15:38:16 +02:00
Daan De Meyer
4cee83331c repart: Add --split option to generate split artifacts
For use with sysupdate or other systemd tooling, it's useful to be
able to generate split artifacts from disk images, where each
partition is written to a separate file. Let's support this with
a --split switch for repart and a SplitName= configuration option.

--split enables split artifacts generation, and SplitName= configures
for which partition to generate split artifacts, and which suffix to
add to the split artifact name.

For SplitName=, we add support for some extra specifiers, more specifically
the partition Type UUID and the partition UUID.
2022-09-22 15:10:03 +02:00
Daan De Meyer
1e58a0a82c shared: Add GPT_PARTITION_TYPE_UUID_TO_STRING_HARDER() 2022-09-22 14:54:55 +02:00
Daan De Meyer
7b52dc7f4d shared: Add specifier_uint64() 2022-09-22 14:52:37 +02:00
Daan De Meyer
eff69daa69 systemctl: Fix style nit 2022-09-22 14:42:00 +02:00
Lennart Poettering
fecc447766 run: make --working-directory= work for --scope too
This sounds like a more user-friendly alternative to #24780
2022-09-22 14:22:21 +02:00
Lennart Poettering
c7b5ea6955 Revert "systemd-run: refuse --working-directory option with --scope"
This reverts commit 780c805537.
2022-09-22 14:19:10 +02:00
Lennart Poettering
add0c9b8bf
Merge pull request #24768 from keszybz/table-not-available-2
Adjust table n/a text in more places
2022-09-22 14:17:40 +02:00
Daan De Meyer
74235f6d08 shared: Add specifier_id128() and specifier_uuid() 2022-09-22 14:16:57 +02:00
Luca Boccassi
e5a2977c9a
Merge pull request #24620 from poettering/measure-tweaks
measure: some tweaks
2022-09-22 12:53:48 +01:00
Frantisek Sumsal
c03896235d README: drop the LGTM badge 2022-09-22 13:47:49 +02:00
Daan De Meyer
445d29766a systemctl: Improve link directory separator error message
Let's suggest users try ./<filename> when they encounter this error.
2022-09-22 11:57:51 +02:00
Zbigniew Jędrzejewski-Szmek
29ca430865 shared/format-table: use empty_string instead of hardcoding "-" for invalid values
As requested in https://github.com/systemd/systemd/pull/24708#discussion_r973607866.
2022-09-22 10:16:30 +02:00
Zbigniew Jędrzejewski-Szmek
c8b62cf600 shared/format-table: use enum instead of Table.empty_string
All users were setting this to some static string (usually "-"), so let's
simplify things by not doing strdup, but instead limiting callers to a fixed
set of values. In preparation for the next commit, the function is renamed from
"empty" to "replacement", because it'll be used for more than empty fields. I
didn't do the whole string-table setup, because it's all used internally in one
file and this way we can immediately assert if an invalid value is passed in.

Some callers were (void)ing the error, others were ignoring it, and others
propagating. It's nicer to remove the boilerplate.
2022-09-22 10:16:05 +02:00
Joost Heitbrink
780c805537 systemd-run: refuse --working-directory option with --scope
systemd-run's man page says the following about the working directory of
the process:

"If a command is run as transient scope unit, it will be executed
by systemd-run itself as parent process and will thus inherit the
execution environment of the caller."

This means working directory assignment does not work, as evidenced by
the following invocation:
```bash
$ systemd-run --scope --property=WorkingDirectory=/tmp/ bash -c 'echo $(pwd)'
Unknown assignment: WorkingDirectory=/tmp/
```

However, using the shorthand switch --working-directory silently ignores
this instead of giving a similar error.
```bash
systemd-run --scope --user --working-directory=/tmp/ bash -c 'echo $(pwd)'
Running scope as unit: run-r19cc32e744e64285814dbf2204637a2b.scope
/home/test/projects/systemd
```

This commit fixes this by explicitly generating an error instead of
silently ignoring the switch:
```bash
$ systemd-run --scope --working-directory=/tmp/ bash -c 'echo $(pwd)'
--working-directory is not supported in --scope mode.
```
2022-09-22 08:12:08 +09:00
Joost Heitbrink
63ed97efc3 man: don't mention Socket files in Scope man page 2022-09-22 08:09:05 +09:00
Lennart Poettering
4d0d34b4e7
Merge pull request #24709 from keszybz/partition-table-constants
Expose various GPT UUIDs as public contants and link them up in docs
2022-09-21 20:07:21 +02:00
Lennart Poettering
df4bed3f92
Merge pull request #24753 from DaanDeMeyer/repart-squashfs
repart: Add squashfs support
2022-09-21 19:49:10 +02:00
Edson Juliano Drosdeck
e65b02f831
Fix inverted rotation in the Positivo DUO #24769 (#24770)
hwdb: Fix  inverted rotation in the Positivo DUO 

Fixes: #24769
2022-09-21 19:46:42 +02:00
Lennart Poettering
64650de778 stub: fix conditionalization of initrd assembly
We forgot to conditionalize this on pcrsig/pcrpkey too. So if you have
ne creds or sysext configured we actually wouldn't pass pcrsig/pcrpkey
along. Let's fix that.
2022-09-21 19:43:48 +02:00
Zbigniew Jędrzejewski-Szmek
ed1cf1d970 sd-gpt: adjust comments and use UINT64_C() 2022-09-21 15:30:32 +02:00
Zbigniew Jędrzejewski-Szmek
da7dfd8ef5 docs/DPS: use the SD_GPT_* constants here too 2022-09-21 15:30:31 +02:00
Zbigniew Jędrzejewski-Szmek
5515f2169c networkctl: use "-" for empty fields
This looks nicer. Some fields were already using "-" as fallback, e.g. Speed,
so this makes things more consistent too.
2022-09-21 14:48:28 +02:00
Zbigniew Jędrzejewski-Szmek
639405b934 hostnamectl,localectl: use "(unset)" in empty fields
"n/a" is more ambiguous: not available or not set or maybe we didn't check it.
Let's just say directly that the field is not set.
2022-09-21 14:48:28 +02:00
Daan De Meyer
95bfd3cd50 repart: Add squashfs support
To make this work, we have to set up everything in a temporary
directory tree that we can pass to mksquashfs as a single directory.

To make the most common scenario more efficient, we skip the temporary
setup directory if we only get a single source tree destined to root
in the squashfs filesystem.
2022-09-21 14:16:13 +02:00