#1 Update to upstream release 1.2.3
Merged 4 years ago by jaruga. Opened 4 years ago by jaruga.
rpms/ jaruga/bowtie feature/update-to-v1.2.3  into  master

file modified
+2 -1
@@ -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

@@ -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

+ 

@@ -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

+ 

file removed
-39
@@ -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.

@@ -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 = (

@@ -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

+ 

file modified
+120 -25
@@ -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/5f90d3fdad97a8181ddaa96c64faeef1f2b6edf9

+ 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

+ Provides: bundled(tiny-thread) = 1.1

  

  

  %description
@@ -24,47 +68,98 @@ 

  %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@redhat.com> - 1.2.3-1

+ - Update to upstream release 1.2.3

+ 

  * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-14

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

  

file modified
+2 -2
@@ -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

This PR is to update bowtie to the latest version 1.2.3.

This PR is working in progress.

Because I am trying to use rpms/seaqn version 1.4.2 (= The latest version of 1.X) in bowtie.spec, sending the PR to the bowite upstream.
https://github.com/BenLangmead/bowtie/pull/105

seqan
http://packages.seqan.de/
https://github.com/seqan/seqan

Because on Fedora, using dependency RPM is encouraged rather than using bundled library.
https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Libraries

Another note is right now bowtie-arm-gcc.patch is registered like a source.
This is wrong state.

$ cat sources 
8484fba71f78d94ee9e16a9b5c8c8d26  bowtie-1.0.1-src.zip
83ecb7f17abdd274751ecc1dfc48cd4e  bowtie-arm-gcc.patch

We can fix this by running fepkg import for the updated bowite.spec.

$ fepkg import bowtie-1.2.3-1.fc33.src.rpm

rpmlint

You can check the rpmlint like this.

$ fedpkg srpm
$ mock -r fedora-rawhide-x86_64 *.src.rpm
$ rpmlint -i ./*.spec /var/lib/mock/fedora-rawhide-x86_64/result/*.rpm

rebased onto 3fb5c63

4 years ago

I rebased, and now this PR is ready for the review.

Running bowtie command on mock environment

I tested like this for installed bowite related commands.

$ scripts/test/simple_tests.pl --bowtie=/usr/bin/bowtie --bowtie-build=/usr/bin/bowtie-build

rebased onto 8f1cc3a

4 years ago

Pull-Request has been merged by jaruga

4 years ago

Here is my working log.

Merge pull-request and build

$ git branch
* feature/update-to-v1.2.3
  master

$ fedpkg --release master srpm
setting SOURCE_DATE_EPOCH=1582848000
Wrote: /home/jaruga/git/fedora-packages/bowtie/bowtie-1.2.3-1.fc33.src.rpm

$ fedpkg import bowtie-1.2.3-1.fc33.src.rpm
...
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
...

$ cat sources
SHA512 (bowtie-1.2.3-tests.tgz) = 810120e7acc91cbc06dceba2387b921ada3644f63c3ffce4237fbb7edf317f8dba11d250e49dfb702ea3245dba27091f98bf3dec0b4c22b25e5b67fd2e78f5d3
SHA512 (bowtie-src-x86_64.zip) = 3d902b8a060f1a6af41602c5169bea0b43a5d0f2f0c72286602dcd5f84c42f261d93acc05baa45a34a57fe9f2d223e3917b1aa29c7cb93d93f93b86a3f365174

$ git status
On branch feature/update-to-v1.2.3
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
  modified:   .gitignore
  modified:   sources

Do commit with a dummy commit.

$ git commit -m 'Update'

Squash the 2 commits to 1 commit.

$ git rebase -i fc1b288290dc60df67e363d79bb9e268b5c85ce7
$ git remote -v
jaruga  ssh://jaruga@pkgs.fedoraproject.org/forks/jaruga/rpms/bowtie.git (fetch)
jaruga  ssh://jaruga@pkgs.fedoraproject.org/forks/jaruga/rpms/bowtie.git (push)
origin  ssh://jaruga@pkgs.fedoraproject.org/rpms/bowtie (fetch)
origin  ssh://jaruga@pkgs.fedoraproject.org/rpms/bowtie (push)

$ git push jaruga feature/update-to-v1.2.3 -f

Click "Merge" button at https://src.fedoraproject.org/rpms/bowtie/pull-request/1 .

Then

$ git checkout master

$ git pull

$ fedpkg build --nowait
Building bowtie-1.2.3-1.fc33 for rawhide
Created task: 42111413
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=42111413

Register bowtie to the upstream monitoring service.

Registered bowtie to release-monitoring service: anitya.
https://release-monitoring.org/project/81530/

Enabling the left side monitoring status: monitoring.
https://src.fedoraproject.org/rpms/bowtie

This work is to receive a new bugzilla ticket when the new version is released on the upstream project.