diff -Nru jellyfish-2.2.5/configure.ac jellyfish-2.2.6/configure.ac --- jellyfish-2.2.5/configure.ac 2016-03-11 17:45:08.000000000 +0000 +++ jellyfish-2.2.6/configure.ac 2016-05-25 12:47:28.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([jellyfish], [2.2.5], [gmarcais@umd.edu]) +AC_INIT([jellyfish], [2.2.6], [gmarcais@umd.edu]) AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([subdir-objects foreign parallel-tests color-tests]) diff -Nru jellyfish-2.2.5/debian/changelog jellyfish-2.2.6/debian/changelog --- jellyfish-2.2.5/debian/changelog 2016-03-13 05:57:53.000000000 +0000 +++ jellyfish-2.2.6/debian/changelog 2016-08-30 12:16:52.000000000 +0000 @@ -1,3 +1,14 @@ +jellyfish (2.2.6-1) unstable; urgency=medium + + * New upstream version + * Rename python module from python3-jellyfish to python3-dna-jellyfish + (thanks for the patches to "Diego M. Rodriguez" ) + Closes: #819016 + * cme fix dpkg-control + * hardening=+all,-pie + + -- Andreas Tille Tue, 30 Aug 2016 14:16:52 +0200 + jellyfish (2.2.5-1) unstable; urgency=medium [ Andreas Tille ] diff -Nru jellyfish-2.2.5/debian/control jellyfish-2.2.6/debian/control --- jellyfish-2.2.5/debian/control 2016-03-13 05:57:53.000000000 +0000 +++ jellyfish-2.2.6/debian/control 2016-08-30 12:16:52.000000000 +0000 @@ -19,7 +19,7 @@ dh-python, perl, chrpath -Standards-Version: 3.9.7 +Standards-Version: 3.9.8 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/jellyfish.git Vcs-Git: https://anonscm.debian.org/git/debian-med/jellyfish.git Homepage: http://www.cbcb.umd.edu/software/jellyfish/ @@ -90,7 +90,7 @@ This package contains the development files (static library and header files) -Package: python3-jellyfish +Package: python3-dna-jellyfish Architecture: any-amd64 Section: python Depends: ${python3:Depends}, diff -Nru jellyfish-2.2.5/debian/patches/enable_c++11_error_deprecated-declarations.patch jellyfish-2.2.6/debian/patches/enable_c++11_error_deprecated-declarations.patch --- jellyfish-2.2.5/debian/patches/enable_c++11_error_deprecated-declarations.patch 2016-03-13 05:57:53.000000000 +0000 +++ jellyfish-2.2.6/debian/patches/enable_c++11_error_deprecated-declarations.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -Author: Andreas Tille -Last-Update: Wed, 23 Dec 2015 21:01:45 +0100 -Bug-Debian: https://bugs.debian.org/808537 -Description: enable build with c++11 and -Werror=deprecated-declarations compile - flag (thanks for the hint to Gert Wollny at - https://lists.debian.org/debian-mentors/2015/12/msg00360.html - ) - - ---- a/jellyfish/merge_files.cc -+++ b/jellyfish/merge_files.cc -@@ -35,8 +35,8 @@ using jellyfish::file_header; - using jellyfish::RectangularBinaryMatrix; - using jellyfish::mer_dna; - using jellyfish::cpp_array; --typedef std::auto_ptr binary_reader_ptr; --typedef std::auto_ptr text_reader_ptr; -+typedef std::unique_ptr binary_reader_ptr; -+typedef std::unique_ptr text_reader_ptr; - - struct file_info { - std::ifstream is; -@@ -47,7 +47,7 @@ struct file_info { - header(is) - { } - }; --typedef std::auto_ptr matrix_ptr; -+typedef std::unique_ptr matrix_ptr; - - template - void do_merge(cpp_array& files, std::ostream& out, writer_type& writer, ---- a/sub_commands/count_main.cc -+++ b/sub_commands/count_main.cc -@@ -245,7 +245,7 @@ int count_main(int argc, char *argv[]) - if(args.disk_flag) - ary.do_size_doubling(false); - -- std::auto_ptr > dumper; -+ std::unique_ptr > dumper; - if(args.text_flag) - dumper.reset(new text_dumper(args.threads_arg, args.output_arg, &header)); - else diff -Nru jellyfish-2.2.5/debian/patches/rename-python-module-to-dna_jellyfish.patch jellyfish-2.2.6/debian/patches/rename-python-module-to-dna_jellyfish.patch --- jellyfish-2.2.5/debian/patches/rename-python-module-to-dna_jellyfish.patch 1970-01-01 00:00:00.000000000 +0000 +++ jellyfish-2.2.6/debian/patches/rename-python-module-to-dna_jellyfish.patch 2016-08-30 12:16:52.000000000 +0000 @@ -0,0 +1,139 @@ +Author: "Diego M. Rodriguez" +Last-Update: Tue, 22 Mar 2016 23:19:15 +0100 +Bug-Debian: https://bugs.debian.org/819016 +Subject: Rename python bindings module name + +--- a/swig/python/setup.py ++++ b/swig/python/setup.py +@@ -12,13 +12,13 @@ from distutils.core import setup, Extens + swig_time = os.path.getmtime('../jellyfish.i') + older = True + try: +- older = os.path.getmtime('jellyfish_wrap.cxx') < swig_time or os.path.getmtime('jellyfish.py') < swig_time ++ older = os.path.getmtime('jellyfish_wrap.cxx') < swig_time or os.path.getmtime('dna_jellyfish.py') < swig_time + except FileNotFoundError: + older = True + + if older: +- print("Running swig: swig -c++ -python -o jellyfish_wrap.cxx ../jellyfish.i") +- os.system("swig -c++ -python -o jellyfish_wrap.cxx ../jellyfish.i") ++ print("Running swig: swig -c++ -python -module dna_jellyfish -o jellyfish_wrap.cxx ../jellyfish.i") ++ os.system("swig -c++ -python -module dna_jellyfish -o jellyfish_wrap.cxx ../jellyfish.i") + + jf_include = [re.sub(r'-I', '', x) for x in os.popen("pkg-config --cflags-only-I jellyfish-2.0").read().rstrip().split()] + jf_cflags = os.popen("pkg-config --cflags-only-other jellyfish-2.0").read().rstrip().split() +@@ -28,7 +28,7 @@ jf_libdir = [re.sub(r'-L', '', x) for x + jf_ldflags = os.popen("pkg-config --libs-only-other jellyfish-2.0").read().rstrip().split() + + +-jellyfish_module = Extension('_jellyfish', ++jellyfish_module = Extension('_dna_jellyfish', + sources = ['jellyfish_wrap.cxx'], + include_dirs = jf_include, + libraries = jf_libs, +@@ -36,9 +36,9 @@ jellyfish_module = Extension('_jellyfish + extra_compile_args = ["-std=c++0x"] + jf_cflags, + extra_link_args = jf_ldflags, + language = "c++") +-setup(name = 'jellyfish', ++setup(name = 'dna_jellyfish', + version = '0.0.1', + author = 'Guillaume Marcais', + description = 'Access to jellyfish k-mer counting', + ext_modules = [jellyfish_module], +- py_modules = ["jellyfish"]) ++ py_modules = ["dna_jellyfish"]) +--- a/swig/python/test_hash_counter.py ++++ b/swig/python/test_hash_counter.py +@@ -1,20 +1,20 @@ + import unittest + import sys + import random +-import jellyfish ++import dna_jellyfish + + class TestHashCounter(unittest.TestCase): + def setUp(self): +- jellyfish.MerDNA.k(100) +- self.hash = jellyfish.HashCounter(1024, 5) ++ dna_jellyfish.MerDNA.k(100) ++ self.hash = dna_jellyfish.HashCounter(1024, 5) + + def test_info(self): +- self.assertEqual(100, jellyfish.MerDNA.k()) ++ self.assertEqual(100, dna_jellyfish.MerDNA.k()) + self.assertEqual(1024, self.hash.size()) + self.assertEqual(5, self.hash.val_len()) + + def test_add(self): +- mer = jellyfish.MerDNA() ++ mer = dna_jellyfish.MerDNA() + good = True + for i in range(1000): + mer.randomize() +--- a/swig/python/test_mer_file.py ++++ b/swig/python/test_mer_file.py +@@ -1,4 +1,4 @@ +-import jellyfish ++import dna_jellyfish + import unittest + import sys + import os +@@ -6,7 +6,7 @@ from collections import Counter + + class TestMerFile(unittest.TestCase): + def setUp(self): +- self.mf = jellyfish.ReadMerFile(os.path.join(data, "swig_python.jf")) ++ self.mf = dna_jellyfish.ReadMerFile(os.path.join(data, "swig_python.jf")) + + def test_histo(self): + histo = Counter() +@@ -46,7 +46,7 @@ class TestMerFile(unittest.TestCase): + + def test_query(self): + good = True +- qf = jellyfish.QueryMerFile(os.path.join(data, "swig_python.jf")) ++ qf = dna_jellyfish.QueryMerFile(os.path.join(data, "swig_python.jf")) + for mer, count in self.mf: + good = good and count == qf[mer] + if not good: break +--- a/swig/python/test_string_mers.py ++++ b/swig/python/test_string_mers.py +@@ -1,21 +1,21 @@ + import unittest + import sys + import random +-import jellyfish ++import dna_jellyfish + + class TestStringMers(unittest.TestCase): + def setUp(self): + bases = "ACGTacgt" + self.str = ''.join(random.choice(bases) for _ in range(1000)) + self.k = random.randint(10, 110) +- jellyfish.MerDNA.k(self.k) ++ dna_jellyfish.MerDNA.k(self.k) + + def test_all_mers(self): + count = 0 + good = True +- mers = jellyfish.string_mers(self.str) ++ mers = dna_jellyfish.string_mers(self.str) + for m in mers: +- m2 = jellyfish.MerDNA(self.str[count:count+self.k]) ++ m2 = dna_jellyfish.MerDNA(self.str[count:count+self.k]) + good = good and m == m2 + count += 1 + self.assertTrue(good) +@@ -23,9 +23,9 @@ class TestStringMers(unittest.TestCase): + + def test_canonical_mers(self): + good = True +- mers = jellyfish.string_canonicals(self.str) ++ mers = dna_jellyfish.string_canonicals(self.str) + for count, m in enumerate(mers): +- m2 = jellyfish.MerDNA(self.str[count:count+self.k]) ++ m2 = dna_jellyfish.MerDNA(self.str[count:count+self.k]) + rm2 = m2.get_reverse_complement() + good = good and (m == m2 or m == rm2) + good = good and (not (m > m2)) and (not (m > rm2)) diff -Nru jellyfish-2.2.5/debian/patches/series jellyfish-2.2.6/debian/patches/series --- jellyfish-2.2.5/debian/patches/series 2016-03-13 05:57:53.000000000 +0000 +++ jellyfish-2.2.6/debian/patches/series 2016-08-30 12:16:52.000000000 +0000 @@ -1,5 +1,5 @@ pkg-config-with-name -enable_c++11_error_deprecated-declarations.patch drop-rpath modern-g++ spelling +rename-python-module-to-dna_jellyfish.patch diff -Nru jellyfish-2.2.5/debian/rules jellyfish-2.2.6/debian/rules --- jellyfish-2.2.5/debian/rules 2016-03-13 05:57:53.000000000 +0000 +++ jellyfish-2.2.6/debian/rules 2016-08-30 12:16:52.000000000 +0000 @@ -3,16 +3,14 @@ DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}') build3vers := $(shell py3versions -sv) -#export DEB_BUILD_MAINT_OPTIONS=hardening=+all -#DPKG_EXPORT_BUILDFLAGS = 1 -#include /usr/share/dpkg/buildflags.mk -#breaks the build +export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie export DH_OPTIONS export PKG_CONFIG_LIBDIR=${CURDIR} export PKG_CONFIG_ALLOW_SYSTEM_LIBS=true export PKG_CONFIG_SYSROOT_DIR=${CURDIR}/debian/tmp/ export PERL_MM_OPT=INSTALLDIRS=vendor +export PYBUILD_BUILD_ARGS=build_ext --rpath "${CURDIR}/debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}" %: dh $@ --with autoreconf,python3 #--parallel @@ -22,8 +20,12 @@ override_dh_install: # dh_install -X*.a -X*.la -Xpkgconfig - dh_install -ppython3-jellyfish - pybuild -d swig/python --name jellyfish + dh_install -ppython3-dna-jellyfish + pybuild -d swig/python --name dna-jellyfish +# pybuild -d swig/python --name dna-jellyfish --disable test/python3 +# pybuild -d swig/python --name dna-jellyfish --test --test-args "${CURDIR}/swig/python/ test_string_mers.py" +# pybuild -d swig/python --name dna-jellyfish --test --test-args "${CURDIR}/swig/python/ test_hash_counter.py" + chrpath --delete debian/*/usr/lib/python*/dist-packages/_dna_jellyfish*.so dh_auto_configure --sourcedirectory=swig/perl5 dh_auto_build --sourcedirectory=swig/perl5 @@ -55,7 +57,7 @@ rmdir debian/tmp_save_tests ; \ fi rm -f tests/compat.sh - rm -f swig/python/jellyfish* + rm -f swig/python/jellyfish* swig/python/dna_jellyfish.py override_dh_auto_build: mkdir -p debian/tmp_save_tests diff -Nru jellyfish-2.2.5/include/jellyfish/rectangular_binary_matrix.hpp jellyfish-2.2.6/include/jellyfish/rectangular_binary_matrix.hpp --- jellyfish-2.2.5/include/jellyfish/rectangular_binary_matrix.hpp 2016-03-11 17:45:08.000000000 +0000 +++ jellyfish-2.2.6/include/jellyfish/rectangular_binary_matrix.hpp 2016-05-25 12:47:28.000000000 +0000 @@ -344,9 +344,10 @@ (((u128)1 << 64) - 1) << 64, ((u128)1 << 64) - 1, (u128)-1 - };\ - u128 res = res ^ res; + }; u128* p = (u128*)(_columns + _c - 2); + u128 res = 0; + // u128 res = res ^ res; uint64_t j = 0, x = 0; for(unsigned int w = 0; w < nb_words(); ++w) { diff -Nru jellyfish-2.2.5/jellyfish/merge_files.cc jellyfish-2.2.6/jellyfish/merge_files.cc --- jellyfish-2.2.5/jellyfish/merge_files.cc 2016-03-11 17:45:08.000000000 +0000 +++ jellyfish-2.2.6/jellyfish/merge_files.cc 2016-05-25 12:47:28.000000000 +0000 @@ -35,8 +35,8 @@ using jellyfish::RectangularBinaryMatrix; using jellyfish::mer_dna; using jellyfish::cpp_array; -typedef std::auto_ptr binary_reader_ptr; -typedef std::auto_ptr text_reader_ptr; +typedef std::unique_ptr binary_reader_ptr; +typedef std::unique_ptr text_reader_ptr; struct file_info { std::ifstream is; @@ -47,7 +47,7 @@ header(is) { } }; -typedef std::auto_ptr matrix_ptr; +typedef std::unique_ptr matrix_ptr; template void do_merge(cpp_array& files, std::ostream& out, writer_type& writer, diff -Nru jellyfish-2.2.5/sub_commands/count_main.cc jellyfish-2.2.6/sub_commands/count_main.cc --- jellyfish-2.2.5/sub_commands/count_main.cc 2016-03-11 17:45:08.000000000 +0000 +++ jellyfish-2.2.6/sub_commands/count_main.cc 2016-05-25 12:47:28.000000000 +0000 @@ -245,7 +245,7 @@ if(args.disk_flag) ary.do_size_doubling(false); - std::auto_ptr > dumper; + std::unique_ptr > dumper; if(args.text_flag) dumper.reset(new text_dumper(args.threads_arg, args.output_arg, &header)); else diff -Nru jellyfish-2.2.5/swig/Makefile.am jellyfish-2.2.6/swig/Makefile.am --- jellyfish-2.2.5/swig/Makefile.am 2016-03-11 17:45:08.000000000 +0000 +++ jellyfish-2.2.6/swig/Makefile.am 2016-05-25 12:47:28.000000000 +0000 @@ -9,7 +9,7 @@ %/swig_wrap.cpp: $(SWIG_SRC) $(SWIG_V_GEN)$(SWIG) -$(notdir $*) -I$(srcdir)/../include -o $@ $< else -%/swig_wrap.cc: +%/swig_wrap.cpp: @echo >&2 SWIG >= 3.x.x not found. Make sure it is install and rerun configure @false endif