From 96d0e25e94b61ed6c973ca91294defd8867398e6 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 16 May 2026 23:36:13 +1000 Subject: [PATCH 1/8] feat: update pipelines (#160) - remove buildah (now in image) - add fedora42/fedora43/fedora44 pipelines Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/160 --- .woodpecker/build-almalinux8.yaml | 1 - .woodpecker/build-almalinux9.yaml | 1 - .woodpecker/build-fedora42.yaml | 26 ++++++++++++ .woodpecker/build-fedora43.yaml | 26 ++++++++++++ .woodpecker/build-fedora44.yaml | 26 ++++++++++++ .woodpecker/deploy-almalinux8.yaml | 1 - .woodpecker/deploy-almalinux9.yaml | 1 - .woodpecker/deploy-fedora42.yaml | 50 ++++++++++++++++++++++++ .woodpecker/deploy-fedora43.yaml | 50 ++++++++++++++++++++++++ .woodpecker/deploy-fedora44.yaml | 50 ++++++++++++++++++++++++ rpms/consul/metadata.yaml | 7 ++++ rpms/nfpm/metadata.yaml | 7 ++++ rpms/tea/metadata.yaml | 7 ++++ rpms/unkin-ca-certificates/metadata.yaml | 13 +++++- rpms/uv/metadata.yaml | 11 +++++- rpms/vault/metadata.yaml | 7 ++++ rpms/xh/metadata.yaml | 13 +++++- rpms/yq/metadata.yaml | 7 ++++ 18 files changed, 294 insertions(+), 10 deletions(-) create mode 100644 .woodpecker/build-fedora42.yaml create mode 100644 .woodpecker/build-fedora43.yaml create mode 100644 .woodpecker/build-fedora44.yaml create mode 100644 .woodpecker/deploy-fedora42.yaml create mode 100644 .woodpecker/deploy-fedora43.yaml create mode 100644 .woodpecker/deploy-fedora44.yaml diff --git a/.woodpecker/build-almalinux8.yaml b/.woodpecker/build-almalinux8.yaml index c659503..0ae34c7 100644 --- a/.woodpecker/build-almalinux8.yaml +++ b/.woodpecker/build-almalinux8.yaml @@ -7,7 +7,6 @@ steps: commands: - mkdir -p /woodpecker/rpms - ln -s /woodpecker/rpms /workspace - - dnf install buildah -y - ./tools/build build-all --distro almalinux/el8 --buildah privileged: true backend_options: diff --git a/.woodpecker/build-almalinux9.yaml b/.woodpecker/build-almalinux9.yaml index feda181..957dd9f 100644 --- a/.woodpecker/build-almalinux9.yaml +++ b/.woodpecker/build-almalinux9.yaml @@ -7,7 +7,6 @@ steps: commands: - mkdir -p /woodpecker/rpms - ln -s /woodpecker/rpms /workspace - - dnf install buildah -y - ./tools/build build-all --distro almalinux/el9 --buildah privileged: true backend_options: diff --git a/.woodpecker/build-fedora42.yaml b/.woodpecker/build-fedora42.yaml new file mode 100644 index 0000000..da40626 --- /dev/null +++ b/.woodpecker/build-fedora42.yaml @@ -0,0 +1,26 @@ +when: + - event: pull_request + +steps: + - name: build rpms + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + commands: + - mkdir -p /woodpecker/rpms + - ln -s /woodpecker/rpms /workspace + - ./tools/build build-all --distro fedora/42 --buildah + privileged: true + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + + - name: show rpms + image: git.unkin.net/unkin/fedora42-base:latest + commands: + - find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm" diff --git a/.woodpecker/build-fedora43.yaml b/.woodpecker/build-fedora43.yaml new file mode 100644 index 0000000..aee2e70 --- /dev/null +++ b/.woodpecker/build-fedora43.yaml @@ -0,0 +1,26 @@ +when: + - event: pull_request + +steps: + - name: build rpms + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + commands: + - mkdir -p /woodpecker/rpms + - ln -s /woodpecker/rpms /workspace + - ./tools/build build-all --distro fedora/43 --buildah + privileged: true + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + + - name: show rpms + image: git.unkin.net/unkin/fedora43-base:latest + commands: + - find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm" diff --git a/.woodpecker/build-fedora44.yaml b/.woodpecker/build-fedora44.yaml new file mode 100644 index 0000000..063ad13 --- /dev/null +++ b/.woodpecker/build-fedora44.yaml @@ -0,0 +1,26 @@ +when: + - event: pull_request + +steps: + - name: build rpms + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + commands: + - mkdir -p /woodpecker/rpms + - ln -s /woodpecker/rpms /workspace + - ./tools/build build-all --distro fedora/44 --buildah + privileged: true + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + + - name: show rpms + image: git.unkin.net/unkin/fedora44-base:latest + commands: + - find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm" diff --git a/.woodpecker/deploy-almalinux8.yaml b/.woodpecker/deploy-almalinux8.yaml index ca9bf26..26de4fe 100644 --- a/.woodpecker/deploy-almalinux8.yaml +++ b/.woodpecker/deploy-almalinux8.yaml @@ -8,7 +8,6 @@ steps: commands: - mkdir -p /woodpecker/rpms - ln -s /woodpecker/rpms /workspace - - dnf install buildah -y - ./tools/build build-all --distro almalinux/el8 --buildah privileged: true backend_options: diff --git a/.woodpecker/deploy-almalinux9.yaml b/.woodpecker/deploy-almalinux9.yaml index a11c57a..9b4d89a 100644 --- a/.woodpecker/deploy-almalinux9.yaml +++ b/.woodpecker/deploy-almalinux9.yaml @@ -8,7 +8,6 @@ steps: commands: - mkdir -p /woodpecker/rpms - ln -s /woodpecker/rpms /workspace - - dnf install buildah -y - ./tools/build build-all --distro almalinux/el9 --buildah privileged: true backend_options: diff --git a/.woodpecker/deploy-fedora42.yaml b/.woodpecker/deploy-fedora42.yaml new file mode 100644 index 0000000..6726501 --- /dev/null +++ b/.woodpecker/deploy-fedora42.yaml @@ -0,0 +1,50 @@ +when: + - event: push + branch: master + +steps: + - name: build-rpms + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + commands: + - mkdir -p /woodpecker/rpms + - ln -s /woodpecker/rpms /workspace + - ./tools/build build-all --distro fedora/42 --buildah + privileged: true + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + + - name: show-rpms + image: git.unkin.net/unkin/fedora42-rpmbuilder:latest + commands: + - find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm" + depends_on: [build-rpms] + + - name: deploy-rpms + image: git.unkin.net/unkin/fedora42-rpmbuilder:latest + commands: + - | + for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do + curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/fedora/42/upload + done + environment: + DRONECI_PASSWORD: + from_secret: DRONECI_PASSWORD + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 128Mi + cpu: 100m + limits: + memory: 512Mi + cpu: 500m + depends_on: [build-rpms, show-rpms] diff --git a/.woodpecker/deploy-fedora43.yaml b/.woodpecker/deploy-fedora43.yaml new file mode 100644 index 0000000..be50719 --- /dev/null +++ b/.woodpecker/deploy-fedora43.yaml @@ -0,0 +1,50 @@ +when: + - event: push + branch: master + +steps: + - name: build-rpms + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + commands: + - mkdir -p /woodpecker/rpms + - ln -s /woodpecker/rpms /workspace + - ./tools/build build-all --distro fedora/43 --buildah + privileged: true + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + + - name: show-rpms + image: git.unkin.net/unkin/fedora43-rpmbuilder:latest + commands: + - find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm" + depends_on: [build-rpms] + + - name: deploy-rpms + image: git.unkin.net/unkin/fedora43-rpmbuilder:latest + commands: + - | + for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do + curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/fedora/43/upload + done + environment: + DRONECI_PASSWORD: + from_secret: DRONECI_PASSWORD + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 128Mi + cpu: 100m + limits: + memory: 512Mi + cpu: 500m + depends_on: [build-rpms, show-rpms] diff --git a/.woodpecker/deploy-fedora44.yaml b/.woodpecker/deploy-fedora44.yaml new file mode 100644 index 0000000..42d4c45 --- /dev/null +++ b/.woodpecker/deploy-fedora44.yaml @@ -0,0 +1,50 @@ +when: + - event: push + branch: master + +steps: + - name: build-rpms + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + commands: + - mkdir -p /woodpecker/rpms + - ln -s /woodpecker/rpms /workspace + - ./tools/build build-all --distro fedora/44 --buildah + privileged: true + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + + - name: show-rpms + image: git.unkin.net/unkin/fedora44-rpmbuilder:latest + commands: + - find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm" + depends_on: [build-rpms] + + - name: deploy-rpms + image: git.unkin.net/unkin/fedora44-rpmbuilder:latest + commands: + - | + for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do + curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/fedora/44/upload + done + environment: + DRONECI_PASSWORD: + from_secret: DRONECI_PASSWORD + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 128Mi + cpu: 100m + limits: + memory: 512Mi + cpu: 500m + depends_on: [build-rpms, show-rpms] diff --git a/rpms/consul/metadata.yaml b/rpms/consul/metadata.yaml index 9b4bb1d..562fe5c 100644 --- a/rpms/consul/metadata.yaml +++ b/rpms/consul/metadata.yaml @@ -18,3 +18,10 @@ builds: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 version: 1.22.7 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 1.22.7 diff --git a/rpms/nfpm/metadata.yaml b/rpms/nfpm/metadata.yaml index 32fb2d5..9691ec6 100644 --- a/rpms/nfpm/metadata.yaml +++ b/rpms/nfpm/metadata.yaml @@ -18,3 +18,10 @@ builds: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 version: 2.46.3 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 2.46.3 diff --git a/rpms/tea/metadata.yaml b/rpms/tea/metadata.yaml index bbc466d..fe67c86 100644 --- a/rpms/tea/metadata.yaml +++ b/rpms/tea/metadata.yaml @@ -18,3 +18,10 @@ builds: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 version: 0.14.0 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 0.14.0 diff --git a/rpms/unkin-ca-certificates/metadata.yaml b/rpms/unkin-ca-certificates/metadata.yaml index 9bfaf6c..f933a7b 100644 --- a/rpms/unkin-ca-certificates/metadata.yaml +++ b/rpms/unkin-ca-certificates/metadata.yaml @@ -3,11 +3,20 @@ arch: amd64 builds: - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: '1' - repository: [almalinux/el8] + repository: + - almalinux/el8 version: 2025.07.13 - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: '1' - repository: [almalinux/el9] + repository: + - almalinux/el9 + version: 2025.07.13 + - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - fedora/42 + - fedora/43 + - fedora/44 version: 2025.07.13 description: ca-certificates for the unkin site github: unknown/unkin-ca-certificates diff --git a/rpms/uv/metadata.yaml b/rpms/uv/metadata.yaml index d5f6b62..ce74d57 100644 --- a/rpms/uv/metadata.yaml +++ b/rpms/uv/metadata.yaml @@ -11,9 +11,16 @@ builds: - almalinux/el8 image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: 1 - version: 0.11.8 + version: 0.11.14 - repository: - almalinux/el9 image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 - version: 0.11.8 + version: 0.11.14 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 0.11.14 diff --git a/rpms/vault/metadata.yaml b/rpms/vault/metadata.yaml index ded16e2..91598f3 100644 --- a/rpms/vault/metadata.yaml +++ b/rpms/vault/metadata.yaml @@ -20,3 +20,10 @@ builds: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 version: 2.0.0 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 2.0.0 diff --git a/rpms/xh/metadata.yaml b/rpms/xh/metadata.yaml index 672f86e..34e3696 100644 --- a/rpms/xh/metadata.yaml +++ b/rpms/xh/metadata.yaml @@ -3,11 +3,20 @@ arch: amd64 builds: - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: '1' - repository: [almalinux/el8] + repository: + - almalinux/el8 version: 0.25.3 - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: '1' - repository: [almalinux/el9] + repository: + - almalinux/el9 + version: 0.25.3 + - repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 version: 0.25.3 description: A friendly and fast tool for sending HTTP requests (HTTPie reimplementation in Rust) github: ducaale/xh diff --git a/rpms/yq/metadata.yaml b/rpms/yq/metadata.yaml index 7bcccec..7d4bf6a 100644 --- a/rpms/yq/metadata.yaml +++ b/rpms/yq/metadata.yaml @@ -18,3 +18,10 @@ builds: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 version: 4.53.2 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 4.53.2 From aeea587aebc7228a0ce6c20e68d59e024d4e5eba Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 17 May 2026 12:29:10 +1000 Subject: [PATCH 2/8] fix: move unkin-undionly-kpxe preinstall.sh to scripts/ subdirectory (#166) nfpm.yaml referenced /app/resources/scripts/preinstall.sh but the file was at resources/preinstall.sh, causing the build to fail. Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/166 --- rpms/unkin-undionly-kpxe/resources/{ => scripts}/preinstall.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename rpms/unkin-undionly-kpxe/resources/{ => scripts}/preinstall.sh (100%) diff --git a/rpms/unkin-undionly-kpxe/resources/preinstall.sh b/rpms/unkin-undionly-kpxe/resources/scripts/preinstall.sh similarity index 100% rename from rpms/unkin-undionly-kpxe/resources/preinstall.sh rename to rpms/unkin-undionly-kpxe/resources/scripts/preinstall.sh From 539a63e0a1bb7657b9b4a738541e28858d4d4c8e Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 17 May 2026 12:34:33 +1000 Subject: [PATCH 3/8] feat/metadata-schema-validation (#165) Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/165 --- .pre-commit-config.yaml | 18 ++++++ Makefile | 6 +- pyproject.toml | 11 ++++ rpms/claude-code/metadata.yaml | 31 +++++---- schema/metadata.json | 111 +++++++++++++++++++++++++++++++++ tests/__init__.py | 0 tests/conftest.py | 2 + tests/test_metadata.py | 36 +++++++++++ 8 files changed, 198 insertions(+), 17 deletions(-) create mode 100644 pyproject.toml create mode 100644 schema/metadata.json create mode 100644 tests/__init__.py create mode 100644 tests/conftest.py create mode 100644 tests/test_metadata.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f6f76cf..d2b46e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,6 +31,24 @@ repos: "-s", ] + - repo: local + hooks: + - id: pytest + name: Run unit tests + entry: make test + language: system + types: [python] + pass_filenames: false + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.37.2 + hooks: + - id: check-jsonschema + name: Validate RPM package metadata + files: ^rpms/[^/]+/metadata\.yaml$ + args: [--schemafile, schema/metadata.json] + language_version: python3.11 + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.14.7 hooks: diff --git a/Makefile b/Makefile index 70ee592..bc97295 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ DISTRO ?= almalinux/el9 PACKAGES := $(shell find $(ROOT_DIR)/rpms -mindepth 1 -maxdepth 1 -type d -exec test -f {}/metadata.yaml \; -print | xargs -n1 basename | sort) # Default target to build all packages -.PHONY: all list build clean +.PHONY: all list build clean test all: build-all # List all available packages @@ -47,6 +47,10 @@ dry-run: @echo "Dry run - showing what would be built for distro $(DISTRO):" $(BUILD_TOOL) build-all --distro $(DISTRO) --dry-run +# Run unit tests +test: + @uv run --group dev pytest tests/ -q; rc=$$?; [ $$rc -eq 5 ] && exit 0 || exit $$rc + # Clean target clean: @echo "Cleaning build artifacts..." diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c8cc4f9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[project] +name = "rpmbuilder" +version = "0.1.0" +requires-python = ">=3.11" + +[dependency-groups] +dev = [ + "pytest>=8", + "jsonschema>=4", + "pyyaml>=6", +] diff --git a/rpms/claude-code/metadata.yaml b/rpms/claude-code/metadata.yaml index 01a8210..a099e9f 100644 --- a/rpms/claude-code/metadata.yaml +++ b/rpms/claude-code/metadata.yaml @@ -1,19 +1,18 @@ -arch: amd64 -builds: -- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: 1 - repository: - - almalinux/el8 - version: 2.1.126 -- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: 1 - repository: - - almalinux/el9 - version: 2.1.126 -claude_ai: true +name: claude-code description: Claude Code - Anthropic's agentic AI coding tool +arch: amd64 +platform: linux +maintainer: Anthropic homepage: https://claude.ai/code license: Proprietary -maintainer: Anthropic -name: claude-code -platform: linux +builds: +- repository: + - almalinux/el8 + image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: 1 + version: 2.1.126 +- repository: + - almalinux/el9 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 2.1.126 diff --git a/schema/metadata.json b/schema/metadata.json new file mode 100644 index 0000000..61ed7d3 --- /dev/null +++ b/schema/metadata.json @@ -0,0 +1,111 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "description": "Schema for rpms/*/metadata.yaml files", + "properties": { + "arch": { + "enum": [ + "amd64", + "arm64", + "x86_64" + ], + "type": "string" + }, + "builds": { + "items": { + "additionalProperties": false, + "properties": { + "image": { + "minLength": 1, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_.:/@]+$", + "type": "string" + }, + "release": { + "oneOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "number" + } + ] + }, + "repository": { + "items": { + "enum": [ + "almalinux/el8", + "almalinux/el9", + "fedora/42", + "fedora/43", + "fedora/44" + ], + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "version": { + "minLength": 1, + "pattern": "^[0-9]+(\\.[0-9]+)*(-[a-zA-Z0-9]+)*$", + "type": "string" + } + }, + "required": [ + "repository", + "image", + "release", + "version" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "description": { + "minLength": 1, + "type": "string" + }, + "dist_tag": { + "type": "boolean" + }, + "github": { + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_]+/[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "github_release_pattern": { + "minLength": 1, + "type": "string" + }, + "homepage": { + "minLength": 1, + "pattern": "^https?://.+", + "type": "string" + }, + "license": { + "minLength": 1, + "type": "string" + }, + "maintainer": { + "minLength": 1, + "type": "string" + }, + "name": { + "minLength": 1, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_.]*$", + "type": "string" + }, + "platform": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name", + "description", + "builds" + ], + "title": "RPM Package Metadata", + "type": "object" +} diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..fe2d9d4 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,2 @@ +# Tests for tools/build and tools/update-gh. +# See https://git.unkin.net/unkin/rpmbuilder/issues/162 diff --git a/tests/test_metadata.py b/tests/test_metadata.py new file mode 100644 index 0000000..533b0eb --- /dev/null +++ b/tests/test_metadata.py @@ -0,0 +1,36 @@ +"""Validate every rpms/*/metadata.yaml against schema/metadata.json.""" + +import json +from pathlib import Path + +import jsonschema +import pytest +import yaml + +REPO_ROOT = Path(__file__).parent.parent +SCHEMA_FILE = REPO_ROOT / "schema" / "metadata.json" +RPMS_DIR = REPO_ROOT / "rpms" + + +@pytest.fixture(scope="session") +def schema(): + with open(SCHEMA_FILE) as f: + return json.load(f) + + +def metadata_files(): + return sorted(RPMS_DIR.glob("*/metadata.yaml")) + + +@pytest.mark.parametrize("metadata_file", metadata_files(), ids=lambda p: p.parent.name) +def test_metadata_valid(metadata_file, schema): + with open(metadata_file) as f: + data = yaml.safe_load(f) + + validator = jsonschema.Draft7Validator(schema) + errors = sorted(validator.iter_errors(data), key=str) + + assert not errors, "\n".join( + f" {'.'.join(str(p) for p in e.absolute_path) or '(root)'}: {e.message}" + for e in errors + ) From 8a3a585f8ce6817ee6efe3ca37ba82d83025a172 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 17 May 2026 23:43:35 +1000 Subject: [PATCH 4/8] fix/distro-aware-package-check (#164) Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/164 --- rpms/act_runner/metadata.yaml | 32 ++--- rpms/bind_exporter/metadata.yaml | 32 ++--- rpms/boilerplate/metadata.yaml | 1 + rpms/claude-code/metadata.yaml | 13 +- rpms/cni-plugins/metadata.yaml | 1 + rpms/code-server/metadata.yaml | 2 +- rpms/consul-cni/metadata.yaml | 33 ++--- rpms/consul/metadata.yaml | 1 + rpms/etcd/metadata.yaml | 1 + rpms/exportarr/metadata.yaml | 1 + rpms/frr_exporter/metadata.yaml | 1 + rpms/g10k/metadata.yaml | 32 ++--- rpms/git-delta/metadata.yaml | 2 +- rpms/hadolint/metadata.yaml | 5 +- rpms/helm/metadata.yaml | 1 + rpms/helmfile/metadata.yaml | 1 + rpms/incus/metadata.yaml | 1 + rpms/jellyfin-ffmpeg-bin/metadata.yaml | 1 + rpms/jellyfin-server/metadata.yaml | 26 ++-- rpms/jellyfin-web/metadata.yaml | 26 ++-- rpms/jsonnet-language-server/metadata.yaml | 17 +-- rpms/jsonnet-lint/metadata.yaml | 15 +-- rpms/jsonnet/metadata.yaml | 15 +-- rpms/kubecolor/metadata.yaml | 2 +- rpms/kubeconform/metadata.yaml | 1 + rpms/kubectx/metadata.yaml | 2 +- rpms/kustomize/metadata.yaml | 20 ++-- rpms/lazydocker/metadata.yaml | 2 +- rpms/libfoundationdb/metadata.yaml | 32 ++--- rpms/neovim-glibc-2.17/metadata.yaml | 5 +- rpms/neovim/metadata.yaml | 2 +- rpms/nfpm/metadata.yaml | 1 + rpms/node_exporter/metadata.yaml | 1 + rpms/nomad-autoscaler/metadata.yaml | 1 + rpms/nomad/metadata.yaml | 33 ++--- rpms/nzbget/metadata.yaml | 1 + rpms/nzbget_exporter/metadata.yaml | 32 ++--- .../metadata.yaml | 3 +- .../openbao-plugin-secret-nomad/metadata.yaml | 3 +- rpms/openbao-plugins/metadata.yaml | 1 + rpms/packer/metadata.yaml | 1 + rpms/pgbouncer_exporter/metadata.yaml | 15 +-- rpms/postgres_exporter/metadata.yaml | 1 + rpms/puppet-initial/metadata.yaml | 32 ++--- rpms/puppetdb_exporter/metadata.yaml | 32 ++--- rpms/ruff/metadata.yaml | 1 + rpms/sops/metadata.yaml | 2 +- rpms/stalwart-cli/metadata.yaml | 1 + rpms/stalwart-foundationdb/metadata.yaml | 1 + rpms/stalwart/metadata.yaml | 1 + rpms/starship/metadata.yaml | 1 + rpms/stern/metadata.yaml | 2 +- rpms/tea/metadata.yaml | 2 +- rpms/terraform/metadata.yaml | 1 + rpms/terragrunt/metadata.yaml | 1 + rpms/tflint/metadata.yaml | 1 + rpms/unkin-ca-certificates/metadata.yaml | 48 ++++---- rpms/unkin-undionly-kpxe/metadata.yaml | 32 ++--- rpms/unrar/metadata.yaml | 34 +++--- rpms/uv/metadata.yaml | 1 + rpms/vals/metadata.yaml | 1 + rpms/vault/metadata.yaml | 1 + rpms/victoria-logs/metadata.yaml | 1 + rpms/vlutils/metadata.yaml | 1 + rpms/vmagent/metadata.yaml | 1 + rpms/vmalert/metadata.yaml | 1 + rpms/vminsert/metadata.yaml | 1 + rpms/vmselect/metadata.yaml | 1 + rpms/vmstorage/metadata.yaml | 1 + rpms/vmutils/metadata.yaml | 1 + rpms/xh/metadata.yaml | 49 ++++---- rpms/yq/metadata.yaml | 5 +- tools/build | 113 ++++++++++++++---- 73 files changed, 471 insertions(+), 318 deletions(-) diff --git a/rpms/act_runner/metadata.yaml b/rpms/act_runner/metadata.yaml index d44390e..b7568f7 100644 --- a/rpms/act_runner/metadata.yaml +++ b/rpms/act_runner/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 0.2.12 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 0.2.12 -description: A runner for Gitea based on act. +name: act_runner github: unknown/act_runner +description: A runner for Gitea based on act. +arch: amd64 +platform: linux +maintainer: Gitea homepage: https://gitea.com/gitea/act_runner license: MIT -maintainer: Gitea -name: act_runner -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 0.2.12 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 0.2.12 diff --git a/rpms/bind_exporter/metadata.yaml b/rpms/bind_exporter/metadata.yaml index c9c3dff..68e1657 100644 --- a/rpms/bind_exporter/metadata.yaml +++ b/rpms/bind_exporter/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 0.8.0 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 0.8.0 -description: Prometheus exporter for BIND +name: bind_exporter github: prometheus-community/bind_exporter +description: Prometheus exporter for BIND +arch: amd64 +platform: linux +maintainer: Prometheus homepage: https://github.com/prometheus-community/bind_exporter license: Apache-2.0 license -maintainer: Prometheus -name: bind_exporter -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 0.8.0 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 0.8.0 diff --git a/rpms/boilerplate/metadata.yaml b/rpms/boilerplate/metadata.yaml index e9d584d..495b7f6 100644 --- a/rpms/boilerplate/metadata.yaml +++ b/rpms/boilerplate/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: Gruntwork homepage: https://github.com/gruntwork-io/boilerplate license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/claude-code/metadata.yaml b/rpms/claude-code/metadata.yaml index a099e9f..6928b30 100644 --- a/rpms/claude-code/metadata.yaml +++ b/rpms/claude-code/metadata.yaml @@ -5,14 +5,15 @@ platform: linux maintainer: Anthropic homepage: https://claude.ai/code license: Proprietary +dist_tag: true builds: -- repository: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: 1 + repository: - almalinux/el8 - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: 1 version: 2.1.126 -- repository: +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + repository: - almalinux/el9 - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: 1 version: 2.1.126 diff --git a/rpms/cni-plugins/metadata.yaml b/rpms/cni-plugins/metadata.yaml index 44183d2..fbc598e 100644 --- a/rpms/cni-plugins/metadata.yaml +++ b/rpms/cni-plugins/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: ContainerNetworking homepage: https://github.com/containernetworking/plugins license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/code-server/metadata.yaml b/rpms/code-server/metadata.yaml index 1d50f81..8c1fe86 100644 --- a/rpms/code-server/metadata.yaml +++ b/rpms/code-server/metadata.yaml @@ -1,4 +1,3 @@ ---- name: code-server github: coder/code-server description: VS Code in the browser. @@ -7,6 +6,7 @@ platform: linux maintainer: Coder homepage: https://github.com/coder/code-server license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/consul-cni/metadata.yaml b/rpms/consul-cni/metadata.yaml index c251a58..e837954 100644 --- a/rpms/consul-cni/metadata.yaml +++ b/rpms/consul-cni/metadata.yaml @@ -1,18 +1,21 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 1.7.1 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 1.7.1 -description: Plugin for Consul on Kubernetes to allow configuring traffic redirection rules without escalated container privileges. +name: consul-cni github: unknown/consul-cni +description: Plugin for Consul on Kubernetes to allow configuring traffic redirection + rules without escalated container privileges. +arch: amd64 +platform: linux +maintainer: Hashicorp homepage: https://hashicorp.com license: Mozilla Public License, version 2.0 -maintainer: Hashicorp -name: consul-cni -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 1.7.1 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 1.7.1 diff --git a/rpms/consul/metadata.yaml b/rpms/consul/metadata.yaml index 562fe5c..ff40ddb 100644 --- a/rpms/consul/metadata.yaml +++ b/rpms/consul/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: HashiCorp homepage: https://github.com/hashicorp/consul license: BUSL-1.1 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/etcd/metadata.yaml b/rpms/etcd/metadata.yaml index f97ffa5..27a42c5 100644 --- a/rpms/etcd/metadata.yaml +++ b/rpms/etcd/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: https://etcd.io/ homepage: https://etcd.io/ license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/exportarr/metadata.yaml b/rpms/exportarr/metadata.yaml index aea8e29..8e05e9b 100644 --- a/rpms/exportarr/metadata.yaml +++ b/rpms/exportarr/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: onedr0p homepage: https://github.com/onedr0p/exportarr license: MIT license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/frr_exporter/metadata.yaml b/rpms/frr_exporter/metadata.yaml index 2af5702..b0da178 100644 --- a/rpms/frr_exporter/metadata.yaml +++ b/rpms/frr_exporter/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Prometheus homepage: https://github.com/tynany/frr_exporter license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/g10k/metadata.yaml b/rpms/g10k/metadata.yaml index 99a42e8..1fb9dbe 100644 --- a/rpms/g10k/metadata.yaml +++ b/rpms/g10k/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 0.9.10 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 0.9.10 -description: An r10k fork written in Go, designed to work somwhat similar like puppetlabs/r10k. +name: g10k github: xorpaul/g10k +description: An r10k fork written in Go, designed to work somwhat similar like puppetlabs/r10k. +arch: amd64 +platform: linux +maintainer: xorpaul homepage: https://github.com/xorpaul/g10k license: Apache2.0 -maintainer: xorpaul -name: g10k -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 0.9.10 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 0.9.10 diff --git a/rpms/git-delta/metadata.yaml b/rpms/git-delta/metadata.yaml index 88eb270..898cb28 100644 --- a/rpms/git-delta/metadata.yaml +++ b/rpms/git-delta/metadata.yaml @@ -1,4 +1,3 @@ ---- name: git-delta github: dandavison/delta description: A syntax-highlighting pager for git, diff, grep, and blame output. @@ -7,6 +6,7 @@ platform: linux maintainer: dandavison homepage: https://github.com/dandavison/delta license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/hadolint/metadata.yaml b/rpms/hadolint/metadata.yaml index 3a7a666..04acb5d 100644 --- a/rpms/hadolint/metadata.yaml +++ b/rpms/hadolint/metadata.yaml @@ -1,12 +1,13 @@ ---- name: hadolint github: hadolint/hadolint -description: A smarter Dockerfile linter that helps you build best practice Docker images. +description: A smarter Dockerfile linter that helps you build best practice Docker + images. arch: amd64 platform: linux maintainer: hadolint homepage: https://github.com/hadolint/hadolint license: GPL-3.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/helm/metadata.yaml b/rpms/helm/metadata.yaml index 79600bb..abe5a2e 100644 --- a/rpms/helm/metadata.yaml +++ b/rpms/helm/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Helm Contributors homepage: https://github.com/helm/helm license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/helmfile/metadata.yaml b/rpms/helmfile/metadata.yaml index 9089dc1..81cbbc4 100644 --- a/rpms/helmfile/metadata.yaml +++ b/rpms/helmfile/metadata.yaml @@ -8,6 +8,7 @@ platform: linux maintainer: Helmfile Contributors homepage: https://github.com/helmfile/helmfile license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/incus/metadata.yaml b/rpms/incus/metadata.yaml index aed18cd..03e7fa6 100644 --- a/rpms/incus/metadata.yaml +++ b/rpms/incus/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: unkin homepage: https://linuxcontainers.org/incus/ license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el9 diff --git a/rpms/jellyfin-ffmpeg-bin/metadata.yaml b/rpms/jellyfin-ffmpeg-bin/metadata.yaml index f9fbd96..ebb06f6 100644 --- a/rpms/jellyfin-ffmpeg-bin/metadata.yaml +++ b/rpms/jellyfin-ffmpeg-bin/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: unkin homepage: https://github.com/jellyfin/jellyfin-ffmpeg license: GPL-3.0 +dist_tag: false builds: - repository: - almalinux/el8 diff --git a/rpms/jellyfin-server/metadata.yaml b/rpms/jellyfin-server/metadata.yaml index 873bc52..6ed6891 100644 --- a/rpms/jellyfin-server/metadata.yaml +++ b/rpms/jellyfin-server/metadata.yaml @@ -1,13 +1,15 @@ ---- -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 10.10.7 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 10.10.7 -description: jellyfin-server package -github: unknown/jellyfin-server name: jellyfin-server +github: unknown/jellyfin-server +description: jellyfin-server package +dist_tag: false +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 10.10.7 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 10.10.7 diff --git a/rpms/jellyfin-web/metadata.yaml b/rpms/jellyfin-web/metadata.yaml index ed0743c..8139262 100644 --- a/rpms/jellyfin-web/metadata.yaml +++ b/rpms/jellyfin-web/metadata.yaml @@ -1,13 +1,15 @@ ---- -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 10.10.7 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 10.10.7 -description: jellyfin-web package -github: unknown/jellyfin-web name: jellyfin-web +github: unknown/jellyfin-web +description: jellyfin-web package +dist_tag: false +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 10.10.7 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 10.10.7 diff --git a/rpms/jsonnet-language-server/metadata.yaml b/rpms/jsonnet-language-server/metadata.yaml index 2b2f8e6..eba955f 100644 --- a/rpms/jsonnet-language-server/metadata.yaml +++ b/rpms/jsonnet-language-server/metadata.yaml @@ -1,4 +1,13 @@ +name: jsonnet-language-server +github: grafana/jsonnet-language-server +description: Jsonnet Language Server Protocol implementation for the Jsonnet templating + language. arch: amd64 +platform: linux +maintainer: Grafana Labs +homepage: https://github.com/grafana/jsonnet-language-server +license: Apache-2.0 +dist_tag: true builds: - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: 1 @@ -10,11 +19,3 @@ builds: repository: - almalinux/el9 version: 0.17.0 -description: Jsonnet Language Server Protocol implementation for the Jsonnet templating - language. -github: grafana/jsonnet-language-server -homepage: https://github.com/grafana/jsonnet-language-server -license: Apache-2.0 -maintainer: Grafana Labs -name: jsonnet-language-server -platform: linux diff --git a/rpms/jsonnet-lint/metadata.yaml b/rpms/jsonnet-lint/metadata.yaml index fba254c..7310c25 100644 --- a/rpms/jsonnet-lint/metadata.yaml +++ b/rpms/jsonnet-lint/metadata.yaml @@ -1,4 +1,12 @@ +name: jsonnet-lint +github: google/go-jsonnet +description: Linter for Jsonnet arch: amd64 +platform: linux +maintainer: Google +homepage: https://github.com/google/go-jsonnet +license: Apache-2.0 +dist_tag: true builds: - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: 1 @@ -10,10 +18,3 @@ builds: repository: - almalinux/el9 version: 0.22.0 -description: Linter for Jsonnet -github: google/go-jsonnet -homepage: https://github.com/google/go-jsonnet -license: Apache-2.0 -maintainer: Google -name: jsonnet-lint -platform: linux diff --git a/rpms/jsonnet/metadata.yaml b/rpms/jsonnet/metadata.yaml index 3167527..1d5f351 100644 --- a/rpms/jsonnet/metadata.yaml +++ b/rpms/jsonnet/metadata.yaml @@ -1,4 +1,12 @@ +name: jsonnet +github: google/go-jsonnet +description: A data templating language arch: amd64 +platform: linux +maintainer: Google +homepage: https://github.com/google/go-jsonnet +license: Apache-2.0 +dist_tag: true builds: - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: 1 @@ -10,10 +18,3 @@ builds: repository: - almalinux/el9 version: 0.22.0 -description: A data templating language -github: google/go-jsonnet -homepage: https://github.com/google/go-jsonnet -license: Apache-2.0 -maintainer: Google -name: jsonnet -platform: linux diff --git a/rpms/kubecolor/metadata.yaml b/rpms/kubecolor/metadata.yaml index 053f885..9b209fd 100644 --- a/rpms/kubecolor/metadata.yaml +++ b/rpms/kubecolor/metadata.yaml @@ -1,4 +1,3 @@ ---- name: kubecolor github: kubecolor/kubecolor description: Colorize your kubectl output @@ -7,6 +6,7 @@ platform: linux maintainer: kubecolor homepage: https://github.com/kubecolor/kubecolor license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/kubeconform/metadata.yaml b/rpms/kubeconform/metadata.yaml index b8dd255..6823d59 100644 --- a/rpms/kubeconform/metadata.yaml +++ b/rpms/kubeconform/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Yann Hamon homepage: https://github.com/yannh/kubeconform license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/kubectx/metadata.yaml b/rpms/kubectx/metadata.yaml index 2fa95b6..1eefb25 100644 --- a/rpms/kubectx/metadata.yaml +++ b/rpms/kubectx/metadata.yaml @@ -1,4 +1,3 @@ ---- name: kubectx github: ahmetb/kubectx description: Faster way to switch between clusters and namespaces in kubectl. @@ -7,6 +6,7 @@ platform: linux maintainer: ahmetb homepage: https://github.com/ahmetb/kubectx license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/kustomize/metadata.yaml b/rpms/kustomize/metadata.yaml index adede2d..33a334f 100644 --- a/rpms/kustomize/metadata.yaml +++ b/rpms/kustomize/metadata.yaml @@ -1,4 +1,3 @@ ---- name: kustomize github: kubernetes-sigs/kustomize description: Kubernetes native configuration management @@ -7,13 +6,16 @@ platform: linux maintainer: kubernetes-sigs homepage: https://github.com/kubernetes-sigs/kustomize license: Apache-2.0 +dist_tag: true github_release_pattern: ^kustomize/v.* builds: - - repository: [almalinux/el8] - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - version: 5.8.1 - - repository: [almalinux/el9] - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - version: 5.8.1 +- repository: + - almalinux/el8 + image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + version: 5.8.1 +- repository: + - almalinux/el9 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + version: 5.8.1 diff --git a/rpms/lazydocker/metadata.yaml b/rpms/lazydocker/metadata.yaml index 705a2d5..c38c478 100644 --- a/rpms/lazydocker/metadata.yaml +++ b/rpms/lazydocker/metadata.yaml @@ -1,4 +1,3 @@ ---- name: lazydocker github: jesseduffield/lazydocker description: The lazier way to manage everything docker. @@ -7,6 +6,7 @@ platform: linux maintainer: jesseduffield homepage: https://github.com/jesseduffield/lazydocker license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/libfoundationdb/metadata.yaml b/rpms/libfoundationdb/metadata.yaml index 48c5441..fd6fc6a 100644 --- a/rpms/libfoundationdb/metadata.yaml +++ b/rpms/libfoundationdb/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 7.3.71 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 7.3.71 -description: FoundationDB client library - Shared library for FoundationDB applications +name: libfoundationdb github: apple/foundationdb +description: FoundationDB client library - Shared library for FoundationDB applications +arch: amd64 +platform: linux +maintainer: FoundationDB Community homepage: https://github.com/apple/foundationdb license: Apache-2.0 -maintainer: FoundationDB Community -name: libfoundationdb -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 7.3.71 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 7.3.71 diff --git a/rpms/neovim-glibc-2.17/metadata.yaml b/rpms/neovim-glibc-2.17/metadata.yaml index 335e0f5..26e3b6a 100644 --- a/rpms/neovim-glibc-2.17/metadata.yaml +++ b/rpms/neovim-glibc-2.17/metadata.yaml @@ -1,12 +1,13 @@ ---- name: neovim-glibc-2.17 github: neovim/neovim-releases -description: Vim-fork focused on extensibility and usability (glibc 2.17 compatible build). +description: Vim-fork focused on extensibility and usability (glibc 2.17 compatible + build). arch: amd64 platform: linux maintainer: neovim homepage: https://neovim.io license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/neovim/metadata.yaml b/rpms/neovim/metadata.yaml index 85e4669..e478526 100644 --- a/rpms/neovim/metadata.yaml +++ b/rpms/neovim/metadata.yaml @@ -1,4 +1,3 @@ ---- name: neovim github: neovim/neovim description: Vim-fork focused on extensibility and usability. @@ -7,6 +6,7 @@ platform: linux maintainer: neovim homepage: https://neovim.io license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/nfpm/metadata.yaml b/rpms/nfpm/metadata.yaml index 9691ec6..7ec1253 100644 --- a/rpms/nfpm/metadata.yaml +++ b/rpms/nfpm/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: GoReleaser homepage: https://nfpm.goreleaser.com/ license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/node_exporter/metadata.yaml b/rpms/node_exporter/metadata.yaml index 4881ef8..735e0c0 100644 --- a/rpms/node_exporter/metadata.yaml +++ b/rpms/node_exporter/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Prometheus homepage: https://github.com/prometheus/node_exporter license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/nomad-autoscaler/metadata.yaml b/rpms/nomad-autoscaler/metadata.yaml index a9b97c3..8012844 100644 --- a/rpms/nomad-autoscaler/metadata.yaml +++ b/rpms/nomad-autoscaler/metadata.yaml @@ -8,6 +8,7 @@ platform: linux maintainer: Hashicorp homepage: https://github.com/hashicorp/nomad-autoscaler license: Mozilla Public License, version 2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/nomad/metadata.yaml b/rpms/nomad/metadata.yaml index 3561ac4..641c9c9 100644 --- a/rpms/nomad/metadata.yaml +++ b/rpms/nomad/metadata.yaml @@ -1,18 +1,21 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 1.10.1 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 1.10.1 -description: A simple and flexible scheduler and orchestrator to deploy and manage containers and non-containerized applications across on-premises and clouds at scale. +name: nomad github: unknown/nomad +description: A simple and flexible scheduler and orchestrator to deploy and manage + containers and non-containerized applications across on-premises and clouds at scale. +arch: amd64 +platform: linux +maintainer: HashiCorp homepage: https://www.nomadproject.io/ license: BUSL-1.1 -maintainer: HashiCorp -name: nomad -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 1.10.1 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 1.10.1 diff --git a/rpms/nzbget/metadata.yaml b/rpms/nzbget/metadata.yaml index 364c02b..2047ddc 100644 --- a/rpms/nzbget/metadata.yaml +++ b/rpms/nzbget/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: nzbgetcom homepage: https://github.com/nzbgetcom/nzbget license: GPL-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/nzbget_exporter/metadata.yaml b/rpms/nzbget_exporter/metadata.yaml index e91a21c..08b5c0a 100644 --- a/rpms/nzbget_exporter/metadata.yaml +++ b/rpms/nzbget_exporter/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 2025.08.03 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 2025.08.03 -description: Prometheus exporter for NZBGet +name: nzbget_exporter github: frebib/nzbget-exporter +description: Prometheus exporter for NZBGet +arch: amd64 +platform: linux +maintainer: Prometheus homepage: https://github.com/frebib/nzbget-exporter license: MIT -maintainer: Prometheus -name: nzbget_exporter -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 2025.08.03 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 2025.08.03 diff --git a/rpms/openbao-plugin-secret-consul/metadata.yaml b/rpms/openbao-plugin-secret-consul/metadata.yaml index 3c5f632..376a40f 100644 --- a/rpms/openbao-plugin-secret-consul/metadata.yaml +++ b/rpms/openbao-plugin-secret-consul/metadata.yaml @@ -1,12 +1,13 @@ name: openbao-plugin-secret-consul github: openbao/openbao-plugins -github_release_pattern: "^secrets-consul-v.*" description: OpenBao secrets engine plugin for HashiCorp Consul arch: amd64 platform: linux maintainer: OpenBao Community homepage: https://github.com/openbao/openbao-plugins license: MPL-2.0 +dist_tag: true +github_release_pattern: ^secrets-consul-v.* builds: - repository: - almalinux/el8 diff --git a/rpms/openbao-plugin-secret-nomad/metadata.yaml b/rpms/openbao-plugin-secret-nomad/metadata.yaml index a7af86e..ad03b45 100644 --- a/rpms/openbao-plugin-secret-nomad/metadata.yaml +++ b/rpms/openbao-plugin-secret-nomad/metadata.yaml @@ -1,12 +1,13 @@ name: openbao-plugin-secret-nomad github: openbao/openbao-plugins -github_release_pattern: "^secrets-nomad-v.*" description: OpenBao secrets engine plugin for HashiCorp Nomad arch: amd64 platform: linux maintainer: OpenBao Community homepage: https://github.com/openbao/openbao-plugins license: MPL-2.0 +dist_tag: true +github_release_pattern: ^secrets-nomad-v.* builds: - repository: - almalinux/el8 diff --git a/rpms/openbao-plugins/metadata.yaml b/rpms/openbao-plugins/metadata.yaml index 25b1123..25722d2 100644 --- a/rpms/openbao-plugins/metadata.yaml +++ b/rpms/openbao-plugins/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: OpenBao Community homepage: https://github.com/openbao/openbao-plugins license: MPL-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/packer/metadata.yaml b/rpms/packer/metadata.yaml index 4117efe..8ac5488 100644 --- a/rpms/packer/metadata.yaml +++ b/rpms/packer/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: HashiCorp homepage: https://www.packer.io/ license: BUSL-1.1 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/pgbouncer_exporter/metadata.yaml b/rpms/pgbouncer_exporter/metadata.yaml index 51a8a1c..cb0dc81 100644 --- a/rpms/pgbouncer_exporter/metadata.yaml +++ b/rpms/pgbouncer_exporter/metadata.yaml @@ -1,4 +1,12 @@ +name: pgbouncer_exporter +github: prometheus-community/pgbouncer_exporter +description: Prometheus exporter for PgBouncer arch: amd64 +platform: linux +maintainer: Prometheus +homepage: https://github.com/prometheus-community/pgbouncer_exporter +license: Apache-2.0 license +dist_tag: true builds: - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: 1 @@ -10,10 +18,3 @@ builds: repository: - almalinux/el9 version: 0.12.0 -description: Prometheus exporter for PgBouncer -github: prometheus-community/pgbouncer_exporter -homepage: https://github.com/prometheus-community/pgbouncer_exporter -license: Apache-2.0 license -maintainer: Prometheus -name: pgbouncer_exporter -platform: linux diff --git a/rpms/postgres_exporter/metadata.yaml b/rpms/postgres_exporter/metadata.yaml index 39ac8de..a192ec6 100644 --- a/rpms/postgres_exporter/metadata.yaml +++ b/rpms/postgres_exporter/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Prometheus homepage: https://github.com/prometheus-community/postgres_exporter license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/puppet-initial/metadata.yaml b/rpms/puppet-initial/metadata.yaml index 46779a5..9a50889 100644 --- a/rpms/puppet-initial/metadata.yaml +++ b/rpms/puppet-initial/metadata.yaml @@ -1,17 +1,19 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 1.0.3 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 1.0.3 -description: A script and service to initialise puppet for the unkin environmnet. -github: unknown/puppet-initial -license: MIT -maintainer: UNKIN name: puppet-initial +github: unknown/puppet-initial +description: A script and service to initialise puppet for the unkin environmnet. +arch: amd64 platform: linux +maintainer: UNKIN +license: MIT +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 1.0.3 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 1.0.3 diff --git a/rpms/puppetdb_exporter/metadata.yaml b/rpms/puppetdb_exporter/metadata.yaml index bd9deec..c0f3c43 100644 --- a/rpms/puppetdb_exporter/metadata.yaml +++ b/rpms/puppetdb_exporter/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 1.1.0 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 1.1.0 -description: Prometheus exporter for PuppetDB +name: puppetdb_exporter github: camptocamp/prometheus-puppetdb-exporter +description: Prometheus exporter for PuppetDB +arch: amd64 +platform: linux +maintainer: Comptocamp homepage: https://github.com/camptocamp/prometheus-puppetdb-exporter license: Apache 2.0 License -maintainer: Comptocamp -name: puppetdb_exporter -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 1.1.0 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 1.1.0 diff --git a/rpms/ruff/metadata.yaml b/rpms/ruff/metadata.yaml index 4a13190..802d19d 100644 --- a/rpms/ruff/metadata.yaml +++ b/rpms/ruff/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Astral.sh homepage: https://docs.astral.sh/ruff/ license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/sops/metadata.yaml b/rpms/sops/metadata.yaml index 8157022..3174ec9 100644 --- a/rpms/sops/metadata.yaml +++ b/rpms/sops/metadata.yaml @@ -1,4 +1,3 @@ ---- name: sops github: getsops/sops description: Simple and flexible tool for managing secrets. @@ -7,6 +6,7 @@ platform: linux maintainer: getsops homepage: https://github.com/getsops/sops license: MPL-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/stalwart-cli/metadata.yaml b/rpms/stalwart-cli/metadata.yaml index 53af641..a014ea2 100644 --- a/rpms/stalwart-cli/metadata.yaml +++ b/rpms/stalwart-cli/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Stalwart Labs homepage: https://stalw.art license: AGPL-3.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/stalwart-foundationdb/metadata.yaml b/rpms/stalwart-foundationdb/metadata.yaml index 605773f..1d1c9aa 100644 --- a/rpms/stalwart-foundationdb/metadata.yaml +++ b/rpms/stalwart-foundationdb/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: Stalwart Labs homepage: https://stalw.art license: AGPL-3.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/stalwart/metadata.yaml b/rpms/stalwart/metadata.yaml index b0ca24f..8c3f0dd 100644 --- a/rpms/stalwart/metadata.yaml +++ b/rpms/stalwart/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Stalwart Labs homepage: https://stalw.art license: AGPL-3.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/starship/metadata.yaml b/rpms/starship/metadata.yaml index aef0bee..c39c94d 100644 --- a/rpms/starship/metadata.yaml +++ b/rpms/starship/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: starship homepage: https://starship.rs license: ISC +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/stern/metadata.yaml b/rpms/stern/metadata.yaml index 1360dbd..2c8b008 100644 --- a/rpms/stern/metadata.yaml +++ b/rpms/stern/metadata.yaml @@ -1,4 +1,3 @@ ---- name: stern github: stern/stern description: Multi pod and container log tailing for Kubernetes. @@ -7,6 +6,7 @@ platform: linux maintainer: stern homepage: https://github.com/stern/stern license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/tea/metadata.yaml b/rpms/tea/metadata.yaml index fe67c86..07c0e27 100644 --- a/rpms/tea/metadata.yaml +++ b/rpms/tea/metadata.yaml @@ -1,4 +1,3 @@ ---- name: tea github: unknown/tea description: The official CLI for Gitea. @@ -7,6 +6,7 @@ platform: linux maintainer: Gitea homepage: https://gitea.com/gitea/tea license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/terraform/metadata.yaml b/rpms/terraform/metadata.yaml index 79199e6..eb42fb4 100644 --- a/rpms/terraform/metadata.yaml +++ b/rpms/terraform/metadata.yaml @@ -9,6 +9,7 @@ platform: linux maintainer: HashiCorp homepage: https://terraform.io/ license: BUSL-1.1 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/terragrunt/metadata.yaml b/rpms/terragrunt/metadata.yaml index 5a76f5b..cc5b1ff 100644 --- a/rpms/terragrunt/metadata.yaml +++ b/rpms/terragrunt/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: Gruntwork homepage: https://github.com/gruntwork-io/terragrunt license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/tflint/metadata.yaml b/rpms/tflint/metadata.yaml index b416e17..01d5c4f 100644 --- a/rpms/tflint/metadata.yaml +++ b/rpms/tflint/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: Terraform Linters homepage: https://github.com/terraform-linters/tflint license: MPL-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/unkin-ca-certificates/metadata.yaml b/rpms/unkin-ca-certificates/metadata.yaml index f933a7b..abfe728 100644 --- a/rpms/unkin-ca-certificates/metadata.yaml +++ b/rpms/unkin-ca-certificates/metadata.yaml @@ -1,27 +1,27 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: - - almalinux/el8 - version: 2025.07.13 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: - - almalinux/el9 - version: 2025.07.13 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: - - fedora/42 - - fedora/43 - - fedora/44 - version: 2025.07.13 -description: ca-certificates for the unkin site +name: unkin-ca-certificates github: unknown/unkin-ca-certificates +description: ca-certificates for the unkin site +arch: amd64 +platform: linux +maintainer: Unkin homepage: https://vault.query.consul:8200 license: Apache-2.0 -maintainer: Unkin -name: unkin-ca-certificates -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 2025.07.13 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 2025.07.13 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - fedora/42 + - fedora/43 + - fedora/44 + version: 2025.07.13 diff --git a/rpms/unkin-undionly-kpxe/metadata.yaml b/rpms/unkin-undionly-kpxe/metadata.yaml index a40b3de..faeeb5a 100644 --- a/rpms/unkin-undionly-kpxe/metadata.yaml +++ b/rpms/unkin-undionly-kpxe/metadata.yaml @@ -1,18 +1,20 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: 20250712.0.2 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: 20250712.0.2 -description: iPXE network bootloader +name: unkin-undionly-kpxe github: ipxe/ipxe +description: iPXE network bootloader +arch: amd64 +platform: linux +maintainer: iPXE homepage: https://github.com/ipxe/ipxe license: GPL-2.0 license -maintainer: iPXE -name: unkin-undionly-kpxe -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 20250712.0.2 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 20250712.0.2 diff --git a/rpms/unrar/metadata.yaml b/rpms/unrar/metadata.yaml index 2b0ee77..161371a 100644 --- a/rpms/unrar/metadata.yaml +++ b/rpms/unrar/metadata.yaml @@ -1,18 +1,22 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: [almalinux/el8] - version: '7.20' - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: [almalinux/el9] - version: '7.20' -description: WinRAR is a powerful archive manager. It can backup your data and reduce the size of email attachments, open and unpack RAR, ZIP and other files downloaded from Internet, create new archives in RAR and ZIP file format. +name: unrar github: unknown/unrar +description: WinRAR is a powerful archive manager. It can backup your data and reduce + the size of email attachments, open and unpack RAR, ZIP and other files downloaded + from Internet, create new archives in RAR and ZIP file format. +arch: amd64 +platform: linux +maintainer: RARLAB homepage: https://www.rarlab.com/ license: Freeware (UNRAR 7.11 freeware Copyright (c) 1993-2025 Alexander Roshal) -maintainer: RARLAB -name: unrar -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: '7.20' +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: '7.20' diff --git a/rpms/uv/metadata.yaml b/rpms/uv/metadata.yaml index ce74d57..1ea0860 100644 --- a/rpms/uv/metadata.yaml +++ b/rpms/uv/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: Astral.sh homepage: https://docs.astral.sh/uv/ license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vals/metadata.yaml b/rpms/vals/metadata.yaml index c53c53b..f5f1baf 100644 --- a/rpms/vals/metadata.yaml +++ b/rpms/vals/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: Helmfile Contributors homepage: https://github.com/helmfile/vals license: Apache-2.0 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vault/metadata.yaml b/rpms/vault/metadata.yaml index 91598f3..c048485 100644 --- a/rpms/vault/metadata.yaml +++ b/rpms/vault/metadata.yaml @@ -9,6 +9,7 @@ platform: linux maintainer: HashiCorp homepage: https://github.com/hashicorp/vault license: BUSL-1.1 +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/victoria-logs/metadata.yaml b/rpms/victoria-logs/metadata.yaml index 1fd6918..4bb3797 100644 --- a/rpms/victoria-logs/metadata.yaml +++ b/rpms/victoria-logs/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaLogs license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vlutils/metadata.yaml b/rpms/vlutils/metadata.yaml index dc32b6f..2108b91 100644 --- a/rpms/vlutils/metadata.yaml +++ b/rpms/vlutils/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaLogs license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vmagent/metadata.yaml b/rpms/vmagent/metadata.yaml index 78ab059..eb3ca59 100644 --- a/rpms/vmagent/metadata.yaml +++ b/rpms/vmagent/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaMetrics license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vmalert/metadata.yaml b/rpms/vmalert/metadata.yaml index 795fadd..665e6b6 100644 --- a/rpms/vmalert/metadata.yaml +++ b/rpms/vmalert/metadata.yaml @@ -6,6 +6,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaMetrics license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vminsert/metadata.yaml b/rpms/vminsert/metadata.yaml index d093e2f..3d9a7da 100644 --- a/rpms/vminsert/metadata.yaml +++ b/rpms/vminsert/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaMetrics license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vmselect/metadata.yaml b/rpms/vmselect/metadata.yaml index fc2c775..461d108 100644 --- a/rpms/vmselect/metadata.yaml +++ b/rpms/vmselect/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaMetrics license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vmstorage/metadata.yaml b/rpms/vmstorage/metadata.yaml index 338fe5e..1c3881c 100644 --- a/rpms/vmstorage/metadata.yaml +++ b/rpms/vmstorage/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaMetrics license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/vmutils/metadata.yaml b/rpms/vmutils/metadata.yaml index 0b33900..904a514 100644 --- a/rpms/vmutils/metadata.yaml +++ b/rpms/vmutils/metadata.yaml @@ -7,6 +7,7 @@ platform: linux maintainer: VictoriaMetrics homepage: https://github.com/VictoriaMetrics/VictoriaMetrics license: Apache-2.0 license +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/rpms/xh/metadata.yaml b/rpms/xh/metadata.yaml index 34e3696..d06ce1a 100644 --- a/rpms/xh/metadata.yaml +++ b/rpms/xh/metadata.yaml @@ -1,27 +1,28 @@ ---- -arch: amd64 -builds: - - image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest - release: '1' - repository: - - almalinux/el8 - version: 0.25.3 - - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: '1' - repository: - - almalinux/el9 - version: 0.25.3 - - repository: - - fedora/42 - - fedora/43 - - fedora/44 - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest - release: 1 - version: 0.25.3 -description: A friendly and fast tool for sending HTTP requests (HTTPie reimplementation in Rust) +name: xh github: ducaale/xh +description: A friendly and fast tool for sending HTTP requests (HTTPie reimplementation + in Rust) +arch: amd64 +platform: linux +maintainer: ducaale homepage: https://github.com/ducaale/xh license: MIT -maintainer: ducaale -name: xh -platform: linux +dist_tag: true +builds: +- image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest + release: '1' + repository: + - almalinux/el8 + version: 0.25.3 +- image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: '1' + repository: + - almalinux/el9 + version: 0.25.3 +- repository: + - fedora/42 + - fedora/43 + - fedora/44 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest + release: 1 + version: 0.25.3 diff --git a/rpms/yq/metadata.yaml b/rpms/yq/metadata.yaml index 7d4bf6a..02da9dc 100644 --- a/rpms/yq/metadata.yaml +++ b/rpms/yq/metadata.yaml @@ -1,12 +1,13 @@ ---- name: yq github: mikefarah/yq -description: yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor. +description: yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties + processor. arch: amd64 platform: linux maintainer: mikefarah homepage: https://github.com/mikefarah/yq license: MIT +dist_tag: true builds: - repository: - almalinux/el8 diff --git a/tools/build b/tools/build index e6e1f94..f4f4c70 100755 --- a/tools/build +++ b/tools/build @@ -23,6 +23,8 @@ import sys import logging import subprocess import requests +from requests.adapters import HTTPAdapter +from urllib3.util.retry import Retry from pathlib import Path from typing import List, Optional from concurrent.futures import ThreadPoolExecutor, as_completed @@ -33,6 +35,36 @@ import yaml from cerberus import Validator +# ==================== HTTP SESSIONS ==================== + +def _make_session(retries: int = 3, backoff_factor: float = 0.5) -> requests.Session: + """ + Build a requests Session that retries on transient failures. + + Retries up to `retries` times on connection errors, read timeouts, and + 5xx / 429 responses, with exponential backoff (0s, 0.5s, 1s, 2s …). + Only GET requests are retried to stay safe. + """ + session = requests.Session() + retry = Retry( + total=retries, + backoff_factor=backoff_factor, + status_forcelist=[429, 500, 502, 503, 504], + allowed_methods=["GET"], + raise_on_status=False, + ) + adapter = HTTPAdapter(max_retries=retry) + session.mount("https://", adapter) + session.mount("http://", adapter) + return session + +# Shared sessions — one per upstream so connections are pooled and reused +# across all package checks (including parallel builds in ThreadPoolExecutor). +# requests.Session is thread-safe for concurrent requests. +_gitea_session = _make_session() +_github_session = _make_session() + + # ==================== VALIDATION SCHEMA ==================== # Cerberus schema for metadata.yaml validation based on PackageMetadata and Build dataclasses @@ -81,6 +113,11 @@ METADATA_SCHEMA = { 'required': False, 'empty': False }, + 'dist_tag': { + 'type': 'boolean', + 'required': False, + 'default': False + }, 'builds': { 'type': 'list', 'required': True, @@ -94,7 +131,7 @@ METADATA_SCHEMA = { 'minlength': 1, 'schema': { 'type': 'string', - 'allowed': ['almalinux/el8', 'almalinux/el9'], + 'allowed': ['almalinux/el8', 'almalinux/el9', 'fedora/42', 'fedora/43', 'fedora/44'], 'empty': False } }, @@ -146,6 +183,7 @@ class PackageMetadata: maintainer: str = "" homepage: str = "" license: str = "" + dist_tag: bool = False builds: List[Build] = None def __post_init__(self): @@ -274,15 +312,14 @@ def get_github_latest_release(repo: str) -> Optional[dict]: try: github_token = get_github_token() + _github_session.headers.update({ + 'Authorization': f'token {github_token}', + 'Accept': 'application/vnd.github.v3+json', + }) url = f"https://api.github.com/repos/{repo}/releases/latest" - headers = { - 'Authorization': f'token {github_token}', - 'Accept': 'application/vnd.github.v3+json' - } - logger.debug(f"Checking GitHub releases: {url}") - response = requests.get(url, headers=headers, timeout=30) + response = _github_session.get(url, timeout=15) if response.status_code == 200: release = response.json() @@ -389,15 +426,14 @@ def get_github_releases_by_pattern(repo: str, pattern: str) -> Optional[dict]: try: github_token = get_github_token() + _github_session.headers.update({ + 'Authorization': f'token {github_token}', + 'Accept': 'application/vnd.github.v3+json', + }) url = f"https://api.github.com/repos/{repo}/releases" - headers = { - 'Authorization': f'token {github_token}', - 'Accept': 'application/vnd.github.v3+json' - } - logger.debug(f"Checking GitHub releases with pattern '{pattern}': {url}") - response = requests.get(url, headers=headers, timeout=30) + response = _github_session.get(url, timeout=15) if response.status_code == 200: releases = response.json() @@ -504,14 +540,45 @@ def normalize_version(version: str) -> str: return ''.join(normalized_parts) +def get_rpm_dist_tag(distro: str) -> str: + """ + Map a distro path to its RPM dist tag string. + + Examples: + 'almalinux/el9' -> 'el9' + 'fedora/43' -> 'fc43' + """ + if distro.startswith('almalinux/'): + return distro.split('/', 1)[1] + if distro.startswith('fedora/'): + return 'fc' + distro.split('/', 1)[1] + return '' + + +def effective_release(base_release: str, distro: str, use_dist_tag: bool) -> str: + """Return the release string to use for building and registry checks. + + When use_dist_tag is True the dist tag is appended so different distros + produce distinct entries in the package registry (e.g. '1.el9', '1.fc43'). + """ + if not use_dist_tag: + return base_release + tag = get_rpm_dist_tag(distro) + return f"{base_release}.{tag}" if tag else base_release + + def check_package_exists(package_name: str, version: str, release: str) -> bool: """ Check if a package version exists in the Gitea package registry. + Distro disambiguation is handled by the caller via the release string: + when dist_tag is enabled the caller appends the dist tag to release + (e.g. '1.el9', '1.fc43') so each distro maps to a unique version entry. + Args: package_name: Name of the package version: Version string - release: Release number + release: Effective release (may include dist tag suffix) Returns: True if package exists, False otherwise @@ -536,17 +603,17 @@ def check_package_exists(package_name: str, version: str, release: str) -> bool: f"{package_type}/{package_name}/{full_version}" ) - headers = {'Authorization': f'token {gitea_token}'} + _gitea_session.headers.update({'Authorization': f'token {gitea_token}'}) logger.debug(f"Checking package existence: {url}") - response = requests.get(url, headers=headers, timeout=30) + response = _gitea_session.get(url, timeout=10) if response.status_code == 200: package_info = response.json() - # Package exists if we get package info back exists = bool(package_info.get('id')) logger.debug(f"Package {package_name}:{full_version} {'exists' if exists else 'not found'}") return exists + elif response.status_code == 404: logger.debug(f"Package {package_name}:{full_version} not found (404)") return False @@ -1241,6 +1308,7 @@ class Builder: package_name = metadata.get('name', package_dir.name) build_configs = metadata.get('builds', []) + use_dist_tag = metadata.get('dist_tag', False) if not build_configs: self.logger.warning(f"No builds in metadata.yaml for {package_name}") @@ -1259,7 +1327,8 @@ class Builder: if repositories and base_image and version and release: # Use the first repository as the distro identifier build_distro = repositories[0] if repositories else 'unknown' - packages.append(PackageInfo(package_name, version, str(release), package_dir, build_distro, base_image)) + rel = effective_release(str(release), build_distro, use_dist_tag) + packages.append(PackageInfo(package_name, version, rel, package_dir, build_distro, base_image)) else: # Build for specific distro for build_config in build_configs: @@ -1271,7 +1340,8 @@ class Builder: # Check if the target distro matches any repository if distro in repositories and base_image and version and release: - packages.append(PackageInfo(package_name, version, str(release), package_dir, distro, base_image)) + rel = effective_release(str(release), distro, use_dist_tag) + packages.append(PackageInfo(package_name, version, rel, package_dir, distro, base_image)) break else: # If no matching distro found, log a warning @@ -1324,6 +1394,8 @@ class Builder: with open(metadata_file, 'r') as f: metadata = yaml.safe_load(f) + use_dist_tag = metadata.get('dist_tag', False) + # Find base image and validate version/release for the specified distro build_configs = metadata.get('builds', []) base_image = None @@ -1367,7 +1439,8 @@ class Builder: self.logger.error(f"Error reading metadata.yaml for {package}: {e}") return False - package_info = PackageInfo(package, version, release, package_dir, distro, base_image) + rel = effective_release(release, distro, use_dist_tag) + package_info = PackageInfo(package, version, rel, package_dir, distro, base_image) return self._build_package(package_info, dry_run, force, native, buildah) def build_all(self, dry_run: bool = False, force: bool = False, parallel: int = 4, distro: str = 'el/9', native: bool = False, buildah: bool = False) -> bool: From cf1b3b9a3dc07fcd4c84e42d3e73d3033bfce61e Mon Sep 17 00:00:00 2001 From: BenVincent Date: Mon, 8 Jun 2026 14:36:42 +1000 Subject: [PATCH 5/8] chore: bump claude-code (#167) - upgrade claude-code to 2.1.156 --------- Co-authored-by: Ben Vincent Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/167 --- rpms/claude-code/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpms/claude-code/metadata.yaml b/rpms/claude-code/metadata.yaml index 6928b30..bc13658 100644 --- a/rpms/claude-code/metadata.yaml +++ b/rpms/claude-code/metadata.yaml @@ -11,9 +11,9 @@ builds: release: 1 repository: - almalinux/el8 - version: 2.1.126 + version: 2.1.156 - image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 repository: - almalinux/el9 - version: 2.1.126 + version: 2.1.156 From 50860918077cc3f7fee8ffdb06d727a35b2e739f Mon Sep 17 00:00:00 2001 From: BenVincent Date: Mon, 8 Jun 2026 15:18:11 +1000 Subject: [PATCH 6/8] feat: change vault to use artifactapi (#168) Co-authored-by: Ben Vincent Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/168 --- rpms/vault/resources/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpms/vault/resources/build.sh b/rpms/vault/resources/build.sh index ce7035d..8034de7 100755 --- a/rpms/vault/resources/build.sh +++ b/rpms/vault/resources/build.sh @@ -6,7 +6,7 @@ set -e dnf install -y unzip # Download and extract vault -curl -L -o /app/vault.zip https://releases.hashicorp.com/vault/${PACKAGE_VERSION}/vault_${PACKAGE_VERSION}_linux_amd64.zip +curl -L -o /app/vault.zip https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/hashicorp-releases/vault/${PACKAGE_VERSION}/vault_${PACKAGE_VERSION}_linux_amd64.zip unzip vault.zip # Process the nfpm.yaml template with environment variables From 8c0d23afae420cfe6ddbfa900eb1c05dba384f89 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 18 Jul 2026 16:00:11 +1000 Subject: [PATCH 7/8] Publish RPMs to artifactapi rpm-vendor repos (#169) Why: vendored RPMs currently upload to Gitea's per-distro RPM registry. Publish them instead to the artifactapi per-distro rpm-vendor local repos (real yum repos; repodata regenerates automatically), keeping them separate from in-house software (rpm-internal). The existing per-distro build-all build jobs are unchanged. Changes: - .woodpecker/deploy-*.yaml: retarget the deploy-rpms step from git.unkin.net/api/packages/... to a PUT against artifactapi /api/v2/remotes/rpm-vendor-/files/ (unauthenticated, like the other repos), with an existence probe to skip re-uploads. Drops the DRONECI_PASSWORD secret. - tools/build: repoint check_package_exists from the Gitea packages API to the artifactapi rpm-vendor repo so build-all's skip check matches the real publish target; verify artifactapi's internal TLS cert against the OS CA bundle; carry arch on PackageInfo so the probed filename matches the built RPM. Depends on the already-merged rpm-vendor repos (terraform-artifactapi) and pairs with puppet-prod rpm-vendor yumrepo. Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/169 Co-authored-by: Ben Vincent Co-committed-by: Ben Vincent --- .woodpecker/deploy-almalinux8.yaml | 14 +++- .woodpecker/deploy-almalinux9.yaml | 14 +++- .woodpecker/deploy-fedora42.yaml | 14 +++- .woodpecker/deploy-fedora43.yaml | 14 +++- .woodpecker/deploy-fedora44.yaml | 14 +++- tools/build | 116 +++++++++++++++++------------ 6 files changed, 119 insertions(+), 67 deletions(-) diff --git a/.woodpecker/deploy-almalinux8.yaml b/.woodpecker/deploy-almalinux8.yaml index 26de4fe..b46a8a9 100644 --- a/.woodpecker/deploy-almalinux8.yaml +++ b/.woodpecker/deploy-almalinux8.yaml @@ -31,12 +31,18 @@ steps: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest commands: - | + HOST="https://artifactapi.k8s.syd1.au.unkin.net" + REPO="rpm-vendor-el8" for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do - curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el8/upload + FILE=$$(basename "$$rpm") + # artifactapi has no HEAD route (405); probe the served Packages path. + code=$$(curl -s -o /dev/null -w '%{http_code}' "$$HOST/api/v2/remotes/$$REPO/files/Packages/$$FILE" || true) + if [ "$$code" = "200" ]; then + echo "$$FILE already exists in $$REPO; skipping" + continue + fi + curl -f -X PUT "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" -H "Content-Type: application/x-rpm" --data-binary @"$$rpm" done - environment: - DRONECI_PASSWORD: - from_secret: DRONECI_PASSWORD backend_options: kubernetes: serviceAccountName: default diff --git a/.woodpecker/deploy-almalinux9.yaml b/.woodpecker/deploy-almalinux9.yaml index 9b4d89a..375ac93 100644 --- a/.woodpecker/deploy-almalinux9.yaml +++ b/.woodpecker/deploy-almalinux9.yaml @@ -31,12 +31,18 @@ steps: image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest commands: - | + HOST="https://artifactapi.k8s.syd1.au.unkin.net" + REPO="rpm-vendor-el9" for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do - curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/almalinux/el9/upload + FILE=$$(basename "$$rpm") + # artifactapi has no HEAD route (405); probe the served Packages path. + code=$$(curl -s -o /dev/null -w '%{http_code}' "$$HOST/api/v2/remotes/$$REPO/files/Packages/$$FILE" || true) + if [ "$$code" = "200" ]; then + echo "$$FILE already exists in $$REPO; skipping" + continue + fi + curl -f -X PUT "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" -H "Content-Type: application/x-rpm" --data-binary @"$$rpm" done - environment: - DRONECI_PASSWORD: - from_secret: DRONECI_PASSWORD backend_options: kubernetes: serviceAccountName: default diff --git a/.woodpecker/deploy-fedora42.yaml b/.woodpecker/deploy-fedora42.yaml index 6726501..b8bcb71 100644 --- a/.woodpecker/deploy-fedora42.yaml +++ b/.woodpecker/deploy-fedora42.yaml @@ -31,12 +31,18 @@ steps: image: git.unkin.net/unkin/fedora42-rpmbuilder:latest commands: - | + HOST="https://artifactapi.k8s.syd1.au.unkin.net" + REPO="rpm-vendor-f42" for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do - curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/fedora/42/upload + FILE=$$(basename "$$rpm") + # artifactapi has no HEAD route (405); probe the served Packages path. + code=$$(curl -s -o /dev/null -w '%{http_code}' "$$HOST/api/v2/remotes/$$REPO/files/Packages/$$FILE" || true) + if [ "$$code" = "200" ]; then + echo "$$FILE already exists in $$REPO; skipping" + continue + fi + curl -f -X PUT "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" -H "Content-Type: application/x-rpm" --data-binary @"$$rpm" done - environment: - DRONECI_PASSWORD: - from_secret: DRONECI_PASSWORD backend_options: kubernetes: serviceAccountName: default diff --git a/.woodpecker/deploy-fedora43.yaml b/.woodpecker/deploy-fedora43.yaml index be50719..55306dc 100644 --- a/.woodpecker/deploy-fedora43.yaml +++ b/.woodpecker/deploy-fedora43.yaml @@ -31,12 +31,18 @@ steps: image: git.unkin.net/unkin/fedora43-rpmbuilder:latest commands: - | + HOST="https://artifactapi.k8s.syd1.au.unkin.net" + REPO="rpm-vendor-f43" for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do - curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/fedora/43/upload + FILE=$$(basename "$$rpm") + # artifactapi has no HEAD route (405); probe the served Packages path. + code=$$(curl -s -o /dev/null -w '%{http_code}' "$$HOST/api/v2/remotes/$$REPO/files/Packages/$$FILE" || true) + if [ "$$code" = "200" ]; then + echo "$$FILE already exists in $$REPO; skipping" + continue + fi + curl -f -X PUT "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" -H "Content-Type: application/x-rpm" --data-binary @"$$rpm" done - environment: - DRONECI_PASSWORD: - from_secret: DRONECI_PASSWORD backend_options: kubernetes: serviceAccountName: default diff --git a/.woodpecker/deploy-fedora44.yaml b/.woodpecker/deploy-fedora44.yaml index 42d4c45..6f740db 100644 --- a/.woodpecker/deploy-fedora44.yaml +++ b/.woodpecker/deploy-fedora44.yaml @@ -31,12 +31,18 @@ steps: image: git.unkin.net/unkin/fedora44-rpmbuilder:latest commands: - | + HOST="https://artifactapi.k8s.syd1.au.unkin.net" + REPO="rpm-vendor-f44" for rpm in $(find /woodpecker/src/git.unkin.net/unkin/rpmbuilder/ -type f -name "*.rpm"); do - curl --user droneci:$${DRONECI_PASSWORD} --upload-file $rpm https://git.unkin.net/api/packages/unkin/rpm/fedora/44/upload + FILE=$$(basename "$$rpm") + # artifactapi has no HEAD route (405); probe the served Packages path. + code=$$(curl -s -o /dev/null -w '%{http_code}' "$$HOST/api/v2/remotes/$$REPO/files/Packages/$$FILE" || true) + if [ "$$code" = "200" ]; then + echo "$$FILE already exists in $$REPO; skipping" + continue + fi + curl -f -X PUT "$$HOST/api/v2/remotes/$$REPO/files/$$FILE" -H "Content-Type: application/x-rpm" --data-binary @"$$rpm" done - environment: - DRONECI_PASSWORD: - from_secret: DRONECI_PASSWORD backend_options: kubernetes: serviceAccountName: default diff --git a/tools/build b/tools/build index f4f4c70..f2acfec 100755 --- a/tools/build +++ b/tools/build @@ -63,6 +63,16 @@ def _make_session(retries: int = 3, backoff_factor: float = 0.5) -> requests.Ses # requests.Session is thread-safe for concurrent requests. _gitea_session = _make_session() _github_session = _make_session() +_artifactapi_session = _make_session() +# artifactapi serves an internally-signed TLS cert. Verify against the OS CA +# bundle (which includes the internal CA, as dnf/curl in the builder images do) +# rather than certifi's Mozilla bundle, which does not trust it. +_artifactapi_session.verify = os.getenv('ARTIFACTAPI_CA_BUNDLE') or next( + (p for p in ('/etc/pki/tls/certs/ca-bundle.crt', + '/etc/ssl/certs/ca-certificates.crt') + if os.path.exists(p)), + True, +) # ==================== VALIDATION SCHEMA ==================== @@ -567,68 +577,77 @@ def effective_release(base_release: str, distro: str, use_dist_tag: bool) -> str return f"{base_release}.{tag}" if tag else base_release -def check_package_exists(package_name: str, version: str, release: str) -> bool: +def get_vendor_repo(distro: str) -> str: """ - Check if a package version exists in the Gitea package registry. + Map a distro path to its artifactapi rpm-vendor local repo name. - Distro disambiguation is handled by the caller via the release string: - when dist_tag is enabled the caller appends the dist tag to release - (e.g. '1.el9', '1.fc43') so each distro maps to a unique version entry. + Examples: + 'almalinux/el8' -> 'rpm-vendor-el8' + 'almalinux/el9' -> 'rpm-vendor-el9' + 'fedora/42' -> 'rpm-vendor-f42' + """ + if distro.startswith('almalinux/'): + return 'rpm-vendor-' + distro.split('/', 1)[1] + if distro.startswith('fedora/'): + return 'rpm-vendor-f' + distro.split('/', 1)[1] + return 'rpm-vendor' + + +def get_rpm_arch(arch: str) -> str: + """Map a metadata arch to the RPM architecture used in built filenames.""" + return {'amd64': 'x86_64', 'arm64': 'aarch64'}.get(arch, arch) + + +def check_package_exists( + package_name: str, + version: str, + release: str, + distro: str, + arch: str = 'amd64', +) -> bool: + """ + Check if a built RPM already exists in the artifactapi rpm-vendor repo. + + Each distro publishes to its own local repo (rpm-vendor-el9, rpm-vendor-f42, + ...), and dist_tag disambiguation is carried in the release string (e.g. + '1.el9', '1.fc43'), so the served RPM filename is unique per distro. We probe + the served path under Packages/ with a GET (artifactapi has no HEAD route). Args: package_name: Name of the package version: Version string - release: Effective release (may include dist tag suffix) + release: Effective release (may include dist tag suffix, e.g. '1.el9') + distro: Target distro (e.g. 'almalinux/el9', 'fedora/42') + arch: Package arch from metadata (default 'amd64') Returns: - True if package exists, False otherwise + True if the RPM is already published, False otherwise """ logger = logging.getLogger(__name__) - # Get configuration from environment - base_url = os.getenv('GITEA_URL', 'https://git.unkin.net') - owner = os.getenv('GITEA_OWNER', 'unkin') - package_type = os.getenv('GITEA_PACKAGE_TYPE', 'rpm') - - # Get Gitea token from Vault - fail hard if unavailable - gitea_token = get_gitea_token() + base_url = os.getenv('ARTIFACTAPI_URL', 'https://artifactapi.k8s.syd1.au.unkin.net') + repo = get_vendor_repo(distro) + rpm_file = f"{package_name}-{version}-{release}.{get_rpm_arch(arch)}.rpm" + url = f"{base_url}/api/v2/remotes/{repo}/files/Packages/{rpm_file}" try: - # Normalize version by removing leading zeros (Gitea does this automatically) - # e.g., "2025.08.03" becomes "2025.8.3" - normalized_version = normalize_version(version) - full_version = f"{normalized_version}-{release}" - url = ( - f"{base_url}/api/v1/packages/{owner}/" - f"{package_type}/{package_name}/{full_version}" - ) - - _gitea_session.headers.update({'Authorization': f'token {gitea_token}'}) - logger.debug(f"Checking package existence: {url}") - response = _gitea_session.get(url, timeout=10) + response = _artifactapi_session.get(url, timeout=10) if response.status_code == 200: - package_info = response.json() - exists = bool(package_info.get('id')) - logger.debug(f"Package {package_name}:{full_version} {'exists' if exists else 'not found'}") - return exists - - elif response.status_code == 404: - logger.debug(f"Package {package_name}:{full_version} not found (404)") - return False - elif response.status_code == 401: - logger.error("Authentication failed. Check GITEA_API_TOKEN.") - return False - else: - logger.warning( - f"Unexpected response checking package {package_name}:{full_version}: " - f"{response.status_code} - {response.text}" - ) + logger.debug(f"Package {rpm_file} exists in {repo}") + return True + if response.status_code == 404: + logger.debug(f"Package {rpm_file} not found in {repo} (404)") return False + logger.warning( + f"Unexpected response checking {rpm_file} in {repo}: " + f"{response.status_code}" + ) + return False except requests.RequestException as e: - logger.error(f"Failed to check package {package_name}:{version}-{release}: {e}") + logger.error(f"Failed to check {rpm_file} in {repo}: {e}") return False @@ -1251,6 +1270,7 @@ class PackageInfo: directory: Path distro: str = 'almalinux/el9' base_image: str = "git.unkin.net/unkin/almalinux9-rpmbuilder:latest" + arch: str = 'amd64' def __str__(self): return f"{self.name}-{self.version}-{self.release} ({self.distro})" @@ -1328,7 +1348,7 @@ class Builder: # Use the first repository as the distro identifier build_distro = repositories[0] if repositories else 'unknown' rel = effective_release(str(release), build_distro, use_dist_tag) - packages.append(PackageInfo(package_name, version, rel, package_dir, build_distro, base_image)) + packages.append(PackageInfo(package_name, version, rel, package_dir, build_distro, base_image, arch=metadata.get('arch', 'amd64'))) else: # Build for specific distro for build_config in build_configs: @@ -1341,7 +1361,7 @@ class Builder: # Check if the target distro matches any repository if distro in repositories and base_image and version and release: rel = effective_release(str(release), distro, use_dist_tag) - packages.append(PackageInfo(package_name, version, rel, package_dir, distro, base_image)) + packages.append(PackageInfo(package_name, version, rel, package_dir, distro, base_image, arch=metadata.get('arch', 'amd64'))) break else: # If no matching distro found, log a warning @@ -1440,7 +1460,7 @@ class Builder: return False rel = effective_release(release, distro, use_dist_tag) - package_info = PackageInfo(package, version, rel, package_dir, distro, base_image) + package_info = PackageInfo(package, version, rel, package_dir, distro, base_image, arch=metadata.get('arch', 'amd64')) return self._build_package(package_info, dry_run, force, native, buildah) def build_all(self, dry_run: bool = False, force: bool = False, parallel: int = 4, distro: str = 'el/9', native: bool = False, buildah: bool = False) -> bool: @@ -1522,7 +1542,9 @@ class Builder: if check_package_exists( package_info.name, package_info.version, - package_info.release + package_info.release, + package_info.distro, + package_info.arch, ): self.logger.info( f"Skipping {package_info} (already exists in repository)" From d49667c47119ccda51e95673147623d3b384d56a Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 18 Jul 2026 17:04:24 +1000 Subject: [PATCH 8/8] feat: update etcd to 3.6.10 (#140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated version bump: 3.6.7 → 3.6.10 Reviewed-on: https://git.unkin.net/unkin/rpmbuilder/pulls/140 Co-authored-by: Ben Vincent Co-committed-by: Ben Vincent --- rpms/etcd/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpms/etcd/metadata.yaml b/rpms/etcd/metadata.yaml index 27a42c5..f93fca3 100644 --- a/rpms/etcd/metadata.yaml +++ b/rpms/etcd/metadata.yaml @@ -13,9 +13,9 @@ builds: - almalinux/el8 image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest release: 1 - version: 3.6.7 + version: 3.6.10 - repository: - almalinux/el9 image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest release: 1 - version: 3.6.7 + version: 3.6.10