[med-svn] r2557 - in trunk/packages/agdbnet/trunk/debian: . patches

tille at alioth.debian.org tille at alioth.debian.org
Mon Sep 29 14:23:10 UTC 2008


Author: tille
Date: 2008-09-29 14:23:09 +0000 (Mon, 29 Sep 2008)
New Revision: 2557

Modified:
   trunk/packages/agdbnet/trunk/debian/README.Debian
   trunk/packages/agdbnet/trunk/debian/changelog
   trunk/packages/agdbnet/trunk/debian/install
   trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch
   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/postinst
   trunk/packages/agdbnet/trunk/debian/postrm
Log:
Several adaptations to new upstream version


Modified: trunk/packages/agdbnet/trunk/debian/README.Debian
===================================================================
--- trunk/packages/agdbnet/trunk/debian/README.Debian	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/README.Debian	2008-09-29 14:23:09 UTC (rev 2557)
@@ -127,7 +127,7 @@
   http://httpd.apache.org/docs/2.2/howto/auth.html
 
 For the sake of simplicity and to get something working fast the
-most simple method "anonymous" was choosen for this Debian package.
+most simple method "anonymous" was chosen for this Debian package.
 This methods provides nearly non security for your agdbnet database
 because everybaody who is able to guess the name of a user who is
 registered as a curator and just uses any email-ish string as
@@ -154,6 +154,6 @@
   apache-modconf apache enable authnz_ldap
 
 but in my tests this did not worked unfortunately so the method to
-place the symlinks manually should be prefered for the moment.
+place the symlinks manually should be preferred for the moment.
 
  -- Andreas Tille <tillea at rki.de>, Wed, 24 Sep 2008 14:23:04 +0200

Modified: trunk/packages/agdbnet/trunk/debian/changelog
===================================================================
--- trunk/packages/agdbnet/trunk/debian/changelog	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/changelog	2008-09-29 14:23:09 UTC (rev 2557)
@@ -1,5 +1,5 @@
-agdbnet (1.0.0-1) unstable; urgency=low
+agdbnet (1.0.4-1) UNRELEASED; urgency=low
 
   * Initial release (Closes: #500106)
 
- -- Andreas Tille <tille at debian.org>  Thu, 25 Sep 2008 08:51:47 +0200
+ -- Andreas Tille <tille at debian.org>  Mon, 29 Sep 2008 13:30:39 +0200

Modified: trunk/packages/agdbnet/trunk/debian/install
===================================================================
--- trunk/packages/agdbnet/trunk/debian/install	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/install	2008-09-29 14:23:09 UTC (rev 2557)
@@ -4,3 +4,4 @@
 scripts/*.pl               usr/share/agdbnet
 stylesheets/stylesheet.css usr/share/agdbnet/template
 debian/mlstdbnet.conf	   etc/agdbnet
+images                     usr/share/agdbnet

Modified: trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/patches/10_config_location.patch	2008-09-29 14:23:09 UTC (rev 2557)
@@ -1,42 +1,56 @@
 In Debian configuration files have to be located in /etc and not in
 the same directory as the cgi script as upstream suggests.
---- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
-+++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
-@@ -35,7 +35,7 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.4/cgi-bin/agdbnet.pl
+@@ -33,13 +33,10 @@
  ######################################################
- 
  ###########Local configuration########################
--local ( our $configfile = '/usr/local/agdbnet/agdbnet.conf' );
-+local ( our $configfile = '/etc/agdbnet/agdbnet.conf' );
+ local ( our $configfile );
+-if ( -e '/usr/local/agdbnet/agdbnet.conf' ) {
+-	$configfile = '/usr/local/agdbnet/agdbnet.conf';
++if ( -e '/etc/agdbnet/agdbnet.conf' ) {
++	$configfile = '/etc/agdbnet/agdbnet.conf';
+ } else {
+-
+-#use mlstdbnet conf file if agdbnet one not available - useful for auto-updating mirrors where
+-#agdbnet not previously installed
+-	$configfile = '/usr/local/mlstdbnet/mlstdbnet.conf';
++	die "Cannot open config file '/etc/agdbnet/agdbnet.conf'";
+ }
  #######End Local configuration########################
- 
  local (
-@@ -134,7 +134,7 @@
+@@ -128,7 +125,10 @@
+ 				$parser->parse( Source => { SystemId => "$1/$instance" } );
  			}
- 		}
- 		else {
+ 		} else {
 -			$parser->parse( Source => { SystemId => $instance } );
-+			$parser->parse( Source => { SystemId => "/etc/agdbnet/$instance" } );
++			my $xmlinstance = `pwd`."/$instance";
++		        if ( ! -e $xmlinstance ) { $xmlinstance = "/etc/agdbnet/$instance"; }
++			else                     { $xmlinstance = $instance ; }
++			$parser->parse( Source => { SystemId => $xmlinstance } );
  		}
  	};
  	if ($@) {
---- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
-+++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
-@@ -30,7 +30,7 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.4/cgi-bin/agcurate.pl
+@@ -29,7 +29,7 @@
+ use XML::Parser::PerlSAX;
  use strict;
- 
  ###########Local configuration########################
--local ( our $configfile = '/usr/local/mlstdbnet/mlstdbnet.conf' );
-+local ( our $configfile = '/etc/agdbnet/mlstdbnet.conf' );
+-local ( our $configfile = '/usr/local/agdbnet/agdbnet.conf' );
++local ( our $configfile = '/etc/agdbnet/agdbnet.conf' );
  #######End Local configuration########################
- 
- local (our (
-@@ -64,7 +64,7 @@
+ local (
+ 	our (
+@@ -69,7 +69,10 @@
  	if ( $q->param('file') =~ /^([\w\d\-_]+\.xml)$/ ) {
  		$instance = $1;
  	}
 -	eval { $parser->parse( Source => { SystemId => $instance } ); };
-+	eval { $parser->parse( Source => { SystemId => "/etc/agdbnet/$instance" } ); };
++	my $xmlinstance = `pwd`."/$instance";
++	if ( ! -e $xmlinstance ) { $xmlinstance = "/etc/agdbnet/$instance" ; }
++        else                     { $xmlinstance = $instance ; }
++	eval { $parser->parse( Source => { SystemId => $xmlinstance } ); };
  	if ($@) {
  		$invalidXML = 1;
  	}

Modified: trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/patches/11_moreinfo.patch	2008-09-29 14:23:09 UTC (rev 2557)
@@ -1,20 +1,20 @@
 Provide some more information to the user if the initialisation of
 the web page fails by pointing to README.Debian which might contain
 hints about things to do next.
---- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
-+++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
-@@ -129,7 +129,7 @@
- 	print $q->header;
+--- agdbnet_v1.0.4.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.4/cgi-bin/agcurate.pl
+@@ -145,7 +145,7 @@
+ 	print $q->header ( -charset => 'UTF-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!<br />Please follow the instructions at /usr/share/doc/agdbnet/README.Debian to get a running system.</p>";
- 		print $q->end_html;			
+ 		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 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.4/cgi-bin/agdbnet.pl
+@@ -339,7 +339,7 @@
  	}
  	if ($invalidXML) {
  		print $q->start_html( -title => "Invalid XML file" );

Modified: trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/patches/12_apache_is_web-data.patch	2008-09-29 14:23:09 UTC (rev 2557)
@@ -3,9 +3,9 @@
 Attention: The '"' around www-data in the GRANT SQL statement
 are important to make sure the '-' in the name will not be
 interpreted by the SQL parser.
---- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
-+++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
-@@ -80,7 +80,7 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.4/cgi-bin/agcurate.pl
+@@ -87,7 +87,7 @@
  		$system{'port'} = 5432;
  	}
  	if ( !$system{'user'} ) {
@@ -14,9 +14,9 @@
  	}
  	if ( !$system{'pass'} ) {
  		$system{'pass'} = 'remote';
---- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
-+++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
-@@ -156,7 +156,7 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.4/cgi-bin/agdbnet.pl
+@@ -146,7 +146,7 @@
  		$system{'port'} = 5432;
  	}
  	if ( !$system{'user'} ) {
@@ -25,8 +25,8 @@
  	}
  	if ( !$system{'pass'} ) {
  		$system{'pass'} = 'remote';
---- agdbnet_v1.0.0.orig/examples/poravr.xml
-+++ agdbnet_v1.0.0/examples/poravr.xml
+--- agdbnet_v1.0.4.orig/examples/poravr.xml
++++ agdbnet_v1.0.4/examples/poravr.xml
 @@ -131,7 +131,7 @@
  <field type="text" length="256">description</field>
  </auxtable>
@@ -34,10 +34,10 @@
 -<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" length="20" comments="Original strain name as supplied by sender">isolate</field>
  <field type="text" required="no" maindisplay="no" length="20"
---- agdbnet_v1.0.0.orig/installation.html
-+++ agdbnet_v1.0.0/installation.html
+--- agdbnet_v1.0.4.orig/installation.html
++++ agdbnet_v1.0.4/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 />
@@ -57,8 +57,8 @@
 -</html>
 \ No newline at end of file
 +</html>
---- agdbnet_v1.0.0.orig/scripts/xml2sql.pl
-+++ agdbnet_v1.0.0/scripts/xml2sql.pl
+--- agdbnet_v1.0.4.orig/scripts/xml2sql.pl
++++ agdbnet_v1.0.4/scripts/xml2sql.pl
 @@ -45,7 +45,7 @@
  	$webuser = $opts{'u'};
  }
@@ -68,12 +68,39 @@
  }
  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)
+@@ -85,7 +85,7 @@
+ PRIMARY KEY (id)
  );
  
--GRANT SELECT ON authors,refs TO apache;
+-GRANT SELECT,UPDATE,INSERT,DELETE ON users TO $webuser;
++GRANT SELECT,UPDATE,INSERT,DELETE ON users TO "$webuser";
+ 
+ USERS
+ 
+@@ -128,7 +128,7 @@
+ CREATE INDEX i_pmid ON refs (pmid);
+ CREATE INDEX i_id ON refs (id);
+ 
+-GRANT SELECT,UPDATE,INSERT,DELETE ON refs TO apache;
++GRANT SELECT,UPDATE,INSERT,DELETE ON refs TO "www-data";
+ REFS
+ 
+ sub printtable {
+@@ -178,7 +178,7 @@
+ 	}
+ 	print $buffer;
+ 	print "\n);\n";
+-	print "\nGRANT SELECT,UPDATE,INSERT,DELETE ON $table TO $webuser;\n";	
++	print "\nGRANT SELECT,UPDATE,INSERT,DELETE ON $table TO \"$webuser\";\n";
+ }
+ 
+ sub locustype {
+--- agdbnet_v1.0.4.orig/setup/refs.sql
++++ agdbnet_v1.0.4/setup/refs.sql
+@@ -28,4 +28,4 @@
+ CONSTRAINT author FOREIGN KEY (author) references authors ON DELETE NO ACTION ON UPDATE CASCADE
+ );
+ 
+-GRANT SELECT ON authors,refs,refauthors TO apache;
 \ No newline at end of file
-+GRANT SELECT ON authors,refs TO "www-data";
++GRANT SELECT ON authors,refs,refauthors TO "www-data";

Modified: trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch	2008-09-29 14:23:09 UTC (rev 2557)
@@ -4,9 +4,9 @@
 i.e. if you specify the host localhost password authentication
 is automatically used.  This patch removes host and port from
 the connection string if $host == 'localhost'.
---- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
-+++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
-@@ -167,10 +167,19 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.4/cgi-bin/agdbnet.pl
+@@ -208,10 +208,19 @@
  }
  
  sub dbconnect {
@@ -27,9 +27,9 @@
  }
  
  sub dbdisconnect {
---- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
-+++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
-@@ -107,10 +107,19 @@
+--- agdbnet_v1.0.4.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.4/cgi-bin/agcurate.pl
+@@ -122,10 +122,19 @@
  }
  
  sub dbconnect {

Modified: trunk/packages/agdbnet/trunk/debian/postinst
===================================================================
--- trunk/packages/agdbnet/trunk/debian/postinst	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/postinst	2008-09-29 14:23:09 UTC (rev 2557)
@@ -81,6 +81,11 @@
     ln -s "$STYLEDIR" "/var/www/${pkg}/$XMLNAME"
 fi
 
+# Link to image directory
+if [ ! -e "/var/www/${pkg}/images" ] ; then
+    ln -s "/usr/share/${pkg}/images" "/var/www/${pkg}"
+fi
+
 # Obtaining user information for agcurator and write this to the config file
 db_get ${pkg}/curator/username
 USERNAME=${RET}
@@ -137,7 +142,9 @@
 	# I have no idea for what purpose apache-modconf exists -
 	# at least it does not set the necessary link - so do it
 	# manually here ...
-	ln -s ../mods-available/authn_anon.load /etc/apache2/mods-enabled
+	if [ ! -L /etc/apache2/mods-enabled/authn_anon.load ] ; then 
+	    ln -s ../mods-available/authn_anon.load /etc/apache2/mods-enabled
+	fi
 	# Restart Apache to register configuration for agcurator
 	if apache2ctl configtest 2>/dev/null; then
     	    if [ -x /usr/sbin/invoke-rc.d ]; then

Modified: trunk/packages/agdbnet/trunk/debian/postrm
===================================================================
--- trunk/packages/agdbnet/trunk/debian/postrm	2008-09-29 13:00:08 UTC (rev 2556)
+++ trunk/packages/agdbnet/trunk/debian/postrm	2008-09-29 14:23:09 UTC (rev 2557)
@@ -25,6 +25,7 @@
 		rm -f  /etc/${pkg}/"$XMLNAME".xml.old
 		# remove style files
 		rm -rf /etc/${pkg}/"$XMLNAME"
+		rm -rf /etc/${pkg}/images
 		# remove link from /var/www to /etc which was created in postinst
 		rm -rf /var/www/${pkg}/"$XMLNAME"
 	    done




More information about the debian-med-commit mailing list