From 4c0637a1cfefaa7333127740ffc5bfed735fe998 Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: Feb 16 2023 11:06:41 +0000 Subject: Unretirement request: https://pagure.io/releng/issue/11282 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2911c1c --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/bowtie-0.12.7-src.zip +/bowtie-1.0.0-src.zip +/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-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-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() { 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 new file mode 100644 index 0000000..b12e952 --- /dev/null +++ b/bowtie.spec @@ -0,0 +1,247 @@ +Name: bowtie +Version: 1.3.0 +Release: 6%{?dist} +Summary: An ultrafast, memory-efficient short read aligner + +# bowite: Artistic 2.0 +# tinythread.{h,cpp}: zlib +License: Artistic 2.0 and zlib +URL: http://bowtie-bio.sourceforge.net/index.shtml +Source0: http://downloads.sourceforge.net/%{name}-bio/%{name}-%{version}-src.zip +# git clone https://github.com/BenLangmead/bowtie.git +# cd bowtie +# 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 +Requires: python3 +BuildRequires: gcc-c++ +BuildRequires: hostname +BuildRequires: perl-interpreter +BuildRequires: perl(Clone) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(FindBin) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(Test::Deep) +BuildRequires: perl(lib) +BuildRequires: python3 +BuildRequires: tbb-devel +BuildRequires: zlib-devel +BuildRequires: make +# 32-bit CPU architectures are not supported for bowtie version >= 1.1.0. +# https://github.com/BenLangmead/bowtie/commit/5f90d3fdad97a8181ddaa96c64faeef1f2b6edf9 +ExcludeArch: i686 armv7hl + +# Bundled libraries +# https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Libraries#Requirement_if_you_bundle +# TinyThread++ +# https://tinythreadpp.bitsnbites.eu/ +# https://gitorious.org/tinythread/tinythreadpp +Provides: bundled(tiny-thread) = 1.1 + + +%description + +Bowtie, an ultrafast, memory-efficient short read aligner for short +DNA sequences (reads) from next-gen sequencers. Please cite: Langmead +B, et al. Ultrafast and memory-efficient alignment of short DNA +sequences to the human genome. Genome Biol 10:R25. + +%prep +%setup -q -n %{name}-%{version}-src + +%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 -E -i '1s|/usr/bin/env python[3]?|%{__python3}|' "${file}" +done + + +%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 +%endif + +# Set debug flag "-g" to prevent the error +# "Empty %%files file debugsourcefiles.list". +%make_build allall EXTRA_FLAGS="-g" + + +%install +%make_install prefix="%{_prefix}" + +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 + +# See Makefile simple-test target. +scripts/test/simple_tests.pl --bowtie=./bowtie --bowtie-build=./bowtie-build + + +%files +%license LICENSE +%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 +* Wed Jan 18 2023 Fedora Release Engineering - 1.3.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 1.3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 1.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 1.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 1.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* 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 + +* Tue Mar 17 2020 Jun Aruga - 1.2.3-2 +- Fix the build failure adding perl(FindBin) and perl(lib) build dependencies. + +* Fri Feb 28 2020 Jun Aruga - 1.2.3-1 +- Update to upstream release 1.2.3 + +* Tue Jan 28 2020 Fedora Release Engineering - 1.0.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 1.0.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 1.0.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 1.0.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 1.0.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 1.0.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 1.0.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 1.0.1-4 +- Rebuilt for GCC 5 C++11 ABI change + +* Fri Aug 15 2014 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Jun 02 2014 Adam Huffman - 1.0.1-1 +- Update to upstream release 1.0.1 + +* Wed Dec 04 2013 Adam Huffman - 1.0.0-2 +- Correct licence information (thanks to Dave Love) +- Reorganise documentation (thanks to Dave Love) +- Fix compilation on ARM + + +* Wed Aug 07 2013 Adam Huffman - 1.0.0-1 +- Update to stable upstream release 1.0.0 +- Remove unnecessary script patch + + +* Sat Aug 03 2013 Fedora Release Engineering - 0.12.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 0.12.7-7 +- Perl 5.18 rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 0.12.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 0.12.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Feb 28 2012 Fedora Release Engineering - 0.12.7-4 +- Rebuilt for c++ ABI breakage + +* Mon Jan 9 2012 Adam Huffman - 0.12.7-3 +- add patch to fix compilation with GCC 4.7 + +* Mon Jun 27 2011 Adam Huffman - 0.12.7-2 +- add missing doc/ +- add patch to fix Perl script without shebang + +* Mon Sep 13 2010 Adam Huffman - 0.12.7-1 +- new upstream release 0.12.7 +- changelog at http://bowtie-bio.sourceforge.net/index.shtml + +* Tue Aug 31 2010 Adam Huffman - 0.12.5-3 +- really fix compilation flags + +* Wed Aug 25 2010 Adam Huffman - 0.12.5-2 +- fix compilation flags + +* Mon Aug 2 2010 Adam Huffman - 0.12.5-1 +- initial version + diff --git a/dead.package b/dead.package deleted file mode 100644 index ab7426e..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Retired: Long term failure to build diff --git a/sources b/sources new file mode 100644 index 0000000..a7a2dcf --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (bowtie-1.3.0-src.zip) = 27c33221a395de6dbf086c63befd007ac6033ab0fca6ce6b79b6c13de6bd02d5585c0c38c442e50dca5cdf95cfca136310ace334bbf24ac90e8e7aece93001a7 +SHA512 (bowtie-1.3.0-tests.tgz) = 9e25cbba3da9085b8427a0e2df77c21864c7bfbf51aced784362873c801bee92a95456bbd5b1ea02bf4a4443edba748e830fe9b8fea95f0c61e37f6297f4383c