# syntax=docker/dockerfile:1 FROM fedora:42 RUN set -eux; \ dnf -y update; \ dnf -y install \ rpm-build \ rpmdevtools \ redhat-rpm-config \ gcc \ make \ findutils \ tar \ gzip \ rsync \ python3 \ python3-devel \ python3-setuptools \ python3-wheel \ pyproject-rpm-macros \ python3-rpm-macros \ python3-yaml \ python3-paramiko \ openssl-devel \ python3-poetry-core ; \ dnf -y clean all # Build runner script (copies repo, tars, runs rpmbuild) RUN set -eux; cat > /usr/local/bin/build-rpm <<'EOF' #!/usr/bin/env bash set -euo pipefail SRC="${SRC:-/src}" WORKROOT="${WORKROOT:-/work}" OUT="${OUT:-/out}" DEPS_DIR="${DEPS_DIR:-/deps}" # Install jinjaturtle from local rpm # Filter out .src.rpm and debug* subpackages if present. if [ -d "${DEPS_DIR}" ] && compgen -G "${DEPS_DIR}/*.rpm" > /dev/null; then mapfile -t rpms < <(ls -1 "${DEPS_DIR}"/*.rpm | grep -vE '(\.src\.rpm$|-(debuginfo|debugsource)-)') if [ "${#rpms[@]}" -gt 0 ]; then echo "Installing dependency RPMs from ${DEPS_DIR}:" printf ' - %s\n' "${rpms[@]}" dnf -y install "${rpms[@]}" dnf -y clean all else echo "NOTE: Only src/debug RPMs found in ${DEPS_DIR}; nothing installed." >&2 fi else echo "NOTE: No RPMs found in ${DEPS_DIR}. If the build fails with missing python3dist(jinjaturtle)," >&2 echo " mount your jinjaturtle RPM directory as -v