From de62d86d3191abafd600e27ccab03e5b8c912ace Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:49:09 +0100 Subject: [PATCH] chore: move {bazaar,fastfetch-}user-count (#1680) * chore: move {bazaar,fastfetch-}user-count This allows us to disable networking in 00-image-info.sh completely * chore: only gh token for scripts that need it --- Containerfile | 5 ++--- build_files/base/00-image-info.sh | 8 -------- build_files/base/06-override-install.sh | 8 ++++++++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Containerfile b/Containerfile index 2930d3c0..4898a5e9 100644 --- a/Containerfile +++ b/Containerfile @@ -42,16 +42,15 @@ ARG IMAGE_FLAVOR="" RUN --mount=type=tmpfs,dst=/boot \ --mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=cache,dst=/var/cache/libdnf5 \ - --mount=type=secret,id=GITHUB_TOKEN \ /ctx/build_files/shared/build.sh # so ghcurl wrapper is available to all later RUNs ENV PATH="/tmp/scripts/helpers:${PATH}" # Generate image-info.json, os-release -RUN --mount=type=tmpfs,dst=/boot \ +RUN --network=none \ + --mount=type=tmpfs,dst=/boot \ --mount=type=bind,from=ctx,source=/,target=/ctx \ - --mount=type=secret,id=GITHUB_TOKEN \ /ctx/build_files/base/00-image-info.sh # Install Kernel and Akmods diff --git a/build_files/base/00-image-info.sh b/build_files/base/00-image-info.sh index 47c1c590..e24b2a1c 100755 --- a/build_files/base/00-image-info.sh +++ b/build_files/base/00-image-info.sh @@ -62,12 +62,4 @@ echo "IMAGE_VERSION=\"${VERSION}\"" >> /usr/lib/os-release # Fix issues caused by ID no longer being fedora sed -i "s|^EFIDIR=.*|EFIDIR=\"fedora\"|" /usr/sbin/grub2-switch-to-blscfg -# Weekly user count for fastfetch -ghcurl https://raw.githubusercontent.com/ublue-os/countme/main/badge-endpoints/aurora.json | jq -r ".message" > /usr/share/ublue-os/fastfetch-user-count - -# bazaar weekly downloads used for fastfetch -curl -X 'GET' \ -'https://flathub.org/api/v2/stats/io.github.kolunmi.Bazaar?all=false&days=1' \ --H 'accept: application/json' | jq -r ".installs_last_7_days" | numfmt --to=si --round=nearest > /usr/share/ublue-os/bazaar-install-count - echo "::endgroup::" diff --git a/build_files/base/06-override-install.sh b/build_files/base/06-override-install.sh index 3f353881..04336807 100755 --- a/build_files/base/06-override-install.sh +++ b/build_files/base/06-override-install.sh @@ -25,6 +25,14 @@ ghcurl "https://github.com/ublue-os/aurora-docs/releases/download/0.1/aurora.pdf install -Dm0644 -t /usr/share/doc/aurora/ /tmp/aurora.pdf cp /usr/share/applications/dev.getaurora.aurora-docs.desktop /usr/share/kglobalaccel/ +# Weekly user count for fastfetch +ghcurl https://raw.githubusercontent.com/ublue-os/countme/main/badge-endpoints/aurora.json | jq -r ".message" > /usr/share/ublue-os/fastfetch-user-count + +# bazaar weekly downloads used for fastfetch +curl -X 'GET' \ +'https://flathub.org/api/v2/stats/io.github.kolunmi.Bazaar?all=false&days=1' \ +-H 'accept: application/json' | jq -r ".installs_last_7_days" | numfmt --to=si --round=nearest > /usr/share/ublue-os/bazaar-install-count + # Starship Shell Prompt ghcurl "https://github.com/starship/starship/releases/latest/download/starship-$(uname -m)-unknown-linux-gnu.tar.gz" --retry 3 -o /tmp/starship.tar.gz ghcurl "https://github.com/starship/starship/releases/latest/download/starship-$(uname -m)-unknown-linux-gnu.tar.gz.sha256" --retry 3 -o /tmp/starship.tar.gz.sha256