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:
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Install dependencies
|
||||
dnf install -y unzip
|
||||
|
||||
# Download and extract packer
|
||||
wget -O /app/packer.zip https://releases.hashicorp.com/packer/${PACKAGE_VERSION}/packer_${PACKAGE_VERSION}_linux_amd64.zip
|
||||
unzip packer.zip
|
||||
|
||||
# Build the RPM
|
||||
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||
@@ -0,0 +1,38 @@
|
||||
# nfpm.yaml
|
||||
|
||||
name: packer
|
||||
version: ${PACKAGE_VERSION}
|
||||
release: ${PACKAGE_RELEASE}
|
||||
arch: amd64
|
||||
platform: linux
|
||||
section: default
|
||||
priority: extra
|
||||
description: "Create identical images for multiple platforms from a single source configuration."
|
||||
|
||||
maintainer: HashiCorp
|
||||
homepage: https://www.packer.io/
|
||||
license: BUSL-1.1
|
||||
|
||||
disable_globbing: false
|
||||
|
||||
replaces:
|
||||
- packer
|
||||
|
||||
provides:
|
||||
- packer
|
||||
|
||||
# Files to include in the package
|
||||
contents:
|
||||
- src: /app/packer
|
||||
dst: /usr/bin/packer
|
||||
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
|
||||
Reference in New Issue
Block a user