~ubuntu-branches/ubuntu/gutsy/bugzilla/gutsy-security

« back to all changes in this revision

Viewing changes to patch-200707.diff

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine, Alexis Sukrieh, Francesco P. Lovergine
  • Date: 2004-12-07 22:54:45 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041207225445-ezb3nym06pow9mng
Tags: 2.16.7-0.2
* NMU 0-days due to serious/important bug solving which prevents
  bugzilla entering testing.

[ Alexis Sukrieh ]

* Post-inst won't fail anymore when no MySQL server is
  available. Added an automatic way of setting up the MySQL server if
  /etc/mysql/debian.cnf exists, will read values from it then.
  (closes: #250638)
* Using a MySQL user with '-' inside its name won't fail anymore.
  (closes unreported bug)
* Better handling on DBI connection errors. When DBI complains about
  something, user is not confused anymore by ugly error messages.
  (closes: #154249)
* Running checksetup.pl by hand won't break the Bugzilla's installation
  anymore. User can use it as he want without running dpkg-reconfigure.
  (closes: #200707)

[ Francesco P. Lovergine ]

* Now rules removes .cvsignore file which trashes /usr/share/bugzilla/template.
* Added virtual package httpd to the list of web server.
  (closes: #213784)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- checksetup.pl       2004-10-26 15:58:12.000000000 +0200
 
2
+++ checksetup.pl       2004-12-02 10:40:13.000000000 +0100
 
3
@@ -153,6 +153,18 @@
 
4
   @A <=> @B;
 
5
 }
 
6
 
 
7
+# the Debian way of fixing permissions
 
8
+# Comes from bugzilla.postinst.
 
9
+sub fix_www_data_perm {
 
10
+       my $path = shift;
 
11
+       system(qq{chown -R www-data.www-data $path}) == 0
 
12
+               or die "Can't fix owner of files under $path : $!";
 
13
+       system(qq{find $path -type f -print0 | xargs -0 chmod 644}) == 0
 
14
+               or die "Can't fix $path/* files perm : $!";
 
15
+       system(qq{find $path -type d -print0 | xargs -0 chmod 755}) == 0
 
16
+               or die "Can't fix $path/* dirs perm : $!";
 
17
+}
 
18
+
 
19
 =cut
 
20
 # This was originally clipped from the libnet Makefile.PL, adapted here to
 
21
 # use the above vers_cmp routine for accurate version checking.
 
22
@@ -3034,5 +3046,13 @@
 
23
 #
 
24
 # Final checks...
 
25
 
 
26
+# Now fixing the right permissions ala bugzilla.postinst.
 
27
+# Doing this here is better : it will allow user to run 
 
28
+# checksetup.pl by hand without breaking bugzilla.
 
29
+# (closes #200707)
 
30
+print "Fixing permissions for www-data...\n";
 
31
+fix_www_data_perm('/var/lib/bugzilla');   #this should be done by checksetup.pl
 
32
+fix_www_data_perm('/var/cache/bugzilla'); #but I dislike the way this is done.
 
33
+
 
34
 unlink "$var_dir/data/versioncache";
 
35
 
 
36
--- debian/bugzilla.postinst    2004-12-02 10:54:52.000000000 +0100
 
37
+++ debian/bugzilla.postinst    2004-12-02 10:40:21.000000000 +0100
 
38
@@ -66,8 +66,6 @@
 
39
 system ($temp) / 256 == 0
 
40
        or die "Problem with debhelper scripts: $!";
 
41
 
 
42
-fix_www_data_perm('/var/lib/bugzilla');   #this should be done by checksetup.pl
 
43
-fix_www_data_perm('/var/cache/bugzilla'); #but I dislike the way this is done.
 
44
 
 
45
 exit 0;
 
46
 
 
47
@@ -98,15 +96,6 @@
 
48
                or die "Can't change the owner of /etc/bugzilla/localconfig"; 
 
49
 }
 
50
 
 
51
-sub fix_www_data_perm {
 
52
-       my $path = shift;
 
53
-       system(qq{chown -R www-data.www-data $path}) == 0
 
54
-               or die "Can't fix owner of files under $path : $!";
 
55
-       system(qq{find $path -type f -print0 | xargs -0 chmod 644}) == 0
 
56
-               or die "Can't fix $path/* files perm : $!";
 
57
-       system(qq{find $path -type d -print0 | xargs -0 chmod 755}) == 0
 
58
-               or die "Can't fix $path/* dirs perm : $!";
 
59
-}
 
60
 
 
61
 sub create_database {
 
62
        my @databases = $dbh->func('_ListDBs');