From bf456146850d4a3696691da231b55b60dfd1ba1a Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Wed, 22 Jul 2009 20:01:28 +0000 Subject: [PATCH] Add an API version number, LVM_LIBAPI, to the VERSION string. --- VERSION | 2 +- WHATS_NEW | 1 + configure | 7 +++++-- configure.in | 6 ++++-- lib/misc/lvm-version.h.in | 3 ++- make.tmpl.in | 3 +++ 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index c901e1d77..3e2ef9e63 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.02.50-cvs (2009-07-15) +2.02.50(1)-cvs (2009-07-22) diff --git a/WHATS_NEW b/WHATS_NEW index d1486a1af..7fe2481ae 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.50 - ================================ + Add an API version number, LVM_LIBAPI, to the VERSION string for liblvm. Pass a pointer to struct cmd_context to init_multiple_segtypes Return EINVALID_CMD_LINE not success when invalid VG name format is used. Remove unnecessary messages after vgcreate/vgsplit refactor (2.02.49). diff --git a/configure b/configure index 2b8d9d757..5dc547ada 100755 --- a/configure +++ b/configure @@ -657,6 +657,7 @@ LVM_RELEASE LVM_PATCHLEVEL LVM_MINOR LVM_MAJOR +LVM_LIBAPI LVM_VERSION LVM1_FALLBACK LVM1 @@ -12606,13 +12607,14 @@ DM_LIB_PATCHLEVEL=`cat VERSION_DM | $AWK -F '[-. ]' '{printf "%s.%s.%s",$1,$2,$3 LVM_VERSION="\"`cat VERSION 2>/dev/null || echo Unknown`\"" VER=`cat VERSION` -LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.*(//;s/).*//'`\"" +LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\"" VER=`echo "$VER" | $AWK '{print $1}'` LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\"" VER=`echo "$VER" | $AWK -F '-' '{print $1}'` LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'` LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'` -LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '.' '{print $3}'` +LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[(.]' '{print $3}'` +LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'` ################################################################################ @@ -12679,6 +12681,7 @@ LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '.' '{print $3}'` + ################################################################################ diff --git a/configure.in b/configure.in index eb6278d48..1db70b85b 100644 --- a/configure.in +++ b/configure.in @@ -750,13 +750,14 @@ DM_LIB_PATCHLEVEL=`cat VERSION_DM | $AWK -F '[[-. ]]' '{printf "%s.%s.%s",$1,$2, LVM_VERSION="\"`cat VERSION 2>/dev/null || echo Unknown`\"" VER=`cat VERSION` -LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.*(//;s/).*//'`\"" +LVM_RELEASE_DATE="\"`echo $VER | $SED 's/.* (//;s/).*//'`\"" VER=`echo "$VER" | $AWK '{print $1}'` LVM_RELEASE="\"`echo "$VER" | $AWK -F '-' '{print $2}'`\"" VER=`echo "$VER" | $AWK -F '-' '{print $1}'` LVM_MAJOR=`echo "$VER" | $AWK -F '.' '{print $1}'` LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'` -LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '.' '{print $3}'` +LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'` +LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'` ################################################################################ AC_SUBST(APPLIB) @@ -801,6 +802,7 @@ AC_SUBST(LOCALEDIR) AC_SUBST(LVM1) AC_SUBST(LVM1_FALLBACK) AC_SUBST(LVM_VERSION) +AC_SUBST(LVM_LIBAPI) AC_SUBST(LVM_MAJOR) AC_SUBST(LVM_MINOR) AC_SUBST(LVM_PATCHLEVEL) diff --git a/lib/misc/lvm-version.h.in b/lib/misc/lvm-version.h.in index 0c59852f5..2574890bc 100644 --- a/lib/misc/lvm-version.h.in +++ b/lib/misc/lvm-version.h.in @@ -17,13 +17,14 @@ /** * The LVM version number * - * LVM_MAJOR.LVM_MINOR.LVM_PATCHLEVEL[-LVM_RELEASE] + * LVM_MAJOR.LVM_MINOR.LVM_PATCHLEVEL(LVM_LIBAPI)[-LVM_RELEASE] */ #define LVM_VERSION @LVM_VERSION@ #define LVM_MAJOR @LVM_MAJOR@ #define LVM_MINOR @LVM_MINOR@ #define LVM_PATCHLEVEL @LVM_PATCHLEVEL@ +#define LVM_LIBAPI @LVM_LIBAPI@ #define LVM_RELEASE @LVM_RELEASE@ #define LVM_RELEASE_DATE @LVM_RELEASE_DATE@ #endif diff --git a/make.tmpl.in b/make.tmpl.in index fa3b884f6..f552ed2dd 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -116,6 +116,9 @@ LIB_VERSION_LVM := $(shell cat $(top_srcdir)/VERSION | \ LIB_VERSION_DM := $(shell cat $(top_srcdir)/VERSION_DM | \ awk -F '.' '{printf "%s.%s",$$1,$$2}') +LIB_VERSION_APP := $(shell cat $(top_srcdir)/VERSION | \ + awk -F '[(). ]' '{printf "%s.%s",$$1,$$4}') + INCLUDES += -I. -I$(top_srcdir)/include INC_LNS = $(top_srcdir)/include/.symlinks_created