[Pkg-bugzilla-commits] r101 - trunk/bugzilla-2.18/debian/patches

Alexis Sukrieh sukria-guest@costa.debian.org
Sun, 12 Jun 2005 11:55:32 +0000


Author: sukria-guest
Date: 2005-06-12 11:55:32 +0000 (Sun, 12 Jun 2005)
New Revision: 101

Modified:
   trunk/bugzilla-2.18/debian/patches/07_virtualhosting.dpatch
Log:
Adding X_BUGZILLA_WEBPATH to Bugzilla::Config.pm

Modified: trunk/bugzilla-2.18/debian/patches/07_virtualhosting.dpatch
===================================================================
--- trunk/bugzilla-2.18/debian/patches/07_virtualhosting.dpatch	2005-06-11 13:36:19 UTC (rev 100)
+++ trunk/bugzilla-2.18/debian/patches/07_virtualhosting.dpatch	2005-06-12 11:55:32 UTC (rev 101)
@@ -5,14 +5,13 @@
 ## DP: support for multi-site installs (/etc/bugzilla-$X_BUGZILLA_SITE, web/data-$X_BUGZILLA_SITE)
 
 @DPATCH@
-diff -urNad work/Bugzilla/Config.pm /tmp/dpep.C1F6Jf/work/Bugzilla/Config.pm
---- work/Bugzilla/Config.pm     2005-05-19 17:35:17.000000000 +0200
-+++ /tmp/dpep.C1F6Jf/work/Bugzilla/Config.pm    2005-05-19
-17:35:44.000000000 +0200
-@@ -51,12 +51,25 @@
+diff -urNad bugzilla-2.18/Bugzilla/Config.pm /tmp/dpep.QhKyVX/bugzilla-2.18/Bugzilla/Config.pm
+--- bugzilla-2.18/Bugzilla/Config.pm	2005-06-12 13:46:44.000000000 +0200
++++ /tmp/dpep.QhKyVX/bugzilla-2.18/Bugzilla/Config.pm	2005-06-12 13:49:40.000000000 +0200
+@@ -51,12 +51,27 @@
  # graphs (since the path will be wrong in the HTML). This will be fixed at
  # some point.
-
+ 
 +# support for multi-site installation through X_BUGZILLA_SITE variable to
 +# be passed by Apache.
 +our $xsite = '';
@@ -26,6 +25,8 @@
 +    }
 +}
 +
++
++
  our $libpath = '/usr/share/bugzilla';
 -our $localconfig = "/etc/bugzilla/localconfig";
 -our $datadir = "/var/lib/bugzilla";
@@ -36,6 +37,31 @@
  our $webdotdir = "$datadir/webdot";
 -our $params_file = "/etc/bugzilla/params";
 +our $params_file = "/etc/bugzilla${xsite}/params";
-
+ 
  # Module stuff
  @Bugzilla::Config::EXPORT = qw(Param);
+@@ -85,7 +100,13 @@
+ use vars qw(@param_list);
+ 
+ # This is for Debian compat, in order to be able to use [% webpath %] in templates.
+-our $WEBPATH = "/bugzilla/";
++our $WEBPATH;
++
++# For providing a simple way to install several virtual hosts of the same
++# package, we use also here an Apache environment variable for specifing
++# the webpath. This will give a nice way to customize several VirtualHosts.
++$WEBPATH = $ENV{'X_BUGZILLA_WEBPATH'} if defined $ENV{'X_BUGZILLA_WEBPATH'};
++$WEBPATH = "/bugzilla/" if (not defined $WEBPATH);
+ 
+ # Data::Dumper is required as needed, below. The problem is that then when
+ # the code locally sets $Data::Dumper::Foo, this triggers 'used only once'
+@@ -104,6 +125,9 @@
+ # XXX - mod_perl - need to register Apache init handler for params
+ sub _load_datafiles {
+     # read in localconfig variables
++    unless (-f $localconfig ) {
++	    die "$localconfig is not here";
++    }
+     do $localconfig;
+ 
+     if (-e $params_file) {