1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-09 12:58:26 +03:00

55851 Commits

Author SHA1 Message Date
Luca Boccassi
78ab2b5064 core: refuse to mount ExtensionImages if the base layer doesn't at least have ID in os-release
We can't match an extension if we don't at least have an ID,
so refuse to continue
2022-01-19 00:08:57 +00:00
Luca Boccassi
37361f46d5 dissect-image: validate extension-release even if the host has only ID in os-release
A rolling distro won't set VERSION_ID or SYSEXT_LEVEL in os-release,
which means we skip validation of ExtensionImages.
Validate even with just an ID, the lower level helper already
recognizes and accepts this use case.

Fixes https://github.com/systemd/systemd/issues/22146
2022-01-19 00:01:48 +00:00
Luca Boccassi
095162d721
Merge pull request #22159 from medhefgo/boot-xbootldr
boot: xbootldr improvements
2022-01-18 22:40:58 +00:00
Ludwig Nussel
8dd3f6a3fd machined: provide more details to polkit auth 2022-01-18 22:35:09 +00:00
Goffredo Baroncelli
2fbf50d675 bootctl: removed unused parameter only_auto
Remove the parameter 'only_auto' from the function
boot_entries_augment_from_loader() because each caller set it always to
true.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
2022-01-18 19:32:35 +01:00
Goffredo Baroncelli
9914d89b51 bootctl: ignore the bootloader boot entries
When bootctl lists the boot entries, considers also the ones
returned by systemd-boot (via the efi LoaderEntries variable),
created at boot time.

Unfortunately this list may became incorrect if (e.g.) the user remove a
kernel package.

This patch changes this behaviour, so bootctl ignores some the
boot entries returned by systemd-boot.

In any case, bootctl still considers the 'auto-xxx' boot entries
listed below:

  Boot entrie name                 Title
  -----------------------------    ------------------------------
  auto-osx                         macOS boot loader
  auto-windows                     Windows Boot Manager
  auto-efi-shell                   EFI Shell
  auto-efi-default                 EFI Default Loader
  auto-reboot-to-firmware-setup    Reboot Into Firmware Interface

The other entries that systemd-boot synthetizes (e.g. the ones loaded from
/efi/loader/entries/<uuid>) can be synthetized by bootctl too, so no
information is lost.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
2022-01-18 19:32:35 +01:00
Jan Janssen
9e814b7715 boot: Pass around HARDDRIVE_DEVICE_PATH 2022-01-18 16:20:09 +01:00
Jan Janssen
d81edd5ad7 boot: Simplify looking for the xboot hard drive
The device path should not contain multiple hard drive nodes in it,
so looking at them all should not be needed.
If some crazy firmware/driver were to make nested GPT drives
available like that, we should be only looking at the last partition
and its containing GPT drive anyway.
2022-01-18 16:20:09 +01:00
Jan Janssen
45a24eb7e9 boot: Search for the partition node directly
Some firmware creates partition device paths without a messaging
device path node, making the search for the xboot loader partition
fail.

Fixes: #17756
2022-01-18 16:20:09 +01:00
Zbigniew Jędrzejewski-Szmek
8513c34bec Merge pull request #21805 from наб
A trivial merge conflict was fixed manually.
2022-01-18 15:20:37 +01:00
Zbigniew Jędrzejewski-Szmek
ba900c1719
Merge pull request #22093 from yuwata/meson-bpftool-version
meson: require bpftool version >= 5.6
2022-01-18 15:09:47 +01:00
Evgeny Vereshchagin
691db9a718 meson: force ctags to use absolute paths
Looks like https://github.com/mesonbuild/meson/issues/957 was
reintroduced in meson-0.57.0 (and looking and https://mesonbuild.com/Release-notes-for-0-57-0.html
I'm not sure whether it was intentional or not) so run_command can no
longer be used to get around
https://github.com/mesonbuild/meson/issues/3589. Let's just force
ctags to always use absolute paths to fix it once and for all.
2022-01-18 15:07:11 +01:00
Luca Boccassi
5a2de315ff
Merge pull request #22153 from evverx/switch-to-bullseye
ci: switch Debian from unstable to testing on mkosi
2022-01-18 11:54:35 +00:00
Yu Watanabe
1fb50408ce pid1,cgroup-show: ignore -EOPNOTSUPP in cg_read_pid()
The function is called in recursion, and cgroup.procs in some subcgroups
may not be read.

Fixes #22089.
2022-01-18 12:34:30 +01:00
Evgeny Vereshchagin
881b152660 ci: point mkosi to commit where "testing" is fixed
https://github.com/systemd/mkosi/pull/886
2022-01-18 10:30:33 +00:00
Evgeny Vereshchagin
b0f1f76ca1 ci: switch from unstable to testing on mkosi 2022-01-18 10:27:28 +00:00
Yu Watanabe
f67b4351f3 test: fix a copy-and-paste error
Follow-up for 12727c2bc2859995cbd561ffc3d9a4d571202254.

Addresses https://github.com/systemd/systemd/pull/22125#discussion_r786358474.

Fixes CID#1469023.
2022-01-18 09:30:46 +01:00
Luca Boccassi
e91aa2ea23 man: add more references for extensions to portablectl
Link in systemd.io and systemd-sysext

Fixes #22146
2022-01-18 14:28:03 +09:00
Evgeny Vereshchagin
cd7b60a7ed
Merge pull request #22142 from evverx/libxkbcommon-dev
ci: get Coverity and CodeQL to analyze the "libxkbcommon" part
2022-01-18 00:15:56 +03:00
Luca Boccassi
8f502f09c3
Merge pull request #22125 from DaanDeMeyer/copy-holes
shared: Copy holes in sparse files in copy_bytes_full()
2022-01-17 21:15:14 +00:00
Daan De Meyer
12727c2bc2 journal: Copy holes when archiving BTRFS journal files
Previously, the holes we punched earlier would get removed when
copying the file. Let's enable the new COPY_HOLES flag to make
sure this doesn't happen.

In my test, this drops a 800MB btrfs journal (without compression)
to 720 MB.

Fixes #22087
2022-01-17 16:10:18 +00:00
Luca Boccassi
682a9f2e88
Merge pull request #22147 from keszybz/stdio-bridge-docs
More docs for systemd-stdio-bridge
2022-01-17 14:11:53 +00:00
Yu Watanabe
06006691b5 kernel-install: also remove modules.builtin.alias.bin
Fixes RHBZ#2016630.
2022-01-17 12:10:03 +00:00
Zbigniew Jędrzejewski-Szmek
2979c8b7fc meson: drop unused SYSTEMD_STDIO_BRIDGE_BINARY_PATH
The whole point of systemd-stdio-bridge is to be executed on "foreign" systems
where the path might be different, so we use $PATH to find the binary everywhere.
2022-01-17 11:59:08 +01:00
Zbigniew Jędrzejewski-Szmek
0d8930fd6d stdio-bridge: trim whitespace and braces 2022-01-17 11:59:08 +01:00
Zbigniew Jędrzejewski-Szmek
a80f17844e stdio-bridge: make the error more straightforward 2022-01-17 11:59:08 +01:00
Zbigniew Jędrzejewski-Szmek
b7bb58ef70 man: enhance the description of systemd-stdio-bridge
I hope that this fixes the comment
https://github.com/systemd/systemd/pull/22141#issuecomment-1013960371
> As someone who doesn't know what this prog does

The listing in the man page is sorted according to logical
use: all the options setting the address are now together.
2022-01-17 11:59:08 +01:00
Luca Boccassi
cf18de1b26 systemd-stdio-bridge: add manpage 2022-01-17 16:54:56 +09:00
dependabot[bot]
a68b244399 build(deps): bump github/codeql-action from 1.0.26 to 1.0.27
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.26 to 1.0.27.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5f53256358...cd783c8a29)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 09:12:55 +03:00
Evgeny Vereshchagin
992d7f341f ci: trigger CodeQL on PRs when its dependencies change 2022-01-17 01:59:55 +00:00
Jan Janssen
cc25bedb29 boot: Beep n times for n-th entry 2022-01-17 00:05:35 +00:00
Luca Boccassi
6eed65d455 man: change 'allow[s] to' -> 'allow[s] one to'
Lintian is opinionated about this and we get nagged
2022-01-16 15:49:43 +00:00
Evgeny Vereshchagin
54ed8884d3 ci: get Coverity and CodeQL to analyze the "libxkbcommon" part
By analogy with https://github.com/systemd/systemd/pull/22138, to get
the static analyzers to analyze that part of code that package should
be installed there as well.
2022-01-16 15:33:07 +00:00
Yu Watanabe
adc1b76c30 core: add missing dependency DBus properties
Follow-up for 0bc488c99ab2ed3464237607e381f4d72cd321d5.

Also sort dependency properties to make them match the definition of
`enum UnitDependency` in basic/unit-def.h.

Fixes #22133.
2022-01-16 14:05:33 +00:00
Yu Watanabe
cc8943b84a core: update log message
Fixes CID#1469009.
2022-01-16 14:05:18 +00:00
Luca Boccassi
aac3efd24c
Merge pull request #22136 from yuwata/network-wireguard-disable-adding-routes-to-allowed-ips-by-default
network: wireguard: disable adding routes to allowed ips by default
2022-01-16 14:04:30 +00:00
Evgeny Vereshchagin
e8f93a60a2 ci: install libbpf-dev in the unit_tests workflow
Those dependencies are also used by Coverity and Codeql so
it should be installed there to get them to analyze that code.

Judging by https://github.com/systemd/systemd/pull/22137 it seems
to be working.
2022-01-16 13:13:34 +00:00
Jan Janssen
85d2f13b6f boot: Add PC speaker support
Fixes: #17508
2022-01-16 10:34:01 +00:00
Yu Watanabe
e135559d80 network: wireguard: also accept negative boolean values to disable adding routes
RouteTable=off was introduced to provide consistency with wg-quick
command. This makes the RouteTable= settings accepts other negative
boolean values.
2022-01-16 19:25:28 +09:00
Yu Watanabe
cfe1237f38 network: wireguard: do not add routes to AllowedIPs= by default
As setting such routes may break existing setups.

Closes #21964.
2022-01-16 19:18:23 +09:00
Luca Boccassi
8a592c6fc2
Merge pull request #22130 from keszybz/silence-gcc-warning-in-sd-device
Silence gcc warning in sd-device
2022-01-15 16:22:59 +00:00
Zbigniew Jędrzejewski-Szmek
e47a3af44e sd-device: drop unnecessary parenthesis 2022-01-15 13:38:49 +01:00
Zbigniew Jędrzejewski-Szmek
376ee2c312 sd-device: silence gcc warning with newest gcc 2022-01-15 13:38:30 +01:00
Daan De Meyer
8646b5d6e6 shared: Copy holes in sparse files in copy_bytes_full()
Previously, all holes in sparse files copied with copy_bytes_full()
would be expanded in the target file. Now, we correctly detect holes
in the input file and we replicate them in the target file.
2022-01-14 16:48:28 +00:00
Yu Watanabe
9e3e592946
Merge pull request #22098 from DaanDeMeyer/journal-corrupt-2
journal: Fixes for handling of corrupt entry objects
2022-01-14 21:23:32 +09:00
Yu Watanabe
ba3440b9ab
Merge pull request #22096 from keszybz/networkctl-bus-once
Open the bus once in networkctl
2022-01-14 21:21:08 +09:00
Daan De Meyer
8d801e35cb journal: Fix entry array iteration corruption checks
Previously, we'd try to handle corruption by bumping the index even
if it was an entry array object that was corrupted (which we can't
deal with).

Now, we only try to deal with corrupted entry objects by moving the
corruption handling into generic_array_get().

On top, we also add an additional check for -EADDRNOTAVAIL which can
also be caused by corrupted journal data.
2022-01-14 11:33:32 +00:00
Evgeny Vereshchagin
9e360c6bf1 ci: switch to requirements.txt in the unit tests workflow 2022-01-14 10:29:23 +00:00
Yu Watanabe
dc7e9c1bc4 meson: use the compiler command array as is
Also check if the flags used when building bpf are supported by clang.
2022-01-14 17:01:58 +09:00
Yu Watanabe
a6ac8b5a4d meson: check if clang supports bpf 2022-01-14 16:43:31 +09:00