From 514ea929125f1ee1970a1441056037ac41e6a506 Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 13 Apr 2026 00:33:25 +0000 Subject: [PATCH] Fix RPM build: correct tarball structure, add Source0 to spec, restore script permissions --- build-arch.sh | 0 build-rpm.sh | 12 +++++------- linux-patch-api.spec | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) mode change 100644 => 100755 build-arch.sh diff --git a/build-arch.sh b/build-arch.sh old mode 100644 new mode 100755 diff --git a/build-rpm.sh b/build-rpm.sh index ca711d4..375106c 100755 --- a/build-rpm.sh +++ b/build-rpm.sh @@ -26,13 +26,11 @@ mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} # Create source tarball (required by %autosetup in spec file) echo "Creating source tarball..." VERSION="1.0.0" -tar -czf ~/rpmbuild/SOURCES/linux-patch-api-${VERSION}.tar.gz \ - --exclude='target' \ - --exclude='.git' \ - --exclude='releases' \ - --exclude='.github' \ - --exclude='debian' \ - . +TMPDIR=$(mktemp -d) +mkdir -p "$TMPDIR/linux-patch-api-${VERSION}" +rsync -a --exclude='target' --exclude='.git' --exclude='releases' --exclude='.github' --exclude='debian' ./ "$TMPDIR/linux-patch-api-${VERSION}/" +tar -czf ~/rpmbuild/SOURCES/linux-patch-api-${VERSION}.tar.gz -C "$TMPDIR" "linux-patch-api-${VERSION}" +rm -rf "$TMPDIR" # Copy spec file echo "Preparing spec file..." diff --git a/linux-patch-api.spec b/linux-patch-api.spec index 81a1d61..15f3a45 100644 --- a/linux-patch-api.spec +++ b/linux-patch-api.spec @@ -4,6 +4,7 @@ Release: 1%{?dist} Summary: Secure remote package management API for Linux systems License: MIT URL: https://gitea.moon-dragon.us/echo/linux_patch_api +Source0: linux-patch-api-%{version}.tar.gz BuildArch: x86_64 # Build requirements