1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

58878 Commits

Author SHA1 Message Date
Yu Watanabe
8f4f630731 Revert "network: configure DHCP clients after MAC address is assigned"
This reverts commit f42d41cc5f.

DHCPv6 client does not require MAC address.
DHCPv4 client will be handled in a different way in a later commit.

Partially fixes #23546.
2022-07-14 06:51:59 +09:00
Michael Biebl
b0e5bf0451 Do not fail EFI build with newer binutils
Newer binutils versions currently trigger the following warnings due to
a bug in gnu-efi

on arm64:
/usr/bin/ld.bfd: warning: src/boot/efi/systemd-bootaa64.elf has a LOAD segment with RWX permissions

on amd64:
/usr/bin/ld.bfd: warning: /usr/lib/crt0-efi-x86_64.o: missing .note.GNU-stack section implies executable stack

This results in a build failure due to --fatal-warnings.
Work around this issue by suppressing those warnings until gnu-efi has
been fixed.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013341
2022-07-13 18:48:07 +02:00
Zbigniew Jędrzejewski-Szmek
9e6df03412 man: lift pam_systemd_homed description to Summary
Also change the title to describe the module more comprehensively.
Follow-up for 90bc309aa2. Suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=2085485#c5.
2022-07-13 14:00:54 +01:00
David Tardon
d1fa6c99bb test: add test for org.freedesktop.login1.Session SetDisplay 2022-07-13 13:53:13 +02:00
David Tardon
9ac0855b61 test: add test for org.freedesktop.login1.Session SetType 2022-07-13 13:53:13 +02:00
David Tardon
bd681a7eb0 test: ensure cleanup functions return success
Otherwise the return value of the last command is propagated, which may
cause spurious test failures. E.g., pkill returns 1 if no process
matched, which may be a problem in cleanup session:

cleanup_session() {
...

    pkill -u "$(id -u logind-test-user)"
    sleep 1
    pkill -KILL -u "$(id -u logind-test-user)"
}

If there are no remaining processes when the final pkill runs, it will
return 1 and therefore cleanup_session will return 1 as well.
2022-07-13 13:53:13 +02:00
Daan De Meyer
8ce1a3033f Add coredump daemons to bug/RFE template component options 2022-07-13 12:31:01 +01:00
Zbigniew Jędrzejewski-Szmek
44571ce98e
Merge pull request #23817 from yuwata/sd-device-send-udev-database-version
sd-device: send udev database version
2022-07-13 13:10:40 +02:00
Frantisek Sumsal
d46e7c7cfd ci: limit which env variables we pass through sudo
to work around #23987.
2022-07-13 10:56:37 +00:00
Yu Watanabe
f54dce2d4f test-network: save and restore timezone
Several DHCP client tests change the system timezone.
Let's save the current timezone at the beginning, and restore it with
the saved value at the end.
2022-07-13 10:30:48 +02:00
Yu Watanabe
0925c79c9e
Merge pull request #23881 from keszybz/kernel-install-strikes-yet-again
kernel-install: fix invocation as installkernel, add tests, tweak documentation
2022-07-13 02:44:50 +02:00
Yu Watanabe
e11d0e3925 test-network: wait for L2TP tunnels being removed
Fixes #23985.
2022-07-13 02:36:14 +02:00
Franck Bui
278e815bfa logind: don't delay login for root even if systemd-user-sessions.service is not activated yet
If for any reason something goes wrong during the boot process (most likely due
to a network issue), system admins should be allowed to log in to the system to
debug the problem. However due to the login session barrier enforced by
systemd-user-sessions.service for all users, logins for root will be delayed
until a (dbus) timeout expires. Beside being confusing, it's not a nice user
experience to wait for an indefinite period of time (no message is shown) this
and also suggests that something went wrong in the background.

The reason of this delay is due to the fact that all units involved in the
creation of a user session are ordered after systemd-user-sessions.service,
which is subject to network issues. If root needs to log in at that time,
logind is requested to create a new session (via pam_systemd), which ultimately
ends up waiting for systemd-user-session.service to be activated. This has the
bad side effect to block login for root until the dbus call done by pam_systemd
times out and the PAM stack proceeds anyways.

To solve this problem, this patch orders the session scope units and the user
instances only after systemd-user-sessions.service for unprivileged users only.
2022-07-12 22:54:39 +01:00
Łukasz Stelmach
aa5ae9711e smack: Add DefaultSmackProcessLabel to user.conf and system.conf
DefaultSmackProcessLabel tells systemd what label to assign to its child
process in case SmackProcessLabel is not set in the service file. By
default, when DefaultSmackProcessLabel is not set child processes inherit
label from systemd.

If DefaultSmackProcessLabel is set to "/" (which is an invalid character
for a SMACK label) the DEFAULT_SMACK_PROCESS_LABEL set during compilation
is ignored and systemd act as if the option was unset.
2022-07-12 22:47:32 +01:00
Luca Boccassi
8880c3be82
Merge pull request #23982 from medhefgo/boot-misc
boot: Misc cleanups
2022-07-12 22:43:14 +01:00
Luca Boccassi
768456e8e6
Merge pull request #23979 from DaanDeMeyer/nspawn-relative-paths
nspawn: Support relative paths for --bind and --overlay
2022-07-12 22:41:10 +01:00
Daan De Meyer
448f737730 nspawn: Support relative source paths for --bind and --overlay 2022-07-12 13:14:11 +02:00
Jan Janssen
0692f533f2 bcd: Clean up includes
Also, now that bcd.h does not depend on efi.h anymore we can now
properly include it in the test instead.
2022-07-12 11:29:59 +02:00
Jan Janssen
427ba45b13 bcd: Use std alignof 2022-07-12 11:29:18 +02:00
Jan Janssen
93521e55e5 boot: Remove _cleanup_freepool_ 2022-07-12 11:24:49 +02:00
Jan Janssen
1f6a5d9a65 boot: Use int instead of INTN 2022-07-12 11:24:49 +02:00
Jan Janssen
34938db5b3 boot: Use uintptr_t when converting EFI_PHYSICAL_ADDRESS
uintptr_t is the more appropriate type when casting to/from pointers.
2022-07-12 11:24:19 +02:00
Zbigniew Jędrzejewski-Szmek
dd2ebd1b1d kernel-install: suppress bogus shellcheck hint
I don't quite understand this, but '{ ! true; }' is not the same as '( ! true )'.
In interactive mode, it seems to work as expected. But in a script, it doesn't.
2022-07-12 09:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
b9b55a884b kernel-install: use set -e
This means that we'll fail hard if something goes wrong, e.g. reading
of a config file. I think this is appropriate. If errors should be ignored,
the caller should do that on their end.
2022-07-12 09:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
852f98d6aa kernel-install: return 0 for unknown verbs in plugins
In practice this makes little difference, because kernel-install will
only call the plugins for 'add' or 'remove', and if we were to add a
new verb to kernel-install, we'd just change the plugins at the same
time. But our plugins serve as documentation for external plugins too,
and there it's better to silently ignore unknown verbs so that we can
add new verbs in the future.

(50-depomod.install was already like that.)
2022-07-12 09:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
00e6278cac kernel-install: raise fuss if plugins are called without the expected parameters 2022-07-12 09:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
f875e6bc39 test-kernel-install: add a simple test that kernel-install copies the files
I opted to tweaking kernel-install to allow overriding config
(with $KERNEL_INSTALL_CONF_ROOT, $KERNEL_INSTALL_PLUGINS). An alternative
would be to build a test environment in test/. We can still do that,
but I think it's nice to have a simple test that is very quick and easy
to debug.

Invocation as installkernel is for #23681.
2022-07-12 09:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
c90cb977a1 kernel-install: mark the plugins as executable in git
We mark them as executable during installation, but it's also nice to mark
them as such in sources, so they can be executed directly.
2022-07-12 09:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
6755285ccb kernel-install: allow overriding the plugin list too
The use of IFS=<newline> is dropped. Let's just iterate over the list, using
any whitespace as separator.
2022-07-12 09:22:09 +02:00
Yu Watanabe
12a233265d
Merge pull request #23980 from yuwata/test-network
test-network: tiny output improvements
2022-07-12 01:27:36 +02:00
Yu Watanabe
12799947e2
Merge pull request #23972 from yuwata/sd-device
sd-device: do not return -ENOENT by sd_device_get_is_initialized()
2022-07-11 22:44:56 +02:00
Michal Stanke
8170627796 Fix automatic screen rotation for Asus Transformer T100TAM 2022-07-11 22:44:12 +02:00
Yu Watanabe
64d847b886
Merge pull request #23974 from yuwata/align-tables
basic: align tables
2022-07-11 22:43:45 +02:00
Yu Watanabe
e755ad61ba test-network: support to remove routing policy rules with l3mdev flag 2022-07-11 22:39:26 +02:00
Yu Watanabe
b5dac5b0de test-network: merge stdout and stderr of invoked command by call()
Otherwise, the logs may be messed up.
2022-07-11 22:38:21 +02:00
Lennart Poettering
90bc309aa2 man: explain why pam_systemd_home wants to be in all four stacks
Suggested here:

https://bugzilla.redhat.com/show_bug.cgi?id=2085485#c5
2022-07-11 21:03:58 +01:00
Frantisek Sumsal
9dc86a1414
Merge pull request #23969 from yuwata/test-network
test-network: fixlets and performance improvements
2022-07-11 20:03:04 +00:00
Daan De Meyer
f075e32ca1 nspawn: Rewrap --overlay docs 2022-07-11 21:43:41 +02:00
Daan De Meyer
a50947c56b nspawn: Drop unnecessary intermediate variable 2022-07-11 21:38:26 +02:00
Topi Miettinen
3295d0d896 sd-netlink: add sizes for some IP and Ethernet addresses
Add sizes for some uses of NETLINK_TYPE_IN_ADDR and NETLINK_TYPE_ETHER_ADDR
types.
2022-07-11 18:37:38 +00:00
Yu Watanabe
a962d85797 test-network: various cleanups
- introduce several helper functions
- do not list unit files, but remove the runtime unit directory in
  tearDown().
- do not list used interfaces, but remove all interfaces previously not
  exists in tearDown().
- save routes and routing policy rules before running tests, and flush
  unnecessary routes and rules in each tearDown() calls.
- drop many time.sleep() calls.
- call tearDown() after each sub tests.
- shorten code.
- several coding style fixes.
- etc, etc...

Hopefully, this improves performance of the test.
2022-07-11 19:57:24 +02:00
Lennart Poettering
81a965187d update TODO 2022-07-11 17:37:41 +02:00
Yu Watanabe
286bf3a940 test-network: extend timeout for DHCP lease to be expired
Fixes #23964.
2022-07-11 16:54:45 +02:00
Yu Watanabe
4eb5f1db44 sd-device: shorten code a bit 2022-07-11 15:27:21 +02:00
Lennart Poettering
39e419a2b5 tree-wide: trivial tweaks 2022-07-11 15:11:58 +02:00
Lennart Poettering
9c18b36372 update TODO 2022-07-11 15:11:58 +02:00
Luca Boccassi
3a883d36eb mkosi: update to latest main
Fix build failure on SUSE Tumbleweed due to config changes
2022-07-11 13:29:28 +01:00
Yu Watanabe
ef674d0ea3 unit-def: align string tables 2022-07-11 14:19:59 +02:00
Yu Watanabe
5c86cec1f3 virt: align tables 2022-07-11 14:13:33 +02:00
Yu Watanabe
591c186f2f sd-device: make sd_device_get_is_initialized() not return -ENOENT 2022-07-11 14:08:52 +02:00