Daan De Meyer [Fri, 23 Sep 2022 12:17:20 +0000 (14:17 +0200)]
openssl-util: Allow declaring openssl struct pointers without openssl
Daan De Meyer [Fri, 23 Sep 2022 12:08:40 +0000 (14:08 +0200)]
docs: Mention that "certificateFingerprint" source should be in DER
Daan De Meyer [Fri, 23 Sep 2022 10:40:13 +0000 (12:40 +0200)]
basic: Add strgrowpad0()
Daan De Meyer [Sun, 18 Sep 2022 13:36:59 +0000 (15:36 +0200)]
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.
Daan De Meyer [Sat, 17 Sep 2022 20:35:19 +0000 (22:35 +0200)]
test: Install openssl 3 extra library dependencies
Daan De Meyer [Sat, 17 Sep 2022 20:34:56 +0000 (22:34 +0200)]
dissect: Log when we fail to load the verity signature partition
Daan De Meyer [Sun, 11 Sep 2022 11:43:17 +0000 (13:43 +0200)]
repart: Rename verity integration test definition files
Daan De Meyer [Sun, 11 Sep 2022 08:47:18 +0000 (10:47 +0200)]
repart: Improve missing libcryptsetup error message
Daan De Meyer [Sat, 10 Sep 2022 20:12:57 +0000 (22:12 +0200)]
repart: Rename context_verity() to context_verity_hash()
Daan De Meyer [Fri, 23 Sep 2022 06:45:47 +0000 (08:45 +0200)]
Merge pull request #24797 from yuwata/networkctl
networkctl: several table format updates
Yu Watanabe [Fri, 23 Sep 2022 02:18:30 +0000 (11:18 +0900)]
networkctl: re-order entries in status command
Also fixes "Speed:" field, which may show empty value.
Yu Watanabe [Fri, 23 Sep 2022 01:43:10 +0000 (10:43 +0900)]
test-network: fix matching string
This partially reverts
5515f2169cb5980996044eabb5f1b35e00fd81eb.
As the commit changes 'networkctl list', not 'networkctl status'.
Yu Watanabe [Fri, 23 Sep 2022 01:39:42 +0000 (10:39 +0900)]
networkctl: use "-" for empty LLDP entries
Yu Watanabe [Tue, 20 Sep 2022 17:26:42 +0000 (02:26 +0900)]
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.
Yu Watanabe [Fri, 23 Sep 2022 01:20:14 +0000 (10:20 +0900)]
Merge pull request #24790 from poettering/run-chdir
run: let's make --working-directory= just work with --scope
Adam Williamson [Thu, 22 Sep 2022 22:08:43 +0000 (15:08 -0700)]
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>
Luca Boccassi [Thu, 22 Sep 2022 19:08:27 +0000 (20:08 +0100)]
Merge pull request #24771 from poettering/destroy-pcr11
extend boot phase information into PCR 11 during boot
Antonio Alvarez Feijoo [Thu, 22 Sep 2022 13:13:21 +0000 (15:13 +0200)]
man/portablectl: fix references to options
Daan De Meyer [Thu, 22 Sep 2022 17:09:12 +0000 (19:09 +0200)]
Merge pull request #24746 from DaanDeMeyer/repart-split
repart: Add --split option to generate split artifacts
Lennart Poettering [Mon, 19 Sep 2022 10:52:40 +0000 (12:52 +0200)]
update TODO
Lennart Poettering [Thu, 22 Sep 2022 14:20:38 +0000 (16:20 +0200)]
measure: clarify we actually try to calculate for all four banks by default
Lennart Poettering [Thu, 22 Sep 2022 14:19:58 +0000 (16:19 +0200)]
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.
Lennart Poettering [Sat, 17 Sep 2022 13:22:54 +0000 (15:22 +0200)]
measure: allow pre-calculating PCR values for multiple boot phases
Lennart Poettering [Fri, 16 Sep 2022 22:50:38 +0000 (00:50 +0200)]
units: add pcrphase units
Lennart Poettering [Fri, 16 Sep 2022 21:57:26 +0000 (23:57 +0200)]
boot: add new pcrphase tool to measure barrier strings into PCR 11
Lennart Poettering [Fri, 16 Sep 2022 21:31:09 +0000 (23:31 +0200)]
tpm2-util: add helper for determining enabled/used PCR banks
Lennart Poettering [Fri, 16 Sep 2022 21:17:48 +0000 (23:17 +0200)]
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.
Lennart Poettering [Fri, 16 Sep 2022 21:15:41 +0000 (23:15 +0200)]
tpm2-util: pick up Esys_PCR_Extend() symbol too
Zbigniew Jędrzejewski-Szmek [Thu, 22 Sep 2022 13:38:16 +0000 (15:38 +0200)]
Merge pull request #24781 from DaanDeMeyer/link-remove-check
systemctl: Remove check that linked unit files must contain a "/"
Daan De Meyer [Mon, 19 Sep 2022 14:58:20 +0000 (16:58 +0200)]
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.
Daan De Meyer [Thu, 22 Sep 2022 12:54:33 +0000 (14:54 +0200)]
shared: Add GPT_PARTITION_TYPE_UUID_TO_STRING_HARDER()
Daan De Meyer [Thu, 22 Sep 2022 12:39:44 +0000 (14:39 +0200)]
shared: Add specifier_uint64()
Daan De Meyer [Thu, 22 Sep 2022 12:42:00 +0000 (14:42 +0200)]
systemctl: Fix style nit
Lennart Poettering [Thu, 22 Sep 2022 12:21:46 +0000 (14:21 +0200)]
run: make --working-directory= work for --scope too
This sounds like a more user-friendly alternative to #24780
Lennart Poettering [Thu, 22 Sep 2022 12:19:10 +0000 (14:19 +0200)]
Revert "systemd-run: refuse --working-directory option with --scope"
This reverts commit
780c8055378589e5a7d419789761c35d05295291.
Lennart Poettering [Thu, 22 Sep 2022 12:17:40 +0000 (14:17 +0200)]
Merge pull request #24768 from keszybz/table-not-available-2
Adjust table n/a text in more places
Daan De Meyer [Mon, 19 Sep 2022 13:35:17 +0000 (15:35 +0200)]
shared: Add specifier_id128() and specifier_uuid()
Luca Boccassi [Thu, 22 Sep 2022 11:53:48 +0000 (12:53 +0100)]
Merge pull request #24620 from poettering/measure-tweaks
measure: some tweaks
Frantisek Sumsal [Thu, 22 Sep 2022 11:47:49 +0000 (13:47 +0200)]
README: drop the LGTM badge
Daan De Meyer [Wed, 21 Sep 2022 18:42:06 +0000 (20:42 +0200)]
systemctl: Improve link directory separator error message
Let's suggest users try ./<filename> when they encounter this error.
Zbigniew Jędrzejewski-Szmek [Tue, 20 Sep 2022 18:39:16 +0000 (20:39 +0200)]
shared/format-table: use empty_string instead of hardcoding "-" for invalid values
As requested in https://github.com/systemd/systemd/pull/24708#discussion_r973607866.
Zbigniew Jędrzejewski-Szmek [Tue, 20 Sep 2022 18:38:27 +0000 (20:38 +0200)]
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.
Joost Heitbrink [Wed, 21 Sep 2022 18:11:44 +0000 (20:11 +0200)]
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.
```
Joost Heitbrink [Wed, 21 Sep 2022 18:57:09 +0000 (20:57 +0200)]
man: don't mention Socket files in Scope man page
Lennart Poettering [Wed, 21 Sep 2022 18:07:21 +0000 (20:07 +0200)]
Merge pull request #24709 from keszybz/partition-table-constants
Expose various GPT UUIDs as public contants and link them up in docs
Lennart Poettering [Wed, 21 Sep 2022 17:49:10 +0000 (19:49 +0200)]
Merge pull request #24753 from DaanDeMeyer/repart-squashfs
repart: Add squashfs support
Edson Juliano Drosdeck [Wed, 21 Sep 2022 17:46:42 +0000 (14:46 -0300)]
Fix inverted rotation in the Positivo DUO #24769 (#24770)
hwdb: Fix inverted rotation in the Positivo DUO
Fixes: #24769
Lennart Poettering [Wed, 21 Sep 2022 14:42:26 +0000 (16:42 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Sun, 18 Sep 2022 11:20:05 +0000 (13:20 +0200)]
sd-gpt: adjust comments and use UINT64_C()
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 11:01:11 +0000 (13:01 +0200)]
docs/DPS: use the SD_GPT_* constants here too
Zbigniew Jędrzejewski-Szmek [Tue, 20 Sep 2022 18:41:31 +0000 (20:41 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 20 Sep 2022 18:12:50 +0000 (20:12 +0200)]
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.
Daan De Meyer [Mon, 19 Sep 2022 18:26:15 +0000 (20:26 +0200)]
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.
Daan De Meyer [Wed, 21 Sep 2022 09:12:59 +0000 (11:12 +0200)]
Merge pull request #24751 from medhefgo/stub-x86
stub: Several fixes
Daan De Meyer [Mon, 19 Sep 2022 18:24:55 +0000 (20:24 +0200)]
shared: Add squashfs support to make_filesystem()
The caveat is that the caller has to provide a source directory
to initialize the squashfs filesystem from.
Daan De Meyer [Wed, 21 Sep 2022 08:30:51 +0000 (10:30 +0200)]
Merge pull request #24522 from yuwata/core-device-drop-nonexistent-devlink-unit
core/device: drop nonexistent devlink units
наб [Tue, 20 Sep 2022 23:21:20 +0000 (01:21 +0200)]
kernel-install.8: fix -h/-v ordering in SYNOPSIS
наб [Tue, 20 Sep 2022 23:05:37 +0000 (01:05 +0200)]
kernel-install/90-loaderentry: fix chown
Yu Watanabe [Wed, 31 Aug 2022 19:40:21 +0000 (04:40 +0900)]
test-17-udev: test that device units for nonexistent devlink are removed
For issue #24518.
Yu Watanabe [Wed, 31 Aug 2022 19:12:25 +0000 (04:12 +0900)]
test-64-storage: add test for renaming lvm volume
Yu Watanabe [Wed, 31 Aug 2022 18:48:02 +0000 (03:48 +0900)]
test-64-udev-storage: check device units
Yu Watanabe [Tue, 20 Sep 2022 18:30:11 +0000 (03:30 +0900)]
core/device: check that no unit is ready and not simultaneously
This should not happen, just for safety.
Yu Watanabe [Tue, 20 Sep 2022 18:13:46 +0000 (03:13 +0900)]
core/device: refuse alias with ".."
Yu Watanabe [Wed, 31 Aug 2022 16:17:27 +0000 (01:17 +0900)]
core/device: always update existing devlink or alias units on uevent
Previously, existing device units for devlinks or aliases were not
removed unless the main device unit is removed. This makes all existing
device units for devlinks and aliases are checked if they are still
required, and remove if not necessary anymore.
Fixes #24518.
Frantisek Sumsal [Tue, 20 Sep 2022 17:12:18 +0000 (19:12 +0200)]
test: don't overwrite existing $QEMU_OPTIONS
Daan De Meyer [Tue, 20 Sep 2022 18:24:10 +0000 (20:24 +0200)]
mkosi: Set ExtraSearchPaths=build/ by default
When hacking on systemd, let's have mkosi prefer executables from
the build directory over the system ones.
Lennart Poettering [Tue, 20 Sep 2022 19:51:22 +0000 (21:51 +0200)]
Merge pull request #24521 from poettering/boot-loader-spec-dollar-boot-fix
boot loader spec fixes
Lennart Poettering [Wed, 31 Aug 2022 16:43:24 +0000 (18:43 +0200)]
boot-loader-spec: undo redefinition of $BOOT
In
53c26db4dac0f5b79ca2a57364ee7df78a14bbfd the meaning of $BOOT was
redefined. I think that's quite problematic, since the concept is
implemented in code and interface of bootctl. Thus, I think we should
stick to the original definition, which is: "where to *place* boot menu
entries" (as opposed to "where to *read* boot menu entries from").
The aforementioned change was done to address two things afaiu:
1. it focussed on a $BOOT as the single place to put boot entries in,
instead of mentioning that both ESP and $BOOT are expected to be
the source
2. it mentioned the /loader/ dir (as location for boot loader resources)
itself as part of the spec, which however only really makes sense in
the ESP. /loader/entries/ otoh makes sense in either the ESP or
$BOOT.
With this rework I try to address these two issues differently:
1. I intend to make clear the $BOOT is the "primary" place to put stuff
in, and is what should be mounted to /boot/.
2. The ESP (if different from $BOOT) is listed as "secondary" source to
read from, and is what should be mounted to /efi/. NB we now make the
distinction between "where to put" (which is single partition) and
"where to read from".
3. This drops any reference of the /loader/ dir witout the /entries/
suffix. Only the full /loader/entries/ dir (and its companion file
/loader/entries.srel) are now mentioned. Thus isolated /loader/
directory hence becomes irrelevant in the spec, and the fact that
sd-boot maintains some files there (and only in the ESP) is kept out
of the spec, because it is irrelevant to other boot loaders.
4. It puts back the suggestion to mount $BOOT to /boot/ and the ESP to
/efi/ (and suggests adding a symlink or bind mount if both are the
same partition). Why? Because the dirs are semantically unrelated:
it's OK and common to have and ESP but no $BOOT, hence putting ESP
inside of a useless, non-existing "ghost" dir /boot/ makes little
sense. More importantly though, because these partitions are
typically backed by VFAT we want to maintain them as an autofs, with
a short idle delay, so that the file systems are unmounted (and thus
fully clean) at almost all times. This doesn't work if they are
nested within each other, as the establishment of the inner autofs
would pin the outer one, making the excercise useless. Now I don't
think the spec should mention autofs (since that is an implementation
detail), but it should arrange things so that this specific, very
efficient, safe and robust implementation can be implemented.
The net result should be easy from an OS perspective:
1. *Put* boot loader entries in /boot/, always.
2. *Read* boot loader entries from both /boot/ and /efi/ -- if these are distinct.
3. The only things we define in the spec are /loader/entries/*.conf and
/EFI/Linux/*.efi in these two partitions (well, and the companion
file /loader/entries.srel
4. /efi/ and /boot/ because not nested can be autofs.
5. bootctl code and interface (in particular --esp-path= and
--boot-path=) match the spec again. `bootctl -x` and `bootctl -p`
will now print the path to $BOOT and ESP again, matching the concepts
in the spec again.
From the sd-boot perspective things are equally easy:
1. Read boot enrties from ESP and XBOOTLDR.
2. Maintain boot loader config/other resources in ESP only.
And that's it.
Fixes: #24247
Lennart Poettering [Wed, 31 Aug 2022 16:31:02 +0000 (18:31 +0200)]
boot-loader-spec: fix typo
Lennart Poettering [Wed, 31 Aug 2022 16:30:33 +0000 (18:30 +0200)]
boot-loader-spec: add comment about case sensitivity of file names
Luca Boccassi [Tue, 20 Sep 2022 19:08:18 +0000 (20:08 +0100)]
TODO: drop support for unmerged-usr in H2 2023
Yu Watanabe [Thu, 1 Sep 2022 01:21:30 +0000 (10:21 +0900)]
core/device: introduce device_propagate_reload()
Yu Watanabe [Thu, 1 Sep 2022 00:01:19 +0000 (09:01 +0900)]
core/device: introduce device_by_path() helper function
Yu Watanabe [Thu, 1 Sep 2022 00:02:39 +0000 (09:02 +0900)]
core/device: removed devices are not ready
Yu Watanabe [Wed, 31 Aug 2022 21:35:22 +0000 (06:35 +0900)]
core/device: use DEVICE_NOT_FOUND
Lennart Poettering [Fri, 9 Sep 2022 16:30:03 +0000 (18:30 +0200)]
measure: separate out PE section options in --help text
Let's separate the PE section options in the --help text to make clearer
that they are about PE sections, and thus make things less confusing
regarding the cryptic names. Specifically, there's now a separate
section in the --help text that looks like this:
<snip>
UKI PE Section Options: UKI PE Section
--linux=PATH Path Linux kernel image → .linux
--osrel=PATH Path to os-release file → .osrel
--cmdline=PATH Path to file with kernel command line → .cmdline
--initrd=PATH Path to initrd image → .initrd
--splash=PATH Path to splash bitmap → .splash
--dtb=PATH Path to Devicetree file → .dtb
--pcrpkey=PATH Path to public key for PCR signatures → .pcrpkey
</snipe>
(The section title is underlined, like we usually do it)
I think separating this out, and organizing the section name in tabular
form emphasizes nicely where this switches get their name from and what
they mean.
Hopefully addresses concerns from
https://github.com/systemd/systemd/pull/24458#discussion_r967052720 in a
diferent way.
(Also dropped a hint regarding DER format for public key. it's simply
wrong, we use PEM like everyone else on Linux. Outside of Java land DER
isn't popular, so we don't need to mention it here in the --help text,
man page should be enough.)
Lennart Poettering [Fri, 9 Sep 2022 16:29:24 +0000 (18:29 +0200)]
stub: typo fix in comment
https://github.com/systemd/systemd/pull/24458#discussion_r966941104
Yu Watanabe [Tue, 20 Sep 2022 15:56:00 +0000 (00:56 +0900)]
Merge pull request #24711 from poettering/verify_fsroot_dir-rework
find-esp: rework verify_fsroot_dir() a bit
Lennart Poettering [Tue, 20 Sep 2022 11:39:29 +0000 (13:39 +0200)]
recurse-dir: use fd_reopen() at one more place
Inspired by
83b94cf10e4f76b2b415bc70bf65f1c28698b97c
Zbigniew Jędrzejewski-Szmek [Tue, 20 Sep 2022 15:46:40 +0000 (17:46 +0200)]
Delete CNAME
Daan De Meyer [Mon, 19 Sep 2022 17:42:13 +0000 (19:42 +0200)]
repart: Rename fs to root in do_copy_files() and do_make_directories()
Preparation for future commits
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 10:19:31 +0000 (12:19 +0200)]
man/systemd-gpt-auto-generator: reword phrasing about partition location
"located on the same disk as the ESP is located on" is hard to grok. Let's
use more natural phrasing. Also, we shouldn't say that "The first foo partition
… is mounted to …", because this doesn't explain what is happening. The
partition could be empty, and there could be other partitions with the "foo"
content, but what matters is the UUID.
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 10:02:53 +0000 (12:02 +0200)]
man/systemd-gpt-auto-generator: export type flags by name, trim table
We listed many of the root-partition type uuids, but not all. I think the
chances of somebody using the discoverable partition magic on an Itanium system
are fairly low at this point. So let's remove all architectures except the two
most popular consumer architectures. People building Longsoon or RISC-V images
are likely to have the online version of the Discoverable Partitions
Specifications handy anyway, and it makes the man page easier to read. It also
reduces the chances that somebody adding new entries to the table has some
select&paste mishap. We've already had this happen in the past and it's fairly
nasty bug. We don't need to expose the information in two places with manual
propagation between them.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 15:53:28 +0000 (17:53 +0200)]
sd-gpt, docs: define s390 before s390x
In all other cases we have the older variant before the newer. And since we
generate some documentation tables from the header, this order is also visible
for users. Let's restore the order. This commit does
4565246911adbdd1b20d8944c0754772788a768c in a slightly different fashion.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 15:57:24 +0000 (17:57 +0200)]
tools/list-discoverable-partitions: make the script work again
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 15:48:16 +0000 (17:48 +0200)]
headers: export partition uuids and flags in new sd-gpt.h file
I think those constants are generally useful. It's quite easy to make a mistake
when copying things from the docs, so let's make them easy and convenient to
access.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 12:43:59 +0000 (13:43 +0100)]
man: "the initial RAM disk" → "the initrd"
In many places we spelled out the phrase behind "initrd" in full, but this
isn't terribly useful. In fact, no "RAM disk" is used, so emphasizing this
is just confusing to the reader. Let's just say "initrd" everywhere, people
understand what this refers to, and that it's in fact an initramfs image.
Also, s/i.e./e.g./ where appropriate.
Also, don't say "in RAM", when in fact it's virtual memory, whose pages
may or may not be loaded in page frames in RAM, and we have no control over
this.
Also, add <filename></filename> and other minor cleanups.
Luca BRUNO [Mon, 19 Sep 2022 10:09:17 +0000 (10:09 +0000)]
docs: add a note about selectively overriding default dependencies
This documents that explicit `Before=`/`After=` dependencies can be
used to selectively override implicit ordering coming from default
dependencies. That allows for more granular control compared to the
already documented `DefaultDependencies=no` option.
The alternative approach came up in a discussion around the ordering
of `boot-complete.target`, so this also adds an explicit suggestion
in that direction to the "Automatic Boot Assessment" documentation.
Ref: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048330.html
Lennart Poettering [Mon, 19 Sep 2022 14:50:46 +0000 (16:50 +0200)]
find-esp: when searching, don't trip over inodes we expect to be dirs to be something else, just continue searching
Lennart Poettering [Sat, 17 Sep 2022 17:57:14 +0000 (19:57 +0200)]
find-esp: rework verify_fsroot_dir() around statx()
Let's rework verify_fsroot_dir() around two statx() calls, which should
usually give us all information we need. Let's then add a call to the
btrfs ioctl only if the caller actually wants to know the backing block
device (which it generally only wants if it then intends to verify
partition type, and similar).
This makes things more robust on new kernels, and bypasses the btrfs
ioctls in environments where we cannot actually interpret the results
properly (since they reference btrfs devices via /dev/ paths, which we
likely cannot resolve in containers)
Fixes: #24616
Lennart Poettering [Tue, 20 Sep 2022 11:39:51 +0000 (13:39 +0200)]
stat-util: add statx_mount_same() to check if two stax refer to the same mount
Lennart Poettering [Mon, 19 Sep 2022 14:51:08 +0000 (16:51 +0200)]
stat-util: add statx_inode_same() helper to check if two statx structs refer to same inode
The same as stat_inode_same(), but for struct statx rather than struct
stat.
Lennart Poettering [Sat, 17 Sep 2022 17:53:19 +0000 (19:53 +0200)]
chase-symlinks: don't insist on absolute paths if CHASE_PREFIX_ROOT is set
There's little reason to require this, given that we can just say that
if a relative path is specified it is to be read relative to the root.
This fixes a bootctl bug introduced by
3730dc5d5b4b7c4e1e7d0957c88568cc45de2390 which didn't bother prefixing
paths as necessary.
Lennart Poettering [Mon, 19 Sep 2022 12:23:02 +0000 (14:23 +0200)]
blockdev-util: make sure get_block_device_fd() works reliably for O_PATH, too
Lennart Poettering [Sat, 17 Sep 2022 17:45:08 +0000 (19:45 +0200)]
test-blockdev-util: check if r is actually a failure before ERRNO_IS_PRIVILEGE
Jan Janssen [Tue, 20 Sep 2022 08:08:05 +0000 (10:08 +0200)]
stub: Always use LINUX_INITRD_MEDIA_GUID if available
The kernel PE image version can be used to detect support for this
feature, allowing us to prefer the generic code of the deprecated EFI
handover protocol.
Jan Janssen [Tue, 20 Sep 2022 07:30:40 +0000 (09:30 +0200)]
stub: Be explicit about EFI handover calling convention
Jan Janssen [Tue, 20 Sep 2022 07:27:27 +0000 (09:27 +0200)]
stub: Remove unnecessary asm cli call
Apparently, this is not needed when red zones are disabled and we do
that.
Jan Janssen [Sun, 18 Sep 2022 08:39:32 +0000 (10:39 +0200)]
stub: Properly clean up pages on error
Jan Janssen [Sat, 17 Sep 2022 20:35:23 +0000 (22:35 +0200)]
stub: Refuse operation if kernel lacks EFI handover support