Commit graph

68314 commits

Author SHA1 Message Date
Lennart Poettering c24a8c6bfe NEWS: mention that ip=off now means ip=off 2023-10-31 11:03:53 +01:00
Lennart Poettering 8e24b345c5 man: document the new ip=link-local kernel cmdline option 2023-10-31 11:03:53 +01:00
Lennart Poettering b3634c45d7 network-generator: add support for ip=link-local 2023-10-31 11:03:49 +01:00
Lennart Poettering ce3e9428ac network-generator: name enum for "ip=dhcp" case same as literal string
Let's make this less confusing, and use the same string externally as
enum name internally.
2023-10-31 10:56:31 +01:00
Yu Watanabe 78101ca9cc
Merge pull request #29247 from naraghavan/naraghavan/dhcpv6-vendor-options
networkd: Add DHCP vendor specific sub options to dbus API
2023-10-31 17:14:20 +09:00
Yu Watanabe d19434fbf8 tree-wide: fix typo 2023-10-31 14:35:33 +09:00
Ronan Pigott 9968ca32cf network: free dhcp6_hostname
Fixes: b90480c80d ("network: introduce SendHostname/Hostname DHCPv6 options")
2023-10-31 14:26:44 +09:00
Yu Watanabe fd21f0cd37
Merge pull request #29767 from poettering/host-to-host
automatic support for host-to-host networking that only does link-local addressing
2023-10-31 10:59:44 +09:00
Frantisek Sumsal 33b0e0c09a test-network: copy rules from source & build trees if needed
When running with --build-dir= we need to copy over udev rules from
$BUILD_DIR/udev.d/ and $SOURCE_TREE/udev.d/ to make stuff work as
expected.
2023-10-30 21:13:00 +00:00
Lennart Poettering 779a1837e5 update TODO 2023-10-30 18:57:41 +01:00
Lennart Poettering e6ba085398 network: add default .network file matching ID_NET_AUTO_LINK_LOCAL_ONLY=1
This is name ".network.example" for now, to match the existing
80-ethernet.network file.

I think it would make sense to actually install this by default if told
so via a meson file (and then hopefully this would happen even on
Fedora, though in a split off RPM or so). However, we aren't there yet,
hence for now, just ship the .network files as example, like the others.
2023-10-30 18:57:41 +01:00
Lennart Poettering ec541c569b hwdb,rules: mark host-to-host network devices as only requiring link local addressing
This is a generalization of this logic:

https://github.com/NetworkManager/NetworkManager/blob/main/data/90-nm-thunderbolt.rules

It applies not just to thunderbolt, but to any kind of device, even
matched by vendor/product, via hwdb.

I added two entries for Prolific PC-to-PC devices (of which I have one
lying around).
2023-10-30 18:57:41 +01:00
Frantisek Sumsal d203e5e008 test: add one missing cleanup
So the test doesn't fail when run multiple times with the same image.
2023-10-30 22:37:08 +09:00
Raito Bezarius b9a0a13f7a secure-boot: print just before cold-resetting to help diagnose hangs
When testing the secureboot enroll feature, it can be hard to distinguish without
using the QMP API of QEMU whether we are in a hang situation of the UEFI firmware.

Making it clear that we reached the `ResetSystem` can be helpful towards that need.
2023-10-30 13:20:48 +00:00
Mike Yuan 77bd39385e sleep-config: allow setting empty HibernateMode= (use kernel default)
Both sleep_mode_supported and write_mode support this,
but parse_sleep_config currently prohibits this - it always
uses our default value if user specifies HibernateMode=<empty>.
2023-10-30 11:34:21 +00:00
Lennart Poettering 8955e48fcb Update TODO 2023-10-30 12:29:16 +01:00
Lennart Poettering df586a49bb doc: document explicitly when we require specific top-level mounts to be established 2023-10-30 11:10:50 +00:00
Ronan Pigott b90480c80d network: introduce SendHostname/Hostname DHCPv6 options
These options were previously reused by the DHCPv6 client from the
DHCPv4 client settings. Let's separate them for consistency.
2023-10-30 11:04:10 +00:00
Lennart Poettering 02484f20a2 update TODO 2023-10-30 10:51:35 +01:00
Alex Hudspith ade790006b man: revise wording of cgtop -k and -P
Resolves: #29753
2023-10-28 16:03:48 +01:00
Luca Boccassi 7b6d3dcdd2 exec-invoke: don't double-close FDs on error
When a late error occurs in sd-executor, the cleanup-on-close of the
context structs happen, but at that time all FDs might have already
been closed via close_all_fds(), so a double-close happens. This
can be seen when DynamicUser is enabled, with a non-existing
WorkingDirectory.

Invalidate the FDs in the context structs if close_all_fds succeeds.
2023-10-28 16:56:25 +02:00
Daan De Meyer f756bcdf17 mkosi: Use cache and build subdirectories
Next release of mkosi will not use subdirectories under the cache
and build directory by default anymore, so let's make sure we already
start creating those ourselves.
2023-10-28 11:30:18 +01:00
Mike Yuan 6d468648b9
Merge pull request #29740 from YHNdnzj/sleep-round-four
sleep: make sure we clear HibernateLocation on all error paths
2023-10-28 17:53:54 +08:00
Frantisek Sumsal f939a403ca tmpfiles: ignore EINVAL with --graceful
Add EINVAL to the list of ignored errnos, since acl_from_text() returns
EINVAL if it can't translate the given string.

~# cat /tmp/tmpfiles-test.conf
a+ /tmp/foo - - - - default:group:foo:rwx
~# build/systemd-tmpfiles /tmp/tmpfiles-test.conf --create --graceful
Failed to parse ACL "default:group:foo:rwx", ignoring: Invalid argument

Resolves: #29742
2023-10-28 10:14:07 +01:00
Luca Boccassi 3ad5aedadc test: io.latency cgroup support might not be available, skip test
It doesn't seem to be enabled on Debian stable, and the test fails.

Follow-up for 5efc8183c9
2023-10-28 08:08:42 +00:00
Lennart Poettering a868e43772 namespace: normalize MountMode type a bit
Let's prefix it with a common prefix, and make sure the names are all
singular and the string table actually matches the names.

No change in behavour, just some rafactoring to make this enum a bit
less special, and make it follow our usual coding style more closely.
2023-10-28 10:27:56 +09:00
Yu Watanabe 2aa246e88f
Merge pull request #29693 from rpigott/dhcp-rapid-commit
network: implement RFC4039 DHCP Rapid Commit
2023-10-28 10:23:23 +09:00
Luca Boccassi f456fa23b7
Merge pull request #29737 from glance-/tpm2-openssl
tpm2: fix build failure without openssl
2023-10-27 23:21:44 +01:00
Luca Boccassi 8a505d3b6b
Merge pull request #29734 from YHNdnzj/fstab-filter-options
fstab-generator: drop ignored mount options from mount unit Options=
2023-10-27 23:20:46 +01:00
Luca Boccassi b3e4ee1f6a
Merge pull request #29745 from mrc0mmand/more-tests
test: cover more sd-executor related stuff
2023-10-27 23:20:23 +01:00
Frantisek Sumsal 5efc8183c9 test: cover more sd-executor related stuff
Let's probe directives that have slightly more "complex" handling in
the serialization/deserialization machinery.
2023-10-27 21:01:33 +02:00
Frantisek Sumsal b0bb3be130 core: don't insert an extra space before each SocketBind{Allow,Deny}= item
The extra space was actually screwing up deserialization:

~# systemd-run --wait --pipe -p SocketBindAllow=any true
Running as unit: run-u167.service
Finished with result: exit-code
Main processes terminated with: code=exited/status=234
Service runtime: 1ms
CPU time consumed: 0
~# journalctl -b -p err
...
Oct 27 16:39:15 arch systemd-executor[5983]: Failed to deserialize: Invalid argument

Let's not do that by default and introduce a simple wrapper which
inserts the space after each item only when necessary.
2023-10-27 20:08:47 +02:00
Ronan Pigott 2beecc7077 test-network: add dhcp rapid commit test 2023-10-27 10:55:55 -07:00
Frantisek Sumsal a4b156bb24 core: actually set the CPU scheduling policy when deserializing it 2023-10-27 19:50:06 +02:00
Mike Yuan cc1c8d129f
sleep: make sure we clear HibernateLocation on all error paths
Also, let's say "sleep operation" rather than "sleep state",
the latter of which creates ambiguity with /sys/power/state.
2023-10-28 00:17:15 +08:00
Mike Yuan b3ee014879
fstab-generator: drop unapplicable mount options for / from mount unit Options=
Prompted by #29705

Note that x-systemd.wanted-by= and x-systemd.required-by= are not
dropped, since we ignore them because they are unnecessary rather
than unapplicable.
2023-10-27 23:51:01 +08:00
Luca Boccassi 64ec2d073f CI: add a build job with TPM but without OpenSSL
We keep introducing build failures with this combination due to the
high amount of changes, add a combination that covers it
2023-10-27 14:03:23 +01:00
Luca Boccassi bb42782bff resolved: fix build failure with gnutls
Follow-up for bd1ae17833
2023-10-27 13:54:10 +01:00
Anton Lundin 5629d4e29f tpm2: fix build failure without openssl 2023-10-27 13:54:10 +01:00
Nandakumar Raghavan 6b44099b3b networkd: Add DHCP vendor specific options to dbus API
Add DHCP vendor specific options to expose in dbus API.
This will be added to the JSON output when we query
org.freedesktop.network1.Manager object.
2023-10-27 12:11:09 +00:00
Mike Yuan 122f6f1eaa
sleep: minor modernization for lock_all_homes 2023-10-27 18:11:32 +08:00
Mike Yuan 78c21009bf
sleep: rework write_state and write_mode 2023-10-27 18:11:29 +08:00
Mike Yuan 0374cbd668
sleep: update help text for suspend-then-hibernate 2023-10-27 17:57:03 +08:00
Mike Yuan 4706c3ec2b
sleep: log about errno 2023-10-27 17:57:03 +08:00
Mike Yuan 37f80890b2
sleep: drop unneeded includes 2023-10-27 17:57:03 +08:00
Mike Yuan e024cdd270
sleep: introduce sleep_operation_is_hibernation 2023-10-27 17:57:03 +08:00
Mike Yuan ba2f3ec832
fstab-generator: use RET_GATHER more 2023-10-27 17:51:18 +08:00
xinpeng wang 2f1d114010 logind: fix abnormal switching causing the screen to go black
After logind receives the SIGRTMIN signal from the kernel, it will execute
manager_vt_switch---session_leave_vt---session_device_pause_all,The device
permissions of the session are removed here;under normal circumstances, the
tty value read from /sys/class/tty/tty0/active changes and switchesto a new
session,give the new session resume device permissions.
But under abnormal circumstances (such as switching quickly on a device using
wayland; and sometimes the kernel will suddenly send a SIGRTMIN signal, but
nothing changes),In these cases, logind does not give session resume device
permission, causing the device to have a black screen and suspended animation.
2023-10-27 10:19:58 +01:00
janana 2b4cdac91a udev: fix typo for persistent flag
The 'parsistent' adjective is misspelt.
2023-10-27 10:19:15 +01:00
Luca Boccassi 6cd1f6546c
Merge pull request #29332 from esposem/ukify_simplify
ukify: automatically infer --signtool from the parameters given
2023-10-27 00:10:28 +01:00