[Ovirt-devel] [PATCH appliance] restore envvar-controlled RPM_FLAGS additions

Jim Meyering jim at meyering.net
Fri Sep 12 20:39:18 UTC 2008


Jim Meyering <jim at meyering.net> wrote:
> * Makefile.am: Restore the code to append to RPM_FLAGS.
> These were mistakenly removed by the previous commit.
> ---
> Thanks to Perry Myers for spotting this.
> Testing it now...

That test didn't work at all.  GNU make-style "ifdef"
doesn't work with automake.  The following does it in
equivalent shell code just prior to running rpmbuild.

I verified that "make ... build" passes,
but haven't tried setting any of those variables.

>From 33840f85f5f739dcffa3b387951ee02fd501188b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 12 Sep 2008 22:35:46 +0200
Subject: [PATCH appliance] restore envvar-controlled rpm option additions:

FEDORA_URL, OVIRT_URL, SKIP_COMPRESS_IMAGE
---
 release.mk |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/release.mk b/release.mk
index 7d9ddd0..d63d53c 100644
--- a/release.mk
+++ b/release.mk
@@ -1,5 +1,5 @@
 # Release/version-related Makefile variables and rules.
-# It expects the including Makefile to define the "pkg_name" 
+# It expects the including Makefile to define the "pkg_name"
 # variable, as well as a file named "version" in the current directory.

 srcdir		?= .
@@ -43,8 +43,20 @@ setversion:

 new-rpms: bumprelease rpms

+# FEDORA_URL env var can be set to the root of a fedora mirror
+# OVIRT_URL env var can be set to the root of an ovirt.org mirror
+# SKIP_COMPRESS_IMAGE env var an be set to 1 to skip qcow compression
+# that contains the install tree
+
 rpms: tar
-	rpmbuild $(RPM_FLAGS) -ba $(SPEC_FILE)
+	v=;							\
+	test 'x$(SKIP_COMPRESS_IMAGE)' != x			\
+	  && v="--define 'skip_compress_image 1'";		\
+	test 'x$(FEDORA_URL)' != x				\
+	  && v="$$v --define 'fedora_url $(FEDORA_URL)'";	\
+	test 'x$(OVIRT_URL)' != x				\
+	  && v="$$v --define 'ovirt_url $(OVIRT_URL)'";		\
+	rpmbuild $(RPM_FLAGS) $$v -ba $(SPEC_FILE)

 publish: rpms
 	rm -f $(OVIRT_CACHE_DIR)/ovirt/$(pkg_name)*
-- 
1.6.0.1.308.gede4c




More information about the ovirt-devel mailing list