SOURCES: bugzilla-pld.patch (NEW) - PLD FHS setup, combines -chdir...

glen glen at pld-linux.org
Mon Apr 24 20:51:57 CEST 2006


Author: glen                         Date: Mon Apr 24 18:51:57 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- PLD FHS setup, combines -chdir and -httpd_user patches

---- Files affected:
SOURCES:
   bugzilla-pld.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/bugzilla-pld.patch
diff -u /dev/null SOURCES/bugzilla-pld.patch:1.1
--- /dev/null	Mon Apr 24 20:51:57 2006
+++ SOURCES/bugzilla-pld.patch	Mon Apr 24 20:51:52 2006
@@ -0,0 +1,124 @@
+--- bugzilla-2.22/Bugzilla/Config.pm	2006-04-23 05:45:09.000000000 +0300
++++ /home/glen/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');
+--- bugzilla-2.18rc2/checksetup.pl	2004-09-14 18:05:38.062918336 +0200
++++ bugzilla-2.22/checksetup.pl	2006-04-24 21:50:03.587496933 +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 (<skins/standard/*.css>) {
+     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,15 @@
+         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 +1401,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~	2004-11-28 19:12:51.000000000 +0200
++++ a/collectstats.pl	2005-01-21 08:57:30.975582527 +0200
+@@ -48,7 +48,7 @@
+ if (chdir("graphs")) {
+     unlink <./*.gif>;
+     unlink <./*.png>;
+-    chdir("..");
++    chdir("/usr/share/bugzilla");
+ }
+ 
+ GetVersionTable();
================================================================


More information about the pld-cvs-commit mailing list