Package daemon and Desktop fixes with native update plugins
This commit is contained in:
parent
4c5a96b8df
commit
d9eba7d716
10 changed files with 141 additions and 38 deletions
|
|
@ -2,11 +2,28 @@
|
|||
|
||||
D-091 (2026-11-07) authorizes KDE publication after user-confirmed hardware
|
||||
readiness. The follow-up image selects the packaged Plasma SDDM theme `breeze`
|
||||
through `/usr/lib/sddm/sddm.conf.d/20-archipelago-theme.conf` in the Purpose
|
||||
through `/usr/lib/sddm/sddm.conf.d/zz-archipelago-theme.conf` in the Purpose
|
||||
payload. Machine settings in `/etc` retain normal SDDM precedence. Finalization
|
||||
requires the theme files and the selected default in the composed tree. This
|
||||
requires the theme files and checks the merged configuration in the composed tree. This
|
||||
vendor default updates with `/usr` on existing installations as well as fresh ISOs.
|
||||
|
||||
The KDE package selection also includes `sddm-kcm`, explicitly requested by the
|
||||
user on 2026-11-07, for SDDM configuration in System Settings. Finalization checks
|
||||
its presence in the composed package database. Package/runtime acceptance belongs
|
||||
to the next normal pipeline alongside the Breeze precedence correction.
|
||||
`kinfocenter` is included as well for the About this System page in System
|
||||
Settings; package presence is checked in finalization and installed-VM acceptance.
|
||||
|
||||
Hardware follow-up found a precedence defect in published run `20261107T101235Z`:
|
||||
`20-archipelago-theme.conf` was loaded before the SDDM package's `default.conf`,
|
||||
whose `[Theme] Current=` reset the selection. Both files were confirmed in image
|
||||
`a747ff537a991ce20a1735506576e554e648bed09a2465c50fccc73fbc4eac80`.
|
||||
The corrected `zz-` name sorts after that file; finalization now checks the merged
|
||||
vendor and `/etc` configuration instead of grepping only our fragment.
|
||||
`sddm --example-config` wipes configuration to compiled defaults and is unsuitable
|
||||
for this check. This source correction still requires a new pipeline publication
|
||||
and the user's hardware verification; the published image remains affected.
|
||||
|
||||
`archipelago build iso --purpose kde WORK BOOTSTRAP` renders the same private
|
||||
Core-reuse/composition path as GNOME, inserting KDE assets before finalization.
|
||||
It requires `ARCHIPELAGO_CORE_BUILD`, a KDE installation-media Flatpak export,
|
||||
|
|
|
|||
|
|
@ -110,6 +110,11 @@ if [[ ! -f /etc/pacman.d/gnupg/trustdb.gpg ]]; then
|
|||
pacman-key --init
|
||||
pacman-key --populate archlinux
|
||||
fi
|
||||
# Capture multilib in the same repository universe as Core, even though only
|
||||
# Desktop enables it in the installed package-manager configuration.
|
||||
if ! pacman-conf --repo-list | grep -qx multilib; then
|
||||
printf '\n[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >> /etc/pacman.conf
|
||||
fi
|
||||
pacman -Syu --noconfirm --needed archiso ostree openssh sudo gptfdisk parted nano diffutils fakeroot file
|
||||
printf 'ARCHIPELAGO_PHASE\tcore\n'
|
||||
[[ ! -e /job/core && ! -e /job/iso-work ]] || { echo 'Use a fresh work directory for a new build'; exit 1; }
|
||||
|
|
@ -124,11 +129,6 @@ bash /job/package.sh
|
|||
mkdir -p /job/core/etc/pacman.d/hooks
|
||||
# Defer the kernel's generated initramfs to the explicit complete-Core finalizer.
|
||||
ln -s /dev/null /job/core/etc/pacman.d/hooks/90-mkinitcpio-install.hook
|
||||
if [[ $ARCHIPELAGO_BUILD_PROFILE == gnome-probe ]]; then
|
||||
# The stock hook only notifies a running PackageKit daemon over D-Bus.
|
||||
# This probe masks the ALPM service; it has no PackageKit cache to refresh.
|
||||
ln -s /dev/null /job/core/etc/pacman.d/hooks/90-packagekit-refresh.hook
|
||||
fi
|
||||
cp /var/lib/pacman/sync/*.db /job/evidence/
|
||||
sha256sum /job/evidence/*.db > /job/evidence/databases.sha256
|
||||
snapshot=$(sha256sum /job/evidence/databases.sha256 | cut -d' ' -f1)
|
||||
|
|
@ -156,7 +156,10 @@ for db in /job/evidence/*.db; do cmp "$db" "/job/core/var/lib/pacman/sync/$(base
|
|||
sha256sum /var/cache/pacman/pkg/*.pkg.tar.zst > /job/evidence/package-archives.sha256
|
||||
sha256sum /job/private-package-cache/*.pkg.tar.zst > /job/evidence/private-cache-archives.sha256
|
||||
cp /etc/pacman.d/mirrorlist /job/core/etc/pacman.d/mirrorlist
|
||||
cp /etc/pacman.conf /job/core/etc/pacman.conf
|
||||
awk '/^\[/ { skip = ($0 == "[multilib]") } !skip { print }' /etc/pacman.conf > /job/core/etc/pacman.conf
|
||||
mkdir -p /job/core/etc/pacman.d/archipelago-repos
|
||||
printf '# Additional repositories are supplied by the selected Purpose.\n' > /job/core/etc/pacman.d/archipelago-repos/base.conf
|
||||
printf '\nInclude = /etc/pacman.d/archipelago-repos/*.conf\n' >> /job/core/etc/pacman.conf
|
||||
sed -i 's/^LocalFileSigLevel.*/LocalFileSigLevel = Required/' /job/core/etc/pacman.conf
|
||||
mkdir -p /job/core/usr/lib/archipelago /job/core/usr/lib/ostree /job/core/usr/share/archipelago/packages
|
||||
printf '%s\n' "$snapshot" > /job/core/usr/lib/archipelago/snapshot
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 a
|
|||
systemctl --root=/job/core enable NetworkManager gdm bluetooth cups.socket power-profiles-daemon switcheroo-control \
|
||||
archipelago-gnome-onboarding.timer
|
||||
systemctl --root=/job/core set-default graphical.target
|
||||
if [[ -f /job/core/usr/lib/archipelago/software-helper ]]; then
|
||||
if [[ -f /job/core/usr/lib/systemd/system/archipelago-software-refresh.service ]]; then
|
||||
systemctl --root=/job/core enable archipelago-software-refresh.timer
|
||||
fi
|
||||
mkdir -p /job/core/etc/NetworkManager/conf.d /job/core/etc/sudoers.d /job/core/etc/containers /job/core/etc/archipelago
|
||||
|
|
@ -15,10 +15,16 @@ 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
|
||||
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
|
||||
# Until the Archipelago backend exists, a probe must never activate ALPM mutation.
|
||||
mkdir -p /job/core/etc/systemd/system
|
||||
ln -s /dev/null /job/core/etc/systemd/system/packagekit.service
|
||||
# D-095: stock Software plus native OS/Flatpak plugins, 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
|
||||
printf 'GNOME integration probe: OS GUI update backend pending\n' > /job/core/usr/lib/archipelago/desktop-integration-status
|
||||
|
|
|
|||
|
|
@ -30,9 +30,11 @@ mv "$stage/usr/etc" "$stage/etc"
|
|||
mkdir -p "$stage/var/lib" "$stage/dev" "$stage/proc" "$stage/sys" "$stage/run" "$stage/tmp"
|
||||
mv "$stage/usr/lib/archipelago/package-db" "$stage/var/lib/pacman"
|
||||
sed -i '/^DBPath = /d' "$stage/etc/pacman.conf"
|
||||
test -f "$stage/var/lib/pacman/sync/multilib.db"
|
||||
test -f "$stage/etc/pacman.d/archipelago-repos/base.conf"
|
||||
printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' > "$stage/etc/pacman.d/archipelago-repos/multilib.conf"
|
||||
cp -a /etc/pacman.d/gnupg "$stage/etc/pacman.d/"
|
||||
mkdir -p "$stage/etc/pacman.d/hooks"
|
||||
ln -sf /dev/null "$stage/etc/pacman.d/hooks/90-packagekit-refresh.hook"
|
||||
ln -sf /dev/null "$stage/etc/pacman.d/hooks/90-mkinitcpio-install.hook"
|
||||
rm "$stage/etc/resolv.conf"
|
||||
cp -L /etc/resolv.conf "$stage/etc/resolv.conf"
|
||||
|
|
@ -68,7 +70,7 @@ trap - EXIT
|
|||
if grep -Ei 'error:|==> ERROR:' /job/evidence/purpose-transaction.log; then
|
||||
echo 'Required Purpose transaction action failed' >&2; exit 1
|
||||
fi
|
||||
rm "$stage/etc/pacman.d/hooks/90-packagekit-refresh.hook" "$stage/etc/pacman.d/hooks/90-mkinitcpio-install.hook"
|
||||
rm "$stage/etc/pacman.d/hooks/90-mkinitcpio-install.hook"
|
||||
cp -a /job/core-base/usr/etc/pacman.d/hooks/. "$stage/etc/pacman.d/hooks/"
|
||||
rm "$stage/etc/resolv.conf"
|
||||
cp -a /job/core-base/usr/etc/resolv.conf "$stage/etc/resolv.conf"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
# Packaged GNOME integration assets for the experimental desktop profile.
|
||||
# PackageKit's upstream ALPM hook only sends a runtime D-Bus notification.
|
||||
# This profile masks PackageKit and updates through Archipelago; its hook must
|
||||
# not attempt to contact a daemon in Host Extension staging.
|
||||
mkdir -p "$pkg/runtime/usr/etc/pacman.d/hooks"
|
||||
ln -s /dev/null "$pkg/runtime/usr/etc/pacman.d/hooks/90-packagekit-refresh.hook"
|
||||
sed -e 's/HOOKS=(base systemd /HOOKS=(base systemd plymouth /' \
|
||||
-e 's/modconf block/modconf kms keyboard sd-vconsole block/' "$pkg/runtime/usr/lib/archipelago/mkinitcpio-core.conf" > "$pkg/runtime/usr/lib/archipelago/mkinitcpio-gnome.conf"
|
||||
printf 'plymouth\n' > "$pkg/runtime/usr/lib/archipelago/desktop-boot"
|
||||
mkdir -p "$pkg/runtime/usr/lib/systemd/zram-generator.conf.d"
|
||||
printf '[zram0]\n' > "$pkg/runtime/usr/lib/systemd/zram-generator.conf.d/20-archipelago-desktop.conf"
|
||||
sed 's/Archipelago Core/Archipelago GNOME/g' "$pkg/runtime/usr/lib/archipelago/defaults/os-release" > "$pkg/runtime/usr/lib/archipelago/defaults/os-release-gnome"
|
||||
desktop="$pkg/runtime/usr/share/archipelago/desktop"
|
||||
# D-088 follow-up UI request: retain stoken/OpenConnect and vendor package files.
|
||||
|
|
@ -29,20 +26,12 @@ units="$pkg/runtime/usr/lib/systemd/system"
|
|||
if [[ -f /job/gnome-software-plugin.so ]]; then
|
||||
mkdir -p "$pkg/runtime/usr/lib/gnome-software/plugins-23" "$pkg/runtime/usr/share/polkit-1/actions"
|
||||
install -m755 /job/gnome-software-plugin.so "$pkg/runtime/usr/lib/gnome-software/plugins-23/libgs_plugin_archipelago.so"
|
||||
cat > "$pkg/runtime/usr/lib/archipelago/software-helper" <<'HELPER'
|
||||
@@SOFTWARE_HELPER@@
|
||||
HELPER
|
||||
chmod 0755 "$pkg/runtime/usr/lib/archipelago/software-helper"
|
||||
cat > "$pkg/runtime/usr/share/polkit-1/actions/org.archipelago.software.policy" <<'POLKIT'
|
||||
@@SOFTWARE_POLICY@@
|
||||
POLKIT
|
||||
cat > "$units/archipelago-software-refresh.service" <<'SERVICE'
|
||||
@@SOFTWARE_SERVICE@@
|
||||
SERVICE
|
||||
cat > "$units/archipelago-software-refresh.timer" <<'TIMER'
|
||||
@@SOFTWARE_TIMER@@
|
||||
TIMER
|
||||
printf 'd /var/lib/archipelago/software 0755 root root -\n' > "$pkg/runtime/usr/lib/tmpfiles.d/archipelago-software.conf"
|
||||
fi
|
||||
mkdir -p "$desktop" "$pkg/runtime/usr/share/gnome-initial-setup"
|
||||
cat > "$desktop/flatpak-apps.json" <<'POLICY'
|
||||
|
|
@ -106,6 +95,9 @@ cat > "$desktop/toolbox.conf" <<'EOF'
|
|||
@@TOOLBOX_CONFIG@@
|
||||
EOF
|
||||
if [[ -f /job/toolbox.conf ]]; then cp /job/toolbox.conf "$desktop/toolbox.conf"; fi
|
||||
cat > "$desktop/toolbox-registries.conf" <<'REGISTRIES'
|
||||
@@TOOLBOX_REGISTRIES@@
|
||||
REGISTRIES
|
||||
cat > "$pkg/runtime/usr/lib/systemd/system-preset/10-archipelago-gnome.preset" <<'EOF'
|
||||
disable archipelago-firstboot@tty1.service
|
||||
disable archipelago-firstboot@ttyS0.service
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ systemctl --root=/job/core enable NetworkManager sddm plasma-setup bluetooth cup
|
|||
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
|
||||
grep -qx 'Current=breeze' /job/core/usr/lib/sddm/sddm.conf.d/20-archipelago-theme.conf
|
||||
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]
|
||||
|
|
@ -13,6 +15,30 @@ 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
|
||||
|
|
@ -23,8 +49,14 @@ 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
|
||||
ln -s /dev/null /job/core/etc/systemd/system/packagekit.service
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -3,14 +3,17 @@ cmp /job/core-base/usr/bin/archipelago /job/archipelago
|
|||
test "$(arch-chroot /job/purpose-stage pacman --config /dev/null --dbpath /usr/lib/archipelago/package-db -Q discover)" = 'discover 6.8.2-1'
|
||||
arch-chroot /job/purpose-stage python -c 'import json; p=json.load(open("/usr/lib/archipelago/update.json")); assert p["refs"]["kde"]'
|
||||
mkdir -p "$pkg/runtime/usr/etc/pacman.d/hooks"
|
||||
ln -s /dev/null "$pkg/runtime/usr/etc/pacman.d/hooks/90-packagekit-refresh.hook"
|
||||
sed -e 's/HOOKS=(base systemd /HOOKS=(base systemd plymouth /' \
|
||||
-e 's/modconf block/modconf kms keyboard sd-vconsole block/' "$pkg/runtime/usr/lib/archipelago/mkinitcpio-core.conf" > "$pkg/runtime/usr/lib/archipelago/mkinitcpio-kde.conf"
|
||||
printf 'plymouth\n' > "$pkg/runtime/usr/lib/archipelago/desktop-boot"
|
||||
mkdir -p "$pkg/runtime/usr/lib/systemd/zram-generator.conf.d"
|
||||
printf '[zram0]\n' > "$pkg/runtime/usr/lib/systemd/zram-generator.conf.d/20-archipelago-desktop.conf"
|
||||
sed 's/Archipelago Core/Archipelago KDE/g' "$pkg/runtime/usr/lib/archipelago/defaults/os-release" > "$pkg/runtime/usr/lib/archipelago/defaults/os-release-kde"
|
||||
printf 'purpose/desktop/kde\n' > "$pkg/runtime/usr/lib/archipelago/purpose"
|
||||
mkdir -p "$pkg/runtime/usr/lib/sddm/sddm.conf.d"
|
||||
cat > "$pkg/runtime/usr/lib/sddm/sddm.conf.d/20-archipelago-theme.conf" <<'SDDM_THEME'
|
||||
# SDDM reads this directory alphabetically, including the packaged default.conf.
|
||||
# A numeric prefix sorts BEFORE default.conf, whose empty Current resets the theme.
|
||||
cat > "$pkg/runtime/usr/lib/sddm/sddm.conf.d/zz-archipelago-theme.conf" <<'SDDM_THEME'
|
||||
[Theme]
|
||||
Current=breeze
|
||||
SDDM_THEME
|
||||
|
|
@ -27,6 +30,9 @@ cat > "$desktop/toolbox.conf" <<'TOOLBOX'
|
|||
@@TOOLBOX_CONFIG@@
|
||||
TOOLBOX
|
||||
if [[ -f /job/toolbox.conf ]]; then cp /job/toolbox.conf "$desktop/toolbox.conf"; fi
|
||||
cat > "$desktop/toolbox-registries.conf" <<'REGISTRIES'
|
||||
@@TOOLBOX_REGISTRIES@@
|
||||
REGISTRIES
|
||||
cat > "$units/plasma-setup.service.d/10-archipelago-installed.conf" <<'SETUP'
|
||||
[Unit]
|
||||
ConditionPathExists=/run/ostree-booted
|
||||
|
|
@ -87,20 +93,12 @@ Exec=stoken-gui
|
|||
NoDisplay=true
|
||||
TOKEN
|
||||
done
|
||||
cat > "$pkg/runtime/usr/lib/archipelago/software-helper" <<'HELPER'
|
||||
@@SOFTWARE_HELPER@@
|
||||
HELPER
|
||||
chmod 0755 "$pkg/runtime/usr/lib/archipelago/software-helper"
|
||||
cat > "$pkg/runtime/usr/share/polkit-1/actions/org.archipelago.software.policy" <<'POLKIT'
|
||||
@@SOFTWARE_POLICY@@
|
||||
POLKIT
|
||||
cat > "$units/archipelago-software-refresh.service" <<'SERVICE'
|
||||
@@SOFTWARE_SERVICE@@
|
||||
SERVICE
|
||||
cat > "$units/archipelago-software-refresh.timer" <<'TIMER'
|
||||
@@SOFTWARE_TIMER@@
|
||||
TIMER
|
||||
printf 'd /var/lib/archipelago/software 0755 root root -\n' > "$pkg/runtime/usr/lib/tmpfiles.d/archipelago-software.conf"
|
||||
cat > "$pkg/runtime/usr/lib/systemd/system-preset/10-archipelago-kde.preset" <<'PRESET'
|
||||
disable archipelago-firstboot@tty1.service
|
||||
disable archipelago-firstboot@ttyS0.service
|
||||
|
|
|
|||
|
|
@ -4,6 +4,27 @@ mkdir -p "$pkg/runtime/usr/lib/archipelago/defaults" "$pkg/runtime/usr/lib/syste
|
|||
"$pkg/runtime/usr/lib/systemd/system/systemd-firstboot.service.d" "$pkg/runtime/usr/lib/ostree" \
|
||||
"$pkg/runtime/usr/lib/tmpfiles.d" "$pkg/runtime/usr/share/libalpm/hooks" "$pkg/runtime/usr/lib/systemd/system-preset"
|
||||
cp /job/archipelago "$pkg/archipelago"
|
||||
mkdir -p "$pkg/runtime/usr/share/dbus-1/system-services" "$pkg/runtime/usr/share/dbus-1/system.d" \
|
||||
"$pkg/runtime/usr/share/dbus-1/interfaces" "$pkg/runtime/usr/share/polkit-1/actions" "$pkg/runtime/usr/share/polkit-1/rules.d"
|
||||
cat > "$pkg/runtime/usr/lib/systemd/system/archipelagod.service" <<'SYSTEM_SERVICE'
|
||||
@@SYSTEM_SERVICE@@
|
||||
SYSTEM_SERVICE
|
||||
ln -s archipelagod.service "$pkg/runtime/usr/lib/systemd/system/archipelago-daemon.service"
|
||||
cat > "$pkg/runtime/usr/share/dbus-1/system-services/org.archipelago.System1.service" <<'BUS_ACTIVATION'
|
||||
@@SYSTEM_BUS_ACTIVATION@@
|
||||
BUS_ACTIVATION
|
||||
cat > "$pkg/runtime/usr/share/dbus-1/system.d/org.archipelago.System1.conf" <<'BUS_POLICY'
|
||||
@@SYSTEM_BUS_POLICY@@
|
||||
BUS_POLICY
|
||||
cat > "$pkg/runtime/usr/share/dbus-1/interfaces/org.archipelago.System1.xml" <<'BUS_XML'
|
||||
@@SYSTEM_BUS_XML@@
|
||||
BUS_XML
|
||||
cat > "$pkg/runtime/usr/share/polkit-1/actions/org.archipelago.system.policy" <<'POLKIT_ACTIONS'
|
||||
@@SYSTEM_POLKIT_ACTIONS@@
|
||||
POLKIT_ACTIONS
|
||||
cat > "$pkg/runtime/usr/share/polkit-1/rules.d/50-archipelago-system.rules" <<'POLKIT_RULES'
|
||||
@@SYSTEM_POLKIT_RULES@@
|
||||
POLKIT_RULES
|
||||
mkdir -p "$pkg/runtime/usr/share/archipelago/keys"
|
||||
install -m644 /job/update.json "$pkg/runtime/usr/lib/archipelago/update.json"
|
||||
install -m644 /job/ostree.asc "$pkg/runtime/usr/share/archipelago/keys/ostree.asc"
|
||||
|
|
|
|||
|
|
@ -45,6 +45,31 @@ test ! -e /seed/export
|
|||
mkdir /seed/export
|
||||
flatpak create-usb --system /seed/export "${apps[@]}"
|
||||
ostree --repo=/seed/export/.ostree/repo fsck
|
||||
# Content checksums/fsck alone do not prove that detached GPG metadata survived
|
||||
# sideload export. Verify every exported app/runtime, including GL extensions.
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
source = Path('/var/lib/flatpak/repo')
|
||||
export = Path('/seed/export/.ostree/repo')
|
||||
refs = export / 'refs/mirrors/org.flathub.Stable'
|
||||
count = 0
|
||||
for kind in ('app', 'runtime'):
|
||||
for ref in sorted((refs / kind).rglob('*')):
|
||||
if not ref.is_file():
|
||||
continue
|
||||
commit = ref.read_text().strip()
|
||||
assert re.fullmatch('[0-9a-f]{64}', commit), ref
|
||||
subprocess.run(['ostree', '--repo=' + str(source), 'show',
|
||||
'--gpg-verify-remote=flathub', commit], check=True,
|
||||
stdout=subprocess.DEVNULL)
|
||||
meta = Path('objects') / commit[:2] / (commit[2:] + '.commitmeta')
|
||||
assert (source / meta).read_bytes() == (export / meta).read_bytes(), ref
|
||||
count += 1
|
||||
assert count > 0, 'No signed app/runtime refs exported'
|
||||
print(f'Verified detached Flathub signatures for {count} exported refs')
|
||||
PY
|
||||
cp /seed/flathub.flatpakrepo /seed/export/
|
||||
cp /policy.json /seed/export/policy.json
|
||||
cp /seed/evidence/refs.tsv /seed/export/refs.tsv
|
||||
|
|
|
|||
|
|
@ -16,9 +16,16 @@ fn render_iso(kde: bool) -> String {
|
|||
.replace("@@SOFTWARE_POLICY@@", include_str!("../../system/integrations/gnome-software/org.archipelago.software.policy"))
|
||||
.replace("@@SOFTWARE_SERVICE@@", include_str!("../../system/integrations/gnome-software/archipelago-software-refresh.service"))
|
||||
.replace("@@SOFTWARE_TIMER@@", include_str!("../../system/integrations/gnome-software/archipelago-software-refresh.timer"))
|
||||
.replace("@@TOOLBOX_CONFIG@@", include_str!("../../purposes/common/desktop/toolbox.conf"));
|
||||
.replace("@@TOOLBOX_CONFIG@@", include_str!("../../purposes/common/desktop/toolbox.conf"))
|
||||
.replace("@@TOOLBOX_REGISTRIES@@", include_str!("../../purposes/common/desktop/toolbox-registries.conf"));
|
||||
let package = include_str!("../adapters/package.sh")
|
||||
.replace("@@PKGBUILD@@", include_str!("../../cli/packaging/PKGBUILD"))
|
||||
.replace("@@SYSTEM_SERVICE@@", include_str!("../../system/integrations/dbus/archipelagod.service"))
|
||||
.replace("@@SYSTEM_BUS_ACTIVATION@@", include_str!("../../system/integrations/dbus/org.archipelago.System1.service"))
|
||||
.replace("@@SYSTEM_BUS_POLICY@@", include_str!("../../system/integrations/dbus/org.archipelago.System1.conf"))
|
||||
.replace("@@SYSTEM_POLKIT_ACTIONS@@", include_str!("../../system/integrations/dbus/org.archipelago.system.policy"))
|
||||
.replace("@@SYSTEM_POLKIT_RULES@@", include_str!("../../system/integrations/dbus/50-archipelago-system.rules"))
|
||||
.replace("@@SYSTEM_BUS_XML@@", include_str!("../../contracts/dbus/org.archipelago.System1.xml"))
|
||||
.replace("@@GNOME_PACKAGE@@", &gnome);
|
||||
let layer = profile(include_str!("../adapters/gnome-layer.sh"))
|
||||
.replace(if kde { "@@KDE_ASSETS@@" } else { "@@GNOME_ASSETS@@" }, &gnome);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue