Commit graph

58058 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek b72308d344 man/homectl: adjust man page to match code
Fixes #22966. Since there are competing conventions, let's not
change our code, but make the docs match what is implemented.
2022-05-26 14:29:50 +02:00
Zbigniew Jędrzejewski-Szmek 8f24777156 man/sd-bus: discuss negative-return values and add example
Fixes #22816.
2022-05-26 14:29:50 +02:00
Zbigniew Jędrzejewski-Szmek 5ee38adea4 man/shutdown: explain -h more
Fixes #23401
2022-05-26 14:29:50 +02:00
Zbigniew Jędrzejewski-Szmek 223a359f21 man/automount: say that automounts should not be nested
Fixes #21832.
2022-05-26 14:29:50 +02:00
Zbigniew Jędrzejewski-Szmek 93dbc22a95 man/systemd.automount: move the main description up and clarify deps 2022-05-26 14:29:50 +02:00
Zbigniew Jędrzejewski-Szmek 3844a42138 TODO: drop entry
Implemented in 14e6e444dd.
2022-05-26 14:29:50 +02:00
Zbigniew Jędrzejewski-Szmek 19cb82799e man: do not say "additional symlinks" for mount/automount aliases
"additional" implies that the unit itself is a symlink, which it is not.
Also "link to the mount unit", not "link to the mount".
2022-05-26 14:23:47 +02:00
Zbigniew Jędrzejewski-Szmek a6e334649d systemctl: make show/status honour --state and --type
This makes the interface more flexible, by allowing the same filtering
for show and status as is done for list-units.

Fixes #23207.
2022-05-26 10:37:35 +09:00
Yu Watanabe c7a0c74c7f
Merge pull request #23513 from keszybz/bootctl-version-print
bootctl: print version comparison when updating
2022-05-26 10:30:16 +09:00
Frantisek Sumsal 1fb7f8e15e test: cover initrd->sysroot transition in TEST-24
This should cover cases regarding devices with `OPTIONS+="db_persist"`
during initrd->sysroot transition.

See:
  * https://github.com/systemd/systemd/issues/23429
  * https://github.com/systemd/systemd/pull/23218
  * https://github.com/systemd/systemd/pull/23489
  * https://bugzilla.redhat.com/show_bug.cgi?id=2087225
2022-05-25 18:19:46 +02:00
Zbigniew Jędrzejewski-Szmek 892fcb8955 bootctl: when comparing versions, show the result
In Fedora there was a mixup with versions (the version was prefixed with "v", and
"v251" < "250"). This makes this easier to debug.
2022-05-25 16:02:35 +02:00
Zbigniew Jędrzejewski-Szmek f90ee9ff66 basic: add helper function to print </==/> 2022-05-25 16:02:25 +02:00
Zbigniew Jędrzejewski-Szmek c20b2f2421 analyze: use '' instead of the empty string when showing versions
It looks like garbled output… I didn't use shell-escape, because the other
characters that are special for the shell that are used in versions should
not be escaped.
2022-05-25 16:01:14 +02:00
Rahil Bhimjiani 97e7d4945d [sd-boot] improve documentation of beep 2022-05-25 14:20:14 +02:00
Zbigniew Jędrzejewski-Szmek 2367bdcfc9 docs/BLS: describe version comparisons
Fixes #23346.
2022-05-25 13:47:47 +02:00
Zbigniew Jędrzejewski-Szmek 46083ab321 basic/string-util: tweak strverscmp_improved() for some corner cases
So far we had the rule that '' == '', '0_' == '0', but '_' > ''. This means
that the general rule that strings are compared iteratively, and each
segment that compares equal can be dropped and the comparison resumes at
the following characters wasn't true in such cases. Similarly, '0~' < '0',
but after dropping the common segment, '~' > ''.

The special handling of empty strings is dropped, and '_' == '' and
'~' < ''.
2022-05-25 13:47:47 +02:00
Anita Zhang 7e46a5c093 test-seccomp: check for CAP_IPC_OWNER before calling shmat()
shmat() requires the CAP_IPC_OWNER capability. When running test-seccomp
in environments with root + CAP_SYS_ADMIN, but not CAP_IPC_OWNER,
memory_deny_write_execute_shmat would fail. This fixes it.
2022-05-25 08:03:23 +09:00
Zbigniew Jędrzejewski-Szmek 620ecc9c4b kernel-install: ignore extra args passed when invoked as installkernel
kernel's 'make install' invokes install.sh which calls /sbin/install-kernel.
Thus we are invoked as e.g.
  /sbin/installkernel 5.18.0 arch/x86/boot/bzImage System.map /boot
The last two arguments would be passed as "initrds".

Before , we would just quitely ignore
/boot, because it doesn't pass the 'test -f' test, and possibly try to do
something with System.map. 742561efbe tightened
the check, so we now throw an error.

It seems that the correct thing is to ignore those two arguments, because
our plugin syntax has no notion of System.map. And the installation directory
we can figure out ourselves better. Effectively, this makes things behave
like before, but less by accident.

Fixes #23490.
2022-05-24 23:31:43 +02:00
Frantisek Sumsal 9e03f48d21 ci: reenable validation of GH Actions files 2022-05-25 04:49:05 +09:00
Zbigniew Jędrzejewski-Szmek 0f5a416c81 docs/BLS: rework the description of directory layout
We said "`$BOOT/loader/` is the directory containing all files needed
for Type #1 entries" which is blatantly wrong. And also saying that we
define two directories, /loader and /loader/entries, but only ever defining
the second one was not very consistent.

Instead, let's say that /loader/ is for "boot loader configuration", and
/loader/entries has the snippets. A new section about /<entry-token>/<version>/
is added. This is described as the "recommended layout for additional files".

Also, we said that ID= should be used in the file name, but in fact it
wasn't in the example that was given, and afaik, nobody ever did that. So
this part is reduced to say "kernel version (as returned by `uname -r`,
including the OS identifier)". AFAIK, all distros include some form of
OS identifier in the version, so this should be good enough.

Since we now don't depend on autodetection (e.g. with entry-token and layout
configured), the installed doesn't need to always create /loader/entries and
things will still work. So don't say that the installer needs to create it.

Part of the discussion is moved to the Discussion section.

Overall, this brings the specification more in line with actual practice.
2022-05-24 21:46:08 +02:00
Zbigniew Jędrzejewski-Szmek 14bacc744f docs: /etc/os-release → os-release(3)
It's /usr/lib/os-release now mostly. But let's link to the man page.
2022-05-24 21:46:08 +02:00
Zbigniew Jędrzejewski-Szmek 7bb36d2d7a docs: reworder/rewrite BLS to read more like a specification
I tried not to introduce any semantic changes, but to reorder the whole
text to be more usable as a reference specification: more sections are
created and the discussion and justifications are moved to the end.
Also, "BIOS" is changed to "firmware" in various places, and other parts
of the text that made sense when this was originally written are now dated
are adjusted. I separated and extended the examples a bit.

The abstract at the top ("TL;DR: Currently there’s no common boot scheme…")
is dropped. It didn't seem to fit anywhere.
2022-05-24 21:46:06 +02:00
Zbigniew Jędrzejewski-Szmek 65df0ce39a Minor wording fixes
Some NEWS entries are tweaked a bit to address complaints about readability
from users.

"udev" is pronounced as /ˈjuːdɛv/, like in "user", hence "a" not "an".
2022-05-24 21:26:06 +02:00
Jan Janssen 2d5d72c62b boot: Fix bad CompareMem call 2022-05-24 16:53:36 +01:00
Daan De Meyer 794da5a1a5 portable: Fix memory leak in maybe_enable_disable()
Fixes #23481
2022-05-24 10:55:09 +09:00
Frantisek Sumsal 40bc68cf21
Merge pull request #23475 from nabijaczleweli/certified-lint.1-moment
Actually run shellcheck on CI
2022-05-23 19:16:22 +00:00
Daan De Meyer 75d7e04eb4 dissect-image: Explicitly remove partitions when done with image
When closing a loop device, the kernel will asynchronously remove
the probed partitions. This can lead to race conditions where we
try to reuse a partition device that still needs to be removed by
the kernel. To avoid such issues, let's explicitly try to remove
any partitions using BLKPG_DEL_PARTITION when we're done with an
image.

To make sure we don't try to remove partitions when we want them
to remain (e.g. systemd-dissect --mount), we add
dissected_image_relinquish() in a similar vein to loop_device_relinquish()
and decrypted_image_relinquish().
2022-05-23 18:15:16 +01:00
Evgeny Vereshchagin af72115412 ci: bump gcc in the "build test" workflow
gcc-12 has been released
2022-05-23 14:30:48 +00:00
наб 35339eb88c
shellcheck-clean kernel-install again 2022-05-23 12:52:56 +02:00
наб ee0d4cf74a
Fix which(1) in meson-build.sh 2022-05-23 12:52:56 +02:00
наб 32c99bc86e
Don't ignore kernel-install for shellcheck 2022-05-23 12:52:52 +02:00
Zbigniew Jędrzejewski-Szmek e133c79f9f
Merge pull request #23344 from medhefgo/boot-config-add
boot: Small config entry add changes
2022-05-23 09:26:19 +02:00
Zbigniew Jędrzejewski-Szmek 2f9b7186e3
Merge pull request #23414 from keszybz/analyze-vercmp
systemd-analyze compare-versions
2022-05-23 09:14:51 +02:00
Jan Janssen d17c93a72b test: Test STRLEN for C11 string literals 2022-05-22 20:21:04 +01:00
Phaedrus Leeds ec5e113f09 NEWS: Fix some minor mistakes 2022-05-22 20:33:56 +02:00
Daan De Meyer 08e86b15fc coredump: Fix format string type mismatch
Fixes #23471
2022-05-22 19:28:38 +02:00
Jan Janssen 9287b661c5 boot: Rename functions adding entries to match userspace 2022-05-22 12:48:10 +02:00
Jan Janssen 095a153d49 boot: Remove trivial config entry add helpers
These two functions have very limited use and are just fancy wrappers
around structured initializers.
2022-05-22 12:48:06 +02:00
Victor Westerhuis 87c7779599 Do not require a valid version when parsing sd-boot loader entries
This fixes #20820
2022-05-22 12:17:52 +02:00
Luca Boccassi a17ebc687b
Merge pull request #23465 from mrc0mmand/bump-actions-to-ubuntu-2204
ci: bump GH Actions to Ubuntu Jammy where applicable
2022-05-22 02:29:59 +01:00
Benjamin Franzke ae00bafdf8 docs: improve table readability
Let the table span more than the default content width,
if the table contains alot of data (controlled by width: auto)
(720px is very good for continuous text, but too narrow for tables).

The container class is therefore adapted to put the
width restriction on the elements itself, allowing for
exceptions for individual elements like <table> and
<h1> (which used an offset margin before and is now
streamlined to use a max-width as well).

Also add a striped background to ease reading rows
and allow for horizontal mobile scrolling without
overflowing the entire document, only the table itself.
2022-05-21 22:41:21 +01:00
Luca Boccassi ebd4571e31
Merge pull request #22550 from medhefgo/boot-mixed
boot: EFI mixed mode support
2022-05-21 22:38:56 +01:00
Frantisek Sumsal 6c0259e502 ci: temporarily disable validation of GH Action files
since the current version of super-linter doesn't recognize
ubuntu-22.04 as a valid runner specification. This should
be fixed once https://github.com/github/super-linter/pull/2897
is merged, which includes
09a60b0f57
2022-05-21 23:28:18 +02:00
Frantisek Sumsal dfe7cfe4fb cryptsetup: fix build with -Db_ndebug=true
```
 ...
 ../src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-fido2.c:33:13: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
         int r;
             ^
 1 error generated.
 ...
 ../src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-pkcs11.c:34:13: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
         int r;
             ^
 1 error generated.
 ninja: build stopped: subcommand failed.
 + fatal ''\''meson compile'\'' failed with -Db_ndebug=true'
```
2022-05-21 23:27:24 +02:00
Frantisek Sumsal 50b2b52004 ci: prefer the distro llvm version if available 2022-05-21 20:23:48 +02:00
Frantisek Sumsal aa1bf7e61d ci: bump GH Actions to Ubuntu Jammy where applicable 2022-05-21 20:23:48 +02:00
Luca Boccassi 1f9aa3d2a6 resolved: default to OpenSSL
If both gnutls and openssl are available, prefer openssl.
We are gradually moving toward supporting openssl only as the
crypto library, and the resolved gnutls backend will be dropped
at some point, so start nudging users toward the openssl one.
2022-05-21 18:13:38 +02:00
Zbigniew Jędrzejewski-Szmek 6be96a9aed
Merge pull request #23460 from keszybz/docs-redirect
docs: rename COREDUMP_PACKAGE_METADATA → ELF_PACKAGE_METADATA
2022-05-21 18:11:18 +02:00
Benjamin Franzke 9ba7734f1e docs: adapt forward layout to systemd.io design 2022-05-21 18:09:50 +02:00
Zbigniew Jędrzejewski-Szmek d4224b9cc7 docs: rename COREDUMP_PACKAGE_METADATA → ELF_PACKAGE_METADATA
The format described by this document is used not only for coredumps,
but also for other purposes, so we've outgrown the old title.

A redirect was added based on https://codepo8.github.io/github-redirection-demo/.
I tried to use a relative link, but it's hard to test if it works
before merging.

Co-authored-by: Benjamin Franzke <benjaminfranzke@googlemail.com>
2022-05-21 18:08:19 +02:00