[med-svn] r3061 - in trunk/packages/mlstdbnet/trunk/debian: . patches

tille at alioth.debian.org tille at alioth.debian.org
Tue Jan 27 10:37:38 UTC 2009


Author: tille
Date: 2009-01-27 10:37:38 +0000 (Tue, 27 Jan 2009)
New Revision: 3061

Modified:
   trunk/packages/mlstdbnet/trunk/debian/apache.conf
   trunk/packages/mlstdbnet/trunk/debian/config
   trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch
Log:
Ident authentication for curators, make sure webroot in local config file is not overriden by postinst


Modified: trunk/packages/mlstdbnet/trunk/debian/apache.conf
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/apache.conf	2009-01-26 14:58:35 UTC (rev 3060)
+++ trunk/packages/mlstdbnet/trunk/debian/apache.conf	2009-01-27 10:37:38 UTC (rev 3061)
@@ -1,6 +1,6 @@
 # agcurate default Apache configuration
 
-ScriptAlias /curate/ /usr/share/mlstdbnet/cgi-bin/
+ScriptAlias /mlstdbnet-curate /usr/share/mlstdbnet/cgi-bin/curate.pl
 <Directory "/usr/share/mlstdbnet/cgi-bin">
     AllowOverride None
     Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

Modified: trunk/packages/mlstdbnet/trunk/debian/config
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/config	2009-01-26 14:58:35 UTC (rev 3060)
+++ trunk/packages/mlstdbnet/trunk/debian/config	2009-01-27 10:37:38 UTC (rev 3061)
@@ -70,13 +70,13 @@
     if [ "$LOCUS" != "##Locus##" -a "$LOCUS" != "" ] ; then
 	db_set ${pkg}/locus "$LOCUS"
     fi
-    WEBROOT=`grep 'webroot="' /etc/${pkg}/${XMLNAME}.xml | sed 's/.*webroot="[^"]\+">\([^<]\+\)<.*/\1/'`
+    WEBROOT=`grep 'webroot="' /etc/${pkg}/${XMLNAME}.xml | sed 's/.*webroot="\([^"]\+\)".*/\1/'`
     # verify whether webroot is set in config file
     if [ "$WEBROOT" != "##webroot##" -a "$WEBROOT" != "" ] ; then
 	db_set ${pkg}/webroot "$WEBROOT"
     else
-	# set database name as default webroot
-	db_set ${pkg}/webroot "/${XMLNAME}"
+	# set "/${pkg}" name as default webroot
+	db_set ${pkg}/webroot "/${pkg}"
     fi
     DBPROF=`grep 'dbprof="' /etc/${pkg}/${XMLNAME}.xml | sed 's/.*dbprof="[^"]\+">\([^<]\+\)<.*/\1/'`
     # verify whether DPPROF is set in config file
@@ -92,7 +92,7 @@
 db_input high ${pkg}/note || true
 
 # set database name as default webroot
-db_set ${pkg}/webroot "/${XMLNAME}"
+db_set ${pkg}/webroot "$WEBROOT"
 # set database name as default dbprof
 db_set ${pkg}/dbprof "${XMLNAME}"
 

Modified: trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch	2009-01-26 14:58:35 UTC (rev 3060)
+++ trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch	2009-01-27 10:37:38 UTC (rev 3061)
@@ -15,18 +15,42 @@
 +	# needs and empty string for user and password ...
 +	if ( $system{'host'} =~ /^localhost$/ ) {
 +		$db = DBI->connect(
-+"DBI:Pg:dbname=$system{'longcode'}",
++"DBI:Pg:database=$system{'longcode'};port=$system{'port'}",
 +		'', '', { 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 {
+@@ -3634,12 +3643,20 @@
+ sub maintableReference {
+ 	my ($fieldname,$pmid,$td)=@_;
+ 	if ( $config{'reference'} ) {
+-		my $dbr = DBI->connect(
++		my $dbr;
++		if ( $system{'host'} =~ /^localhost$/ ) {
++			$dbr = DBI->connect(
++"DBI:Pg:database=$config{'refdb'};port=$system{'port'}",
++				'', '', { AutoCommit => 0 }
++			);
++		} else {
++			$dbr = DBI->connect(
+ "DBI:Pg:host=$system{'host'};port=$system{'port'};dbname=$config{'refdb'}",
+ 			"$system{'user'}",
+ 			"$system{'pass'}",
+ 			{ AutoCommit => 0 }
+-		);
++			);
++		}
+ 		if ($dbr) {
+ 			my $sqlr = $dbr->prepare("SELECT year,journal,volume,pages,title FROM refs WHERE pmid=?");
+ 			my $sqlr2 = $dbr->prepare("SELECT surname,initials FROM authors WHERE id=?");
 --- mlstdbnet_v2.0.0.orig/cgi-bin/mlstdbnet.pl
 +++ mlstdbnet_v2.0.0/cgi-bin/mlstdbnet.pl
 @@ -376,19 +376,35 @@




More information about the debian-med-commit mailing list