Bug#840140: fastx-toolkit: please make the build reproducible
Chris Lamb
lamby at debian.org
Sat Oct 8 19:28:18 UTC 2016
Source: fastx-toolkit
Version: 0.0.14-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that fastx-toolkit could not be built reproducibly.
Patch attached.
I ended up patching upstream sources instead of fixing/extending the
regexes in debian/rules; the result is subjectively far cleaner and
objectively less brittle.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible_build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible_build.patch 2016-10-08 20:23:06.570045323 +0100
@@ -0,0 +1,61 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-10-08
+
+--- fastx-toolkit-0.0.14.orig/scripts/fasta_clipping_histogram.pl
++++ fastx-toolkit-0.0.14/scripts/fasta_clipping_histogram.pl
+@@ -21,13 +21,16 @@ use warnings;
+ use GD::Graph::bars;
+ use Data::Dumper;
+ use PerlIO::gzip;
++use File::Basename;
+
+ if (scalar @ARGV==0) {
++ my $name = basename($0);
++
+ print<<END;
+
+ Create a Linker Clipping Information Histogram
+
+-usage: $0 INPUT_FILE.FA OUTPUT_FILE.PNG
++usage: $name INPUT_FILE.FA OUTPUT_FILE.PNG
+
+ INPUT_FILE.FA = input file (in FASTA format, can be GZIPped)
+ OUTPUT_FILE.PNG = histogram image
+--- fastx-toolkit-0.0.14.orig/scripts/fastx_barcode_splitter.pl
++++ fastx-toolkit-0.0.14/scripts/fastx_barcode_splitter.pl
+@@ -22,6 +22,7 @@ use IO::Handle;
+ use Data::Dumper;
+ use Getopt::Long;
+ use Carp;
++use File::Basename;
+
+ ##
+ ## This program splits a FASTQ/FASTA file into several smaller files,
+@@ -349,6 +350,8 @@ sub open_and_detect_input_format
+
+ sub usage()
+ {
++ my $name = basename($0);
++
+ print<<EOF;
+ Barcode Splitter, by Assaf Gordon (gordon\@cshl.edu), 11sep2008
+
+@@ -358,7 +361,7 @@ FASTA/FASTQ data is read from STDIN (for
+ Output files will be writen to disk.
+ Summary will be printed to STDOUT.
+
+-usage: $0 --bcfile FILE --prefix PREFIX [--suffix SUFFIX] [--bol|--eol]
++usage: $name --bcfile FILE --prefix PREFIX [--suffix SUFFIX] [--bol|--eol]
+ [--mismatches N] [--exact] [--partial N] [--help] [--quiet] [--debug]
+
+ Arguments:
+@@ -388,7 +391,7 @@ Arguments:
+ Example (Assuming 's_2_100.txt' is a FASTQ file, 'mybarcodes.txt' is
+ the barcodes file):
+
+- \$ cat s_2_100.txt | $0 --bcfile mybarcodes.txt --bol --mismatches 2 \\
++ \$ cat s_2_100.txt | $name --bcfile mybarcodes.txt --bol --mismatches 2 \\
+ --prefix /tmp/bla_ --suffix ".txt"
+
+ Barcode file format
--- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series 2016-10-08 20:23:02.930001236 +0100
@@ -0,0 +1 @@
+reproducible_build.patch
--- a/debian/rules 2016-10-08 19:50:11.450507911 +0100
--- b/debian/rules 2016-10-08 20:20:45.800340710 +0100
@@ -86,20 +86,6 @@
help2man --no-info --no-discard-stderr --version-string='$(ver)' --help-option='-h' \
--name='FASTA/Q Uncollapser' \
$(bindir)/fastx_uncollapser > $(mandir)/fastx_uncollapser.1
-
- # Perl scripts add the full path to usage advise which needs to be removed
- # The script fasta_clipping_histogram.pl does not feature a '-h' option
- help2man --no-info --no-discard-stderr --version-string='$(ver)' -h '' \
- --name='Create a Linker Clipping Information Histogram' \
- $(bindir)/fasta_clipping_histogram.pl | \
- sed -e 's?^usage: .*\([^/]\+\.pl\)?usage: \1?' \
- > $(mandir)/fasta_clipping_histogram.pl.1
- help2man --no-info --no-discard-stderr --version-string='$(ver)' --help-option='-h' \
- --name='FASTX Barcode Splitter' \
- $(bindir)/fastx_barcode_splitter.pl | \
- sed -e 's?^usage: .*\([^/]\+\.pl\)?usage: \1?' \
- > $(mandir)/fastx_barcode_splitter.pl.1
-
help2man --no-info --no-discard-stderr --version-string='$(ver)' --help-option='-h' \
--name='Solexa-Quality BoxPlot plotter' \
$(bindir)/fastq_quality_boxplot_graph.sh > $(mandir)/fastq_quality_boxplot_graph.sh.1
More information about the Reproducible-builds
mailing list