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
+2 -9
View File
@@ -1,4 +1,3 @@
# Start with the AlmaLinux 9 base image
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
@@ -15,11 +14,5 @@ ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
dnf module enable nodejs:20 -y && \
dnf install nodejs npm -y && \
spectool -g -R /app/resources/jellyfin-web_${PACKAGE_VERSION}.spec && \
rpmbuild -ba /app/resources/jellyfin-web_${PACKAGE_VERSION}.spec && \
cp /root/rpmbuild/RPMS/noarch/jellyfin-web-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.noarch.rpm /app/dist/ && \
cp /root/rpmbuild/SRPMS/jellyfin-web-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.src.rpm /app/dist/
# Default command to build RPMs
CMD /app/resources/build.sh
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/bash
# Setup rpmbuild directory structure
mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# Install Node.js for building
dnf module enable nodejs:20 -y
dnf install nodejs npm -y
# Download source files using spectool
spectool -g -R /app/resources/jellyfin-web_${PACKAGE_VERSION}.spec
# Build the RPM
rpmbuild -ba /app/resources/jellyfin-web_${PACKAGE_VERSION}.spec
# Copy the built RPMs to output directory
cp /root/rpmbuild/RPMS/noarch/jellyfin-web-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.noarch.rpm /app/dist/
cp /root/rpmbuild/SRPMS/jellyfin-web-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.src.rpm /app/dist/