Yaniv Bronhaim has uploaded a new change for review.

Change subject: Adding configure flag for fedora_koji_build=1
......................................................................

Adding configure flag for fedora_koji_build=1

Change-Id: Ie6997354be1c02a3775984115c5e35a4b365345c
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M Makefile.am
M configure.ac
M vdsm.spec.in
3 files changed, 32 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/36577/1

diff --git a/Makefile.am b/Makefile.am
index 2d74b19..9fdb13f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,6 +67,10 @@
 RHEV_BUILD = --define="rhev_build 1"
 endif
 
+if KOJI
+KOJI_BUILD = --define="fedora_koji_build 1"
+endif
+
 PEP8_BLACKLIST = \
        config.py \
        constants.py \
@@ -140,7 +144,7 @@
 
 rpm: dist
        rpmbuild -ta $(if $(BUILDID),--define="extra_release .$(BUILDID)") \
-                               $(WITH_HOOKS) $(RHEV_BUILD) $(DIST_ARCHIVES)
+                               $(WITH_HOOKS) $(RHEV_BUILD) $(KOJI_BUILD) 
$(DIST_ARCHIVES)
 
 dist-hook: gen-VERSION gen-ChangeLog
 .PHONY: gen-VERSION gen-ChangeLog
diff --git a/configure.ac b/configure.ac
index 506c3e5..a47d33a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,17 @@
 AM_CONDITIONAL([RHEV], [test "${enable_rhev}" = "yes"])
 
 AC_ARG_ENABLE(
+    [koji],
+    [AS_HELP_STRING(
+        [--enable-koji],
+        [build koji version @<:@default=no@:>@]
+    )],
+    ,
+    [enable_koji="no"]
+)
+AM_CONDITIONAL([KOJI], [test "${enable_koji}" = "yes"])
+
+AC_ARG_ENABLE(
     [chown_hack],
     [AS_HELP_STRING(
         [--enable-chown-hack],
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 86cf085..b64fcd7 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -12,15 +12,16 @@
 %global snlk_user @SNLKUSER@
 %global cdrom_group @CDROMGROUP@
 
-# Fedora official build
-%global fedora_koji_build 0
+# koji build - overridable using rpmbuild --define "koji_build 1"
+%{!?koji_build: %global fedora_koji_build 0}
+
+# RHEV build - overridable using rpmbuild --define "rhev_build 1"
+%{!?rhev_build: %global rhev_build 0}
 
 %if 0%{fedora_koji_build}
 %global with_hooks 1
 %endif
 
-# RHEV build - overridable using rpmbuild --define "rhev_build 1"
-%{!?rhev_build: %global rhev_build 0}
 %if %{rhev_build}
 %global rhev_build_config_opt     --enable-rhev
 %endif
@@ -82,7 +83,18 @@
 Group:          Applications/System
 License:        GPLv2+
 Url:            http://www.ovirt.org/wiki/Vdsm
+%if 0%{fedora_koji_build}
+# The source for this package was pulled from upstream's vcs.
+# Use the following commands to generate the tarball:
+#  git clone http://gerrit.ovirt.org/p/vdsm
+#  cd vdsm
+#  git reset --hard {vdsm_release}
+#  ./autogen.sh --system
+#  make VERSION={version}-{vdsm_release} dist
+Source0:        %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz
+%else
 Source0:        %{vdsm_name}-%{version}.tar.gz
+%endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %if !%{fedora_koji_build}


-- 
To view, visit http://gerrit.ovirt.org/36577
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6997354be1c02a3775984115c5e35a4b365345c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to