Add go-cache-plugin vendored package (#174)
ci/woodpecker/push/deploy-fedora43 Pipeline was successful
ci/woodpecker/push/deploy-fedora42 Pipeline was successful
ci/woodpecker/push/deploy-fedora44 Pipeline was successful
ci/woodpecker/push/deploy-almalinux9 Pipeline was successful
ci/woodpecker/push/deploy-almalinux8 Pipeline was successful

go-cache-plugin is a GOCACHEPROG implementation that backs the Go build cache with S3, wanted via dnf on workstations and estate hosts. Upstream publishes no tags or releases, so the build pins a commit and the version is that commit's date.

- Add `rpms/go-cache-plugin` metadata, build.sh and nfpm.yaml
- Compile `cmd/go-cache-plugin` at commit 3031b5d with `GOTOOLCHAIN=go1.26.1`
- Ship the single binary at `/usr/bin/go-cache-plugin`
- Build for almalinux/el9 and fedora 42/43/44

Reviewed-on: #174
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #174.
This commit is contained in:
2026-09-26 21:13:56 +10:00
committed by BenVincent
parent 327a7c367a
commit 1c316e875a
3 changed files with 70 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
name: go-cache-plugin
github: tailscale/go-cache-plugin
description: A GOCACHEPROG implementation that backs the Go build cache with S3.
arch: amd64
platform: linux
maintainer: Tailscale
homepage: https://github.com/tailscale/go-cache-plugin
license: BSD-3-Clause
dist_tag: true
builds:
- repository:
- almalinux/el9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
release: 1
version: 2026.7.22
- repository:
- fedora/42
- fedora/43
- fedora/44
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
release: 1
version: 2026.7.22
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/bash
set -e
# Upstream publishes no tags or releases; PACKAGE_VERSION dates this commit.
COMMIT=3031b5d01c50d2748a32c7c9386ea7049883f38e
# go.mod requires go 1.26.1
export GOTOOLCHAIN=go1.26.1
# Compile the go-cache-plugin binary using Go
GOBIN=/app go install github.com/tailscale/go-cache-plugin/cmd/go-cache-plugin@${COMMIT}
# Process nfpm.yaml with envsubst
envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml
# Build the RPM
nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
+31
View File
@@ -0,0 +1,31 @@
# nfpm.yaml
name: ${PACKAGE_NAME}
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: ${PACKAGE_ARCH}
platform: ${PACKAGE_PLATFORM}
section: default
priority: extra
description: "${PACKAGE_DESCRIPTION}"
maintainer: ${PACKAGE_MAINTAINER}
homepage: ${PACKAGE_HOMEPAGE}
license: ${PACKAGE_LICENSE}
disable_globbing: false
replaces:
- go-cache-plugin
provides:
- go-cache-plugin
# Files to include in the package
contents:
- src: /app/go-cache-plugin
dst: /usr/bin/go-cache-plugin
file_info:
mode: 0755
owner: root
group: root