--- bugzilla-2.22/Bugzilla/Config.pm 2006-04-23 05:45:09.000000000 +0300 +++ ./Config.pm 2006-04-24 02:50:00.901038343 +0300 @@ -52,7 +52,7 @@ # some point. # constant paths -our $libpath = '.'; +our $libpath = '/usr/share/bugzilla'; our $templatedir = "$libpath/template"; # variable paths @@ -64,8 +64,8 @@ $localconfig = "$libpath/localconfig.$project"; $datadir = "$libpath/data/$project"; } else { - $localconfig = "$libpath/localconfig"; - $datadir = "$libpath/data"; + $localconfig = "/etc/webapps/bugzilla/localconfig.pl"; + $datadir = "/var/lib/bugzilla/data"; } our $attachdir = "$datadir/attachments"; our $webdotdir = "$datadir/webdot"; @@ -147,7 +147,7 @@ my %params; # Load in the param definitions -foreach my $item ((glob "$libpath/Bugzilla/Config/*.pm")) { +foreach my $item ((glob "/usr/share/perl5/vendor_perl/Bugzilla/Config/*.pm")) { $item =~ m#/([^/]+)\.pm$#; my $module = $1; next if ($module eq 'Common'); --- ./checksetup.pl 2006-04-24 22:03:58.576110738 +0300 +++ ./checksetup.pl 2006-04-24 22:09:50.783963305 +0300 @@ -596,7 +596,7 @@ my $webservergroup_default; if ($^O !~ /MSWin32/i) { - $webservergroup_default = 'apache'; + $webservergroup_default = 'http'; } else { $webservergroup_default = ''; } @@ -872,10 +872,10 @@ # a Bugzilla with the old data format, and upgrade their data files. # NB - the graphs dir isn't movable yet, unlike the datadir -unless (-d 'graphs') { +unless (-d '/var/lib/bugzilla/graphs') { print "Creating graphs directory...\n"; # permissions for non-webservergroup are fixed later on - mkdir 'graphs', 0770; + mkdir '/var/lib/bugzilla/graphs', 0770; # Upgrade data format foreach my $in_file (glob("$datadir/mining/*")) { @@ -965,13 +965,6 @@ mkdir "skins/custom", 0700; } -if (!-e "skins/.cvsignore") { - open CVSIGNORE, '>>', "skins/.cvsignore"; - print CVSIGNORE ".cvsignore\n"; - print CVSIGNORE "custom\n"; - close CVSIGNORE; -} - # Create custom stylesheets for each standard stylesheet. foreach my $standard () { my $custom = $standard; @@ -1368,8 +1361,6 @@ # chown needs to be called with a valid uid, not 0. $< returns the # caller's uid. Maybe there should be a $bugzillauid, and call # with that userid. - fixPerms('.htaccess', $<, $webservergid, 027); # glob('*') doesn't catch dotfiles - fixPerms("$datadir/.htaccess", $<, $webservergid, 027); fixPerms("$datadir/duplicates", $<, $webservergid, 027, 1); fixPerms("$datadir/mining", $<, $webservergid, 027, 1); fixPerms("$datadir/template", $<, $webservergid, 007, 1); # webserver will write to these @@ -1377,21 +1368,11 @@ fixPerms($webdotdir, $<, $webservergid, 007, 1); fixPerms("$webdotdir/.htaccess", $<, $webservergid, 027); fixPerms("$datadir/params", $<, $webservergid, 017); - fixPerms('*', $<, $webservergid, 027); - fixPerms('Bugzilla', $<, $webservergid, 027, 1); - fixPerms($templatedir, $<, $webservergid, 027, 1); - fixPerms('images', $<, $webservergid, 027, 1); - fixPerms('css', $<, $webservergid, 027, 1); - fixPerms('skins', $<, $webservergid, 027, 1); - fixPerms('js', $<, $webservergid, 027, 1); - chmod 0644, 'globals.pl'; # Don't use fixPerms here, because it won't change perms # on the directory unless it's using recursion - chown $<, $webservergid, $datadir; - chmod 0771, $datadir; - chown $<, $webservergid, 'graphs'; - chmod 0770, 'graphs'; + chown $<, $webservergid, '/var/lib/bugzilla/graphs'; + chmod 0770, '/var/lib/bugzilla/graphs'; } else { # get current gid from $( list my $gid = (split " ", $()[0]; @@ -1416,8 +1397,8 @@ # on the directory unless it's using recursion chown $<, $gid, $datadir; chmod 0777, $datadir; - chown $<, $gid, 'graphs'; - chmod 01777, 'graphs'; + chown $<, $gid, '/var/lib/bugzilla/graphs'; + chmod 01777, '/var/lib/bugzilla/graphs'; } } --- a/collectstats.pl 2005-01-21 08:57:30.975582527 +0200 +++ a/collectstats.pl 2006-04-24 23:04:25.847159729 +0300 @@ -48,7 +48,7 @@ if (chdir("graphs")) { unlink <./*.gif>; unlink <./*.png>; - chdir(".."); + chdir("/usr/share/bugzilla"); } GetVersionTable(); @@ -96,8 +96,8 @@ trick_taint($perl); # Generate a static RDF file containing the default view of the duplicates data. - open(CGI, "$perl -T duplicates.cgi |") - || die "can't fork duplicates.cgi: $!"; + open(CGI, "$perl -T htdocs/duplicates.cgi |") + || die "can't fork htdocs/duplicates.cgi: $!"; open(RDF, ">$datadir/duplicates.tmp") || die "can't write to $datadir/duplicates.tmp: $!"; my $headers_done = 0; --- ./checksetup.pl 2006-04-24 22:03:58.576110738 +0300 +++ ./checksetup.pl 2006-04-24 22:09:50.783963305 +0300 @@ -659,7 +659,7 @@ # blocks.) # If this is set to 1, Bugzilla will create these files if they don't exist. # If this is set to 0, Bugzilla will not create these files. -$create_htaccess = 1; +$create_htaccess = 0; END my $webservergroup_default;