mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-29 04:07:35 +00:00
Expose verified RPM artifact production through a repository Make target. Use Docker only as the Rocky Linux and Oracle Linux toolchain, keep the source worktree read-only and support the selected UEK package layouts.
44 lines
1022 B
Docker
44 lines
1022 B
Docker
ARG BASE_IMAGE
|
|
FROM ${BASE_IMAGE}
|
|
|
|
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
|
|
|
ARG KERNEL_PACKAGE=kernel
|
|
ARG KERNEL_VERSION
|
|
ARG KERNEL_REPOSITORY=
|
|
|
|
ENV LANG=C \
|
|
LC_ALL=C
|
|
|
|
RUN : "${KERNEL_PACKAGE:?KERNEL_PACKAGE is required}" \
|
|
&& : "${KERNEL_VERSION:?KERNEL_VERSION is required}" \
|
|
&& repo_args=() \
|
|
&& if [[ -n "${KERNEL_REPOSITORY}" ]]; then \
|
|
repo_args+=(--enablerepo="${KERNEL_REPOSITORY}"); \
|
|
fi \
|
|
&& dnf -y install \
|
|
bzip2 \
|
|
elfutils-libelf-devel \
|
|
findutils \
|
|
gcc \
|
|
git \
|
|
kmod \
|
|
make \
|
|
openssl \
|
|
perl \
|
|
perl-Data-Dumper \
|
|
perl-devel \
|
|
perl-ExtUtils-MakeMaker \
|
|
redhat-rpm-config \
|
|
rpm-build \
|
|
systemd-rpm-macros \
|
|
tar \
|
|
which \
|
|
&& dnf -y "${repo_args[@]}" install \
|
|
"${KERNEL_PACKAGE}-${KERNEL_VERSION}" \
|
|
"${KERNEL_PACKAGE}-devel-${KERNEL_VERSION}" \
|
|
&& dnf clean all \
|
|
&& rm -rf /var/cache/dnf
|
|
|
|
CMD ["/bin/bash"]
|