#!/usr/bin/env bash set -euo pipefail echo "[centos/dependencies] Installing CentOS build dependencies..." dnf -y update dnf -y install \ git \ rsync \ rpm-build \ make \ gcc \ bash \ curl-minimal \ ca-certificates \ python3 \ python3-pip \ sudo \ xz dnf clean all # ----------------------------------------------------------------------------- # Persist CA bundle configuration system-wide (virgin-compatible) # ----------------------------------------------------------------------------- detect_ca_bundle() { local candidates=( /etc/pki/tls/certs/ca-bundle.crt /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem /etc/ssl/ca-bundle.pem ) for path in "${candidates[@]}"; do if [[ -f "$path" ]]; then echo "$path" return 0 fi done return 1 } CA_BUNDLE="$(detect_ca_bundle || true)" if [[ -n "${CA_BUNDLE}" ]]; then echo "[centos/dependencies] Persisting CA bundle: ${CA_BUNDLE}" # 1) Make it available for login shells cat >/etc/profile.d/pkgmgr-ca.sh <