From 4ab3dccc7f71bc6b8524908854d53bf017cf3e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 30 Mar 2025 16:16:58 +0200 Subject: [PATCH] =?UTF-8?q?fix=20amd64=20&=C2=A0build.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/chromium/Dockerfile | 4 ++-- apps/firefox/Dockerfile | 8 ++++---- build | 13 ++++--------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/apps/chromium/Dockerfile b/apps/chromium/Dockerfile index 40cfed19..70f4085d 100644 --- a/apps/chromium/Dockerfile +++ b/apps/chromium/Dockerfile @@ -8,10 +8,10 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends chromium chromium-common chromium-sandbox openbox; \ # - # install widevine module (only for x86_64) + # install widevine module (only for amd64) CHROMIUM_DIR="/usr/lib/chromium"; \ ARCH=$(dpkg --print-architecture); \ - if [ "${ARCH}" = "x86_64" ]; then \ + if [ "${ARCH}" = "amd64" ]; then \ # https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/chromeos-lacros-arm64-squash-zstd-120.0.6098.0 apt-get install -y --no-install-recommends unzip; \ WIDEVINE_ARCH="x64"; \ diff --git a/apps/firefox/Dockerfile b/apps/firefox/Dockerfile index 6ccbdbfd..6a510434 100644 --- a/apps/firefox/Dockerfile +++ b/apps/firefox/Dockerfile @@ -9,7 +9,7 @@ RUN set -eux; apt-get update; \ if [ "${ARCH}" = "armhf" ]; then \ # # install firefox-esr for armhf - apt-get install -y --no-install-recommends openbox firefox-esr; \ + apt-get install -y --no-install-recommends firefox-esr; \ ln -s /usr/bin/firefox-esr /usr/bin/firefox; \ # # install extensions @@ -18,11 +18,11 @@ RUN set -eux; apt-get update; \ wget -O '/usr/lib/firefox-esr/distribution/extensions/sponsorBlocker@ajay.app.xpi' https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi; \ else \ # - # fetch latest release (for x86_64 and arm64) - if [ "${ARCH}" = "x86_64" ]; then \ + # fetch latest release (for amd64 and arm64) + if [ "${ARCH}" = "amd64" ]; then \ SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"; \ elif [ "${ARCH}" = "arm64" ]; then \ - SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux-aarch64&lang=en-US"; \ + SRC_URL="https://download.mozilla.org/?product=firefox-latest&os=linux64-aarch64&lang=en-US"; \ fi; \ if [ ! -z "${SRC_URL}" ]; then \ apt-get install -y --no-install-recommends xz-utils libgtk-3-0 libdbus-glib-1-2; \ diff --git a/build b/build index c19f562a..0e061a5e 100755 --- a/build +++ b/build @@ -283,14 +283,9 @@ fi prompt "Are you sure you want to build $BASE_IMAGE?" -if [ -z "$FLAVOR" ]; then - export RUNTIME_DOCKERFILE="Dockerfile" -else - if [ -f "runtime/Dockerfile.$FLAVOR" ]; then - export RUNTIME_DOCKERFILE="Dockerfile.$FLAVOR" - else - export RUNTIME_DOCKERFILE="Dockerfile" - fi +RUNTIME_DOCKERFILE="Dockerfile" +if [ ! -z "$FLAVOR" ] && [ -f "runtime/Dockerfile.$FLAVOR" ]; then + RUNTIME_DOCKERFILE="Dockerfile.$FLAVOR" fi log "Building base image: $BASE_IMAGE" @@ -301,4 +296,4 @@ docker run --rm -i \ --entrypoint go \ golang:1.24-bullseye \ run ./docker/main.go \ - -i Dockerfile.tmpl | build_image $BASE_IMAGE -f - . + -i Dockerfile.tmpl -client $CLIENT_DIST | build_image $BASE_IMAGE -f - .