[med-svn] [Git][med-team/libseqlib][master] 6 commits: Avoid using non-public HTSlib headers and functions

Andreas Tille gitlab at salsa.debian.org
Wed Dec 18 14:07:54 GMT 2019


Andreas Tille pushed to branch master at Debian Med / libseqlib


Commits:
820f035f by Andreas Tille at 2019-12-18T13:04:02Z
Avoid using non-public HTSlib headers and functions

- - - - -
44476aa7 by Andreas Tille at 2019-12-18T13:04:41Z
routine-update: Standards-Version: 4.4.1

- - - - -
722c79a3 by Andreas Tille at 2019-12-18T13:04:49Z
Set upstream metadata fields: Bug-Database.
- - - - -
442e90ce by Andreas Tille at 2019-12-18T13:12:20Z
Refresh symbols

- - - - -
ee6f2daf by Andreas Tille at 2019-12-18T13:16:52Z
do not (Build-)Depend libhts-private-dev

- - - - -
b97d3004 by Andreas Tille at 2019-12-18T13:18:53Z
Upload to unstable

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/libseqlib1.symbols
- + debian/patches/fix_private_htslib_usage.patch
- debian/patches/series
- debian/upstream/metadata


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+libseqlib (1.1.2+dfsg-5) unstable; urgency=medium
+
+  * Avoid using non-public HTSlib headers and functions
+    and do not (Build-)Depend libhts-private-dev
+    Closes: #946924
+  * Standards-Version: 4.4.1
+  * Set upstream metadata fields: Bug-Database.
+  * Refresh symbols
+
+ -- Andreas Tille <tille at debian.org>  Wed, 18 Dec 2019 14:17:13 +0100
+
 libseqlib (1.1.2+dfsg-4) unstable; urgency=medium
 
   * Adapt symbols to new version of gcc


=====================================
debian/control
=====================================
@@ -6,14 +6,14 @@ Priority: optional
 Build-Depends: debhelper-compat (= 12),
                d-shlibs,
                pkg-config,
-               libhts-private-dev,
+               libhts-dev,
                libcurl4-openssl-dev | libcurl4-dev,
                zlib1g-dev,
                libfml-dev (>= 0.1-3),
                libbwa-dev (>= 0.7.15-3),
                libjsoncpp-dev,
                libssw-dev
-Standards-Version: 4.4.0
+Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/med-team/libseqlib
 Vcs-Git: https://salsa.debian.org/med-team/libseqlib.git
 Homepage: https://github.com/walaj/SeqLib
@@ -43,7 +43,6 @@ Depends: libseqlib1 (= ${binary:Version}),
          ${shlibs:Depends},
          ${misc:Depends},
          libhts-dev (>= 1.3.2-3),
-         libhts-private-dev,
          libjsoncpp-dev,
          libbwa-dev,
          libfml-dev,


=====================================
debian/libseqlib1.symbols
=====================================
@@ -126,10 +126,10 @@ libseqlib.so.1 libseqlib1 #MINVER#
  _ZN6SeqLib8tostringIjEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_ at Base 1.1.1+dfsg
  _ZN6SeqLib9AddCommasIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_ at Base 1.1.1+dfsg
  _ZN6SeqLib9BamHeader21ConstructName2IDTableEv at Base 1.1.1+dfsg
- _ZN6SeqLib9BamHeaderC1EPK9bam_hdr_t at Base 1.1.1+dfsg
+ _ZN6SeqLib9BamHeaderC1EPK9sam_hdr_t at Base 1.1.2+dfsg
  _ZN6SeqLib9BamHeaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE at Base 1.1.1+dfsg
  _ZN6SeqLib9BamHeaderC1ERKSt6vectorINS_14HeaderSequenceESaIS2_EE at Base 1.1.1+dfsg
- _ZN6SeqLib9BamHeaderC2EPK9bam_hdr_t at Base 1.1.1+dfsg
+ _ZN6SeqLib9BamHeaderC2EPK9sam_hdr_t at Base 1.1.2+dfsg
  _ZN6SeqLib9BamHeaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE at Base 1.1.1+dfsg
  _ZN6SeqLib9BamHeaderC2ERKSt6vectorINS_14HeaderSequenceESaIS2_EE at Base 1.1.1+dfsg
  _ZN6SeqLib9BamHeaderD1Ev at Base 1.1.1+dfsg
@@ -306,18 +306,18 @@ libseqlib.so.1 libseqlib1 #MINVER#
  _ZNSt19_Sp_counted_deleterIP7htsFile14htsFile_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP7htsFile14htsFile_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED1Ev at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP7htsFile14htsFile_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev at Base 1.1.1+dfsg
- _ZNSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv at Base 1.1.1+dfsg
- _ZNSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv at Base 1.1.1+dfsg
- _ZNSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info at Base 1.1.1+dfsg
- _ZNSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev at Base 1.1.1+dfsg
- _ZNSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED1Ev at Base 1.1.1+dfsg
- _ZNSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED1Ev at Base 1.1.1+dfsg
  _ZNSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev at Base 1.1.1+dfsg
+ _ZNSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv at Base 1.1.2+dfsg
+ _ZNSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv at Base 1.1.2+dfsg
+ _ZNSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info at Base 1.1.2+dfsg
+ _ZNSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED0Ev at Base 1.1.2+dfsg
+ _ZNSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED1Ev at Base 1.1.2+dfsg
+ _ZNSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EED2Ev at Base 1.1.2+dfsg
  _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6SeqLib4_BamEED1Ev at Base 1.1.1+dfsg
  _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6SeqLib4_BamEED2Ev at Base 1.1.1+dfsg
  _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6SeqLib4_BamEED1Ev at Base 1.1.1+dfsg
@@ -412,8 +412,8 @@ libseqlib.so.1 libseqlib1 #MINVER#
  _ZTISt19_Sp_counted_deleterIP11__hts_idx_t10idx_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTISt19_Sp_counted_deleterIP6bam1_tN6SeqLib11free_deleteESaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTISt19_Sp_counted_deleterIP7htsFile14htsFile_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
- _ZTISt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTISt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
+ _ZTISt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.2+dfsg
  _ZTS10idx_delete at Base 1.1.1+dfsg
  _ZTS14bam_hdr_delete at Base 1.1.1+dfsg
  _ZTS14htsFile_delete at Base 1.1.1+dfsg
@@ -428,8 +428,8 @@ libseqlib.so.1 libseqlib1 #MINVER#
  _ZTSSt19_Sp_counted_deleterIP11__hts_idx_t10idx_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTSSt19_Sp_counted_deleterIP6bam1_tN6SeqLib11free_deleteESaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTSSt19_Sp_counted_deleterIP7htsFile14htsFile_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
- _ZTSSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTSSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
+ _ZTSSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.2+dfsg
  _ZTVSt15_Sp_counted_ptrIPN12aho_corasick10basic_trieIcEELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTVSt15_Sp_counted_ptrIPSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_iEEELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTVSt15_Sp_counted_ptrIPSt13unordered_mapIiN6SeqLib13TIntervalTreeIimEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
@@ -437,5 +437,5 @@ libseqlib.so.1 libseqlib1 #MINVER#
  _ZTVSt19_Sp_counted_deleterIP11__hts_idx_t10idx_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTVSt19_Sp_counted_deleterIP6bam1_tN6SeqLib11free_deleteESaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTVSt19_Sp_counted_deleterIP7htsFile14htsFile_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
- _ZTVSt19_Sp_counted_deleterIP9bam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
  _ZTVSt19_Sp_counted_deleterIP9hts_itr_t14hts_itr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.1+dfsg
+ _ZTVSt19_Sp_counted_deleterIP9sam_hdr_t14bam_hdr_deleteSaIvELN9__gnu_cxx12_Lock_policyE2EE at Base 1.1.2+dfsg


=====================================
debian/patches/fix_private_htslib_usage.patch
=====================================
@@ -0,0 +1,42 @@
+Author: John Marshall <John.W.Marshall at glasgow.ac.uk>
+Date:   Tue Dec 17 19:10:47 2019 +0000
+Origin: https://github.com/walaj/SeqLib/commit/3fc64616a64adfcaf5271ae24f35e443ce822faf.patch
+Bug-Debian: https://bugs.debian.org/946924
+Description: Avoid using non-public HTSlib headers and functions
+    
+    Only headers in htslib/*.h are part of HTSlib's public API; cram/*.h
+    in particular are not. Fortunately SeqLib only uses one function from
+    cram/cram_io.h, and that is easily replaced with a public equivalent.
+    
+    Instead use `hts_set_fai_filename()`, which strdups the string given to
+    it itself; `cram_set_option(fp->fp.cram, CRAM_OPT_REFERENCE, ...)` would
+    also be an option, but it's better to avoid `fp->fp.cram` as poking into
+    an htsFile's insides is also not supported by HTSlib.
+
+--- a/SeqLib/BamWalker.h
++++ b/SeqLib/BamWalker.h
+@@ -11,11 +11,6 @@
+ #define INT32_MAX 0x7fffffffL
+ #endif
+ 
+-extern "C" {
+-#include "htslib/cram/cram.h"
+-#include "htslib/cram/cram_io.h"
+-}
+-
+ struct idx_delete {
+   void operator()(hts_idx_t* x) { if (x) hts_idx_destroy(x); }
+ };
+--- a/src/BamReader.cpp
++++ b/src/BamReader.cpp
+@@ -186,9 +186,7 @@ BamReader::BamReader() {}
+ 
+     // open cram reference
+     if (!m_cram_reference.empty()) {
+-      char * m_cram_reference_cstr = strdup(m_cram_reference.c_str());
+-      int ret = cram_load_reference(fp->fp.cram, m_cram_reference_cstr);
+-      free(m_cram_reference_cstr);
++      int ret = hts_set_fai_filename(fp.get(), m_cram_reference.c_str());
+       if (ret < 0) 
+ 	throw std::invalid_argument("Could not read reference genome " + m_cram_reference + " for CRAM opt");
+     }


=====================================
debian/patches/series
=====================================
@@ -7,4 +7,5 @@ dynamic_lib.patch
 use_debian_packaged_jsoncpp.patch
 use_debian_packaged_ssw.patch
 pkg-config.patch
-use_private_htslib_headers.patch
+# use_private_htslib_headers.patch
+fix_private_htslib_usage.patch


=====================================
debian/upstream/metadata
=====================================
@@ -1,19 +1,18 @@
 Reference:
- Author: Jeremiah Wala and Rameen Beroukhim
- Title: >
-  SeqLib: a C ++ API for rapid BAM manipulation, sequence alignment and
-  sequence assembly
- Journal: Bioinformatics
- Year: 2016
- DOI: 10.1093/bioinformatics/btw741
- PMID: 28011768
- URL: "https://academic.oup.com/bioinformatics/article-abstract/doi/\
-  10.1093/bioinformatics/btw741/2571356/\
-  SeqLib-a-C-API-for-rapid-BAM-manipulation-sequence"
+  Author: Jeremiah Wala and Rameen Beroukhim
+  Title: >
+    SeqLib: a C ++ API for rapid BAM manipulation, sequence alignment and
+    sequence assembly
+  Journal: Bioinformatics
+  Year: 2016
+  DOI: 10.1093/bioinformatics/btw741
+  PMID: 28011768
+  URL: https://academic.oup.com/bioinformatics/article-abstract/doi/10.1093/bioinformatics/btw741/2571356/SeqLib-a-C-API-for-rapid-BAM-manipulation-sequence
 Registry:
- - Name: OMICtools
-   Entry: OMICS_14682
- - Name: SciCrunch
-   Entry: NA
- - Name: bio.tools
-   Entry: NA
+- Name: OMICtools
+  Entry: OMICS_14682
+- Name: SciCrunch
+  Entry: NA
+- Name: bio.tools
+  Entry: NA
+Bug-Database: https://github.com/walaj/SeqLib/issues



View it on GitLab: https://salsa.debian.org/med-team/libseqlib/compare/64f09e6893b9f58cd90c14fe94af1a497eb18a57...b97d3004f6f1c5623e7bce19a0180a2d3bc432e5

-- 
View it on GitLab: https://salsa.debian.org/med-team/libseqlib/compare/64f09e6893b9f58cd90c14fe94af1a497eb18a57...b97d3004f6f1c5623e7bce19a0180a2d3bc432e5
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/20191218/4ae6b307/attachment-0001.html>


More information about the debian-med-commit mailing list