diff --git a/.github/workflows/build-iso.yml b/.github/workflows/build-iso.yml index 9fea1a1..9818194 100644 --- a/.github/workflows/build-iso.yml +++ b/.github/workflows/build-iso.yml @@ -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 }}" diff --git a/build_scripts/build.sh b/build_scripts/build.sh index 41f02c1..fd9bb11 100755 --- a/build_scripts/build.sh +++ b/build_scripts/build.sh @@ -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" @@ -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 diff --git a/build_scripts/overrides/aarch64/00-flatpaks.sh b/build_scripts/overrides/aarch64/00-flatpaks.sh new file mode 100755 index 0000000..a624e77 --- /dev/null +++ b/build_scripts/overrides/aarch64/00-flatpaks.sh @@ -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