Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions packaging/copr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
greptile-apps[bot] marked this conversation as resolved.

# Set up RPM build environment
RUN rpmdev-setuptree
4 changes: 3 additions & 1 deletion packaging/copr/build-copr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ""
Expand Down Expand Up @@ -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
Expand Down
Loading