Whamcloud - gitweb
LU-7699 build: Convert version underscores to dashes for dpkg 88/19488/5
authorChristopher J. Morrone <morrone2@llnl.gov>
Mon, 25 Apr 2016 14:36:49 +0000 (10:36 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 2 May 2016 23:56:29 +0000 (23:56 +0000)
For rpm, we can't have dashes in the version string so we use
underscores.  For dpkg, the requirements are reversed.

In the "debs" make target, we convert underscores in the version
string to dashes.  We also trim down the comment that no longer
really makes sense with the new versioning scheme.

Change-Id: I6d600fc4a16be60c664ef0662b482c31877fbfea
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/19488
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
autoMakefile.am

index ed22c70..1b04013 100644 (file)
@@ -180,16 +180,9 @@ srpm: @PACKAGE_TARNAME@.spec dist Makefile
        rm -rf $$rpmbuilddir
 
 # In the debs target, first make sure what's in the changelog reflects
        rm -rf $$rpmbuilddir
 
 # In the debs target, first make sure what's in the changelog reflects
-# the software version.  Here's how we could dig the version out of the
-# autoconf version file directly:
-# lversion=$$(sed -ne 's/m4_define(\[LUSTRE_[A-Z][A-Z]*\],\[\([0-9][0-9]*\)\])$$/\1/p'
-#      lustre/autoconf/lustre-version.ac | tr '\n' '.' | sed -e 's/.$//');
-#
-# However, one cannot really run "make debs" without having done a
-# configure first, so we could use the easier method of digging the
-# version out of the config.h file.
+# the software version.
 debs: undef.h
 debs: undef.h
-       lversion=$$(sed -ne 's/^#define VERSION "\(.*\)"$$/\1/p' config.h); \
+       lversion=$$(echo @VERSION@ | tr '_' '-'); \
        cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
        if [ "$$lversion" != "$$cversion" ]; then \
                echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n  * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca>  $$(date -R)\n\n.\nwq" | ed debian/changelog; \
        cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
        if [ "$$lversion" != "$$cversion" ]; then \
                echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n  * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca>  $$(date -R)\n\n.\nwq" | ed debian/changelog; \