Author: tille
Date: 2008-09-19 08:25:21 +0000 (Fri, 19 Sep 2008)
New Revision: 2509

Added:
   trunk/packages/agdbnet/trunk/debian/cron.daily
   trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch
   trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch
   trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch
   trunk/packages/agdbnet/trunk/debian/template/banner.html
   trunk/packages/agdbnet/trunk/debian/template/footer.html
   trunk/packages/agdbnet/trunk/debian/template/header.html
Removed:
   trunk/packages/agdbnet/trunk/debian/patches/10_apache_is_web-data.patch
   trunk/packages/agdbnet/trunk/debian/patches/10_conf_location.patch
   trunk/packages/agdbnet/trunk/debian/patches/10_moreinfo.patch
Modified:
   trunk/packages/agdbnet/trunk/debian/README.Debian
   trunk/packages/agdbnet/trunk/debian/examples
   trunk/packages/agdbnet/trunk/debian/install
   trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch
   trunk/packages/agdbnet/trunk/debian/patches/series
   trunk/packages/agdbnet/trunk/debian/postinst
   trunk/packages/agdbnet/trunk/debian/postrm
   trunk/packages/agdbnet/trunk/debian/rules
   trunk/packages/agdbnet/trunk/debian/template/agdbnet.xml
Log:
Let ident authentication work, make use of layout templates, cron job for refs 
database, updated README.Debian


Modified: trunk/packages/agdbnet/trunk/debian/README.Debian
===================================================================
--- trunk/packages/agdbnet/trunk/debian/README.Debian   2008-09-18 07:59:19 UTC 
(rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/README.Debian   2008-09-19 08:25:21 UTC 
(rev 2509)
@@ -5,4 +5,20 @@
 enable you to do the final steps to run agdbnet.  Here are the last
 steps from installation manual that have to be done.
 
+PubMed references
+-----------------
+
+According to item 6. of the original installation manual (see
+installation.html) the confiuration file has to be adjusted to
+enable obtaining PubMed references.  You can find the original
+getrefs.conf example file in the examples directory.  The data
+in this example file correspond to the configuration file example
+poravr.xml.  Please adapt this to your own needs and finally copy
+a working getrefs.conf file into the directory /etc/agdbnet.
+Once you have done this the cron job in /etc/cron.daily/agdbnet
+will fetch the references once a day.  It is strongly advised
+to call /etc/cron.daily/agdbnet manually for testing proper
+opperation.
+
+
  -- Andreas Tille <[EMAIL PROTECTED]>  Fri, 05 Sep 2008 11:07:50 +0200

Added: trunk/packages/agdbnet/trunk/debian/cron.daily
===================================================================
--- trunk/packages/agdbnet/trunk/debian/cron.daily                              
(rev 0)
+++ trunk/packages/agdbnet/trunk/debian/cron.daily      2008-09-19 08:25:21 UTC 
(rev 2509)
@@ -0,0 +1,17 @@
+#!/bin/sh
+# populate the refs database once isolate databases have been set up
+#
+# The config file 
+CONFFILE=/etc/agdbnet/getrefs.conf
+# is not installed at package installation time because the information
+# in this file has to be edited manually before reasonable operation can
+# be accomplished.  So this cron job does not do anything until a valid
+# $CONFFILE exists.
+#
+# See /usr/share/agdbnet/README.Debian for more detailed information
+
+PROG=/usr/share/agdbnet/getrefs.pl
+
+if [ -x $PROG -a -s $CONFFILE ] ; then
+    su - --command "$PROG $CONFFILE" www-data
+fi

Modified: trunk/packages/agdbnet/trunk/debian/examples
===================================================================
--- trunk/packages/agdbnet/trunk/debian/examples        2008-09-18 07:59:19 UTC 
(rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/examples        2008-09-19 08:25:21 UTC 
(rev 2509)
@@ -1 +1,2 @@
 examples/*
+scripts/getrefs.conf

Modified: trunk/packages/agdbnet/trunk/debian/install
===================================================================
--- trunk/packages/agdbnet/trunk/debian/install 2008-09-18 07:59:19 UTC (rev 
2508)
+++ trunk/packages/agdbnet/trunk/debian/install 2008-09-19 08:25:21 UTC (rev 
2509)
@@ -1,2 +1,4 @@
-cgi-bin          usr/lib
-debian/template  usr/share/agdbnet
+cgi-bin                    usr/lib
+debian/template            usr/share/agdbnet
+scripts/*.pl               usr/share/agdbnet
+stylesheets/stylesheet.css usr/share/agdbnet/template

Deleted: trunk/packages/agdbnet/trunk/debian/patches/10_apache_is_web-data.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/10_apache_is_web-data.patch     
2008-09-18 07:59:19 UTC (rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/patches/10_apache_is_web-data.patch     
2008-09-19 08:25:21 UTC (rev 2509)
@@ -1,76 +0,0 @@
-Apache runs as user www-data on Debian systems - so replace any
-occurence of system user apache by www-data
---- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
-+++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
-@@ -80,7 +80,7 @@
-               $system{'port'} = 5432;
-       }
-       if ( !$system{'user'} ) {
--              $system{'user'} = 'apache';
-+              $system{'user'} = 'www-data';
-       }
-       if ( !$system{'pass'} ) {
-               $system{'pass'} = 'remote';
---- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
-+++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
-@@ -157,7 +157,7 @@
-               $system{'port'} = 5432;
-       }
-       if ( !$system{'user'} ) {
--              $system{'user'} = 'apache';
-+              $system{'user'} = 'www-data';
-       }
-       if ( !$system{'pass'} ) {
-               $system{'pass'} = 'remote';
---- agdbnet_v1.0.0.orig/examples/poravr.xml
-+++ agdbnet_v1.0.0/examples/poravr.xml
-@@ -131,7 +131,7 @@
- <field type="text" length="256">description</field>
- </auxtable>
- 
--<extisolates dbase="nm_isolates" host="localhost" port="5432" user="apache" 
pass="remote" view="isolates" fullname="PubMLST isolates" 
url="http://pubmlst.org/cgi-bin/mlstdbnet/mlstdbnet.pl?file=pub-nm_isolates.xml&amp;page=straininfo&amp;id=\?";>PubMLST
-+<extisolates dbase="nm_isolates" host="localhost" port="5432" user="www-data" 
pass="remote" view="isolates" fullname="PubMLST isolates" 
url="http://pubmlst.org/cgi-bin/mlstdbnet/mlstdbnet.pl?file=pub-nm_isolates.xml&amp;page=straininfo&amp;id=\?";>PubMLST
- <field type="int" length="5" userupdate="no" comments="primary key">id</field>
- <field type="text" length="20" comments="Original strain name as supplied by 
sender">strain</field>
- <field type="text" required="no" maindisplay="no" length="20"
---- agdbnet_v1.0.0.orig/installation.html
-+++ agdbnet_v1.0.0/installation.html
-@@ -38,9 +38,9 @@
- <li>Create the SQL file to generate the database using the xml2sql.pl script 
found in the scripts directory.  First make sure that the XML has a valid 
syntax by running the script as below:<br />
- <p />
- <p class="code">./xml2sql.pl database.xml</p>
--where 'database.xml' is the XML file you created above (change the filename 
as appropriate).  If the script does not produce an error message, generate 
your SQL file as follows - substitute the name of the web server user account 
for 'apache':<br />
-+where 'database.xml' is the XML file you created above (change the filename 
as appropriate).  If the script does not produce an error message, generate 
your SQL file as follows - substitute the name of the web server user account 
for 'www-data':<br />
- <p />
--<p class="code">./xml2sql.pl -u apache database.xml > database.sql</p></li>
-+<p class="code">./xml2sql.pl -u www-data database.xml > database.sql</p></li>
- <li>Create the database - you may need to log in with an account with 
permissions to create new databases, e.g. 'postgres':<br />
- <p />
- <p class="code">createdb database</p>
-@@ -60,4 +60,4 @@
- </ol>
- 
- </body>
--</html>
-\ No newline at end of file
-+</html>
---- agdbnet_v1.0.0.orig/scripts/xml2sql.pl
-+++ agdbnet_v1.0.0/scripts/xml2sql.pl
-@@ -45,7 +45,7 @@
-       $webuser = $opts{'u'};
- }
- else {
--      $webuser = 'apache';
-+      $webuser = 'www-data';
- }
- my $instance = $ARGV[0];
- if ( !$instance ) {
---- agdbnet_v1.0.0.orig/setup/refs.sql
-+++ agdbnet_v1.0.0/setup/refs.sql
-@@ -23,4 +23,4 @@
- PRIMARY KEY (pmid)
- );
- 
--GRANT SELECT ON authors,refs TO apache;
-\ No newline at end of file
-+GRANT SELECT ON authors,refs TO "www-data";

Deleted: trunk/packages/agdbnet/trunk/debian/patches/10_conf_location.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/10_conf_location.patch  
2008-09-18 07:59:19 UTC (rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/patches/10_conf_location.patch  
2008-09-19 08:25:21 UTC (rev 2509)
@@ -1,11 +0,0 @@
---- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl.orig
-+++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
-@@ -35,7 +35,7 @@
- ######################################################
- 
- ###########Local configuration########################
--local ( our $configfile = '/usr/local/agdbnet/agdbnet.conf' );
-+local ( our $configfile = '/etc/agdbnet/agdbnet.conf' );
- #######End Local configuration########################
- 
- local (

Modified: trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch        
2008-09-18 07:59:19 UTC (rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch        
2008-09-19 08:25:21 UTC (rev 2509)
@@ -1,3 +1,14 @@
+--- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl.orig
++++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
+@@ -35,7 +35,7 @@
+ ######################################################
+ 
+ ###########Local configuration########################
+-local ( our $configfile = '/usr/local/agdbnet/agdbnet.conf' );
++local ( our $configfile = '/etc/agdbnet/agdbnet.conf' );
+ #######End Local configuration########################
+ 
+ local (
 --- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
 +++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
 @@ -125,7 +125,8 @@

Deleted: trunk/packages/agdbnet/trunk/debian/patches/10_moreinfo.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/10_moreinfo.patch       
2008-09-18 07:59:19 UTC (rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/patches/10_moreinfo.patch       
2008-09-19 08:25:21 UTC (rev 2509)
@@ -1,23 +0,0 @@
---- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
-+++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
-@@ -129,7 +129,7 @@
-       print $q->header;
-       if ($invalidXML) {
-               print $q->start_html( -title => "Invalid XML file" );
--              print "<p>Invalid (or no) database description file 
specified!</p>";
-+              print "<p>Invalid (or no) database description file 
specified!<br />Please follow the instructions at 
/usr/share/doc/agdbnet/README.Debian to get a running system.</p>";
-               print $q->end_html;                     
-               return;
-       }
---- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
-+++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
-@@ -198,7 +198,8 @@
-       }
-       if ($invalidXML) {
-               print $q->start_html( -title => "Invalid XML file" );
--              print "<p>Invalid (or no) database description file 
specified!</p>";
-+              print "<p>Invalid (or no) database description file specified! 
(agdbnet.pl) Please follow the instructions at 
/usr/share/doc/agdbnet/README.Debian to get a running system. 
($system{'webroot'}/$system{'longcode'})</p>";
-+              print $system{'webroot'} . "//" . $system{'longcode'};
-               print $q->end_html;
-               return;
-       }

Added: trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch               
                (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch       
2008-09-19 08:25:21 UTC (rev 2509)
@@ -0,0 +1,22 @@
+--- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
+@@ -129,7 +129,7 @@
+       print $q->header;
+       if ($invalidXML) {
+               print $q->start_html( -title => "Invalid XML file" );
+-              print "<p>Invalid (or no) database description file 
specified!</p>";
++              print "<p>Invalid (or no) database description file 
specified!<br />Please follow the instructions at 
/usr/share/doc/agdbnet/README.Debian to get a running system.</p>";
+               print $q->end_html;                     
+               return;
+       }
+--- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
+@@ -198,7 +198,7 @@
+       }
+       if ($invalidXML) {
+               print $q->start_html( -title => "Invalid XML file" );
+-              print "<p>Invalid (or no) database description file 
specified!</p>";
++              print "<p>Invalid (or no) database description file 
specified!<br />Please follow the instructions at 
/usr/share/doc/agdbnet/README.Debian to get a running system.</p>";
+               print $q->end_html;
+               return;
+       }

Added: trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch     
                        (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch     
2008-09-19 08:25:21 UTC (rev 2509)
@@ -0,0 +1,76 @@
+Apache runs as user www-data on Debian systems - so replace any
+occurence of system user apache by www-data
+--- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
+@@ -80,7 +80,7 @@
+               $system{'port'} = 5432;
+       }
+       if ( !$system{'user'} ) {
+-              $system{'user'} = 'apache';
++              $system{'user'} = 'www-data';
+       }
+       if ( !$system{'pass'} ) {
+               $system{'pass'} = 'remote';
+--- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
+@@ -157,7 +157,7 @@
+               $system{'port'} = 5432;
+       }
+       if ( !$system{'user'} ) {
+-              $system{'user'} = 'apache';
++              $system{'user'} = 'www-data';
+       }
+       if ( !$system{'pass'} ) {
+               $system{'pass'} = 'remote';
+--- agdbnet_v1.0.0.orig/examples/poravr.xml
++++ agdbnet_v1.0.0/examples/poravr.xml
+@@ -131,7 +131,7 @@
+ <field type="text" length="256">description</field>
+ </auxtable>
+ 
+-<extisolates dbase="nm_isolates" host="localhost" port="5432" user="apache" 
pass="remote" view="isolates" fullname="PubMLST isolates" 
url="http://pubmlst.org/cgi-bin/mlstdbnet/mlstdbnet.pl?file=pub-nm_isolates.xml&amp;page=straininfo&amp;id=\?";>PubMLST
++<extisolates dbase="nm_isolates" host="localhost" port="5432" user="www-data" 
pass="remote" view="isolates" fullname="PubMLST isolates" 
url="http://pubmlst.org/cgi-bin/mlstdbnet/mlstdbnet.pl?file=pub-nm_isolates.xml&amp;page=straininfo&amp;id=\?";>PubMLST
+ <field type="int" length="5" userupdate="no" comments="primary key">id</field>
+ <field type="text" length="20" comments="Original strain name as supplied by 
sender">strain</field>
+ <field type="text" required="no" maindisplay="no" length="20"
+--- agdbnet_v1.0.0.orig/installation.html
++++ agdbnet_v1.0.0/installation.html
+@@ -38,9 +38,9 @@
+ <li>Create the SQL file to generate the database using the xml2sql.pl script 
found in the scripts directory.  First make sure that the XML has a valid 
syntax by running the script as below:<br />
+ <p />
+ <p class="code">./xml2sql.pl database.xml</p>
+-where 'database.xml' is the XML file you created above (change the filename 
as appropriate).  If the script does not produce an error message, generate 
your SQL file as follows - substitute the name of the web server user account 
for 'apache':<br />
++where 'database.xml' is the XML file you created above (change the filename 
as appropriate).  If the script does not produce an error message, generate 
your SQL file as follows - substitute the name of the web server user account 
for 'www-data':<br />
+ <p />
+-<p class="code">./xml2sql.pl -u apache database.xml > database.sql</p></li>
++<p class="code">./xml2sql.pl -u www-data database.xml > database.sql</p></li>
+ <li>Create the database - you may need to log in with an account with 
permissions to create new databases, e.g. 'postgres':<br />
+ <p />
+ <p class="code">createdb database</p>
+@@ -60,4 +60,4 @@
+ </ol>
+ 
+ </body>
+-</html>
+\ No newline at end of file
++</html>
+--- agdbnet_v1.0.0.orig/scripts/xml2sql.pl
++++ agdbnet_v1.0.0/scripts/xml2sql.pl
+@@ -45,7 +45,7 @@
+       $webuser = $opts{'u'};
+ }
+ else {
+-      $webuser = 'apache';
++      $webuser = 'www-data';
+ }
+ my $instance = $ARGV[0];
+ if ( !$instance ) {
+--- agdbnet_v1.0.0.orig/setup/refs.sql
++++ agdbnet_v1.0.0/setup/refs.sql
+@@ -23,4 +23,4 @@
+ PRIMARY KEY (pmid)
+ );
+ 
+-GRANT SELECT ON authors,refs TO apache;
+\ No newline at end of file
++GRANT SELECT ON authors,refs TO "www-data";

Added: trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch   
                        (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch   
2008-09-19 08:25:21 UTC (rev 2509)
@@ -0,0 +1,23 @@
+--- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
+@@ -168,10 +168,19 @@
+ }
+ 
+ sub dbconnect {
+-      $db = DBI->connect(
++      # On Debian GNU/Linux we use ident authentication if host=localhost 
which
++      # needs and empty string for user and password ...
++      if ( $system{'host'} =~ /^localhost$/ ) {
++              $db = DBI->connect(
++"DBI:Pg:dbname=$system{'longcode'}",
++              '', '', { AutoCommit => 0 }
++      );
++      } else {
++              $db = DBI->connect(
+ "DBI:Pg:host=$system{'host'};port=$system{'port'};dbname=$system{'longcode'}",
+               "$system{'user'}", "$system{'pass'}", { AutoCommit => 0 }
+       );
++      }
+ }
+ 
+ sub dbdisconnect {

Modified: trunk/packages/agdbnet/trunk/debian/patches/series
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/series  2008-09-18 07:59:19 UTC 
(rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/patches/series  2008-09-19 08:25:21 UTC 
(rev 2509)
@@ -1,6 +1,6 @@
-10_conf_location.patch
+10_config_location.patch
 10_bioperl.patch
 10_preconf.patch
-10_moreinfo.patch
-10_config_location.patch
-10_apache_is_web-data.patch
+11_moreinfo.patch
+12_apache_is_web-data.patch
+13_ident_authentication.patch

Modified: trunk/packages/agdbnet/trunk/debian/postinst
===================================================================
--- trunk/packages/agdbnet/trunk/debian/postinst        2008-09-18 07:59:19 UTC 
(rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/postinst        2008-09-19 08:25:21 UTC 
(rev 2509)
@@ -52,29 +52,45 @@
        "$XMLOUT"
 fi
 
-HTMLOUT=/etc/${pkg}/"$XMLNAME".html
-# if no HTML file exists, just create one from the template
-if [ ! -s "$HTMLOUT" ] ; then
-    sed -e "s/##database##/${XMLNAME}/g" \
-        -e "s/##Description##/${DESCRIPTION}/g" \
-        -e "s/##Pathogen##/${PATHOGEN}/g" \
-        -e "s/##LocusFullName##/${LOCUSFULLNAME}/g" \
-        -e "s/##Locus##/${LOCUS}/g" \
-       /usr/share/${pkg}/template/index.html > \
-       "$HTMLOUT"    
-fi
+# All files that might influence the layout of the web site are
+# considered config files and stored into /etc/${pkg}/${XMLNAME}
+# If such files do not exist they will be created from a simple
+# template.  Finally links are putted into place to enable
+# agdbnet to find these files.
+STYLEDIR=/etc/${pkg}/"$XMLNAME"
+mkdir -p ${STYLEDIR}
 mkdir -p /var/www/${pkg}/"$XMLNAME"
-if [ ! -s /var/www/${pkg}/"$XMLNAME"/index.html ] ; then
-    ln -s "$HTMLOUT" /var/www/${pkg}/"$XMLNAME"/index.html
-fi
+for style in `ls /usr/share/${pkg}/template/*.css 
/usr/share/${pkg}/template/*.html` ; do
+    confstyle=`basename $style`
+    if [ ! -s "$STYLEDIR/$confstyle" ] ; then
+        if [ "$confstyle" = "index.html" ] ; then
+           sed -e "s/##database##/${XMLNAME}/g" \
+               -e "s/##Description##/${DESCRIPTION}/g" \
+               -e "s/##Pathogen##/${PATHOGEN}/g" \
+               -e "s/##LocusFullName##/${LOCUSFULLNAME}/g" \
+               -e "s/##Locus##/${LOCUS}/g" \
+              "$style" > "$STYLEDIR/$confstyle"
+       else
+           cp -a "$style" "$STYLEDIR/$confstyle"
+       fi
+    fi
+    if [ ! -s "/var/www/${pkg}/$XMLNAME/$confstyle" ] ; then
+        ln -s "$STYLEDIR/$confstyle" "/var/www/${pkg}/$XMLNAME/$confstyle"
+    fi
+done
 
 TMPDIR="/var/www/${pkg}/tmp"
+SQLDIR="/var/lib/${pkg}"
 
 case "$1" in
     configure)
        [ -d ${TMPDIR} ] || mkdir -p ${TMPDIR}
        chgrp www-data ${TMPDIR}
        chmod g+w ${TMPDIR}
+       
+       # create SQL script from config file
+       mkdir -p $SQLDIR
+       /usr/share/${pkg}/xml2sql.pl -u '"www-data"' "$XMLOUT" > 
"$SQLDIR"/"$XMLNAME".sql
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Modified: trunk/packages/agdbnet/trunk/debian/postrm
===================================================================
--- trunk/packages/agdbnet/trunk/debian/postrm  2008-09-18 07:59:19 UTC (rev 
2508)
+++ trunk/packages/agdbnet/trunk/debian/postrm  2008-09-19 08:25:21 UTC (rev 
2509)
@@ -21,8 +21,11 @@
            for confxml in `grep -l "<agdb>" /etc/${pkg}/*.xml` ; do
                XMLNAME=`basename ${confxml} .xml`
 
-               rm -f  /etc/${pkg}/"$XMLNAME".xml /etc/${pkg}/"$XMLNAME".html
-               rm -f /etc/${pkg}/"$XMLNAME".xml.old
+               rm -f  /etc/${pkg}/"$XMLNAME".xml
+               rm -f  /etc/${pkg}/"$XMLNAME".xml.old
+               # remove style files
+               rm -rf /etc/${pkg}/"$XMLNAME"
+               # remove static files and links which were created in postinst
                rm -rf /var/www/${pkg}/"$XMLNAME"
            done
        fi
@@ -30,10 +33,16 @@
        # If package should be purged also purge temporary web directory
        rm -rf /var/www/${pkg}/tmp
 
-       # finally remove web directory
+       # finally remove web directory 
        if [ -d /var/www/${pkg} ] ; then
-           rmdir /var/www/${pkg}
+           rmdir --ignore-fail-on-non-empty /var/www/${pkg}
        fi
+       
+       # Remove directory with SQL scripts
+       if [ -d /var/lib/${pkg} ] ; then
+           rm -f /var/lib/${pkg}/"$XMLNAME".sql
+           rmdir --ignore-fail-on-non-empty /var/lib/${pkg}
+       fi
     ;;
     
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

Modified: trunk/packages/agdbnet/trunk/debian/rules
===================================================================
--- trunk/packages/agdbnet/trunk/debian/rules   2008-09-18 07:59:19 UTC (rev 
2508)
+++ trunk/packages/agdbnet/trunk/debian/rules   2008-09-19 08:25:21 UTC (rev 
2509)
@@ -16,6 +16,8 @@
        # copy script to setup PubMed reference fields into
        # apropriate dbconfig-common dir
        cp -a setup/refs.sql 
debian/$(pkg)/usr/share/dbconfig-common/data/${pkg}/install/pgsql
+       # keep lintian silent ...
+       chmod 644 
debian/$(pkg)/usr/share/dbconfig-common/data/${pkg}/install/pgsql
 
 # To update po files as recommended in po-debconf(7)
 clean::

Modified: trunk/packages/agdbnet/trunk/debian/template/agdbnet.xml
===================================================================
--- trunk/packages/agdbnet/trunk/debian/template/agdbnet.xml    2008-09-18 
07:59:19 UTC (rev 2508)
+++ trunk/packages/agdbnet/trunk/debian/template/agdbnet.xml    2008-09-19 
08:25:21 UTC (rev 2509)
@@ -11,7 +11,7 @@
 <!-- _______________________________________________________ -->
 
 <system
- longcode="##database##" webroot="/agdbnet/##database##" indexpage="" 
+ longcode="##database##" webroot="/agdbnet" indexpage="" 
  description="##Description##"
  downloadFASTAonly="yes"
 >

Added: trunk/packages/agdbnet/trunk/debian/template/banner.html
===================================================================
--- trunk/packages/agdbnet/trunk/debian/template/banner.html                    
        (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/template/banner.html    2008-09-19 
08:25:21 UTC (rev 2509)
@@ -0,0 +1,2 @@
+<!-- This html snippet will be included on top of the agdbnet script index -->
+<p>This is the banner.html file.</p>

Added: trunk/packages/agdbnet/trunk/debian/template/footer.html
===================================================================
--- trunk/packages/agdbnet/trunk/debian/template/footer.html                    
        (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/template/footer.html    2008-09-19 
08:25:21 UTC (rev 2509)
@@ -0,0 +1,3 @@
+<!-- This html snippet will be included after the output of the agdbnet --
+  -- cgi script                                                         -->
+<p>This is the footer.html file.</p>

Added: trunk/packages/agdbnet/trunk/debian/template/header.html
===================================================================
--- trunk/packages/agdbnet/trunk/debian/template/header.html                    
        (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/template/header.html    2008-09-19 
08:25:21 UTC (rev 2509)
@@ -0,0 +1,3 @@
+<!-- This html snippet will be included before the output of the agdbnet --
+  -- cgi script                                                          -->
+<p>This is the header.html file.</p>


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-med-commit

Reply via email to