Commit Graph
74793 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 732ed8a84e meson: rename libbasic to libbasic_static
Our variables for internal libraries are named 'libfoo' for the shared lib
variant, and 'libfoo_static' for the static lib variant. The only exception was
libbasic, because we didn't have a shared variant for it. But let's rename it
for consitency. This makes the build config easier to understand.
2024-07-03 17:25:26 +02:00
Anton Golubev 4ee0ac1ae4 hwdb: Add some HP IR cameras
Two very similar devices, with two functions - a regular camera and IR.
The peculiarity of their infrared camera is that it uses a color image
format (YUYV), although it is essentially black and white.

The IR camera interface differs from the regular camera interface by name:

"HP Wide Vision FHD Camera: HP W" for the regular camera and
"HP Wide Vision FHD Camera: HP I" for an infrared camera

Therefore, glob *I is used to separate the IR camera
2024-07-03 13:51:52 +02:00
Luca Boccassi 0f20f7d6fe Merge pull request #33575 from YHNdnzj/soft-reboot-system-manager-only
core/dbus-manager: several cleanups, refuse SoftReboot() for user manager
2024-07-03 13:40:06 +02:00
Lennart Poettering 9545512f3e update TODO 2024-07-03 10:55:18 +02:00
Daan De Meyer 6bd14bf4b3 mkosi: update fedora commit reference
* f9fe17dbde Use vmlinux.h from kernel-devel
* 9cbad936a6 Pull in openssl-devel-engine
* 8ae009f929 Only add Requires on python3-zstd on Fedora
* 750e910c7c Drop BuildRequires on python3-zstd
2024-07-03 10:39:58 +02:00
Mike Yuan 33a06bbc74 core/main: add an assertion to ensure user managers won't initiate destructive/system-wide operation 2024-07-03 10:12:53 +02:00
Mike Yuan 6851abe403 core/manager: invoke special targets on signal only for system manager 2024-07-03 10:11:25 +02:00
Mike Yuan 236cd48546 core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...
2024-07-03 10:11:24 +02:00
Mike Yuan 541aadff97 core/dbus-manager: check for runtime scope first for system-wide operations
It's pointless to do selinux or /run/ space checks
for user managers.
2024-07-03 10:11:24 +02:00
Mike Yuan a85fe612d7 core/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriate
Also, there can only be one system manager.
2024-07-03 10:11:24 +02:00
Mike Yuan b80ae4bcfd core/dbus-manager: use path_simplify_alloc() for root and init paths 2024-07-03 10:11:24 +02:00
Mike Yuan ff21827fee core/dbus-manager: use PidRef for log_caller()
This is only for logging, but since we lookup for the unit
here, let's try to be accurate.
2024-07-03 10:11:21 +02:00
Daan De Meyer 88e9230643 mkosi: Don't touch the packaging checkout if work is being done
If work is being done in a separate branch, don't touch the packaging
checkout.
2024-07-03 01:17:35 +02:00
Daan De Meyer 48d6dad100 meson: Define __TARGET_ARCH macros required by bpf
These are required by the bpf_tracing.h header in libbpf, see
https://github.com/libbpf/libbpf/blob/master/src/bpf_tracing.h.

bpf_tracing.h does have a few fallbacks in case __TARGET_ARCH_XXX
is not defined but recommends using the __TARGET_ARCH macros instead
so let's do that.
2024-07-03 01:16:35 +02:00
Luca Boccassi e6b2508275 coredump: correctly take tmpfs size into account for compression
We calculate the amount of uncompressed data we can write by taking the limits
into account and halving it to ensure there's room for switching to compression
on the fly when storing cores on a tmpfs (eg: due read-only rootfs).

But the logic is flawed, as taking into account the size of the tmpfs storage
was applied after the halving, so in practice when an uncompressed core file
was larger than the tmpfs, we fill it and then fail.

Rearrange the logic so that the halving is done after taking into account
the tmpfs size.
2024-07-03 01:15:03 +02:00
Mike Yuan 4b7249111a docs/CODING_STYLE: document that we nowadays prefer (const char*) for func ret type
Addresses https://github.com/systemd/systemd/pull/33567#discussion_r1662818225
2024-07-02 23:35:58 +02:00
Luca Boccassi 467c501667 Merge pull request #33577 from fbuihuu/testsuite-tweaks-for-v256-on-SUSE
Testsuite tweaks for v256 on suse
2024-07-02 23:35:33 +02:00
Lennart Poettering 6f5c8f44f1 Merge pull request #33574 from poettering/get-efi-var-raw
efi: efi variable refactoring
2024-07-02 21:16:37 +02:00
Franck Bui 252542ffc3 test: fix TEST-74-AUX-UTILS.ssh.sh on SUSE 2024-07-02 19:07:03 +02:00
Franck Bui 855bad331e test: preserve symlink in inst_recursive()
On SUSE this function is used to copy symlinks installed in *.wants/
directories.
2024-07-02 19:06:21 +02:00
Franck Bui 56a894e888 test: fix TEST-24-CRYPTSETUP on SUSE
/etc/systemd/journald.conf.d drop-in dir already exists on SUSE.
2024-07-02 19:05:07 +02:00
Franck Bui a09825ce9f test: install /etc/hosts
Needed for resolving the "localhost" hostname.
2024-07-02 19:03:49 +02:00
Lennart Poettering 31e1edf570 efivars: rename efivar_get_uint_string() → efivar_get_uint64_str16()
Be explicit with the type, and more inline with our other code, that
likes to indicate the string char width in the name.

Also, switch to a fixed size type, since EFI variables should really be
binary exact the same on all archs.
2024-07-02 18:15:35 +02:00
Lennart Poettering 50e8b11e16 efi: rename efivar_(set|get)() → efivar_(set|get)_str16()
These functions after all write EFI UTF-16 strings, i.e. are relatively
high-level, hence give them a specific name indicating the type, to
match our other helpers that have similar type suffixes.
2024-07-02 18:15:32 +02:00
Lennart Poettering 70871dd0a3 efivars: use appropropriate uint8_t type when dealing with "raw" bytes
We don't actually want chars here, but rather raw bytes, in particular
to avoid signedness issues. Hence, let's use uint8_t here.
2024-07-02 18:15:30 +02:00
Lennart Poettering 1d22e23edb efivars: change return parameter of efivar_get_raw() to be void**
This is the "raw", untyped version after all, hence we should return a
void pointer, and let the client cast, if they know more.

Replaces: #30812
2024-07-02 18:15:27 +02:00
Lennart Poettering f84b512290 efi: split out efivars.[ch] from util.[ch]
These are quite a bunch of functions, let's give them their own file.

No code changes, just some trivial refactoring.
2024-07-02 18:15:16 +02:00
Daan De Meyer cca8c15599 mkosi: Install perf
It's already installed on ubuntu via linux-tools-common.
2024-07-02 18:14:19 +02:00
Lennart Poettering ead6c49ee1 update TODO 2024-07-02 16:59:14 +02:00
Daniel Rusek a9d472d6e4 test: split the resolved test suite into separate test cases
Although being far from ideal and the first two test cases have to be run
before the setup phase otherwise they will fail, it still makes the test
suite look much better and easier to read
2024-07-02 10:08:53 +02:00
Luca Boccassi 5dfce2296c Merge pull request #33496 from YHNdnzj/fd-is-mount-symlink
mountpoint-util: do not assume symlinks are not mountpoints
2024-07-02 10:07:20 +02:00
Luca Boccassi 1b3dc17624 Merge pull request #33560 from YHNdnzj/trivial-cleanup-2
2 trivial follow-ups for recent PRs
2024-07-02 10:05:49 +02:00
Luca Boccassi aedc4f77d1 Merge pull request #33523 from neighbourhoodie/fix/dns-opt-extended-rcode
Fix DNS OPT extended rcode parsing
2024-07-02 01:48:40 +02:00
dependabot[bot] ba490e2281 build(deps): bump github/codeql-action from 3.24.7 to 3.25.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.7 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/3ab4101902695724f9365a384f86c1074d94e18c...b611370bb5703a7efb587f9d136a52ea24c5c38c)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 22:08:28 +02:00
Luca Boccassi 4739539a78 mkosi: update debian commit reference
* abf24e775c Add recommends on linux-sysctl-defaults
* 76cb4138d2 autopkgtest: skip qemu tests on arm64
* 0935d73526 Install new systemd-import generator
2024-07-01 21:42:11 +02:00
Mike Yuan 0ee63608bc shared/condition: add missing space after 'if'
Follow-up for 98b1ecc917
2024-07-01 19:14:22 +02:00
Mike Yuan 71c404f9cf shared/mount-util: return early if param is NULL
To make things more readable and consistent.
2024-07-01 18:59:28 +02:00
Lennart Poettering 1c30bf35bc Merge pull request #33475 from poettering/name-to-handle-at-fid
teach inode_same() the concept of name_to_handle_at() FIDs to properly detect inode identities
2024-07-01 18:53:14 +02:00
Daan De Meyer 9fc4388ae4 mkfs-util: Simplify logic 2024-07-01 18:52:57 +02:00
Lennart Poettering 29294d21cf units: add dep on systemd-logind.service by user@.service
Let's make sure logind is accessible by the time user@.service runs, and
that logind stays around as long as it does so.

Addresses an issue reported here:

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050468.html

This addresses an issued introduced by
278e815bfa, which dropped the a dependency
from user@.service systemd-user-sessions.service without replacement.
While dropping that dependency does make sense, it should have been
replaced with the weaker dependency on systemd-logind.service, hence fix
that now.

user@.service is after all a logind concept, hence logind really should
be around for its lifetime.

systemd-user-sessions.service is a later milestone that only really
should apply to regular users (not root), hence it's too strong a
requirement.
2024-07-01 18:52:35 +02:00
Daan De Meyer 53ee7e0aa1 Use read_full_file_full() in read_smbios11_field()
read_virtual_file() will only read up to page size bytes of data
from /sys/firmware/dmi/entries/.../raw so let's use read_full_file_full()
instead to make sure we read all data.

This should be safe since smbios11 data can be considered immutable
during the lifetime of the system.
2024-07-01 18:52:14 +02:00
Lennart Poettering 8c399057f4 Merge pull request #33553 from poettering/list-devices
add --list-devices switch to various tools that accept block devices to list candidate devices
2024-07-01 18:51:54 +02:00
Lennart Poettering a90682f981 storagetm: add --list-devices command 2024-07-01 16:39:40 +02:00
Lennart Poettering 3a37a13a02 repart: add --list-devices switch for listing candidate block devices 2024-07-01 16:39:40 +02:00
Lennart Poettering e742c99999 cryptenroll: add --list-devices switch that shows candidate block devices 2024-07-01 16:39:40 +02:00
Lennart Poettering 68ff31fa0a util: add generic block device listener helper
Various of our tools operate on block devices, and it's not always
obvious to know which block devices are actually appropriate for use.
Hence, let's add a helper that allows to list block devices, and
supports some limited filtering.
2024-07-01 16:39:40 +02:00
Lennart Poettering bff5d2fd5a blockdev-util: add partscan check function that takes an sd_device* 2024-07-01 16:35:56 +02:00
Lennart Poettering 68debef4c1 repart: add sections to --help text 2024-07-01 16:35:56 +02:00
Lennart Poettering a8db162d8a test: beef up test case for fid-based equality checks 2024-07-01 16:02:05 +02:00
Lennart Poettering f663a15aa5 stat-util: port inode_same_at() to use FID file handle data to determine inode identity
Let's be good boys, and use FID for this.
2024-07-01 16:02:05 +02:00