From 552e6225cff08fb2b3d7d6f237f74e51fc3ac7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 20 Oct 2025 09:52:58 +0200 Subject: [PATCH] fix opera build. the latest release does not contain linux package, only mac. we need to swtch from taking the latest version to getting last 10 versions, looping through them and see which one actually has linux package. --- apps/opera/Dockerfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/opera/Dockerfile b/apps/opera/Dockerfile index dc333e08..d1f372d3 100644 --- a/apps/opera/Dockerfile +++ b/apps/opera/Dockerfile @@ -8,8 +8,20 @@ ARG LIBFFMPEG_API_URL="https://api.github.com/repos/nwjs-ffmpeg-prebuilt/nwjs-ff # install opera RUN set -eux; apt-get update; \ # - # fetch latest release - VERSION="$(wget -O - "${API_URL}" 2>/dev/null | sed -n 's/.*href="\([^"/]*\).*/\1/p' | sort --version-sort | tail -1)"; \ + # fetch latest available release with linux package + VERSIONS="$(wget -O - "${API_URL}" 2>/dev/null | sed -n 's/.*href="\([^"/]*\).*/\1/p' | sort --version-sort -r | head -n 10)"; \ + VERSION=""; \ + for v in $VERSIONS; do \ + if wget --spider "${API_URL}${v}/linux/opera-stable_${v}_amd64.deb" 2>/dev/null; then \ + VERSION="$v"; \ + break; \ + fi; \ + done; \ + if [ -z "$VERSION" ]; then \ + echo "No Opera version with Linux package found"; \ + exit 1; \ + fi; \ + echo "Using Opera version: $VERSION"; \ wget -O /tmp/opera.deb "${API_URL}${VERSION}/linux/opera-stable_${VERSION}_amd64.deb"; \ apt-get install -y --no-install-recommends openbox jq unzip /tmp/opera.deb; \ #