From ec5e1b1ed73209baf28cd871091c5b3cff3c8fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 24 Jan 2026 16:07:14 +0100 Subject: [PATCH] Move tpm2 and getty support to -udev subpackage We want getty@.service to be enabled through presets, so that the autovt@.service alias is created (or not). See https://fedoraproject.org/wiki/Changes/UseKmsconVTConsole. getty@.service was changed upstream to have a full [Install] section, but we need to handle installation of the unit here. This will now create the autovt@.service alias when enabled. While looking at this, I noticed that the getty units are in the main package. They don't have to be, virtual terminals are only available if we have "hardware", i.e. the -udev subpackage is appropriate. Same for the tpm2 stuff. List of affected files: /etc/systemd/system/getty.target.wants /usr/lib/systemd/system-generators/systemd-getty-generator /usr/lib/systemd/system-generators/systemd-tpm2-generator /usr/lib/systemd/system/console-getty.service /usr/lib/systemd/system/container-getty@.service /usr/lib/systemd/system/getty-pre.target /usr/lib/systemd/system/getty.target /usr/lib/systemd/system/getty@.service /usr/lib/systemd/system/multi-user.target.wants/getty.target /usr/lib/systemd/system/serial-getty@.service /usr/lib/systemd/system/sysinit.target.wants/systemd-tpm2-setup-early.service /usr/lib/systemd/system/sysinit.target.wants/systemd-tpm2-setup.service /usr/lib/systemd/system/systemd-tpm2-clear.service /usr/lib/systemd/system/systemd-tpm2-setup-early.service /usr/lib/systemd/system/systemd-tpm2-setup.service /usr/lib/systemd/system/tpm2.target /usr/lib/systemd/systemd-tpm2-clear /usr/lib/systemd/systemd-tpm2-setup /usr/share/man/man8/systemd-getty-generator.8.gz /usr/share/man/man8/systemd-tpm2-clear.service.8.gz /usr/share/man/man8/systemd-tpm2-generator.8.gz /usr/share/man/man8/systemd-tpm2-setup-early.service.8.gz /usr/share/man/man8/systemd-tpm2-setup.8.gz /usr/share/man/man8/systemd-tpm2-setup.service.8.gz I considered leaving getty.target in the main package, so that foreign units that refer to it don't generate a warning about missing units, but I think that those packages should not be installed on systems without systemd-udev, so it's fine if the warning appears. --- split-files.py | 2 ++ systemd.spec | 1 + 2 files changed, 3 insertions(+) diff --git a/split-files.py b/split-files.py index 38bde60..09dd511 100644 --- a/split-files.py +++ b/split-files.py @@ -206,6 +206,7 @@ for file in files(buildroot): bless-boot| boot-system-token| bsod| + getty| kernel-install| installkernel| vconsole| @@ -233,6 +234,7 @@ for file in files(buildroot): integritysetup| integritytab| remount-fs| + tpm2| /initrd| systemd[.-]pcr| /pcrlock\.d| diff --git a/systemd.spec b/systemd.spec index afd6432..8f9ef8c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1245,6 +1245,7 @@ systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || : %global udev_services %{shrink: cryptsetup-pre.target cryptsetup.target + getty@.service hibernate.target hybrid-sleep.target initrd-cleanup.service