Skip to content

Commit e521fa7

Browse files
marcelclaude
andcommitted
Use tar instead of git archive in Copr Makefile to fix missing git in mock chroot
The mock minimal buildroot does not include git, causing the SRPM build to fail. Replace git archive with tar which is available in the chroot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c1f4d4c commit e521fa7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.copr/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# Minimal Makefile for COPR builds (CMake-based)
1+
# Minimal Makefile for COPR builds
22
# COPR provides outdir and spec variables when running make srpm
33

44
srpm:
55
set -x
66
echo "outdir=$(outdir) spec_path=$(spec)"
7+
$(eval VERSION := $(shell cat VERSION))
78
mkdir -p ~/rpmbuild/SOURCES
8-
mkdir -p build && cd build && cmake3 .. && make rpmtar
9+
tar --transform 's,^\.,sems-$(VERSION),' --exclude=.git -czf ~/rpmbuild/SOURCES/sems-$(VERSION).tar.gz -C $$(pwd) .
910
rpmbuild -bs --define "_sourcedir $$HOME/rpmbuild/SOURCES" \
1011
--define "_specdir $$(pwd)" \
1112
--define "_builddir $$(pwd)" \
1213
--define "_srcrpmdir $(outdir)" \
1314
--define "_rpmdir $$(pwd)" \
15+
--define "version $(VERSION)" \
1416
$(spec)
1517

1618
.PHONY: srpm

0 commit comments

Comments
 (0)