summaryrefslogtreecommitdiff
path: root/build_files
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-07-09 16:53:52 +0800
committertranch <tranch.xiao@gmail.com>2026-07-09 17:01:14 +0800
commited40e44b610cac878f17fa4233d8e3d19b8d67bb (patch)
tree206f40fb94055c71e2d361ba68920a2aa9aab6de /build_files
parent4a99dd73617e0cd5784929b5007a0aa5e92c7dd5 (diff)
downloadAeroCore-OS-ed40e44b610cac878f17fa4233d8e3d19b8d67bb.tar.gz
AeroCore-OS-ed40e44b610cac878f17fa4233d8e3d19b8d67bb.zip
Configure AeroCore image mirrors
Add build-time mirror configuration for Flatpak and Homebrew, expose the related build args, and install an AeroCore-owned profile script to load mirror environment files. Rename the mirror configuration files from the Bazzite-prefixed names to AeroCore-prefixed names while keeping the upstream Bazzite helper reference intact. Verification: bash -n system_files/etc/profile.d/aerocore-mirrors.sh && bash -n build_files/build.sh
Diffstat (limited to 'build_files')
-rwxr-xr-xbuild_files/build.sh37
1 files changed, 22 insertions, 15 deletions
diff --git a/build_files/build.sh b/build_files/build.sh
index 0bb290c..f1709da 100755
--- a/build_files/build.sh
+++ b/build_files/build.sh
@@ -5,23 +5,30 @@ set -ouex pipefail
# Copy the contents of system_files/ of the git repo to /
cp -avf "/ctx/system_files"/. /
-### Install packages
+mkdir -p /etc/environment.d
-# Packages can be installed from any enabled yum repo on the image.
-# RPMfusion repos are available by default in ublue main images
-# List of rpmfusion packages can be found here:
-# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/43/x86_64/repoview/index.html&protocol=https&redirect=1
+if [[ -n "${FLATPAK_REMOTE_URL:-}" || -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then
+ : > /etc/environment.d/99-aerocore-mirrors.conf
+fi
-# this installs a package from fedora repos
-dnf5 install -y tmux
+if [[ -n "${FLATPAK_REMOTE_URL:-}" ]]; then
+ printf '%s\n' "FLATPAK_REMOTE_URL=${FLATPAK_REMOTE_URL}" >> /etc/environment.d/99-aerocore-mirrors.conf
+ if [[ -f /usr/libexec/bazzite-mirror-utils.sh ]]; then
+ bash /usr/libexec/bazzite-mirror-utils.sh update_flathub_repo_url "${FLATPAK_REMOTE_URL}"
+ fi
+fi
-# Use a COPR Example:
-#
-# dnf5 -y copr enable ublue-os/staging
-# dnf5 -y install package
-# Disable COPRs so they don't end up enabled on the final image:
-# dnf5 -y copr disable ublue-os/staging
+if [[ -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then
+ mkdir -p /etc/skel/.config/environment.d
+ : > /etc/skel/.config/environment.d/99-aerocore-mirrors.conf
+fi
-#### Example for enabling a System Unit File
+if [[ -n "${HOMEBREW_BOTTLE_DOMAIN:-}" ]]; then
+ printf '%s\n' "HOMEBREW_BOTTLE_DOMAIN=${HOMEBREW_BOTTLE_DOMAIN}" | tee -a /etc/environment.d/99-aerocore-mirrors.conf /etc/skel/.config/environment.d/99-aerocore-mirrors.conf >/dev/null
+fi
-systemctl enable podman.socket
+if [[ -n "${HOMEBREW_API_DOMAIN:-}" ]]; then
+ printf '%s\n' "HOMEBREW_API_DOMAIN=${HOMEBREW_API_DOMAIN}" | tee -a /etc/environment.d/99-aerocore-mirrors.conf /etc/skel/.config/environment.d/99-aerocore-mirrors.conf >/dev/null
+fi
+
+find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirrors.conf -type f -exec chmod 0644 {} + 2>/dev/null || true