Whamcloud - gitweb
LU-7699 build: Replace version_tag.pl with LUSTRE-VERSION-GEN 07/18107/17
authorChristopher J. Morrone <morrone2@llnl.gov>
Fri, 22 Jan 2016 02:36:01 +0000 (21:36 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 23 Mar 2016 06:01:40 +0000 (06:01 +0000)
commitee813dbaa2a2b86f4873c4c289f62a0243aa9809
treee6728bd1756d6a226c40cdb478d8d350d757ccc3
parent0badac9d0b002d5e4399e59aa7bde28a10021f1f
LU-7699 build: Replace version_tag.pl with LUSTRE-VERSION-GEN

This patch overhauls how version numbers are handled.

The biggest change is removing the two independent
places where versions were being generated (LB_BUILDID and
lustre_tag*.pl) with a single script named LUSTRE-VERSION-GEN
at the top level of the tree.  LUSTRE-VERSION-GEN is based
on the GIT-VERSION-GEN script that git's own source code build
system uses.

LUSTRE-VERSION-GEN generates the lustre version string from
either git, or if git is not available from the LUSTRE-VERSION-FILE
file, or if _that_ is not available, its own internal DEFAULT_VERSION
default version number.  This allows building the lustre code under
all reasonable conditions.

The new method uses LUSTRE-VERSION-GEN to supply the correct
full lustre version (which may contain git --describe information)
to AC_INIT.  This means that the autotools actually know the
correct version number.  Some benefits of this are:

* We can use standard {AC_}PACKAGE_VERSION macros and variables
  instead of inventing our own
* ./configure --version and other commands will list the correct
  version of Lustre
* The lustre tarball created by "make dist" will contain the full
  version number

The lustre/autoconf/lustre-version.ac file was replaced with
a new config/lustre-version.m4 file.  We no longer need to work
with m4-only macros prefore AC_INIT is called, so the new
file defines a LUSTRE_VERSION_VARIABLES function for us to call
from configure.ac.  The new lustre-version.m4 derives the
derive LUSTRE_{MAJOR,MINOR,PATCH,FIX} from AC_PACKAGE_VERSION
rather than being yet another source of version numbers.

The LUSTRE_VER_ALLOWED_OFFSET and LUSTRE_CLI_VER_OFFSET_WARN
m4 macros were dropped, and the OBD_OCD_VERSION strings stored
directly in lustre_ver.h.in instead.

LB_CHECK_VERSION was removed (no longer necessary).

AC_LUSTRE_VERSION_STRING was drop.  It is no longer necessary
now that we can set LUSTRE_VERSION_STRING directly to
@PACKAGE_VERSION@ in lustre_ver.h.in.

The DOWNSTREAM_RELEASE configure argument is deprecated and all
related code removed.

The lustre/doc/VERSIONING documenation is relocated to
Documentation/versioning.txt and updated to reflect the new versioning
method and practices.

The META file and BUILDID variables and related code are removed
since they are no longer used under the new versioning method.

Note that this patch makes lustre only look at the dotted version
tags in git, so we can finally stop using three to five tags for
every release.  Now we can just use one clear tag.  The tags
with underscores are obsolete.

Change-Id: I7196f92ed4975776cc8e73fd3ebf436b5921f83e
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/18107
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
20 files changed:
.gitignore
Documentation/versioning.txt [new file with mode: 0644]
LUSTRE-VERSION-GEN [new file with mode: 0755]
autoMakefile.am
config/lustre-build-linux.m4
config/lustre-build.m4
config/lustre-version.m4 [new file with mode: 0644]
configure.ac
contrib/lbuild/lbuild
lustre-dkms.spec.in
lustre.spec.in
lustre/autoMakefile.am
lustre/autoconf/Makefile.am
lustre/autoconf/lustre-version.ac [deleted file]
lustre/doc/VERSIONING [deleted file]
lustre/include/lustre_ver.h.in
lustre/scripts/Makefile.am
lustre/scripts/version_tag-git.pl [deleted file]
lustre/scripts/version_tag-none.pl [deleted file]
lustre/scripts/version_tag.pl [deleted file]