Skip to content

Commit

Permalink
chore: replace x86_64-only Flatpaks with amd64 alternatives (#215)
Browse files Browse the repository at this point in the history
I'm not too sure how the overrides work, so please give this a good
review :)

This replaces Firefox with Chromium (the next best option for a
browser).
And removes Thunderbird, since it's not really needed when you have a
browser.

---------

Co-authored-by: Tulip Blossom <[email protected]>
  • Loading branch information
p5 and tulilirockz authored Feb 1, 2025
1 parent 4daff01 commit 80fdcf0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ on:
required: false
default: false
type: boolean
# pull_request:
pull_request:
branches:
- main
paths:
- './image-builder-iso.config.toml'
- './.github/workflows/build-iso.yml'
- './Justfile'

env:
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}"
Expand Down
35 changes: 18 additions & 17 deletions build_scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,16 @@
# This file needs to exist otherwise running this in a RUN label makes it so bash strict mode doesnt work.
# Thus leading to silent failures

set -euo pipefail
set -xeuo pipefail

# Do not rely on any of these scripts existing in a specific path
# Make the names as descriptive as possible and everything that uses dnf for package installation/removal should have `packages-` as a prefix.

MAJOR_VERSION_NUMBER="$(sh -c '. /usr/lib/os-release ; echo $VERSION_ID')"
export MAJOR_VERSION_NUMBER

# Specifically the dash here to indicate that we do not want to run this script again
for script in /var/tmp/build_scripts/*-*.sh; do
printf "::group:: ===%s===\n" "$(basename "$script")"
$script
printf "::endgroup::\n"
done

run_buildscripts_for() {
WHAT=$1
shift
find "/var/tmp/build_scripts/overrides/$WHAT" -iname "*-*.sh" | while read -r -d $'\0' script; do
# Complex "find" expression here since there might not be any overrides
find "/var/tmp/build_scripts/overrides/$WHAT" -iname "*-*.sh" -print0 | while IFS= read -r -d $'\0' script; do
printf "::group:: ===$WHAT-%s===\n" "$(basename "$script")"
$script
printf "::endgroup::\n"
Expand All @@ -32,22 +23,32 @@ copy_systemfiles_for() {
WHAT=$1
shift
printf "::group:: ===%s-file-copying===\n" "$WHAT"
rsync -rvK "/var/tmp/system_files_overrides/$WHAT/" /
cp -av "/var/tmp/system_files_overrides/$WHAT/." /
printf "::endgroup::\n"
}

MAJOR_VERSION_NUMBER="$(sh -c '. /usr/lib/os-release ; echo $VERSION_ID')"
export MAJOR_VERSION_NUMBER

for script in /var/tmp/build_scripts/*-*.sh; do
printf "::group:: ===%s===\n" "$(basename "$script")"
$script
printf "::endgroup::\n"
done

copy_systemfiles_for "$(arch)"
run_buildscripts_for "$(arch)"

if [ "$ENABLE_DX" == "1" ]; then
copy_systemfiles_for dx
run_buildscripts_for dx
fi

if [ "$ENABLE_HWE" == "1" ]; then
copy_systemfiles_for hwe
run_buildscripts_for hwe
fi

if [ "$ENABLE_DX" == "1" ]; then
copy_systemfiles_for dx
run_buildscripts_for dx
fi

# Ensure these get run at the _end_ of the build no matter what
/var/tmp/build_scripts/cleanup.sh
12 changes: 12 additions & 0 deletions build_scripts/overrides/aarch64/00-flatpaks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -xeuo pipefail

# Bucket list again, this needs to be fixed upstream!

TARGET_FLATPAK_FILE="/etc/ublue-os/system-flatpaks.list"

sed -i "/org\.mozilla.*/d" "$TARGET_FLATPAK_FILE"
echo "org.chromium.Chromium" >> "$TARGET_FLATPAK_FILE"

sed -i "s/org.mozilla.Firefox/org.chromium.Chromium/g" /usr/share/glib-2.0/schemas/zz0-bluefin-modifications.gschema.override

0 comments on commit 80fdcf0

Please sign in to comment.