common Makefile.common,1.81,1.82

Dennis Gilmore (ausil) fedora-extras-commits at redhat.com
Sun Nov 18 21:15:42 UTC 2007


Author: ausil

Update of /cvs/extras/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11515

Modified Files:
	Makefile.common 
Log Message:
add make targets for update and scratch-build



Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- Makefile.common	13 Nov 2007 16:34:28 -0000	1.81
+++ Makefile.common	18 Nov 2007 21:15:11 -0000	1.82
@@ -133,6 +133,7 @@
 CLIENT	?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET)))
 PLAGUE_CLIENT ?= $(shell which plague-client 2>/dev/null)
 BUILD_CLIENT ?= $(shell which koji 2>/dev/null)
+BODHI_CLIENT ?= $(shell which bodhi 2>/dev/null)
 
 # RPM with all the overrides in place; you can override this in your
 # .cvspkgsrc also, to use a default rpm setup
@@ -173,7 +174,7 @@
 PREP_ARCHES	= $(addprefix prep-,$(ARCHES))
 
 ## list all our bogus targets
-.PHONY :: $(ARCHES) sources uploadsource upload export check build-check plague koji build cvsurl chain-build test-srpm srpm tag force-tag verrel new clean patch prep compile install-short compile-short FORCE local
+.PHONY :: $(ARCHES) sources uploadsource upload export check build-check plague koji build cvsurl chain-build test-srpm srpm tag force-tag verrel new clean patch prep compile install-short compile-short FORCE local scratch-build scratch-build-% 
 
 # The TARGETS define is meant for local module targets that should be
 # made in addition to the SOURCEFILES whenever needed
@@ -428,6 +429,41 @@
 build: plague
 endif
 
+scratch-build: build-check
+	@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi
+	@$(BUILD_CLIENT) $(SECONDARY_CONFIG) build --scratch $(TARGET) '$(CVS_URL)'
+
+
+scratch-build-%: build-check
+	@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi
+	@$(BUILD_CLIENT) $(SECONDARY_CONFIG) build --scratch --arch-overwrite=$* $(TARGET) '$(CVS_URL)'
+
+
+bodhi: build-check $(COMMON_DIR)/branches clog
+	@if [ ! -x "$(BODHI_CLIENT)" ]; then echo "Must have bodhi-client installed"; exit 1; fi
+	@echo -e "\
+# [ $(NAME)-$(VERSION)-$(RELEASE) ]\n\
+# type=[S|B|E] (S=security, B=bugfix, E=enhancement) (required)\n\
+# request=[T|S] (T=testing, S=stable) (default: testing)\n\
+# bug=123,456\n\
+# all other text will be considered to be part of the update notes\n\
+type=" > bodhi.template
+	@grep '#' clog | xargs -n1 | sed -n -e 's,^#\([0-9]*\)$$,\1,p' | xargs | tr ' ' ',' > $(NAME).bugs
+	@if [ `cat $(NAME).bugs` ]; then echo "bug=`cat $(NAME).bugs`" >> bodhi.template; fi
+	@sed -e '/^#/d' < bodhi.template > bodhi.template.orig
+	@if [ -z "$$EDITOR" ]; then vi bodhi.template; else $$EDITOR bodhi.template; fi
+	@if [ -n "`sed -e '/^#/d' < bodhi.template | diff bodhi.template.orig -`" ]; then \
+		$(BODHI_CLIENT) --new --release $(subst -,,$(BRANCH)) \
+			--file bodhi.template $(NAME)-$(VERSION)-$(RELEASE); \
+	else \
+		echo "Bodhi update aborted!"; \
+	fi
+	@rm -f bodhi.template{,.orig} $(NAME).bugs clog
+
+ifneq (, $(filter F-8 F-7, $(BRANCH)))
+update: bodhi
+endif
+
 cvsurl:
 	@echo '$(CVS_URL)'
 
@@ -549,6 +585,10 @@
 	@echo "		  in a group must build successfully and populate the repository before"
 	@echo "		  the next group will begin building."
 	@echo "		If no groups are defined, packages will be built sequentially."
+	@echo "	scratch-build		Request scratch build of \"$(TAG)\" for $(TARGET)"
+	@echo "	scratch-build-<archs>   Request scratch build of \"$(TAG)\" for $(TARGET) and archs <archs>"
+	@echo "		examples:  make scratch-build-i386,ppc64"
+	@echo "		           make scratch-build-x86_64"
 	@echo "	mockbuild		Local test build using mock"
 	@echo "	verrel			Echo \"$(NAME)-$(VERSION)-$(RELEASE)\""
 	@echo "	new			Diff against last tag"
@@ -559,6 +599,7 @@
 	@echo "	unused-patches		Print list of patches not referenced by name in specfile"
 	@echo "	unused-fedora-patches   Print Fedora patches not used by Patch and/or ApplyPatch directives"
 	@echo "	gimmespec		Print the name of the specfile"
+	@echo "	update			Submit $(NAME)-$(VERSION)-$(RELEASE) as an update for $(BRANCH)"
 
 gimmespec:
 	@echo "$(SPECFILE)"




More information about the fedora-extras-commits mailing list