Skip to content
Snippets Groups Projects
Commit 18bd848f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

idebian release including support for both tomcat7 and tomcat8

tomcat7 is not supported in new debian stretch relase
parent 520b7162
No related branches found
No related tags found
No related merge requests found
Showing
with 77 additions and 62 deletions
minerva (11.0.0) stable; urgency=medium minerva (11.0.0) stable; urgency=medium
* Bug fix: security issue - access to specific map can be restricted
by the userlogin
* Bug fix: sbgn import
* Bug fix: mesh connector
* Rest API (documentation can be found here:
https://git-r3lab.uni.lu/piotr.gawron/minerva/blob/master/README.md)
* Selecting an element on the map shows info about it in the bottom left
corner (when Search tab is not open)
* Upload of data overlays allows to upload just names of the proteins
(or other elements), it can be done via file or just by typing in the
proper text box
* Layout changes: the main one is that there are only 3 tab panels
(search, overlay, info), so it should be easier to navigate
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 28 Aug 2017 12:00:00 +0200
minerva (10.0.5) stable; urgency=medium minerva (10.0.5) stable; urgency=medium
* Bug fix: interacting drugs can be found for RNAs * Bug fix: interacting drugs can be found for RNAs
......
...@@ -49,6 +49,8 @@ gzip $SRC_DIR/minerva.txt ...@@ -49,6 +49,8 @@ gzip $SRC_DIR/minerva.txt
#copy configuration of logrotate #copy configuration of logrotate
cp debian/logrotate/* $SRC_DIR/ cp debian/logrotate/* $SRC_DIR/
cp debian/scripts/common.sh $SRC_DIR/
#copy changelog file #copy changelog file
cp CHANGELOG $ROOT_DIR/debian/template/changelog cp CHANGELOG $ROOT_DIR/debian/template/changelog
...@@ -150,22 +152,17 @@ find -name '*.ex' ! -name 'minerva*' -type f -exec rm -f {} + ...@@ -150,22 +152,17 @@ find -name '*.ex' ! -name 'minerva*' -type f -exec rm -f {} +
#our pre/post inst/rm scripts use __CURRENT_VERSION__ as a version of currently #our pre/post inst/rm scripts use __CURRENT_VERSION__ as a version of currently
#installed package #installed package
sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/preinst
sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/postinst
sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/prerm
sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/postrm
sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/preinst
sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/postinst
sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/prerm
sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/postrm
sed -i "s/__CURRENT_VERSION__/$current_version/g" common.sh
sed -i "s/__LOG_FILE__/$LOG_FILE/g" common.sh
#__DB_SCRIPT_DIR__ in our scripts points to place where db schema files are placed #__DB_SCRIPT_DIR__ in our scripts points to place where db schema files are placed
#in the filesystem where package is installed #in the filesystem where package is installed
sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/postinst sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" common.sh
sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/postrm
sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/prerm sed -i -e "1r common.sh" debian/postinst
sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/preinst sed -i -e "1r common.sh" debian/postrm
sed -i -e "1r common.sh" debian/preinst
sed -i -e "1r common.sh" debian/prerm
#put scripts into $DB_SCRIPT_DIR (it's a bit different than varaiable because it's not #put scripts into $DB_SCRIPT_DIR (it's a bit different than varaiable because it's not
#escaped #escaped
......
#file with common script functions for postrm/prerm/postinst/preinst
log(){
echo "$@" >>__LOG_FILE__
}
LOG_FILE="__LOG_FILE__"
DB_SCRIPT_DIR="__DB_SCRIPT_DIR__"
#new (current) version of the package
CURRENT_VERSION="__CURRENT_VERSION__"
#if we update package then this will be the old version of the package
OLD_VERSION=$2
if [ "$OLD_VERSION" = "$CURRENT_VERSION" ]
then
OLD_VERSION="";
fi
TOMCAT_PACKAGE="";
TOMCAT7_OK=$(dpkg-query -W --showformat='${Status}\n' tomcat7|grep "install ok installed")
TOMCAT8_OK=$(dpkg-query -W --showformat='${Status}\n' tomcat8|grep "install ok installed")
if [ "$TOMCAT7_OK" != "" ];
then
TOMCAT_PACKAGE='tomcat7'
fi
if [ "$TOMCAT8_OK" != "" ];
then
TOMCAT_PACKAGE='tomcat8'
fi
...@@ -13,4 +13,4 @@ Description: Standalone web application for visualization, exploration and ...@@ -13,4 +13,4 @@ Description: Standalone web application for visualization, exploration and
Tomcat server later to change the address. Tomcat server later to change the address.
Section: science Section: science
Homepage: http://r3lab.uni.lu/web/minerva-website/ Homepage: http://r3lab.uni.lu/web/minerva-website/
Depends: ${misc:Depends}, tomcat7, oracle-java8-set-default, postgresql (>=9.3) Depends: ${misc:Depends}, tomcat7 | tomcat8, oracle-java8-set-default, postgresql (>=9.3)
minerva.war /var/lib/tomcat7/webapps minerva.war /usr/share/minerva/
...@@ -13,28 +13,11 @@ ...@@ -13,28 +13,11 @@
# <conflicting-package> <version> # <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or # for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package # the debian-policy package
log(){
echo "$@" >>__LOG_FILE__
}
log "Running postinst" $1 $2; log "Running postinst" $1 $2;
# we execute it here because if some packages are missing then dpkg will return non-zero exit code # we execute it here because if some packages are missing then dpkg will return non-zero exit code
set -e set -e
#new (current) version of the package
CURRENT_VERSION="__CURRENT_VERSION__"
#if we update package then this will be the old version of the package
OLD_VERSION=$2
DB_SCRIPT_DIR="__DB_SCRIPT_DIR__"
if [ "$OLD_VERSION" = "$CURRENT_VERSION" ]
then
OLD_VERSION="";
fi
case "$1" in case "$1" in
configure) configure)
invoke-rc.d postgresql start invoke-rc.d postgresql start
...@@ -42,9 +25,9 @@ case "$1" in ...@@ -42,9 +25,9 @@ case "$1" in
#if we install #if we install
if [ "$OLD_VERSION" = "" ] if [ "$OLD_VERSION" = "" ]
then then
su - postgres -c "createuser -d -r -s map_viewer" >>__LOG_FILE__ 2>>__LOG_FILE__ su - postgres -c "createuser -d -r -s map_viewer" >>$LOG_FILE 2>>$LOG_FILE
su - postgres -c "echo \"ALTER USER map_viewer WITH PASSWORD '123qweasdzxc';\"| psql" >>__LOG_FILE__ 2>>__LOG_FILE__ su - postgres -c "echo \"ALTER USER map_viewer WITH PASSWORD '123qweasdzxc';\"| psql" >>$LOG_FILE 2>>$LOG_FILE
su - postgres -c "createdb -O map_viewer map_viewer" >>__LOG_FILE__ 2>>__LOG_FILE__ su - postgres -c "createdb -O map_viewer map_viewer" >>$LOG_FILE 2>>$LOG_FILE
hba_conf=`su - postgres -c "psql -t -P format=unaligned -c 'show hba_file';"`; hba_conf=`su - postgres -c "psql -t -P format=unaligned -c 'show hba_file';"`;
cp $hba_conf $hba_conf".bac" cp $hba_conf $hba_conf".bac"
...@@ -53,13 +36,13 @@ case "$1" in ...@@ -53,13 +36,13 @@ case "$1" in
invoke-rc.d postgresql restart invoke-rc.d postgresql restart
#install base version of the framework #install base version of the framework
su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0.sql" >>__LOG_FILE__ 2>>__LOG_FILE__ su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0.sql" >>$LOG_FILE 2>>$LOG_FILE
#install patch to current version #install patch to current version
su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0_to_$CURRENT_VERSION\".sql\"" >>__LOG_FILE__ 2>>__LOG_FILE__ su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0_to_$CURRENT_VERSION\".sql\"" >>$LOG_FILE 2>>$LOG_FILE
else else
#if we update the package #if we update the package
su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_$OLD_VERSION\"_to_\"$CURRENT_VERSION\".sql\"" >>__LOG_FILE__ 2>>__LOG_FILE__ su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_$OLD_VERSION\"_to_\"$CURRENT_VERSION\".sql\"" >>$LOG_FILE 2>>$LOG_FILE
fi fi
#print a disclaimer #print a disclaimer
...@@ -78,7 +61,8 @@ case "$1" in ...@@ -78,7 +61,8 @@ case "$1" in
#we have to restart tomcat, because application was started on the old database and it might crash during deplyment #we have to restart tomcat, because application was started on the old database and it might crash during deplyment
#for instance in the new war file there was init script that uses some new database features, but they are not #for instance in the new war file there was init script that uses some new database features, but they are not
#availble when new war is deployed from debian package, so tomcat will catch SQL exception and stop deployment #availble when new war is deployed from debian package, so tomcat will catch SQL exception and stop deployment
invoke-rc.d tomcat7 restart ln -s /usr/share/minerva/minerva.war /var/lib/$TOMCAT_PACKAGE/webapps/minerva.war
invoke-rc.d $TOMCAT_PACKAGE restart
;; ;;
*) *)
echo "postinst called with unknown argument \`$1'" >&2 echo "postinst called with unknown argument \`$1'" >&2
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
# * <old-postrm> `upgrade' <new-version> # * <old-postrm> `upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or # for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package # the debian-policy package
log(){
echo "$@" >>__LOG_FILE__
}
log "Running postrm" $1 $2; log "Running postrm" $1 $2;
...@@ -27,13 +24,15 @@ set -e ...@@ -27,13 +24,15 @@ set -e
case "$1" in case "$1" in
upgrade) upgrade)
rm -rf /var/lib/tomcat7/webapps/minerva rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva
invoke-rc.d tomcat7 start || true rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva.war
invoke-rc.d postgresql start || true # invoke-rc.d $TOMCAT_PACKAGE start || true
# invoke-rc.d postgresql start || true
;; ;;
remove) remove)
rm -rf /var/lib/tomcat7/webapps/minerva rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva
invoke-rc.d tomcat7 start || true rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva.war
invoke-rc.d $TOMCAT_PACKAGE start || true
if [ "" = "$POSTGRES_OK" ] if [ "" = "$POSTGRES_OK" ]
then then
log "No postgresql package found."; log "No postgresql package found.";
...@@ -44,7 +43,7 @@ case "$1" in ...@@ -44,7 +43,7 @@ case "$1" in
fi fi
;; ;;
abort-install) abort-install)
invoke-rc.d tomcat7 start || true invoke-rc.d $TOMCAT_PACKAGE start || true
if [ "" = "$POSTGRES_OK" ]; if [ "" = "$POSTGRES_OK" ];
then then
......
...@@ -9,11 +9,6 @@ ...@@ -9,11 +9,6 @@
# for details, see http://www.debian.org/doc/debian-policy/ or # for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package # the debian-policy package
log(){
echo "$@" >>__LOG_FILE__
}
log "Running preinst" $1 $2; log "Running preinst" $1 $2;
# we execute it here because if some packages are missing then dpkg will return non-zero exit code # we execute it here because if some packages are missing then dpkg will return non-zero exit code
...@@ -29,11 +24,11 @@ ln -s $path $DEFAULT_JAVA_SYMLINK ...@@ -29,11 +24,11 @@ ln -s $path $DEFAULT_JAVA_SYMLINK
case "$1" in case "$1" in
install|upgrade) install|upgrade)
invoke-rc.d tomcat7 stop || true invoke-rc.d $TOMCAT_PACKAGE stop || true
invoke-rc.d postgresql stop || true invoke-rc.d postgresql stop || true
;; ;;
abort-upgrade) abort-upgrade)
invoke-rc.d tomcat7 stop || true invoke-rc.d $TOMCAT_PACKAGE stop || true
invoke-rc.d postgresql stop || true invoke-rc.d postgresql stop || true
;; ;;
*) *)
......
...@@ -8,14 +8,9 @@ set -e ...@@ -8,14 +8,9 @@ set -e
# * <new-preinst> `upgrade' <old-version> # * <new-preinst> `upgrade' <old-version>
# for details, see http://www.debian.org/doc/debian-policy/ or # for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package # the debian-policy package
log(){
echo "$@" >>__LOG_FILE__
}
log "Running preinst" $1 $2; log "Running preinst" $1 $2;
DB_SCRIPT_DIR="__DB_SCRIPT_DIR__"
# we execute it here because if some packages are missing then dpkg will return non-zero exit code # we execute it here because if some packages are missing then dpkg will return non-zero exit code
set -e set -e
...@@ -30,11 +25,11 @@ su - postgres -c "pg_dump map_viewer" | gzip > "$DUMP_FILE".gz ...@@ -30,11 +25,11 @@ su - postgres -c "pg_dump map_viewer" | gzip > "$DUMP_FILE".gz
case "$1" in case "$1" in
upgrade) upgrade)
invoke-rc.d tomcat7 stop || true invoke-rc.d $TOMCAT_PACKAGE stop || true
invoke-rc.d postgresql stop || true invoke-rc.d postgresql stop || true
;; ;;
remove) remove)
invoke-rc.d tomcat7 stop || true invoke-rc.d $TOMCAT_PACKAGE stop || true
invoke-rc.d postgresql stop || true invoke-rc.d postgresql stop || true
;; ;;
*) *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment