Commit 03cd16f2 authored by Andreas Tille's avatar Andreas Tille

New upstream version 2.8.2-3+dfsg

parent 5bdf64f0
# NCBI External Developer Release:
## SRA Toolkit 2.8.2
**March 6, 2017**
**blast**: Updated blast library to be able to process runs having empty rows
**blast, build**: removed library dependencies that were preventing users from launching these tools
**blast, sra-tools**: Prepared completely static build of blast tools for windows with HTTPS support
**build**: **bam-load**: changed memcpy to memmove when regions overlap - seems to corrupt data on centos7
**build**: Added ability to specify ncbi-vdb/configure --with-magic-prefix. Look for libraries in (lib lib64) when running "configure --with-...-prefix"
**build**: configure detects location of ngs libraries
**build**: configure was fixed to skip options unrecognized by gcc 4.4.7
**build**: created sra-toolkit Debian package
**build**: fixed a bug in 'configure' when in could not find source files in repository saved with non-standard name
**build, ncbi-vdb, sra-tools**: installation will back up old configuration files if they differ from the ones being installed
**cg-load**: added loading of CG File format v2.4
**kns**: SRA tools respect standard set of environment variables for proxy specification
**kns**: updated mbedtls library to version 2.4.1
**ncbi-vdb, ngs, ngs-tools, sra-tools**: eliminated memcpy from sources due to potential for overlap
**ngs, sra-search**: now supports search on reference
**ngs-tools**: updated the NCBI download page to incorporate ngs versions into 3rd party package names
**prefetch**: Fixed error message "path excessive while opening directory" when prefetch is trying to get vdbcache
**prefetch**: Fixed regression in prefetch-2.8.1 when downloading dbGaP files via HTTP
**prefetch**: Fixed regression in prefetch-2.8.1 when downloading vdbcache files from dbGaP via HTTP
**sam-dump**: consistency of sam-dump in fastq-mod improved
**sam-dump**: consistency of sam-dump in fastq-mode improved
**sra-stat**: sra-stat does XML-escaping when printing spot-groups
**test-sra**: extended test-sra to debug user problems with https connections to NCBI
**test-sra**: test-sra print amount of available disk space in user repositories
**vdb-config**: vdb-config correctly works when there is non-canonical path in configuration
## SRA Toolkit 2.8.1-2
**January 19, 2017**
......
......@@ -23,4 +23,4 @@
# ===========================================================================
# SRA-TOOLS and library version
VERSION = 2.8.1
VERSION = 2.8.2
......@@ -438,7 +438,8 @@ my @dependencies;
my %DEPEND_OPTIONS;
foreach my $href (DEPENDS()) {
$_ = $href->{name};
my ($I, $L) = ($href->{Include});
my $I = $href->{Include};
my @L;
my $o = "with-$_-prefix";
++$DEPEND_OPTIONS{$o};
if ($OPT{$o}) {
......@@ -448,9 +449,10 @@ foreach my $href (DEPENDS()) {
my $t = File::Spec->catdir($I, 'libxml2');
$I = $t if (-e $t);
}
$L = File::Spec->catdir($OPT{$o}, 'lib');
push ( @L, File::Spec->catdir($OPT{$o}, 'lib') );
push ( @L, File::Spec->catdir($OPT{$o}, 'lib64') );
}
my ($i, $l) = find_lib($_, $I, $L);
my ($i, $l) = find_lib($_, $I, @L);
if (defined $i || $l) {
my $d = 'HAVE_' . uc($_) . ' = 1';
push @dependencies, $d;
......@@ -485,6 +487,7 @@ foreach my $href (@REQ) {
my $need_build = $a{type} =~ /B/;
my $need_lib = $a{type} =~ /L|D/;
my $need_itf = ! ($a{type} =~ /D/ || $a{type} =~ /E/ || $a{type} =~ /J/);
$need_itf = 1 if ($a{type} =~ /I/);
my $need_jar = $a{type} =~ /J/;
my ($bin, $inc, $lib, $ilib, $src)
......@@ -1442,17 +1445,33 @@ sub check_tool {
}
}
sub check_no_array_bounds {
check_compiler('O', '-Wno-array-bounds');
}
sub check_static_libstdcpp {
my $option = '-static-libstdc++';
my $save = $TOOLS;
$TOOLS = $CPP;
$_ = check_compiler('O', $option);
$TOOLS = $save;
$_ ? $option : ''
print "checking whether $CPP accepts $option... ";
my $log = 'int main() {}\n';
my $cmd = $log;
$cmd =~ s/\\n/\n/g;
my $gcc = "echo -e '$log' | $CPP -xc $option - 2>&1";
print "\n\t\trunning $gcc\n" if ($OPT{'debug'});
my $out = `$gcc`;
my $ok = $? == 0;
if ( $ok && $out ) {
$ok = 0 if ( $out =~ /unrecognized option '-static-libstdc\+\+'/ );
}
print "$out\t" if ($OPT{'debug'});
println $ok ? 'yes' : 'no';
unlink 'a.out';
return '' if (!$ok);
return $option;
}
sub check_no_array_bounds {
check_compiler('O', '-Wno-array-bounds');
}
sub find_lib {
......@@ -1460,7 +1479,7 @@ sub find_lib {
}
sub check_compiler {
my ($t, $n, $i, $l) = @_;
my ($t, $n, $I, @l) = @_;
my $tool = $TOOLS;
if ($t eq 'L') {
......@@ -1506,37 +1525,54 @@ sub check_compiler {
return;
}
if ($i && ! -d $i) {
print "'$i': " if ($OPT{'debug'});
if ($I && ! -d $I) {
print "'$I': " if ($OPT{'debug'});
println 'no';
return;
}
if ($l && ! -d $l) {
print "'$l': " if ($OPT{'debug'}); println 'no';
return;
for ( my $i = 0; $i <= $#l; ++ $i ) {
print "'$l[$i]': " if ($OPT{'debug'});
if ( $l [ $i ] ) {
if ( -d $l [ $i ] ) {
last;
} elsif ( $i == $#l ) {
println 'no';
return;
}
}
}
my $cmd = $log;
$cmd =~ s/\\n/\n/g;
my $gcc = "| $tool -xc $flags " . ($i ? "-I$i " : ' ')
push ( @l, '' ) unless ( @l );
for my $i ( 0 .. $#l ) {
my $l = $l [ $i ];
next if ( $l && ! -d $l );
my $gcc = "| $tool -xc $flags " . ($I ? "-I$I " : ' ')
. ($l ? "-L$l " : ' ') . "- $library";
$gcc .= ' 2> /dev/null' unless ($OPT{'debug'});
$gcc .= ' 2> /dev/null' unless ($OPT{'debug'});
open GCC, $gcc or last;
print "\n\t\trunning echo -e '$log' $gcc\n" if ($OPT{'debug'});
print GCC "$cmd" or last;
my $ok = close GCC;
print "\t" if ($OPT{'debug'});
println $ok ? 'yes' : 'no';
open GCC, $gcc or last;
print "\n\t\trunning echo -e '$log' $gcc\n" if ($OPT{'debug'});
print GCC "$cmd" or last;
my $ok = close GCC;
print "\t" if ($OPT{'debug'});
if ( $ok ) {
println 'yes';
} else {
println 'no' if ( $i == $#l );
}
unlink 'a.out';
unlink 'a.out';
return if (!$ok);
return if ( ! $ok && ( $i == $#l ) );
return 1 if ($t eq 'O');
return 1 if ($t eq 'O');
return ($i, $l);
return ($I, $l) if ( $ok) ;
}
}
println "cannot run $tool: skipped";
......
#define TOOLKIT_VERS 0x02080001
#define TOOLKIT_VERS 0x02080002
......@@ -35,6 +35,7 @@ include $(TOP)/build/Makefile.config
# default
#
SUBDIRS = \
vdb-config \
fastq-loader \
vcf-loader \
kget \
......
package jaba;
import java.lang.Thread;
import java.lang.Runnable;
import java.lang.Process;
import jaba.platform.Platform;
import jaba.DbGapMountTestEnv;
import java.io.InputStreamReader;
public
class
App {
private String _command = null;
private String [] _env = null;
private AppTerminator _terminator = null;
private Thread _thread = null;
private Process _process = null;
private int _exitStatus = 0;
private boolean _finished = false;
private boolean _terminated = false;
public
App ( String command, String [] env )
{
this ( command, env, null );
} /* App () */
public
App ( String command, String [] env, AppTerminator terminator )
{
if ( command == null ) {
throw new RuntimeException ( "Application command is not defined" );
}
_command = command;
_env = env;
_terminator = terminator;
_thread = null;
_process = null;
_exitStatus = 0;
_finished = false;
_terminated = false;
} /* App () */
private
void
runApp ()
{
_exitStatus = 0;
_finished = false;
_terminated = false;
try {
_process = Runtime.getRuntime ().exec ( _command, _env );
if ( _process == null ) {
throw new RuntimeException ( "Can not run command [" + _command + "]" );
}
_process.waitFor ();
_exitStatus = _process.exitValue ();
}
catch ( Throwable Th ) {
System.err.println ( "App failed because: " + Th.toString () );
if ( _process != null ) {
stopApp ();
}
_exitStatus = 666;
}
_finished = true;
} /* runApp () */
protected
void
stopApp ()
{
if ( isRunning () ) {
System.out.println ( "Terminating application [" + _command + "]" );
boolean FailedTerminate = _terminator != null
? _terminator.gentleTerminate ()
: false
;
if ( FailedTerminate ) {
_process.destroy ();
}
}
} /* stopApp () */
public
InputStreamReader
getOutStream ()
{
synchronized ( this ) {
if ( _process == null ) {
throw new RuntimeException ( "Can not get OutStream for NULL process" );
}
return new InputStreamReader( _process.getInputStream () );
}
} /* getOutStream () */
public
InputStreamReader
getErrStream ()
{
synchronized ( this ) {
if ( _process == null ) {
throw new RuntimeException ( "Can not get ErrStream for NULL process" );
}
return new InputStreamReader( _process.getErrorStream () );
}
} /* getErrStream () */
public
boolean
isRunning ()
{
synchronized ( this ) {
return _process != null && _finished == false;
}
} /* isRunning () */
public
void
start ()
{
start ( 0 );
} /* start () */
public
void
start ( long timeoutSec )
{
synchronized ( this ) {
if ( _thread != null ) {
throw new RuntimeException ( "Can not start allready running App" );
}
_thread = new Thread ( new Runnable () { public void run () { runApp (); } } );
_thread.start ();
}
if ( timeoutSec != 0 ) {
try {
Thread thread = new Thread (
new Runnable () {
public
void
run ()
{
Utils.sleepSec ( timeoutSec );
stopApp ();
};
}
);
thread.start ();
thread = null;
}
catch ( Throwable Th ) {
System.out.println ( Th.toString () );
}
}
} /* start () */
public
void
stop ()
{
synchronized ( this ) {
if ( _thread == null ) {
throw new RuntimeException ( "Can not stop allready stopped App" );
}
stopApp ();
_thread = null;
}
} /* stop () */
public
void
waitFor ()
{
try {
/* No check for NULL, cuz ... we eat everything */
_thread.join ();
}
catch ( Throwable Th ) {
throw new RuntimeException ( "Can not wait: " + Th.toString () );
}
} /* waitFor () */
public
int
exitStatus ()
{
if ( isRunning () ) {
throw new RuntimeException ( "Can not get exit status from running application" );
}
return _terminated ? 111 : _exitStatus;
} /* exitStatus () */
};
package jaba;
public
interface
AppTerminator {
public
boolean
gentleTerminate ();
};
package jaba;
import jaba.platform.Platform;
import jaba.test.Tests;
// import jaba.test.Test;
public
class
DbGapMountTest {
public static
void
main( String args [] )
{
try {
if ( args.length != 1 ) {
System.out.println ( "Invalid arguments" );
printHelp ();
throw new RuntimeException ( "Invalid arguments" );
}
String ExeDir = args [ 0 ];
Platform Plt = Platform.getPlatform ( ExeDir );
Tests tests = new Tests ( Plt );
tests.run ();
}
catch ( Exception Expt ) {
Expt.printStackTrace ();
}
}
public static
void
printHelp ()
{
/* Not sure what is better :LOL: */
String className = new Object() { }.getClass().getEnclosingClass().getName ();
// String className = new Object() { }.getClass().getEnclosingClass().getSimpleName ();
System.out.format (
"\nSyntax: java %s bin_directory\n",
className
);
System.out.format (
"\nWhere:\n\nbin_directory - is directory containing these utilites:\n dbgap-mount-too, vdb-config, fasq-dump\n\n"
);
} /* printHelp () */
};
package jaba;
import jaba.platform.Platform;
import java.nio.file.*;
import java.io.OutputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public
class
DbGapMountTestEnv {
private Platform _platform = null;
public enum EnvType { Undef, NoConf, BadConf, GoodConf };
private EnvType envType = EnvType.Undef;
private String pathSeparator = null;
private String vdbConfig = null;
private String mountTool = null;
private String fastqDump = null;
public
DbGapMountTestEnv ( Platform Platform )
{
if ( Platform == null ) {
throw new RuntimeException ( "Undefined platform" );
}
_platform = Platform;
} /* DbGapMountTestEnv () */
public
void
createTestEnv ( EnvType EnvType )
{
if ( envType != EnvType.Undef ) {
throw new RuntimeException ( "Can not create environment. Clear old first" );
}
if ( _platform == null ) {
throw new RuntimeException ( "Can not create environment. NULL Platform or BinDir passed" );
}
pathSeparator = System.getProperty ( "file.separator" );
/* Removing data from previous experiments
*/
Utils.unlink ( _platform.getTestDir () );
/* Checking existance necessary files
*/
checkExecutables ();
/* Checking existance necessary other files
*/
checkInputs ();
/* Creating file tree
*/
makeFileTree ();
/* Configuring ();
*/
configure ( EnvType );
} /* createTestEnv () */
public
void
clearTestEnv ()
{
if ( envType == EnvType.Undef ) {
return;
}
if ( _platform == null ) {
throw new RuntimeException ( "Can not clear environment. NULL Platform or BinDir passed" );
}
/* Removing unnecessary data
*/
Utils.unlink ( _platform.getTestDir () );
envType = EnvType.Undef;
} /* clearTestEnv () */
private
void
makeFileTree ()
{
System.out.format ( "Making file tree\n" );
Utils.mkdir (
_platform.getTestDir ()
);
Utils.mkdir (
_platform.getTarget ( Platform.TargetName.ConfigDir )
);
Utils.mkdir (
_platform.getTarget ( Platform.TargetName.DataDir )
);
Utils.mkdir (
_platform.getTarget ( Platform.TargetName.TempDir )
);
if ( _platform.needCreateMountPoint () ) {
Utils.mkdir (
_platform.getTarget ( Platform.TargetName.MountPoint )
);
}
else {
System.out.format ( "Does not need mount point to exist [%s]\n", _platform.getTarget ( Platform.TargetName.MountPoint ) );
}
} /* makeFileTree () */
private
void
checkExecutables ()
{
System.out.format ( "Checking executables\n" );
Utils.checkExecutable (
_platform.getTarget ( Platform.TargetName.MountApp )
);
Utils.checkExecutable (
_platform.getTarget ( Platform.TargetName.ConfigApp )
);
Utils.checkExecutable (
_platform.getTarget ( Platform.TargetName.DumpApp )
);
} /* checkExecutables () */
private
void
checkInputs ()
{
System.out.format ( "Checking inputs\n" );
Utils.checkExists (
_platform.getTarget ( Platform.TargetName.NgcFile )
);
Utils.checkExists (
_platform.getTarget ( Platform.TargetName.KartFile )
);
} /* checkInputs () */
private
void
configure ( EnvType Type )
{
System.out.format ( "Configuring\n" );
if ( _platform == null ) {
throw new RuntimeException ( "Can not configure environment. NULL Platform or BinDir passed" );
}
if ( Type == EnvType.Undef ) {
throw new RuntimeException ( "Invalid environment type passed" );
}
envType = Type;
if ( envType == EnvType.NoConf ) {
/* just return
*/
return;
}
/* Here we do create config file
*/
try {
String ThePath = _platform.getTarget (
Platform.TargetName.ConfigFile
);
OutputStream Out = new BufferedOutputStream (
Files.newOutputStream (
Paths.get ( ThePath ),
StandardOpenOption.CREATE,
StandardOpenOption.TRUNCATE_EXISTING
)
);
String Jojoba = "## auto-generated configuration file - DO NOT EDIT ##\n\n";
byte Bytes [] = Jojoba.getBytes ();
Out.write ( Bytes, 0, Bytes.length );
Jojoba = "/repository/user/default-path = \""
+ Utils.pathToPosix ( _platform.getTarget ( Platform.TargetName.DataDir ) )
+ "\"\n"
;
Bytes = Jojoba.getBytes ();
Out.write ( Bytes, 0, Bytes.length );
Out.close ();
}
catch ( Throwable Th ) {
throw new RuntimeException ( "ERROR: Can not write config: " + Th.toString () );
}
if ( envType == EnvType.BadConf ) {
/* We just return after dummy config creation
*/
return;
}
if ( envType == EnvType.GoodConf ) {
/* Here we import NGC file
*/
try {
String Cmd = _platform.getTarget (
Platform.TargetName.ConfigApp
)
+ " --import "
+ _platform.getTarget (
Platform.TargetName.NgcFile
);
Process proc = Runtime.getRuntime().exec ( Cmd, _platform.getProcessEnvironment() );
proc.waitFor ();
Utils.printProcessOut ( proc );
Utils.printProcessErr ( proc );
}