[med-svn] [Git][med-team/gffread][master] 5 commits: improve hardening

Michael R. Crusoe gitlab at salsa.debian.org
Wed Sep 25 11:53:32 BST 2019



Michael R. Crusoe pushed to branch master at Debian Med / gffread


Commits:
344f8060 by Michael R. Crusoe at 2019-09-25T10:52:44Z
improve hardening

- - - - -
b51c4410 by Michael R. Crusoe at 2019-09-25T10:52:44Z
add autopkgtests

- - - - -
81d9e23b by Michael R. Crusoe at 2019-09-25T10:52:44Z
remove unused createmanpages script

- - - - -
f7dea911 by Michael R. Crusoe at 2019-09-25T10:52:45Z
update changelog

- - - - -
691543e2 by Michael R. Crusoe at 2019-09-25T10:52:45Z
release

- - - - -


5 changed files:

- debian/changelog
- − debian/createmanpages
- debian/patches/hardening
- + debian/tests/control
- + debian/tests/run-tests


Changes:

=====================================
debian/changelog
=====================================
@@ -1,11 +1,12 @@
-gffread (0.11.5-1) UNRELEASED; urgency=medium
+gffread (0.11.5-1) unstable; urgency=medium
 
   * Team upload.
   * New upstream release.
   * Add breaks/replaces on cufflinks (<< 2.2.1+dfsg.1-4). (Closes: #940915)
   * Set upstream metadata fields: Name.
+  * Add autopkgtest
 
- -- Michael R. Crusoe <michael.crusoe at gmail.com>  Wed, 25 Sep 2019 09:15:58 +0200
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Wed, 25 Sep 2019 12:50:00 +0200
 
 gffread (0.11.4-2) unstable; urgency=medium
 


=====================================
debian/createmanpages deleted
=====================================
@@ -1,27 +0,0 @@
-#!/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\nThis manpage was written by $DEBFULLNAME for the Debian distribution and
-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 \
-         --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/patches/hardening
=====================================
@@ -13,3 +13,12 @@ Allows Debian to harden the binary with CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
  
  # C/C++ linker
  
+@@ -84,7 +84,7 @@
+ ${GCLDIR}/gff.o : ${GCLDIR}/gff.h ${GCLDIR}/GFaSeqGet.h ${GCLDIR}/GList.hh ${GCLDIR}/GHash.hh
+ ${GCLDIR}/GFaSeqGet.o : ${GCLDIR}/GFaSeqGet.h
+ gffread: gffread.o gff_utils.o
+-	${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} -lgclib ${LIBS} -pthread
++	${LINKER} ${CPPFLAGS} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} -lgclib ${LIBS} -pthread
+ #	@echo
+ #	${DBG_WARN}
+ 


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,2 @@
+Tests: run-tests
+Depends: gffread, bash, augustus-doc, bedtools-test, cnvkit, emboss-data, emboss-test, gbrowse, genometools-common, gff2aplot, gff2ps, htslib-test, libbio-graphics-perl, optimir, proteinortho, python3-gffutils, python3-pybedtools, r-bioc-genomicfeatures, r-bioc-gviz, r-bioc-rhtslib, r-bioc-rtracklayer, seqan-apps, spades, trinityrnaseq-examples


=====================================
debian/tests/run-tests
=====================================
@@ -0,0 +1,110 @@
+#!/bin/bash -e
+
+pkg=gffread
+if [ "$ADTTMP" = "" ] ; then
+        ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+fi
+cd "$ADTTMP"
+
+# the below is copied from control
+# generated via
+# apt-file search --package-only --regexp '\.gff.?$' | grep -v -E "bedops|cct|ugene|gbrowse-data"
+
+PACKAGES="augustus-doc, bedtools-test, cnvkit, emboss-data, emboss-test, gbrowse, genometools-common, gff2aplot, gff2ps, htslib-test, libbio-graphics-perl, optimir, proteinortho, python3-gffutils, python3-pybedtools, r-bioc-genomicfeatures, r-bioc-gviz, r-bioc-rhtslib, r-bioc-rtracklayer, seqan-apps, spades, trinityrnaseq-examples"
+
+IFS=", " read -r -a pkgs <<< ${PACKAGES}
+
+# ugene is non-free
+
+# bedops:
+# gffread /usr/lib/R/site-library/Gviz/extdata/test.gff2
+# Error parsing strand (?) from GFF line:
+# chr1	Canada	exon	3000	3902	.	?	2	ID=exon00003;score=4;Name=foo
+
+# r-bioc-rtracklayer
+# /usr/lib/R/site-library/rtracklayer/tests/genes.gff3
+# Error parsing strand (?) from GFF line:
+# chr12	rtracklayer	CDS	90796	91263	.	?	.	Parent=4644;
+
+# cct (and similar for cct-examples)
+# /usr/share/cct/lib/assign_cogs/sample_output/sample_1.gff
+# Warning: invalid start coordinate at line:
+# seqname	source	feature	start	end	score	strand	frame
+
+# emboss-test
+# /usr/share/EMBOSS/test/data/featexample2.gff3
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctg123  .       TF_binding_site 1000    1012    .       +       .       Parent=gene00001
+# gffread /usr/share/EMBOSS/test/data/gmod-quantitative.gff3
+# Warning: invalid start coordinate at line:
+# ctg123  affy    microarray_oligo                        1       100     281     .       .       Name=Expt1
+
+# gbrowse
+# gffread /usr/share/gbrowse/htdocs/tutorial/data_files/volvox.gff3
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctgA    example clone_start     1000    1500    .       +       .       Parent=b101.2
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctgA    example clone_end       19500   20000   .       -       .       Parent=b101.2
+# gffread /usr/share/gbrowse/htdocs/tutorial/data_files/volvox_all.gff3
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctgA    example clone_start     1000    1500    .       +       .       Parent=b101.2
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctgA    example clone_end       19500   20000   .       -       .       Parent=b101.2
+# gffread /usr/share/gbrowse/htdocs/tutorial/data_files/volvox_bacs.gff3
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctgA    example clone_start     1000    1500    .       +       .       Parent=b101.2
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctgA    example clone_end       19500   20000   .       -       .       Parent=b101.2
+
+# gbrowse-data
+# gffread /var/lib/gbrowse/databases/gbrowse_syn/rice/rice.gff3
+# Error: cannot open input file /var/lib/gbrowse/databases/gbrowse_syn/rice/rice.gff3!
+# ls -l /var/lib/gbrowse/databases/gbrowse_syn/rice/rice.gff3
+# -rwxrwx--- 1 root www-data 235531 Jan 15  2017 /var/lib/gbrowse/databases/gbrowse_syn/rice/rice.gff3
+# (it is not world readable)
+
+# python-gffutils
+# gffread /usr/lib/python3/dist-packages/gffutils/test/data/F3-unique-3.v2.gff
+# Warning: invalid start coordinate at line:
+# ##hdr seqname   source  feature start   end     score   strand  frame   [attributes]    [comments]
+# gffread /usr/lib/python3/dist-packages/gffutils/test/data/mouse_extra_comma.gff3
+# Warning: cannot parse value of GFF attribute "ID=" at line:
+# chr17   RefSeq  protein 6806527 6812289 .       +       .       ID=;Parent=XM_001475631.1
+# gffread /usr/lib/python3/dist-packages/gffutils/test/data/dmel-all-no-analysis-r5.49_50k_lines.gff
+# Error: discarding overlapping duplicate orthologous_region feature (11218-15711) with ID=ortho:5391
+# gffread /usr/lib/python3/dist-packages/gffutils/test/data/glimmer_nokeyval.gff3
+# Error: discarding overlapping duplicate mRNA feature (3-62) with ID=GL0000006
+# gffread /usr/lib/python3/dist-packages/gffutils/test/data/unsanitized.gff
+# Error: invalid feature coordinates (end<start!) at line:
+# 3R      FlyBase gene    1000    500     .       +       .       ID=FBgnFAKE1;
+
+
+# r-bioc-genomicfeatures
+# gffread /usr/lib/R/site-library/GenomicFeatures/extdata/GFF3_files/TheCanonicalGene_v2.gff3
+# Warning: unrecognized parented feature without ID found before its parent:
+# ctg123  .       TF_binding_site 1000    1012    .       +       .       Parent=gene00001
+
+# seqan-apps
+# gffread /usr/share/doc/seqan-apps/insegt/example/annoOutput.gff
+# Warning: invalid start coordinate at line:
+# test_chromosome Annotation_Count        region  .       .       3       +       .       ID=ENSG00000146556;459136.822773;
+
+# optimir
+# gffread /usr/lib/python3/dist-packages/optimir/resources/coordinates/hsa_miRCarta_v1.1.gff3
+# Error: discarding overlapping duplicate miRNA feature (177339349-177339370) with ID=m-3914
+
+# python-pybedtools
+# gffread /usr/lib/python3/dist-packages/pybedtools/test/data/c.gff
+# Error: discarding overlapping duplicate mRNA feature (496-576) with ID=AT1G01010.mRNA
+
+SKIPS="/usr/share/doc/augustus/tutorial/results/augustus.abinitio.gff|/usr/share/doc/augustus/tutorial/results/augustus.hints.gff|/usr/lib/R/site-library/Gviz/extdata/test.gff2|/usr/lib/R/site-library/rtracklayer/tests/genes.gff3|/usr/share/EMBOSS/test/data/featexample2.gff3|/usr/share/EMBOSS/test/data/gmod-quantitative.gff3|/usr/share/gbrowse/htdocs/tutorial/data_files/volvox.gff3|/usr/share/gbrowse/htdocs/tutorial/data_files/volvox_all.gff3|/usr/share/gbrowse/htdocs/tutorial/data_files/volvox_bacs.gff3|/var/lib/gbrowse/databases/ideograms/human_cytobands.gff|/var/lib/gbrowse/databases/ideograms/mouse_cytobands.gff|/var/lib/gbrowse/databases/ideograms/rat_cytobands.gff|/var/lib/gbrowse/databases/yeast_chr1\+2/yeast_chr1\+2.gff3|/usr/lib/python3/dist-packages/gffutils/test/data/F3-unique-3.v2.gff|/usr/lib/python3/dist-packages/gffutils/test/data/mouse_extra_comma.gff3|/usr/lib/R/site-library/GenomicFeatures/extdata/GFF3_files/TheCanonicalGene_v2.gff3|/usr/share/doc/seqan-apps/insegt/example/annoOutput.gff|/usr/lib/python3/dist-packages/optimir/resources/coordinates/hsa_miRCarta_v1.1.gff3|/usr/lib/python3/dist-packages/gffutils/test/data/dmel-all-no-analysis-r5.49_50k_lines.gff|/usr/lib/python3/dist-packages/gffutils/test/data/glimmer_nokeyval.gff3|/usr/lib/python3/dist-packages/gffutils/test/data/unsanitized.gff|/usr/lib/python3/dist-packages/pybedtools/test/data/c.gff"
+
+for package in "${pkgs[@]}"
+do
+   gffs=$(dpkg -L ${package} | grep -E '\.gff.?$' | grep -v -E ${SKIPS})
+   for gff in ${gffs}
+   do
+      echo -n "${gff}: "
+      gffread ${gff} > /dev/null && echo is okay.
+   done
+done



View it on GitLab: https://salsa.debian.org/med-team/gffread/compare/5293edc8ac00e41d2a8954d19ad5a49459de2e8f...691543e214e14f7a2cb70e84ece1b4471f2ce03d

-- 
View it on GitLab: https://salsa.debian.org/med-team/gffread/compare/5293edc8ac00e41d2a8954d19ad5a49459de2e8f...691543e214e14f7a2cb70e84ece1b4471f2ce03d
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/20190925/82e2a01a/attachment-0001.html>


More information about the debian-med-commit mailing list