summaryrefslogtreecommitdiff
path: root/rt/sbin
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-06-04 00:16:28 -0700
committerIvan Kohler <ivan@freeside.biz>2013-06-04 00:16:28 -0700
commit7588a4ac90a9b07c08a3107cd1107d773be1c991 (patch)
tree55b8bedb5f899e705da0ba7f608267943bf89e94 /rt/sbin
parent98d2b25256055abb0dfcb9f586b434474fa97afd (diff)
RT 4.0.13
Diffstat (limited to 'rt/sbin')
-rw-r--r--rt/sbin/rt-attributes-viewer.in2
-rw-r--r--rt/sbin/rt-clean-sessions.in2
-rw-r--r--rt/sbin/rt-dump-metadata.in3
-rw-r--r--rt/sbin/rt-email-dashboards.in2
-rw-r--r--rt/sbin/rt-email-digest.in2
-rwxr-xr-xrt/sbin/rt-email-group-admin.in2
-rwxr-xr-xrt/sbin/rt-fulltext-indexer13
-rw-r--r--rt/sbin/rt-fulltext-indexer.in13
-rwxr-xr-xrt/sbin/rt-message-catalog2
-rw-r--r--rt/sbin/rt-preferences-viewer.in2
-rw-r--r--rt/sbin/rt-server.fcgi.in3
-rw-r--r--rt/sbin/rt-server.in3
-rwxr-xr-xrt/sbin/rt-session-viewer2
-rw-r--r--rt/sbin/rt-session-viewer.in2
-rw-r--r--rt/sbin/rt-setup-database.in17
-rwxr-xr-xrt/sbin/rt-setup-fulltext-index2
-rw-r--r--rt/sbin/rt-setup-fulltext-index.in2
-rwxr-xr-xrt/sbin/rt-shredder.in2
-rw-r--r--rt/sbin/rt-test-dependencies.in9
-rw-r--r--rt/sbin/rt-validate-aliases.in2
-rw-r--r--rt/sbin/rt-validator.in8
-rwxr-xr-xrt/sbin/standalone_httpd3
-rw-r--r--rt/sbin/standalone_httpd.in3
23 files changed, 62 insertions, 39 deletions
diff --git a/rt/sbin/rt-attributes-viewer.in b/rt/sbin/rt-attributes-viewer.in
index c776f1a..59eb423 100644
--- a/rt/sbin/rt-attributes-viewer.in
+++ b/rt/sbin/rt-attributes-viewer.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-clean-sessions.in b/rt/sbin/rt-clean-sessions.in
index 24ee868..1d6e1cf 100644
--- a/rt/sbin/rt-clean-sessions.in
+++ b/rt/sbin/rt-clean-sessions.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-dump-metadata.in b/rt/sbin/rt-dump-metadata.in
index f58371f..20c2853 100644
--- a/rt/sbin/rt-dump-metadata.in
+++ b/rt/sbin/rt-dump-metadata.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -47,6 +47,7 @@
#
# END BPS TAGGED BLOCK }}}
use strict;
+use warnings;
# 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
diff --git a/rt/sbin/rt-email-dashboards.in b/rt/sbin/rt-email-dashboards.in
index aa5ce64..f77ae61 100644
--- a/rt/sbin/rt-email-dashboards.in
+++ b/rt/sbin/rt-email-dashboards.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-email-digest.in b/rt/sbin/rt-email-digest.in
index fd257fa..68f0b4c 100644
--- a/rt/sbin/rt-email-digest.in
+++ b/rt/sbin/rt-email-digest.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-email-group-admin.in b/rt/sbin/rt-email-group-admin.in
index 0e32525..f626626 100755
--- a/rt/sbin/rt-email-group-admin.in
+++ b/rt/sbin/rt-email-group-admin.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-fulltext-indexer b/rt/sbin/rt-fulltext-indexer
index 396ef10..8ac0e9c 100755
--- a/rt/sbin/rt-fulltext-indexer
+++ b/rt/sbin/rt-fulltext-indexer
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -374,11 +374,18 @@ sub process_pg {
my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) };
unless ( $status ) {
- if ($dbh->errstr =~ /string is too long for tsvector/) {
- warn "Attachment @{[$attachment->id]} not indexed, as it contains too many unique words to be indexed";
+ if ( $dbh->err == 7 && $dbh->state eq '54000' ) {
+ warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words";
+ } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) {
+ warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes";
} else {
die "error: ". $dbh->errstr;
}
+
+ # Insert an empty tsvector, so we count this row as "indexed"
+ # for purposes of knowing where to pick up
+ eval { $dbh->do( $query, undef, "", $attachment->id ) }
+ or die "Failed to insert empty tsvector: " . $dbh->errstr;
}
}
diff --git a/rt/sbin/rt-fulltext-indexer.in b/rt/sbin/rt-fulltext-indexer.in
index 06aa892..9ad6d26 100644
--- a/rt/sbin/rt-fulltext-indexer.in
+++ b/rt/sbin/rt-fulltext-indexer.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -374,11 +374,18 @@ sub process_pg {
my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) };
unless ( $status ) {
- if ($dbh->errstr =~ /string is too long for tsvector/) {
- warn "Attachment @{[$attachment->id]} not indexed, as it contains too many unique words to be indexed";
+ if ( $dbh->err == 7 && $dbh->state eq '54000' ) {
+ warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words";
+ } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) {
+ warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes";
} else {
die "error: ". $dbh->errstr;
}
+
+ # Insert an empty tsvector, so we count this row as "indexed"
+ # for purposes of knowing where to pick up
+ eval { $dbh->do( $query, undef, "", $attachment->id ) }
+ or die "Failed to insert empty tsvector: " . $dbh->errstr;
}
}
diff --git a/rt/sbin/rt-message-catalog b/rt/sbin/rt-message-catalog
index 070f6b2..b31b58d 100755
--- a/rt/sbin/rt-message-catalog
+++ b/rt/sbin/rt-message-catalog
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-preferences-viewer.in b/rt/sbin/rt-preferences-viewer.in
index 1c32f87..d32588e 100644
--- a/rt/sbin/rt-preferences-viewer.in
+++ b/rt/sbin/rt-preferences-viewer.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-server.fcgi.in b/rt/sbin/rt-server.fcgi.in
index f84f6c1..632ba0b 100644
--- a/rt/sbin/rt-server.fcgi.in
+++ b/rt/sbin/rt-server.fcgi.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) {
require RT;
RT->LoadConfig();
+RT->InitPluginPaths();
RT->InitLogging();
require Module::Refresh if RT->Config->Get('DevelMode');
diff --git a/rt/sbin/rt-server.in b/rt/sbin/rt-server.in
index f84f6c1..632ba0b 100644
--- a/rt/sbin/rt-server.in
+++ b/rt/sbin/rt-server.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) {
require RT;
RT->LoadConfig();
+RT->InitPluginPaths();
RT->InitLogging();
require Module::Refresh if RT->Config->Get('DevelMode');
diff --git a/rt/sbin/rt-session-viewer b/rt/sbin/rt-session-viewer
index 4a9cf09..1a6334d 100755
--- a/rt/sbin/rt-session-viewer
+++ b/rt/sbin/rt-session-viewer
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-session-viewer.in b/rt/sbin/rt-session-viewer.in
index 37e050a..cdf7a77 100644
--- a/rt/sbin/rt-session-viewer.in
+++ b/rt/sbin/rt-session-viewer.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in
index 2efb9f3..f1e35f5 100644
--- a/rt/sbin/rt-setup-database.in
+++ b/rt/sbin/rt-setup-database.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -206,7 +206,7 @@ foreach my $action ( @actions ) {
sub action_create {
my %args = @_;
my $dbh = get_system_dbh();
- my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'pre' );
+ my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'create' );
return ($status, $msg) unless $status;
print "Now creating a $db_type database $db_name for RT.\n";
@@ -234,7 +234,7 @@ END
sub action_schema {
my %args = @_;
my $dbh = get_admin_dbh();
- my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'pre' );
+ my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'schema' );
return ($status, $msg) unless $status;
print "Now populating database schema.\n";
@@ -244,7 +244,7 @@ sub action_schema {
sub action_acl {
my %args = @_;
my $dbh = get_admin_dbh();
- my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'pre' );
+ my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'acl' );
return ($status, $msg) unless $status;
print "Now inserting database ACLs.\n";
@@ -257,7 +257,7 @@ sub action_coredata {
$RT::Handle->dbh( undef );
RT::ConnectToDatabase();
RT::InitLogging();
- my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'pre' );
+ my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'coredata' );
return ($status, $msg) unless $status;
print "Now inserting RT core system objects.\n";
@@ -268,7 +268,7 @@ sub action_insert {
my %args = @_;
$RT::Handle = RT::Handle->new;
RT::Init();
- my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'pre' );
+ my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'insert' );
return ($status, $msg) unless $status;
print "Now inserting data.\n";
@@ -308,6 +308,7 @@ sub action_upgrade {
return (0, "Couldn't read dir '$base_dir' with upgrade data")
unless -d $base_dir || -r _;
+ my $version_word_regex = join '|', RT::Handle->version_words;
my $upgrading_from = undef;
do {
if ( defined $upgrading_from ) {
@@ -318,7 +319,7 @@ sub action_upgrade {
$upgrading_from = scalar <STDIN>;
chomp $upgrading_from;
$upgrading_from =~ s/\s+//g;
- } while $upgrading_from !~ /^\d+\.\d+\.\w+$/;
+ } while $upgrading_from !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/;
my $upgrading_to = $RT::VERSION;
return (0, "The current version $upgrading_to is lower than $upgrading_from")
@@ -353,7 +354,7 @@ sub action_upgrade {
chomp $custom_upgrading_to;
$custom_upgrading_to =~ s/\s+//g;
last unless $custom_upgrading_to;
- } while $custom_upgrading_to !~ /^\d+\.\d+\.\w+$/;
+ } while $custom_upgrading_to !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/;
if ( $custom_upgrading_to ) {
return (
diff --git a/rt/sbin/rt-setup-fulltext-index b/rt/sbin/rt-setup-fulltext-index
index 8625815..ef9b7d5 100755
--- a/rt/sbin/rt-setup-fulltext-index
+++ b/rt/sbin/rt-setup-fulltext-index
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-setup-fulltext-index.in b/rt/sbin/rt-setup-fulltext-index.in
index da8089d..eab7203 100644
--- a/rt/sbin/rt-setup-fulltext-index.in
+++ b/rt/sbin/rt-setup-fulltext-index.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-shredder.in b/rt/sbin/rt-shredder.in
index c0655db..e7910e5 100755
--- a/rt/sbin/rt-shredder.in
+++ b/rt/sbin/rt-shredder.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in
index 5ce918b..df1ef13 100644
--- a/rt/sbin/rt-test-dependencies.in
+++ b/rt/sbin/rt-test-dependencies.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -52,6 +52,7 @@
#
use strict;
+use warnings;
no warnings qw(numeric redefine);
use Getopt::Long;
my %args;
@@ -293,6 +294,7 @@ Log::Dispatch::Perl
Test::WWW::Mechanize::PSGI
Plack::Middleware::Test::StashWarnings 0.06
Test::LongString
+Test::NoWarnings
.
$deps{'FASTCGI'} = [ text_to_hash( << '.') ];
@@ -340,7 +342,7 @@ Net::SMTP
.
$deps{'DASHBOARDS'} = [ text_to_hash( << '.') ];
-HTML::RewriteAttributes 0.04
+HTML::RewriteAttributes 0.05
MIME::Types
URI 1.59
.
@@ -361,13 +363,14 @@ Convert::Color
.
$deps{'HTML-DOC'} = [ text_to_hash( <<'.') ];
-Pod::Simple 3.17
+Pod::Simple 3.24
HTML::Entities
.
my %AVOID = (
'DBD::Oracle' => [qw(1.23)],
'Email::Address' => [qw(1.893 1.894)],
+ 'Devel::StackTrace' => [qw(1.28 1.29)],
);
if ($args{'download'}) {
diff --git a/rt/sbin/rt-validate-aliases.in b/rt/sbin/rt-validate-aliases.in
index 46ae8aa..5dbfaa4 100644
--- a/rt/sbin/rt-validate-aliases.in
+++ b/rt/sbin/rt-validate-aliases.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
diff --git a/rt/sbin/rt-validator.in b/rt/sbin/rt-validator.in
index 331d5f3..d902801 100644
--- a/rt/sbin/rt-validator.in
+++ b/rt/sbin/rt-validator.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -894,7 +894,7 @@ push @CHECKS, 'LastUpdatedBy and Creator' => sub {
'Replace',
"Column $column should point to a user, but there is record #$id in table $table\n"
."where it's not true. It's ok to replace these wrong references with id of any user.\n"
- ."Note that id you enter is not checked. You can peak any user from your DB, but it's\n"
+ ."Note that id you enter is not checked. You can pick any user from your DB, but it's\n"
."may be better to create a special user for this, for example 'user_that_has_been_deleted'\n"
."or something like that.",
"$table.$column -> user #$prop{$column}"
@@ -1163,12 +1163,12 @@ records or ressurect accidentally deleted.
mandatory.
- it's equall to -c
+ it's equal to -c
=item verbose
print additional info to STDOUT
- it's equall to -v
+ it's equal to -v
=item resolve
diff --git a/rt/sbin/standalone_httpd b/rt/sbin/standalone_httpd
index cef0f31..5bc8d0c 100755
--- a/rt/sbin/standalone_httpd
+++ b/rt/sbin/standalone_httpd
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) {
require RT;
RT->LoadConfig();
+RT->InitPluginPaths();
RT->InitLogging();
require Module::Refresh if RT->Config->Get('DevelMode');
diff --git a/rt/sbin/standalone_httpd.in b/rt/sbin/standalone_httpd.in
index f84f6c1..632ba0b 100644
--- a/rt/sbin/standalone_httpd.in
+++ b/rt/sbin/standalone_httpd.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) {
require RT;
RT->LoadConfig();
+RT->InitPluginPaths();
RT->InitLogging();
require Module::Refresh if RT->Config->Get('DevelMode');