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:
parent
20952727ba
commit
325b830952
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN wget -O /app/boilerplate https://github.com/gruntwork-io/boilerplate/releases/download/v${PACKAGE_VERSION}/boilerplate_linux_amd64
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
7
rpms/boilerplate/resources/build.sh
Executable file
7
rpms/boilerplate/resources/build.sh
Executable 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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
8
rpms/cni-plugins/resources/build.sh
Executable file
8
rpms/cni-plugins/resources/build.sh
Executable 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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,14 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/consul-cni/resources/build.sh
Executable file
11
rpms/consul-cni/resources/build.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
dnf install -y unzip
|
||||||
|
|
||||||
|
# Download and extract consul-cni
|
||||||
|
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
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/consul/resources/build.sh
Executable file
11
rpms/consul/resources/build.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
dnf install -y unzip
|
||||||
|
|
||||||
|
# Download and extract consul
|
||||||
|
wget -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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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/
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# 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/resources/build.sh
Executable file
9
rpms/etcd/resources/build.sh
Executable 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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,14 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
10
rpms/g10k/resources/build.sh
Executable file
10
rpms/g10k/resources/build.sh
Executable 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
|
||||||
@ -1,4 +1,3 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
|
||||||
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
@ -12,44 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||||
|
|
||||||
COPY scripts /app/scripts
|
# Copy resources from the context into the container
|
||||||
COPY resources /app/resources
|
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
|
# Default command to build RPMs
|
||||||
CMD /app/scripts/build-packages.sh
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
52
rpms/incus/resources/build.sh
Executable file
52
rpms/incus/resources/build.sh
Executable 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 \
|
||||||
|
wget
|
||||||
|
|
||||||
|
# Download and extract incus source
|
||||||
|
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
|
||||||
|
|
||||||
|
# Install specific Go version
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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
|
||||||
@ -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
|
|
||||||
@ -1,4 +1,3 @@
|
|||||||
# Start with the AlmaLinux 9 base image
|
|
||||||
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
@ -15,9 +14,5 @@ ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
|||||||
# Copy resources from the context into the container
|
# Copy resources from the context into the container
|
||||||
COPY resources /app/resources
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
# Default command to build RPMs
|
||||||
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
|
CMD /app/resources/build.sh
|
||||||
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
|
|
||||||
|
|||||||
14
rpms/jellyfin-ffmpeg-bin/resources/build.sh
Executable file
14
rpms/jellyfin-ffmpeg-bin/resources/build.sh
Executable 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
|
||||||
@ -1,4 +1,3 @@
|
|||||||
# Start with the AlmaLinux 9 base image
|
|
||||||
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
@ -15,12 +14,5 @@ ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
|||||||
# Copy resources from the context into the container
|
# Copy resources from the context into the container
|
||||||
COPY resources /app/resources
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
# Default command to build RPMs
|
||||||
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
|
CMD /app/resources/build.sh
|
||||||
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/
|
|
||||||
|
|||||||
21
rpms/jellyfin-server/resources/build.sh
Executable file
21
rpms/jellyfin-server/resources/build.sh
Executable 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/
|
||||||
@ -1,4 +1,3 @@
|
|||||||
# Start with the AlmaLinux 9 base image
|
|
||||||
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
@ -15,11 +14,5 @@ ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
|||||||
# Copy resources from the context into the container
|
# Copy resources from the context into the container
|
||||||
COPY resources /app/resources
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
# Default command to build RPMs
|
||||||
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
|
CMD /app/resources/build.sh
|
||||||
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/
|
|
||||||
|
|||||||
18
rpms/jellyfin-web/resources/build.sh
Executable file
18
rpms/jellyfin-web/resources/build.sh
Executable 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/
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Compile the binaries
|
|
||||||
RUN GOBIN=/app go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v${PACKAGE_VERSION}
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
7
rpms/nfpm/resources/build.sh
Executable file
7
rpms/nfpm/resources/build.sh
Executable 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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/nomad-autoscaler/resources/build.sh
Executable file
11
rpms/nomad-autoscaler/resources/build.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
dnf install -y unzip
|
||||||
|
|
||||||
|
# Download and extract nomad-autoscaler
|
||||||
|
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
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/nomad/resources/build.sh
Executable file
11
rpms/nomad/resources/build.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
dnf install -y unzip
|
||||||
|
|
||||||
|
# Download and extract nomad
|
||||||
|
wget -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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,9 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
# Default command to build RPMs
|
||||||
RUN wget -O /app/dist/nzbget-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm \
|
CMD /app/resources/build.sh
|
||||||
https://github.com/nzbgetcom/nzbget/releases/download/v$PACKAGE_VERSION/nzbget-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm
|
|
||||||
|
|||||||
5
rpms/nzbget/resources/build.sh
Executable file
5
rpms/nzbget/resources/build.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Download the pre-built RPM from GitHub releases
|
||||||
|
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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/packer/resources/build.sh
Executable file
11
rpms/packer/resources/build.sh
Executable file
@ -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
|
||||||
@ -1,4 +1,3 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
|
||||||
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
@ -12,8 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||||
|
|
||||||
COPY scripts /app/scripts
|
# Copy resources from the context into the container
|
||||||
COPY resources /app/resources
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD /app/scripts/build-packages.sh
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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/
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# 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/resources/build.sh
Executable file
9
rpms/ruff/resources/build.sh
Executable 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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/terraform/resources/build.sh
Executable file
11
rpms/terraform/resources/build.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
dnf install -y unzip
|
||||||
|
|
||||||
|
# Download and extract terraform
|
||||||
|
wget -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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,11 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN wget -O /app/terragrunt https://github.com/gruntwork-io/terragrunt/releases/download/v${PACKAGE_VERSION}/terragrunt_linux_amd64
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
7
rpms/terragrunt/resources/build.sh
Executable file
7
rpms/terragrunt/resources/build.sh
Executable 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
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,12 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
COPY scripts /app/scripts
|
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN curl -o /app/UNKIN_ROOTCA_2024.crt https://vault.query.consul:8200/v1/pki_root/ca/pem
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
7
rpms/unkin-ca-certificates/resources/build.sh
Executable file
7
rpms/unkin-ca-certificates/resources/build.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Download the CA certificate from vault
|
||||||
|
curl -o /app/UNKIN_ROOTCA_2024.crt https://vault.query.consul:8200/v1/pki_root/ca/pem
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,14 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN export DOWNLOAD_VERSION=$(echo $PACKAGE_VERSION | sed s/\\.//) && \
|
|
||||||
wget -O /app/rarlinux.tar.gz https://www.rarlab.com/rar/rarlinux-x64-${DOWNLOAD_VERSION}.tar.gz && \
|
|
||||||
tar xf /app/rarlinux.tar.gz && \
|
|
||||||
mv /app/rar/unrar /app/
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
10
rpms/unrar/resources/build.sh
Executable file
10
rpms/unrar/resources/build.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Download and extract unrar (with version formatting)
|
||||||
|
export DOWNLOAD_VERSION=$(echo $PACKAGE_VERSION | sed s/\\.//)
|
||||||
|
wget -O /app/rarlinux.tar.gz https://www.rarlab.com/rar/rarlinux-x64-${DOWNLOAD_VERSION}.tar.gz
|
||||||
|
tar xf /app/rarlinux.tar.gz
|
||||||
|
mv /app/rar/unrar /app/
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN wget -O /app/uv-x86_64-unknown-linux-gnu.tar.gz https://github.com/astral-sh/uv/releases/download/${PACKAGE_VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz && \
|
|
||||||
tar xf /app/uv-x86_64-unknown-linux-gnu.tar.gz && \
|
|
||||||
mv /app/uv-x86_64-unknown-linux-gnu/* /app/
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
9
rpms/uv/resources/build.sh
Executable file
9
rpms/uv/resources/build.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Download and extract uv
|
||||||
|
wget -O /app/uv-x86_64-unknown-linux-gnu.tar.gz https://github.com/astral-sh/uv/releases/download/${PACKAGE_VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
tar xf /app/uv-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
mv /app/uv-x86_64-unknown-linux-gnu/* /app/
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -1,5 +1,4 @@
|
|||||||
# Start with the AlmaLinux 8.10 base image
|
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||||
FROM git.unkin.net/unkin/almalinux8-rpmbuilder:latest
|
|
||||||
|
|
||||||
# Create output directory for RPMs
|
# Create output directory for RPMs
|
||||||
RUN mkdir -p /app/dist
|
RUN mkdir -p /app/dist
|
||||||
@ -12,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN dnf install -y unzip && \
|
|
||||||
wget -O /app/vault.zip https://releases.hashicorp.com/vault/${PACKAGE_VERSION}/vault_${PACKAGE_VERSION}_linux_amd64.zip && \
|
|
||||||
unzip vault.zip
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
11
rpms/vault/resources/build.sh
Executable file
11
rpms/vault/resources/build.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
dnf install -y unzip
|
||||||
|
|
||||||
|
# Download and extract vault
|
||||||
|
wget -O /app/vault.zip https://releases.hashicorp.com/vault/${PACKAGE_VERSION}/vault_${PACKAGE_VERSION}_linux_amd64.zip
|
||||||
|
unzip vault.zip
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -11,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN wget -O /app/victoria-logs-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
|
|
||||||
https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v${PACKAGE_VERSION}/victoria-logs-linux-amd64-v${PACKAGE_VERSION}.tar.gz && \
|
|
||||||
tar xf victoria-logs-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
9
rpms/victoria-logs/resources/build.sh
Executable file
9
rpms/victoria-logs/resources/build.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Download and extract victoria-logs
|
||||||
|
wget -O /app/victoria-logs-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
|
||||||
|
https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v${PACKAGE_VERSION}/victoria-logs-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||||
|
tar xf victoria-logs-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -11,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN wget -O /app/vlutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
|
|
||||||
https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v${PACKAGE_VERSION}/vlutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz && \
|
|
||||||
tar xf vlutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
9
rpms/vlutils/resources/build.sh
Executable file
9
rpms/vlutils/resources/build.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Download and extract vlutils
|
||||||
|
wget -O /app/vlutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz \
|
||||||
|
https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v${PACKAGE_VERSION}/vlutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||||
|
tar xf vlutils-linux-amd64-v${PACKAGE_VERSION}.tar.gz
|
||||||
|
|
||||||
|
# Build the RPM
|
||||||
|
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||||
@ -11,13 +11,8 @@ ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
|||||||
ARG PACKAGE_VERSION
|
ARG PACKAGE_VERSION
|
||||||
ENV PACKAGE_VERSION=${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 nfpm.yaml /app/nfpm.yaml
|
COPY resources /app/resources
|
||||||
|
|
||||||
# Download the required files
|
|
||||||
RUN 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
|
|
||||||
|
|
||||||
# Default command to build RPMs
|
# Default command to build RPMs
|
||||||
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|
CMD /app/resources/build.sh
|
||||||
|
|||||||
9
rpms/vmutils/resources/build.sh
Executable file
9
rpms/vmutils/resources/build.sh
Executable 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
|
||||||
Loading…
Reference in New Issue
Block a user