Title: [123228] trunk/Websites/bugs.webkit.org
Revision
123228
Author
[email protected]
Date
2012-07-20 10:35:33 -0700 (Fri, 20 Jul 2012)

Log Message

Port bugs.webkit.org to mod_perl for new hardware.

Reviewed by David Kilzer.

Modified Paths

Diff

Modified: trunk/Websites/bugs.webkit.org/Bugzilla/User.pm (123227 => 123228)


--- trunk/Websites/bugs.webkit.org/Bugzilla/User.pm	2012-07-20 17:29:23 UTC (rev 123227)
+++ trunk/Websites/bugs.webkit.org/Bugzilla/User.pm	2012-07-20 17:35:33 UTC (rev 123228)
@@ -582,7 +582,13 @@
 sub can_see_bug {
     my ($self, $bugid) = @_;
     my $dbh = Bugzilla->dbh;
-    my $sth  = $self->{sthCanSeeBug};
+
+    #if WEBKIT_CHANGES
+    # FIXME: disable memoization since it results in stale handle
+    my $sth;
+    #my $sth  = $self->{sthCanSeeBug};
+    #endif WEBKIT_CHANGES 
+
     my $userid  = $self->id;
     # Get fields from bug, presence of user on cclist, and determine if
     # the user is missing any groups required by the bug. The prepared query
@@ -610,7 +616,12 @@
     my ($ready, $reporter, $owner, $qacontact, $reporter_access, $cclist_access,
         $isoncclist, $missinggroup) = $sth->fetchrow_array();
     $sth->finish;
-    $self->{sthCanSeeBug} = $sth;
+
+    #if WEBKIT_CHANGES
+    # FIXME: disable memoization since it results in stale handle
+    #$self->{sthCanSeeBug} = $sth;
+    #endif WEBKIT_CHANGES 
+
     return ($ready
             && ((($reporter == $userid) && $reporter_access)
                 || (Bugzilla->params->{'useqacontact'} 

Modified: trunk/Websites/bugs.webkit.org/attachment.cgi (123227 => 123228)


--- trunk/Websites/bugs.webkit.org/attachment.cgi	2012-07-20 17:29:23 UTC (rev 123227)
+++ trunk/Websites/bugs.webkit.org/attachment.cgi	2012-07-20 17:35:33 UTC (rev 123228)
@@ -53,7 +53,8 @@
 use Bugzilla::Keyword;
 
 #if WEBKIT_CHANGES
-use IPC::Open2;
+use Apache2::SubProcess ();
+use Apache2::RequestUtil ();
 #endif // WEBKIT_CHANGES
 
 # For most scripts we don't make $cgi and $template global variables. But
@@ -392,16 +393,16 @@
     print $cgi->header(-type => 'text/html',
                        -expires => '+3M');
 
-    my $orig_path = $ENV{'PATH'};
-    $ENV{'PATH'} = "/opt/local/bin:" . $ENV{'PATH'};
-    open2(\*OUT, \*IN, "/usr/bin/ruby", "-I", "PrettyPatch", "PrettyPatch/prettify.rb", "--html-exceptions");
-    $ENV{'PATH'} = $orig_path;
-    print IN $attachment->data;
-    close(IN);
-    while (<OUT>) {
+    my @prettyargs = ("-I", "/var/www/html/PrettyPatch", "/var/www/html/PrettyPatch/prettify.rb", "--html-exceptions");
+    my $r = Apache2::RequestUtil->request;
+    my ($in, $out, $err) = $r->spawn_proc_prog("/usr/bin/ruby", \@prettyargs);
+    print $in $attachment->data;
+    close($in);
+    while (<$out>) {
         print;
     }
-    close(OUT);
+    close($out);
+    close($err);
 }
 #endif // WEBKIT_CHANGES
 

Modified: trunk/Websites/bugs.webkit.org/checksetup.pl (123227 => 123228)


--- trunk/Websites/bugs.webkit.org/checksetup.pl	2012-07-20 17:29:23 UTC (rev 123227)
+++ trunk/Websites/bugs.webkit.org/checksetup.pl	2012-07-20 17:35:33 UTC (rev 123228)
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl -w
+#!/bin/env perl
 # -*- Mode: perl; indent-tabs-mode: nil -*-
 #
 # The contents of this file are subject to the Mozilla Public

Modified: trunk/Websites/bugs.webkit.org/data/params (123227 => 123228)


--- trunk/Websites/bugs.webkit.org/data/params	2012-07-20 17:29:23 UTC (rev 123227)
+++ trunk/Websites/bugs.webkit.org/data/params	2012-07-20 17:35:33 UTC (rev 123228)
@@ -34,8 +34,8 @@
            'createemailregexp' => '.*',
            'cvsroot' => '',
            'cvsroot_get' => '',
-           'defaultopsys' => 'Mac OS X 10.5',
-           'defaultplatform' => '',
+           'defaultopsys' => 'Unspecified',
+           'defaultplatform' => 'Unspecified',
            'defaultpriority' => 'P2',
            'defaultquery' => 'bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&order=Importance&long_desc_type=substring',
            'defaultseverity' => 'Normal',
@@ -51,7 +51,7 @@
            'loginnetmask' => '0',
            'lxr_root' => '',
            'lxr_url' => '',
-           'mail_delivery_method' => 'Sendmail',
+           'mail_delivery_method' => 'SMTP',
            'mailfrom' => '[email protected]',
            'maintainer' => '[email protected]',
            'makeproductgroups' => 0,
@@ -87,7 +87,7 @@
            'smtp_debug' => 0,
            'smtp_password' => '',
            'smtp_username' => '',
-           'smtpserver' => 'localhost',
+           'smtpserver' => 'bz.apple.com',
            'specific_search_allow_empty_words' => 0,
            'ssl' => 'always',
            'sslbase' => 'https://bugs.webkit.org/',
@@ -97,7 +97,7 @@
            'timezone' => 'PST',
            'upgrade_notification' => 'latest_stable_release',
            'urlbase' => 'https://bugs.webkit.org/',
-           'usebugaliases' => '0',
+           'usebugaliases' => '1',
            'useclassification' => 0,
            'useentrygroupdefault' => 0,
            'usemenuforusers' => '0',

Modified: trunk/Websites/bugs.webkit.org/mod_perl.pl (123227 => 123228)


--- trunk/Websites/bugs.webkit.org/mod_perl.pl	2012-07-20 17:29:23 UTC (rev 123227)
+++ trunk/Websites/bugs.webkit.org/mod_perl.pl	2012-07-20 17:35:33 UTC (rev 123228)
@@ -15,6 +15,7 @@
 #
 # Contributor(s): Max Kanat-Alexander <[email protected]>
 
+use lib qw(/var/www/html);
 package Bugzilla::ModPerl;
 
 use strict;
@@ -47,9 +48,12 @@
 # For PerlChildInitHandler
 eval { require Math::Random::Secure };
 
+#if WEBKIT_CHANGES
 # This means that every httpd child will die after processing
-# a CGI if it is taking up more than 70MB of RAM all by itself.
-$Apache2::SizeLimit::MAX_UNSHARED_SIZE = 70000;
+# a CGI if it is taking up more than 700MB of RAM all by itself.
+# our children are normally about 400MB 
+$Apache2::SizeLimit::MAX_UNSHARED_SIZE = 700000;
+#endif // WEBKIT_CHANGES
 
 my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'};
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to