save progress
This commit is contained in:
34
devops/docker/repro-builders/rhel/scripts/mock-build.sh
Normal file
34
devops/docker/repro-builders/rhel/scripts/mock-build.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# RHEL Mock Build Script
|
||||
# Sprint: SPRINT_1227_0002_0001 (Reproducible Builders)
|
||||
#
|
||||
# Builds SRPMs using mock for isolation and reproducibility
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SRPM="${1:-}"
|
||||
RESULT_DIR="${2:-/build/output}"
|
||||
CONFIG="${3:-stellaops-repro}"
|
||||
|
||||
[[ -z "${SRPM}" ]] && { echo "Usage: $0 <srpm> [result_dir] [mock_config]"; exit 1; }
|
||||
[[ ! -f "${SRPM}" ]] && { echo "SRPM not found: ${SRPM}"; exit 1; }
|
||||
|
||||
mkdir -p "${RESULT_DIR}"
|
||||
|
||||
echo "Building SRPM with mock: ${SRPM}"
|
||||
echo "Config: ${CONFIG}"
|
||||
echo "Output: ${RESULT_DIR}"
|
||||
|
||||
# Initialize mock if needed
|
||||
mock -r "${CONFIG}" --init
|
||||
|
||||
# Build with reproducibility settings
|
||||
mock -r "${CONFIG}" \
|
||||
--rebuild "${SRPM}" \
|
||||
--resultdir="${RESULT_DIR}" \
|
||||
--define "SOURCE_DATE_EPOCH ${SOURCE_DATE_EPOCH:-$(date +%s)}" \
|
||||
--define "_buildhost stellaops.build" \
|
||||
--define "debug_package %{nil}"
|
||||
|
||||
echo "Build complete. Results in: ${RESULT_DIR}"
|
||||
ls -la "${RESULT_DIR}"
|
||||
Reference in New Issue
Block a user