Commit graph

58003 commits

Author SHA1 Message Date
Pablo Ceballos 1a2134fb51 hwdb: Add Google Meet speakermic
It has the same issue as the Google Hangouts Meet speakermic but a
different VID/PID.
2022-05-27 11:38:13 +01:00
Yu Watanabe 6d3bb9e7d1
Merge pull request #23517 from mrc0mmand/cryptsetup-switchroot-transition
test: cover initrd->sysroot transition in TEST-24
2022-05-27 07:36:17 +09:00
Eduard Tolosa 815068d3a3 loader.conf: Clarify the default value of timeout. 2022-05-27 06:48:18 +09:00
Zbigniew Jędrzejewski-Szmek e5985a7d07
Merge pull request #23523 from evverx/oss-fuzz-links
docs: add a link to the OSS-Fuzz coverage report
2022-05-26 18:10:56 +02:00
Evgeny Vereshchagin 39e63b441b docs: be more specific about the OSS-Fuzz toolchain 2022-05-26 15:22:50 +00:00
Yu Watanabe 4fc69e8a09 core/device: do not downgrade device state if it is already enumerated
On switching root, a device may have a persistent databse. In that case,
Device.enumerated_found may have DEVICE_FOUND_UDEV flag, and it is not
necessary to downgrade the Device.deserialized_found and
Device.deserialized_state. Otherwise, the state of the device unit may
be changed plugged -> dead -> plugged, if the device has not been mounted.

Fixes #23429.

[mwilck: cherry-picked from #23437]
2022-05-26 17:07:59 +02:00
Evgeny Vereshchagin 7d7c92ef8c docs: update OSS-Fuzz links 2022-05-26 14:16:17 +00:00
Martin Wilck cf1ac0cfe4 core/device: device_coldplug(): don't set DEVICE_DEAD
dm-crypt device units generated by systemd-cryptsetup-generator
habe BindsTo= dependencies on their backend devices. The dm-crypt
devices have the db_persist flag set, and thus survive the udev db
cleanup while switching root. But backend devices usually don't survive.
These devices are neither mounted nor used for swap, thus they will
seen as DEVICE_NOT_FOUND after switching root.

The BindsTo dependency will cause systemd to schedule a stop
job for the dm-crypt device, breaking boot:

[   68.929457] krypton systemd[1]: systemd-cryptsetup@cr_root.service: Unit is stopped because bound to inactive unit dev-disk-by\x2duuid-3bf91f73\x2d1ee8\x2d4cfc\x2d9048\x2d93ba349b786d.device.
[   68.945660] krypton systemd[1]: systemd-cryptsetup@cr_root.service: Trying to enqueue job systemd-cryptsetup@cr_root.service/stop/replace
[   69.473459] krypton systemd[1]: systemd-cryptsetup@cr_root.service: Installed new job systemd-cryptsetup@cr_root.service/stop as 343

Avoid this by not setting the state of the backend devices to
DEVICE_DEAD.

Fixes the LUKS setup issue reported in #23429.
2022-05-26 15:06:41 +02:00
Frantisek Sumsal 6b70d3cf81 test: store the key on a separate device 2022-05-26 15:06:41 +02:00
Frantisek Sumsal b22d90e594 test: generate a custom initrd for TEST-24 if $INITRD is unset
Co-Authored-By: Yu Watanabe <watanabe.yu+github@gmail.com>
2022-05-26 15:04:56 +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
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
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
Yu Watanabe 7d3f2499b8
Merge pull request #23464 from bnf/update-wiki-links
tree-wide: replace obsolete wiki links with systemd.io/manpages
2022-05-21 23:48:58 +09:00
Jan Janssen 6e9165397f bootctl: Add EFI arch detection support 2022-05-21 15:11:13 +01:00
Jan Janssen c43a282c29 boot: Support booting in EFI mixed mode
The kernel provides a ".compat" PE section that contains a list of
compat entry points with their respective arches. This entry point
does all the heavy lifting to support running 64bit kernels when
the UEFI firmware is 32bit.

Note that the EFI handover protocol code in linux_x86.c does not
need any adjustments as it already correctly calls the 32bit handover
code.

Fixes: #17056
2022-05-21 15:11:13 +01:00