vt icon indicating copy to clipboard operation
vt copied to clipboard

Patches from Debian

Open frikiluser opened this issue 4 years ago • 5 comments

Please consider applying these three patches from new Debian package.

https://salsa.debian.org/med-team/vt/-/tree/8d7a6047a9b5ecb846da38a0175ec394758eef8c/debian/patches

  • makefile: Get rid of external sources and update to libhts-1.10
  • fix-spelling: Spelling fix
  • test-fail-on-error: Correct exit code (!=0) on error

Thanks!

frikiluser avatar Jun 18 '20 13:06 frikiluser

I second the motion to unbundle the external libraries. I maintain a FreeBSD port with similar patches and plan to create a pkgsrc package for deploying on CentOS, OS X, and NetBSD. Bundling libraries like htslib may seem easier at first, but end users miss out on security updates and bug fixes in those libs that come automatically with updates in systems like Debian packages and FreeBSD ports. Also, htslib 1.11 is out now, so these patches may need to be updated.

outpaddling avatar Nov 08 '20 21:11 outpaddling

Only one patch needed for htslib 1.11 beyond the 1.10 patches:

--- hts_utils.h.orig    2020-11-08 22:09:58 UTC
+++ hts_utils.h
@@ -47,7 +47,7 @@ typedef struct {
 
 KHASH_MAP_INIT_STR(s, faidx1_t)
 
-struct __faidx_t {
+struct faidx_t {
     BGZF *bgzf;
     int n, m;
     char **name;

outpaddling avatar Nov 08 '20 22:11 outpaddling

Here is a better hts_utils.h patch that was applied two years ago: fb0288be9346cbf0f822dc9104c3a063ed0c521e.

jmarshall avatar Nov 09 '20 17:11 jmarshall

Thanks for the heads-up. That patch by itself actually doesn't work with the 0.57721 release, though:

hts_utils.cpp:50:25: error: member access into incomplete type 'const faidx_t' (aka 'const __faidx_t') iter = kh_get(s, fai->hash, c_name);

I haven't tried building the latest commit yet. I just needed to unbreak the 0.57721 build since I upgraded htslib.

outpaddling avatar Nov 10 '20 14:11 outpaddling

When you look at how that function was reaching into htslib internals, that's unsurprising. Fortunately sanity prevailed two months after that release and can also form the basis of the build patch you should apply: 6a0e555b88fd385e4ace6f477779a97e3fd4e594.

jmarshall avatar Nov 10 '20 15:11 jmarshall