Run of fresh-snapshots for kraken

Merge these changes:

git pull https://janitor.debian.net/git/kraken fresh-snapshots/main
git pull https://janitor.debian.net/git/kraken fresh-snapshots/pristine-tar
git pull https://janitor.debian.net/git/kraken fresh-snapshots/upstream

Summary

Merged new upstream version: 1.1.1+git20210927.1.e75654f (was: 1.1.1).

Diff

Branch: main

Diff is too long (more than 200 lines). Download the raw diff.

Branch: pristine-tar

diff --git a/kraken_1.1.1+git20210927.1.e75654f.orig.tar.gz.delta b/kraken_1.1.1+git20210927.1.e75654f.orig.tar.gz.delta
new file mode 100644
index 0000000..12920d0
Binary files /dev/null and b/kraken_1.1.1+git20210927.1.e75654f.orig.tar.gz.delta differ
diff --git a/kraken_1.1.1+git20210927.1.e75654f.orig.tar.gz.id b/kraken_1.1.1+git20210927.1.e75654f.orig.tar.gz.id
new file mode 100644
index 0000000..6ba2f8f
--- /dev/null
+++ b/kraken_1.1.1+git20210927.1.e75654f.orig.tar.gz.id
@@ -0,0 +1 @@
+097454a0d3c1826b65c6d58f2f0b2464e1fd4dad

Branch: upstream

Tag: upstream/1.1.1+git20210927.1.e75654f
diff --git a/scripts/standard_installation.sh b/scripts/standard_installation.sh
index 4733a8f..41dfcf7 100755
--- a/scripts/standard_installation.sh
+++ b/scripts/standard_installation.sh
@@ -30,11 +30,17 @@ then
   WOD_FLAG="--work-on-disk"
 fi
 
+WGET_FLAG=""
+if [ -n "$KRAKEN_USE_WGET" ]
+then
+  WGET_FLAG="--use-wget"
+fi
+
 check_for_jellyfish.sh
 kraken-build --db $KRAKEN_DB_NAME --download-taxonomy
-kraken-build --db $KRAKEN_DB_NAME --download-library archaea
-kraken-build --db $KRAKEN_DB_NAME --download-library bacteria
-kraken-build --db $KRAKEN_DB_NAME --download-library viral
+kraken-build --db $KRAKEN_DB_NAME --download-library archaea $WGET_FLAG
+kraken-build --db $KRAKEN_DB_NAME --download-library bacteria $WGET_FLAG
+kraken-build --db $KRAKEN_DB_NAME --download-library viral $WGET_FLAG
 kraken-build --db $KRAKEN_DB_NAME --build --threads $KRAKEN_THREAD_CT \
                --jellyfish-hash-size "$KRAKEN_HASH_SIZE" \
                --max-db-size "$KRAKEN_MAX_DB_SIZE" \
diff --git a/src/quickfile.cpp b/src/quickfile.cpp
index 4b3e9d7..a2b34de 100644
--- a/src/quickfile.cpp
+++ b/src/quickfile.cpp
@@ -1,5 +1,6 @@
 /*
- * Copyright 2013-2019, Derrick Wood, Jennifer Lu <jlu26@jhmi.edu>
+ * Original file Copyright 2013-2015, Derrick Wood <dwood@cs.jhu.edu>
+ * Portions (c) 2017-2018, Florian Breitwieser <fbreitwieser@jhu.edu> as part of KrakenUniq
  *
  * This file is part of the Kraken taxonomic sequence classification system.
  *
@@ -66,12 +67,14 @@ void QuickFile::open_file(string filename_str, string mode, size_t size) {
   }
 
   fptr = (char *)mmap(0, filesize, PROT_READ | PROT_WRITE, m_flags, fd, 0);
+  madvise(fptr,filesize,MADV_WILLNEED);
   if (fptr == MAP_FAILED)
     err(EX_OSERR, "unable to mmap %s", filename);
   valid = true;
 }
 
 void QuickFile::load_file() {
+  if(mlock(fptr,filesize)!=0){
   int thread_ct = 1;
   int thread = 0;
   #ifdef _OPENMP
@@ -84,13 +87,17 @@ void QuickFile::load_file() {
   size_t page_size = getpagesize();
   char buf[thread_ct][page_size];
 
+#ifdef _OPENMP
   #pragma omp parallel
+#endif
   {
     #ifdef _OPENMP
     thread = omp_get_thread_num();
     #endif
 
+#ifdef _OPENMP
     #pragma omp for schedule(dynamic)
+#endif
     for (size_t pos = 0; pos < filesize; pos += page_size) {
       size_t this_page_size = filesize - pos;
       if (this_page_size > page_size)
@@ -102,6 +109,7 @@ void QuickFile::load_file() {
   #ifdef _OPENMP
   omp_set_num_threads(old_thread_ct);
   #endif
+  }
 }
 
 char * QuickFile::ptr() {
@@ -129,4 +137,48 @@ void QuickFile::close_file() {
   valid = false;
 }
 
+// from http://programanddesign.com/cpp/human-readable-file-size-in-c/
+char* readable_fs(double size/*in bytes*/, char *buf) {
+    int i = 0;
+    const char* units[] = {"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"};
+    while (size > 1024) {
+        size /= 1024;
+        i++;
+    }
+    sprintf(buf, "%.*f %s", i, size, units[i]);
+    return buf;
+}
+
+
+
+std::vector<char> slurp_file(std::string filename, size_t lSize) {
+  FILE * pFile;
+  size_t result;
+
+  pFile = fopen ( filename.c_str() , "rb" );
+  if (pFile==NULL) {fputs ("File error",stderr); exit (1);}
+
+  if (lSize > 0) {
+    // obtain file size:
+    fseek (pFile , 0 , SEEK_END);
+    lSize = ftell (pFile);
+    rewind (pFile);
+  }
+  
+  char buf[50];
+  readable_fs(lSize, buf);
+  std::cerr << "Getting " << filename << " into memory (" << buf << ") ..."; 
+
+  // copy the file into the vector:
+  std::vector<char> buffer(lSize);
+  result = fread (buffer.data(),1,lSize,pFile);
+  if (result != lSize) {fputs ("Reading error",stderr); exit (3);}
+  fclose (pFile);
+
+  std::cerr << " Done" << std::endl;
+  return(buffer);
+}
+
+
+
 } // namespace

Publish Blockers

  • ☑ run was successful
  • ☑ package has not been removed from the archive
  • ☑ command has not changed
  • ☑ review not required
  • ☑ 0 publish attempts so far.not currently attempting to back off
  • ☒ merge proposals for the package maintainer are currently being rate-limited (open: 1258, max open: 300)
  • ☑ change set 22cf0b2b-1be2-41ed-a4de-37b3b0295f8a is ready

Resulting package

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots kraken-dbgsymapt install -t fresh-snapshots kraken

Lintian Result

Full worker log Full build log