62 lines
3.6 KiB
Bash
62 lines
3.6 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 sddm plasma-setup bluetooth cups.socket power-profiles-daemon \
|
|
archipelago-kde-onboarding.timer archipelago-software-refresh.timer
|
|
systemctl --root=/job/core set-default graphical.target
|
|
test -f /job/core/usr/share/sddm/themes/breeze/Main.qml
|
|
test -f /job/core/usr/share/sddm/themes/breeze/metadata.desktop
|
|
arch-chroot /job/core pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Q sddm-kcm
|
|
arch-chroot /job/core pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Q kinfocenter
|
|
grep -qx 'Current=breeze' /job/core/usr/lib/sddm/sddm.conf.d/zz-archipelago-theme.conf
|
|
mkdir -p /job/core/etc/sddm.conf.d
|
|
cat > /job/core/etc/sddm.conf.d/20-archipelago-wayland.conf <<'SDDM'
|
|
[General]
|
|
DisplayServer=wayland
|
|
[Wayland]
|
|
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
|
|
SDDM
|
|
# Check the merged configuration, not just the presence of our fragment.
|
|
# sddm --example-config resets to compiled defaults and cannot check precedence.
|
|
arch-chroot /job/core python - <<'SDDM_CHECK'
|
|
from pathlib import Path
|
|
values = {}
|
|
paths = []
|
|
for directory in ('/usr/lib/sddm/sddm.conf.d', '/etc/sddm.conf.d'):
|
|
paths.extend(sorted(path for path in Path(directory).iterdir() if path.is_file()))
|
|
paths.append(Path('/etc/sddm.conf'))
|
|
for path in paths:
|
|
if not path.is_file():
|
|
continue
|
|
section = 'General'
|
|
for raw in path.read_text().splitlines():
|
|
line = raw.split('#', 1)[0].strip()
|
|
if '=' in line:
|
|
key, value = line.split('=', 1)
|
|
values[section, key.strip()] = value.strip()
|
|
elif line.startswith('[') and line.endswith(']'):
|
|
section = line[1:-1]
|
|
assert values.get(('Theme', 'Current')) == 'breeze', values
|
|
assert values.get(('General', 'DisplayServer')) == 'wayland', values
|
|
print('SDDM effective configuration: Theme.Current=breeze, DisplayServer=wayland')
|
|
SDDM_CHECK
|
|
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
|