From 1862384d6d0359faae46be54101573b4518e326f Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Jul 28 2020 20:07:14 +0000 Subject: Update to upstream release 1.3.0 --- diff --git a/.gitignore b/.gitignore index c3ee85b..2911c1c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /bowtie-1.0.1-src.zip /bowtie-1.2.3-tests.tgz /bowtie-src-x86_64.zip +/bowtie-1.3.0-src.zip +/bowtie-1.3.0-tests.tgz diff --git a/bowtie-alphabet-error-narrowing.patch b/bowtie-alphabet-error-narrowing.patch deleted file mode 100644 index bc7417b..0000000 --- a/bowtie-alphabet-error-narrowing.patch +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index 8d58baa..0000000 --- a/bowtie-enable-multi-arch.patch +++ /dev/null @@ -1,46 +0,0 @@ -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-fix-ppc64le-s390x-asm-pause-error.patch b/bowtie-fix-ppc64le-s390x-asm-pause-error.patch new file mode 100644 index 0000000..b25b6da --- /dev/null +++ b/bowtie-fix-ppc64le-s390x-asm-pause-error.patch @@ -0,0 +1,36 @@ +From ea04fb256aa01ca1252613c5d5de3c9e2d6327ee Mon Sep 17 00:00:00 2001 +From: Rone Charles +Date: Mon, 27 Jul 2020 19:19:34 -0400 +Subject: [PATCH] Potential fix for cpu_backoff related errors on ppc + +--- + bt2_locks.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/bt2_locks.h b/bt2_locks.h +index b956ea4..cddbd8b 100644 +--- a/bt2_locks.h ++++ b/bt2_locks.h +@@ -12,13 +12,17 @@ + class cpu_backoff { + public: + cpu_backoff(): count(1) {} +- void pause() { ++ inline void pause() { + if (count <= LOOPS_BEFORE_YIELD) { + for (int32_t i = 0; i < count; i++) { + #ifdef __aarch64__ + __asm__ __volatile__("yield" ::: "memory"); +-#else ++#elif __ppc__ ++ __asm__ __volatile__("or 27,27,27" ::: "memory"); ++#elif __x86_64__ + __asm__ __volatile__("pause;"); ++#else ++ // do nothing + #endif + } + count *= 2; +-- +2.26.2 + diff --git a/bowtie.spec b/bowtie.spec index 8c73cfc..fc636fa 100644 --- a/bowtie.spec +++ b/bowtie.spec @@ -1,31 +1,23 @@ Name: bowtie -Version: 1.2.3 -Release: 3%{?dist} +Version: 1.3.0 +Release: 1%{?dist} Summary: An ultrafast, memory-efficient short read aligner # 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+ +License: Artistic 2.0 and zlib URL: http://bowtie-bio.sourceforge.net/index.shtml -# 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 +Source0: http://downloads.sourceforge.net/%{name}-bio/%{name}-%{version}-src.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 +# git checkout v1.3.0 +# tar czvf bowtie-1.3.0-tests.tgz scripts/test/ +Source1: bowtie-%{version}-tests.tgz +# Fix bt2_locks.h: Error: Unrecognized opcode: `pause' on ppc64le/s390x. +# https://github.com/BenLangmead/bowtie/issues/114 +Patch0: bowtie-fix-ppc64le-s390x-asm-pause-error.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 @@ -45,15 +37,6 @@ ExcludeArch: i686 armv7hl # Bundled libraries # https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Libraries#Requirement_if_you_bundle -# 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 @@ -68,24 +51,18 @@ B, et al. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biol 10:R25. %prep -%setup -q +%setup -q -n %{name}-%{version}-src -%patch0 -p1 -b .bowtie-enable-multi-arch.patch -%patch2 -p1 -b .bowtie-alphabet-error-narrowing.patch +%patch0 -p1 # Remove the directory to avoid building bowtie with bundled libraries. rm -rf third_party/ # Fix shebang to use system python3. for file in $(find . -name "*.py") bowtie bowtie-*; do - sed -i '1s|/usr/bin/env python|%{__python3}|' "${file}" + sed -E -i '1s|/usr/bin/env python[3]?|%{__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 - %build # Set flags considering bowtie2's testing cases for each architecture. @@ -93,7 +70,6 @@ sed -i 's/”/"/g' processor_support.h # 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 @@ -102,7 +78,7 @@ export NO_TBB=1 %install -%make_install prefix="%{_usr}" DESTDIR="%{buildroot}" +%make_install prefix="%{_prefix}" mkdir -p %{buildroot}/%{_datadir}/bowtie cp -a reads %{buildroot}/%{_datadir}/bowtie/ @@ -123,18 +99,12 @@ 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 -%license LICENSE SeqAn-1.1/{GPL,LGPL}.txt +%license LICENSE %doc MANUAL NEWS VERSION AUTHORS TUTORIAL doc/{manual.html,style.css} %dir %{_datadir}/bowtie %{_bindir}/bowtie @@ -159,6 +129,9 @@ scripts/test/simple_tests.pl --bowtie=./bowtie --bowtie-build=./bowtie-build %changelog +* Tue Jul 28 2020 Jun Aruga - 1.3.0-1 +- Update to upstream release 1.3.0 + * Mon Jul 27 2020 Fedora Release Engineering - 1.2.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index d91e553..a7a2dcf 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (bowtie-1.2.3-tests.tgz) = 810120e7acc91cbc06dceba2387b921ada3644f63c3ffce4237fbb7edf317f8dba11d250e49dfb702ea3245dba27091f98bf3dec0b4c22b25e5b67fd2e78f5d3 -SHA512 (bowtie-src-x86_64.zip) = 3d902b8a060f1a6af41602c5169bea0b43a5d0f2f0c72286602dcd5f84c42f261d93acc05baa45a34a57fe9f2d223e3917b1aa29c7cb93d93f93b86a3f365174 +SHA512 (bowtie-1.3.0-src.zip) = 27c33221a395de6dbf086c63befd007ac6033ab0fca6ce6b79b6c13de6bd02d5585c0c38c442e50dca5cdf95cfca136310ace334bbf24ac90e8e7aece93001a7 +SHA512 (bowtie-1.3.0-tests.tgz) = 9e25cbba3da9085b8427a0e2df77c21864c7bfbf51aced784362873c801bee92a95456bbd5b1ea02bf4a4443edba748e830fe9b8fea95f0c61e37f6297f4383c