1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-03 17:47:28 +03:00

66179 Commits

Author SHA1 Message Date
Luca Boccassi
aca7c09622 NEWS: mention that fsck will be ran for systemd.mount-extra= 2023-07-28 09:25:25 +01:00
Luca Boccassi
063e0279bf NEWS: update contributors list 2023-07-28 09:23:32 +01:00
Luca Boccassi
924ed032fa
Merge pull request #28543 from bluca/hwdb
hwdb and NEWS updates
2023-07-28 09:16:12 +01:00
Zbigniew Jędrzejewski-Szmek
be13eeb82f
Merge pull request #28544 from yuwata/fstab-generator-fsck
fstab-generator: enable fsck for block device mounts specified in sys…
2023-07-28 08:49:40 +02:00
Zbigniew Jędrzejewski-Szmek
96197e9ef5
Merge pull request #28548 from yuwata/meson-confext
meson: do not create dead systemd-confext symlink if sysext is disabled
2023-07-28 08:46:27 +02:00
Yu Watanabe
6fa5102aa8 meson: do not create dead systemd-confext symlink if sysext is disabled 2023-07-28 12:15:47 +09:00
Yu Watanabe
239cce3870 fstab-generator: enable fsck for block device mounts specified in systemd.mount-extra=
Like we do for root= or so.

Another possible option is adding support of fifth (sixth?) field in
systemd.mount-extra=. But that may be overkill, hence let's do that
later if someone request that.

Fixes fsck part of issue #28541.
2023-07-28 09:28:26 +09:00
Luca Boccassi
3e6b25eb89 NEWS: mention agetty/login credentials 2023-07-28 00:39:59 +01:00
Luca Boccassi
92c1500692 hwdb: run update-hwdb
git diff hwdb.d/*.hwdb looks sensible
2023-07-28 00:30:53 +01:00
Yu Watanabe
905a56d5c4 test: fix typo 2023-07-28 05:55:42 +09:00
Luca Boccassi
e1b03cda02
Merge pull request #28540 from DaanDeMeyer/getty-credentials
units: Load agetty credentials in all getty units
2023-07-27 21:12:14 +01:00
Luca Boccassi
22c5593c90
Merge pull request #28518 from yuwata/fstab-generator-fixes
fstab-generator: fixes for systemd.mount-extra=
2023-07-27 18:47:41 +01:00
Daan De Meyer
9e72aa1832 units: Load agetty credentials in all getty units
In it's latest release, agetty will support reading the agetty.autologin
and login.noauth credentials, so let's make sure we import those in our
getty units so they're available to agetty to read.
2023-07-27 16:50:58 +02:00
Frantisek Sumsal
c5afbac31b ci: explicitly install python3-lldb-$COMPILER_VERSION
To avoid apt complaining:

 + apt-get -y install clang-15 lldb-15 lld-15 clangd-15
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-lldb-14 : Conflicts: python3-lldb-x.y
 python3-lldb-15 : Conflicts: python3-lldb-x.y
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
2023-07-27 13:45:00 +01:00
Franck Bui
f1f331a252 sleep: don't init /sys/power/resume if 'resume=' option is missing and EFI is disabled
Otherwise in such case a first `systemctl hibernate` would fail but would still
initialize /sys/power/resume fooling a second `systemctl hibernate` into
believing that 'resume=' is correctly set and can be used by the resume process
to find the swap device to resume from.

Follow-up for #27330.
2023-07-27 12:30:40 +01:00
Frantisek Sumsal
8f766afe98 network: don't log non-negative errno
Otherwise bad things happen:

systemd-networkd[3140]: wlan0: Saved new link: ifindex=5, iftype=ETHER(1), kind=n/a
systemd-networkd[3140]: Assertion '(_error) != 0' failed at src/network/networkd-wifi.c:119, function manager_genl_process_nl80211_config(). Aborting.

Resolves: #28534
2023-07-27 12:29:05 +01:00
Erik Sjölund
6870daff03 man: fix typos 2023-07-27 09:54:43 +01:00
Luca Boccassi
0199f203cb mkosi: install sd-boot on opensuse in base image
Workaround for CI issue, the sd-stub we build is overwritten in the final
image as the package gets pulled there, install it in the base to
work around it for now
2023-07-26 22:02:58 +01:00
Yu Watanabe
bb2e3c90fc missing: include linux/types.h for __s64 and __u64
Fixes #28529.
2023-07-26 21:39:56 +01:00
Luca Boccassi
eff91e2f38 efi: link with -z nopack-relative-relocs
elf2efi.py cannot handle DT_RELR relocations, so disable it
if we can

Fixes https://github.com/systemd/systemd/issues/28520
2023-07-26 18:47:53 +01:00
Yu Watanabe
03de154a1e test-fstab-generator: add more tests for systemd.mount-extra= and friends 2023-07-27 00:50:15 +09:00
Yu Watanabe
aeded6b0b5 test-fstab-generator: also test with SYSTEMD_IN_INITRD=no 2023-07-27 00:50:15 +09:00
Yu Watanabe
7f8c67c996 test-fstab-generator: extract core part as a function
No functional change, preparation for later commits.
2023-07-27 00:50:15 +09:00
Yu Watanabe
22f5a825e4 fstab-generator: add a flag to accept entry for "/" in initrd
When both prefix_sysroot and accept_root is true, the entry for "/" will
be accepted and converted to "/sysroot/".

Why? If the entry is read from the main system's fstab, then we already
mounted /sysroot/, hence it is not and should not re-add the .mount unit
for /sysroot/. However, if we want to specify the root mount through the
kernel command line or credential, without this change, we need to
specify the same entry in the two options. E.g.
===
systemd.mount-extra=/dev/sda1:/:auto:defaults
rd.systemd.mount-extra=/dev/sda1:/sysroot:auto:defaults
===
That's inconvenient. Of course, we can dedup that by using traditional
options, but cannot when defined in credential.
2023-07-27 00:50:15 +09:00
Yu Watanabe
dfd10549ac fstab-generator: read both credentials in initrd
This makes the behavior consistent with the way we already do for
fstab and command line options.
In initrd, entries read from fstab.extra are mounted under /sysroot.
2023-07-27 00:50:15 +09:00
Yu Watanabe
45c535ddb0 fstab-generator: add rd.systemd.mount-extra= and friends
Previously, mounts specified in systemd.mount-extra= are equally handled
both in initrd and the main system. So, the mounts for the main system
are also mounted in initrd.

This introduces rd.systemd.mount-extra=, which specifies mounts in initrd.
Then, mounts specified in systemd.mount-extra= are still mounted both in
initrd and the main system, but prefixed with /sysroot/ when running in
initrd.

Fixes #28516.
2023-07-27 00:50:01 +09:00
Yu Watanabe
b93d9e06fc fstab-generator: fix target of /sysroot/usr
If /usr mount is picked from the main system's fstab file (prefix_sysroot
is true, and the path is prefixed as /sysroot/usr), then previously it
was installed in the wrong target unit.
2023-07-26 23:59:56 +09:00
Luca Boccassi
4cf5b343c9 mkosi: add drop-in to make emergency.service shut down the system
When the mkosi CI fails to boot, it just sits there waiting at the emergency
console until the job times out. Add a drop-in for emergency.service in the
CI configuration so that instead it exists immediately.
2023-07-26 14:07:13 +01:00
Zbigniew Jędrzejewski-Szmek
99aa03c3af
Merge pull request #28511 from YHNdnzj/gpt-auto-no-duplicate
gpt-auto: skip mounting ESP if fstab for /boot/ uses the same device as discovered one
2023-07-26 14:34:08 +02:00
Mike Yuan
69d7f35ce4
gpt-auto: skip mounting ESP if fstab for /boot/ uses the same device as discovered one
Follow-up for 6a488fa7cce8124fa885adf8a2f31363fe62f636

Currently, if an fstab entry for /boot/ exists, we'll skip to try /efi/
instead. However, if it's already using the same device as the discovered
one, we should not duplicate the mount.
2023-07-26 15:00:06 +08:00
Mike Yuan
99299d0d5a
fstab-util: add fstab_is_mount_point_full which takes a source path to compare 2023-07-26 15:00:06 +08:00
Luca Boccassi
859ecf0aaa pam: lower warning about closing sd-bus after fork
There is some issue in our code that triggers this warning constantly,
but it's nothing users can solve, so downgrade to debug level until
we can figure out the original issue (which is a permission denied
error on ReleaseSession D-Bus method call).

Related to https://github.com/systemd/systemd/issues/28514
2023-07-26 10:07:06 +09:00
Yu Watanabe
8f88e57397 fstab-generator: rename 'initrd' flag to 'prefix_sysroot'
The name 'initrd' is confusing with 'in_initrd()'.
2023-07-26 05:08:01 +09:00
Yu Watanabe
6636b2b6bf udev: set ID_PATH properties for all pci, usb, and platform devices
Before c43ff248f94266cfc93e300a2d3d163ed805e55b, the following line in
60-drm.rules also sets ID_PATH for all pci, usb, and platform devices:
===
ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
===
Unfortunately, some existing rules rely on the unexpected behavior.
To keep the backward compatibility, let's set ID_PATH for them.

Fixes #28411.
2023-07-25 17:56:59 +01:00
Yu Watanabe
62843efc8f NEWS: fix typo 2023-07-25 15:50:29 +09:00
Luca Boccassi
5a945fab7a ukify: fix armv7 architecture mapping
$ uname -m
armv7l

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/src/kernel-install/60-ukify.install", line 223, in <module>
    main()
  File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/src/kernel-install/60-ukify.install", line 219, in main
    call_ukify(opts)
  File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/src/kernel-install/60-ukify.install", line 205, in call_ukify
    ukify['finalize_options'](opts2)
  File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/ukify", line 1423, in finalize_options
    opts.efi_arch = guess_efi_arch()
                    ^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/ukify", line 78, in guess_efi_arch
    raise ValueError(f'Unsupported architecture {arch}')
ValueError: Unsupported architecture armv7l
2023-07-24 21:10:48 +02:00
Frantisek Sumsal
283f3bd588 shell-completion: include units in 'verify' completions
Resolves: #28500
2023-07-24 20:02:55 +01:00
Luca Boccassi
b9e39e11e2
Merge pull request #28505 from bluca/vconsole_debian
vconsole-setup: don't fail with an empty keymap
2023-07-24 18:02:32 +01:00
Luca Boccassi
febbc24ee0 mkosi: set default-keymap='' on Debian/Ubuntu 2023-07-24 15:43:16 +01:00
Luca Boccassi
1cd4211068 vconsole-setup: don't fail with an empty keymap
The new meson option 'default-keymap' means that by default there's always
a keymap to configure, so vconsole-setup fails. Allow to set
-Ddefault-keymap="" to disable it and skip gracefully again.

Follow-up for f129d0e77c4c9a0e12ae38cd241cd49846844a80
2023-07-24 15:43:11 +01:00
Luca Boccassi
739bbc5869 NEWS: update for rc3 v254-rc3 2023-07-24 12:47:28 +01:00
Zbigniew Jędrzejewski-Szmek
779268d202
Merge pull request #28503 from bluca/rc
RC busywork
2023-07-24 13:42:17 +02:00
Luca Boccassi
0b5e5e4cb4 NEWS: update contributors list 2023-07-24 11:46:33 +01:00
Luca Boccassi
f07775a2a0 hwdb: run update-hwdb
git diff hwdb.d/*.hwdb looks sensible
2023-07-24 11:42:23 +01:00
Luca Boccassi
291c66914f
Merge pull request #28498 from bluca/softreboot
softreboot: ensure all processes are killed
2023-07-24 11:36:16 +01:00
Luca Boccassi
2bfe7261de
Merge pull request #28497 from bluca/run
switch-root: use MS_REC for /run, unless we are soft-rebooting
2023-07-24 11:20:06 +01:00
Luca Boccassi
7f0bf48d31 Update NEWS 2023-07-24 10:45:28 +01:00
Luca Boccassi
b41ab9b3f4 softreboot: ensure all processes are killed
Having surviving processes is not ready yet as a feature, so ensure
everything is killed on the transition for now
2023-07-24 10:45:28 +01:00
Frantisek Sumsal
8256994c63 test: check if we correctly propagate /run mounts during switch root
Since 7c764d4 we bind mount certain directories during switch root
instead of moving the mount directly, and for /run we do this without
MS_REC. This, unfortunately, leaves all mounts under /run behind
in the old root, which breaks certain use cases.

See: https://github.com/systemd/systemd/issues/28452
2023-07-24 10:39:14 +01:00
Luca Boccassi
b12d41a8bb switch-root: use MS_REC for /run, unless we are soft-rebooting
There are applications that rely on mounts under /run surviving the
switch from initrd to rootfs, so use MS_REC unless we are soft
rebooting.

Follow-up for 7c764d45997721705e43ac66fbb5a56747d00d40

Fixes https://github.com/systemd/systemd/issues/28452
2023-07-24 10:39:14 +01:00