The package rpms/bowtie.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/bowtie.git/commit/?id=8f1cc3a50b1....
Change:
+%ifarch s390x
Thanks.
Full change:
============
commit 8f1cc3a50b11b5807b8d828771c0593bba701fe2
Author: Jun Aruga <jaruga(a)redhat.com>
Date: Fri Feb 28 20:02:05 2020 +0100
Update to upstream release 1.2.3
diff --git a/.gitignore b/.gitignore
index c66c88f..c3ee85b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/bowtie-0.12.7-src.zip
/bowtie-1.0.0-src.zip
-/bowtie-arm-gcc.patch
/bowtie-1.0.1-src.zip
+/bowtie-1.2.3-tests.tgz
+/bowtie-src-x86_64.zip
diff --git a/bowtie-alphabet-error-narrowing.patch
b/bowtie-alphabet-error-narrowing.patch
new file mode 100644
index 0000000..bc7417b
--- /dev/null
+++ b/bowtie-alphabet-error-narrowing.patch
@@ -0,0 +1,29 @@
+diff --git a/alphabet.cpp b/alphabet.cpp
+index fe94493..6b7ff30 100644
+--- a/alphabet.cpp
++++ b/alphabet.cpp
+@@ -273,7 +273,7 @@ int dnacomp[5] = {
+
+ const char *iupacs = "!ACMGRSVTWYHKDBN!acmgrsvtwyhkdbn";
+
+-char mask2iupac[16] = {
++signed char mask2iupac[16] = {
+ -1,
+ 'A', // 0001
+ 'C', // 0010
+diff --git a/alphabet.h b/alphabet.h
+index fc03779..35a5699 100644
+--- a/alphabet.h
++++ b/alphabet.h
+@@ -227,7 +227,7 @@ extern uint8_t nuccol2nuc[5][5];
+ extern uint8_t asc2dnamask[];
+
+ /// Convert a 4-bit mask into an IUPAC code
+-extern char mask2iupac[16];
++extern signed char mask2iupac[16];
+
+ /**
+ * Return true iff c is an unambiguous Dna character.
+--
+2.24.1
+
diff --git a/bowtie-enable-multi-arch.patch b/bowtie-enable-multi-arch.patch
new file mode 100644
index 0000000..8d58baa
--- /dev/null
+++ b/bowtie-enable-multi-arch.patch
@@ -0,0 +1,46 @@
+diff --git a/Makefile b/Makefile
+index bbce0a2..9cac1fe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,10 +8,10 @@ bindir = $(prefix)/bin
+ SEQAN_DIR = ./SeqAn-1.1
+ # treat SeqAn as a sysdir to suppress warnings
+ SEQAN_INC = -isystem $(SEQAN_DIR)
+-INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) $(SEQAN_INC) -I third_party
+-CPP = g++
+-CXX = $(CPP)
+-CC = gcc
++INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) $(SEQAN_INC)
++CPP ?= g++
++CXX ?= $(CPP)
++CC ?= gcc
+ LIBS = $(LDFLAGS) $(if $(RELEASE_BUILD),-L$(CURDIR)/.lib) -lz
+ HEADERS = $(wildcard *.h)
+ BOWTIE_MM = 1
+@@ -162,6 +162,12 @@ VERSION = $(shell cat VERSION)
+ BITS=32
+ ifeq (x86_64,$(shell uname -m))
+ BITS=64
++else ifeq (aarch64,$(shell uname -m))
++ BITS=64
++else ifeq (s390x,$(shell uname -m))
++ BITS=64
++else ifeq (ppc64le,$(shell uname -m))
++ BITS=64
+ endif
+ # msys will always be 32 bit so look at the cpu arch instead.
+ ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
+@@ -180,8 +186,8 @@ ifeq (32,$(BITS))
+ $(error bowtie2 compilation requires a 64-bit platform )
+ endif
+
+-DEBUG_FLAGS = -O0 -g3 -m64
+-RELEASE_FLAGS = -O3 -m64
++DEBUG_FLAGS = -O0 -g3
++RELEASE_FLAGS = -O3
+ NOASSERT_FLAGS = -DNDEBUG
+ FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+
+--
+2.24.1
+
diff --git a/bowtie-gcc47.patch b/bowtie-gcc47.patch
deleted file mode 100644
index 373569e..0000000
--- a/bowtie-gcc47.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- bowtie-0.12.7/alphabet.h 2009-11-24 20:53:52.000000000 +0000
-+++ bowtie-0.12.7.new/alphabet.h 2012-01-09 10:53:09.902974406 +0000
-@@ -38,6 +38,18 @@
- return s_rc;
- }
-
-+/// Reverse a string in-place
-+template <typename TStr>
-+static inline void reverseInPlace(TStr& s) {
-+ typedef typename Value<TStr>::Type TVal;
-+ size_t len = length(s);
-+ for(size_t i = 0; i < (len>>1); i++) {
-+ TVal tmp = s[i];
-+ s[i] = s[len-i-1];
-+ s[len-i-1] = tmp;
-+ }
-+}
-+
- /**
- * Reverse-complement s in-place. Ns go to Ns.
- */
-@@ -69,17 +81,6 @@
- }
- }
-
--/// Reverse a string in-place
--template <typename TStr>
--static inline void reverseInPlace(TStr& s) {
-- typedef typename Value<TStr>::Type TVal;
-- size_t len = length(s);
-- for(size_t i = 0; i < (len>>1); i++) {
-- TVal tmp = s[i];
-- s[i] = s[len-i-1];
-- s[len-i-1] = tmp;
-- }
--}
-
- /**
- * Return the reverse-complement of s.
diff --git a/bowtie-script-shebang.patch b/bowtie-script-shebang.patch
deleted file mode 100644
index 3cc8f37..0000000
--- a/bowtie-script-shebang.patch
+++ /dev/null
@@ -1,8 +0,0 @@
-diff -ur bowtie-0.12.7/scripts/gen_dnamasks2colormask.pl
bowtie-0.12.7.new/scripts/gen_dnamasks2colormask.pl
---- bowtie-0.12.7/scripts/gen_dnamasks2colormask.pl 2010-06-06 15:36:31.000000000 +0100
-+++ bowtie-0.12.7.new/scripts/gen_dnamasks2colormask.pl 2011-06-27 22:56:01.673782736
+0100
-@@ -1,3 +1,4 @@
-+#!/usr/bin/perl -w
- print "uint8_t dnamasks2colormask[16][16] = {\n";
- print "\t /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
*/\n";
- my %color = (
diff --git a/bowtie-test-remove-perl-Sys-Info-dep.patch
b/bowtie-test-remove-perl-Sys-Info-dep.patch
new file mode 100644
index 0000000..38cf208
--- /dev/null
+++ b/bowtie-test-remove-perl-Sys-Info-dep.patch
@@ -0,0 +1,28 @@
+diff --git a/scripts/test/simple_tests.pl b/scripts/test/simple_tests.pl
+index d8b452f..ad932f5 100755
+--- a/scripts/test/simple_tests.pl
++++ b/scripts/test/simple_tests.pl
+@@ -14,8 +14,6 @@ use Data::Dumper;
+ use DNA;
+ use Clone qw(clone);
+ use Test::Deep;
+-use Sys::Info;
+-use Sys::Info::Constants qw( :device_cpu );
+
+ my $bowtie = "";
+ my $bowtie_build = "";
+@@ -1130,9 +1128,8 @@ sub runbowtie($$$$$$$$$$$$$$$$$$$$$$$) {
+ while(<FA>) { print $_; }
+ close(FA);
+ if($do_build) {
+- my $info = Sys::Info->new;
+- my $cpu = $info->device('CPU');
+- my $nthreads = int(rand($cpu->count || 1)) + 1;
++ my $cpu_count = 2;
++ my $nthreads = int(rand($cpu_count || 1)) + 1;
+ my $build_args = "";
+ $build_args .= " -C " if $color;
+ my $cmd = "$bowtie_build $idx_type --threads $nthreads --quiet --sanity
$build_args $fa .simple_tests.tmp";
+--
+2.21.0
+
diff --git a/bowtie.spec b/bowtie.spec
index ef67a27..115ce8c 100644
--- a/bowtie.spec
+++ b/bowtie.spec
@@ -1,17 +1,61 @@
Name: bowtie
-Version: 1.0.1
-Release: 14%{?dist}
+Version: 1.2.3
+Release: 1%{?dist}
Summary: An ultrafast, memory-efficient short read aligner
-# The tinythread component is zlib-like, SeqAn is LGPL
-License: Artistic 2.0 and zlib and LGPLV3+
+# bowite: Artistic 2.0
+# tinythread.{h,cpp}: zlib
+# SeqAn: GPLv3 and LGPLv3+
+# SeqAn license info is not enough?
+#
https://github.com/BenLangmead/bowtie/issues/106
+License: Artistic 2.0 and zlib and GPLv3 and LGPLv3+
URL:
http://bowtie-bio.sourceforge.net/index.shtml
-Source0:
http://downloads.sourceforge.net/%{name}-bio/%{name}-%{version}-src.zip
-Patch0: %{name}-arm-gcc.patch
-#Patch0: %{name}-script-shebang.patch
-#Patch1: %{name}-gcc47.patch
-BuildRequires: gcc-c++
-BuildRequires: perl-generators
+# bowtie v1.2.3 archive file name is wrong.
+#
https://github.com/BenLangmead/bowtie/issues/101
+Source0:
http://downloads.sourceforge.net/%{name}-bio/%{name}-src-x86_64.zip
+# git clone
https://github.com/BenLangmead/bowtie.git
+# cd bowtie
+# git checkout v1.2.3
+# tar czvf bowtie-1.2.3-tests.tgz scripts/test/
+Source1: bowtie-1.2.3-tests.tgz
+# Enable multiple CPU architecture builds.
+#
https://github.com/BenLangmead/bowtie/pull/102
+Patch0: bowtie-enable-multi-arch.patch
+# Remove perl-Sys-Info module depenency, as it does not exist on Fedora.
+Patch1: bowtie-test-remove-perl-Sys-Info-dep.patch
+# Fix error narrowing conversion for non x86_64 architectures.
+#
https://github.com/BenLangmead/bowtie/pull/95
+Patch2: bowtie-alphabet-error-narrowing.patch
+Requires: python3
+BuildRequires: gcc-c++
+BuildRequires: hostname
+BuildRequires: perl-interpreter
+BuildRequires: perl(Clone)
+BuildRequires: perl(Data::Dumper)
+BuildRequires: perl(Getopt::Long)
+BuildRequires: perl(Test::Deep)
+BuildRequires: python3
+BuildRequires: tbb-devel
+BuildRequires: zlib-devel
+# 32-bit CPU architectures are not supported for bowtie version >= 1.1.0.
+#
https://github.com/BenLangmead/bowtie/commit/5f90d3fdad97a8181ddaa96c64fa...
+ExcludeArch: i686 armv7hl
+
+# Bundled libraries
+#
https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Lib...
+# SeqAn
+#
http://www.seqan.de/
+# TODO: Use system seqan instead of bundled one.
+#
https://src.fedoraproject.org/rpms/seqan
+# Update to seqan 1.4.2
+#
https://github.com/BenLangmead/bowtie/pull/105
+# Note SeqAn will be removed at tne next release of version 1.2.3.
+#
https://github.com/BenLangmead/bowtie/issues/106#issuecomment-593426727
+Provides: bundled(seqan) = 1.1
+# TinyThread++
+#
https://tinythreadpp.bitsnbites.eu/
+#
https://gitorious.org/tinythread/tinythreadpp
+Provides: bundled(tiny-thread) = 1.1
%description
@@ -24,47 +68,98 @@ sequences to the human genome. Genome Biol 10:R25.
%prep
%setup -q
-#Fix compilation on ARM by removing hard-coded Makefile GCC directives
-%patch0 -p1 -b .%{name}-arm-gcc.patch
+%patch0 -p1 -b .bowtie-enable-multi-arch.patch
+%patch2 -p1 -b .bowtie-alphabet-error-narrowing.patch
-#%patch0 -p1
-#Fix compilation with GCC 4.7
-#%patch1 -p1 -b .%{name}-gcc47.patch
+# Remove the directory to avoid building bowtie with bundled libraries.
+rm -rf third_party/
-%build
-make %{?_smp_mflags} -p EXTRA_FLAGS="%{optflags}"
+# Fix shebang to use system python3.
+for file in $(find . -name "*.py") bowtie bowtie-*; do
+ sed -i '1s|/usr/bin/env python|%{__python3}|' "${file}"
+done
+# Invalid double quote characters are used in the code.
+#
https://github.com/BenLangmead/bowtie/issues/104
+sed -i 's//"/g' processor_support.h
+sed -i 's//"/g' processor_support.h
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}/%{_bindir}
-mkdir -p %{buildroot}/%{_datadir}/bowtie
+%build
+# Set flags considering bowtie2's testing cases for each architecture.
+#
https://github.com/BenLangmead/bowtie2/blob/master/.travis.yml
+#
https://github.com/BenLangmead/bowtie/pull/102
+%ifnarch x86_64
+export POPCNT_CAPABILITY=0
+export NO_TBB=1
+%endif
+# Set debug flag "-g" to prevent the error
+# "Empty %%files file debugsourcefiles.list".
+%make_build allall EXTRA_FLAGS="-g"
-install -m 0755 bowtie %{buildroot}/%{_bindir}
-install -m 0755 bowtie-build %{buildroot}/%{_bindir}
-install -m 0755 bowtie-inspect %{buildroot}/%{_bindir}
+%install
+%make_install prefix="%{_usr}" DESTDIR="%{buildroot}"
+
+mkdir -p %{buildroot}/%{_datadir}/bowtie
cp -a reads %{buildroot}/%{_datadir}/bowtie/
cp -a indexes %{buildroot}/%{_datadir}/bowtie/
cp -a genomes %{buildroot}/%{_datadir}/bowtie/
cp -a scripts %{buildroot}/%{_datadir}/bowtie/
+# Install bowtie-*-debug commands used by `bowtie --debug`.
+for cmd in bowtie-*-debug; do
+ cp -p "${cmd}" %{buildroot}/%{_bindir}/
+done
+
+%check
+for cmd in bowtie bowtie-build bowtie-inspect; do
+ ./"${cmd}" --version | grep 'version %{version}'
+done
+
+tar xzvf %{SOURCE1}
+cat %{PATCH1} | patch -p1
+
+%ifarch s390x
+# The tests works with the number of thread: 1 on s390x.
+#
https://github.com/BenLangmead/bowtie/pull/105
+sed -i 's/--threads $nthreads/--threads 1/' scripts/test/simple_tests.pl
+%endif
+
+# See Makefile simple-test target.
+scripts/test/simple_tests.pl --bowtie=./bowtie --bowtie-build=./bowtie-build
%files
-%doc MANUAL NEWS VERSION AUTHORS TUTORIAL doc/{manual.html,style.css} SeqAn-1.1/*GPL.txt
+%license LICENSE SeqAn-1.1/{GPL,LGPL}.txt
+%doc MANUAL NEWS VERSION AUTHORS TUTORIAL doc/{manual.html,style.css}
%dir %{_datadir}/bowtie
%{_bindir}/bowtie
+%{_bindir}/bowtie-align-l
+%{_bindir}/bowtie-align-l-debug
+%{_bindir}/bowtie-align-s
+%{_bindir}/bowtie-align-s-debug
%{_bindir}/bowtie-build
+%{_bindir}/bowtie-build-l
+%{_bindir}/bowtie-build-l-debug
+%{_bindir}/bowtie-build-s
+%{_bindir}/bowtie-build-s-debug
%{_bindir}/bowtie-inspect
+%{_bindir}/bowtie-inspect-l
+%{_bindir}/bowtie-inspect-l-debug
+%{_bindir}/bowtie-inspect-s
+%{_bindir}/bowtie-inspect-s-debug
%{_datadir}/bowtie/genomes
%{_datadir}/bowtie/indexes
%{_datadir}/bowtie/reads
%{_datadir}/bowtie/scripts
+
%changelog
+* Fri Feb 28 2020 Jun Aruga <jaruga(a)redhat.com> - 1.2.3-1
+- Update to upstream release 1.2.3
+
* Tue Jan 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.1-14
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources
index d9f51b3..d91e553 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-8484fba71f78d94ee9e16a9b5c8c8d26 bowtie-1.0.1-src.zip
-83ecb7f17abdd274751ecc1dfc48cd4e bowtie-arm-gcc.patch
+SHA512 (bowtie-1.2.3-tests.tgz) =
810120e7acc91cbc06dceba2387b921ada3644f63c3ffce4237fbb7edf317f8dba11d250e49dfb702ea3245dba27091f98bf3dec0b4c22b25e5b67fd2e78f5d3
+SHA512 (bowtie-src-x86_64.zip) =
3d902b8a060f1a6af41602c5169bea0b43a5d0f2f0c72286602dcd5f84c42f261d93acc05baa45a34a57fe9f2d223e3917b1aa29c7cb93d93f93b86a3f365174