socialtext-commits Mailing List for Socialtext Open wiki (Page 3)
Brought to you by:
socialtextrocks
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(187) |
Sep
(149) |
Oct
(42) |
Nov
(265) |
Dec
(144) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(208) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pet...@us...> - 2007-01-22 18:53:24
|
Revision: 958 http://svn.sourceforge.net/socialtext/?rev=958&view=rev Author: petdance Date: 2007-01-22 10:53:06 -0800 (Mon, 22 Jan 2007) Log Message: ----------- use the apache2 module directory if we are using webapi eq mod_perl2 Modified Paths: -------------- branches/rug/dev-bin/gen-config Modified: branches/rug/dev-bin/gen-config =================================================================== --- branches/rug/dev-bin/gen-config 2007-01-19 22:01:30 UTC (rev 957) +++ branches/rug/dev-bin/gen-config 2007-01-22 18:53:06 UTC (rev 958) @@ -464,6 +464,7 @@ my $confd = "$dirs{apache_base_etc}/conf.d"; my %config = standard_params( \%dirs ); + my $webapi = get_build_setting( 'webapi' ); %config = ( %config, @@ -480,7 +481,7 @@ apache_proxy_etc_dir => $dirs{apache_base_etc}, use_ssl => _use_ssl($config{nlw_server_hostname}), ), - module_dir => get_build_setting( 'apache-perl-moduledir' ), + module_dir => get_build_setting( $webapi eq 'mod_perl1' ? 'apache-perl-moduledir' : 'apache2-moduledir' ), nlw_config_file => File::Spec->catfile( $dirs{socialtext_etc}, 'socialtext.conf' ), app_prefix => $app_prefix, log_prefix => 'nlw', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 22:01:35
|
Revision: 957 http://svn.sourceforge.net/socialtext/?rev=957&view=rev Author: petdance Date: 2007-01-19 14:01:30 -0800 (Fri, 19 Jan 2007) Log Message: ----------- Done renaming apache2 to apache_proxy and apache-perl to apache_base Modified Paths: -------------- branches/rug/build/templates/apache-perl/base.tt2 branches/rug/build/templates/apache-perl/nlw.tt2 branches/rug/build/templates/apache2/base.tt2 branches/rug/build/templates/apache2/nlw.tt2 branches/rug/build/templates/shared/rewrite.tt2 branches/rug/dev-bin/gen-config Modified: branches/rug/build/templates/apache-perl/base.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/base.tt2 2007-01-19 21:53:37 UTC (rev 956) +++ branches/rug/build/templates/apache-perl/base.tt2 2007-01-19 22:01:30 UTC (rev 957) @@ -8,11 +8,11 @@ [% PROCESS 'apache-perl/modules.tt2' %] [% IF config.single %] -Listen [% config.apache2_port %] -Listen [% config.apache2_ssl_port %] +Listen [% config.apache_proxy_port %] +Listen [% config.apache_proxy_ssl_port %] [% ELSE %] -Listen [% config.apache_perl_port %] -Listen [% config.apache_perl_port + 1000 %] +Listen [% config.apache_base_port %] +Listen [% config.apache_base_port + 1000 %] [% END %] [% PROCESS 'shared/common.tt2' %] Modified: branches/rug/build/templates/apache-perl/nlw.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/nlw.tt2 2007-01-19 21:53:37 UTC (rev 956) +++ branches/rug/build/templates/apache-perl/nlw.tt2 2007-01-19 22:01:30 UTC (rev 957) @@ -249,7 +249,7 @@ [% END %] [%# REVIEW - hack to make Socialtext::Workspace->uri work in devs envs %] [% IF config.is_dev %] -PerlSetEnv NLW_FRONTEND_PORT [% config.apache2_port %] +PerlSetEnv NLW_FRONTEND_PORT [% config.apache_proxy_port %] PerlSetEnv NLW_DEV_MODE 1 [% END %] Modified: branches/rug/build/templates/apache2/base.tt2 =================================================================== --- branches/rug/build/templates/apache2/base.tt2 2007-01-19 21:53:37 UTC (rev 956) +++ branches/rug/build/templates/apache2/base.tt2 2007-01-19 22:01:30 UTC (rev 957) @@ -52,8 +52,8 @@ NameVirtualHost *:[% config.ports.http %] -Include [% config.apache2_etc_dir %]/auto-generated.d/*.conf +Include [% config.apache_proxy_etc_dir %]/auto-generated.d/*.conf [% IF !config.is_dev %] -Include [% config.apache2_etc_dir %]/conf.d/*.conf +Include [% config.apache_proxy_etc_dir %]/conf.d/*.conf [% END %] Modified: branches/rug/build/templates/apache2/nlw.tt2 =================================================================== --- branches/rug/build/templates/apache2/nlw.tt2 2007-01-19 21:53:37 UTC (rev 956) +++ branches/rug/build/templates/apache2/nlw.tt2 2007-01-19 22:01:30 UTC (rev 957) @@ -1,4 +1,4 @@ -[% MACRO server_common( apache_perl_port, for_ssl_vhost ) BLOCK %] +[% MACRO server_common( apache_base_port, for_ssl_vhost ) BLOCK %] [% IF config.is_appliance %] Include /etc/apache2/conf.d/hostname.conf [% ELSE %] @@ -43,12 +43,12 @@ ErrorDocument 502 /static/html/502.html <VirtualHost *:[% config.ports.http %]> -[% server_common( config.apache_perl_port, 0 ) %] +[% server_common( config.apache_base_port, 0 ) %] </VirtualHost> [% IF config.use_ssl %] <VirtualHost _default_:[% config.ports.https %]> - [% hi_port = config.apache_perl_port + 1000 %] + [% hi_port = config.apache_base_port + 1000 %] [% server_common( hi_port, 1 ) %] SSLEngine on SSLCertificateFile [% config.ssl_base_dir %]/certs/[% config.nlw_server_hostname %].crt Modified: branches/rug/build/templates/shared/rewrite.tt2 =================================================================== --- branches/rug/build/templates/shared/rewrite.tt2 2007-01-19 21:53:37 UTC (rev 956) +++ branches/rug/build/templates/shared/rewrite.tt2 2007-01-19 22:01:30 UTC (rev 957) @@ -93,7 +93,7 @@ RewriteRule !^/static - [C] RewriteRule !^/logos - [C] RewriteRule !^/favicon\.ico - [C] - RewriteRule (.*) http://localhost:[% apache_perl_port %]$1 [P,L] + RewriteRule (.*) http://localhost:[% apache_base_port %]$1 [P,L] [% END %] Alias /static [% config.static_dir %] Modified: branches/rug/dev-bin/gen-config =================================================================== --- branches/rug/dev-bin/gen-config 2007-01-19 21:53:37 UTC (rev 956) +++ branches/rug/dev-bin/gen-config 2007-01-19 22:01:30 UTC (rev 957) @@ -139,12 +139,12 @@ my $params = apache_proxy_params( \%dirs ); push @files, [ - 'apache2/base.tt2' => "$dirs{apache2_etc}/${app_prefix}apache2.conf", + 'apache2/base.tt2' => "$dirs{apache_proxy_etc}/${app_prefix}apache2.conf", $params, 'overwrite', ], [ - 'apache2/nlw.tt2' => "$dirs{apache2_etc}/auto-generated.d/nlw.conf", + 'apache2/nlw.tt2' => "$dirs{apache_proxy_etc}/auto-generated.d/nlw.conf", $params, 'overwrite', ]; @@ -187,7 +187,7 @@ %dirs = ( %dirs, socialtext_etc => "$dirs{etc}/socialtext", - apache2_etc => "$dirs{etc}/apache2", + apache_proxy_etc => "$dirs{etc}/apache2", apache_proxy_log => File::Spec->catfile( $root_dir, 'log', 'apache2' ), apache_proxy_root => "$dirs{etc}/apache2", apache_base_etc => "$dirs{etc}/apache-perl", @@ -209,14 +209,14 @@ sub sitewide_dirs { return ( - socialtext_etc => get_prefixed_dir('confdir'), - apache2_etc => '/etc/apache2', - apache_proxy_log => '/var/log/apache2', - apache_proxy_root => '/etc/apache2', - apache_base_etc => get_prefixed_dir('httpd_confdir'), - apache_base_log => get_prefixed_dir('httpd_logdir'), - apache_base_root => get_prefixed_dir('httpd_confdir'), - run => get_prefixed_dir('httpd_piddir'), + socialtext_etc => get_prefixed_dir('confdir'), + apache_proxy_etc => '/etc/apache2', + apache_proxy_log => '/var/log/apache2', + apache_proxy_root => '/etc/apache2', + apache_base_etc => get_prefixed_dir('httpd_confdir'), + apache_base_log => get_prefixed_dir('httpd_logdir'), + apache_base_root => get_prefixed_dir('httpd_confdir'), + run => get_prefixed_dir('httpd_piddir'), lock => get_prefixed_dir('httpd_lockdir'), root => get_prefixed_dir('webroot'), ssl_base => get_prefixed_dir('ssldir'), @@ -368,13 +368,13 @@ sub apache_proxy_params { my %dirs = %{+shift}; - my $confd = "$dirs{apache2_etc}/conf.d"; + my $confd = "$dirs{apache_proxy_etc}/conf.d"; my %config = ( standard_params( \%dirs ), base_dir => $dirs{apache_proxy_root}, log_dir => $dirs{apache_proxy_log}, lock_dir => $dirs{lock}, - apache2_etc_dir => $dirs{apache2_etc}, + apache_proxy_etc_dir => $dirs{apache_proxy_etc}, confd_exists => -d $confd, eu_httpd_exists => -f "$confd/eu-httpd.conf", eu_httpsd_exists => -f "$confd/eu-httpsd.conf", @@ -383,7 +383,7 @@ nlw_config_file => File::Spec->catfile( $dirs{socialtext_etc}, 'socialtext.conf' ), app_prefix => $app_prefix, log_prefix => 'nlw', - ports => _frontend_ports(), + ports => _proxy_ports(), nlw_server_aliases => [], apache_short_name => 'apache2', nlw_uri_is_ssl => $opts{'force-ssl-login'}, @@ -430,7 +430,7 @@ return \%config; } -sub _frontend_ports { +sub _proxy_ports { if ( $opts{ports_start_at} ) { my $port = $user->uid + $opts{ports_start_at}; return { http => $port, https => $port + 1000 }; @@ -477,7 +477,7 @@ # XXX See how this was used in the original Mason $opts{'apache-proxy'} ? () : ( - apache2_etc_dir => $dirs{apache_base_etc}, + apache_proxy_etc_dir => $dirs{apache_base_etc}, use_ssl => _use_ssl($config{nlw_server_hostname}), ), module_dir => get_build_setting( 'apache-perl-moduledir' ), @@ -497,7 +497,7 @@ apache_short_name => 'apache-perl', use_canonical_name => 'On', ); - $config{backend_port} = $single ? $config{apache2_port} : $config{apache_perl_port}; + $config{backend_port} = $single ? $config{apache_proxy_port} : $config{apache_base_port}; if ($is_appliance) { # Apache 1 pukes if you use a symlink as part of a glob, so @@ -587,10 +587,10 @@ $config{data_root_dir} = $dirs{root}; $config{ssl_base_dir} = $dirs{ssl_base}; - $config{apache2_port} = _frontend_ports()->{http}; - $config{apache2_ssl_port} = _frontend_ports()->{https}; + $config{apache_proxy_port} = _proxy_ports()->{http}; + $config{apache_proxy_ssl_port} = _proxy_ports()->{https}; - $config{apache_perl_port} = + $config{apache_base_port} = $opts{ports_start_at} ? $user->uid + $opts{ports_start_at} + 2000 : 8080; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 21:53:41
|
Revision: 956 http://svn.sourceforge.net/socialtext/?rev=956&view=rev Author: petdance Date: 2007-01-19 13:53:37 -0800 (Fri, 19 Jan 2007) Log Message: ----------- renaming Modified Paths: -------------- branches/rug/build/templates/apache-perl/base.tt2 branches/rug/dev-bin/gen-config Modified: branches/rug/build/templates/apache-perl/base.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/base.tt2 2007-01-19 21:36:15 UTC (rev 955) +++ branches/rug/build/templates/apache-perl/base.tt2 2007-01-19 21:53:37 UTC (rev 956) @@ -17,7 +17,7 @@ [% PROCESS 'shared/common.tt2' %] -Include [% config.apache_perl_etc_dir %]/auto-generated.d/*.conf +Include [% config.apache_base_etc_dir %]/auto-generated.d/*.conf [% IF !config.is_dev %] -Include [% config.apache_perl_etc_dir %]/conf.d/*.conf +Include [% config.apache_base_etc_dir %]/conf.d/*.conf [% END %] Modified: branches/rug/dev-bin/gen-config =================================================================== --- branches/rug/dev-bin/gen-config 2007-01-19 21:36:15 UTC (rev 955) +++ branches/rug/dev-bin/gen-config 2007-01-19 21:53:37 UTC (rev 956) @@ -154,12 +154,12 @@ my $params = apache_base_params( \%dirs ); push @files, [ - 'apache-perl/base.tt2' => "$dirs{apache_perl_etc}/${app_prefix}httpd.conf", + 'apache-perl/base.tt2' => "$dirs{apache_base_etc}/${app_prefix}httpd.conf", $params, 'overwrite', ], [ - 'apache-perl/nlw.tt2' => "$dirs{apache_perl_etc}/auto-generated.d/nlw.conf", + 'apache-perl/nlw.tt2' => "$dirs{apache_base_etc}/auto-generated.d/nlw.conf", $params, 'overwrite', ]; @@ -188,10 +188,10 @@ %dirs, socialtext_etc => "$dirs{etc}/socialtext", apache2_etc => "$dirs{etc}/apache2", - apache2_log => File::Spec->catfile( $root_dir, 'log', 'apache2' ), + apache_proxy_log => File::Spec->catfile( $root_dir, 'log', 'apache2' ), apache_proxy_root => "$dirs{etc}/apache2", - apache_perl_etc => "$dirs{etc}/apache-perl", - apache_perl_log => + apache_base_etc => "$dirs{etc}/apache-perl", + apache_base_log => File::Spec->catfile( $root_dir, 'log', 'apache-perl' ), apache_base_root => "$dirs{etc}/apache-perl", ssl_base => "$dirs{etc}/ssl", @@ -211,10 +211,10 @@ return ( socialtext_etc => get_prefixed_dir('confdir'), apache2_etc => '/etc/apache2', - apache2_log => '/var/log/apache2', + apache_proxy_log => '/var/log/apache2', apache_proxy_root => '/etc/apache2', - apache_perl_etc => get_prefixed_dir('httpd_confdir'), - apache_perl_log => get_prefixed_dir('httpd_logdir'), + apache_base_etc => get_prefixed_dir('httpd_confdir'), + apache_base_log => get_prefixed_dir('httpd_logdir'), apache_base_root => get_prefixed_dir('httpd_confdir'), run => get_prefixed_dir('httpd_piddir'), lock => get_prefixed_dir('httpd_lockdir'), @@ -372,7 +372,7 @@ my %config = ( standard_params( \%dirs ), base_dir => $dirs{apache_proxy_root}, - log_dir => $dirs{apache2_log}, + log_dir => $dirs{apache_proxy_log}, lock_dir => $dirs{lock}, apache2_etc_dir => $dirs{apache2_etc}, confd_exists => -d $confd, @@ -461,23 +461,23 @@ my %dirs = %{+shift}; my $single = !$opts{'apache-proxy'}; - my $confd = "$dirs{apache_perl_etc}/conf.d"; + my $confd = "$dirs{apache_base_etc}/conf.d"; my %config = standard_params( \%dirs ); %config = ( %config, base_dir => $dirs{apache_base_root}, - log_dir => $dirs{apache_perl_log}, + log_dir => $dirs{apache_base_log}, lock_dir => $dirs{lock}, - apache_perl_etc_dir => $dirs{apache_perl_etc}, + apache_base_etc_dir => $dirs{apache_base_etc}, confd_exists => -d $confd, eu_httpd_exists => -f "$confd/eu-httpd.conf", eu_httpsd_exists => -f "$confd/eu-httpsd.conf", # XXX See how this was used in the original Mason $opts{'apache-proxy'} ? () : ( - apache2_etc_dir => $dirs{apache_perl_etc}, + apache2_etc_dir => $dirs{apache_base_etc}, use_ssl => _use_ssl($config{nlw_server_hostname}), ), module_dir => get_build_setting( 'apache-perl-moduledir' ), @@ -502,7 +502,7 @@ if ($is_appliance) { # Apache 1 pukes if you use a symlink as part of a glob, so # need to give it the real directory - $config{apache_perl_etc_dir} = '/hd' . $config{apache_perl_etc_dir}; + $config{apache_base_etc_dir} = '/hd' . $config{apache_base_etc_dir}; } $config{inc} = _get_inc(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 21:36:17
|
Revision: 955 http://svn.sourceforge.net/socialtext/?rev=955&view=rev Author: petdance Date: 2007-01-19 13:36:15 -0800 (Fri, 19 Jan 2007) Log Message: ----------- More dir renaming, little by little Modified Paths: -------------- branches/rug/dev-bin/gen-config Modified: branches/rug/dev-bin/gen-config =================================================================== --- branches/rug/dev-bin/gen-config 2007-01-19 21:30:27 UTC (rev 954) +++ branches/rug/dev-bin/gen-config 2007-01-19 21:36:15 UTC (rev 955) @@ -189,11 +189,11 @@ socialtext_etc => "$dirs{etc}/socialtext", apache2_etc => "$dirs{etc}/apache2", apache2_log => File::Spec->catfile( $root_dir, 'log', 'apache2' ), - apache2_base_dir => "$dirs{etc}/apache2", + apache_proxy_root => "$dirs{etc}/apache2", apache_perl_etc => "$dirs{etc}/apache-perl", apache_perl_log => File::Spec->catfile( $root_dir, 'log', 'apache-perl' ), - apache_perl_base_dir => "$dirs{etc}/apache-perl", + apache_base_root => "$dirs{etc}/apache-perl", ssl_base => "$dirs{etc}/ssl", ); for my $dir ( keys %dirs ) { @@ -212,10 +212,10 @@ socialtext_etc => get_prefixed_dir('confdir'), apache2_etc => '/etc/apache2', apache2_log => '/var/log/apache2', - apache2_base_dir => '/etc/apache2', + apache_proxy_root => '/etc/apache2', apache_perl_etc => get_prefixed_dir('httpd_confdir'), apache_perl_log => get_prefixed_dir('httpd_logdir'), - apache_perl_base_dir => get_prefixed_dir('httpd_confdir'), + apache_base_root => get_prefixed_dir('httpd_confdir'), run => get_prefixed_dir('httpd_piddir'), lock => get_prefixed_dir('httpd_lockdir'), root => get_prefixed_dir('webroot'), @@ -371,7 +371,7 @@ my $confd = "$dirs{apache2_etc}/conf.d"; my %config = ( standard_params( \%dirs ), - base_dir => $dirs{apache2_base_dir}, + base_dir => $dirs{apache_proxy_root}, log_dir => $dirs{apache2_log}, lock_dir => $dirs{lock}, apache2_etc_dir => $dirs{apache2_etc}, @@ -467,7 +467,7 @@ %config = ( %config, - base_dir => $dirs{apache_perl_base_dir}, + base_dir => $dirs{apache_base_root}, log_dir => $dirs{apache_perl_log}, lock_dir => $dirs{lock}, apache_perl_etc_dir => $dirs{apache_perl_etc}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 21:30:39
|
Revision: 954 http://svn.sourceforge.net/socialtext/?rev=954&view=rev Author: petdance Date: 2007-01-19 13:30:27 -0800 (Fri, 19 Jan 2007) Log Message: ----------- renaming apache_perl to apache_base and apache2 to apache_proxy Modified Paths: -------------- branches/rug/dev-bin/gen-config Modified: branches/rug/dev-bin/gen-config =================================================================== --- branches/rug/dev-bin/gen-config 2007-01-19 20:47:01 UTC (rev 953) +++ branches/rug/dev-bin/gen-config 2007-01-19 21:30:27 UTC (rev 954) @@ -136,7 +136,7 @@ # whether or not to overwrite existing # ] if ( is_target_for( 'apache', 'apache2' ) ) { - my $params = apache2_params( \%dirs ); + my $params = apache_proxy_params( \%dirs ); push @files, [ 'apache2/base.tt2' => "$dirs{apache2_etc}/${app_prefix}apache2.conf", @@ -151,7 +151,7 @@ } if ( is_target_for( 'apache', 'apache-perl' ) ) { - my $params = apache_perl_params( \%dirs ); + my $params = apache_base_params( \%dirs ); push @files, [ 'apache-perl/base.tt2' => "$dirs{apache_perl_etc}/${app_prefix}httpd.conf", @@ -245,7 +245,7 @@ } $source_file ||= $output_file; - my %config = %{apache2_params( \%dirs )}; + my %config = %{apache_proxy_params( \%dirs )}; if ( $config{is_dev} ) { $config{email_errors_to} = @@ -365,7 +365,7 @@ } # while files to process } -sub apache2_params { +sub apache_proxy_params { my %dirs = %{+shift}; my $confd = "$dirs{apache2_etc}/conf.d"; @@ -457,7 +457,7 @@ } } -sub apache_perl_params { +sub apache_base_params { my %dirs = %{+shift}; my $single = !$opts{'apache-proxy'}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 20:47:18
|
Revision: 953 http://svn.sourceforge.net/socialtext/?rev=953&view=rev Author: petdance Date: 2007-01-19 12:47:01 -0800 (Fri, 19 Jan 2007) Log Message: ----------- Working on the apache2 module loading Modified Paths: -------------- branches/rug/build/templates/apache-perl/modules.tt2 Modified: branches/rug/build/templates/apache-perl/modules.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/modules.tt2 2007-01-19 02:53:01 UTC (rev 952) +++ branches/rug/build/templates/apache-perl/modules.tt2 2007-01-19 20:47:01 UTC (rev 953) @@ -12,28 +12,48 @@ sure that whether the main httpd.conf is written by us, or by an OSR user, we'll get the proper modules loaded. %] -[% load_module( 'config_log', 'log_config' ) %] -[% load_module( 'mime' ) %] -[% load_module( 'negotiation' ) %] -[% load_module( 'alias' ) %] -[% load_module( 'dir' ) %] -[% load_module( 'rewrite' ) %] -[% load_module( 'access' ) %] -[% load_module( 'auth' ) %] -[% load_module( 'expires' ) %] -[% load_module( 'headers' ) %] -[% load_module( 'setenvif' ) %] -[% IF config.ssl %] - [% load_module( 'ssl' ) %] + +[% IF config.webapi == 'mod_perl1' %] + [% load_module( 'config_log', 'log_config' ) %] + [% load_module( 'mime' ) %] + [% load_module( 'negotiation' ) %] + [% load_module( 'alias' ) %] + [% load_module( 'dir' ) %] + [% load_module( 'rewrite' ) %] + [% load_module( 'access' ) %] + [% load_module( 'auth' ) %] + [% load_module( 'expires' ) %] + [% load_module( 'headers' ) %] + [% load_module( 'setenvif' ) %] + [% IF config.ssl %] + [% load_module( 'ssl' ) %] + [% END %] + [% IF config.apache_status %] + [% load_module( 'status' ) %] + ExtendedStatus On + [% END %] + [%# XXX hopefully this will be reconciled, soon: %] + [% IF config.is_dev %] + [% load_module( 'perl' ) %] + [% ELSE %] + AddModule mod_perl.c + [% END %] [% END %] -[% IF config.apache_status %] - [% load_module( 'status' ) %] - ExtendedStatus On -[% END %] -[%# XXX hopefully this will be reconciled, soon: %] -[% IF config.is_dev %] +[% IF config.webapi == 'mod_perl2' %] + [% load_module( 'config_log', 'log_config' ) %] + [% load_module( 'mime' ) %] + [% load_module( 'negotiation' ) %] + [% load_module( 'alias' ) %] + [% load_module( 'dir' ) %] + [% load_module( 'access' ) %] + [% load_module( 'auth' ) %] + [% load_module( 'setenvif' ) %] [% load_module( 'perl' ) %] -[% ELSE %] - AddModule mod_perl.c + [% IF config.ssl %] + [% load_module( 'ssl' ) %] + [% END %] + [% IF config.apache_status %] + [% load_module( 'status' ) %] + ExtendedStatus On + [% END %] [% END %] - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 02:53:05
|
Revision: 952 http://svn.sourceforge.net/socialtext/?rev=952&view=rev Author: petdance Date: 2007-01-18 18:53:01 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Removed old mod_perl1 artifacts Modified Paths: -------------- branches/rug/build/templates/apache-perl/base.tt2 Modified: branches/rug/build/templates/apache-perl/base.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/base.tt2 2007-01-19 02:33:20 UTC (rev 951) +++ branches/rug/build/templates/apache-perl/base.tt2 2007-01-19 02:53:01 UTC (rev 952) @@ -1,16 +1,16 @@ # This is the base httpd.conf file for the backend content-generating Apache. # Load modules +[% IF config.webapi == 'mod_perl1' %] ClearModuleList AddModule mod_so.c +[% END %] [% PROCESS 'apache-perl/modules.tt2' %] - + [% IF config.single %] -Port [% config.apache2_port %] Listen [% config.apache2_port %] Listen [% config.apache2_ssl_port %] [% ELSE %] -Port [% config.apache_perl_port %] Listen [% config.apache_perl_port %] Listen [% config.apache_perl_port + 1000 %] [% END %] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 02:33:22
|
Revision: 951 http://svn.sourceforge.net/socialtext/?rev=951&view=rev Author: petdance Date: 2007-01-18 18:33:20 -0800 (Thu, 18 Jan 2007) Log Message: ----------- REbuild the httpd stuff if we choose webapi=mod_perl2 Modified Paths: -------------- branches/rug/configure Modified: branches/rug/configure =================================================================== --- branches/rug/configure 2007-01-19 01:10:43 UTC (rev 950) +++ branches/rug/configure 2007-01-19 02:33:20 UTC (rev 951) @@ -63,6 +63,18 @@ if ( !$passed{url} or ($settings{hostname}->{value} eq $default_hostname) ) { $settings{url}->{value} = "https://$settings{hostname}->{value}/"; } + + # Set HTTPD stuff based on webapi if not set explicitly + if ( $settings{webapi}->{value} eq 'mod_perl2' ) { + if ( !$passed{httpd} ) { + $settings{httpd}->{value} = which( 'apache2' ); + } + for my $parm ( qw( httpd_confdir httpd_logdir ) ) { + if ( !$passed{$parm} ) { + $settings{$parm}->{value} =~ s{apache-perl}{apache2}; + } + } + } $options{MM_ARGS} = [@ARGV] if @ARGV; $options{dev} = $passed{dev}; print_settings(); @@ -333,3 +345,10 @@ return $addr =~ /^\S+\@\S+\.\S+$/; } + +sub which { # Redundant with build/defaults.pl + my $program = shift; + my $basename = basename($program); + chomp(my $name = `which $basename`); + return $name || $program; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 01:10:44
|
Revision: 950 http://svn.sourceforge.net/socialtext/?rev=950&view=rev Author: petdance Date: 2007-01-18 17:10:43 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Starting on filling out methods Modified Paths: -------------- branches/rug/lib/Socialtext/Rug/MP2.pm Modified: branches/rug/lib/Socialtext/Rug/MP2.pm =================================================================== --- branches/rug/lib/Socialtext/Rug/MP2.pm 2007-01-19 00:43:43 UTC (rev 949) +++ branches/rug/lib/Socialtext/Rug/MP2.pm 2007-01-19 01:10:43 UTC (rev 950) @@ -1,7 +1,9 @@ package Socialtext::Rug::MP2; # @COPYRIGHT@ -# Thank goodness for http://perl.apache.org/docs/2.0/user/porting/porting.html +# Thank goodness for +# http://perl.apache.org/docs/2.0/user/porting/porting.html +# http://perl.apache.org/docs/2.0/user/porting/compat.html use strict; use warnings; @@ -21,7 +23,7 @@ my $r = shift || Apache->request(); my $self = bless { - _r => scalar Apache::Request->instance( $r, POST_MAX => MAX_UPLOAD_SIZE ) + _r => scalar Apache::RequestRec->instance( $r, POST_MAX => MAX_UPLOAD_SIZE ) }, $class; return $self; @@ -31,15 +33,20 @@ sub apache_object { $_[0]->{_r} } -sub user { shift->r->connection()->user(@_) } +sub user { + shift->r->connection()->user( @_ ); +} -sub get_config { shift->r>dir_config->get(@_) } +sub get_config { + shift->r>dir_config->get( @_ ); +} sub send_http_header { - my $self = shift; - my $type = shift; + shift->r->content_type( @_ ); +} - $self->r->content_type( $type ); +sub log_error { + shift->r->log_error( @_ ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 00:43:45
|
Revision: 949 http://svn.sourceforge.net/socialtext/?rev=949&view=rev Author: petdance Date: 2007-01-18 16:43:43 -0800 (Thu, 18 Jan 2007) Log Message: ----------- More wrapping of Apache/Apache2 conditionals, and removed Apache::Registry Modified Paths: -------------- branches/rug/build/templates/apache-perl/nlw.tt2 Modified: branches/rug/build/templates/apache-perl/nlw.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/nlw.tt2 2007-01-19 00:33:40 UTC (rev 948) +++ branches/rug/build/templates/apache-perl/nlw.tt2 2007-01-19 00:43:43 UTC (rev 949) @@ -30,7 +30,8 @@ PerlSetVar ReloadModules "Socialtext::WebApp Socialtext::WebApp::* Socialtext::* Socialtext::MasonHandler Socialtext::Handler Socialtext::Handler::* Socialtext::RequestContext" [% IF config.webapi == 'mod_perl1' %] PerlInitHandler +Apache::Reload - [% ELSE %] + [% END %] + [% IF config.webapi == 'mod_perl2' %] PerlInitHandler +Apache2::Reload [% END %] [% END %] @@ -48,7 +49,12 @@ eval { require B::TerseSize }; </Perl> SetHandler perl-script - PerlHandler +Apache::Status + [% IF config.webapi == 'mod_perl1' %] + PerlHandler +Apache::Status + [% END %] + [% IF config.webapi == 'mod_perl2' %] + PerlHandler +Apache2::Status + [% END %] PerlSetVar StatusOptionsAll On PerlSetVar StatusTerseSizeMainSummary On Order Deny,Allow @@ -256,7 +262,6 @@ PerlModule Socialtext::Handler::App PerlModule Socialtext::Handler::NoWorkspace PerlModule Socialtext::Handler::Syndicate -PerlModule Apache::Registry [% IF config.webapi == 'mod_perl1' %] PerlModule Socialtext::Rug::MP1 [% END %] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-19 00:33:44
|
Revision: 948 http://svn.sourceforge.net/socialtext/?rev=948&view=rev Author: petdance Date: 2007-01-18 16:33:40 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Starting on MP2 rug Modified Paths: -------------- branches/rug/build/deps/mod_perl2.yaml branches/rug/build/templates/apache-perl/nlw.tt2 Added Paths: ----------- branches/rug/lib/Socialtext/Rug/MP2.pm Modified: branches/rug/build/deps/mod_perl2.yaml =================================================================== --- branches/rug/build/deps/mod_perl2.yaml 2007-01-18 23:55:50 UTC (rev 947) +++ branches/rug/build/deps/mod_perl2.yaml 2007-01-19 00:33:40 UTC (rev 948) @@ -10,4 +10,5 @@ # will make people upgrade modules that they don't need to. --- mod_perl2: 2.0 # Not used, but force a version number -MasonX::WebApp: 0.12 # First version compatible with mod_perl2 +#MasonX::WebApp: 0.12 # First version compatible with mod_perl2 +MasonX::WebApp: 0.1101 # My faked-up version until Dave releases his Modified: branches/rug/build/templates/apache-perl/nlw.tt2 =================================================================== --- branches/rug/build/templates/apache-perl/nlw.tt2 2007-01-18 23:55:50 UTC (rev 947) +++ branches/rug/build/templates/apache-perl/nlw.tt2 2007-01-19 00:33:40 UTC (rev 948) @@ -28,7 +28,11 @@ [% IF config.is_dev %] PerlSetVar ReloadAll Off PerlSetVar ReloadModules "Socialtext::WebApp Socialtext::WebApp::* Socialtext::* Socialtext::MasonHandler Socialtext::Handler Socialtext::Handler::* Socialtext::RequestContext" - PerlInitHandler +Apache::Reload + [% IF config.webapi == 'mod_perl1' %] + PerlInitHandler +Apache::Reload + [% ELSE %] + PerlInitHandler +Apache2::Reload + [% END %] [% END %] [% IF config.apache_status %] Added: branches/rug/lib/Socialtext/Rug/MP2.pm =================================================================== --- branches/rug/lib/Socialtext/Rug/MP2.pm (rev 0) +++ branches/rug/lib/Socialtext/Rug/MP2.pm 2007-01-19 00:33:40 UTC (rev 948) @@ -0,0 +1,48 @@ +package Socialtext::Rug::MP2; +# @COPYRIGHT@ + +# Thank goodness for http://perl.apache.org/docs/2.0/user/porting/porting.html + +use strict; +use warnings; + +use mod_perl 2.0; + +use Apache2::URI (); +use Apache2::RequestUtil (); + +use base 'Apache2::RequestRec'; + +use constant MAX_UPLOAD_SIZE => 100 * 1024 * 1024; + +sub _new { + die 'Apache2::compat is loaded, and should not be' if $INC{'Apache2/compat.pm'}; + my $class = shift; + my $r = shift || Apache->request(); + + my $self = bless { + _r => scalar Apache::Request->instance( $r, POST_MAX => MAX_UPLOAD_SIZE ) + }, $class; + + return $self; +} + +sub r { $_[0]->{_r} } + +sub apache_object { $_[0]->{_r} } + +sub user { shift->r->connection()->user(@_) } + +sub get_config { shift->r>dir_config->get(@_) } + +sub send_http_header { + my $self = shift; + my $type = shift; + + $self->r->content_type( $type ); +} + + +1; + +__END__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 23:55:53
|
Revision: 947 http://svn.sourceforge.net/socialtext/?rev=947&view=rev Author: petdance Date: 2007-01-18 15:55:50 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Split out the MasonX::WebApp requirements by mod_perl version, since they are different for 1 vs. 2 Modified Paths: -------------- branches/rug/build/deps/base.yaml branches/rug/build/deps/mod_perl1.yaml branches/rug/build/deps/mod_perl2.yaml Modified: branches/rug/build/deps/base.yaml =================================================================== --- branches/rug/build/deps/base.yaml 2007-01-18 22:07:30 UTC (rev 946) +++ branches/rug/build/deps/base.yaml 2007-01-18 23:55:50 UTC (rev 947) @@ -82,7 +82,6 @@ List::Util: 1.18 Log::Dispatch: 2.10 LWP::UserAgent: 2.033 -MasonX::WebApp: 0 MIME::Types: 1.15 MLDBM: 2.01 Params::Validate: 0.79 Modified: branches/rug/build/deps/mod_perl1.yaml =================================================================== --- branches/rug/build/deps/mod_perl1.yaml 2007-01-18 22:07:30 UTC (rev 946) +++ branches/rug/build/deps/mod_perl1.yaml 2007-01-18 23:55:50 UTC (rev 947) @@ -15,3 +15,4 @@ Apache::Session::Wrapper: 0.31 Apache::URI: 1.00 mod_perl: 1.29 # Not used, but force a version number +MasonX::WebApp: 0 Modified: branches/rug/build/deps/mod_perl2.yaml =================================================================== --- branches/rug/build/deps/mod_perl2.yaml 2007-01-18 22:07:30 UTC (rev 946) +++ branches/rug/build/deps/mod_perl2.yaml 2007-01-18 23:55:50 UTC (rev 947) @@ -10,3 +10,4 @@ # will make people upgrade modules that they don't need to. --- mod_perl2: 2.0 # Not used, but force a version number +MasonX::WebApp: 0.12 # First version compatible with mod_perl2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 22:07:31
|
Revision: 946 http://svn.sourceforge.net/socialtext/?rev=946&view=rev Author: petdance Date: 2007-01-18 14:07:30 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Fixed how we load MasonX::WebApp Modified Paths: -------------- branches/rug/configure branches/rug/dev-bin/list-module-deps Modified: branches/rug/configure =================================================================== --- branches/rug/configure 2007-01-18 21:33:25 UTC (rev 945) +++ branches/rug/configure 2007-01-18 22:07:30 UTC (rev 946) @@ -309,8 +309,8 @@ settings can also be specified as environment settings with similar names. The environment settings are all uppercase and dashes are underscores (e.g. The --st-user setting can also be set by setting the ST_USER environment -variable). During build stubs of the form @FOO@ (e.g. @ST_USER@) are replaced -with the value of the variable. +variable). During a build, stubs of the form @FOO@ (e.g. @ST_USER@) +are replaced with the value of the variable. PREAMBLE for my $var (sort keys %settings) { Modified: branches/rug/dev-bin/list-module-deps =================================================================== --- branches/rug/dev-bin/list-module-deps 2007-01-18 21:33:25 UTC (rev 945) +++ branches/rug/dev-bin/list-module-deps 2007-01-18 22:07:30 UTC (rev 946) @@ -7,9 +7,10 @@ use Getopt::Long; my %opts = process_opts(); +die "$0: Must specify --webapi\n" unless $opts{webapi}; my @yaml = 'base.yaml'; -push @yaml, "$opts{webapi}.yaml" || die "$0: Must specify --webapi\n"; +push @yaml, "$opts{webapi}.yaml"; push @yaml, 'enterprise.yaml' if !$opts{'socialtext-open'}; push @yaml, 'dev.yaml' if $opts{dev}; my %deps = LoadDeps( @yaml ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 21:33:28
|
Revision: 945 http://svn.sourceforge.net/socialtext/?rev=945&view=rev Author: petdance Date: 2007-01-18 13:33:25 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Removed the hardcoded "Apache 1.3" Modified Paths: -------------- branches/rug/etc/init.d/st-apache.in Modified: branches/rug/etc/init.d/st-apache.in =================================================================== --- branches/rug/etc/init.d/st-apache.in 2007-01-18 21:18:15 UTC (rev 944) +++ branches/rug/etc/init.d/st-apache.in 2007-01-18 21:33:25 UTC (rev 945) @@ -10,7 +10,8 @@ use Readonly; use Socialtext::InitFunctions qw( fork_and_exec_daemon_as_user system_or_die try_kill timeout_waitpid - succeed fail restart ); + succeed fail restart +); Readonly my $NAME => 'st-apache'; Readonly my $CONF => '@PREFIX@@HTTPD_CONFDIR@/st-httpd.conf'; @@ -25,7 +26,7 @@ my $operation = shift || ''; if ($operation eq 'start') { - print "Starting $NAME (Apache 1.3) web server... "; + print "Starting $NAME web server... "; if ((my $code = fork_and_exec_daemon_as_user( $USER, @COMMAND )) == 0) { succeed 'done.'; } @@ -34,7 +35,7 @@ } } elsif ($operation eq 'stop') { - print "Stopping $NAME (Apache 1.3) web server... "; + print "Stopping $NAME web server... "; my $pid = get_pid(); try_kill( 15, $pid ) or fail 'already stopped.'; if (timeout_waitpid($pid, 300)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 21:18:16
|
Revision: 944 http://svn.sourceforge.net/socialtext/?rev=944&view=rev Author: petdance Date: 2007-01-18 13:18:15 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Updated proxy to be apache2. Modified Paths: -------------- branches/rug/build/defaults.pl Modified: branches/rug/build/defaults.pl =================================================================== --- branches/rug/build/defaults.pl 2007-01-18 21:05:00 UTC (rev 943) +++ branches/rug/build/defaults.pl 2007-01-18 21:18:15 UTC (rev 944) @@ -84,9 +84,9 @@ This is required for Socialtext Open, or single-Apache setups. DOC - entry( httpd => '/usr/sbin/apache-perl', <<'DOC' ), + entry( httpd => which( 'apache-perl' ), <<'DOC' ), The path to an Apache 1.3 or Apache 2 web server capable of using both -mod_perl and mod_ssl. +mod_perl and mod_ssl. This is the Apache that will serve content. DOC entry( httpd_confdir => '/etc/apache-perl', <<'DOC' ), @@ -141,21 +141,22 @@ DOC entry( prefix => "", <<'DOC' ), -Prefix is a directory to prepend onto all install paths. Changing prefix will -also updated any hard coded settings. For example if some file refers to -/etc/socialtext then setting prefix will make it refer to -$prefix/etc/socialtext. C.f. destdir +Prefix is a directory to prepend onto all install paths. Changing prefix +will also updated any hard coded settings. For example if some file +refers to /etc/socialtext then setting prefix will make it refer to +$prefix/etc/socialtext. See also the "destdir" option. DOC entry( proxy => which( 'apache2' ), <<'DOC' ), -The path to an Apache 2 web server running mod_proxy. +The path to an Apache 2 web server running mod_proxy. It is optional +if you are not using --apache-proxy=1. DOC - entry( proxy_confdir => '/etc/apache-perl', <<'DOC' ), + entry( proxy_confdir => '/etc/apache2', <<'DOC' ), The location of the proxying Apache's configuration directory. DOC - entry( proxy_logdir => '/var/log/apache-perl', <<'DOC' ), + entry( proxy_logdir => '/var/log/apache2', <<'DOC' ), The location of the proxying Apache's log directory. DOC This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 21:05:02
|
Revision: 943 http://svn.sourceforge.net/socialtext/?rev=943&view=rev Author: petdance Date: 2007-01-18 13:05:00 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Hid some functions, and added tests forit Modified Paths: -------------- branches/rug/build/defaults.pl branches/rug/lib/Socialtext/Build.pm branches/rug/t/Socialtext/Build.t Modified: branches/rug/build/defaults.pl =================================================================== --- branches/rug/build/defaults.pl 2007-01-18 21:01:24 UTC (rev 942) +++ branches/rug/build/defaults.pl 2007-01-18 21:05:00 UTC (rev 943) @@ -85,8 +85,8 @@ DOC entry( httpd => '/usr/sbin/apache-perl', <<'DOC' ), -The path to an Apache 1.3 web server which is capable of using both mod_perl -and mod_ssl. +The path to an Apache 1.3 or Apache 2 web server capable of using both +mod_perl and mod_ssl. DOC entry( httpd_confdir => '/etc/apache-perl', <<'DOC' ), @@ -147,6 +147,26 @@ $prefix/etc/socialtext. C.f. destdir DOC + entry( proxy => which( 'apache2' ), <<'DOC' ), +The path to an Apache 2 web server running mod_proxy. +DOC + + entry( proxy_confdir => '/etc/apache-perl', <<'DOC' ), +The location of the proxying Apache's configuration directory. +DOC + + entry( proxy_logdir => '/var/log/apache-perl', <<'DOC' ), +The location of the proxying Apache's log directory. +DOC + + entry( proxy_lockdir => '/var/lock', <<'DOC' ), +The location of the proxying Apache's lock directory. +DOC + + entry( proxy_piddir => '/var/run', <<'DOC' ), +The location of the proxying Apache's pid directory. +DOC + entry( 'root-group' => 'root', <<'DOC' ), The name of the root group. DOC Modified: branches/rug/lib/Socialtext/Build.pm =================================================================== --- branches/rug/lib/Socialtext/Build.pm 2007-01-18 21:01:24 UTC (rev 942) +++ branches/rug/lib/Socialtext/Build.pm 2007-01-18 21:05:00 UTC (rev 943) @@ -15,7 +15,7 @@ require Socialtext::Build::ConfigureValues; %Settings = %{ $Socialtext::Build::ConfigureValues::VAR1 || {} }; }; -load_defaults() if keys(%Settings) == 0; +_load_defaults() if keys(%Settings) == 0; sub get_build_setting { my $key = shift || ''; @@ -30,8 +30,8 @@ ); } -sub load_defaults { - my $defaults_pl = defaults_pl(); +sub _load_defaults { + my $defaults_pl = _defaults_pl(); if ($defaults_pl) { my $VAR1; # $VAR1 comes back in the eval below. my $defs = eval `$defaults_pl`; @@ -46,7 +46,7 @@ } } -sub defaults_pl { +sub _defaults_pl { my $up = File::Spec->updir; my $file = File::Spec->catfile( dirname(__FILE__), $up, $up, 'build', 'defaults.pl' Modified: branches/rug/t/Socialtext/Build.t =================================================================== --- branches/rug/t/Socialtext/Build.t 2007-01-18 21:01:24 UTC (rev 942) +++ branches/rug/t/Socialtext/Build.t 2007-01-18 21:05:00 UTC (rev 943) @@ -4,8 +4,11 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More tests => 2; BEGIN { - use_ok( 'Socialtext::Build' ); + use_ok( 'Socialtext::Build', qw( get_build_setting ) ); } + +my $webapi = get_build_setting( 'webapi' ); +like( $webapi, qr/^mod_perl[12]$/, 'Got a reasonable webapi value' ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 21:01:32
|
Revision: 942 http://svn.sourceforge.net/socialtext/?rev=942&view=rev Author: petdance Date: 2007-01-18 13:01:24 -0800 (Thu, 18 Jan 2007) Log Message: ----------- new test file Added Paths: ----------- branches/rug/t/Socialtext/Build.t Added: branches/rug/t/Socialtext/Build.t =================================================================== --- branches/rug/t/Socialtext/Build.t (rev 0) +++ branches/rug/t/Socialtext/Build.t 2007-01-18 21:01:24 UTC (rev 942) @@ -0,0 +1,11 @@ +#!perl +# @COPYRIGHT@ + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok( 'Socialtext::Build' ); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-18 21:01:13
|
Revision: 941 http://svn.sourceforge.net/socialtext/?rev=941&view=rev Author: petdance Date: 2007-01-18 13:01:10 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Added comment Modified Paths: -------------- branches/rug/lib/Socialtext/Build.pm Modified: branches/rug/lib/Socialtext/Build.pm =================================================================== --- branches/rug/lib/Socialtext/Build.pm 2007-01-17 20:38:16 UTC (rev 940) +++ branches/rug/lib/Socialtext/Build.pm 2007-01-18 21:01:10 UTC (rev 941) @@ -33,13 +33,14 @@ sub load_defaults { my $defaults_pl = defaults_pl(); if ($defaults_pl) { - my $VAR1; + my $VAR1; # $VAR1 comes back in the eval below. my $defs = eval `$defaults_pl`; for my $key ( sort keys %$defs ) { $Settings{$key} = $defs->{$key}->{value}; } - } else { - die "Could not find any suitable settings:\n" . + } + else { + die "Could not find any suitable settings:\n" . " * Socialtext::Build::ConfigureValues failed to load.\n" . " * build/defaults.pl not found\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-17 20:38:21
|
Revision: 940 http://svn.sourceforge.net/socialtext/?rev=940&view=rev Author: petdance Date: 2007-01-17 12:38:16 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Added a --keys option for my testing Modified Paths: -------------- branches/rug/build/defaults.pl Modified: branches/rug/build/defaults.pl =================================================================== --- branches/rug/build/defaults.pl 2007-01-17 20:33:52 UTC (rev 939) +++ branches/rug/build/defaults.pl 2007-01-17 20:38:16 UTC (rev 940) @@ -9,7 +9,7 @@ use constant osr => 1; # This is forked: In SourceForge it's 1, in ST internal it's 0 -print Dumper( { +my %options = ( entry( 'apache-perl-moduledir' => apache_perl_moduledir(), <<'DOC' ), Directory that holds the modules for Apache 1 / mod_perl. DOC @@ -203,9 +203,17 @@ root of the web server. DOC -} ); +); +if ( grep { /--keys/ } @ARGV ) { + print join( "\n", sort( keys %options ), "" ); +} +else { + $Data::Dumper::Sortkeys = 1; + print Dumper( \%options ); +} + sub entry { my ($name, $value, $doc) = @_; $doc = defined($doc) ? $doc : 'Undocumented'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-17 20:33:57
|
Revision: 939 http://svn.sourceforge.net/socialtext/?rev=939&view=rev Author: petdance Date: 2007-01-17 12:33:52 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Sorted the options for real, ignoring punctuation Modified Paths: -------------- branches/rug/build/defaults.pl Modified: branches/rug/build/defaults.pl =================================================================== --- branches/rug/build/defaults.pl 2007-01-17 20:10:52 UTC (rev 938) +++ branches/rug/build/defaults.pl 2007-01-17 20:33:52 UTC (rev 939) @@ -30,10 +30,23 @@ Directory that holds the modules for Apache 2. DOC + entry( bindir => '/usr/local/bin', <<'DOC' ), +The location to install executable files. This is the same as passing +INSTALLSCRIPT to MakeMaker. +DOC + + entry( cachedir => '/var/cache/socialtext', <<'DOC' ), +The directory where Socialtext cache data is written. +DOC + entry( 'ceqlotron-logfile' => '/var/log/ceqlotron.log', << 'DOC' ), Location of the file where ceqlotron should log any exceptional errors. DOC + entry( confdir => '/etc/socialtext', <<'DOC' ), +The directory where Socialtext keeps all of its configuration files. +DOC + entry( 'db-host' => '', <<'DOC' ), The host that the database runs on. If blank, assumes the default for the database. DOC @@ -47,70 +60,6 @@ when we connect to the DB and create our DB schemas. DOC - entry( 'dev' => 0, <<'DOC' ), -Configures for a development environment. This may add additional -depencies to your build. -DOC - - entry( 'force-ssl-login' => 0, <<'DOC' ), -Force logins to use SSL. An attempt to login without SSL will be redirected to the https URL. -DOC - - entry( 'init-d' => '/etc/init.d', <<'DOC' ), -Location where system init.d files go. -DOC - - entry( 'install-prog' => which('/usr/bin/install'), <<'DOC' ), -The location of GNU install (or compatiable program). Used during the install -to install files onto the system. -DOC - - entry( 'root-group' => 'root', <<'DOC' ), -The name of the root group. -DOC - - entry( 'root-user' => 'root', <<'DOC' ), -The name of the root user. -DOC - - entry( 'server-admin' => root_at_hostname(), <<'DOC' ), -Email address for the administrator of your server. If not specified, -defaults to root@hostname. -DOC - - entry( 'socialtext-open' => osr, <<'DOC' ), -Configures for the settings most appropriate for the Socialtext Open release. -DOC - - entry( 'st-group' => 'www-data', <<'DOC' ), -The group used by the Apache web server while runing Socialtext. -DOC - - entry( 'st-user' => 'www-data', <<'DOC' ), -The user used by the Apache web server while runing Socialtext. -DOC - - entry( 'support-address' => root_at_hostname(), <<'DOC' ), -Email address for users to get support for your wiki. If not specified, -defaults to root@hostname. -DOC - - entry( 'webapi' => 'mod_perl1', <<'DOC' ), -Web API to use on your web server. For now, this can only be mod_perl1. -DOC - entry( bindir => '/usr/local/bin', <<'DOC' ), -The location to install executable files. This is the same as passing -INSTALLSCRIPT to MakeMaker. -DOC - - entry( cachedir => '/var/cache/socialtext', <<'DOC' ), -The directory where Socialtext cache data is written. -DOC - - entry( confdir => '/etc/socialtext', <<'DOC' ), -The directory where Socialtext keeps all of its configuration files. -DOC - entry( destdir => "", <<'DOC' ), Destdir is a directory to prepended onto all install paths. Its purpose is to relocate an install, which is useful for packaging. Changing this variable @@ -121,6 +70,15 @@ C.f. prefix DOC + entry( dev => 0, <<'DOC' ), +Configures for a development environment. This may add additional +depencies to your build. +DOC + + entry( 'force-ssl-login' => 0, <<'DOC' ), +Force logins to use SSL. An attempt to login without SSL will be redirected to the https URL. +DOC + entry( hostname => get_hostname(), <<'DOC' ), The fully-qualified hostname of the server on which we'll be running. This is required for Socialtext Open, or single-Apache setups. @@ -134,6 +92,7 @@ entry( httpd_confdir => '/etc/apache-perl', <<'DOC' ), The location of the Apache configuration directory. DOC + entry( httpd_logdir => '/var/log/apache-perl', <<'DOC' ), The location of the Apache log directory. DOC @@ -146,6 +105,15 @@ The location of the Apache pid directory. DOC + entry( 'init-d' => '/etc/init.d', <<'DOC' ), +Location where system init.d files go. +DOC + + entry( 'install-prog' => which('/usr/bin/install'), <<'DOC' ), +The location of GNU install (or compatiable program). Used during the install +to install files onto the system. +DOC + entry( libdir => $Config{installsitelib}, <<'DOC' ), The location to install Perl library files. This is equivalent to passing in INSTALLSCRIPTLIB= to MakeMaker. The default value is the value of @@ -179,11 +147,28 @@ $prefix/etc/socialtext. C.f. destdir DOC + entry( 'root-group' => 'root', <<'DOC' ), +The name of the root group. +DOC + + entry( 'root-user' => 'root', <<'DOC' ), +The name of the root user. +DOC + + entry( 'server-admin' => root_at_hostname(), <<'DOC' ), +Email address for the administrator of your server. If not specified, +defaults to root@hostname. +DOC + entry( sharedir => '/usr/share/nlw', <<'DOC' ), The location of the shared files used by Socialtext. This includes things like images, Mason templates, and other shared but static files. DOC + entry( 'socialtext-open' => osr, <<'DOC' ), +Configures for the settings most appropriate for the Socialtext Open release. +DOC + entry( spooldir => '/var/spool/socialtext', <<'DOC' ), The directory where Socialtext change events can be spooled. DOC @@ -192,11 +177,27 @@ Directory that holds SSL certificates. DOC + entry( 'st-group' => 'www-data', <<'DOC' ), +The group used by the Apache web server while runing Socialtext. +DOC + + entry( 'st-user' => 'www-data', <<'DOC' ), +The user used by the Apache web server while runing Socialtext. +DOC + + entry( 'support-address' => root_at_hostname(), <<'DOC' ), +Email address for users to get support for your wiki. If not specified, +defaults to root@hostname. +DOC + entry( url => 'https://' . get_hostname() . get_port() . '/', <<'DOC' ), The URL of where Socialtext will be reachable from. This is currently only used when generating the WSDL, which currently is not dynamically generated. DOC + entry( webapi => 'mod_perl1', <<'DOC' ), +Web API to use on your web server. For now, this can only be mod_perl1. +DOC entry( webroot => '/var/www/socialtext', <<'DOC' ), The web root used by Socialtext for storing all wiki data. This is also the root of the web server. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-17 20:10:54
|
Revision: 938 http://svn.sourceforge.net/socialtext/?rev=938&view=rev Author: petdance Date: 2007-01-17 12:10:52 -0800 (Wed, 17 Jan 2007) Log Message: ----------- sorted the options for easy finding Modified Paths: -------------- branches/rug/build/defaults.pl Modified: branches/rug/build/defaults.pl =================================================================== --- branches/rug/build/defaults.pl 2007-01-17 04:23:41 UTC (rev 937) +++ branches/rug/build/defaults.pl 2007-01-17 20:10:52 UTC (rev 938) @@ -9,143 +9,100 @@ use constant osr => 1; # This is forked: In SourceForge it's 1, in ST internal it's 0 -print Dumper( - { - entry( destdir => "", <<'DOC' ), -Destdir is a directory to prepended onto all install paths. Its purpose is to -relocate an install, which is useful for packaging. Changing this variable -will not cause any hard coded values to be updated in any executable code. -For example if some file refers to /etc/socialtext then setting destdir will -have no affect on that value; this is on purpose since destdir only relocates -an install and does not update internal references to be consistent. -C.f. prefix +print Dumper( { + entry( 'apache-perl-moduledir' => apache_perl_moduledir(), <<'DOC' ), +Directory that holds the modules for Apache 1 / mod_perl. DOC - entry( prefix => "", <<'DOC' ), -Prefix is a directory to prepend onto all install paths. Changing prefix will -also updated any hard coded settings. For example if some file refers to -/etc/socialtext then setting prefix will make it refer to -$prefix/etc/socialtext. C.f. destdir + entry( 'apache-proxy' => osr ? 0 : 1, <<'DOC' ), +Configures Socialtext to include a front-end proxying Apache that proxies +directly from the back-end Apache server that serves content. DOC - entry( perl => $^X, <<'DOC' ), -The path to the version of perl you wish to use for installing. + entry( 'apache-status' => '', <<'DOC' ), +Configures Apache to include the /status and /perl-status URIs +for tracking and measuring Apache internals. The value passed to +apache-status is the hosts to which these URLs will be restricted. +For example, --apache-status=.mydomain.com DOC - entry( 'st-user' => 'www-data', <<'DOC' ), -The user used by the Apache web server while runing Socialtext. + entry( 'apache2-moduledir' => apache2_moduledir(), <<'DOC' ), +Directory that holds the modules for Apache 2. DOC - entry( 'st-group' => 'www-data', <<'DOC' ), -The group used by the Apache web server while runing Socialtext. + entry( 'ceqlotron-logfile' => '/var/log/ceqlotron.log', << 'DOC' ), +Location of the file where ceqlotron should log any exceptional errors. DOC - entry( bindir => '/usr/local/bin', <<'DOC' ), -The location to install executable files. This is the same as passing -INSTALLSCRIPT to MakeMaker. + entry( 'db-host' => '', <<'DOC' ), +The host that the database runs on. If blank, assumes the default for the database. DOC - entry( libdir => $Config{installsitelib}, <<'DOC' ), -The location to install Perl library files. This is equivalent to passing in -INSTALLSCRIPTLIB= to MakeMaker. The default value is the value of -$Config{installsitelib} from Config.pm + entry( 'db-port' => '', <<'DOC' ), +The port that the database runs on. If blank, assumes the default for the database. DOC - entry( man1dir => $Config{installsiteman1dir}, <<'DOC' ), -The location to install Perl man1 man files. This is equivalent to passing in -INSTALLSITEMAN1DIR= to MakeMaker. The default value is the value of -$Config{installsiteman1dir} from Config.pm + entry( 'db-user' => 'postgres', <<'DOC' ), +The username of the DB superuser. This is used only during the build process +when we connect to the DB and create our DB schemas. DOC - entry( man3dir => $Config{installsiteman3dir}, <<'DOC' ), -The location to install Perl man3 man files. This is equivalent to passing in -INSTALLSITEMAN3DIR= to MakeMaker. The default value is the value of -$Config{installsiteman3dir} from Config.pm -DOC - - entry( sharedir => '/usr/share/nlw', <<'DOC' ), -The location of the shared files used by Socialtext. This includes things -like images, Mason templates, and other shared but static files. -DOC - - entry( 'root-user' => 'root', <<'DOC' ), -The name of the root user. -DOC - - entry( 'root-group' => 'root', <<'DOC' ), -The name of the root group. -DOC - - entry( 'socialtext-open' => osr, <<'DOC' ), -Configures for the settings most appropriate for the Socialtext Open release. -DOC - entry( 'dev' => 0, <<'DOC' ), Configures for a development environment. This may add additional depencies to your build. DOC - entry( 'apache-status' => '', <<'DOC' ), -Configures Apache to include the /status and /perl-status URIs -for tracking and measuring Apache internals. The value passed to -apache-status is the hosts to which these URLs will be restricted. -For example, --apache-status=.mydomain.com + entry( 'force-ssl-login' => 0, <<'DOC' ), +Force logins to use SSL. An attempt to login without SSL will be redirected to the https URL. DOC - entry( 'apache-proxy' => osr ? 0 : 1, <<'DOC' ), -Configures Socialtext to include a front-end proxying Apache that proxies -directly from the back-end Apache server that serves content. + entry( 'init-d' => '/etc/init.d', <<'DOC' ), +Location where system init.d files go. DOC - entry( hostname => get_hostname(), <<'DOC' ), -The fully-qualified hostname of the server on which we'll be running. -This is required for Socialtext Open, or single-Apache setups. + entry( 'install-prog' => which('/usr/bin/install'), <<'DOC' ), +The location of GNU install (or compatiable program). Used during the install +to install files onto the system. DOC - entry( url => 'https://' . get_hostname() . get_port() . '/', <<'DOC' ), -The URL of where Socialtext will be reachable from. This is currently only -used when generating the WSDL, which currently is not dynamically generated. + entry( 'root-group' => 'root', <<'DOC' ), +The name of the root group. DOC - entry( 'force-ssl-login' => 0, <<'DOC' ), -Force logins to use SSL. An attempt to login without SSL will be redirected to the https URL. + entry( 'root-user' => 'root', <<'DOC' ), +The name of the root user. DOC - entry( 'db-port' => '', <<'DOC' ), -The port that the database runs on. If blank, assumes the default for the database. + entry( 'server-admin' => root_at_hostname(), <<'DOC' ), +Email address for the administrator of your server. If not specified, +defaults to root@hostname. DOC - entry( 'db-host' => '', <<'DOC' ), -The host that the database runs on. If blank, assumes the default for the database. + entry( 'socialtext-open' => osr, <<'DOC' ), +Configures for the settings most appropriate for the Socialtext Open release. DOC - entry( 'db-user' => 'postgres', <<'DOC' ), -The username of the DB superuser. This is used only during the build process -when we connect to the DB and create our DB schemas. + entry( 'st-group' => 'www-data', <<'DOC' ), +The group used by the Apache web server while runing Socialtext. DOC - entry( 'install-prog' => which('/usr/bin/install'), <<'DOC' ), -The location of GNU install (or compatiable program). Used during the install -to install files onto the system. + entry( 'st-user' => 'www-data', <<'DOC' ), +The user used by the Apache web server while runing Socialtext. DOC - entry( 'init-d' => '/etc/init.d', <<'DOC' ), -Location where system init.d files go. + entry( 'support-address' => root_at_hostname(), <<'DOC' ), +Email address for users to get support for your wiki. If not specified, +defaults to root@hostname. DOC - entry( webroot => '/var/www/socialtext', <<'DOC' ), -The web root used by Socialtext for storing all wiki data. This is also the -root of the web server. + entry( 'webapi' => 'mod_perl1', <<'DOC' ), +Web API to use on your web server. For now, this can only be mod_perl1. DOC - - entry( piddir => '/var/run/socialtext', <<'DOC' ), -The directory to which PID files are written. + entry( bindir => '/usr/local/bin', <<'DOC' ), +The location to install executable files. This is the same as passing +INSTALLSCRIPT to MakeMaker. DOC - entry( spooldir => '/var/spool/socialtext', <<'DOC' ), -The directory where Socialtext change events can be spooled. -DOC - entry( cachedir => '/var/cache/socialtext', <<'DOC' ), The directory where Socialtext cache data is written. DOC @@ -154,6 +111,21 @@ The directory where Socialtext keeps all of its configuration files. DOC + entry( destdir => "", <<'DOC' ), +Destdir is a directory to prepended onto all install paths. Its purpose is to +relocate an install, which is useful for packaging. Changing this variable +will not cause any hard coded values to be updated in any executable code. +For example if some file refers to /etc/socialtext then setting destdir will +have no affect on that value; this is on purpose since destdir only relocates +an install and does not update internal references to be consistent. +C.f. prefix +DOC + + entry( hostname => get_hostname(), <<'DOC' ), +The fully-qualified hostname of the server on which we'll be running. +This is required for Socialtext Open, or single-Apache setups. +DOC + entry( httpd => '/usr/sbin/apache-perl', <<'DOC' ), The path to an Apache 1.3 web server which is capable of using both mod_perl and mod_ssl. @@ -166,47 +138,73 @@ The location of the Apache log directory. DOC + entry( httpd_lockdir => '/var/lock', <<'DOC' ), +The location of the Apache lock directory. +DOC + entry( httpd_piddir => '/var/run', <<'DOC' ), The location of the Apache pid directory. DOC - entry( httpd_lockdir => '/var/lock', <<'DOC' ), -The location of the Apache lock directory. + entry( libdir => $Config{installsitelib}, <<'DOC' ), +The location to install Perl library files. This is equivalent to passing in +INSTALLSCRIPTLIB= to MakeMaker. The default value is the value of +$Config{installsitelib} from Config.pm DOC - entry( ssldir => '/etc/ssl', <<'DOC' ), -Directory that holds SSL certificates. + entry( man1dir => $Config{installsiteman1dir}, <<'DOC' ), +The location to install Perl man1 man files. This is equivalent to passing in +INSTALLSITEMAN1DIR= to MakeMaker. The default value is the value of +$Config{installsiteman1dir} from Config.pm DOC - entry( 'ceqlotron-logfile' => '/var/log/ceqlotron.log', << 'DOC' ), -Location of the file where ceqlotron should log any exceptional errors. + entry( man3dir => $Config{installsiteman3dir}, <<'DOC' ), +The location to install Perl man3 man files. This is equivalent to passing in +INSTALLSITEMAN3DIR= to MakeMaker. The default value is the value of +$Config{installsiteman3dir} from Config.pm DOC + entry( perl => $^X, <<'DOC' ), +The path to the version of perl you wish to use for installing. +DOC - entry( 'apache-perl-moduledir' => apache_perl_moduledir(), <<'DOC' ), -Directory that holds the modules for Apache 1 / mod_perl. + entry( piddir => '/var/run/socialtext', <<'DOC' ), +The directory to which PID files are written. DOC - entry( 'apache2-moduledir' => apache2_moduledir(), <<'DOC' ), -Directory that holds the modules for Apache 2. + entry( prefix => "", <<'DOC' ), +Prefix is a directory to prepend onto all install paths. Changing prefix will +also updated any hard coded settings. For example if some file refers to +/etc/socialtext then setting prefix will make it refer to +$prefix/etc/socialtext. C.f. destdir DOC - entry( 'support-address' => root_at_hostname(), <<'DOC' ), -Email address for users to get support for your wiki. If not specified, -defaults to root@hostname. + entry( sharedir => '/usr/share/nlw', <<'DOC' ), +The location of the shared files used by Socialtext. This includes things +like images, Mason templates, and other shared but static files. DOC - entry( 'server-admin' => root_at_hostname(), <<'DOC' ), -Email address for the administrator of your server. If not specified, -defaults to root@hostname. + entry( spooldir => '/var/spool/socialtext', <<'DOC' ), +The directory where Socialtext change events can be spooled. DOC - entry( 'webapi' => 'mod_perl1', <<'DOC' ), -Web API to use on your web server. For now, this can only be mod_perl1. + entry( ssldir => '/etc/ssl', <<'DOC' ), +Directory that holds SSL certificates. DOC - } -); + entry( url => 'https://' . get_hostname() . get_port() . '/', <<'DOC' ), +The URL of where Socialtext will be reachable from. This is currently only +used when generating the WSDL, which currently is not dynamically generated. +DOC + + entry( webroot => '/var/www/socialtext', <<'DOC' ), +The web root used by Socialtext for storing all wiki data. This is also the +root of the web server. +DOC + +} ); + + sub entry { my ($name, $value, $doc) = @_; $doc = defined($doc) ? $doc : 'Undocumented'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-17 04:23:42
|
Revision: 937 http://svn.sourceforge.net/socialtext/?rev=937&view=rev Author: petdance Date: 2007-01-16 20:23:41 -0800 (Tue, 16 Jan 2007) Log Message: ----------- Error messages now tell us what they were trying to get to Modified Paths: -------------- branches/rug/lib/Socialtext/File.pm Modified: branches/rug/lib/Socialtext/File.pm =================================================================== --- branches/rug/lib/Socialtext/File.pm 2007-01-17 03:46:09 UTC (rev 936) +++ branches/rug/lib/Socialtext/File.pm 2007-01-17 04:23:41 UTC (rev 937) @@ -41,7 +41,7 @@ my $utf8 = shift; my $fh; - open $fh, ">", $file or Carp::confess( "unable to open $file for writing: $!" ); + open $fh, '>', $file or Carp::confess( "unable to open $file for writing: $!" ); binmode($fh, ':utf8') if $utf8; print $fh $content; close $fh; @@ -148,7 +148,7 @@ sub directory_is_empty { my $directory = shift; - opendir my $dh, $directory or Carp::confess( "unable to open directory: $!\n" ); + opendir my $dh, $directory or Carp::confess( "unable to open $directory: $!\n" ); for my $e ( readdir $dh ) { return 0 unless $e =~ /^\.\.?$/; } @@ -157,14 +157,14 @@ sub all_directory_files { my $directory = shift; - opendir my $dh, $directory or Carp::confess( "unable to open directory: $!\n" ); + opendir my $dh, $directory or Carp::confess( "unable to open $directory: $!\n" ); return grep { !/^(?:\.|\.\.)$/ && -f catfile( $directory, $_ ) } readdir $dh; } sub all_directory_directories { my $directory = shift; - opendir my $dh, $directory or Carp::confess( "unable to open directory: $!\n" ); + opendir my $dh, $directory or Carp::confess( "unable to open $directory: $!\n" ); return grep { !/^(?:\.|\.\.)$/ && -d catfile( $directory, $_ ) } readdir $dh; } @@ -276,7 +276,7 @@ =head1 COPYRIGHT & LICENSE -Copyright 2006 Socialtext, Inc., all rights reserved. +Copyright 2006-2007 Socialtext, Inc., all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-17 03:46:11
|
Revision: 936 http://svn.sourceforge.net/socialtext/?rev=936&view=rev Author: petdance Date: 2007-01-16 19:46:09 -0800 (Tue, 16 Jan 2007) Log Message: ----------- cleaned up the way we handle $@ Modified Paths: -------------- branches/rug/lib/Socialtext/Handler/Cleanup.pm Modified: branches/rug/lib/Socialtext/Handler/Cleanup.pm =================================================================== --- branches/rug/lib/Socialtext/Handler/Cleanup.pm 2007-01-17 03:36:20 UTC (rev 935) +++ branches/rug/lib/Socialtext/Handler/Cleanup.pm 2007-01-17 03:46:09 UTC (rev 936) @@ -71,12 +71,7 @@ } } # loaded Apache::SizeLimit else { - if ( $@ =~ m{\QCan't locate Apache/SizeLimit.pm} ) { - $worker = undef; - } - else { - die $@; - } + die $@ unless $@ =~ m{\QCan't locate Apache/SizeLimit.pm}; } } # mod_perl1 elsif ( $webapi eq 'mod_perl2' ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pet...@us...> - 2007-01-17 03:36:33
|
Revision: 935 http://svn.sourceforge.net/socialtext/?rev=935&view=rev Author: petdance Date: 2007-01-16 19:36:20 -0800 (Tue, 16 Jan 2007) Log Message: ----------- Now we can load the sub-handler correctly. It just makes the file cleanup stuff cry. Modified Paths: -------------- branches/rug/lib/Socialtext/Handler/Cleanup.pm Modified: branches/rug/lib/Socialtext/Handler/Cleanup.pm =================================================================== --- branches/rug/lib/Socialtext/Handler/Cleanup.pm 2007-01-16 21:34:34 UTC (rev 934) +++ branches/rug/lib/Socialtext/Handler/Cleanup.pm 2007-01-17 03:36:20 UTC (rev 935) @@ -4,27 +4,36 @@ use warnings; use File::Temp 0.16 (); +use Socialtext::Build qw( get_build_setting ); +use Socialtext::Rug; +our $initialized; +our $worker; +our $max_process; +our $max_unshared; +our $min_shared; + sub handler { my $r = shift; File::Temp::cleanup(); - # This must always come last since it may cause the process to exit. - _call_apache_size_limit($r); -} + if ( !$initialized ) { + my $rug = Socialtext::Rug->instance; + $max_process = $rug->get_config( 'st_max_process_size' ); + $max_unshared = $rug->get_config( 'st_max_unshared_size' ); + $min_shared = $rug->get_config( 'st_min_shared_size' ); + $initialized = 1; + } + if ( $worker && ($max_process || $max_unshared || $min_shared) ) { + $worker->($r); + } +} # handler + BEGIN { - use Socialtext::Rug; + my $webapi = get_build_setting( 'webapi' ); - my $webapi = Socialtext::Rug->webapi; - - my $rug = Socialtext::Rug->instance; - - my $max_process = $rug->get_config( 'st_max_process_size' ); - my $max_unshared = $rug->get_config( 'st_max_unshared_size' ); - my $min_shared = $rug->get_config( 'st_min_shared_size' ); - # We want A::SL to be optional since it doesn't work on all # platforms, and isn't really criticial. if ( $webapi eq 'mod_perl1' ) { @@ -42,44 +51,54 @@ # and we have A::SL 0.9 then it will cause a compile-time error. if ( Apache::SizeLimit->VERSION and (Apache::SizeLimit->VERSION >= 0.9) ) { - Apache::SizeLimit->set_max_process_size( $max_process ) if $max_process; - Apache::SizeLimit->set_max_unshared_size( $max_unshared ) if $max_unshared; - Apache::SizeLimit->set_min_shared_size( $min_shared ) if $min_shared; - eval 'sub _call_apache_size_limit { Apache::SizeLimit->handler(shift); }'; - die $@ if $@; + $worker = sub { + my $r = shift; + Apache::SizeLimit->set_max_process_size( $max_process ) if $max_process; + Apache::SizeLimit->set_max_unshared_size( $max_unshared ) if $max_unshared; + Apache::SizeLimit->set_min_shared_size( $min_shared ) if $min_shared; + Apache::SizeLimit->handler($r); + }; } else { - $Apache::SizeLimit::MAX_PROCESS_SIZE = $max_process if $max_process; - $Apache::SizeLimit::MAX_UNSHARED_SIZE = $max_unshared if $max_unshared; - $Apache::SizeLimit::MIN_SHARED_SIZE = $min_shared if $min_shared; - eval 'sub _call_apache_size_limit { Apache::SizeLimit::handler(shift); }'; - die $@ if $@; + $worker = sub { + no warnings 'once'; + my $r = shift; + $Apache::SizeLimit::MAX_PROCESS_SIZE = $max_process if $max_process; + $Apache::SizeLimit::MAX_UNSHARED_SIZE = $max_unshared if $max_unshared; + $Apache::SizeLimit::MIN_SHARED_SIZE = $min_shared if $min_shared; + Apache::SizeLimit::handler($r); + } } } # loaded Apache::SizeLimit else { - *_call_apache_size_limit = sub {}; + if ( $@ =~ m{\QCan't locate Apache/SizeLimit.pm} ) { + $worker = undef; + } + else { + die $@; + } } } # mod_perl1 elsif ( $webapi eq 'mod_perl2' ) { require Apache2::SizeLimit; - # XXX Hoist with Rug - - $Apache2::SizeLimit::MAX_PROCESS_SIZE = $max_process if $max_process; - $Apache2::SizeLimit::MAX_UNSHARED_SIZE = $max_unshared if $max_unshared; - $Apache2::SizeLimit::MIN_SHARED_SIZE = $min_shared if $min_shared; - eval 'sub _call_apache_size_limit { Apache2::SizeLimit::handler(shift); }'; - die $@ if $@; + $worker = sub { + no warnings 'once'; + my $r = shift; + $Apache2::SizeLimit::MAX_PROCESS_SIZE = $max_process if $max_process; + $Apache2::SizeLimit::MAX_UNSHARED_SIZE = $max_unshared if $max_unshared; + $Apache2::SizeLimit::MIN_SHARED_SIZE = $min_shared if $min_shared; + Apache2::SizeLimit::handler($r); + } } # mod_perl2 else { die qq{Unknown webapi "$webapi"}; } -} +} # BEGIN 1; __END__ - =head1 NAME Socialtext::Handler::Cleanup - a CleanupHandler for Socialtext This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2007-01-16 21:34:43
|
Revision: 934 http://svn.sourceforge.net/socialtext/?rev=934&view=rev Author: autarch Date: 2007-01-16 13:34:34 -0800 (Tue, 16 Jan 2007) Log Message: ----------- webapi() is a method on ST::Rug, not ST::Rug::MP1 Modified Paths: -------------- branches/rug/lib/Socialtext/Handler/Cleanup.pm Modified: branches/rug/lib/Socialtext/Handler/Cleanup.pm =================================================================== --- branches/rug/lib/Socialtext/Handler/Cleanup.pm 2007-01-16 21:13:07 UTC (rev 933) +++ branches/rug/lib/Socialtext/Handler/Cleanup.pm 2007-01-16 21:34:34 UTC (rev 934) @@ -17,8 +17,9 @@ BEGIN { use Socialtext::Rug; + my $webapi = Socialtext::Rug->webapi; + my $rug = Socialtext::Rug->instance; - my $webapi = $rug->webapi; my $max_process = $rug->get_config( 'st_max_process_size' ); my $max_unshared = $rug->get_config( 'st_max_unshared_size' ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |