[med-svn] r3087 - in trunk/packages/mlstdbnet/trunk/debian: . patches
tille at alioth.debian.org
tille at alioth.debian.org
Fri Feb 6 12:45:06 UTC 2009
Author: tille
Date: 2009-02-06 12:45:06 +0000 (Fri, 06 Feb 2009)
New Revision: 3087
Added:
trunk/packages/mlstdbnet/trunk/debian/modperl_startup.pl
Modified:
trunk/packages/mlstdbnet/trunk/debian/apache.conf
trunk/packages/mlstdbnet/trunk/debian/changelog
trunk/packages/mlstdbnet/trunk/debian/control
trunk/packages/mlstdbnet/trunk/debian/install
trunk/packages/mlstdbnet/trunk/debian/patches/10_config_location.patch
trunk/packages/mlstdbnet/trunk/debian/patches/10_preconf.patch
trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch
trunk/packages/mlstdbnet/trunk/debian/patches/series
Log:
New upstream version
Modified: trunk/packages/mlstdbnet/trunk/debian/apache.conf
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/apache.conf 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/apache.conf 2009-02-06 12:45:06 UTC (rev 3087)
@@ -1,5 +1,10 @@
# agcurate default Apache configuration
+#FindBin does not work under mod_perl2.
+#If running under apache2 + mod_perl2 the following is needed
+PerlRequire "/etc/apache2/modperl_startup.pl"
+
+# Authentication of MlstDbNet curator
ScriptAlias /mlstdbnet-curate /usr/share/mlstdbnet/cgi-bin/curate.pl
<Directory "/usr/share/mlstdbnet/cgi-bin">
AllowOverride None
Modified: trunk/packages/mlstdbnet/trunk/debian/changelog
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/changelog 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/changelog 2009-02-06 12:45:06 UTC (rev 3087)
@@ -1,4 +1,4 @@
-mlstdbnet (2.0.0-1) UNRELEASED; urgency=low
+mlstdbnet (2.0.2-1) UNRELEASED; urgency=low
* Initial release (Closes: #??????)
Modified: trunk/packages/mlstdbnet/trunk/debian/control
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/control 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/control 2009-02-06 12:45:06 UTC (rev 3087)
@@ -14,8 +14,7 @@
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, emboss, blast2, postgresql-8.3,
libcgi-pm-perl, libdbd-pg-perl, libxml-perl, dbconfig-common, apache2,
- imagemagick | graphicsmagick, bioperl, libmail-sender-perl
-Recommends: libapache2-mod-perl2
+ imagemagick | graphicsmagick, bioperl, libmail-sender-perl, libapache2-mod-perl2
Description: mlst typing database
mlstdbNet is the software that drives the majority of publicly available
MLST databases, including those for Neisseria, the largest scheme available.
Modified: trunk/packages/mlstdbnet/trunk/debian/install
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/install 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/install 2009-02-06 12:45:06 UTC (rev 3087)
@@ -8,3 +8,4 @@
conf/* etc/mlstdbnet
debian/getrefs.conf etc/mlstdbnet
images usr/share/mlstdbnet
+debian/modperl_startup.pl etc/apache2
Added: trunk/packages/mlstdbnet/trunk/debian/modperl_startup.pl
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/modperl_startup.pl (rev 0)
+++ trunk/packages/mlstdbnet/trunk/debian/modperl_startup.pl 2009-02-06 12:45:06 UTC (rev 3087)
@@ -0,0 +1,6 @@
+#!/usr/bin/perl
+
+use lib "/usr/share/perl5/mlstdbnet/lib";
+use lib "/usr/share/perl5/mlstdbnet/Plugins";
+1;
+
Modified: trunk/packages/mlstdbnet/trunk/debian/patches/10_config_location.patch
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/patches/10_config_location.patch 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/patches/10_config_location.patch 2009-02-06 12:45:06 UTC (rev 3087)
@@ -1,23 +1,8 @@
In Debian configuration files have to be located in /etc and not in
the same directory as the cgi script as upstream suggests.
---- mlstdbnet_v2.0.0.orig/cgi-bin/mlstdbnet.pl
-+++ mlstdbnet_v2.0.0/cgi-bin/mlstdbnet.pl
-@@ -29,9 +29,11 @@
- use DBI;
- use strict;
-
--use FindBin;
--use lib ( ("$FindBin::Bin/lib") =~ /^(.*)$/ ); #untaint lib directory
--use lib ( ("$FindBin::Bin/Plugins") =~ /^(.*)$/ );
-+# There is no need to keep private modules in cgi-bin dir so just
-+# move them to /usr/share/perl5 to keep lintian happy
-+use lib ( '/usr/share/perl5/mlstdbnet/lib' ) ;
-+use lib ( '/usr/share/perl5/mlstdbnet/Plugins' ) ;
-+
- use Parser;
- use Utils;
- use Plugins;
-@@ -54,7 +56,7 @@
+--- mlstdbnet_v2.0.2.orig/cgi-bin/mlstdbnet.pl
++++ mlstdbnet_v2.0.2/cgi-bin/mlstdbnet.pl
+@@ -71,7 +71,7 @@
######################################################
###########Local configuration########################
@@ -26,40 +11,27 @@
#######End Local configuration########################
#######Lexically-scoped variables#####################
-@@ -107,7 +109,20 @@
- #directory as the script. This prevents
- #a public script from accessing a private database.
- $instance = $1 if $q->param('file') =~ /^([\w\d\-_]+\.xml)$/;
-- eval { $parser->parse( Source => { SystemId => $instance } ); };
-+ my $xmlinstance;
-+ if ( $ENV{MOD_PERL} ) {
-+ if ( $ENV{SCRIPT_FILENAME} =~ /(.*)mlstdbnet\.pl/ ) {
-+ $xmlinstance = "$1/$instance";
-+ }
-+ } else {
-+ $xmlinstance = $instance;
-+ }
-+ if ( !-e $xmlinstance ){
-+ $xmlinstance = "/etc/mlstdbnet/$instance";
-+ }
-+ eval {
-+ $parser->parse( Source => { SystemId => $xmlinstance } );
-+ };
+@@ -130,7 +130,7 @@
+ my $script_path = "$FindBin::Bin";
+ $full_path = "$script_path/$instance";
+ } else {
+- $full_path = "$instance";
++ $full_path = "/etc/mlstdbnet/$instance";
+ }
+ eval { $parser->parse( Source => { SystemId => "$full_path" } ); };
if ($@) {
- warn $@ if $config{'debug'};
- $invalidXML = 1;
---- mlstdbnet_v2.0.0.orig/cgi-bin/curate.pl
-+++ mlstdbnet_v2.0.0/cgi-bin/curate.pl
-@@ -26,7 +26,7 @@
- #E-mail: keith.jolley at medawar.ox.ac.uk
+--- mlstdbnet_v2.0.2.orig/cgi-bin/curate.pl
++++ mlstdbnet_v2.0.2/cgi-bin/curate.pl
+@@ -37,7 +37,7 @@
+ $CGI::DISABLE_UPLOADS = 0;
###########Local configuration########################
-local ( our $configfile = '/usr/local/mlstdbnet/mlstdbnet.conf' );
+local ( our $configfile = '/etc/mlstdbnet/mlstdbnet.conf' );
#######End Local configuration########################
- use CGI;
- use DBI;
-@@ -69,7 +69,9 @@
+
+ local (
+@@ -78,7 +78,9 @@
if ( $q->param('file') =~ /^([\w\d\-_]+\.xml)$/ ) {
$instance = $1;
}
Modified: trunk/packages/mlstdbnet/trunk/debian/patches/10_preconf.patch
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/patches/10_preconf.patch 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/patches/10_preconf.patch 2009-02-06 12:45:06 UTC (rev 3087)
@@ -1,7 +1,7 @@
This patch adjust some pathes in the upstream suggestion for a
configuration file to the locations in Debian.
---- mlstdbnet_v2.0.0.orig/conf/mlstdbnet.conf
-+++ mlstdbnet_v2.0.0/conf/mlstdbnet.conf
+--- mlstdbnet_v2.0.2.orig/conf/mlstdbnet.conf
++++ mlstdbnet_v2.0.2/conf/mlstdbnet.conf
@@ -1,11 +1,11 @@
###GENERAL####
-tmp_dir=/home/httpd/pubmlst.org/tmp
@@ -45,3 +45,40 @@
-debug_timing=0
\ No newline at end of file
+debug_timing=0
+--- mlstdbnet_v2.0.2.orig/cgi-bin/mlstdbnet.pl
++++ mlstdbnet_v2.0.2/cgi-bin/mlstdbnet.pl
+@@ -40,15 +40,15 @@
+ #-----------------------------------------------
+ ##!/usr/bin/perl
+ #
+-#use lib "/var/www/perl/mlstdbnet/lib";
+-#use lib "/var/www/perl/mlstdbnet/Plugins";
++use lib "/usr/share/perl5/mlstdbnet/lib";
++use lib "/usr/share/perl5/mlstdbnet/Plugins";
+ #1;
+ #-----------------------------------------------
+ #substitute real paths of the lib and Plugins directory
+
+-use FindBin;
+-use lib ( ("$FindBin::Bin/lib") =~ /^(.*)$/ ); #untaint lib directory
+-use lib ( ("$FindBin::Bin/Plugins") =~ /^(.*)$/ );
++# use FindBin;
++# use lib ( ("$FindBin::Bin/lib") =~ /^(.*)$/ ); #untaint lib directory
++# use lib ( ("$FindBin::Bin/Plugins") =~ /^(.*)$/ );
+ use Parser;
+ use Utils;
+ use Plugins;
+--- mlstdbnet_v2.0.2.orig/cgi-bin/curate.pl
++++ mlstdbnet_v2.0.2/cgi-bin/curate.pl
+@@ -26,8 +26,9 @@
+ use XML::Parser::PerlSAX;
+ use Bio::SeqIO;
+ use strict;
+-use FindBin;
+-use lib ( ("$FindBin::Bin/lib") =~ /^(.*)$/ ); #untaint lib directory
++# use FindBin;
++# use lib ( ("$FindBin::Bin/lib") =~ /^(.*)$/ ); #untaint lib directory
++use lib ( '/usr/share/perl5/mlstdbnet/lib' ) ;
+ use Parser;
+ use Utils;
+ use Sql;
Modified: trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/patches/13_ident_authentication.patch 2009-02-06 12:45:06 UTC (rev 3087)
@@ -4,19 +4,19 @@
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'.
---- mlstdbnet_v2.0.0.orig/cgi-bin/curate.pl
-+++ mlstdbnet_v2.0.0/cgi-bin/curate.pl
-@@ -133,10 +133,19 @@
+--- mlstdbnet_v2.0.2.orig/cgi-bin/curate.pl
++++ mlstdbnet_v2.0.2/cgi-bin/curate.pl
+@@ -167,17 +167,35 @@
}
- sub dbconnect {
+ sub db_connect {
- $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:database=$system{'longcode'};port=$system{'port'}",
-+ '', '', { AutoCommit => 0 }
++ '', '', { AutoCommit => 0 }
+ );
+ } else {
+ $db = DBI->connect(
@@ -25,12 +25,30 @@
- );
+ );
+ }
- }
-
- sub dbdisconnect {
-@@ -3634,12 +3643,20 @@
- sub maintableReference {
- my ($fieldname,$pmid,$td)=@_;
+ if ( !$profiledb && !$system{'nomlst'} ) {
+- $dbp = DBI->connect(
++ # On Debian GNU/Linux we use ident authentication if host=localhost which
++ # needs and empty string for user and password ...
++ if ( $system{'profiles_host'} =~ /^localhost$/ ) {
++ $dbp = DBI->connect(
++ "DBI:Pg:database=$system{'dbprof'};port=$system{'profiles_port'}",
++ '', '', { AutoCommit => 0 }
++ );
++ } else {
++ $dbp = DBI->connect(
+ "DBI:Pg:host=$system{'profiles_host'};port=$system{'profiles_port'};dbname=$system{'dbprof'}",
+ "$system{'profiles_user'}",
+ "$system{'profiles_pass'}",
+ { AutoCommit => 0 }
+- );
++ );
++ }
+ $dbp->do("SET session CHARACTERISTICS AS TRANSACTION READ ONLY");
+ $dbp->commit();
+ }
+@@ -3963,10 +3981,18 @@
+ sub print_main_table_reference {
+ my ( $fieldname, $pmid, $td ) = @_;
if ( $config{'reference'} ) {
- my $dbr = DBI->connect(
+ my $dbr;
@@ -42,18 +60,16 @@
+ } else {
+ $dbr = DBI->connect(
"DBI:Pg:host=$system{'host'};port=$system{'port'};dbname=$config{'refdb'}",
- "$system{'user'}",
- "$system{'pass'}",
- { AutoCommit => 0 }
+ "$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 @@
+ my $sqlr =
+ $dbr->prepare(
+--- mlstdbnet_v2.0.2.orig/cgi-bin/mlstdbnet.pl
++++ mlstdbnet_v2.0.2/cgi-bin/mlstdbnet.pl
+@@ -386,19 +386,35 @@
##################DATABASE CONNECTION########################
sub db_connect {
Modified: trunk/packages/mlstdbnet/trunk/debian/patches/series
===================================================================
--- trunk/packages/mlstdbnet/trunk/debian/patches/series 2009-02-05 18:26:38 UTC (rev 3086)
+++ trunk/packages/mlstdbnet/trunk/debian/patches/series 2009-02-06 12:45:06 UTC (rev 3087)
@@ -1,4 +1,3 @@
10_preconf.patch
10_config_location.patch
13_ident_authentication.patch
-20_curate_sql_fixes.patch
More information about the debian-med-commit
mailing list