[med-svn] [Git][med-team/ncbi-vdb][upstream] New upstream version 2.10.7+dfsg
Aaron M. Ucko
gitlab at salsa.debian.org
Wed Jun 3 02:44:40 BST 2020
Aaron M. Ucko pushed to branch upstream at Debian Med / ncbi-vdb
Commits:
cd45ea5b by Aaron M. Ucko at 2020-06-02T21:11:50-04:00
New upstream version 2.10.7+dfsg
- - - - -
13 changed files:
- CHANGES.md
- build/Makefile.vers
- build/install-kfg.sh
- configure
- libs/blast/blast-mgr.c
- libs/kdb/libkdb.vers.h
- libs/kfs/unix/sysdir.c
- libs/klib/release-vers.h
- libs/kns/http-file.c
- libs/kns/http-request.c
- libs/ncbi-vdb/libncbi-vdb.vers
- libs/ngs-py/py_Manager.c
- libs/vdb/libvdb.vers.h
Changes:
=====================================
CHANGES.md
=====================================
@@ -1,6 +1,11 @@
# NCBI External Developer Release:
+## NCBI VDB 2.10.7
+**May 21, 2020**
+ **kns, ngs-tools, sra-tools**: added new header to HTTP requests to communicate VDB version
+
+
## NCBI VDB 2.10.6
**May 15, 2020**
=====================================
build/Makefile.vers
=====================================
@@ -23,4 +23,4 @@
# ===========================================================================
# NCBI-VDB and library version
-VERSION = 2.10.6
+VERSION = 2.10.7
=====================================
build/install-kfg.sh
=====================================
@@ -38,16 +38,48 @@ TGT_FILE=$3/$1
mkdir -p ${KONFIG_DIR}
+function get_md5 ()
+{
+ local MD5="$(which md5sum)"
+ if [ "$MD5" != "" ] && [ -x "$MD5" ]
+ then
+ "$MD5" "$1" | awk '{print $1;}'
+ else
+ MD5=/usr/bin/md5sum
+ if [ -x "$MD5" ]
+ then
+ "$MD5" "$1" | awk '{print $1;}'
+ else
+ MD5="$(which md5)"
+ if [ "$MD5" != "" ] && [ -x "$MD5" ]
+ then
+ "$MD5" -q "$1"
+ else
+ MD5=/sbin/md5
+ if [ -x "$MD5" ]
+ then
+ "$MD5" -q "$1"
+ else
+ echo "failed to locate md5 tool" 2>&1 1>/dev/null
+ exit 5
+ fi
+ fi
+ fi
+ fi
+}
+
+#echo "installing $1 from $2 to $3, mdsums = $4"
+
# create a backup if installed file has been modified by user
-if md5sum --help > /dev/null ; then
- if [ -f ${TGT_FILE} ] ; then
- md5=$(md5sum ${TGT_FILE} | awk '{print $1;}')
- # echo "$1 md5=$md5"
- if [ "$(grep ${md5} ${MD5SUMS})" == "" ] ; then
+if [ -f ${TGT_FILE} ]
+then
+ md5=$(get_md5 ${TGT_FILE})
+ #echo "$1 md5=$md5"
+ if [ "$(grep ${md5} ${MD5SUMS})" == "" ]
+ then
# not a known version of the file; create a backup copy
- mv -v ${TGT_FILE} ${TGT_FILE}.orig
+ mv -b -v ${TGT_FILE} ${TGT_FILE}.orig
fi
- fi
fi
# copy to the install location
=====================================
configure
=====================================
@@ -41,5 +41,5 @@ else
echo >&2 "configure: error: perl not found."; exit 1; }
cd $CURDIR/setup
- perl -w konfigure.perl "$@"
+ perl konfigure.perl "$@"
fi
=====================================
libs/blast/blast-mgr.c
=====================================
@@ -50,7 +50,7 @@
#include <stdio.h> /* fprintf */
#include <string.h> /* memset */
-#define TOOLKIT "sratoolkit2_10_6"
+#define TOOLKIT "sratoolkit2_10_7"
/******************************************************************************/
=====================================
libs/kdb/libkdb.vers.h
=====================================
@@ -24,4 +24,4 @@
*
*/
-#define LIBKDB_VERS 0x02070026
+#define LIBKDB_VERS 0x02070027
=====================================
libs/kfs/unix/sysdir.c
=====================================
@@ -38,12 +38,15 @@ struct KSysDirListing;
#include <kfs/extern.h>
#include "sysdir-priv.h"
#include "sysfile-priv.h"
-#include <klib/sort.h>
+
+#include <klib/debug.h> /* DBGMSG */
#include <klib/impl.h>
+#include <klib/klib-priv.h>
#include <klib/log.h>
#include <klib/out.h>
#include <klib/rc.h>
-#include <klib/klib-priv.h>
+#include <klib/sort.h>
+
#include <sysalloc.h>
#include "os-native.h"
@@ -852,7 +855,12 @@ rc_t KSysDirResolvePath_v1 ( const KSysDir_v1 * self, bool absolute,
if ( rc == 0 )
{
uint32_t path_size = strlen ( full );
+
+ /*
PLOGMSG(klogDebug, (klogDebug, "KSysDirResolvePath_v1 = '$(res)'", "res=%s", full));
+ */
+ DBGMSG(DBG_KFS, DBG_FLAG(DBG_KFS_DIR),
+ ("KSysDirResolvePath_v1 = '%s'\n", full));
if ( absolute )
{
=====================================
libs/klib/release-vers.h
=====================================
@@ -28,7 +28,7 @@
/* Version of current SRA Toolkit Release */
-#define RELEASE_VERS 0x020A0006
+#define RELEASE_VERS 0x020A0007
/* Type of Version of current SRA Toolkit Release is one of:
=====================================
libs/kns/http-file.c
=====================================
@@ -1269,11 +1269,12 @@ rc_t KHttpFileMake( KHttpFile ** self,
rc = KDataBufferMake( buf, 8, 0 );
if ( rc == 0 )
{
- if (aBuf != NULL)
- rc = KDataBufferPrintf(buf,
+ if (aBuf != NULL)
+ rc = KDataBufferPrintf(buf,
"%.*s", aBuf->elem_count, aBuf->base);
- else
- rc = KDataBufferVPrintf ( buf, url, args );
+ else
+ rc = KDataBufferVPrintf ( buf, url, args );
+
if ( rc == 0 )
{
rc = ParseUrl ( & f -> block, buf -> base, buf -> elem_count - 1 );
@@ -1290,6 +1291,7 @@ rc_t KHttpFileMake( KHttpFile ** self,
}
free ( f );
}
+
return rc;
}
=====================================
libs/kns/http-request.c
=====================================
@@ -1232,9 +1232,11 @@ rc_t CC KClientHttpRequestFormatMsgInt( const KClientHttpRequest *self,
bool have_accept = false;
bool have_user_agent = false;
bool have_sra_release = false;
+ bool have_vdb_release = false;
String accept_string;
String sra_release_string;
+ String vdb_release_string;
String user_agent_string;
const KHttpHeader *node;
@@ -1248,6 +1250,7 @@ rc_t CC KClientHttpRequestFormatMsgInt( const KClientHttpRequest *self,
CONST_STRING ( &accept_string , "Accept" ); /* 6 */
CONST_STRING ( &sra_release_string, "X-SRA-Release" ); /* 13 */
+ CONST_STRING ( &vdb_release_string, "X-VDB-Release" ); /* 13 */
CONST_STRING ( &user_agent_string , "User-Agent" ); /* 10 */
assert(method);
@@ -1285,6 +1288,11 @@ rc_t CC KClientHttpRequestFormatMsgInt( const KClientHttpRequest *self,
if (StringCaseCompare(&node->name, &sra_release_string) == 0)
have_sra_release = true;
}
+ /* look for "X-VDB-Release" */
+ else if (!have_vdb_release && node->name.len == 13) {
+ if (StringCaseCompare(&node->name, &vdb_release_string) == 0)
+ have_vdb_release = true;
+ }
/* add header line */
rc = KDataBufferPrintf ( buffer, "%S: %S\r\n"
@@ -1292,7 +1300,7 @@ rc_t CC KClientHttpRequestFormatMsgInt( const KClientHttpRequest *self,
, & node -> value );
}
- /* add an Accept header if we did not find one already in the header tree */
+ /* add an Accept header if we did not find one already in the header tree */
if (!have_accept) {
r2 = KDataBufferPrintf(buffer, "Accept: */*\r\n");
if (rc == 0 && r2 != 0)
@@ -1312,6 +1320,19 @@ rc_t CC KClientHttpRequestFormatMsgInt( const KClientHttpRequest *self,
rc = r2;
}
+ /* add a X-VDB-Release header if we did not find one
+ already in the header tree */
+ if (!have_vdb_release) {
+ SraReleaseVersion version;
+ r2 = SraReleaseVersionGet(&version);
+ if (r2 == 0) {
+ r2 = KDataBufferPrintf(buffer, "X-VDB-Release: %V\r\n",
+ version.version);
+ }
+ if (rc == 0 && r2 != 0)
+ rc = r2;
+ }
+
/* add an User-Agent header from the kns-manager if we did not find one already in the header tree */
if ( !have_user_agent )
{
=====================================
libs/ncbi-vdb/libncbi-vdb.vers
=====================================
@@ -1 +1 @@
-2.10.6
+2.10.7
=====================================
libs/ngs-py/py_Manager.c
=====================================
@@ -8,6 +8,8 @@
#include <kfc/rsrc-global.h>
+#include <klib/text.h>
+
#include "NGS_String.h"
#include "NGS_ReadCollection.h"
#include "NGS_ReferenceSequence.h"
@@ -27,9 +29,14 @@
static PY_RES_TYPE NGSErrorHandler(ctx_t ctx, char* pStrError, size_t nStrErrorBufferSize)
{
char const* pszErrorDesc = WHAT();
+ size_t source_size = string_size ( pszErrorDesc );
+ size_t copied;
assert(pStrError);
- strncpy(pStrError, pszErrorDesc, nStrErrorBufferSize);
- pStrError[nStrErrorBufferSize - 1] = '\n';
+ copied = string_copy( pStrError, nStrErrorBufferSize, pszErrorDesc, source_size );
+ if ( copied == nStrErrorBufferSize ) // no space for 0-terminator
+ {
+ pStrError [ copied - 1 ] = 0;
+ }
CLEAR();
return PY_RES_ERROR; /* TODO: return error (exception) type */
}
=====================================
libs/vdb/libvdb.vers.h
=====================================
@@ -24,4 +24,4 @@
*
*/
-#define LIBVDB_VERS 0x02070026
+#define LIBVDB_VERS 0x02070027
View it on GitLab: https://salsa.debian.org/med-team/ncbi-vdb/-/commit/cd45ea5b7903d42708eb6104c88ff6d2489e5ba7
--
View it on GitLab: https://salsa.debian.org/med-team/ncbi-vdb/-/commit/cd45ea5b7903d42708eb6104c88ff6d2489e5ba7
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200603/2ce86f87/attachment-0001.html>
More information about the debian-med-commit
mailing list