Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions iso/live/src/install-flatpaks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ set -euo pipefail
FLATPAK_CACHE=/var/cache/flatpak-dl
INSTALLER_APP_ID=org.bootcinstaller.Installer
INSTALLER_REPO=projectbluefin/bootc-installer
FALLBACK_REPO=tuna-os/tuna-installer
BUNDLE=org.bootcinstaller.Installer.flatpak
# Pin the installer release so ISO composition is reproducible rather than
# resolving a mutable `latest` during the build. Override with
# UTAH_INSTALLER_VERSION when validating a newer installer.
INSTALLER_VERSION="${UTAH_INSTALLER_VERSION:-v3.0.16}"
# The bundle is installed system-wide with --no-gpg-verify below, so the
# version pin alone is the whole trust story. Pin its SHA-256 the same way
# the Containerfile pins UUPD_SHA256, and verify before import. Version and
# digest move together; override with UTAH_INSTALLER_SHA256 when validating
# a newer installer.
INSTALLER_SHA256="${UTAH_INSTALLER_SHA256:-6d68445965bf03fd628fcc9e856b162939b5f87bf4532f62725cf0e114c7eea7}"

mkdir -p "${FLATPAK_CACHE}/tmp" /run/dbus
export TMPDIR="${FLATPAK_CACHE}/tmp"
Expand Down Expand Up @@ -52,13 +57,13 @@ flatpak remote-add --system --if-not-exists flathub https://dl.flathub.org/repo/

# A bundle import needs a temporary local remote in an OCI build: direct
# --bundle installs omit the deploy/active ref without flatpak-system-helper.
if ! curl --retry 3 --fail --location \
# The download comes only from INSTALLER_REPO: an earlier fallback fetched the
# same version tag from tuna-os/tuna-installer, which would have let a release
# in a different org substitute the installer every Utah ISO ships.
curl --retry 3 --fail --location \
"https://github.com/${INSTALLER_REPO}/releases/download/${INSTALLER_VERSION}/${BUNDLE}" \
-o /tmp/bootc-installer.flatpak; then
curl --retry 3 --fail --location \
"https://github.com/${FALLBACK_REPO}/releases/download/${INSTALLER_VERSION}/${BUNDLE}" \
-o /tmp/bootc-installer.flatpak
fi
-o /tmp/bootc-installer.flatpak
echo "${INSTALLER_SHA256} /tmp/bootc-installer.flatpak" | sha256sum --check --strict
local_repo=/tmp/bootc-installer-repo
ostree init --repo="${local_repo}" --mode=archive-z2
flatpak build-import-bundle "${local_repo}" /tmp/bootc-installer.flatpak
Expand Down
Loading