From 699187341bc5bad1617433f2f2a7f0bce662f995 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 4 Oct 2025 14:26:56 +1000 Subject: [PATCH] feat: add vals package configuration Add RPM package configuration for vals, a configuration management tool that validates and manages configuration values from various backends. --- rpms/vals/0.42.2/release | 1 + rpms/vals/Dockerfile | 18 +++++++++++++++++ rpms/vals/metadata.yaml | 9 +++++++++ rpms/vals/resources/build.sh | 14 +++++++++++++ rpms/vals/resources/nfpm.yaml | 38 +++++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 rpms/vals/0.42.2/release create mode 100644 rpms/vals/Dockerfile create mode 100644 rpms/vals/metadata.yaml create mode 100755 rpms/vals/resources/build.sh create mode 100644 rpms/vals/resources/nfpm.yaml diff --git a/rpms/vals/0.42.2/release b/rpms/vals/0.42.2/release new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/rpms/vals/0.42.2/release @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/rpms/vals/Dockerfile b/rpms/vals/Dockerfile new file mode 100644 index 0000000..539afe6 --- /dev/null +++ b/rpms/vals/Dockerfile @@ -0,0 +1,18 @@ +FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest + +# Create output directory for RPMs +RUN mkdir -p /app/dist + +# Set working directory +WORKDIR /app + +ARG PACKAGE_RELEASE +ENV PACKAGE_RELEASE=${PACKAGE_RELEASE} +ARG PACKAGE_VERSION +ENV PACKAGE_VERSION=${PACKAGE_VERSION} + +# Copy resources from the context into the container +COPY resources /app/resources + +# Default command to build RPMs +CMD /app/resources/build.sh \ No newline at end of file diff --git a/rpms/vals/metadata.yaml b/rpms/vals/metadata.yaml new file mode 100644 index 0000000..7a3c652 --- /dev/null +++ b/rpms/vals/metadata.yaml @@ -0,0 +1,9 @@ +name: vals +release: 1 +version: 0.42.2 +build: +- distro: el/8 + image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest +- distro: el/9 + image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest +github: helmfile/vals \ No newline at end of file diff --git a/rpms/vals/resources/build.sh b/rpms/vals/resources/build.sh new file mode 100755 index 0000000..1799a31 --- /dev/null +++ b/rpms/vals/resources/build.sh @@ -0,0 +1,14 @@ +#!/usr/bin/bash + +# Download the required files +curl -L -o /app/vals.tar.gz https://github.com/helmfile/vals/releases/download/v${PACKAGE_VERSION}/vals_${PACKAGE_VERSION}_linux_amd64.tar.gz + +# Extract the binary +cd /app +tar -xzf vals.tar.gz + +# Make the binary executable +chmod +x /app/vals + +# Build the RPM +nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm \ No newline at end of file diff --git a/rpms/vals/resources/nfpm.yaml b/rpms/vals/resources/nfpm.yaml new file mode 100644 index 0000000..4593dab --- /dev/null +++ b/rpms/vals/resources/nfpm.yaml @@ -0,0 +1,38 @@ +# nfpm.yaml + +name: vals +version: ${PACKAGE_VERSION} +release: ${PACKAGE_RELEASE} +arch: amd64 +platform: linux +section: default +priority: extra +description: "vals is a Helm-like configuration 'Values' loader with support for various sources and merge strategies" + +maintainer: Helmfile Contributors +homepage: https://github.com/helmfile/vals +license: Apache-2.0 + +disable_globbing: false + +replaces: + - vals + +provides: + - vals + +# Files to include in the package +contents: + - src: /app/vals + dst: /usr/bin/vals + 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 \ No newline at end of file