From 62cac941533829ee838d11cd1d6794852c7054dd Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 11:23:50 +0200 Subject: [PATCH 01/16] qemu + platforms --- .github/workflows/docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d52ce0c02..be00f7dbe 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -24,6 +24,9 @@ jobs: id: version run: .github/workflows/docker-version.sh + - name: setup-qemu + uses: docker/setup-qemu-action@v4 + - name: setup-buildx uses: docker/setup-buildx-action@v4 @@ -50,6 +53,7 @@ jobs: uses: docker/build-push-action@v7 with: context: . + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 7ae6702ae06fc16239ea767705f67cdf587348c5 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 17:17:45 +0200 Subject: [PATCH 02/16] dummy change --- api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api.go b/api.go index 0ed06decf..cc7b40764 100644 --- a/api.go +++ b/api.go @@ -86,6 +86,10 @@ type FileMatch struct { RepositoryID uint32 `json:",omitempty"` } +type foo string + +var _ = foo("bar") + func (m *FileMatch) sizeBytes() (sz uint64) { // Score sz += 8 From 4f6498cb9b25a458abf75a79965d35d31c873bf0 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 17:18:12 +0200 Subject: [PATCH 03/16] trigger build --- .github/workflows/docker.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index be00f7dbe..7552c56b1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,10 +2,10 @@ name: Publish Docker Image on: push: - branches: - - main - tags: - - 'v*' + # branches: + # - main + # tags: + # - 'v*' workflow_dispatch: jobs: @@ -42,12 +42,12 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} type=sha,prefix=sha-,format=short - - name: login to ghcr.io - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + # - name: login to ghcr.io + # uses: docker/login-action@v4 + # with: + # registry: ghcr.io + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} - name: build and push uses: docker/build-push-action@v7 From 690e232dd80268ae212642ec0744e41b7803881e Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 17:22:59 +0200 Subject: [PATCH 04/16] no push --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7552c56b1..33e4ed5ac 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -54,7 +54,7 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - push: true + push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha From a1d58c6b1c0bc10d9012188b5e1341d598177e1f Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 21:48:38 +0200 Subject: [PATCH 05/16] trigger build --- api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.go b/api.go index cc7b40764..1eb61cf35 100644 --- a/api.go +++ b/api.go @@ -88,7 +88,7 @@ type FileMatch struct { type foo string -var _ = foo("bar") +var _ = foo("bak") func (m *FileMatch) sizeBytes() (sz uint64) { // Score From 9c033ed575c30602cc0fe418e84118f664ccba35 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 22:15:44 +0200 Subject: [PATCH 06/16] timeout --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 33e4ed5ac..c5567e8c0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,6 +11,7 @@ on: jobs: docker: runs-on: ubuntu-latest + timeout-minutes: 30 permissions: contents: read packages: write From 448d5a84f6ce822906674e4155aa1d26bafd2722 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 22:40:42 +0200 Subject: [PATCH 07/16] prebuilt uctags --- Dockerfile | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cdf93b76..cbd6ec7f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,12 +24,26 @@ RUN --mount=type=cache,target=/go/pkg/mod \ FROM alpine:3 -RUN apk add --no-cache git ca-certificates bind-tools tini jansson wget - -COPY --chmod=755 install-ctags-alpine.sh /usr/local/bin/install-ctags-alpine.sh -RUN /usr/local/bin/install-ctags-alpine.sh && \ - rm /usr/local/bin/install-ctags-alpine.sh \ - /usr/local/bin/universal-optscript +RUN apk add --no-cache git ca-certificates bind-tools tini wget + +# Prebuilt universal-ctags from nightly releases (amd64/arm64). +# Zoekt looks up "universal-ctags" on PATH; the APK installs "ctags". +ARG TARGETARCH +ARG CTAGS_VERSION=2026.08.11 +ARG CTAGS_COMMIT=8361949f6a2465fb1bbaf26a234278c3c3cbd3ac +RUN set -eux; \ + case "$TARGETARCH" in \ + amd64) ctags_arch=x86_64 ;; \ + arm64) ctags_arch=aarch64 ;; \ + *) echo "unsupported TARGETARCH: $TARGETARCH" >&2; exit 1 ;; \ + esac; \ + apk_name="uctags-${CTAGS_VERSION}-linux-${ctags_arch}.release.apk"; \ + base_url="https://github.com/universal-ctags/ctags-nightly-build/releases/download/${CTAGS_VERSION}%2B${CTAGS_COMMIT}"; \ + wget -O "/tmp/${apk_name}" "${base_url}/${apk_name}"; \ + wget -O /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub"; \ + apk add --no-cache "/tmp/${apk_name}"; \ + rm "/tmp/${apk_name}"; \ + ln -s ctags /usr/bin/universal-ctags RUN addgroup -S zoekt && \ adduser -S -G zoekt -h /home/zoekt zoekt && \ From 4b5ff545660680766020314fe02be07379823313 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 22:44:35 +0200 Subject: [PATCH 08/16] cross compile in docker --- Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbd6ec7f4..b2e94298a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ # syntax=docker/dockerfile:1.7 -FROM golang:1.26.2-alpine AS builder +# Build on the native host arch and cross-compile; avoid QEMU for `go build`. +FROM --platform=$BUILDPLATFORM golang:1.26.2-alpine AS builder + +ARG TARGETOS +ARG TARGETARCH RUN apk add --no-cache ca-certificates @@ -16,11 +20,11 @@ ARG VERSION=dev RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ mkdir -p /out && \ - go build \ - -trimpath \ - -ldflags "-X github.com/sourcegraph/zoekt.Version=$VERSION" \ - -o /out/ \ - ./cmd/... + GOOS="$TARGETOS" GOARCH="$TARGETARCH" go build \ + -trimpath \ + -ldflags "-X github.com/sourcegraph/zoekt.Version=$VERSION" \ + -o /out/ \ + ./cmd/... FROM alpine:3 From 89fa97dc9f917fe5ded98e47707894c297c253b1 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Wed, 12 Aug 2026 22:52:22 +0200 Subject: [PATCH 09/16] revert api, quiet wget --- Dockerfile | 4 ++-- api.go | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b2e94298a..02fc650d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,8 +43,8 @@ RUN set -eux; \ esac; \ apk_name="uctags-${CTAGS_VERSION}-linux-${ctags_arch}.release.apk"; \ base_url="https://github.com/universal-ctags/ctags-nightly-build/releases/download/${CTAGS_VERSION}%2B${CTAGS_COMMIT}"; \ - wget -O "/tmp/${apk_name}" "${base_url}/${apk_name}"; \ - wget -O /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub"; \ + wget -qO "/tmp/${apk_name}" "${base_url}/${apk_name}"; \ + wget -qO /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub"; \ apk add --no-cache "/tmp/${apk_name}"; \ rm "/tmp/${apk_name}"; \ ln -s ctags /usr/bin/universal-ctags diff --git a/api.go b/api.go index 1eb61cf35..0ed06decf 100644 --- a/api.go +++ b/api.go @@ -86,10 +86,6 @@ type FileMatch struct { RepositoryID uint32 `json:",omitempty"` } -type foo string - -var _ = foo("bak") - func (m *FileMatch) sizeBytes() (sz uint64) { // Score sz += 8 From ff615a50997ee3976da38876904ff63ecba8837e Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 09:16:03 +0200 Subject: [PATCH 10/16] move installation to sh --- .github/workflows/ci.yml | 6 +++-- Dockerfile | 22 +++------------- install-ctags-alpine.sh | 57 +++++++++++----------------------------- 3 files changed, 24 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70a9e192a..8cb66517f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,9 @@ jobs: - name: Cache ctags uses: actions/cache@v5 with: - path: /usr/local/bin/universal-ctags + path: | + /usr/bin/ctags + /usr/bin/universal-ctags key: ${{ runner.os }}-ctags-${{ hashFiles('install-ctags-alpine.sh') }} - name: Cache Go modules @@ -34,7 +36,7 @@ jobs: - name: install ctags run: | - if [ ! -f /usr/local/bin/universal-ctags ]; then + if [ ! -f /usr/bin/ctags ]; then ./install-ctags-alpine.sh fi diff --git a/Dockerfile b/Dockerfile index 02fc650d3..b0dc08677 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,26 +28,12 @@ RUN --mount=type=cache,target=/go/pkg/mod \ FROM alpine:3 -RUN apk add --no-cache git ca-certificates bind-tools tini wget +RUN apk add --no-cache git ca-certificates bind-tools tini -# Prebuilt universal-ctags from nightly releases (amd64/arm64). -# Zoekt looks up "universal-ctags" on PATH; the APK installs "ctags". +COPY --chmod=755 install-ctags-alpine.sh /usr/local/bin/install-ctags-alpine.sh ARG TARGETARCH -ARG CTAGS_VERSION=2026.08.11 -ARG CTAGS_COMMIT=8361949f6a2465fb1bbaf26a234278c3c3cbd3ac -RUN set -eux; \ - case "$TARGETARCH" in \ - amd64) ctags_arch=x86_64 ;; \ - arm64) ctags_arch=aarch64 ;; \ - *) echo "unsupported TARGETARCH: $TARGETARCH" >&2; exit 1 ;; \ - esac; \ - apk_name="uctags-${CTAGS_VERSION}-linux-${ctags_arch}.release.apk"; \ - base_url="https://github.com/universal-ctags/ctags-nightly-build/releases/download/${CTAGS_VERSION}%2B${CTAGS_COMMIT}"; \ - wget -qO "/tmp/${apk_name}" "${base_url}/${apk_name}"; \ - wget -qO /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub"; \ - apk add --no-cache "/tmp/${apk_name}"; \ - rm "/tmp/${apk_name}"; \ - ln -s ctags /usr/bin/universal-ctags +RUN TARGETARCH="$TARGETARCH" /usr/local/bin/install-ctags-alpine.sh && \ + rm /usr/local/bin/install-ctags-alpine.sh RUN addgroup -S zoekt && \ adduser -S -G zoekt -h /home/zoekt zoekt && \ diff --git a/install-ctags-alpine.sh b/install-ctags-alpine.sh index ae0cfcc93..981687f62 100755 --- a/install-ctags-alpine.sh +++ b/install-ctags-alpine.sh @@ -1,50 +1,25 @@ #!/bin/sh -# This script installs universal-ctags within an alpine container. +# Installs universal-ctags from prebuilt Alpine APKs (amd64/arm64). +# Zoekt looks up "universal-ctags" on PATH; the APK installs "ctags". -# Commit hash of github.com/universal-ctags/ctags. -# Last bumped 2024-09-02. -CTAGS_VERSION=v6.1.0 -CTAGS_ARCHIVE_TOP_LEVEL_DIR=ctags-6.1.0 -# When using commits you can rely on -# CTAGS_ARCHIVE_TOP_LEVEL_DIR=ctags-$CTAGS_VERSION - -CTAGS_TMPDIR= - -cleanup() { - apk --no-cache --purge del ctags-build-deps || true - cd / - if [ -n "$CTAGS_TMPDIR" ]; then - rm -rf "$CTAGS_TMPDIR" - fi -} - -trap cleanup EXIT +CTAGS_VERSION=${CTAGS_VERSION:-2026.08.11} +CTAGS_COMMIT=${CTAGS_COMMIT:-8361949f6a2465fb1bbaf26a234278c3c3cbd3ac} set -eux -apk --no-cache add \ - --virtual ctags-build-deps \ - autoconf \ - automake \ - binutils \ - curl \ - g++ \ - gcc \ - jansson-dev \ - make \ - pkgconfig +case "${TARGETARCH:-$(uname -m)}" in + amd64 | x86_64) ctags_arch=x86_64 ;; + arm64 | aarch64) ctags_arch=aarch64 ;; + *) echo "unsupported architecture: ${TARGETARCH:-$(uname -m)}" >&2; exit 1 ;; +esac -# ctags is dynamically linked against jansson -apk --no-cache add jansson +apk_name="uctags-${CTAGS_VERSION}-linux-${ctags_arch}.release.apk" +base_url="https://github.com/universal-ctags/ctags-nightly-build/releases/download/${CTAGS_VERSION}%2B${CTAGS_COMMIT}" -NUMCPUS=$(grep -c '^processor' /proc/cpuinfo) -CTAGS_TMPDIR=$(mktemp -d /tmp/ctags.XXXXXX) +wget -qO "/tmp/${apk_name}" "${base_url}/${apk_name}" +wget -qO /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub" +apk add --no-cache "/tmp/${apk_name}" +rm "/tmp/${apk_name}" -# Installation -curl --retry 5 "https://codeload.github.com/universal-ctags/ctags/tar.gz/$CTAGS_VERSION" | tar xz -C "$CTAGS_TMPDIR" -cd "$CTAGS_TMPDIR/$CTAGS_ARCHIVE_TOP_LEVEL_DIR" -./autogen.sh -./configure --program-prefix=universal- --enable-json --disable-readcmd -make -j"$NUMCPUS" --load-average="$NUMCPUS" -make install +ln -sf /usr/bin/ctags /usr/bin/universal-ctags From 5f0c2a62b73a9cc93c1ae3883f75d8fdc6bfc817 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 09:21:06 +0200 Subject: [PATCH 11/16] sha verify --- install-ctags-alpine.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/install-ctags-alpine.sh b/install-ctags-alpine.sh index 981687f62..cb6376af9 100755 --- a/install-ctags-alpine.sh +++ b/install-ctags-alpine.sh @@ -2,6 +2,10 @@ # Installs universal-ctags from prebuilt Alpine APKs (amd64/arm64). # Zoekt looks up "universal-ctags" on PATH; the APK installs "ctags". +# +# sha256 sums below are GitHub release asset digests. When bumping +# CTAGS_VERSION or CTAGS_COMMIT, copy them from the release page/API: +# https://github.com/universal-ctags/ctags-nightly-build/releases CTAGS_VERSION=${CTAGS_VERSION:-2026.08.11} CTAGS_COMMIT=${CTAGS_COMMIT:-8361949f6a2465fb1bbaf26a234278c3c3cbd3ac} @@ -9,17 +13,25 @@ CTAGS_COMMIT=${CTAGS_COMMIT:-8361949f6a2465fb1bbaf26a234278c3c3cbd3ac} set -eux case "${TARGETARCH:-$(uname -m)}" in - amd64 | x86_64) ctags_arch=x86_64 ;; - arm64 | aarch64) ctags_arch=aarch64 ;; + amd64 | x86_64) + apk_name="uctags-${CTAGS_VERSION}-linux-x86_64.release.apk" + apk_sha256=bde53a3092fd540e004bf7923322a21604592734aea002086764f02456378c9d + ;; + arm64 | aarch64) + apk_name="uctags-${CTAGS_VERSION}-linux-aarch64.release.apk" + apk_sha256=245239f8097a2877ad91d14e742670d25ecd5bac7d2b77fdb0139dfcce291d22 + ;; *) echo "unsupported architecture: ${TARGETARCH:-$(uname -m)}" >&2; exit 1 ;; esac -apk_name="uctags-${CTAGS_VERSION}-linux-${ctags_arch}.release.apk" base_url="https://github.com/universal-ctags/ctags-nightly-build/releases/download/${CTAGS_VERSION}%2B${CTAGS_COMMIT}" +apk_path="/tmp/${apk_name}" -wget -qO "/tmp/${apk_name}" "${base_url}/${apk_name}" +wget -qO "$apk_path" "${base_url}/${apk_name}" wget -qO /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub" -apk add --no-cache "/tmp/${apk_name}" -rm "/tmp/${apk_name}" + +echo "$apk_sha256 $apk_path" | sha256sum -c - +apk add --no-cache "$apk_path" +rm "$apk_path" ln -sf /usr/bin/ctags /usr/bin/universal-ctags From 63406d069440201e54ccd70ee9caee9415621087 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 09:26:24 +0200 Subject: [PATCH 12/16] also run ci --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cb66517f..1a762c749 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ on: push: - branches: - - main + # branches: + # - main pull_request: workflow_dispatch: name: CI From 73208d6c3a36ac8b6ce91865a5f390b9afb272d8 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 09:28:33 +0200 Subject: [PATCH 13/16] ready for PR --- .github/workflows/ci.yml | 4 ++-- .github/workflows/docker.yml | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a762c749..8cb66517f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ on: push: - # branches: - # - main + branches: + - main pull_request: workflow_dispatch: name: CI diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c5567e8c0..1029a095a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,10 +2,10 @@ name: Publish Docker Image on: push: - # branches: - # - main - # tags: - # - 'v*' + branches: + - main + tags: + - 'v*' workflow_dispatch: jobs: @@ -43,19 +43,19 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} type=sha,prefix=sha-,format=short - # - name: login to ghcr.io - # uses: docker/login-action@v4 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} + - name: login to ghcr.io + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: build and push uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64,linux/arm64 - push: false + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha From a5455cc668c7d232ec59da07ddafd6f9e4004a0c Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 09:45:41 +0200 Subject: [PATCH 14/16] move shas --- install-ctags-alpine.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install-ctags-alpine.sh b/install-ctags-alpine.sh index cb6376af9..ba68630c3 100755 --- a/install-ctags-alpine.sh +++ b/install-ctags-alpine.sh @@ -9,17 +9,20 @@ CTAGS_VERSION=${CTAGS_VERSION:-2026.08.11} CTAGS_COMMIT=${CTAGS_COMMIT:-8361949f6a2465fb1bbaf26a234278c3c3cbd3ac} +# GitHub release asset digests for uctags-${CTAGS_VERSION}-linux-*.release.apk +CTAGS_APK_SHA256_X86_64=bde53a3092fd540e004bf7923322a21604592734aea002086764f02456378c9d +CTAGS_APK_SHA256_AARCH64=245239f8097a2877ad91d14e742670d25ecd5bac7d2b77fdb0139dfcce291d22 set -eux case "${TARGETARCH:-$(uname -m)}" in amd64 | x86_64) apk_name="uctags-${CTAGS_VERSION}-linux-x86_64.release.apk" - apk_sha256=bde53a3092fd540e004bf7923322a21604592734aea002086764f02456378c9d + apk_sha256=$CTAGS_APK_SHA256_X86_64 ;; arm64 | aarch64) apk_name="uctags-${CTAGS_VERSION}-linux-aarch64.release.apk" - apk_sha256=245239f8097a2877ad91d14e742670d25ecd5bac7d2b77fdb0139dfcce291d22 + apk_sha256=$CTAGS_APK_SHA256_AARCH64 ;; *) echo "unsupported architecture: ${TARGETARCH:-$(uname -m)}" >&2; exit 1 ;; esac From 09240b11735dd8ddbfdd40152af4b1b576697b44 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 12:53:23 +0200 Subject: [PATCH 15/16] use older ctags --- install-ctags-alpine.sh | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/install-ctags-alpine.sh b/install-ctags-alpine.sh index ba68630c3..29e1c5142 100755 --- a/install-ctags-alpine.sh +++ b/install-ctags-alpine.sh @@ -1,40 +1,44 @@ #!/bin/sh -# Installs universal-ctags from prebuilt Alpine APKs (amd64/arm64). -# Zoekt looks up "universal-ctags" on PATH; the APK installs "ctags". +# Installs universal-ctags from prebuilt Linux tarballs (amd64/arm64). +# Zoekt looks up "universal-ctags" on PATH; the tarball installs "ctags". # # sha256 sums below are GitHub release asset digests. When bumping # CTAGS_VERSION or CTAGS_COMMIT, copy them from the release page/API: # https://github.com/universal-ctags/ctags-nightly-build/releases -CTAGS_VERSION=${CTAGS_VERSION:-2026.08.11} -CTAGS_COMMIT=${CTAGS_COMMIT:-8361949f6a2465fb1bbaf26a234278c3c3cbd3ac} -# GitHub release asset digests for uctags-${CTAGS_VERSION}-linux-*.release.apk -CTAGS_APK_SHA256_X86_64=bde53a3092fd540e004bf7923322a21604592734aea002086764f02456378c9d -CTAGS_APK_SHA256_AARCH64=245239f8097a2877ad91d14e742670d25ecd5bac7d2b77fdb0139dfcce291d22 +CTAGS_VERSION=${CTAGS_VERSION:-2024.01.07} +CTAGS_COMMIT=${CTAGS_COMMIT:-4053f69a35d8d3d307b274040f27c147eec79ee7} +# GitHub release asset digests for uctags-${CTAGS_VERSION}-linux-*.tar.xz +CTAGS_TAR_SHA256_X86_64=0c0bbc9f81d3f7151988b94e78c64914ab41ee4c5e10debfe79f73fee54a68a0 +CTAGS_TAR_SHA256_AARCH64=a50e25cb5b4ced8fea119984695e77464aaa73d5d4a53c10fec34dd82b1d9e5f set -eux +apk add --no-cache xz + case "${TARGETARCH:-$(uname -m)}" in amd64 | x86_64) - apk_name="uctags-${CTAGS_VERSION}-linux-x86_64.release.apk" - apk_sha256=$CTAGS_APK_SHA256_X86_64 + ctags_arch=x86_64 + tar_sha256=$CTAGS_TAR_SHA256_X86_64 ;; arm64 | aarch64) - apk_name="uctags-${CTAGS_VERSION}-linux-aarch64.release.apk" - apk_sha256=$CTAGS_APK_SHA256_AARCH64 + ctags_arch=aarch64 + tar_sha256=$CTAGS_TAR_SHA256_AARCH64 ;; *) echo "unsupported architecture: ${TARGETARCH:-$(uname -m)}" >&2; exit 1 ;; esac +archive_name="uctags-${CTAGS_VERSION}-linux-${ctags_arch}.tar.xz" +extract_dir="uctags-${CTAGS_VERSION}-linux-${ctags_arch}" base_url="https://github.com/universal-ctags/ctags-nightly-build/releases/download/${CTAGS_VERSION}%2B${CTAGS_COMMIT}" -apk_path="/tmp/${apk_name}" +archive_path="/tmp/${archive_name}" -wget -qO "$apk_path" "${base_url}/${apk_name}" -wget -qO /etc/apk/keys/uctags.rsa.pub "${base_url}/${apk_name}.rsa.pub" +wget -qO "$archive_path" "${base_url}/${archive_name}" -echo "$apk_sha256 $apk_path" | sha256sum -c - -apk add --no-cache "$apk_path" -rm "$apk_path" +echo "$tar_sha256 $archive_path" | sha256sum -c - +tar -xJf "$archive_path" -C /tmp +install -m 0755 "/tmp/${extract_dir}/bin/ctags" /usr/bin/ctags +rm -rf "$archive_path" "/tmp/${extract_dir}" ln -sf /usr/bin/ctags /usr/bin/universal-ctags From b0256edfe1aa23bd779209cd51c2d1a37fb8c8b9 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Thu, 13 Aug 2026 17:26:52 +0200 Subject: [PATCH 16/16] drop jansson, fix ctags version/commit --- .github/workflows/ci.yml | 3 +-- install-ctags-alpine.sh | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3375a2f3..b4eaeecf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,7 @@ jobs: # zstd for faster actions/cache # tar needed for actions/cache (busybox tar is incompatible) # git for a native checkout (also needed in tests) - # jansson is here until we move to prebuilt ctags binaries (TODO: remove) - run: apk add zstd git tar jansson + run: apk add zstd git tar - name: checkout uses: actions/checkout@v7 diff --git a/install-ctags-alpine.sh b/install-ctags-alpine.sh index 29e1c5142..d395cd116 100755 --- a/install-ctags-alpine.sh +++ b/install-ctags-alpine.sh @@ -3,12 +3,12 @@ # Installs universal-ctags from prebuilt Linux tarballs (amd64/arm64). # Zoekt looks up "universal-ctags" on PATH; the tarball installs "ctags". # -# sha256 sums below are GitHub release asset digests. When bumping -# CTAGS_VERSION or CTAGS_COMMIT, copy them from the release page/API: +# When bumping CTAGS_VERSION, update CTAGS_COMMIT and the sha256 sums below +# together from the release page/API: # https://github.com/universal-ctags/ctags-nightly-build/releases -CTAGS_VERSION=${CTAGS_VERSION:-2024.01.07} -CTAGS_COMMIT=${CTAGS_COMMIT:-4053f69a35d8d3d307b274040f27c147eec79ee7} +CTAGS_VERSION=2024.01.07 +CTAGS_COMMIT=4053f69a35d8d3d307b274040f27c147eec79ee7 # GitHub release asset digests for uctags-${CTAGS_VERSION}-linux-*.tar.xz CTAGS_TAR_SHA256_X86_64=0c0bbc9f81d3f7151988b94e78c64914ab41ee4c5e10debfe79f73fee54a68a0 CTAGS_TAR_SHA256_AARCH64=a50e25cb5b4ced8fea119984695e77464aaa73d5d4a53c10fec34dd82b1d9e5f