fix RPM dist/repotag labeling

pull/37270/head
Matt Davis 7 years ago
parent d6127361d3
commit 482e204afa

@ -105,7 +105,7 @@ endif
RPMVERSION ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --baseversion) RPMVERSION ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --baseversion)
RPMRELEASE ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --rpmrelease) RPMRELEASE ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --rpmrelease)
RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)$(RPMDIST)" RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)$(RPMDIST)$(REPOTAG)"
# MOCK build parameters # MOCK build parameters
MOCK_BIN ?= mock MOCK_BIN ?= mock
@ -248,7 +248,8 @@ mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/ \ $(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/ \
--define "rpmversion $(RPMVERSION)" \ --define "rpmversion $(RPMVERSION)" \
--define "upstream_version $(VERSION)" \ --define "upstream_version $(VERSION)" \
--define "rpmrelease $(RPMRELEASE)" --define "rpmrelease $(RPMRELEASE)" \
--define "repotag $(REPOTAG)"
@echo "#############################################" @echo "#############################################"
@echo "Ansible SRPM is built:" @echo "Ansible SRPM is built:"
@echo rpm-build/*.src.rpm @echo rpm-build/*.src.rpm
@ -259,7 +260,8 @@ mock-rpm: /etc/mock/$(MOCK_CFG).cfg mock-srpm
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --rebuild rpm-build/$(NAME)-*.src.rpm \ $(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --rebuild rpm-build/$(NAME)-*.src.rpm \
--define "rpmversion $(RPMVERSION)" \ --define "rpmversion $(RPMVERSION)" \
--define "upstream_version $(VERSION)" \ --define "upstream_version $(VERSION)" \
--define "rpmrelease $(RPMRELEASE)" --define "rpmrelease $(RPMRELEASE)" \
--define "repotag $(REPOTAG)"
@echo "#############################################" @echo "#############################################"
@echo "Ansible RPM is built:" @echo "Ansible RPM is built:"
@echo rpm-build/*.noarch.rpm @echo rpm-build/*.noarch.rpm
@ -276,6 +278,7 @@ srpm: rpmcommon
--define "upstream_version $(VERSION)" \ --define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \ --define "rpmversion $(RPMVERSION)" \
--define "rpmrelease $(RPMRELEASE)" \ --define "rpmrelease $(RPMRELEASE)" \
--define "repotag $(REPOTAG)" \
-bs rpm-build/$(NAME).spec -bs rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec @rm -f rpm-build/$(NAME).spec
@echo "#############################################" @echo "#############################################"
@ -296,6 +299,7 @@ rpm: rpmcommon
--define "upstream_version $(VERSION)" \ --define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \ --define "rpmversion $(RPMVERSION)" \
--define "rpmrelease $(RPMRELEASE)" \ --define "rpmrelease $(RPMRELEASE)" \
--define "repotag $(REPOTAG)" \
-ba rpm-build/$(NAME).spec -ba rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec @rm -f rpm-build/$(NAME).spec
@echo "#############################################" @echo "#############################################"

@ -6,7 +6,7 @@
Name: %{name} Name: %{name}
Version: %{rpmversion} Version: %{rpmversion}
Release: %{rpmrelease} Release: %{rpmrelease}%{?dist}%{?repotag}
Url: https://www.ansible.com Url: https://www.ansible.com
Summary: SSH-based application deployment, configuration management, and IT orchestration platform Summary: SSH-based application deployment, configuration management, and IT orchestration platform
License: GPLv3+ License: GPLv3+

Loading…
Cancel
Save