--- Makefile.common 13 Nov 2007 16:34:28 -0000 1.81 +++ Makefile.common 15 Nov 2007 16:30:28 -0000 @@ -133,6 +133,7 @@ WGET ?= $(shell if test -f /usr/bin/wget 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 @@ -428,6 +429,31 @@ else build: plague endif +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)' @@ -559,6 +585,7 @@ help: @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)"