Makefile.common patch to remove deprecated mock syntax

Michael E Brown Michael_E_Brown at dell.com
Tue Oct 30 18:19:01 UTC 2007


Attached is a small patch against makefile.common to remove use of
deprecated mock syntax. This will work with both old mock (0.7.x) and
new mock (0.8.x).

 -- dont specify '.cfg' in mock config
 -- specify 'rebuild' cmdline arg

Tested by doing a 'make mockbuild' of mock.

--
Michael
-------------- next part --------------
? makefile-common.patch
? mock-0.8.2.tar.gz
? mock-0.8.3.tar.gz
? mock-0.8.4.tar.gz
? mock.spec
? F-7/clog
? F-8/clog
? devel/clog
Index: common/Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.79
diff -u -r1.79 Makefile.common
--- common/Makefile.common	23 Oct 2007 13:37:10 -0000	1.79
+++ common/Makefile.common	30 Oct 2007 18:15:03 -0000
@@ -49,22 +49,22 @@
 MOCKDIR ?= $(WORKDIR)
 ifeq ($(DISTVAR),epel)
 DISTVAR := rhel
-MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-epel.cfg
+MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-epel
 else
-MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH).cfg
+MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)
 ## 4, 5, 6 need -core
 ifeq ($(DISTVAL),4)
-MOCKCFG = fedora-$(DISTVAL)-$(BUILDARCH)-core.cfg
+MOCKCFG = fedora-$(DISTVAL)-$(BUILDARCH)-core
 endif
 ifeq ($(DISTVAL),5)
-MOCKCFG = fedora-$(DISTVAL)-$(BUILDARCH)-core.cfg
+MOCKCFG = fedora-$(DISTVAL)-$(BUILDARCH)-core
 endif
 ifeq ($(DISTVAL),6)
-MOCKCFG = fedora-$(DISTVAL)-$(BUILDARCH)-core.cfg
+MOCKCFG = fedora-$(DISTVAL)-$(BUILDARCH)-core
 endif
 ## Devel builds use -devel mock config
 ifeq ($(BRANCH),devel)
-MOCKCFG = fedora-devel-$(BUILDARCH).cfg
+MOCKCFG = fedora-devel-$(BUILDARCH)
 endif
 endif
 
@@ -301,7 +301,7 @@
 
 # test build in mock
 mockbuild : srpm
-	mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
+	mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) rebuild $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
 
 # build for a particular arch
 $(ARCHES) : sources $(TARGETS)


More information about the buildsys mailing list