From 1498ff17e8f7f2fd369ac83fe51f1471181de0e6 Mon Sep 17 00:00:00 2001 From: Tom Foster Date: Sun, 31 Aug 2025 16:43:41 +0100 Subject: [PATCH] fix(ci): Correct SRPM architecture to prevent binary RPM overwrite Source RPMs were incorrectly being registered with x86_64 architecture instead of 'src', causing them to overwrite the binary RPM in the package registry. This resulted in the 16MB binary being replaced by the 847KB source package. SRPMs now correctly use 'src' architecture. --- .forgejo/workflows/build-fedora.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/build-fedora.yml b/.forgejo/workflows/build-fedora.yml index 320ca146..1f601a9b 100644 --- a/.forgejo/workflows/build-fedora.yml +++ b/.forgejo/workflows/build-fedora.yml @@ -349,7 +349,8 @@ jobs: RPM=$(find artifacts -name "continuwuity-*.rpm" \ ! -name "*debuginfo*" \ ! -name "*debugsource*" \ - ! -name "*.src.rpm" | head -1) + ! -name "*.src.rpm" \ + -type f | head -1) if [ -z "$RPM" ]; then echo "No binary RPM found to publish" @@ -406,9 +407,8 @@ jobs: echo "" echo "Publishing source RPM: $(basename "$SRPM")" - # Extract SRPM info for deletion - SRPM_INFO=$(rpm -qpi "$SRPM" 2>/dev/null) - SRPM_ARCH=$(echo "$SRPM_INFO" | grep "^Architecture" | awk '{print $2}') + # SRPMs always have architecture "src" + SRPM_ARCH="src" # Try to delete existing SRPM first (using same name/version as binary RPM) echo "Removing any existing SRPM: $PACKAGE_NAME-$FULL_VERSION.$SRPM_ARCH"