Commit Graph

67143 Commits

Author SHA1 Message Date
Mike Yuan
a628d933cc hibernate-resume: split out the logic of finding hibernate location
Before this commit, the hibernate location logic only exists in
the generator. Also, we compare device nodes (devnode_same()) and
clear EFI variable HibernateLocation in the generator too. This is
not ideal though: when the generator gets to run, udev hasn't yet
started, so effectively devnode_same() always fails. Moreover, if
the boot process is interrupted by e.g. battery-check, the hibernate
information is lost.

Therefore, let's split out the logic of finding hibernate location.
The generator only does the initial validation of system info and
enables systemd-hibernate-resume.service, and when the service
actually runs we validate everything again, which includes comparing
the device nodes and clearing the EFI variable. This should make
things more robust, plus systems that don't utilize a systemd-enabled
initrd can use the exact same logic to resume using the EFI variable.
I.e., systemd-hibernate-resume can be used standalone.
2023-09-07 20:21:16 +08:00
Lennart Poettering
82b7bf8c1c Merge pull request #28957 from yuwata/core-mount-set-dirty-on-umount
core/credential,mount: re-read /proc/self/mountinfo before invoking umount command
2023-09-07 11:54:52 +02:00
Christian Kirbach
8e2d9d40b3 po: Translated using Weblate (German)
Currently translated at 85.4% (194 of 227 strings)

Co-authored-by: Christian Kirbach <christian.kirbach@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/de/
Translation: systemd/main
2023-09-07 07:08:28 +09:00
Zbigniew Jędrzejewski-Szmek
1c5d54b2df test: use 'until' instead of 'while !'
In general, it's better to avoid a negation. And "!" is special, because it is
used for history expansion, i.e. the same command would behave differently if
pasted on the command line.

Inspired by 4a899c5a23.
2023-09-06 19:54:29 +01:00
David Santamaría Rogado
8b7f0eb6a8 hwdb: keyboard: D330 FnLk toggle
Map Fn+Tab to fn_esc as is FnLock toggle in this keyboard. Still doesn't behave as expected because work in ideapad_laptop kernel module could be required but now at least we report the same mapping in others keyboards with Fn+ESC for FnLock and not unknown.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
2023-09-06 19:00:29 +01:00
Luca Boccassi
7d84904925 Merge pull request #29098 from keszybz/man-page-postreview-fixup
man/systemd-id128: fix example
2023-09-06 18:58:27 +01:00
Jan Janssen
400229eaae man: Add new Microsoft CAs to example
Also, let's use the links from the Microsoft documentation as they are
guaranteed to be stable.

Fixes: #29102
2023-09-06 18:56:51 +01:00
Lennart Poettering
ef65c0f6cc openssl-util: add common implementation of digest+sign 2023-09-06 18:34:21 +01:00
Yu Watanabe
1e1225614c core/credential,mount: re-read /proc/self/mountinfo before invoking umount command
When a unit has credentials, stopping the service unmounts the credentials
directory. On shutdown, stopping the service and the corresponding mount
unit may be done mostly simultaneously, and if we invoke umount command soon
after umount() being called on stopping the service, the mount unit will
fail.

This makes Mount.invalidated_state flag set when umount() is called for a path,
and re-read /proc/self/mouninfo before invoking umount command if the flag is set.

Fixes #25527.
Replaces #26959.
2023-09-07 01:05:13 +09:00
Yu Watanabe
25033cca08 test-execute: check credentials can be read on ExecStartPost= and friends
Prompted by
https://github.com/systemd/systemd/pull/28787#issuecomment-1690614202.
2023-09-07 00:53:28 +09:00
Yu Watanabe
133e4de23f core/exec-credential: introduce exec_context_get_credential_directory() helper function
No functional change, just refactoring.
2023-09-07 00:53:28 +09:00
Yu Watanabe
43962c30fb core: rename credential.[ch] -> exec-credential.[ch]
Also rename setup_credentials() -> exec_setup_credentials().

Addresses the post-merge review
https://github.com/systemd/systemd/pull/28787#pullrequestreview-1592065048.
2023-09-07 00:53:28 +09:00
Yu Watanabe
73ff4d48de Revert "core: do not leak mount for credentials directory if mount namespace is enabled"
This reverts commits
- 9ae3624889
  "test-execute: add tests for credentials directory with mount namespace"↲
- 94fe4cf255
  "core: do not leak mount for credentials directory if mount namespace is enabled",
- 7241b9cd72
  "core/credential: make setup_credentials() return path to credentials directory",
- fbaf3b23ae
  "core: set $CREDENTIALS_DIRECTORY only when we set up credentials"

Before the commits, credentials directory set up on ExecStart= was kept
on e.g. ExecStop=. But, with the changes, if a service requests a
private mount namespace, the credentials directory is discarded after
ExecStart= is finished.

Let's revert the change, and find better way later.

Addresses the post-merge comment
https://github.com/systemd/systemd/pull/28787#issuecomment-1690614202.
2023-09-07 00:53:28 +09:00
Zbigniew Jędrzejewski-Szmek
bf91ab6e1e id128: add forgotten option to --help 2023-09-06 16:58:50 +02:00
Zbigniew Jędrzejewski-Szmek
b477c6949a man/systemd-id128: fix example
The example was supposed to show how
machine-id/new/machine-id --app-specific/show --app-specific tie together, but
the verb was ommitted.

I also extended the explanation a bit and used long option form in the first
example for more clarity. In the second, more complicated example, the
one-letter form is used for brevity.

Noticed in post-review:
b37e8184a5 (r1315678438)
2023-09-06 16:56:40 +02:00
Thorsten Kukuk
53c0397b1d shared/wall: use logind if build without utmp support
If systemd is build without utmp support, use sd_get_sessions() in
utmp_wall() to get a list of logged in users with the corresponding tty.
2023-09-06 13:19:26 +01:00
Yu Watanabe
468018703c core: allow to run generators without sandboxing on qemu-user
When running on non-native userland architecture via systemd-nspawn
and qemu-user-static QEMU-emulator, clone() with CLONE_NEWNS fails with
EINVAL.

Fixes #28901.

[zjs: add a comment in the code]
2023-09-06 13:18:50 +01:00
Luca Boccassi
ed11d58658 Merge pull request #29101 from DaanDeMeyer/kernel
mkosi: More kernel fixes
2023-09-06 13:18:01 +01:00
Daan De Meyer
cbe7778f4c mkosi: Don't disable CONFIG_USB
Having USB enabled seems useful enough, this wasn't doing anything
regardless because we already enable CONFIG_USB earlier in the kconfig
file so this just gets rid of warning.
2023-09-06 12:58:30 +02:00
Daan De Meyer
1ca30ea8c5 mkosi: Don't build hid selftests
We don't build our kernel with hid support so don't build the selftests
either.
2023-09-06 12:57:57 +02:00
Daan De Meyer
ac82e7acbc mkosi: Enable two more kernel configs
Required for some bpf selftests so let's enable these in our config.
2023-09-06 11:39:39 +01:00
Luca Boccassi
f557df6a46 Merge pull request #29099 from medhefgo/ci
ci: Misc improvements
2023-09-06 11:11:51 +01:00
Lennart Poettering
354e5b8873 update TODO 2023-09-06 12:05:21 +02:00
Jan Janssen
690db0c80f ci: Do not run build test as root
Although, this is CI, we can still do better. It also ensures that any
env var changes make it into the script, as things like PATH would not
survive a `sudo -E`.
2023-09-06 11:01:53 +02:00
Jan Janssen
ce2c01789c ci: Don't produce debug output for build tests
These binaries are never used, so generating debug symbols just
slows down build time.
2023-09-06 11:01:53 +02:00
Jan Janssen
051ec23ce2 ci: Use apt-get in favor of apt
Apparently, apt does not have a stable CLI interface and warns about it.
2023-09-06 11:01:53 +02:00
Jan Janssen
592ee08f3b ci: Use add-apt-repository to enable sources
This should also ensure that consistent mirrors are selected.
2023-09-06 11:01:53 +02:00
khm
c00c3d93d5 Update 60-input-id.hwdb: add TEX Shinobi (#29068)
* Update 60-input-id.hwdb: add TEX Shinobi

The TEX Shinobi keyboard with trackpoint incorrectly identifies as a mouse instead of a pointing stick.   This corrects it as suggested at https://gitlab.freedesktop.org/libinput/libinput/-/issues/932#note_2069967

Following the example of the Lite-On keyboard entry, this modalias specifies the mouse unit without tagging the device's other entries.
2023-09-06 09:59:19 +01:00
Jan Janssen
bc763971ef ci: Remove custom build step names
Putting build matrix details into a build step name is rather useless as
the jobs themselves already contain the needed information.
2023-09-06 10:40:51 +02:00
Susant Sahani
681007ac20 test-network: Add test for PREF64 2023-09-06 15:53:11 +09:00
Yu Watanabe
5546506650 Merge pull request #29088 from yuwata/libsystemd-network-headers
libsystemd-network: split headers
2023-09-06 08:27:28 +09:00
Yu Watanabe
754d27e098 Merge pull request #29094 from yuwata/network-dbus-doc
man: update documents for network DBus interfaces
2023-09-06 08:25:35 +09:00
Luca Boccassi
d5bfee578c Merge pull request #29091 from yuwata/sd-dhcp-client-use-usec
sd-dhcp-client: use usec_t for time values
2023-09-05 22:23:06 +01:00
Yu Watanabe
b386ff3651 sd-dhcp6-client: split out sd-dhcp6-protocol.h 2023-09-06 06:14:55 +09:00
Yu Watanabe
1f3a52d5b8 sd-dhcp-server: fix typo in arguments 2023-09-06 06:14:28 +09:00
Yu Watanabe
409f014e23 sd-dhcp: split out sd-dhcp-protocol.h from sd-dhcp-client.h 2023-09-06 06:14:15 +09:00
Yu Watanabe
18fe822101 meson: sort headers 2023-09-06 06:12:29 +09:00
Yu Watanabe
1d5db7b9f3 man: mention DBus interfaces for DHCP clients
Follow-up for #28896.
2023-09-06 06:05:55 +09:00
Yu Watanabe
0f9a2b802b network/ndisc: split out ndisc_router_process_icmp6_ratelimit()
Otherwise, if ndisc_router_process_default() return earlier, e.g.
when Network.ipv6_accept_ra_use_gateway is false, then the
ratelimit is not applied.
2023-09-05 22:03:34 +01:00
Luca Boccassi
0e9bf034bb Merge pull request #29089 from yuwata/network-ndisc-pref64-follow-ups
network/ndisc: follow-ups for PREF64 handling
2023-09-05 22:02:47 +01:00
Yu Watanabe
53dff954d3 network: reorder bus implementations
Otherwise, in the man page, DHCPServer interface is listed in the Link
object.
2023-09-06 06:01:31 +09:00
Luca Boccassi
ee6cf8eaf1 dissect: add 'f2fs' to allow-listed filesystems
f2fs is actively maintained upstream, and popular in certain device
categories (phones, embedded), so allow-list by default.

Fixes https://github.com/systemd/systemd/issues/29026
2023-09-05 21:38:29 +01:00
Luca Boccassi
3894b3f0c2 Merge pull request #29080 from mrc0mmand/test-tweaks
A couple of test tweaks for recent-ish CI fails
2023-09-05 19:44:52 +01:00
Zbigniew Jędrzejewski-Szmek
b86fe4ba7f Merge pull request #29038 from keszybz/test-name-length-enforcement
Limit width of fuzz test names in meson output
2023-09-05 21:29:13 +03:00
Yu Watanabe
0ad8d953de sd-dhcp-client: introduce sd_dhcp_lease_has_6rd() helper function
No functional change, just refactoring.
2023-09-06 02:02:21 +09:00
Yu Watanabe
a93538e892 dhcp: introduce sd_dhcp_lease_get_timestamp()
And drop sd_dhcp_client_get_lease_timestamp().

Also, this introduce sd_dhcp_lease_get_lifetime_timestamp() and friends,
which provides timestamp of the lifetime and so on, while
sd_dhcp_lease_get_lifetime() provides timestamp.
2023-09-06 02:02:21 +09:00
Yu Watanabe
7cd0755198 time-util: introduce triple_timestamp_from_boottime() 2023-09-06 02:02:21 +09:00
Yu Watanabe
5fde4d37d4 sd-dhcp-client: store lifetime and friends in usec_t 2023-09-06 02:02:21 +09:00
Lennart Poettering
08237f062e logind: give better error messages when failing to attach devices to seats
When the user tries to attach a device lacking ID_FOR_SEAT they
currently get a very cryptic error message. Let's improve the situation
a bit. Still a bit cryptic maybe, but much less so.

Inspired-by: https://lists.freedesktop.org/archives/systemd-devel/2023-September/049469.html
Inspired-by: https://lists.freedesktop.org/archives/systemd-devel/2023-September/049484.html
Also-see: https://lists.freedesktop.org/archives/systemd-devel/2023-September/049470.html
Also-see: https://lists.freedesktop.org/archives/systemd-devel/2023-September/049489.html
2023-09-05 17:57:57 +01:00
Yu Watanabe
4df16cd018 network/ndisc: refuse too many PREF64 prefixes
Follow-up for 6e8f5e4c1f.

Addresses https://github.com/systemd/systemd/pull/29009#issuecomment-1705700926.
2023-09-06 01:22:43 +09:00