[med-svn] [Git][med-team/stacks][master] 4 commits: Update executables path to be libexec instead of lib

Lance Lin (@linqigang) gitlab at salsa.debian.org
Tue Sep 5 16:59:33 BST 2023



Lance Lin pushed to branch master at Debian Med / stacks


Commits:
829c59ff by Lance Lin at 2023-09-05T22:45:44+07:00
Update executables path to be libexec instead of lib

- - - - -
0a048db4 by Lance Lin at 2023-09-05T22:46:55+07:00
Add patch to exit succesfully when running programs

- - - - -
c9150af5 by Lance Lin at 2023-09-05T22:47:18+07:00
Add superficial autopkgtest

- - - - -
59e39f10 by Lance Lin at 2023-09-05T22:47:38+07:00
Update changelog

- - - - -


6 changed files:

- debian/bin/stacks
- debian/changelog
- + debian/patches/change_program_exit_to_success.patch
- debian/patches/series
- + debian/tests/control
- + debian/tests/unittest


Changes:

=====================================
debian/bin/stacks
=====================================
@@ -2,7 +2,7 @@
 
 # Standard thingy to run a program not in /usr/bin
 
-PROGPATH=/usr/lib/stacks/bin
+PROGPATH=/usr/libexec/stacks/bin
 PROG=help
 
 if ! [ "$*" = "" ] ; then


=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+stacks (2.65+dfsg-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * d/bin/stacks: Fix path to be libexec for executables
+  * d/tests: Add superficial autopkgtest (needs test data)
+  * d/patches/change_program_exit_to_success.patch: Fix exit codes to be
+    successful and output to stdout
+
+ -- Lance Lin <lq27267 at gmail.com>  Fri, 01 Sep 2023 20:40:42 +0700
+
 stacks (2.65+dfsg-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/change_program_exit_to_success.patch
=====================================
@@ -0,0 +1,353 @@
+Description: Fix exit codes to be successful and output to stdout.
+Author: Lance Lin <lq27267 at gmail.com>
+Date: 2023-09-04
+
+--- a/scripts/stacks-dist-extract
++++ b/scripts/stacks-dist-extract
+@@ -10,8 +10,8 @@
+ "
+ 
+ if { [[ $# -ne 1 ]] && [[ $# -ne 2 ]] && [[ $# -ne 3 ]]; } || [[ "$1" =~ ^(-h|--help|--version)$ ]] ;then
+-    echo -n "$usage" >&2
+-    exit 1
++    echo -n "$usage"
++    exit 0
+ fi
+ 
+ if [[ "$1" =~ ^--pretty$ ]]; then 
+--- a/scripts/stacks-gdb
++++ b/scripts/stacks-gdb
+@@ -28,10 +28,10 @@
+ "
+ 
+ if [[ $# -eq 0 ]] ;then
+-    echo -n "$usage" >&2
++    echo -n "$usage"
+     echo
+     echo -n "$gdb_req"
+-    exit 1
++    exit 0
+ fi
+ 
+ if ! command -v gdb &>/dev/null ;then
+--- a/scripts/stacks-samtools-tview
++++ b/scripts/stacks-samtools-tview
+@@ -28,15 +28,15 @@
+ sample=
+ if (( $# == 0 )) ;then
+     echo -n "$help"
+-    exit 1
++    exit 0
+ fi
+ while getopts 'vhP:c:s:' op ;do
+     case $op in
+     P) dir="$OPTARG" ;;
+     c) locus="$OPTARG" ;;
+     s) sample="$OPTARG" ;;
+-    h) echo -n "$help"; exit 1 ;;
+-    v) echo "$stacks_version"; exit 1 ;;
++    h) echo -n "$help"; exit 0 ;;
++    v) echo "$stacks_version"; exit 0 ;;
+     *) echo "ERROR: while parsing arguments." >&2; exit 1 ;;
+     esac
+ done
+--- a/src/sstacks.cc
++++ b/src/sstacks.cc
+@@ -1428,13 +1428,13 @@
+ }
+ 
+ void version() {
+-    cerr << "sstacks " << VERSION << "\n\n";
++    cout << "sstacks " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "sstacks " << VERSION << "\n"
++    cout << "sstacks " << VERSION << "\n"
+               << "sstacks -P dir -M popmap [-p n_threads]" << "\n"
+               << "sstacks -c catalog_path -s sample_path [-s sample_path ...] -o path [-p n_threads]" << "\n"
+               << "  -P,--in-path: path to the directory containing Stacks files.\n"
+@@ -1450,10 +1450,10 @@
+               ;
+ 
+ #ifdef DEBUG
+-    cerr << "\n"
++    cout << "\n"
+             "Debug options:\n"
+             "  --write-all-matches: Write blacklisted matches. (Compatibility with the web interface?)\n";
+ #endif
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/process_radtags.cc
++++ b/src/process_radtags.cc
+@@ -2408,13 +2408,13 @@
+ }
+ 
+ void version() {
+-    cerr << "process_radtags " << VERSION << "\n\n";
++    cout << "process_radtags " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "process_radtags " << VERSION << "\n"
++    cout << "process_radtags " << VERSION << "\n"
+ 	 << "process_radtags -p in_dir [-P] [-b barcode_file] -o out_dir -e enz [--threads num] [-c] [-q] [-r] [-t len]\n"
+          << "process_radtags -f in_file [-b barcode_file] -o out_dir -e enz [--threads num] [-c] [-q] [-r] [-t len]\n"
+          << "process_radtags --in-path in_dir [--paired] [--barcodes barcode_file] --out-path out_dir --renz-1 enz [--renz-2 enz] [--threads num] [-c] [-q] [-r] [-t len]\n"
+@@ -2456,20 +2456,20 @@
+     uint cnt = renz_cnt.size();
+     it = renz_cnt.begin();
+     for (uint i = 1; i <= cnt; i++) {
+-        cerr << "'" << it->first << "'";
++        cout << "'" << it->first << "'";
+         if (i < cnt - 1)
+-            cerr << ", ";
++            cout << ", ";
+         else if (i == cnt - 1)
+-            cerr << ", or ";
++            cout << ", or ";
+ 
+         if (i % 8 == 0)
+-            cerr << "\n      ";
++            cout << "\n      ";
+ 
+         it++;
+     }
+-    cerr << "\n";
++    cout << "\n";
+ 
+-    cerr << "\n"
++    cout << "\n"
+          << "  Protocol-specific options:\n"
+          << "    --bestrad: library was generated using BestRAD, check for restriction enzyme on either read and potentially tranpose reads.\n\n"
+          << "  Adapter options:\n"
+@@ -2489,5 +2489,5 @@
+          << "    --barcode-dist-1: the number of allowed mismatches when rescuing single-end barcodes (default 1).\n"
+          << "    --barcode-dist-2: the number of allowed mismatches when rescuing paired-end barcodes (defaults to --barcode-dist-1).\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/scripts/denovo_map.pl
++++ b/scripts/denovo_map.pl
+@@ -918,13 +918,13 @@
+ }
+ 
+ sub version {
+-    print STDERR "denovo_map.pl ", stacks_version, "\n";
++    print STDOUT "denovo_map.pl ", stacks_version, "\n";
+ }
+ 
+ sub usage {
+     version();
+ 
+-    print STDERR <<EOQ;
++    print STDOUT <<EOQ;
+ denovo_map.pl --samples dir --popmap path --out-path dir [--paired [--rm-pcr-duplicates]] (assembly options) (filtering options) [-X prog:"opts" ...]
+ 
+   Input/Output files:
+@@ -962,5 +962,5 @@
+     --time-components (for benchmarking)
+ EOQ
+ 
+-    exit 1;
++    exit 0;
+ }
+--- a/scripts/ref_map.pl
++++ b/scripts/ref_map.pl
+@@ -415,13 +415,13 @@
+ }
+ 
+ sub version {
+-    print STDERR "ref_map.pl ", stacks_version, "\n";
++    print STDOUT "ref_map.pl ", stacks_version, "\n";
+ }
+ 
+ sub usage {
+     version();
+ 
+-    print STDERR <<EOQ;
++    print STDOUT <<EOQ;
+ ref_map.pl --samples path --popmap path [-s spacer] --out-path path [--rm-pcr-duplicates] [-X prog:"opts" ...]
+ 
+   Input/Output files:
+@@ -455,5 +455,5 @@
+   Miscellaneous:
+     --time-components (for benchmarking)
+ EOQ
+-    exit 1;
++    exit 0;
+ }
+--- a/src/clone_filter.cc
++++ b/src/clone_filter.cc
+@@ -1307,13 +1307,13 @@
+ }
+ 
+ void version() {
+-    std::cerr << "clone_filter " << VERSION << "\n\n";
++    std::cout << "clone_filter " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    std::cerr << "clone_filter " << VERSION << "\n"
++    std::cout << "clone_filter " << VERSION << "\n"
+               << "clone_filter [-f in_file | -p in_dir [-P] [-I] | -1 pair_1 -2 pair_2] -o out_dir [-i type] [-y type] [-D] [-h]\n"
+               << "  f: path to the input file if processing single-end sequences.\n"
+               << "  p: path to a directory of files.\n"
+@@ -1338,5 +1338,5 @@
+               << "    --inline-index:  random oligo is inline with sequence on single-end read and second oligo occurs in FASTQ header.\n"
+               << "    --index-inline:  random oligo occurs in FASTQ header (Illumina i5 or i7 read) and is inline with sequence on single-end read (if single read data) or paired-end read (if paired data).\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/cstacks.cc
++++ b/src/cstacks.cc
+@@ -1998,13 +1998,13 @@
+ }
+ 
+ void version() {
+-    cerr << "cstacks " << VERSION << "\n";
++    cout << "cstacks " << VERSION << "\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "cstacks " << VERSION << "\n"
++    cout << "cstacks " << VERSION << "\n"
+               << "cstacks -P in_dir -M popmap [-n num_mismatches] [-p num_threads]" << "\n"
+               << "cstacks -s sample1_path [-s sample2_path ...] -o path [-n num_mismatches] [-p num_threads]" << "\n"
+               << "\n"
+@@ -2025,5 +2025,5 @@
+               << "  --k-len <len>: specify k-mer size for matching between between catalog loci (automatically calculated by default).\n"
+               << "  --report-mmatches: report query loci that match more than one catalog locus.\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/phasedstacks.cc
++++ b/src/phasedstacks.cc
+@@ -1938,13 +1938,13 @@
+ }
+ 
+ void version() {
+-    cerr << "phasedstacks " << VERSION << "\n\n";
++    cout << "phasedstacks " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "phasedstacks " << VERSION << "\n"
++    cout << "phasedstacks " << VERSION << "\n"
+               << "phasedstacks -b id -S path -P path -t file_type [-p threads] [-M popmap] [-v] [-h]" << "\n"
+               << "  b: Stacks batch ID.\n"
+               << "  P: path to the phased output files.\n"
+@@ -1963,5 +1963,5 @@
+               << "  --min-inform-pairs: when building D' haplotype blocks, the minimum number of informative D' measures to combine two blocks (default 0.9).\n\n";
+ 
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/populations.cc
++++ b/src/populations.cc
+@@ -4347,5 +4347,5 @@
+          #endif
+          ;
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/process_shortreads.cc
++++ b/src/process_shortreads.cc
+@@ -1117,13 +1117,13 @@
+ }
+ 
+ void version() {
+-    cerr << "process_shortreads " << VERSION << "\n\n";
++    cout << "process_shortreads " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "process_shortreads " << VERSION << "\n"
++    cout << "process_shortreads " << VERSION << "\n"
+               << "process_shortreads [-f in_file | -p in_dir [-P] [-I] | -1 pair_1 -2 pair_2] -b barcode_file -o out_dir [-i type] [-y type] [-c] [-q] [-r] [-E encoding] [-t len] [-D] [-w size] [-s lim] [-h]\n"
+               << "  f: path to the input file if processing single-end seqeunces.\n"
+               << "  i: input file type, either 'bustard' for the Illumina BUSTARD format, 'bam', 'fastq' (default), or 'gzfastq' for gzipped FASTQ.\n"
+@@ -1167,5 +1167,5 @@
+               << "    --mate-pair: raw reads are circularized mate-pair data, first read will be reverse complemented.\n"
+               << "    --no-overhang: data does not contain an overhang nucleotide between barcode and seqeunce.\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/ustacks.cc
++++ b/src/ustacks.cc
+@@ -3017,13 +3017,13 @@
+ }
+ 
+ void version() {
+-    cerr << "ustacks " << VERSION << "\n\n";
++    cout << "ustacks " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "ustacks " << VERSION << "\n"
++    cout << "ustacks " << VERSION << "\n"
+          << "ustacks -f file_path -o path [-M max_dist] [-m min_cov] [-p num_threads]" << "\n"
+          << "  f: input file path.\n"
+          << "  o: output path to write results.\n"
+@@ -3059,5 +3059,5 @@
+          << "\n"
+          << "  h: display this help message.\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+--- a/src/kmer_filter.cc
++++ b/src/kmer_filter.cc
+@@ -1800,13 +1800,13 @@
+ }
+ 
+ void version() {
+-    cerr << "kmer_filter " << VERSION << "\n\n";
++    cout << "kmer_filter " << VERSION << "\n\n";
+ 
+-    exit(1);
++    exit(0);
+ }
+ 
+ void help() {
+-    cerr << "kmer_filter " << VERSION << "\n"
++    cout << "kmer_filter " << VERSION << "\n"
+               << "kmer_filter [-f in_file_1 [-f in_file_2...] | -p in_dir] [-1 pair_1 -2 pair_2 [-1 pair_1...]] -o out_dir [-i type] [-y type] [-D] [-h]\n"
+               << "  f: path to the input file if processing single-end seqeunces.\n"
+               << "  i: input file type, either 'bustard' for the Illumina BUSTARD output files, 'fasta', 'fastq', 'gzfasta', or 'gzfastq' (default 'fastq').\n"
+@@ -1834,5 +1834,5 @@
+               << "    --read-k-freq <path>: read a set of kmers along with their frequencies of occurrence instead of reading raw input files.\n"
+               << "\n";
+ 
+-    exit(1);
++    exit(0);
+ }


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ RisR.patch
 script-exe-paths
 use_debian_packaged_htslib.patch
 fix_spelling_errors.patch
+change_program_exit_to_success.patch


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: unittest
+Depends: @, bsdmainutils, python3, gdb
+Restrictions: superficial


=====================================
debian/tests/unittest
=====================================
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+
+stacks -h
+echo ""
+
+# Programs available with Stacks wrapper
+stacks clone_filter -h
+stacks cstacks -h
+stacks denovo_map -h
+stacks gstacks -h
+stacks kmer_filter -h
+stacks phasedstacks -h
+stacks populations -h
+stacks process_radtags -h
+stacks process_shortreads -h
+stacks ref_map -h
+stacks sstacks -h
+stacks stacks-dist-extract -h
+stacks stacks-gdb -h
+stacks stacks-integrate-alignments -h
+stacks stacks-samtools-tview -h
+stacks tsv2bam -h
+stacks ustacks -h



View it on GitLab: https://salsa.debian.org/med-team/stacks/-/compare/9e326111152c1b722b24fe6c12f72b714d5ea84d...59e39f10b1d22df63bbd122ebebd875a527daced

-- 
View it on GitLab: https://salsa.debian.org/med-team/stacks/-/compare/9e326111152c1b722b24fe6c12f72b714d5ea84d...59e39f10b1d22df63bbd122ebebd875a527daced
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230905/d618dab6/attachment-0001.htm>


More information about the debian-med-commit mailing list