refactor/standardize-dockerfile-build-structure #60

Merged
unkinben merged 4 commits from refactor/standardize-dockerfile-build-structure into master 2025-09-30 21:03:14 +10:00
146 changed files with 793 additions and 312 deletions

View File

@ -0,0 +1,8 @@
name: act_runner
release: 1
version: 0.2.12
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -11,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus-community/bind_exporter/releases/download/v${PACKAGE_VERSION}/bind_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: bind_exporter
release: 1
version: 0.8.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -1,2 +1,6 @@
#!/usr/bin/bash
# Download the required files
curl --output - -L https://github.com/prometheus-community/bind_exporter/releases/download/v${PACKAGE_VERSION}/bind_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN wget -O /app/boilerplate https://github.com/gruntwork-io/boilerplate/releases/download/v${PACKAGE_VERSION}/boilerplate_linux_amd64
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: boilerplate
release: 1
version: 0.6.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: gruntwork-io/boilerplate

View File

@ -0,0 +1,7 @@
#!/usr/bin/bash
# Download the required files
wget -O /app/boilerplate https://github.com/gruntwork-io/boilerplate/releases/download/v${PACKAGE_VERSION}/boilerplate_linux_amd64
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
COPY scripts /app/scripts
# Download the required files
RUN wget -O /app/cni-plugins-linux-amd64.tgz https://github.com/containernetworking/plugins/releases/download/v${PACKAGE_VERSION}/cni-plugins-linux-amd64-v${PACKAGE_VERSION}.tgz && \
tar xf cni-plugins-linux-amd64.tgz
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: cni-plugins
release: 1
version: 1.7.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: containernetworking/plugins

View File

@ -0,0 +1,8 @@
#!/usr/bin/bash
# Download and extract cni-plugins
wget -O /app/cni-plugins-linux-amd64.tgz https://github.com/containernetworking/plugins/releases/download/v${PACKAGE_VERSION}/cni-plugins-linux-amd64-v${PACKAGE_VERSION}.tgz
tar xf cni-plugins-linux-amd64.tgz
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,14 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
COPY scripts /app/scripts
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/consul-cni.zip https://releases.hashicorp.com/consul-cni/${PACKAGE_VERSION}/consul-cni_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip consul-cni.zip
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: consul-cni
release: 1
version: 1.7.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,11 @@
#!/usr/bin/bash
# Install dependencies
dnf install -y unzip
# Download and extract consul-cni
curl -o /app/consul-cni.zip https://releases.hashicorp.com/consul-cni/${PACKAGE_VERSION}/consul-cni_${PACKAGE_VERSION}_linux_amd64.zip
unzip consul-cni.zip
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/consul.zip https://releases.hashicorp.com/consul/${PACKAGE_VERSION}/consul_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip consul.zip
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: consul
release: 1
version: 1.21.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

11
rpms/consul/resources/build.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/bash
# Install dependencies
dnf install -y unzip
# Download and extract consul
curl -o /app/consul.zip https://releases.hashicorp.com/consul/${PACKAGE_VERSION}/consul_${PACKAGE_VERSION}_linux_amd64.zip
unzip consul.zip
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN wget -O /app/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz https://github.com/etcd-io/etcd/releases/download/v${PACKAGE_VERSION}/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz && \
tar xf /app/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz && \
mv /app/etcd-v${PACKAGE_VERSION}-linux-amd64/* /app/
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

9
rpms/etcd/metadata.yaml Normal file
View File

@ -0,0 +1,9 @@
name: etcd
release: 2
version: 3.5.18
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: etcd-io/etcd

9
rpms/etcd/resources/build.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/bash
# Download and extract etcd
wget -O /app/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz https://github.com/etcd-io/etcd/releases/download/v${PACKAGE_VERSION}/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz
tar xf /app/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz
mv /app/etcd-v${PACKAGE_VERSION}-linux-amd64/* /app/
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -11,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/onedr0p/exportarr/releases/download/v${PACKAGE_VERSION}/exportarr_${PACKAGE_VERSION}_linux_amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: exportarr
release: 1
version: 2.2.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -1,2 +1,6 @@
#!/usr/bin/bash
# Download the required files
curl --output - -L https://github.com/onedr0p/exportarr/releases/download/v${PACKAGE_VERSION}/exportarr_${PACKAGE_VERSION}_linux_amd64.tar.gz | tar --strip-components=1 -xzf -
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -0,0 +1,9 @@
name: frr_exporter
release: 1
version: 1.8.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: tynany/frr_exporter

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,14 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN wget -O /app/g10k.zip https://github.com/xorpaul/g10k/releases/download/v${PACKAGE_VERSION}/g10k-v${PACKAGE_VERSION}-linux-amd64.zip && \
pushd /app && \
unzip /app/g10k.zip && \
popd
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

9
rpms/g10k/metadata.yaml Normal file
View File

@ -0,0 +1,9 @@
name: g10k
release: 1
version: 0.9.10
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: xorpaul/g10k

10
rpms/g10k/resources/build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/bash
# Download and extract g10k
wget -O /app/g10k.zip https://github.com/xorpaul/g10k/releases/download/v${PACKAGE_VERSION}/g10k-v${PACKAGE_VERSION}-linux-amd64.zip
pushd /app
unzip /app/g10k.zip
popd
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,4 +1,3 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
@ -12,44 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
COPY scripts /app/scripts
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN dnf install -y \
unzip \
libtool \
autoconf \
automake \
gcc \
make \
git \
go \
cowsql-devel \
libacl-devel \
libcap-devel \
libseccomp-devel \
libuv-devel \
raft-devel \
libudev-devel \
lxc-devel \
libsqlite3x-devel \
sqlite-devel \
systemd-rpm-macros \
bash-completion \
gettext \
help2man \
wget && \
wget -O /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz && tar -C /app -xf incus.tar.gz && \
wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz && \
export PATH=/usr/local/go/bin:$PATH && \
pushd /app/incus-${PACKAGE_VERSION} && \
make deps && \
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/" && \
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/" && \
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/" && \
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" && \
make build
# Default command to build RPMs
CMD /app/scripts/build-packages.sh
CMD /app/resources/build.sh

9
rpms/incus/metadata.yaml Normal file
View File

@ -0,0 +1,9 @@
name: incus
release: 1
version: 6.10.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: lxc/incus

52
rpms/incus/resources/build.sh Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/bash
# Install build dependencies
dnf install -y \
unzip \
libtool \
autoconf \
automake \
gcc \
make \
git \
go \
cowsql-devel \
libacl-devel \
libcap-devel \
libseccomp-devel \
libuv-devel \
raft-devel \
libudev-devel \
lxc-devel \
libsqlite3x-devel \
sqlite-devel \
systemd-rpm-macros \
bash-completion \
gettext \
help2man \
curl
# Download and extract incus source
curl -o /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz
tar -C /app -xf incus.tar.gz
# Install specific Go version
curl -O https://go.dev/dl/go1.24.1.linux-amd64.tar.gz
rm -rf /usr/local/go
tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz
# Set up Go environment and build incus
export PATH=/usr/local/go/bin:$PATH
pushd /app/incus-${PACKAGE_VERSION}
make deps
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/"
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/"
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
make build
popd
# Build the RPMs
nfpm pkg --config /app/resources/nfpm_incus.yaml --target /app/dist --packager rpm
nfpm pkg --config /app/resources/nfpm_incus-client.yaml --target /app/dist --packager rpm
nfpm pkg --config /app/resources/nfpm_incus-tools.yaml --target /app/dist --packager rpm

View File

@ -1,4 +0,0 @@
#!/usr/bin/bash
nfpm pkg --config /app/resources/nfpm_incus.yaml --target /app/dist --packager rpm && \
nfpm pkg --config /app/resources/nfpm_incus-client.yaml --target /app/dist --packager rpm && \
nfpm pkg --config /app/resources/nfpm_incus-tools.yaml --target /app/dist --packager rpm

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,9 +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} && \
spectool -g -R /app/resources/jellyfin-ffmpeg-bin_${PACKAGE_VERSION}.spec && \
rpmbuild -ba /app/resources/jellyfin-ffmpeg-bin_${PACKAGE_VERSION}.spec && \
cp /root/rpmbuild/RPMS/x86_64/jellyfin-ffmpeg-bin-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.*.rpm /app/dist/ && \
cp /root/rpmbuild/SRPMS/jellyfin-ffmpeg-bin-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.*.rpm /app/dist
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: jellyfin-ffmpeg-bin
release: 3
version: 7.1.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,14 @@
#!/usr/bin/bash
# Setup rpmbuild directory structure
mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# Download source files using spectool
spectool -g -R /app/resources/jellyfin-ffmpeg-bin_${PACKAGE_VERSION}.spec
# Build the RPM
rpmbuild -ba /app/resources/jellyfin-ffmpeg-bin_${PACKAGE_VERSION}.spec
# Copy the built RPMs to output directory
cp /root/rpmbuild/RPMS/x86_64/jellyfin-ffmpeg-bin-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.*.rpm /app/dist/
cp /root/rpmbuild/SRPMS/jellyfin-ffmpeg-bin-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.*.rpm /app/dist

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,12 +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 install dotnet-sdk-8.0 -y && \
spectool -g -R /app/resources/jellyfin-server_${PACKAGE_VERSION}.spec && \
cp /app/resources/fix-envfile-path.patch /root/rpmbuild/SOURCES/fix-envfile-path.patch && \
cp /app/resources/tmpfiles.conf /root/rpmbuild/SOURCES/tmpfiles.conf && \
rpmbuild -ba /app/resources/jellyfin-server_${PACKAGE_VERSION}.spec && \
cp /root/rpmbuild/RPMS/x86_64/jellyfin-server-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm /app/dist/ && \
cp /root/rpmbuild/SRPMS/jellyfin-server-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.src.rpm /app/dist/
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: jellyfin-server
release: 1
version: 10.10.7
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,21 @@
#!/usr/bin/bash
# Setup rpmbuild directory structure
mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# Install .NET SDK for building
dnf install dotnet-sdk-8.0 -y
# Download source files using spectool
spectool -g -R /app/resources/jellyfin-server_${PACKAGE_VERSION}.spec
# Copy additional files to SOURCES
cp /app/resources/fix-envfile-path.patch /root/rpmbuild/SOURCES/fix-envfile-path.patch
cp /app/resources/tmpfiles.conf /root/rpmbuild/SOURCES/tmpfiles.conf
# Build the RPM
rpmbuild -ba /app/resources/jellyfin-server_${PACKAGE_VERSION}.spec
# Copy the built RPMs to output directory
cp /root/rpmbuild/RPMS/x86_64/jellyfin-server-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm /app/dist/
cp /root/rpmbuild/SRPMS/jellyfin-server-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.src.rpm /app/dist/

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

View File

@ -0,0 +1,8 @@
name: jellyfin-web
release: 1
version: 10.10.7
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

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/

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Compile the binaries
RUN GOBIN=/app go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v${PACKAGE_VERSION}
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

9
rpms/nfpm/metadata.yaml Normal file
View File

@ -0,0 +1,9 @@
name: nfpm
release: 1
version: 2.41.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: goreleaser/nfpm

7
rpms/nfpm/resources/build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/bash
# Compile nfpm binary using Go
GOBIN=/app go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v${PACKAGE_VERSION}
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -11,11 +11,9 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus/node_exporter/releases/download/v${PACKAGE_VERSION}/node_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: node_exporter
release: 1
version: 1.9.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -1,2 +1,6 @@
#!/usr/bin/bash
# Download the required files
curl --output - -L https://github.com/prometheus/node_exporter/releases/download/v${PACKAGE_VERSION}/node_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/nomad-autoscaler.zip https://releases.hashicorp.com/nomad-autoscaler/${PACKAGE_VERSION}/nomad-autoscaler_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip nomad-autoscaler.zip
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: nomad-autoscaler
release: 1
version: 0.4.6
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,11 @@
#!/usr/bin/bash
# Install dependencies
dnf install -y unzip
# Download and extract nomad-autoscaler
curl -o /app/nomad-autoscaler.zip https://releases.hashicorp.com/nomad-autoscaler/${PACKAGE_VERSION}/nomad-autoscaler_${PACKAGE_VERSION}_linux_amd64.zip
unzip nomad-autoscaler.zip
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/nomad.zip https://releases.hashicorp.com/nomad/${PACKAGE_VERSION}/nomad_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip nomad.zip
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

8
rpms/nomad/metadata.yaml Normal file
View File

@ -0,0 +1,8 @@
name: nomad
release: 1
version: 1.10.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

11
rpms/nomad/resources/build.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/bash
# Install dependencies
dnf install -y unzip
# Download and extract nomad
curl -o /app/nomad.zip https://releases.hashicorp.com/nomad/${PACKAGE_VERSION}/nomad_${PACKAGE_VERSION}_linux_amd64.zip
unzip nomad.zip
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,9 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN wget -O /app/dist/nzbget-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm \
https://github.com/nzbgetcom/nzbget/releases/download/v$PACKAGE_VERSION/nzbget-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: nzbget
release: 1
version: '25.0'
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: nzbgetcom/nzbget

5
rpms/nzbget/resources/build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/bash
# Download the pre-built RPM from GitHub releases
curl -o /app/dist/nzbget-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm \
https://github.com/nzbgetcom/nzbget/releases/download/v$PACKAGE_VERSION/nzbget-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm

View File

@ -0,0 +1,9 @@
name: nzbget_exporter
release: 1
version: 2025.08.03
github: frebib/nzbget-exporter
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/packer.zip https://releases.hashicorp.com/packer/${PACKAGE_VERSION}/packer_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip packer.zip
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: packer
release: 1
version: 1.13.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

11
rpms/packer/resources/build.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/bash
# Install dependencies
dnf install -y unzip
# Download and extract packer
curl -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

View File

@ -11,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus-community/pgbouncer_exporter/releases/download/v${PACKAGE_VERSION}/pgbouncer_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: pgbouncer_exporter
release: 1
version: 0.11.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -1,2 +1,6 @@
#!/usr/bin/bash
# Download the required files
curl --output - -L https://github.com/prometheus-community/pgbouncer_exporter/releases/download/v${PACKAGE_VERSION}/pgbouncer_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -11,11 +11,9 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
# Copy resources from the context into the container
COPY resources /app/resources
# Download the required files
RUN curl --output - -L https://github.com/prometheus-community/postgres_exporter/releases/download/v${PACKAGE_VERSION}/postgres_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
# Default command to build RPMs
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: postgres_exporter
release: 1
version: 0.17.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -1,2 +1,6 @@
#!/usr/bin/bash
# Download the required files
curl --output - -L https://github.com/prometheus-community/postgres_exporter/releases/download/v${PACKAGE_VERSION}/postgres_exporter-${PACKAGE_VERSION}.linux-amd64.tar.gz | tar --strip-components=1 -xzf -
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,4 +1,3 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
@ -12,8 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
COPY scripts /app/scripts
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/scripts/build-packages.sh
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: puppet-initial
release: 1
version: 1.0.3
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,9 @@
name: puppetdb_exporter
release: 1
version: 1.1.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: camptocamp/prometheus-puppetdb-exporter

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN wget -O /app/ruff-x86_64-unknown-linux-gnu.tar.gz https://github.com/astral-sh/ruff/releases/download/${PACKAGE_VERSION}/ruff-x86_64-unknown-linux-gnu.tar.gz && \
tar xf /app/ruff-x86_64-unknown-linux-gnu.tar.gz && \
mv /app/ruff-x86_64-unknown-linux-gnu/* /app/
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

9
rpms/ruff/metadata.yaml Normal file
View File

@ -0,0 +1,9 @@
name: ruff
release: 6
version: 0.8.1
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: astral-sh/ruff

9
rpms/ruff/resources/build.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/bash
# Download and extract ruff
wget -O /app/ruff-x86_64-unknown-linux-gnu.tar.gz https://github.com/astral-sh/ruff/releases/download/${PACKAGE_VERSION}/ruff-x86_64-unknown-linux-gnu.tar.gz
tar xf /app/ruff-x86_64-unknown-linux-gnu.tar.gz
mv /app/ruff-x86_64-unknown-linux-gnu/* /app/
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN dnf install -y unzip && \
wget -O /app/terraform.zip https://releases.hashicorp.com/terraform/${PACKAGE_VERSION}/terraform_${PACKAGE_VERSION}_linux_amd64.zip && \
unzip terraform.zip
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,8 @@
name: terraform
release: 1
version: 1.5.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest

View File

@ -0,0 +1,11 @@
#!/usr/bin/bash
# Install dependencies
dnf install -y unzip
# Download and extract terraform
curl -o /app/terraform.zip https://releases.hashicorp.com/terraform/${PACKAGE_VERSION}/terraform_${PACKAGE_VERSION}_linux_amd64.zip
unzip terraform.zip
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

View File

@ -1,5 +1,4 @@
# Start with the AlmaLinux 8.10 base image
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
@ -12,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Download the required files
RUN wget -O /app/terragrunt https://github.com/gruntwork-io/terragrunt/releases/download/v${PACKAGE_VERSION}/terragrunt_linux_amd64
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
CMD /app/resources/build.sh

View File

@ -0,0 +1,9 @@
name: terragrunt
release: 1
version: 0.81.0
build:
- distro: el/8
image: git.unkin.net/unkin/almalinux8-rpmbuilder:latest
- distro: el/9
image: git.unkin.net/unkin/almalinux9-rpmbuilder:latest
github: gruntwork-io/terragrunt

View File

@ -0,0 +1,7 @@
#!/usr/bin/bash
# Download terragrunt binary
wget -O /app/terragrunt https://github.com/gruntwork-io/terragrunt/releases/download/v${PACKAGE_VERSION}/terragrunt_linux_amd64
# Build the RPM
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm

Some files were not shown because too many files have changed in this diff Show More