[PATCH 6/6] Add rc-release target

Chris Lumens clumens at redhat.com
Wed May 20 14:43:28 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

Use these make targets for creating scratch rc builds that can be used
before an official release. rc-release will run scratch-bumpver to bump
the version and add a rc release with the current date and time to the
specfile.  scratch is then run to create the tar.gz file and then mock
is used to build a rc rpm package.

No changes are committed to git, no zanata account is required and
nothing is pushed to zanata.

This also Modifes scratch-bumpver to now include the rc release number.

This requires that mock is installed and the current user is a member of
the mock group.

Build the rc like this:
git clean -xdf
git reset --hard
./autogen.sh
./configure --disable-static --enable-introspection --enable-gtk-doc
make rc-release

If everything goes well there will be a pile of rpms in the current
directory.

Related: rhbz#1196721
---
 Makefile.am | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index a965870..457de81 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,6 +48,8 @@ ZANATA_PULL_ARGS = --transdir $(srcdir)/po/
 ZANATA_PUSH_ARGS = --srcdir $(srcdir)/po/ --push-type source --force
 
 INSTALLATION_GUIDE_REPO_URL = git://git.fedorahosted.org/git/docs/install-guide.git
+RC_RELEASE ?= $(shell date -u +0.1.%Y%m%d%H%M%S)
+MOCKCHROOT ?= fedora-21-x86_64
 
 tag:
 	@git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG)
@@ -69,7 +71,7 @@ scratch: po-empty get-help
 	git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
 
 scratch-bumpver: po-empty get-help
-	@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
+	@opts="-S -n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT) --newrelease $(RC_RELEASE)" ; \
 	if [ ! -z "$(IGNORE)" ]; then \
 		opts="$${opts} -i $(IGNORE)" ; \
 	fi ; \
@@ -91,6 +93,12 @@ release: get-help
 api:
 	doxygen docs/api.cfg
 
+rc-release: scratch-bumpver scratch
+	mock -r $(MOCKCHROOT) --buildsrpm  --spec ./$(PACKAGE_NAME).spec --sources . || exit 1
+	cp /var/lib/mock/$(MOCKCHROOT)/result/*src.rpm . || exit 1
+	mock -r $(MOCKCHROOT) --rebuild *src.rpm || exit 1
+	cp /var/lib/mock/$(MOCKCHROOT)/result/*.rpm . || exit 1
+
 bumpver: po-pull
 	@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
 	if [ ! -z "$(IGNORE)" ]; then \
-- 
2.2.2



More information about the anaconda-patches mailing list