[node-patches] Change in ovirt-node-iso[ovirt-3.4]: Simplify Makefile

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon May 19 14:27:46 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: Simplify Makefile
......................................................................

Simplify Makefile

Change-Id: Id43a902ae107214f1cc47c715179c5ec3baa1660
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
D Makefile.am
D autogen.sh
D configure.ac
R ovirt-node-iso.spec
4 files changed, 2 insertions(+), 318 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-iso refs/changes/64/27864/1

diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 38e9874..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright (C) 2010, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.  A copy of the GNU General Public License is
-# also available at http://www.gnu.org/copyleft/gpl.html.
-
-PACKAGE           = @PACKAGE_NAME@
-NAME0			  = ovirt-node-image
-RECIPE            = $(PACKAGE).ks
-PRODUCT           = @PRODUCT_NAME@
-PRODUCT_SHORT     ?= $(PRODUCT)
-PKG_FMT           = iso
-MANAGEMENT		  ?= NONE
-FEDORA            = @FEDORA@
-RHEL              = @RHEL@
-DISTRO            = @DISTRO@
-BUILD_TYPE        ?= STABLE
-CENTOS            = @CENTOS@
-ARCH              = $(shell rpm --eval '%{_arch}')
-RELEASE 		  := $(shell rpm -q --qf "%{RELEASE}\n" --define "BUILD_NUMBER $(BUILD_NUMBER)" --specfile ./ovirt-node-iso.spec | head -n1)
-RECIPE_DIR 		  = @RECIPES@
-OVIRT_CACHE_DIR	?= $(HOME)/ovirt-cache
-
-EXTRA_DIST = \
-	ovirt-node-iso.spec.in       \
-	ovirt-node-iso.spec          \
-	$(PACKAGE)-$(VERSION)-$(RELEASE).iso
-
-DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz \
-				 repos.ks \
-				 Makefile.in \
-				 aclocal.m4 \
-				 autom4te.cache \
-				 configure \
-				 install-sh \
-				 missing \
-				 *.ks
-
-# Need to find node-creator script
-# Default to RECIPE_DIR/node-creator
-# then check local dir
-# then check PATH
-NODE_CREATOR      = $(shell ( test -e $(RECIPE_DIR)/node-creator && echo "$(RECIPE_DIR)/node-creator" ) || ( test -e node-creator && echo "./node-creator" ) || which node-creator 2>/dev/null)
-
-FEDORA_MIRROR     = http://mirrors.fedoraproject.org/mirrorlist
-OVIRT_BASE_URL    = http://ovirt.org/releases/
-NODE_BASE_URL     = $(OVIRT_BASE_URL)/node-base
-NODE_URL          = $(NODE_BASE_URL)/stable/rpm
-NODE_NIGHTLY_URL  = $(NODE_BASE_URL)/nightly/rpm
-NODE_BETA_URL     = $(NODE_BASE_URL)/beta/rpm
-NODE_ALPHA_URL    = $(NODE_BASE_URL)/alpha/rpm
-OVIRT_URL         = $(OVIRT_BASE_URL)/stable/rpm
-OVIRT_NIGHTLY_URL = $(OVIRT_BASE_URL)/nightly/rpm
-OVIRT_BETA_URL    = $(OVIRT_BASE_URL)/beta/rpm
-OVIRT_ALPHA_URL   = $(OVIRT_BASE_URL)/alpha/rpm
-VIRT_PREVIEW	  = http://fedorapeople.org/groups/virt/virt-preview
-CUR_RAWHIDE       = 20
-CUR_DEVEL         = 20
-
-CENTOS_MIRROR     = http://mirrorlist.centos.org/
-CENTOS_RELEASE    = 6
-
-# For Release: 0..., set _ovirt_dev=1 so that we get extra_release.GIT-
-# annotated rpm version strings.
-_ovirt_dev = \
- $(shell grep -q '^[[:space:]]*Release:[[:space:]]*[0-9\.]*999' \
-   $(top_srcdir)/*.spec && echo 1 || :)
-
-rpms: dist
-	rpmbuild --define "BUILD_NUMBER $(BUILD_NUMBER)" $(RPM_FLAGS) -ta $(distdir).tar.gz
-
-srpms: dist
-	rpmbuild --define "BUILD_NUMBER $(BUILD_NUMBER)" $(RPM_FLAGS) -ts $(distdir).tar.gz
-
-publish: rpms
-	mkdir -p $(OVIRT_CACHE_DIR)
-	rsync -aq $(shell rpm --eval '%{_rpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/
-	rsync -aq $(shell rpm --eval '%{_srcrpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/src
-	rsync -aq $(PACKAGE_NAME)-$(VERSION)-$(RELEASE).iso $(OVIRT_CACHE_DIR)/ovirt/binary/
-	createrepo $(OVIRT_CACHE_DIR)/ovirt
-
-
-$(PACKAGE).ks: version.ks
-
-clean_ks:
-	rm -f *.ks
-
-kickstarts: clean_ks node-creator
-	cp $(RECIPE_DIR)/*.ks .
-	rm -f version.ks
-
-repos.ks: kickstarts
-	( \
-      if [ -n "$(CENTOS)" ]; then \
-        CENTOS_REPO_LINE="repo --name=centos --mirrorlist=$(CENTOS_MIRROR)?release=$(CENTOS_RELEASE)&arch=${ARCH}&repo=os" ;\
-        UPDATES_REPO_LINE="repo --name=centos-updates --mirrorlist=$(CENTOS_MIRROR)?release=$(CENTOS_RELEASE)&arch=${ARCH}&repo=updates" ;\
-        EPEL_REPO_LINE="repo --name=epel --baseurl=http://dl.fedoraproject.org/pub/epel/$(CENTOS_RELEASE)/${ARCH}/" ;\
-        OVIRT_STABLE_REPO_LINE="repo --name=ovirt-stable-repo --baseurl=$(OVIRT_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        OVIRT_NIGHTLY_REPO_LINE="repo --name=ovirt-nightly-repo --baseurl=$(OVIRT_NIGHTLY_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        OVIRT_BETA_REPO_LINE="repo --name=ovirt-beta-repo --baseurl=$(OVIRT_BETA_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        OVIRT_ALPHA_REPO_LINE="repo --name=ovirt-alpha-repo --baseurl=$(OVIRT_ALPHA_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        NODE_STABLE_REPO_LINE="repo --name=node-stable-repo --baseurl=$(NODE_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        NODE_NIGHTLY_REPO_LINE="repo --name=node-nightly-repo --baseurl=$(NODE_NIGHTLY_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        NODE_BETA_REPO_LINE="repo --name=node-beta-repo --baseurl=$(NODE_BETA_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-        NODE_ALPHA_REPO_LINE="repo --name=node-alpha-repo --baseurl=$(NODE_ALPHA_URL)/EL/$(CENTOS_RELEASE)\n" ;\
-	GLUSTER_REPO_LINE="repo --name=gluster-3.4 --baseurl=http://download.gluster.org/pub/gluster/glusterfs/3.4/3.4.0/CentOS/epel-6Server/x86_64/\n" ;\
-        echo "$${CENTOS_REPO_LINE}" > repos.ks ;\
-        echo "$${UPDATES_REPO_LINE}" >> repos.ks ;\
-        echo "$${EPEL_REPO_LINE}" >> repos.ks ;\
-      elif [ -n "$(FEDORA)" ]; then \
-            OVIRT_STABLE_REPO_LINE="repo --name=ovirt-stable-repo --baseurl=$(OVIRT_URL)/Fedora/$(FEDORA)\n" ;\
-            OVIRT_NIGHTLY_REPO_LINE="repo --name=ovirt-nightly-repo --baseurl=$(OVIRT_NIGHTLY_URL)/Fedora/$(FEDORA)\n" ;\
-            OVIRT_BETA_REPO_LINE="repo --name=ovirt-beta-repo --baseurl=$(OVIRT_BETA_URL)/Fedora/$(FEDORA)\n" ;\
-            OVIRT_ALPHA_REPO_LINE="repo --name=ovirt-alpha-repo --baseurl=$(OVIRT_ALPHA_URL)/Fedora/$(FEDORA)\n" ;\
-            NODE_STABLE_REPO_LINE="repo --name=node-stable-repo --baseurl=$(NODE_URL)/Fedora/$(FEDORA)\n" ;\
-            NODE_NIGHTLY_REPO_LINE="repo --name=node-nightly-repo --baseurl=$(NODE_NIGHTLY_URL)/Fedora/$(FEDORA)\n" ;\
-            NODE_BETA_REPO_LINE="repo --name=node-beta-repo --baseurl=$(NODE_BETA_URL)/Fedora/$(FEDORA)\n" ;\
-            NODE_ALPHA_REPO_LINE="repo --name=node-alpha-repo --baseurl=$(NODE_ALPHA_URL)/Fedora/$(FEDORA)\n" ;\
-            if [ 0$(FEDORA) == 0$(CUR_RAWHIDE) ]; then \
-                FEDORA_REPO=rawhide ;\
-                FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/development/rawhide/$(ARCH)/os,--mirrorlist=$(FEDORA_MIRROR)?repo=rawhide&arch=$(ARCH))" ;\
-            elif [ 0$(FEDORA) == 0$(CUR_DEVEL) ]; then \
-                FEDORA_REPO=f$(FEDORA) ;\
-                FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/development/$(FEDORA)/$(ARCH)/os,--mirrorlist=$(FEDORA_MIRROR)?repo=fedora-$(FEDORA)&arch=$(ARCH))" ;\
-                UPDATE_REPO_LINE="repo --name=$${FEDORA_REPO}-updates-testing $(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/updates/testing/$(FEDORA)/${ARCH},--mirrorlist=$(FEDORA_MIRROR)?repo=updates-testing-f$(FEDORA)&arch=$(ARCH))\n" ;\
-                VIRT_PREVIEW_LINE="repo --name=$${FEDORA_REPO}-virt-preview --baseurl=$(VIRT_PREVIEW)/fedora-$(FEDORA)/$(ARCH)\n" ;\
-            else \
-                FEDORA_REPO=f$(FEDORA) ;\
-                FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/releases/$(FEDORA)/Everything/${ARCH}/os,--mirrorlist=$(FEDORA_MIRROR)?repo=fedora-$(FEDORA)&arch=$(ARCH))" ;\
-                UPDATE_REPO_LINE="repo --name=$${FEDORA_REPO}-updates $(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/updates/$(FEDORA)/${ARCH},--mirrorlist=$(FEDORA_MIRROR)?repo=updates-released-f$(FEDORA)&arch=$(ARCH))\n" ;\
-                VIRT_PREVIEW_LINE="repo --name=$${FEDORA_REPO}-virt-preview --baseurl=$(VIRT_PREVIEW)/fedora-$(FEDORA)/$(ARCH)\n" ;\
-            fi ;\
-            echo "repo --name=$${FEDORA_REPO} $${FEDORA_REPO_LOC}" > repos.ks ;\
-            printf "$${UPDATE_REPO_LINE}" >> repos.ks ;\
-            printf "$${VIRT_PREVIEW_LINE}" >> repos.ks ;\
-      else \
-            echo "# NODE_REPO_URL=$(NODE_REPO_URL)" > $@ ;\
-            for repo in $(NODE_REPO_URL); do \
-               echo "repo --name=repo$${i} --baseurl=$${repo}" >> $@ ;\
-               i=$${i}_ ;\
-            done ;\
-      fi ;\
-      printf "$${NODE_STABLE_REPO_LINE}" >> repos.ks ;\
-      printf "$${GLUSTER_REPO_LINE}" >> repos.ks ;\
-	  if [ "$${MANAGEMENT}" == "OVIRT" ]; then \
-        printf "$${OVIRT_STABLE_REPO_LINE}" >> repos.ks ;\
-      fi ;\
-      if [ "$${BUILD_TYPE}" == "NIGHTLY" ]; then \
-		if [ "$${MANAGEMENT}" == "OVIRT" ]; then \
-            printf "$${OVIRT_NIGHTLY_REPO_LINE}" >> repos.ks ;\
-            printf "$${OVIRT_ALPHA_REPO_LINE}" >> repos.ks ;\
-            printf "$${OVIRT_BETA_REPO_LINE}" >> repos.ks ;\
-        fi ;\
-        printf "$${NODE_NIGHTLY_REPO_LINE}" >> repos.ks ;\
-        printf "$${NODE_ALPHA_REPO_LINE}" >> repos.ks ;\
-        printf "$${NODE_BETA_REPO_LINE}" >> repos.ks ;\
-      elif [ "$${BUILD_TYPE}" == "ALPHA" ]; then \
-		if [ "$${MANAGEMENT}" == "OVIRT" ]; then \
-            printf "$${OVIRT_ALPHA_REPO_LINE}" >> repos.ks ;\
-            printf "$${OVIRT_BETA_REPO_LINE}" >> repos.ks ;\
-        fi ;\
-        printf "$${NODE_BETA_REPO_LINE}" >> repos.ks ;\
-        printf "$${NODE_ALPHA_REPO_LINE}" >> repos.ks ;\
-      elif [ "$${BUILD_TYPE}" == "BETA" ]; then \
-		if [ "$${MANAGEMENT}" == "OVIRT" ]; then \
-            printf "$${OVIRT_BETA_REPO_LINE}" >> repos.ks ;\
-        fi ;\
-        printf "$${NODE_BETA_REPO_LINE}" >> repos.ks ;\
-      fi ;\
-	)
-
-version.ks: repos.ks
-	( \
-	    echo "PRODUCT='"$(PRODUCT)"'" ;\
-	    echo "PRODUCT_SHORT='"$(PRODUCT_SHORT)"'" ;\
-	    echo "PACKAGE=$(PACKAGE)" ;\
-	    echo "VERSION=$(VERSION)" ;\
-	    echo "RELEASE=$(RELEASE)" ;\
-	) > $@
-	ksflatten -c $(NAME0).ks -o $(PACKAGE).ks
-
-$(PACKAGE).$(PKG_FMT) iso: kickstarts version.ks repos.ks
-	@test ! -e "$(PACKAGE_NAME)-$(VERSION)-$(RELEASE).iso" || ( echo "ERROR: $(PACKAGE_NAME)-$(VERSION)-$(RELEASE).iso already exists." && exit 1 )
-	$(NODE_CREATOR) $(RECIPE)
-	@test -e "$(PACKAGE_NAME).iso" || ( echo "ERROR: ISO build failed." && exit 1 )
-	mv $(PACKAGE_NAME).iso $(PACKAGE_NAME)-$(VERSION)-$(RELEASE).iso
-
-verrel:
-	@echo ${PACKAGE_NAME}-${VERSION}-${RELEASE}
-
-node-creator:
-	@test -n "${NODE_CREATOR}" || ( echo "No node-creator script found" && exit 1 )
-	@echo "Node Creator script is:  ${NODE_CREATOR}"
-
-all: $(PACKAGE).ks
-
-.PHONY: $(PACKAGE).ks
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index cdb1435..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-# Run this to generate configure and Makefile
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-THEDIR=`pwd`
-(
-  cd $srcdir
-  die=0
-
-  (autoconf --version) < /dev/null > /dev/null 2>&1 || {
-	  echo
-	  echo "You must have autoconf installed."
-	  echo "Download the appropriate package for your distribution,"
-	  echo "or see http://www.gnu.org/software/autoconf"
-	  die=1
-  }
-
-  # Require libtool only if one of of LT_INIT,
-  # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac.
-  grep -E '^[[:blank:]]*(LT_INIT|A[CM]_PROG_LIBTOOL)' configure.ac >/dev/null \
-      && {
-    (libtool --version) < /dev/null > /dev/null 2>&1 || {
-	  echo
-	  echo "You must have libtool installed."
-	  echo "Download the appropriate package for your distribution,"
-	  echo "or see http://www.gnu.org/software/libtool"
-	  die=1
-    }
-  }
-
-  (automake --version) < /dev/null > /dev/null 2>&1 || {
-	  echo
-	  die=1
-	  echo "You must have automake installed."
-	  echo "Download the appropriate package for your distribution,"
-	  echo "or see http://www.gnu.org/software/automake"
-  }
-
-  test $die = 1 && exit 1
-
-  test -f ovirt-node-iso.spec.in || {
-	  echo "You must run this script in the top-level directory"
-	  exit 1
-  }
-
-  if test -z "$*"; then
-	  echo "I am going to run ./configure with no arguments - if you wish "
-	  echo "to pass any to it, please specify them on the $0 command line."
-  fi
-
-  aclocal
-
-  # Run autoheader only if needed
-  grep '^[[:blank:]]*AC_CONFIG_HEADERS' configure.ac >/dev/null && autoheader
-
-  automake --add-missing
-  autoconf
-  ./configure "$@"
-)
-
-if test "x$OBJ_DIR" != x; then
-    mkdir -p "$OBJ_DIR"
-    cd "$OBJ_DIR"
-fi
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 127dd34..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,41 +0,0 @@
-AC_INIT([ovirt-node], [3.0.4], [node-devel at ovirt.org])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability tar-pax])
-
-AC_SUBST([FEDORA],[[`rpm --eval '%{fedora}'|sed 's/[^0-9]//g'`]])
-AC_SUBST([RHEL], [[`rpm --eval '%{rhel}'|sed 's/[^0-9]//g'`]])
-AC_SUBST([CENTOS], [[`rpm --eval '%{centos}'|sed 's/[^0-9]//g'`]])
-AC_SUBST([DISTRO])
-AC_SUBST([PACKAGE_NAME])
-AC_SUBST([PRODUCT_NAME])
-
-
-if test "$FEDORA"; then
-    DISTRO=ovirt$FEDORA
-fi
-if test "$RHEL"; then
-    DISTRO=rhevh$RHEL
-fi
-if test "$CENTOS"; then
-    DISTRO=centos$CENTOS
-fi
-
-AC_ARG_WITH([recipe], [AC_HELP_STRING([--with-recipe],
-            [Specify a recipe directory.  Defaults to /usr/share/ovirt-node-recipe])],
-            [RECIPES="$withval"],
-            [RECIPES=/usr/share/ovirt-node-recipe])
-AC_SUBST([RECIPES])
-
-AC_ARG_WITH([build_number], [AC_HELP_STRING([--with-build-number],
-            [Specify a build number.])],
-            [BUILD_NUMBER="$withval"],
-            [BUILD_NUMBER=$(date +%Y%m%d%H%M)])
-AC_SUBST([BUILD_NUMBER])
-
-PACKAGE_NAME=ovirt-node-iso
-PRODUCT_NAME=oVirt\ Node\ Hypervisor
-MAIN_KS=ovirt-node-image.ks
-
-
-AC_CONFIG_FILES([Makefile
-                ovirt-node-iso.spec])
-AC_OUTPUT
diff --git a/ovirt-node-iso.spec.in b/ovirt-node-iso.spec
similarity index 96%
rename from ovirt-node-iso.spec.in
rename to ovirt-node-iso.spec
index ce83a31..3e1ac0b 100644
--- a/ovirt-node-iso.spec.in
+++ b/ovirt-node-iso.spec
@@ -4,13 +4,12 @@
 
 %global vdsm_compat 3.4,3.3,3.2,3.1
 
-%global build_date %(date +%Y%m%d)
-%global build_release .0
+%define build_release 20140512.0
 
 Name:           ovirt-node-iso
 URL:            http://www.ovirt.org/Node
 Version:        3.4.1
-Release:        %{?build_date}%{?build_release}%{?dist}
+Release:        %{?build_release}%{?dist}
 Summary:        %{product} ISO Image
 BuildArch:      noarch
 Source1:        http://plain.resources.ovirt.org/pub/ovirt-node-base-3.0/iso/el6/ovirt-node-iso-3.0.4-1.0.201401291204.el6.iso


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id43a902ae107214f1cc47c715179c5ec3baa1660
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-iso
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list