From 8e32db53abc7be68ff203cf8f382ba6917001a3f Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Thu, 16 May 2024 00:49:40 -0400 Subject: [PATCH] chore: use brew's installer --- Containerfile | 14 +++++++++++--- .../usr/lib/systemd/system/brew-setup.service | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index b01b77d0..7c193513 100644 --- a/Containerfile +++ b/Containerfile @@ -9,7 +9,6 @@ ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" FROM ghcr.io/ublue-os/akmods:${KERNEL_FLAVOR}-${FEDORA_MAJOR_VERSION} as akmods FROM ghcr.io/ublue-os/akmods-extra:${KERNEL_FLAVOR}-${FEDORA_MAJOR_VERSION} as akmods-extra -FROM ghcr.io/ublue-os/bluefin-cli:latest as bluefin-cli FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bazzite @@ -539,8 +538,17 @@ RUN rpm-ostree install \ sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' /usr/lib/waydroid/data/scripts/waydroid-net.sh && \ ostree container commit -# Copy Homebrew -COPY --from=bluefin-cli /home/homebrew /usr/share/homebrew +# Homebrew +RUN touch /.dockerenv && \ + mkdir -p /var/home && \ + mkdir -p /var/roothome && \ + curl -Lo /tmp/brew-install https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh && \ + chmod +x /tmp/brew-install && \ + /tmp/brew-install && \ + rm -rf /home/linuxbrew/.linuxbrew/Homebrew/Library/vendor && \ + rm -rf /home/linuxbrew/.linuxbrew/Homebrew/.git && \ + cp -R /home/linuxbrew /usr/share/homebrew && \ + ostree container commit # Cleanup & Finalize COPY system_files/overrides / diff --git a/system_files/desktop/shared/usr/lib/systemd/system/brew-setup.service b/system_files/desktop/shared/usr/lib/systemd/system/brew-setup.service index f29879c3..24687380 100644 --- a/system_files/desktop/shared/usr/lib/systemd/system/brew-setup.service +++ b/system_files/desktop/shared/usr/lib/systemd/system/brew-setup.service @@ -1,11 +1,15 @@ [Unit] Description=Setup Brew +Wants=network-online.target +After=network-online.target ConditionPathExists=!/etc/.linuxbrew ConditionPathExists=!/var/home/linuxbrew/.linuxbrew [Service] Type=oneshot ExecStart=/usr/bin/cp -R -n /usr/share/homebrew/.linuxbrew /var/home/linuxbrew +ExecStart=/home/linuxbrew/.linuxbrew/bin/brew update +ExecStart=/home/linuxbrew/.linuxbrew/bin/brew upgrade ExecStart=/usr/bin/chown -R 1000:1000 /var/home/linuxbrew ExecStart=/usr/bin/touch /etc/.linuxbrew