Commit Graph
59314 Commits
Author SHA1 Message Date
Lennart Poettering 8ef6106de4 Merge pull request #24392 from poettering/chase-symlinks-more-stuff
some tweaks to chase_symlinks() and port some code from prefix_roota() over
2022-08-22 18:41:14 +02:00
Yu Watanabe 760971125d test: make TEST-58-REPART support nspawn 2022-08-22 17:00:38 +02:00
Yu Watanabe 2b21522e82 test: merge test-repart.sh and TEST-58-REPART 2022-08-22 17:00:38 +02:00
Yu Watanabe 5996f11679 test: modernize TEST-58-REPART 2022-08-22 17:00:38 +02:00
Yu Watanabe 655eb07391 gpt: fix alignment 2022-08-22 17:00:38 +02:00
Yu Watanabe 4565246911 gpt: fix native uuids for s390x
__s390__ is defined for both s390 and s390x. Hence, we need to define
the native uuids for s390x at first.
2022-08-22 17:00:38 +02:00
Yu Watanabe 400e3d21f8 udev: fix inversed inequality for timeout of retrying event
Follow-up for 5d354e525a.
2022-08-22 17:00:38 +02:00
Yu Watanabe 695cfd53fe repart: drop doubled space 2022-08-22 17:00:38 +02:00
Antonio Alvarez Feijoo aa2118cb0b bash-completion: add systemd-sysext support 2022-08-22 15:41:38 +01:00
Antonio Alvarez Feijoo 782e41ab88 sysext: add missing COMMAND to the help output and man synopsis 2022-08-22 15:41:12 +01:00
Luca Boccassi d4001c518a Merge pull request #24385 from yuwata/hostname-chassis
hostname: fix fallback chassis type
2022-08-22 15:40:38 +01:00
Jan Macku 3d59b0470a ci: Drop actions/setup-node - unused
In `issue_labeler.yml` is no need for node.js runtime (`actions/setup-node`). It was accidentally added by `copy & paste` from another workflow.
2022-08-22 21:21:08 +09:00
Lennart Poettering 1d1c226f6c conf-files: port conf_files_list() over to chase_symlinks() from prefix_roota() 2022-08-22 14:08:48 +02:00
Lennart Poettering 3979ea8644 hwdb-test: don't rely on --root= quirk
Previously, the test would rely on the fact that systemd-hwdb would
follow symlinks outside of the --root= hierarchy. That's a bug however,
and systemd-hwdb shouldn't do that. Hence let's remove the fact that the
test relies on it, so that we can then fix systemd-hwdb (specifically:
conf_files_list()) accordingly.
2022-08-22 14:07:45 +02:00
Lennart Poettering 3730dc5d5b bootctl: port some more code over to chase_symlinks() from prefix_roota()
This is far from complete, but let's start moving this way.
2022-08-22 14:07:45 +02:00
Lennart Poettering 2b2caea21d chase-symlinks: add chase_symlinks_and_access() helper
This is similar to chase_symlinks_and_access() but wraps access() rather
than stat()
2022-08-22 13:40:13 +02:00
Lennart Poettering 37b9bc56fc chase-symlinks: fix shortcut condition 2022-08-22 13:40:13 +02:00
Lennart Poettering 6957023208 chase-symlinks: honour CHASE_NOFOLLOW flag properly in some cases 2022-08-22 13:40:13 +02:00
Yu Watanabe 1283eea8f4 test: add test case for chassis type 2022-08-22 19:26:31 +09:00
Tomáš Hnyk 376a30a7e5 Add support for Fn+PrtSc on Thinkpads
This adds support for Fn+PrtSc on my Lenovo Thinkpad Extreme gen 2. Judging by the picture on the key, it should probably instead of prog2 be "selective_screenshot" (that is a possible value from judging this list https://gist.githubusercontent.com/samvel1024/02e5675e04f9d84f098e98bcd0e1ea12/raw/e18d950ce571b4ff5c832cc06406e9a6afece132/keynames.txt ) but that does not register with evtest at all. With this change, evtest reports:

```
Event: time 1661081631.027773, type 1 (EV_KEY), code 149 (KEY_PROG2), value 1
Event: time 1661081631.027773, -------------- SYN_REPORT ------------
Event: time 1661081631.027886, type 1 (EV_KEY), code 149 (KEY_PROG2), value 0
Event: time 1661081631.027886, -------------- SYN_REPORT ------------
```

I am not sure if systemd is the right place to add this, if not, please refer me somewhere else.
2022-08-22 10:34:21 +01:00
jiangchuangang e3a4724db2 take jointly mounted controllers into account when migrate cgroups, otherwise "CGroupMask done" seems to be redundant. 2022-08-22 14:21:31 +09:00
Yu Watanabe 471fdebfde hostname: make chassis type actually obtained from ACPI when nothing from DMI
Fixes a bug introduced by 8c8b1800e9.

Fixes #24384.
2022-08-22 13:38:26 +09:00
Luca Boccassi 20e72c2bd4 Merge pull request #24379 from mrc0mmand/llvm-15
ci: build with clang-15; drop clang-12
2022-08-20 23:38:52 +01:00
Daan De Meyer 819a2502f2 mkosi: Install tests in final image 2022-08-20 23:24:19 +02:00
Frantisek Sumsal 3b2b3d2985 hashmap: use assert_se() to make clang happy
Otherwise it complains about a set but unused variable:

```
../src/basic/hashmap.c:1070:48: error: variable 'n_rehashed' set but not used [-Werror,-Wunused-but-set-variable]
        unsigned old_n_buckets, new_n_buckets, n_rehashed, new_n_entries;
                                                       ^
                                                       1 error generated.
```
2022-08-20 21:57:18 +02:00
Frantisek Sumsal 9abe4cfc39 coredump: drop an unused variable 2022-08-20 21:04:24 +02:00
Frantisek Sumsal f8769631e1 network: drop an unused variable 2022-08-20 21:00:14 +02:00
Frantisek Sumsal f7c1808e69 machine: drop an unused variable 2022-08-20 20:47:48 +02:00
Frantisek Sumsal 94510784e1 sd-journal: drop an unused variable 2022-08-20 20:46:23 +02:00
Frantisek Sumsal d7c1024b6b ci: build with clang-15; drop clang-12 2022-08-20 20:12:03 +02:00
Yu Watanabe 645deddbaf Merge pull request #24378 from yuwata/test-network-issue-24377
test-network: add test case for issue #24377
2022-08-20 22:24:53 +09:00
Yu Watanabe b249834bc3 test-network: add test for issue #24377
The issue has been already fixed by
b05e52000b (PR #24020).
2022-08-20 20:50:02 +09:00
Yu Watanabe 5bd2a7c580 test-network: add helper functions for reading logs of networkd 2022-08-20 20:35:18 +09:00
Yu Watanabe 0f27758ae9 Merge pull request #24356 from keszybz/sd-netlink-api
Small improvements to the sd-netlink api
2022-08-20 19:11:02 +09:00
Aryan singh 131298867b hwdb: Add Avita Liber NS13A2 (#24376)
This fixes the discrepancies in the coordinate ranges for the touchpad, touchpad in this device(NS13A2) is generic and the same one is used in most models.
2022-08-20 12:02:54 +02:00
Lennart Poettering 6564591cc3 measure: store bank name in PcrState structure
Let's not query/strdup()ascii_strlower() it all the time, but just cache
it once and use it.
2022-08-20 09:01:31 +09:00
Yu Watanabe 1af39ef2f6 test: wait for whole block device instead of partition
In 'udevadm lock' the device /dev/loopX is locked instead of
/dev/loopXp1. Hence, 'udevadm wait' should wait for /dev/loopX.

For some reasons, the kernel sometimes does not emit uevent for
partitions, and 'udevadm wait' for partitions may fail.

Fixes #24360.
2022-08-20 09:01:14 +09:00
Frantisek Sumsal bea9d62bdb test: correctly process multiline strings in $KERNEL_APPEND
Some tests (like TEST-02) set a multiline string to $KERNEL_APPEND
(which is a valid thing to do), unfortunately we'd use only the first
line of it and throw the rest away, e.g:

```
$ printf "%s" "$x"
hello

this is a multiline

kernel command line
$ read -ra out <<< "$x"
$ printf "%s" "${out[@]}"
hello
```

Let's use readarray/mapfile instead to avoid this:

```
$ readarray out <<< "$x"
$ printf "%s" "${out[@]}"
hello

this is a multiline

kernel command line

```
2022-08-19 22:31:32 +01:00
Lennart Poettering c06b6d46fd measure: add json output 2022-08-19 23:26:09 +02:00
Lennart Poettering 82b0039eb0 Merge pull request #24368 from poettering/tpm2-json-pcr-array-rework
tpm2: add helpers for building/parsing JSON arrays of PCR indexes
2022-08-19 21:51:47 +02:00
Luca Boccassi 3093b158bc Merge pull request #24350 from DaanDeMeyer/docs-pkexec
docs: Recommend pkexec over using an askpass program with sudo
2022-08-19 20:43:50 +01:00
Lennart Poettering 222a951fa4 tpm2-util: introduce tpm2_parse_pcr_argument() helper
Add a new tpm2_parse_pcr_argument() helper that unifies how we merge PCR
masks in a single function, we can use all over the place. Previously we
had basically the same code for this at 4 places.
2022-08-19 21:26:26 +02:00
Michal Sekletar 466266c172 rules: import previous SYSTEMD_READY state for suspended DM devices and skip other rules
We can't get any FS meta-data from a suspended device. Hence defer
making any plugged/unplugged decisions, i.e. we just import whatever was
previous state and skip processing all other rules.

Thanks Lennart Poettering <lennart@poettering.net> for suggesting this
solution.
2022-08-19 20:13:47 +01:00
Lennart Poettering 98193c39c6 tpm2-util: expose more hash algorithms
swtpm supports them, hence maybe support them in our codebase, too
2022-08-19 20:12:49 +01:00
Lennart Poettering df6c3cbd02 tpm2-util: add TPM2_PCR_MASK_VALID() helper 2022-08-19 20:12:20 +01:00
Zbigniew Jędrzejewski-Szmek 93c0a5eccf sd-netlink: use SD_EVENT_ONESHOT for a time-based callback 2022-08-19 17:43:56 +02:00
Lennart Poettering d8776eed9b TEST-70-TPM2: use "truncate" to generate disk image
Let'se operate on a sparse file here, to reuduce memory use.
2022-08-19 16:34:30 +02:00
Lennart Poettering 1dad9cd766 Merge pull request #24362 from poettering/sha256-tweaks
some tweaks to the sha256 implementation
2022-08-19 16:33:35 +02:00
Lennart Poettering 8de8ec88da tpm2-util: also add helper for parsing PCR arrays 2022-08-19 16:30:37 +02:00
Lennart Poettering 4436081e9d tpm2-util: split out helpers which format a PCR mask as a JSON array
This makes the code easier to read, and is something we can reuse later
on.
2022-08-19 16:29:38 +02:00