Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace x86_64-only Flatpaks with amd64 alternatives #215

Merged
merged 6 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
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
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/" /
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this necessary? Usually rsync output is more verbose, I get not relying on it but I think we might need this here?

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