From f2d28899a2c3b5a427f4322623ba138887fe6adc Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Mon, 25 Apr 2016 10:36:49 -0400 Subject: [PATCH] LU-7699 build: Convert version underscores to dashes for dpkg 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 Reviewed-on: http://review.whamcloud.com/19488 Tested-by: Jenkins Reviewed-by: Dmitry Eremin Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- autoMakefile.am | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/autoMakefile.am b/autoMakefile.am index ed22c70..1b04013 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -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 -# 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 - 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 $$(date -R)\n\n.\nwq" | ed debian/changelog; \ -- 1.8.3.1