TRAFODION-1570 sqvers -u displays multiple UTTs for a consistent build Add the $TRAFODION_VER_PROD (with spaces replaced by underscores) to the first version of jar manifests, the way it is done for the ODBC driver. Note that the T2 and T4 drivers still are missing $TRAFODION_VER_PROD.
Also add version display for SuSE Linux to sqvers. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/359f2ed3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/359f2ed3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/359f2ed3 Branch: refs/heads/master Commit: 359f2ed31661fb4bc2c8f12824c13d41314ec952 Parents: 502a8bd Author: Hans Zeller <[email protected]> Authored: Thu Dec 3 01:18:01 2015 +0000 Committer: Hans Zeller <[email protected]> Committed: Thu Dec 3 17:47:34 2015 +0000 ---------------------------------------------------------------------- core/sqf/build-scripts/genverhdr.ksh | 3 ++- core/sqf/sqvers | 29 ++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/359f2ed3/core/sqf/build-scripts/genverhdr.ksh ---------------------------------------------------------------------- diff --git a/core/sqf/build-scripts/genverhdr.ksh b/core/sqf/build-scripts/genverhdr.ksh index 5f23032..00ccf34 100755 --- a/core/sqf/build-scripts/genverhdr.ksh +++ b/core/sqf/build-scripts/genverhdr.ksh @@ -122,7 +122,8 @@ Implementation-Version-6: date $buildDate EOF cat > $TMPFILEJ2 <<EOF #!/bin/sh -echo "Implementation-Version-1: Version \$*" +VER_PROD=`echo \$TRAFODION_VER_PROD | sed 's/ /_/'` +echo "Implementation-Version-1: Version \$* \$VER_PROD" cat \$MY_SQROOT/export/include/SCMBuildMan.mf EOF chmod +x $TMPFILEJ2 http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/359f2ed3/core/sqf/sqvers ---------------------------------------------------------------------- diff --git a/core/sqf/sqvers b/core/sqf/sqvers index 3ef8e3d..700a6f7 100755 --- a/core/sqf/sqvers +++ b/core/sqf/sqvers @@ -81,13 +81,28 @@ if ($verbose) { my $lr = `uname -r`; $lr =~ s/\s+$//; -if ($verbose) { +my $linuxdistro = "UnknownLinuxDistro"; +my $dr = "?.?"; +if (-r "/etc/redhat-release") { + if ($verbose) { printf "v: cmd:cat /etc/redhat-release\n"; -} -my $rhrel = `cat /etc/redhat-release`; -my $rr = "?.?"; -if ($rhrel =~ /^.*release ([0-9][0-9]*)\.([0-9][0-9]*)/) { - $rr=$1 . "." . $2 + } + $linuxdistro = "redhat"; + my $linuxrel = `cat /etc/redhat-release`; + if ($linuxrel =~ /^.*release ([0-9][0-9]*)\.([0-9][0-9]*)/) { + $dr=$1 . "." . $2 + } +} elsif (-r "/etc/SuSE-release") { + if ($verbose) { + printf "v: cmd:cat /etc/SuSE-release\n"; + } + $linuxdistro = "SuSE"; + my $susevers = `cat /etc/SuSE-release | grep VERSION | cut -f 2 -d '='`; + my $susepatch = `cat /etc/SuSE-release | grep PATCH | cut -f 2 -d '='`; + # trim white space + $susevers =~ s/^\s+|\s+$//g; + $susepatch =~ s/^\s+|\s+$//g; + $dr=$susevers . "." . $susepatch } print "MY_SQROOT=$my_sqroot\n"; @@ -106,7 +121,7 @@ if (($mtype =~ /32/) || ($btype =~ /debug/)) { print "SQ_MBTYPE=$sq_mbtype ($mtype-$btype)\n"; } print "linux=$lr\n"; -print "redhat=$rr\n"; +print "$linuxdistro=$dr\n"; # deal with elfs my $dir_lib = "export/lib" . $sq_mbtype;
