diff --git a/packaging/copr/Dockerfile b/packaging/copr/Dockerfile index ff95ed68fa..956057a2da 100644 --- a/packaging/copr/Dockerfile +++ b/packaging/copr/Dockerfile @@ -11,20 +11,16 @@ RUN dnf update -y && \ rust \ cargo \ gcc \ + openssl-devel \ tar \ gzip && \ dnf clean all # Install copr-cli via dnf to ensure dependencies are properly managed and to avoid potential issues with manual installation RUN dnf install -y copr-cli && \ - dnf clean all - -# Add mise to PATH -ENV PATH="/root/.local/bin:${PATH}" - -# Install mise and use it to install cargo-vendor -RUN curl https://mise.run | sh -RUN mise use -g cargo-binstall cargo:cargo-vendor + dnf clean all && \ + test "$(readlink -f "$(command -v copr-cli)")" = "/usr/bin/copr-cli" && \ + copr-cli --help >/dev/null # Set up RPM build environment RUN rpmdev-setuptree diff --git a/packaging/copr/build-copr.sh b/packaging/copr/build-copr.sh index ce8f1a3768..85663d8aea 100755 --- a/packaging/copr/build-copr.sh +++ b/packaging/copr/build-copr.sh @@ -12,6 +12,7 @@ MAINTAINER_NAME="${MAINTAINER_NAME:-mise Release Bot}" MAINTAINER_EMAIL="${MAINTAINER_EMAIL:-noreply@mise.jdx.dev}" COPR_OWNER="${COPR_OWNER:-jdxcode}" COPR_PROJECT="${COPR_PROJECT:-mise}" +COPR_BUILD_TIMEOUT="${COPR_BUILD_TIMEOUT:-180000}" DRY_RUN="${DRY_RUN:-false}" # Store the repository root directory @@ -105,6 +106,7 @@ echo "Build Profile: $BUILD_PROFILE" echo "Chroots: $CHROOTS" echo "COPR Owner: $COPR_OWNER" echo "COPR Project: $COPR_PROJECT" +echo "COPR Build Timeout: $COPR_BUILD_TIMEOUT" echo "Maintainer: $MAINTAINER_NAME <$MAINTAINER_EMAIL>" echo "Dry Run: $DRY_RUN" echo "" @@ -288,7 +290,7 @@ if [ "$DRY_RUN" != "true" ]; then # be interpreted as shell syntax, and validate each value against a # conservative chroot pattern before forwarding to copr-cli. IFS=' ' read -ra chroot_array <<<"$CHROOTS" - copr_args=("build") + copr_args=("build" "--timeout" "$COPR_BUILD_TIMEOUT") for chroot in "${chroot_array[@]}"; do [ -z "$chroot" ] && continue if ! [[ "$chroot" =~ ^[A-Za-z0-9._+-]+$ ]]; then