[med-svn] [Git][med-team/prokka][master] 4 commits: Default database path is now ~/.local/lib/prokka/db (Closes: #924128)

Michael R. Crusoe gitlab at salsa.debian.org
Wed Oct 14 10:34:40 BST 2020



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


Commits:
2c1039ff by Michael R. Crusoe at 2020-10-14T10:15:48+02:00
Default database path is now ~/.local/lib/prokka/db (Closes: #924128)

- - - - -
df0835af by Michael R. Crusoe at 2020-10-14T10:17:09+02:00
no need to forward hmmer3 patch

- - - - -
19e9f69d by Michael R. Crusoe at 2020-10-14T11:29:20+02:00
more fixes for new default DB path

- - - - -
2dbebb7c by Michael R. Crusoe at 2020-10-14T11:30:06+02:00
release 1.14.6+dfsg-2

- - - - -


10 changed files:

- + debian/NEWS
- debian/changelog
- debian/get-additional-data
- − debian/lintian-overrides
- debian/patches/hmmer_not_hmmer3
- debian/patches/set-db-dir
- − debian/prokka.postinst
- − debian/prokka.postrm
- debian/rules
- debian/watch


Changes:

=====================================
debian/NEWS
=====================================
@@ -0,0 +1,13 @@
+prokka (1.14.6+dfsg-2) unstable; urgency=medium
+
+   The default world writable shared database folder /var/lib/prokka/db
+   has been abandonded as a security measure.
+
+   Per-user database directories (~/.local/lib/prokka/db) are now the default.
+
+   To continue using a previously made shared database directory, please set
+   the PROKKA_DBDIR to the desired path.
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Wed, 14 Oct 2020 10:11:34 +0200
+
+


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+prokka (1.14.6+dfsg-2) unstable; urgency=medium
+
+  * debian/watch: new location
+  * Default database path is now ~/.local/lib/prokka/db (Closes: #924128) 
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Wed, 14 Oct 2020 11:29:53 +0200
+
 prokka (1.14.6+dfsg-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/get-additional-data
=====================================
@@ -1,6 +1,7 @@
 #!/bin/sh -e
 
-PROKKADBPATH=/var/lib/prokka/db
+PROKKADBPATH=${PROKKA_DBDIR:-~/.local/lib/prokka/db}
+mkdir --parents ${PROKKADBPATH}
 
 if which prokka >/dev/null ; then
    # PROKKAVERSION=`prokka -v | sed 's/^.*[[:space:]]\+//'`
@@ -17,8 +18,7 @@ for data in hmm kingdom ; do
     rm -rf ${PROKKADBPATH}/$data
     mv prokka-${PROKKAVERSION}/db/$data ${PROKKADBPATH}
 done
+cp -rf /usr/share/prokka/db/cm ${PROKKADBPATH}/
+cp -rf /usr/share/prokka/db/genus ${PROKKADBPATH}/
+
 prokka --setupdb
-find ${PROKKADBPATH} -type f -exec chmod a+wr \{\} \;
-for data in hmm kingdom ; do
-    find ${PROKKADBPATH}/$data -type d -exec chmod a+wrx \{\} \;
-done


=====================================
debian/lintian-overrides deleted
=====================================
@@ -1,2 +0,0 @@
-# /var/lib/prokka/db is intentionally writable for users
-prokka: non-standard-dir-perm var/lib/prokka/*


=====================================
debian/patches/hmmer_not_hmmer3
=====================================
@@ -1,8 +1,9 @@
-Author: Michael R. Crusoe <michael.crusoe at gmail.com>
+Author: Michael R. Crusoe <crusoe at debian.org>
 Description: Use the Debian binary name for hmmer v3
+Forwarded: not-needed
 --- prokka.orig/bin/prokka
 +++ prokka/bin/prokka
-@@ -922,7 +922,7 @@
+@@ -970,7 +970,7 @@
        push @database, {
          DB  => $dbfile,
          SRC => "protein motif:$name:",
@@ -11,7 +12,7 @@ Description: Use the Debian binary name for hmmer v3
          CMD => $HMMER3CMD,
          VERSION => 3,   # without this, latest Bioperl goes into infinite loop
        }
-@@ -965,7 +965,7 @@
+@@ -1013,7 +1013,7 @@
    unshift @database, {
      DB  => $hmms,
      SRC => $compliant ? "" : "protein motif:$src:",


=====================================
debian/patches/set-db-dir
=====================================
@@ -1,8 +1,10 @@
-Description: Use a FHS path to the databases, not a relative path that would
- be non FHS compliant when the prokka script is installed to /usr/bin/
 Forwarded: not-needed
-Author: Michael R. Crusoe <mcrusoe at msu.edu>
-Last-Update: 2015-02-21
+Author: Michael R. Crusoe <crusoe at debian.org>
+Last-Update: 2020-10-14
+Description: Database default path is a user path
+
+not a relative path that would be non FHS compliant
+when the prokka script is installed to /usr/bin/
 
 ---
 
@@ -28,12 +30,12 @@ Last-Update: 2015-02-21
    # If you want a copy of the sprot file too (we do for git distribution)
 --- prokka.orig/bin/prokka
 +++ prokka/bin/prokka
-@@ -232,7 +232,7 @@
+@@ -235,7 +235,7 @@
               $rfam, $norrna, $notrna, $rnammer, $rawproduct, $noanno, $accver,
  	     $metagenome, $compliant, $listdb, $citation);
  
 -$dbdir = $ENV{'PROKKA_DBDIR'} || abs_path("$FindBin::RealBin/../db");
-+$dbdir = $ENV{'PROKKA_DBDIR'} || "/var/lib/prokka/db";
++$dbdir = $ENV{'PROKKA_DBDIR'} || "$ENV{HOME}/.local/lib/prokka/db";
  
  setOptions();
  


=====================================
debian/prokka.postinst deleted
=====================================
@@ -1,41 +0,0 @@
-#!/bin/sh
-# postinst script for Prokka
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-#PROKKADBPATH=/var/lib/prokka/db
-
-case "$1" in
-    configure)
-	    prokka --setupdb
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0


=====================================
debian/prokka.postrm deleted
=====================================
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-set -e 
-
-PROKKADBPATH=/var/lib/prokka/db
-
-
-if [ "$1" = "purge" ] ; then
-   
-   if [ -d $PROKKADBPATH ]; then
-      rm -rf $(dirname $PROKKADBPATH)
-   fi
-fi
-
-#DEBHELPER#	
-


=====================================
debian/rules
=====================================
@@ -4,8 +4,6 @@ DH_VERBOSE := 1
 
 include /usr/share/dpkg/default.mk
 
-PROKKADBPATH=/var/lib/prokka
-
 %:
 	dh $@
 
@@ -22,9 +20,3 @@ override_dh_link:
 	    usrdir=`echo $${db} | sed -e 's?.*/usr?/usr?'` ; \
 	    dh_link $${usrdir} $${vardir} ; \
 	done
-
-override_dh_fixperms:
-	dh_fixperms
-	for db in `find debian/$(DEB_SOURCE)/$(PROKKADBPATH) -type d` ; do \
-	    chmod a+w $${db} ; \
-	done


=====================================
debian/watch
=====================================
@@ -1,5 +1,5 @@
 version=3
 
 opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g" \
-  https://www.github.com/Victorian-Bioinformatics-Consortium/prokka/releases .*/archive/v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
+  https://github.com/tseemann/prokka/releases .*/archive/v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
 



View it on GitLab: https://salsa.debian.org/med-team/prokka/-/compare/030eaced3c8cebb27eac146c798d6833ab8ca7fa...2dbebb7c9b31ca5d01da1c85ae74dcf88194a4ee

-- 
View it on GitLab: https://salsa.debian.org/med-team/prokka/-/compare/030eaced3c8cebb27eac146c798d6833ab8ca7fa...2dbebb7c9b31ca5d01da1c85ae74dcf88194a4ee
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/20201014/c47387e6/attachment-0001.html>


More information about the debian-med-commit mailing list