1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-18 10:04:04 +03:00

74873 Commits

Author SHA1 Message Date
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](3ab4101902...b611370bb5)

---
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 98b1ecc9175a8bb241292f6f441a754b6759dd97
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
278e815bfa3e4c2e3914e00121c37fc844cb2025, 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
Lennart Poettering
2ed5bd5738 mountpoint-util: clarify that EOVERFLOW is visible on nfs4/autofs mounts 2024-07-01 15:45:15 +02:00
Lennart Poettering
4c39ab9b40 mountpoint-util: use the FID stuff for detecting the root of mounts
In the unlikely event that sandboxes block statx() but let
name_to_handle_at() through it's a good way to determine the root inode
of the namespace, since its parent inode will have the same FID and
mnt_id.
2024-07-01 15:45:15 +02:00
Lennart Poettering
81995fbb96 mountpoint-util: add new helper name_to_handle_at_try_fid()
Newer kernels support a new flag for name_to_handle_at(): AT_HANDLE_FID.
This flag is supposed to return an identifier for an inode that we can
use for checking inode identity. It's supposed to be a replacement for
checking .st_ino which doesn't work anymore today because inode numbers
are no longer unique on file systems (not on overlayfs, and not on btrfs
for example). Hence, be a good citizen and add infrastructure to support
AT_HANDLE_FID. Unfortunately that doesn't work for old kernels, hence
add a fallback logic: if we can use the flag, use it. If we cannot use
name_to_handle_at() without it, which might give us a good ID too. But
of course tha tcan fail as well, which callers have to check.
2024-07-01 15:45:15 +02:00
Lennart Poettering
6fba9a28b9 mountpoint-util: use ERRNO_IS_xyz() at more places 2024-07-01 15:45:15 +02:00
Lennart Poettering
8da6413860 mountpoint-util: add public helper for comparing file handles
We already have the code, let's move it to a function of its own and
export it.
2024-07-01 15:45:15 +02:00
Lennart Poettering
a89690f719 mountpoint-util: make is_name_to_handle_at_fatal_error() an exported API
And while we are at it, make it use ERRNO_IS_xyz() where appropriate.

And move it up a bit, so we can use in the whole of mountpoint-util.c
(which we want to later).
2024-07-01 15:45:15 +02:00
dependabot[bot]
502fbea8c1 build(deps): bump actions/checkout from 4.1.6 to 4.1.7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 13:18:45 +02:00
rhellstrom
98b1ecc917 Conditional PSI check to reflect changes done in 5.13
cpu.pressure 'full' is undefined for system-wide checks since 5.13 but still reported with values set to 0 for backwards compatibility. Made changes to reflect this for system-wide checks so that the conditional comparison is not made against the 0 value and instead fall back to 'some'.

https://www.kernel.org/doc/html/latest/accounting/psi.html
2024-07-01 11:21:46 +02:00
Luca Boccassi
c3f0f6f8bd core: try again bind mounting if the destination was already created
If the destination mount point is on a shared filesystem and is
missing on the first attempt, we try to create it, but then
fail with -EEXIST if something else created it in the meanwhile.
Enter the retry logic on EEXIST, as we can just use the mount
point if it was already created.

Fixes https://github.com/systemd/systemd/issues/29690
2024-06-30 00:44:03 +02:00
Luca Boccassi
c5822010ae
Merge pull request #33544 from DaanDeMeyer/sector-size
repart: Two sector size improvements
2024-06-29 21:31:04 +02:00
Mike Yuan
6498a25a6d
NEWS: fix typo 2024-06-29 16:48:18 +02:00
Mike Yuan
2e7b407539
NEWS: nscd has been dropped for good
Follow-up for 28f1f1a5e652508d6e61ace8918e8b831e4b62b4
2024-06-29 16:35:26 +02:00
Mike Yuan
7fee3dd4c6
Merge pull request #33258 from YHNdnzj/cg-runtime-accounting
core/cgroup: various fixes for accounting
2024-06-29 16:11:44 +02:00
Daan De Meyer
03c9e88fb7 mkfs-util: Set sector size for btrfs as well
btrfs used to default the sector size to the page size and didn't
support anything else. Since 6.7, it defaults to 4K and using 4K
makes the filesystem compatible with all page sizes. So let's make
sure we use minimum 4K as well (lower causes failures on systems with
a 4K page size) but still allow larger sector sizes if specified by
the user.
2024-06-29 16:11:34 +02:00
Daan De Meyer
d34361149f repart: Don't set filesystem sector size to 512
We want to use 4K as the default sector size for filesystems so they
don't have to be regenerated to work on 512, 2048 or 4096 sector sizes.
2024-06-29 15:37:49 +02:00
DocNITE
a76d88644f Added mised EVDEV_ABS_35 & EVDEV_ABS_36 for GAOMON s620 2024-06-29 12:22:01 +02:00
Luca Boccassi
2e1203ddbe
Merge pull request #30360 from keszybz/nscd-drop
Drop support for nscd
2024-06-29 10:36:16 +02:00
Luca Boccassi
317b0255ed
Merge pull request #33536 from teknoraver/hashmap_ensure_replace
Hashmap ensure replace
2024-06-29 10:31:11 +02:00
Daan De Meyer
0e445aaa85 repart: Log more about filesystem sector size 2024-06-29 02:09:55 +02:00
Luca Boccassi
1c74db68e4
Merge pull request #33518 from DaanDeMeyer/aarch64
Various integration test fixes
2024-06-29 02:09:21 +02:00