Commit graph

59192 commits

Author SHA1 Message Date
Yu Watanabe 21d0ed68ee test-network: add tests for MTUBytes= for bridge master and ports
Prompted by #24311.
2022-08-16 21:46:40 +00:00
Kai Lueke 1abe15fe9d man: Correct information on sysext masking
While I had tested that a symlink to /dev/null works to "mask" a sysext
I must have gotten something wrong and thus the instructions in
519c2f0d6b don't work. What works,
at least at the moment, is to instead have an empty directory with the
extension name under /etc/extensions/.
Correct the info in the man page and add a test for it.
2022-08-16 20:43:51 +01:00
Jan Macku 3f3c718e79 ci(lint): add shell linter - Differential ShellCheck
It performs differential ShellCheck scans and report results directly in
pull request.

documentation:
https://github.com/redhat-plumbers-in-action/differential-shellcheck
2022-08-16 13:33:57 +00:00
Avram Lubkin 19193b4898
sysusers: add fsync for passwd (#24324)
https://github.com/systemd/systemd/pull/6636 added `fsync()` when
temporary shadow, group, and gshadow files are created, but it was
not added for passwd. As far as I can tell, this seems to have been
an oversight. I'm seeing real world issues where a blank /etc/passwd
file is being created if a machine loses power early in the boot process.
2022-08-16 21:51:21 +09:00
Lennart Poettering 7309690788 tpm-util: use trial session where appropriate
TPM2 knows two types of policy sessions: "real" ones and "trial" ones. The
latter allow you to calculate a policy hash without this enforcing any
policy, which the former do. Typically you want to use the "trial" ones
when enrolling, and you have to use the "real" ones for unlocking. So
far we used "real" ones for both cases. Which works fine – as long as
the policy put together matches the current reality (e.g. the PCR values
included in the policy are the ones currently in place in the TPM).

Let's switch to using trial sessions for enrolling. First of all this is
preparation for later work to implement further policy extensions (for
example, policies binding to literally specified PCR values, instead of
the once currently measured). But from my perspective more importantly
it actually is cleaner, as it communicates more clearly what we are
actually doing here.

No user-visible change in behaviour.
2022-08-16 10:16:19 +09:00
Daan De Meyer 599884bd9a mkosi: Update to latest commit
Introduces a more reliable mirror for Arch which should reduce the
number of mkosi Arch CI failures due to unreliable mirror selection.
2022-08-16 08:59:15 +09:00
Yu Watanabe be6c89b8f1
Merge pull request #24294 from rphibel/add-support-for-list-of-definitions-directories
repart: add support for list of definitions directories
2022-08-16 08:58:25 +09:00
Lennart Poettering 731e5cda15 shutdown: trivial modernizations 2022-08-16 08:49:00 +09:00
Lennart Poettering 281d328d2d cryptenroll: drop unnecessary {} 2022-08-16 08:48:10 +09:00
Lennart Poettering 108bb8d065 creds-tool: don't declare variable in switch body
The lifetime of variables decalred in the main switch/case body is just
weird. Let's not rely on it, but just open a new {} block, like
everywhere else in similar cases.
2022-08-16 08:47:46 +09:00
Yu Watanabe 4f4e9104f3
Merge pull request #24299 from yuwata/dhcp6-no-binding
dhcp6: gracefully handle NoBinding error
2022-08-16 08:47:17 +09:00
Sean Anderson b23b11719d Fix typo in net-naming-scheme man page
I noticed a typo in the man page. Fix it.

Fixes: 65c2ad985a ("udev: net_id: Use devicetree aliases when available")
2022-08-16 07:45:44 +09:00
Lennart Poettering 685e3417fa tpm2: typo fix selecion → selection 2022-08-16 07:43:30 +09:00
Lennart Poettering e228d48b9e
Merge pull request #24263 from pothos/sysext-for-static-binaries
sysext: Support distribution-independent extensions with static binaries
2022-08-15 13:34:54 +02:00
Lennart Poettering 821d94c403 tpm2-util: reduce unnecessary indentation
Follow-up for: 55efb33edb
2022-08-15 13:10:03 +02:00
Yu Watanabe 628998ecfa udev/cdrom_id: check last track info
Fixes off-by-one issue.

Fixes #24306.
2022-08-15 12:56:26 +02:00
Kai Lueke 16c1ca0db4 sysext: introduce ARCHITECTURE field to match host architecture
When an extension image has binaries they should match the host
architecture. Currently there is no way to specify this requirement.
Introduce an ARCHITECTURE field in the extension's release file that
may be set to prevent loading on the wrong host architecture.
Since this new field is introduced late, we don't want to make
specifying it mandatory as it would break existing sysext images.

See https://github.com/systemd/systemd/issues/24061
2022-08-15 10:54:32 +02:00
Kai Lueke ab4d43c54e sysext: support distribution-independent extensions using ID=_any
A sysext image that merely contains static binaries has no dependency
on the host distribution and should be able to be used anywhere.
Support the special '_any' value for the ID field in the extension to
opt-out of ID and VERSION_ID/SYSEXT_LEVEL matching.

See https://github.com/systemd/systemd/issues/24061
2022-08-15 10:51:01 +02:00
bin456789 e56dc320d3 firstboot: fix can't overwrite timezone 2022-08-15 14:08:04 +09:00
Yu Watanabe 3f504b892b network/bridge: fix UseBPDU= and AllowPortToBeRoot=
Fixes bugs caused by 7f9915f0de.

Fixes #24268.
2022-08-14 06:56:05 +09:00
Yu Watanabe e3e7185a70
Merge pull request #24305 from yuwata/test-network
test-network: also set StartLimitIntervalSec=0 for systemd-networkd.socket
2022-08-14 06:55:29 +09:00
Jan Janssen 8ea086c894 Use correct label for boot related issues 2022-08-14 05:35:55 +09:00
Yu Watanabe 85b1a14d70 test-network: use "systemctl restart" to restart networkd 2022-08-14 03:56:01 +09:00
Yu Watanabe 93f5ae6ba2 test-network: also set StartLimitIntervalSec=0 for systemd-networkd.socket
The socket unit is frequently restarted during the test.
2022-08-14 03:49:00 +09:00
Yu Watanabe 4c275f362f dhcp6: do not append ORO option when no option requested
Fixes #24292.
2022-08-14 02:44:52 +09:00
Yu Watanabe 1929c1fcb2 dhcp6: gracefully handle NoBinding error
When we receive NoBinding status code, the requesting binding (address or
any other information) does not exist anymore in the server. Hence,
resending the request is meaningless. Let's restart the transaction from
the beginning in that case.
2022-08-13 05:26:22 +09:00
Yu Watanabe 38db7a4ed3
Merge pull request #24138 from Keksgesicht/rfe/cryptenroll-keyfile
adding the option to use a keyfile to unlock the device
2022-08-13 03:35:03 +09:00
Alper Nebi Yasak 1800f7098a hwdb: Apply existing accel orientation quirk to all Chromebooks
The cros-ec-accel and cros-ec-accel-legacy kernel modules internally
correct for the board-specific accelerometer mounting orientations.
Their sensor outputs are in a standard reference frame consistent across
different boards, so the orientation matrix already added for a number
of devices should apply to every device using cros-ec accelerometers.
The different matrix for the 'Nocturne' board seems to be an error.

Replace the existing hwdb rules for select Chromebooks with generic
rules that apply to all Chromebooks.
2022-08-13 03:30:18 +09:00
williamsumendap d277530616
network: replace usage of sd_bus_call_method_async() to bus_call_method_async() (#24290) 2022-08-13 03:28:29 +09:00
Yu Watanabe 9d9bc6fc57
Merge pull request #24285 from yuwata/sd-device-new-from-path
sd-device: make sd_device_new_from_path() support symlink outside of /sys
2022-08-13 03:27:26 +09:00
Yu Watanabe 9138278b95
Merge pull request #24289 from yuwata/sd-device-monitor-set-description
sd-device-monitor: introduce sd_device_monitor_{set,get}_description()
2022-08-13 03:27:05 +09:00
Lennart Poettering 9420fea8fd tpm2-util: rename tpmKey → primary
Let's use the nomenclature from the spec. "tpmKey" is just too genric.
2022-08-13 02:56:08 +09:00
Lennart Poettering 55efb33edb tpm2-util: lower indentation level a tiny bit 2022-08-13 02:54:43 +09:00
Lennart Poettering 7e196e9aac cryptenroll: fix memory leak 2022-08-13 02:53:41 +09:00
Richard Phibel ddf259311f man: document support for drop-in files in systemd-repart 2022-08-12 19:09:07 +02:00
Richard Phibel ea2aaff80e man: document support for list of definitions directories in systemd-repart 2022-08-12 18:13:30 +02:00
Richard Phibel 224c853fdf repart: add support for list of definitions directories 2022-08-12 18:05:18 +02:00
Lennart Poettering 8680e40a2c update TODO 2022-08-12 15:37:36 +02:00
Yu Watanabe 829bb61fb8 udev: use sd_device_new_from_path() and _new_child()
Follow-up for 65c2ad985a.
2022-08-12 21:48:13 +09:00
Yu Watanabe 284ef480d0 test: add more tests for sd_device_new_from_path() 2022-08-12 21:42:00 +09:00
Yu Watanabe 95c250be0d sd-device: allow to create sd-device object through a symlink outside of /sys
For example, /proc/device-tree is a symlink to /sys/firmware/devicetree/base,
and the kernel documentation says the symlink should be used by userspace app.
See, https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw.
Hence, it is useful to make `sd_device_new_from_path()` support such symlink.
2022-08-12 21:41:12 +09:00
Lennart Poettering c94887f10d
Merge pull request #24273 from lnussel/refactor_sysuser_creds
Refactor sysuser creds
2022-08-12 14:32:06 +02:00
Yu Watanabe f714ecd450 udev: set description for device monitor 2022-08-12 21:27:14 +09:00
Yu Watanabe cbdf6a1fcf test: use sd_device_monitor_set_description() 2022-08-12 21:27:14 +09:00
Yu Watanabe f36b683f6c sd-device-monitor: logs description for device monitor 2022-08-12 21:27:14 +09:00
Yu Watanabe 39f11aa422 sd-device-monitor: introduce sd_device_monitor_{set,get}_description() 2022-08-12 21:27:14 +09:00
Yu Watanabe edf6cbc30f
Merge pull request #24286 from yuwata/test-sd-device-monitor
test-sd-device-monitor: several fixlets
2022-08-12 21:24:40 +09:00
Yu Watanabe 0186571c9f sd-device-enumerator: drop noisy log messages
These are not for failed tasks, and provide almost no information.
2022-08-12 21:23:58 +09:00
Yu Watanabe df85ff9cad
Merge pull request #24288 from yuwata/sd-device-monitor-fixlets
sd-device-monitor: two fixlets
2022-08-12 21:23:24 +09:00
Richard Phibel c412f4c603 repart: add test for drop-in files 2022-08-12 12:48:29 +02:00