[med-svn] [Git][med-team/bioawk][master] 5 commits: Add upstream/metadata

Nilesh Patra gitlab at salsa.debian.org
Thu Feb 11 16:19:45 GMT 2021



Nilesh Patra pushed to branch master at Debian Med / bioawk


Commits:
415be7de by Nilesh Patra at 2021-02-11T21:00:50+05:30
Add upstream/metadata

- - - - -
62454726 by Nilesh Patra at 2021-02-11T21:04:15+05:30
Fix minro space + cleanup

- - - - -
78fd3ce2 by Nilesh Patra at 2021-02-11T21:21:10+05:30
Add autopkgtests

- - - - -
c64e6725 by Nilesh Patra at 2021-02-11T16:05:30+00:00
Add manpage for bioawk

- - - - -
4e0b247f by Nilesh Patra at 2021-02-11T21:48:23+05:30
Add relevant hardening flags

- - - - -


9 changed files:

- + debian/bioawk.1
- + debian/createmanpages
- + debian/manpages
- + debian/patches/hardening.patch
- debian/patches/series
- debian/rules
- + debian/tests/control
- + debian/tests/run-unit-test
- + debian/upstream/metadata


Changes:

=====================================
debian/bioawk.1
=====================================
@@ -0,0 +1,23 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.16.
+.TH BIOAWK "1" "February 2021" "bioawk 1.0" "User Commands"
+.SH NAME
+bioawk \- extension of awk for biological sequence analysis
+.SH DESCRIPTION
+.SS "bed:"
+.IP
+1:chrom 2:start 3:end 4:name 5:score 6:strand 7:thickstart 8:thickend 9:rgb 10:blockcount 11:blocksizes 12:blockstarts
+.SS "sam:"
+.IP
+1:qname 2:flag 3:rname 4:pos 5:mapq 6:cigar 7:rnext 8:pnext 9:tlen 10:seq 11:qual
+.SS "vcf:"
+.IP
+1:chrom 2:pos 3:id 4:ref 5:alt 6:qual 7:filter 8:info
+.SS "gff:"
+.IP
+1:seqname 2:source 3:feature 4:start 5:end 6:score 7:filter 8:strand 9:group 10:attribute
+.SS "fastx:"
+.IP
+1:name 2:seq 3:qual 4:comment
+.SH AUTHOR
+ This manpage was written by Nilesh Patra for the Debian distribution and
+ can be used for any other usage of the program.


=====================================
debian/createmanpages
=====================================
@@ -0,0 +1,29 @@
+#!/bin/sh
+MANDIR=debian
+mkdir -p $MANDIR
+
+VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
+NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1`
+PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`
+
+AUTHOR=".SH AUTHOR\n \
+This manpage was written by $DEBFULLNAME for the Debian distribution and\n \
+can be used for any other usage of the program.\
+"
+
+# If program name is different from package name or title should be
+# different from package short description change this here
+progname=${PROGNAME}
+help2man --no-info --no-discard-stderr --help-option="-c help" \
+         --name="$NAME" \
+            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
+echo $AUTHOR >> $MANDIR/${progname}.1
+
+echo "$MANDIR/*.1" > debian/manpages
+
+cat <<EOT
+Please enhance the help2man output.
+The following web page might be helpful in doing so:
+    http://liw.fi/manpages/
+EOT
+


=====================================
debian/manpages
=====================================
@@ -0,0 +1 @@
+debian/*.1


=====================================
debian/patches/hardening.patch
=====================================
@@ -0,0 +1,40 @@
+Description: Following changes are done
+	* Remove setting CFLAGS in Makefile so it doesn't override the debhelper set CFLAGS with hardening
+	* Propagate CPPFLAGS and LDFLAGS at needed places
+Author: Nilesh Patra <npatra974 at gmail.com>
+Last-Update: 2021-02-11
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,6 @@
+ # THIS SOFTWARE.
+ # ****************************************************************/
+ 
+-CFLAGS = -g -Wall -O2
+ CC = gcc
+ 
+ YACC = bison -y
+@@ -40,7 +39,7 @@
+ 	 awk.1
+ 
+ bioawk:ytab.o $(OFILES)
+-	$(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -o $@ -lm -lz
++	$(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -o $@ -lm -lz $(LDFLAGS)
+ 
+ $(OFILES):	awk.h ytab.h proto.h addon.h
+ 
+@@ -48,13 +47,13 @@
+ 	$(YACC) $(YFLAGS) awkgram.y
+ 	cp y.tab.c ytab.c
+ 	cp y.tab.h ytab.h
+-	$(CC) $(CFLAGS) -c ytab.c
++	$(CC) $(CFLAGS) $(CPPFLAGS) -c ytab.c
+ 
+ proctab.c:	maketab
+ 	./maketab >proctab.c
+ 
+ maketab:	ytab.h maketab.c
+-	$(CC) $(CFLAGS) maketab.c -o maketab
++	$(CC) $(CFLAGS) $(CPPFLAGS) maketab.c -o maketab $(LDFLAGS)
+ 
+ names:
+ 	@echo $(LISTING)


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 Makefile.patch
+hardening.patch


=====================================
debian/rules
=====================================
@@ -1,18 +1,9 @@
 #!/usr/bin/make -f
 export DH_VERBOSE = 1
-
-
-# see FEATURE AREAS in dpkg-buildflags(1)
-#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-# see ENVIRONMENT in dpkg-buildflags(1)
-# package maintainers to append CFLAGS
-#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
-# package maintainers to append LDFLAGS
-#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-	dh $@ 
+	dh $@
 
 override_dh_auto_configure:
 


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, swarm, samtools-test
+Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -e
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp /usr/share/doc/swarm/test-data/input.fasta.gz $AUTOPKGTEST_TMP
+cp /usr/share/samtools/test/ampliconclip/ac_test.bed $AUTOPKGTEST_TMP
+cp /usr/share/samtools/test/dat/view.001.sam $AUTOPKGTEST_TMP
+
+cd $AUTOPKGTEST_TMP
+gunzip -r *
+
+echo "Test 1 - Get length for sequences"
+bioawk -c fastx '{ print $name, length($seq) }' input.fasta 1> test1 2> test1
+[ -s test1 ] || exit 1
+echo "================================="
+echo "PASS"
+
+echo "Test 2 - Get reverse compliment"
+bioawk -c fastx '{ print ">"$name;print revcomp($seq) }' input.fasta 1>test2 2>test2
+[ -s test2 ] || exit 1
+echo "=================================="
+echo "PASS"
+
+echo "Test 3 - Convert FASTA to tabular form"
+bioawk -t -c fastx '{ print $name, $seq }' input.fasta 1>test3 2>test3
+[ -s test3 ] || exit 1
+echo "=================================="
+echo "PASS"
+
+echo "Test 4 - Print feature length"
+bioawk -c bed '{ print $end - $start }' ac_test.bed 1>test4 2>test4
+[ "$(cat test4 | wc -l)" -gt 1 ] || exit 1
+[ -s test4 ] || exit 1
+echo "=================================="
+echo "PASS"
+
+echo "Test 5 - Extract mapped reads"
+bioawk -c sam -H '!and($flag,4)' view.001.sam 1>test5 2>test5
+[ -s test5 ] || exit 1
+echo "=================================="
+echo "PASS"


=====================================
debian/upstream/metadata
=====================================
@@ -0,0 +1,7 @@
+---
+Archive: GitHub
+Bug-Database: https://github.com/lh3/bioawk/issues
+Bug-Submit: https://github.com/lh3/bioawk/issues/new
+Changelog: https://github.com/lh3/bioawk/tags
+Repository: https://github.com/lh3/bioawk.git
+Repository-Browse: https://github.com/lh3/bioawk



View it on GitLab: https://salsa.debian.org/med-team/bioawk/-/compare/10d72cf9dfd9abeb1b19e8f0c9bd26d85384181e...4e0b247f0e6507e51726f159688c89275730fd97

-- 
View it on GitLab: https://salsa.debian.org/med-team/bioawk/-/compare/10d72cf9dfd9abeb1b19e8f0c9bd26d85384181e...4e0b247f0e6507e51726f159688c89275730fd97
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/20210211/3fb8b021/attachment-0001.html>


More information about the debian-med-commit mailing list