Skip to content

Commit

Permalink
Use major.minor version in COPR repo name
Browse files Browse the repository at this point in the history
The COPR rules are such that you can only have one RPM for a given
chroot per repository.  So you can't have a `pbench-agent` `0.69.*` and
a `pbench-agent` `0.71.*` RPM available at the same time.
  • Loading branch information
portante committed Sep 7, 2022
1 parent fc97eb7 commit b58845e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agent/containers/images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ URL_PREFIX = https://copr-be.cloud.fedoraproject.org/results/${COPR_USER}
# the final repo name would be "pbench-test".
TEST =
_TEST_SUFFIX = $(if $(TEST),-$(TEST),"")
_PBENCH_REPO_NAME = pbench${_TEST_SUFFIX}
_PBENCH_REPO_NAME = pbench-$(shell grep -oE '[0-9]+\.[0-9]+' ${_PBENCH_TOP}/agent/VERSION)${_TEST_SUFFIX}

# By default we use the pbench Quay.io organization for the image
# repository. You can override this default using an environment
Expand Down
3 changes: 2 additions & 1 deletion utils/rpm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ include ${PBENCHTOP}/utils/utils.mk

prog = pbench-${component}
VERSION := $(shell cat ${PBENCHTOP}/${component}/VERSION)
MAJORMINOR := $(shell grep -oE '[0-9]+\.[0-9]+' ${PBENCHTOP}/${component}/VERSION)
TBDIR = ${TMPDIR}/${prog}-${VERSION}

# If we are building for a distro, use a distro-specific suffix on the build and
Expand Down Expand Up @@ -116,7 +117,7 @@ endif
COPR_TARGETS = copr copr-test
.PHONY: ${COPR_TARGETS}
${COPR_TARGETS}: $(RPMSRPM)/$(prog)-$(VERSION)-$(seqno)g$(sha1).src.rpm
copr-cli build ${CHROOTS} $(_copr_user)/$(subst copr,pbench,$@) $(RPMSRPM)/$(prog)-$(VERSION)-$(seqno)g$(sha1).src.rpm
copr-cli build ${CHROOTS} $(_copr_user)/$(subst copr,pbench-$(MAJORMINOR),$@) $(RPMSRPM)/$(prog)-$(VERSION)-$(seqno)g$(sha1).src.rpm

# Determine the present working directory relative to ${PBENCHTOP} so that we
# can find it inside the container, where the source tree might be in a
Expand Down

0 comments on commit b58845e

Please sign in to comment.