builder/adapters/kde-finalize.sh
Archipelago 192c235254 Replace SDDM with Plasma Login Manager in the KDE Purpose
The greeter is a Plasma session, so the SDDM theme drop-in and the
CompositorCommand input-method flag are gone. Layouts (ru,us) and the
on-screen keyboard now reach the greeter through system-wide kxkbrc and
plasmakeyboardrc, the preset enables plasmalogin.service, and finalization
checks the package/unit and that SDDM is absent.
2026-11-13 16:53:21 +03:00

40 lines
3 KiB
Bash

# Clean Core + KDE composition; existing-machine rebase is a separate workflow.
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 archipelago-firstboot@ttyS0 getty@tty1 serial-getty@ttyS0 kmsconvt@tty1
systemctl --root=/job/core enable NetworkManager ModemManager plasmalogin plasma-setup bluetooth cups.socket power-profiles-daemon \
archipelago-kde-onboarding.timer archipelago-software-refresh.timer
systemctl --root=/job/core set-default graphical.target
# Plasma Login Manager (fork of SDDM) owns the greeter. Its unit carries the
# display-manager alias, and the greeter is a Plasma session, so there are no
# SDDM themes or CompositorCommand knobs to configure.
test -x /job/core/usr/bin/plasmalogin
test -f /job/core/usr/lib/systemd/system/plasmalogin.service
arch-chroot /job/core pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Q plasma-login-manager
arch-chroot /job/core pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Q kinfocenter
arch-chroot /job/core pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Q sddm >/dev/null 2>&1 && {
echo 'D-110: SDDM must not be installed in the KDE Purpose' >&2; exit 1; }
# Keyboard layouts and the virtual keyboard reach the greeter through the
# system-wide Plasma configuration that both the greeter and user sessions read.
grep -qx 'LayoutList=ru,us' /job/core/etc/xdg/kxkbrc
grep -qx 'enabledLocales=ru_RU,en_US' /job/core/etc/xdg/plasmakeyboardrc
printf 'Plasma Login Manager: greeter is a Plasma session; kxkbrc/plasmakeyboardrc apply system-wide\n'
mkdir -p /job/core/etc/NetworkManager/conf.d /job/core/etc/sudoers.d /job/core/etc/containers /job/core/etc/archipelago
printf '[main]\ndns=systemd-resolved\n' > /job/core/etc/NetworkManager/conf.d/20-archipelago.conf
printf '%%wheel ALL=(ALL:ALL) ALL\n' > /job/core/etc/sudoers.d/10-archipelago-wheel
chmod 0440 /job/core/etc/sudoers.d/10-archipelago-wheel
arch-chroot /job/core visudo -c
mkdir -p /job/core/etc/plymouth
printf '[Daemon]\nTheme=spinner\n' > /job/core/etc/plymouth/plymouthd.conf
test -f /job/core/usr/share/plymouth/themes/spinner/spinner.plymouth
test ! -e /job/core/etc/plasma-setup-done
cp /job/core/usr/share/archipelago/desktop/toolbox.conf /job/core/etc/containers/toolbox.conf
install -Dm644 /job/core/usr/share/archipelago/desktop/toolbox-registries.conf /job/core/etc/containers/registries.conf.d/60-archipelago-toolbox.conf
arch-chroot /job/core glib-compile-schemas /usr/share/glib-2.0/schemas
arch-chroot /job/core update-desktop-database /usr/share/applications
arch-chroot /job/core update-mime-database /usr/share/mime
mkdir -p /job/core/etc/systemd/system
# D-095: stock Discover plus native OS/Flatpak backends, no PackageKit packages.
arch-chroot /job/core pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Qq > /job/evidence/desktop-package-names.txt
if grep -Ei '^(packagekit($|-)|libpackagekit)' /job/evidence/desktop-package-names.txt; then
echo 'D-095: PackageKit is excluded from Desktop images' >&2
exit 1
fi