summaryrefslogtreecommitdiff
path: root/rt/sbin
diff options
context:
space:
mode:
authorivan <ivan>2010-05-18 18:49:59 +0000
committerivan <ivan>2010-05-18 18:49:59 +0000
commit624b2d44625f69d71175c3348cae635d580c890b (patch)
treeed57a90db2ecbc72cea6c1d3c175c1dcd1938ab4 /rt/sbin
parent7f4aff45cd6ef2f630d538294fa9d9c4db4ac4aa (diff)
parente70abd21bab68b23488f7ef1ee2e693a3b365691 (diff)
This commit was generated by cvs2svn to compensate for changes in r9232,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/sbin')
-rwxr-xr-xrt/sbin/rt-clean-sessions12
-rw-r--r--rt/sbin/rt-clean-sessions.in12
-rwxr-xr-xrt/sbin/rt-dump-database4
-rwxr-xr-xrt/sbin/rt-dump-database.in4
-rw-r--r--rt/sbin/rt-test-dependencies.in58
5 files changed, 62 insertions, 28 deletions
diff --git a/rt/sbin/rt-clean-sessions b/rt/sbin/rt-clean-sessions
index 0092a48..f769031 100755
--- a/rt/sbin/rt-clean-sessions
+++ b/rt/sbin/rt-clean-sessions
@@ -139,11 +139,11 @@ rt-clean-sessions - clean old and duplicate RT sessions
rt-clean-sessions [--debug] [--older <NUM>[H|D|M|Y]]
- rt-clean sessions
- rt-clean sessions --debug
- rt-clean sessions --older 10D
- rt-clean sessions --debug --older 1M
- rt-clean sessions --older 10D --skip-user
+ rt-clean-sessions
+ rt-clean-sessions --debug
+ rt-clean-sessions --older 10D
+ rt-clean-sessions --debug --older 1M
+ rt-clean-sessions --older 10D --skip-user
=head1 DESCRIPTION
@@ -162,7 +162,7 @@ Script is safe because data in the sessions is temporary and can be deleted.
Date interval in the C<< <NUM>[<unit>] >> format. Default unit is D(ays),
H(our), M(onth) and Y(ear) are also supported.
-For exmaple: C<rt-clean sessions --older 1M> would delete all sessions that are
+For example: C<rt-clean-sessions --older 1M> would delete all sessions that are
older than 1 month.
=item skip-user
diff --git a/rt/sbin/rt-clean-sessions.in b/rt/sbin/rt-clean-sessions.in
index ac736e6..7be5ce9 100644
--- a/rt/sbin/rt-clean-sessions.in
+++ b/rt/sbin/rt-clean-sessions.in
@@ -139,11 +139,11 @@ rt-clean-sessions - clean old and duplicate RT sessions
rt-clean-sessions [--debug] [--older <NUM>[H|D|M|Y]]
- rt-clean sessions
- rt-clean sessions --debug
- rt-clean sessions --older 10D
- rt-clean sessions --debug --older 1M
- rt-clean sessions --older 10D --skip-user
+ rt-clean-sessions
+ rt-clean-sessions --debug
+ rt-clean-sessions --older 10D
+ rt-clean-sessions --debug --older 1M
+ rt-clean-sessions --older 10D --skip-user
=head1 DESCRIPTION
@@ -162,7 +162,7 @@ Script is safe because data in the sessions is temporary and can be deleted.
Date interval in the C<< <NUM>[<unit>] >> format. Default unit is D(ays),
H(our), M(onth) and Y(ear) are also supported.
-For exmaple: C<rt-clean sessions --older 1M> would delete all sessions that are
+For example: C<rt-clean-sessions --older 1M> would delete all sessions that are
older than 1 month.
=item skip-user
diff --git a/rt/sbin/rt-dump-database b/rt/sbin/rt-dump-database
index 6175a10..ce023ad 100755
--- a/rt/sbin/rt-dump-database
+++ b/rt/sbin/rt-dump-database
@@ -48,6 +48,10 @@
# END BPS TAGGED BLOCK }}}
use strict;
+# As we specify that XML is UTF-8 and we output it to STDOUT, we must be sure
+# it is UTF-8 so further XMLin will not break
+binmode(STDOUT, ":utf8");
+
# fix lib paths, some may be relative
BEGIN {
require File::Spec;
diff --git a/rt/sbin/rt-dump-database.in b/rt/sbin/rt-dump-database.in
index 878a209..cb9f0c3 100755
--- a/rt/sbin/rt-dump-database.in
+++ b/rt/sbin/rt-dump-database.in
@@ -48,6 +48,10 @@
# END BPS TAGGED BLOCK }}}
use strict;
+# As we specify that XML is UTF-8 and we output it to STDOUT, we must be sure
+# it is UTF-8 so further XMLin will not break
+binmode(STDOUT, ":utf8");
+
# fix lib paths, some may be relative
BEGIN {
require File::Spec;
diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in
index 9819108..928db7a 100644
--- a/rt/sbin/rt-test-dependencies.in
+++ b/rt/sbin/rt-test-dependencies.in
@@ -60,7 +60,7 @@ GetOptions(
\%args, 'v|verbose',
'install', 'with-MYSQL',
'with-POSTGRESQL|with-pg|with-pgsql', 'with-SQLITE',
- 'with-ORACLE', 'with-FASTCGI',
+ 'with-ORACLE', 'with-FASTCGI', 'with-FASTCGI-SERVER',
'with-SPEEDYCGI', 'with-MODPERL1',
'with-MODPERL2', 'with-DEV',
'with-STANDALONE',
@@ -147,7 +147,8 @@ sub conclude {
for my $name ( keys %$missing ) {
my $module = $missing->{$name};
my $version = $module->{version};
- print_found( $name . ( $version ? " >= $version" : "" ),
+ my $error = $module->{error};
+ print_found( $name . ( $version && !$error ? " >= $version" : "" ),
0, $module->{error} );
}
}
@@ -172,11 +173,12 @@ The following switches will tell the tool to check for specific dependencies
--with-oracle Database interface for Oracle
--with-sqlite Database interface and driver for SQLite (unsupported)
- --with-standalone Libraries needed to support the standalone simple pure perl server
- --with-fastcgi Libraries needed to support the fastcgi handler
- --with-speedycgi Libraries needed to support the speedycgi handler
- --with-modperl1 Libraries needed to support the modperl 1 handler
- --with-modperl2 Libraries needed to support the modperl 2 handler
+ --with-standalone Libraries needed to support the standalone simple pure perl server
+ --with-fastcgi-server Libraries needed to support the external fastcgi server
+ --with-fastcgi Libraries needed to support the fastcgi handler
+ --with-speedycgi Libraries needed to support the speedycgi handler
+ --with-modperl1 Libraries needed to support the modperl 1 handler
+ --with-modperl2 Libraries needed to support the modperl 2 handler
--with-dev Tools needed for RT development
@@ -295,6 +297,7 @@ Test::Builder 0.77 # needed to fix TODO test
IPC::Run3
Test::MockTime
HTTP::Server::Simple::Mason 0.13
+Log::Dispatch::Perl
.
$deps{'FASTCGI'} = [ text_to_hash( << '.') ];
@@ -303,6 +306,16 @@ FCGI
CGI::Fast
.
+$deps{'FASTCGI-SERVER'} = [ text_to_hash( << '.') ];
+CGI 3.38
+CGI::Fast
+FCGI::ProcManager
+File::Basename
+File::Spec
+Getopt::Long
+Pod::Usage
+.
+
$deps{'SPEEDYCGI'} = [ text_to_hash( << '.') ];
CGI 3.38
CGI::SpeedyCGI
@@ -367,8 +380,11 @@ GD::Graph
GD::Text
.
-if ($args{'download'}) {
+my %AVOID = (
+ 'DBD::Oracle' => [qw(1.23)],
+);
+if ($args{'download'}) {
download_mods();
}
@@ -392,7 +408,8 @@ foreach my $type (sort grep $args{$_}, keys %args) {
if ( $args{'install'} ) {
for my $module (keys %missing) {
resolve_dep($module, $missing{$module}{version});
- delete $missing{$module} if test_dep($module, $missing{$module}{version});
+ delete $missing{$module}
+ if test_dep($module, $missing{$module}{version}, $AVOID{$module});
}
}
@@ -408,8 +425,8 @@ sub test_deps {
while(@deps) {
my $module = shift @deps;
my $version = shift @deps;
- my($test, $error) = test_dep($module, $version);
- my $msg = $module . ($version ? " >= $version" : '');
+ my($test, $error) = test_dep($module, $version, $AVOID{$module});
+ my $msg = $module . ($version && !$error ? " >= $version" : '');
print_found($msg, $test, $error);
$missing{$module} = { version => $version, error => $error } unless $test;
@@ -421,23 +438,32 @@ sub test_deps {
sub test_dep {
my $module = shift;
my $version = shift;
+ my $avoid = shift;
if ( $args{'list-deps'} ) {
print $module, ': ', $version || 0, "\n";
}
else {
eval "use $module $version ()";
- if ($@) {
- my $error = $@;
+ if ( my $error = $@ ) {
+ return 0 unless wantarray;
+
$error =~ s/\n(.*)$//s;
$error =~ s/at \(eval \d+\) line \d+\.$//;
- undef $error unless $error =~ /this is only/;
+ undef $error if $error =~ /this is only/;
return ( 0, $error );
}
- else {
- return 1;
+
+ if ( $avoid ) {
+ my $version = $module->VERSION;
+ if ( grep $version eq $_, @$avoid ) {
+ return 0 unless wantarray;
+ return (0, "It's known that there are problems with RT and version '$version' of '$module' module. If it's the latest available version of the module then you have to downgrade manually.");
+ }
}
+
+ return 1;
}
}