refactor: standardize Dockerfile and build script structure

Standardize all RPM packages to use a consistent build pattern:
- Simple Dockerfiles that copy resources/ and call build.sh
- Move all build logic to resources/build.sh scripts
- Consolidate nfpm.yaml and scripts into resources/ directory
- Update base image to almalinux9-rpmbuilder for consistency

Changes:
- Refactored 37 packages total (simple + complex)
- HashiCorp tools: consul, vault, terraform, terragrunt, packer, nomad, nomad-autoscaler
- Development tools: g10k, etcd, nfpm, ruff, uv, unrar, nzbget, boilerplate
- VictoriaMetrics: vlutils, vmutils, victoria-logs
- Network tools: cni-plugins, consul-cni, unkin-ca-certificates
- Jellyfin suite: jellyfin-web, jellyfin-server, jellyfin-ffmpeg-bin
- System packages: puppet-initial, incus

This standardization improves maintainability and consistency across
the entire RPM build system while preserving all existing functionality.
This commit is contained in:
2025-09-28 22:17:46 +10:00
parent 20952727ba
commit 325b830952
85 changed files with 389 additions and 269 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/bash
# Download and extract vmutils
wget -O /app/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${PACKAGE_VERSION}/vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
tar xf vmutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
+66
View File
@@ -0,0 +1,66 @@
# nfpm.yaml
name: vmutils
version: ${PACKAGE_VERSION}
release: ${PACKAGE_RELEASE}
arch: amd64
platform: linux
section: default
priority: extra
description: "VictoriaMetrics utilities: fast, cost-effective monitoring solution and time series database."
maintainer: VictoriaMetrics
homepage: https://github.com/VictoriaMetrics/VictoriaMetrics
license: Apache-2.0 license
disable_globbing: false
replaces:
- vmutils
provides:
- vmalert-tool
- vmauth
- vmbackup
- vmctl
- vmrestore
# Files to include in the package
contents:
- src: /app/vmalert-tool-prod
dst: /usr/bin/vmalert-tool
file_info:
mode: 0755
owner: root
group: root
- src: /app/vmauth-prod
dst: /usr/bin/vmauth
file_info:
mode: 0755
owner: root
group: root
- src: /app/vmbackup-prod
dst: /usr/bin/vmbackup
file_info:
mode: 0755
owner: root
group: root
- src: /app/vmctl-prod
dst: /usr/bin/vmctl
file_info:
mode: 0755
owner: root
group: root
- src: /app/vmrestore-prod
dst: /usr/bin/vmrestore
file_info:
mode: 0755
owner: root
group: root
# Scripts to run during installation/removal (optional)
# scripts:
# preinstall: ./scripts/preinstall.sh
# postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh
# postremove: ./scripts/postremove.sh