Skip to content
Open
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
21 changes: 21 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=secret,id=GITHUB_TOKEN \
/ctx/build_files/shared/build.sh

# Download Homebrew tarball (extracted at first boot by brew-setup.service)
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=secret,id=GITHUB_TOKEN \
set -eoux pipefail && \
ARCH=$(uname -m) && \
# Get latest homebrew release tag from GitHub API
HOMEBREW_RELEASE=$(curl -sL \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/ublue-os/packages/releases" | \
jq -r '[.[] | select(.tag_name | startswith("homebrew-"))][0].tag_name') && \
echo "Using Homebrew release: ${HOMEBREW_RELEASE}" && \
HOMEBREW_BASE_URL="https://github.com/ublue-os/packages/releases/download/${HOMEBREW_RELEASE}" && \
# Download tarball to /usr/share
/ctx/build_files/shared/utils/ghcurl "${HOMEBREW_BASE_URL}/homebrew-${ARCH}.tar.zst" --retry 3 -o /usr/share/homebrew.tar.zst && \
# Download and verify checksum
EXPECTED_SHA=$(/ctx/build_files/shared/utils/ghcurl "${HOMEBREW_BASE_URL}/homebrew-${ARCH}.sha256" --retry 3 | awk '{print $1}') && \
echo "${EXPECTED_SHA} /usr/share/homebrew.tar.zst" | sha256sum -c && \
# Verify tarball exists
test -f /usr/share/homebrew.tar.zst

# Makes `/opt` writeable by default
# Needs to be here to make the main image build strict (no /opt there)
# This is for downstream images/stuff like k0s
Expand Down
2 changes: 1 addition & 1 deletion build_files/base/04-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ FEDORA_PACKAGES=(
ddcutil
evtest
fastfetch
file
firewall-config
fish
foo2zjs
Expand Down Expand Up @@ -124,7 +125,6 @@ copr_install_isolated "ublue-os/packages" \
"bluefin-schemas" \
"bluefin-fastfetch" \
"ublue-bling" \
"ublue-brew" \
"ublue-fastfetch" \
"ublue-motd" \
"ublue-polkit-rules" \
Expand Down
8 changes: 5 additions & 3 deletions build_files/base/17-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ systemctl enable tailscaled.service
systemctl enable dconf-update.service
systemctl enable ublue-guest-user.service
systemctl --global enable bazaar.service
systemctl enable brew-setup.service
systemctl enable brew-upgrade.timer
systemctl enable brew-update.timer
systemctl enable ublue-fix-hostname.service
systemctl enable ublue-system-setup.service
systemctl --global enable ublue-user-setup.service
Expand All @@ -27,6 +24,11 @@ systemctl enable check-sb-key.service
systemctl enable input-remapper.service
systemctl enable flatpak-nuke-fedora.service

# Homebrew setup (extracts tarball on first boot) and auto-update/upgrade timers
systemctl enable brew-setup.service
systemctl enable brew-update.timer
systemctl enable brew-upgrade.timer

# run flatpak preinstall once at startup
if [[ "$(rpm -E %fedora)" -ge "42" ]]; then
systemctl enable flatpak-preinstall.service
Expand Down
1 change: 1 addition & 0 deletions build_files/base/20-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ done
#fi

IMPORTANT_UNITS=(
brew-setup.service
brew-update.timer
brew-upgrade.timer
rpm-ostree-countme.timer
Expand Down
2 changes: 1 addition & 1 deletion iso_files/configure_iso_anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sbkey='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
# Configure Live Environment

# Remove packages from liveCD to save space
dnf remove -y ublue-brew ublue-motd || true
dnf remove -y ublue-motd || true

# Setup dock
tee /usr/share/glib-2.0/schemas/zz2-org.gnome.shell.gschema.override <<EOF
Expand Down
8 changes: 4 additions & 4 deletions iso_files/configure_lts_iso_anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGE_REF="${IMAGE_REF##*://}"
# Configure Live Environment

# Remove packages from liveCD to save space
dnf remove -y google-noto-fonts-all ublue-brew ublue-motd yaru-theme || true
dnf remove -y ublue-motd || true

# Setup dock
tee /usr/share/glib-2.0/schemas/zz2-org.gnome.shell.gschema.override <<EOF
Expand All @@ -38,9 +38,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas
systemctl disable rpm-ostree-countme.service
systemctl disable tailscaled.service
systemctl disable bootloader-update.service
# systemctl disable brew-upgrade.timer
# systemctl disable brew-update.timer
# systemctl disable brew-setup.service
systemctl disable brew-upgrade.timer
systemctl disable brew-update.timer
systemctl disable brew-setup.service
systemctl disable rpm-ostreed-automatic.timer
systemctl disable uupd.timer
systemctl disable ublue-system-setup.service
Expand Down
Loading