Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: add version information
......................................................................

packaging: add version information

add /etc/default/version.$(PACKAGE) as:

PACKAGE=@PACKAGE_NAME@
VERSION=@PACKAGE_RPM_VERSION@
RELEASE=@PACKAGE_RPM_RELEASE@

to enable software to detect plugin version while running on node.

Change-Id: I3743ef37e804137e2a3517180a67c5fb1a6cecbc
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M .gitignore
M Makefile.am
M configure.ac
M ovirt-node-plugin-vdsm.spec.in
A version.ovirt-node-plugin-vdsm.in
5 files changed, 21 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm 
refs/changes/62/29562/1

diff --git a/.gitignore b/.gitignore
index 88ee44d..f0d2351 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
 configure
 missing
 install-sh
+version.ovirt-node-plugin-vdsm
 ovirt-node-plugin-vdsm.spec
 ovirt-node-plugin*tar.gz
 autom4te.cache
diff --git a/Makefile.am b/Makefile.am
index 694d7b8..78ec56e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,9 @@
 
 DISTCLEANDIRS = autom4te.cache
 
+versiondir=$(sysconfdir)/default
+nodist_version_DATA = version.$(PACKAGE)
+
 rpms: dist
        rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz
 
diff --git a/configure.ac b/configure.ac
index c923c0b..8ceac23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,15 @@
-AC_INIT([ovirt-node-plugin-vdsm], [0.2.0], [node-de...@ovirt.org])
+define([VERSION_MAJOR], [0])
+define([VERSION_MINOR], [2])
+define([VERSION_FIX], [0])
+define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
+define([VERSION_SUFFIX], [_master])
+
+AC_INIT([ovirt-node-plugin-vdsm], VERSION_NUMBER[]VERSION_SUFFIX, 
[node-de...@ovirt.org])
+PACKAGE_RPM_VERSION="VERSION_NUMBER"
+PACKAGE_RPM_RELEASE="0.0.$(echo VERSION_SUFFIX | sed 's/^_//')"
 AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability tar-pax])
+AC_SUBST([PACKAGE_RPM_VERSION])
+AC_SUBST([PACKAGE_RPM_RELEASE])
 AC_SUBST([ENGINENAME], ['oVirt Engine'])
 
 AM_PATH_PYTHON
@@ -10,5 +20,6 @@
                 conf/Makefile
                 hooks/Makefile
                 recipe/Makefile
+                version.ovirt-node-plugin-vdsm
                 ovirt-node-plugin-vdsm.spec])
 AC_OUTPUT
diff --git a/ovirt-node-plugin-vdsm.spec.in b/ovirt-node-plugin-vdsm.spec.in
index e92f4bf..503ecf4 100644
--- a/ovirt-node-plugin-vdsm.spec.in
+++ b/ovirt-node-plugin-vdsm.spec.in
@@ -2,8 +2,8 @@
 
 Summary:        A plugin to make oVirt Node installs compatible with oVirt 
Engine and vdsm
 Name:           ovirt-node-plugin-vdsm
-Version:        @VERSION@
-Release:        0%{?BUILD_NUMBER}%{?extra_release}%{?dist}
+Version:        @RPM_VERSION@
+Release:        @RPM_RELEASE@%{?BUILD_NUMBER}%{?extra_release}%{?dist}
 Source0:        %{name}-%{version}.tar.gz
 License:        GPLv2+
 Group:          Applications/System
diff --git a/version.ovirt-node-plugin-vdsm.in 
b/version.ovirt-node-plugin-vdsm.in
new file mode 100644
index 0000000..d638f42
--- /dev/null
+++ b/version.ovirt-node-plugin-vdsm.in
@@ -0,0 +1,3 @@
+PACKAGE=@PACKAGE_NAME@
+VERSION=@PACKAGE_RPM_VERSION@
+RELEASE=@PACKAGE_RPM_RELEASE@


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3743ef37e804137e2a3517180a67c5fb1a6cecbc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-plugin-vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to