[med-svn] [Git][med-team/kleborate][master] 5 commits: add bigendian.patch: fixes ftbfs on s390x

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Wed Sep 22 18:10:27 BST 2021



Étienne Mollier pushed to branch master at Debian Med / kleborate


Commits:
400a8986 by Étienne Mollier at 2021-09-22T16:55:53+02:00
add bigendian.patch: fixes ftbfs on s390x

This patch fixes ftbfs on s390x, and other big endian architectures,
by allowing kleborate to fall back to blastdb version 4 for its sample
files and at run time.

Closes: #994714

- - - - -
0ec16e27 by Étienne Mollier at 2021-09-22T18:53:53+02:00
update changelog

- - - - -
e5ba7a3e by Étienne Mollier at 2021-09-22T18:54:10+02:00
routine-update: Standards-Version: 4.6.0

- - - - -
4ea22ff2 by Étienne Mollier at 2021-09-22T18:54:39+02:00
Apply multi-arch hints.
+ kleborate-examples: Add Multi-Arch: foreign.

Changes-By: apply-multiarch-hints

- - - - -
f60fa3b6 by Étienne Mollier at 2021-09-22T19:07:13+02:00
routine-update: Ready to upload to unstable

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/bigendian.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+kleborate (2.1.0-2) unstable; urgency=medium
+
+  * add bigendian.patch: fixes ftbfs on s390x. (Closes: #994714)
+  * Standards-Version: 4.6.0 (routine-update)
+  * Apply multi-arch hints.
+    + kleborate-examples: Add Multi-Arch: foreign.
+
+ -- Étienne Mollier <emollier at debian.org>  Wed, 22 Sep 2021 18:54:42 +0200
+
 kleborate (2.1.0-1) unstable; urgency=medium
 
   * Team Upload.


=====================================
debian/control
=====================================
@@ -11,7 +11,7 @@ Build-Depends: debhelper-compat (= 13),
                ncbi-blast+ <!nocheck>,
                mash <!nocheck>,
                kaptive <!nocheck>
-Standards-Version: 4.5.1
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/med-team/kleborate
 Vcs-Git: https://salsa.debian.org/med-team/kleborate.git
 Homepage: https://github.com/katholt/Kleborate
@@ -45,6 +45,7 @@ Package: kleborate-examples
 Architecture: all
 Depends: ${misc:Depends}
 Recommends: kleborate
+Multi-Arch: foreign
 Description: tool to screen Klebsiella genome assemblies (example data)
  Kleborate is a tool to screen Klebsiella genome assemblies for:
  .


=====================================
debian/patches/bigendian.patch
=====================================
@@ -0,0 +1,65 @@
+Description: fall back to generating blast db v4 on big endian systems
+ Kleborate is not capable of decoding blast db v5 on all architectures, because
+ the underlying format of the storage is processor architecture dependent, for
+ the sake of performance, at the cost of interoperability.  The v4 format, in
+ contrast, is plaintext, so remains suitable in such context.  Many Thanks to
+ Aaron M. Ucko for the details!
+Author: Étienne Mollier <emollier at debian.org>
+Bug-Debian: https://bugs.debian.org/994714
+Forwarded: no
+Last-Update: 2021-09-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- kleborate.orig/kleborate/__main__.py
++++ kleborate/kleborate/__main__.py
+@@ -625,6 +625,10 @@
+ def rebuild_blast_indices(data_dir):
+     for fasta in pathlib.Path(data_dir).glob('*.fasta'):
+         makeblastdb_cmd = ['makeblastdb', '-dbtype', 'nucl', '-in', str(fasta)]
++        # Use blastdb v4 format for big endian systems, since the v5 format is
++        # processor architecture dependent, but not the v4.
++        if sys.byteorder == 'big':
++            makeblastdb_cmd += ['-blastdb_version', '4']
+         with open(os.devnull, 'w') as devnull:
+             subprocess.check_call(makeblastdb_cmd, stdout=devnull)
+ 
+--- kleborate.orig/kleborate/blastn.py
++++ kleborate/kleborate/blastn.py
+@@ -13,6 +13,7 @@
+ """
+ 
+ import os
++import sys
+ import subprocess
+ 
+ from .misc import reverse_complement
+@@ -135,5 +136,12 @@
+ def build_blast_database_if_needed(seqs):
+     if not os.path.exists(seqs + '.nin'):
+         with open(os.devnull, 'w') as devnull:
+-            subprocess.check_call('makeblastdb -dbtype nucl -in ' + seqs, stdout=devnull,
+-                                  shell=True)
++            if sys.byteorder == 'little':
++                subprocess.check_call('makeblastdb -dbtype nucl -in ' + seqs,
++                                      stdout=devnull,
++                                      shell=True)
++            else:
++                subprocess.check_call('makeblastdb -dbtype nucl -in ' + seqs
++                                      + ' -blastdb_version 4',
++                                      stdout=devnull,
++                                      shell=True)
+--- kleborate.orig/setup.py
++++ kleborate/setup.py
+@@ -40,6 +40,12 @@
+ def build_blast_db(data_dir, fasta_filename, seq_type):
+     fasta_path = os.path.join(data_dir, fasta_filename)
+     makeblastdb_cmd = ['makeblastdb', '-dbtype', seq_type, '-in', fasta_path]
++    # Fall back to blastdb version 4 for big endian architectures, as kleborate
++    # is not yet able to swap bytes appropriately with the new lmdb format of
++    # the blastdb v5.  Note that the content of the distributed data set is
++    # thus now architecture dependent.
++    if sys.byteorder == 'big':
++        makeblastdb_cmd += ['-blastdb_version', '4']
+     print('  ' + ' '.join(makeblastdb_cmd))
+     with open(os.devnull, 'w') as devnull:
+         subprocess.check_call(makeblastdb_cmd, stdout=devnull)


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 python3.patch
 use_debian_installed_kaptive.patch
+bigendian.patch



View it on GitLab: https://salsa.debian.org/med-team/kleborate/-/compare/39fda303975c992d09f53c3a756189307494e61e...f60fa3b6220790c1cca3b564f09beac7d441c0b5

-- 
View it on GitLab: https://salsa.debian.org/med-team/kleborate/-/compare/39fda303975c992d09f53c3a756189307494e61e...f60fa3b6220790c1cca3b564f09beac7d441c0b5
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/20210922/44b718c7/attachment-0001.htm>


More information about the debian-med-commit mailing list