diff --git a/iso_files/build.sh b/iso_files/build.sh index 99a0dc1..94a5a63 100755 --- a/iso_files/build.sh +++ b/iso_files/build.sh @@ -18,6 +18,8 @@ if [[ -f "$SCRIPT_DIR/flatpaks.list" ]]; then echo "Installing flatpaks..." curl --retry 3 -Lo /etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo xargs -r flatpak install -y --noninteractive < "$SCRIPT_DIR/flatpaks.list" || true + # cleanup our leftovers + rm -rf /flatpak-list fi # Configure podman temporarily to write to /usr/lib/containers/storage @@ -72,7 +74,12 @@ systemctl enable livesys.service livesys-late.service # Run the configure/postrootfs hook # We pass BASE_IMAGE so it can be used inside the script export BASE_IMAGE="${BASE_IMAGE:-}" -bash "$SCRIPT_DIR/configure_iso_anaconda.sh" +bash \ + "$SCRIPT_DIR/undo-image.sh" \ + "$SCRIPT_DIR/flatpak-mount-workaround.sh" \ + "$SCRIPT_DIR/plasma-tweaks.sh" \ + "$SCRIPT_DIR/workarounds.sh" \ + "$SCRIPT_DIR/configure_iso_anaconda.sh" # image-builder needs gcdx64.efi / grub modules _arch=$(uname -m) diff --git a/iso_files/configure_iso_anaconda.sh b/iso_files/configure_iso_anaconda.sh old mode 100644 new mode 100755 index 56bca49..5c0797a --- a/iso_files/configure_iso_anaconda.sh +++ b/iso_files/configure_iso_anaconda.sh @@ -11,34 +11,10 @@ else IMAGE_REF="$(jq -c -r '."image-ref"' <<<"$IMAGE_INFO")" IMAGE_REF="${IMAGE_REF##*://}" fi -sbkey='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' -# Configure Live Environment -glib-compile-schemas /usr/share/glib-2.0/schemas - -systemctl disable tailscaled.service -systemctl disable brew-upgrade.timer -systemctl disable brew-update.timer -systemctl disable brew-setup.service -systemctl disable uupd.timer -systemctl disable ublue-system-setup.service -systemctl disable flatpak-preinstall.service -systemctl --global disable podman-auto-update.timer -systemctl --global disable ublue-user-setup.service -rm /usr/share/applications/dev.getaurora.system-update.desktop - -# just to be sure -rm -f /usr/lib/systemd/system/flatpak-add-fedora-repos.service - -# https://github.com/ublue-os/aurora/issues/2624 -# https://github.com/get-aurora-dev/common/pull/249 -# https://bugs.kde.org/show_bug.cgi?id=523540 -# so plasma-welcome doesn't crash with `--live-environment` -rm /usr/share/plasma/plasma-welcome/intro-customization.desktop +sed -i 's/ANACONDA_PRODUCTVERSION=.*/ANACONDA_PRODUCTVERSION=""/' /usr/{,s}bin/liveinst || true # Anaconda Profile Detection - -# Aurora mkdir -p /etc/anaconda/profile.d tee /etc/anaconda/profile.d/aurora.conf <<'EOF' # Anaconda configuration file for Aurora @@ -78,61 +54,12 @@ hidden_webui_pages = anaconda-screen-accounts EOF -# add installer to kickoff -sed -i '2s/$/;liveinst.desktop/' /usr/share/kde-settings/kde-profile/default/xdg/kicker-extra-favoritesrc - -cat > /usr/bin/plasma-welcome <<'EOF' -#!/usr/bin/env bash - -# https://github.com/ublue-os/aurora/issues/2624 -# https://bugs.kde.org/show_bug.cgi?id=523540 -# real nasty, this is the same ordering as without --pages and with --live-environment -exec /usr/bin/plasma-welcome-original --pages Live,Welcome,SimpleByDefault,PowerfulWhenNeeded,Enjoy "$@" -EOF - -# Configure -. /etc/os-release -echo "Aurora release $VERSION_ID ($VERSION_CODENAME)" >/etc/system-release - -sed -i 's/ANACONDA_PRODUCTVERSION=.*/ANACONDA_PRODUCTVERSION=""/' /usr/{,s}bin/liveinst || true - -# Add StartupWMClass so the running window inherits the icon +# Add StartupWMClass so the running anaconda window inherits the icon desktop-file-edit \ --set-key=Icon --set-value=/usr/share/icons/hicolor/scalable/apps/dev.getaurora.installer.svg \ --set-key=StartupWMClass --set-value=slitherer \ /usr/share/applications/liveinst.desktop -git clone https://github.com/get-aurora-dev/branding /tmp/branding -cp -r /tmp/branding/iso_files/usr/* /usr/ -rm -rf /tmp/branding - -# https://github.com/get-aurora-dev/iso/issues/72 -cat > /usr/lib/systemd/system/var-lib-flatpak.mount <<'EOF' -[Unit] -Description=tmpfs so only aurora flatpaks are transferred to the installed system -Conflicts=umount.target - -[Mount] -Type=overlay -What=overlay -Where=/var/lib/flatpak -Options=lowerdir=/var/lib/flatpak,upperdir=/run/overlay/flatpak,workdir=/run/overlay/flatpak.work -[Install] -WantedBy=local-fs.target -EOF - -cat > /usr/lib/tmpfiles.d/aurora-iso-flatpak.conf <<'EOF' -d /run/overlay/flatpak 0755 - - - -d /run/overlay/flatpak.work 0755 - - - -EOF - -systemctl enable var-lib-flatpak.mount - -tee -a /etc/xdg/kwalletrc < /usr/lib/systemd/system/var-lib-flatpak.mount <<'EOF' +[Unit] +Description=tmpfs so only aurora flatpaks are transferred to the installed system +Conflicts=umount.target + +[Mount] +Type=overlay +What=overlay +Where=/var/lib/flatpak +Options=lowerdir=/var/lib/flatpak,upperdir=/run/overlay/flatpak,workdir=/run/overlay/flatpak.work +[Install] +WantedBy=local-fs.target +EOF + +cat > /usr/lib/tmpfiles.d/aurora-iso-flatpak.conf <<'EOF' +d /run/overlay/flatpak 0755 - - - +d /run/overlay/flatpak.work 0755 - - - +EOF + +systemctl enable var-lib-flatpak.mount diff --git a/iso_files/plasma-tweaks.sh b/iso_files/plasma-tweaks.sh new file mode 100755 index 0000000..94a58b4 --- /dev/null +++ b/iso_files/plasma-tweaks.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -eoux pipefail + +# add installer to kickoff +sed -i '2s/$/;liveinst.desktop/' /usr/share/kde-settings/kde-profile/default/xdg/kicker-extra-favoritesrc + +tee -a /etc/xdg/kwalletrc </etc/system-release + +cat > /usr/bin/plasma-welcome <<'EOF' +#!/usr/bin/env bash + +# https://github.com/ublue-os/aurora/issues/2624 +# https://bugs.kde.org/show_bug.cgi?id=523540 +# real nasty, this is the same ordering as without --pages and with --live-environment +exec /usr/bin/plasma-welcome-original --pages Live,Welcome,SimpleByDefault,PowerfulWhenNeeded,Enjoy "$@" +EOF + +# https://github.com/ublue-os/aurora/issues/2624 +# https://github.com/get-aurora-dev/common/pull/249 +# https://bugs.kde.org/show_bug.cgi?id=523540 +# so plasma-welcome doesn't crash with `--live-environment` +rm /usr/share/plasma/plasma-welcome/intro-customization.desktop