[Rt-commit] rtir branch, 4.0-trunk, created. 4.0.0

Shawn Moore shawn at bestpractical.com
Wed Jul 20 12:48:54 EDT 2016


The branch, 4.0-trunk has been created
        at  2d500a438711a4c38eed429a8c97e95a60d8ba0e (commit)

- Log -----------------------------------------------------------------
commit bbef5a190c0cc392b8dfb8dc1bbf4887897d5655
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jun 22 19:11:40 2016 -0400

    Fixup POD errors in Net::Whois::RIPE docs
    
    Fixes: I#32020

diff --git a/lib/Net/Whois/RIPE/Iterator.pod b/lib/Net/Whois/RIPE/Iterator.pod
index e24a10e..588d489 100644
--- a/lib/Net/Whois/RIPE/Iterator.pod
+++ b/lib/Net/Whois/RIPE/Iterator.pod
@@ -21,6 +21,8 @@ Implements an iterator for Net::Whois::RIPE::Objects.
 
 =head1 CONSTRUCTOR
 
+=over 4
+
 =item B<new (WHOIS, QUERY)>
 
 The constructor returns undef on failure. If B<debug> is on then a message
@@ -31,8 +33,12 @@ I<WHOIS> is an object of class I<Net::Whois::RIPE>
 I<QUERY> is a query string to be sent to the I<WHOIS> object to
 retrieve the whois objects.
 
+=back
+
 =head1 METHODS
 
+=over 4
+
 =item B<next()>
 
 Returns the next I<Net::Whois::RIPE::Object> from the query.
@@ -46,6 +52,8 @@ Sets/gets debugging level on the class or an object.
  0 - no debugging
  1 - debugging on
 
+=back
+
 =head1 AUTHOR
 
  Kevin Baker, <shagol at users.sourceforge.net>
diff --git a/lib/Net/Whois/RIPE/Object.pod b/lib/Net/Whois/RIPE/Object.pod
index 43c56c2..ed77b92 100644
--- a/lib/Net/Whois/RIPE/Object.pod
+++ b/lib/Net/Whois/RIPE/Object.pod
@@ -79,14 +79,20 @@ Attributes that had a dash '-' are converted to underscore '_' for method names.
 
 =head1 CONSTRUCTOR
 
+=over 4
+
 =item B<new(HANDLE)>
 
 Creates a new RIPE object. Attempts to parse lines from I<HANDLE>. Any
 parsing failure causes the constructor to return undef. Error messages are
 available via B<errstr>. I<HANDLE> may be a file handle or a socket.
 
+=back
+
 =head1 METHODS
 
+=over 4
+
 =item B<content()>
 
 Returns the raw output from the whois server. In a list context it
@@ -130,6 +136,8 @@ Returns 1 if no errors defined, 0 otherwise
 
 Sets/gets the debug level.
 
+=back
+
 =head1 CAVEATS
 
 =head1 AUTHOR
@@ -143,8 +151,6 @@ Sets/gets the debug level.
 
  Net::Whois::RIPE
 
-=cut
-
 =head1 COPYRIGHT
 
  Copyright (C) 1999 Paul Gampe and APNIC Pty. Ltd.

commit 963a483754b5bad43d34f78a95ff523eb82b1cd0
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 6 15:57:40 2016 -0400

    RTIR 4.0.0rc2 requires the RT 4.4.1rc2 we're shipping simultaneously

diff --git a/META.yml b/META.yml
index b2e8b05..c57aec9 100644
--- a/META.yml
+++ b/META.yml
@@ -34,5 +34,5 @@ resources:
   license: http://opensource.org/licenses/gpl-license.php
 version: 4.0.0rc1
 x_module_install_rtx_version: '0.37'
-x_requires_rt: 4.4.1rc1
+x_requires_rt: 4.4.1rc2
 x_rt_too_new: 4.6.0
diff --git a/Makefile.PL b/Makefile.PL
index 87e99c9..0052040 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,7 +6,7 @@ author('Best Practical Solutions <sales at bestpractical.com>');
 all_from('lib/RT/IR.pm');
 
 # update README and docs/UPGRADING
-requires_rt('4.4.1rc1');
+requires_rt('4.4.1rc2');
 rt_too_new('4.6.0',"\nThis version of RTIR is only compatible with RT 4.4.x and you are using RT %s\n");
 
 # XXX: This should be reported by M::I::RTx

commit d2468820efd0f59d038890c42dc2344e05f22e94
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 6 15:58:23 2016 -0400

    Bump version to 4.0.0rc2

diff --git a/META.yml b/META.yml
index c57aec9..ee2074d 100644
--- a/META.yml
+++ b/META.yml
@@ -32,7 +32,7 @@ requires:
   perl: 5.10.1
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 4.0.0rc1
+version: 4.0.0rc2
 x_module_install_rtx_version: '0.37'
 x_requires_rt: 4.4.1rc2
 x_rt_too_new: 4.6.0
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 8c208f6..502dde9 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -51,7 +51,7 @@ use 5.008003;
 use strict;
 use warnings;
 
-our $VERSION = '4.0.0rc1';
+our $VERSION = '4.0.0rc2';
 
 use Scalar::Util qw(blessed);
 

commit 909c7d4d2fcdfd58f22b32ad9124702c6ea45f8e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 8 13:06:07 2016 -0400

    Suppress lookup and other RTIR auto linking in SelfService
    
    SelfService users don't have access to the lookup tool or other
    resources automatically linked to with the RTIR MakeClicky
    code, so skip it for SelfService.
    
    Fixes: I#31868

diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 2b08856..c3ac85f 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -57,13 +57,19 @@ my $escaper = sub {
 
 my %super = %{$ARGS{actions}};
 
+# Don't show links in the Self Service interface
+my $SelfService = 0;
+my $request_path = $HTML::Mason::Commands::r->path_info;
+$request_path =~ s!/{2,}!/!g;
+$SelfService = 1 if $request_path =~ m{^/SelfService/};
+
 my %actions;
 %actions = (
     default => sub {
         my %args = @_;
         $args{value} = $escaper->($args{value});
-        # don't execute on non-rtir tickets
-        return $args{value} unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $args{value} unless defined $args{type} and !$SelfService;
         return qq{<a href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."q=".$args{value}).qq{">$args{value}</a>};
     },
     url => sub {
@@ -73,8 +79,8 @@ my %actions;
         my $escaped_host = $escaper->($host);
         my $super = $super{url} ? $super{url}->(%args) : $escaper->($args{value});
 
-        # don't execute on non-rtir tickets
-        return $super unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $super unless defined $args{type} and !$SelfService;
 
         my $result = qq{<a class="button" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
             .loc('lookup "[_1]"', $host) .qq{</a>};
@@ -87,8 +93,8 @@ my %actions;
         my $escaped_host = $escaper->($host);
         my $super = $super{url_overwrite} ? $super{url_overwrite}->(%args) : $escaper->($args{value});
 
-        # don't execute on non-rtir tickets
-        return $super unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $super unless defined $args{type} and !$SelfService;
 
         my $result = qq{<a class="button" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
             .loc('lookup "[_1]"', $host) .qq{</a>};
@@ -97,8 +103,8 @@ my %actions;
     ip => sub {
         my %args = @_;
 
-        # don't execute on non-rtir tickets
-        return $escaper->($args{value}) unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         $args{host} ||= $args{value};
         my $escaped_host = $escaper->($args{host});
@@ -123,8 +129,8 @@ my %actions;
     ipdecimal => sub {
         my %args = @_;
 
-        # don't execute on non-rtir tickets
-        return $escaper->($args{value}) unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         my $i = unpack "L",$args{value};
         return $args{value} unless $args{value} > 33554432;
@@ -142,8 +148,8 @@ my %actions;
     email => sub {
         my %args = @_;
 
-        # don't execute on non-rtir tickets
-        return $escaper->($args{value}) unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         my $email = $args{'value'}; $email =~ s/^<|>$//g;
         my $escaped_email = $escaper->($email);
@@ -172,8 +178,8 @@ my %actions;
     noc => sub {
         my %args = @_;
 
-        # don't execute on non-rtir tickets
-        return $escaper->($args{value}) unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         $args{value} = $escaper->($args{value});
         my $result = qq{<a class="button" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
@@ -183,8 +189,8 @@ my %actions;
     host => sub {
         my %args = @_;
 
-        # don't execute on non-rtir tickets
-        return $escaper->($args{value}) unless defined $args{type};
+        # don't execute on non-rtir tickets or in SelfService
+        return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
 
         $args{value} = $escaper->($args{value});
         my $result = qq{<a class="button" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}

commit d60ae1fafc092f69fcde83e5ed588a9aeae294a5
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 13 20:01:02 2016 +0000

    Avoid error when all queues of a type are disabled
    
        In particular when the Countermeasures queue is disabled,
        $cache{countermeasures} will be undef (because it's not returned in the
        RT::IR::Queues function), so using array dereference on undef throws an
        error. This manifests itself by throwing an error while displaying
        custom field value changes on /RTIR/Display.html.

diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 502dde9..04980c4 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -710,9 +710,9 @@ sub CustomFields {
 
     my @list;
     if ( $type ) {
-        @list = (@{ $cache{'Global'} }, @{ $cache{$type} });
+        @list = (@{ $cache{'Global'} }, @{ $cache{$type} || [] });
     } else {
-        @list = (@{ $cache{'Global'} }, map { @$_ } @cache{values %TYPE});
+        @list = (@{ $cache{'Global'} }, map { @{ $_ || [] } } @cache{values %TYPE});
     }
 
     if ( my $field = $arg{'Field'} ) {

commit c09cf6fe97fbce49c528aa838c5fe107a5ff51fb
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Fri Jul 15 16:24:24 2016 +0000

    Avoid double concatenation if ?id=X on txn anchors
    
        RT's /Elements/ShowTransaction already appends ?id=X#txn-Y to
        the DisplayPath URL.
    
        This better matches how UpdatePath, ForwardPath, EncryptionPath
        are specified.

diff --git a/html/Callbacks/RTIR/Helpers/TicketHistory/ExtraShowHistoryArguments b/html/Callbacks/RTIR/Helpers/TicketHistory/ExtraShowHistoryArguments
index 160f3d2..bf3bf59 100644
--- a/html/Callbacks/RTIR/Helpers/TicketHistory/ExtraShowHistoryArguments
+++ b/html/Callbacks/RTIR/Helpers/TicketHistory/ExtraShowHistoryArguments
@@ -51,11 +51,11 @@ return unless $type;
 
 my $id = $Ticket->Id;
 %$ExtraArgs = (
-        DisplayPath    => RT::IR->HREFTo("Display.html?id=$id"),
-        UpdatePath     =>  RT::IR->HREFTo("Update.html"),
+        DisplayPath    => RT::IR->HREFTo("Display.html"),
+        UpdatePath     => RT::IR->HREFTo("Update.html"),
         ForwardPath    => RT::IR->HREFTo("Forward.html"),
-        EncryptionPath =>  RT::IR->HREFTo("Crypt.html"),
-        (($type eq "Incident") ? () : (WarnUnsigned   => 1)),
+        EncryptionPath => RT::IR->HREFTo("Crypt.html"),
+        (($type eq "Incident") ? () : (WarnUnsigned => 1)),
         PathPrefix     => RT->Config->Get('WebPath') ."/Ticket/",
 );
 
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index f3f8d83..8801902 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -158,7 +158,7 @@
     <& /Elements/ShowHistory,
         Object         => $Ticket,
         ShowHeaders    => $ARGS{'ShowHeaders'},
-        DisplayPath    => RT::IR->HREFTo("Display.html?id=$id"),
+        DisplayPath    => RT::IR->HREFTo("Display.html"),
         UpdatePath     => RT::IR->HREFTo("Update.html"),
         ForwardPath    => RT::IR->HREFTo("Forward.html"),
         EncryptionPath => RT::IR->HREFTo("Crypt.html"),
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 9c823fd..d489c48 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -161,7 +161,7 @@
     <& /Elements/ShowHistory,
         Object         => $TicketObj,
         ShowHeaders    => $ARGS{'ShowHeaders'},
-        DisplayPath    => RT::IR->HREFTo("Display.html?id=$id"),
+        DisplayPath    => RT::IR->HREFTo("Display.html"),
         UpdatePath     => RT::IR->HREFTo("Update.html"),
         ForwardPath    => RT::IR->HREFTo("Forward.html"),
         EncryptionPath => RT::IR->HREFTo("Crypt.html"),

commit 8c9ada74723062bb738d09de3d04ae673610d2cd
Merge: d246882 909c7d4
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Fri Jul 15 17:10:06 2016 +0000

    Merge branch '4.0/hide-lookup-on-selfservice' into 4.0.0-releng


commit 235fa2d7cbe823f5727c8fcc2d9b4c250c764f39
Merge: 8c9ada7 c09cf6f
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Fri Jul 15 20:13:51 2016 +0000

    Merge branch '4.0.0/displaypath-double-id' into 4.0.0-releng


commit 4c4974007b00363f7e15fb9ebc4b968c0c27b1c8
Merge: 235fa2d d60ae1f
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Fri Jul 15 20:17:45 2016 +0000

    Merge branch '4.0.0/disabled-queue' into 4.0.0-releng


commit 0b6e6c212df0cd83f91fe37004a4c5cc4cacc0da
Merge: 4c49740 bbef5a1
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Fri Jul 15 20:21:32 2016 +0000

    Merge branch '4.0.0/pod-errors' into 4.0.0-releng


commit 4269509eec8f14ccf8e32169ea2b5c47448f4a71
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Jul 8 14:56:27 2016 -0400

    Allow users to set SLA on create, view the value, and update
    
    Update create, update, and diplay pages to handle SLA as
    an attribute of a ticket rather than a custom field in RT.
    
    Fixes: I#32167

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 21e6000..dfd4ee3 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -128,6 +128,18 @@
             },
         },
         { special => 'roles' },
+
+        $QueueObj->SLADisabled ? () : (
+        {   name => 'SLA',
+            comp => '/Elements/SelectSLA',
+            args => {
+                Name => 'SLA',
+                Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
+                DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
+                QueueObj => $QueueObj,
+            },
+        }),
+
     ],
   &>
 
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index f3f8d83..481cb7d 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -82,6 +82,12 @@
       <% $Ticket->Status %>
     </td>
   </tr>
+% if ( !$Ticket->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><% loc($Ticket->SLA) %></td>
+  </tr>
+% }
   <tr>
     <td class="label"><% loc("Incident") %>:</td>
     <td class="value">
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index c75d0b1..9347c53 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -102,10 +102,15 @@
         Constituency => RT::IR->ConstituencyFor($Ticket)
     &></td>
   </tr>
-
-
-
-
+% if ( !$Ticket->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><& /Elements/SelectSLA,
+        Name => 'SLA',
+        Default => loc($Ticket->SLA)
+    &></td>
+  </tr>
+% }
 % if (!RT::IR->IsIncidentQueue($Ticket->QueueObj) ) {
   <tr class="incidents">
     <td class="label"><%loc("Incident")%>:</td>
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 91d2306..330dcbb 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -139,6 +139,17 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
         Default  => $ARGS{'Owner'} || $session{'CurrentUser'}->Id
     &></td>
 % }
+% if ( !$QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><& /Elements/SelectSLA,
+        Name         => 'SLA',
+        Default      => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
+        DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
+        QueueObj     => $QueueObj,
+    &></td>
+  </tr>
+% }
 </tr>
 
 <& /RTIR/Elements/EditCustomFields, 
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 9c823fd..51dbbe4 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -87,6 +87,12 @@
       <% $TicketObj->Status %>
     </td>
   </tr>
+% if ( !$TicketObj->QueueObj->SLADisabled ) {
+  <tr class="sla">
+    <td class="label"><&|/l&>SLA</&>:</td>
+    <td class="value"><% loc($TicketObj->SLA) %></td>
+  </tr>
+% }
   <tr>
     <td class="label"><&|/l&>Owner</&>:</td>
     <td class="value"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></td>

commit 8485c559227c1b16bdb2fc5a213abd1161fa161f
Merge: 0b6e6c2 4269509
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Jul 19 15:17:48 2016 +0000

    Merge branch '4.0/show-sla' into 4.0.0-releng


commit 269d8b8dac99071533dfebe5d0ae0d027e371272
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Jul 19 19:19:07 2016 +0000

    Fix search builder for non-root WebPath
    
        $r->path_info doesn't include WebPath, so submitting the query builder
        form lands you on http://example.com/RTIR/Search/Results.html
        regardless of whether RT is hosted at /rt, /rtir, etc.

diff --git a/html/RTIR/Search/Elements/BuildQuery b/html/RTIR/Search/Elements/BuildQuery
index 6dc433c..402e78c 100644
--- a/html/RTIR/Search/Elements/BuildQuery
+++ b/html/RTIR/Search/Elements/BuildQuery
@@ -50,7 +50,7 @@
 %# XXX TODO - this really ought to use HREFTo, but to do that
 %# we'd need to strip off the RTIR UIR prefix
 <div class="search-form">
-<form method="post" action="<% $r->path_info %>" name="BuildQuery" id="BuildQuery">
+<form method="post" action="<% RT->Config->Get('WebPath') %><% $r->path_info %>" name="BuildQuery" id="BuildQuery">
 <input type="hidden" class="hidden" name="SavedSearchId" value="<% $saved_search{'Id'} %>" />
 <input type="hidden" class="hidden" name="ResultPage" value="<% $ResultPage %>" />
 <input type="hidden" class="hidden" name="BaseQuery" value="<% $BaseQuery %>" />

commit 51166b6e9649a76b3c34a84b6eebec23d46e9112
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 20 12:02:33 2016 -0400

    RT 3.4.1 is being released, so make that the minimum version

diff --git a/Makefile.PL b/Makefile.PL
index 0052040..20763ab 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,7 +6,7 @@ author('Best Practical Solutions <sales at bestpractical.com>');
 all_from('lib/RT/IR.pm');
 
 # update README and docs/UPGRADING
-requires_rt('4.4.1rc2');
+requires_rt('4.4.1');
 rt_too_new('4.6.0',"\nThis version of RTIR is only compatible with RT 4.4.x and you are using RT %s\n");
 
 # XXX: This should be reported by M::I::RTx

commit a7b12be4f66e6c80e594f6fa4409c73b6a1254de
Merge: 51166b6 269d8b8
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Wed Jul 20 16:14:24 2016 +0000

    Merge branch '4.0.0/search-webpath' into 4.0.0-releng


commit 76aa1bd4e2843c44af63b429408902380015f5e2
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 20 16:23:02 2016 +0000

    Regenerate toolchain

diff --git a/META.yml b/META.yml
index ee2074d..3a486b6 100644
--- a/META.yml
+++ b/META.yml
@@ -33,6 +33,6 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
 version: 4.0.0rc2
-x_module_install_rtx_version: '0.37'
-x_requires_rt: 4.4.1rc2
+x_module_install_rtx_version: '0.38'
+x_requires_rt: 4.4.1
 x_rt_too_new: 4.6.0
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 97acf77..80538d3 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.37';
+our $VERSION = '0.38';
 
 use FindBin;
 use File::Glob     ();
@@ -37,6 +37,13 @@ sub RTx {
     }
     $self->add_metadata("x_module_install_rtx_version", $VERSION );
 
+    my $installdirs = $ENV{INSTALLDIRS};
+    for ( @ARGV ) {
+        if ( /INSTALLDIRS=(.*)/ ) {
+            $installdirs = $1;
+        }
+    }
+
     # Try to find RT.pm
     my @prefixes = qw( /opt /usr/local /home /usr /sw /usr/share/request-tracker4);
     $ENV{RTHOME} =~ s{/RT\.pm$}{} if defined $ENV{RTHOME};
@@ -71,7 +78,13 @@ sub RTx {
 
     # Installation locations
     my %path;
-    $path{$_} = $RT::LocalPluginPath . "/$name/$_"
+    my $plugin_path;
+    if ( $installdirs && $installdirs eq 'vendor' ) {
+        $plugin_path = $RT::PluginPath;
+    } else {
+        $plugin_path = $RT::LocalPluginPath;
+    }
+    $path{$_} = $plugin_path . "/$name/$_"
         foreach @DIRS;
 
     # Copy RT 4.2.0 static files into NoAuth; insufficient for
@@ -85,7 +98,7 @@ sub RTx {
     my %index = map { $_ => 1 } @INDEX_DIRS;
     $self->no_index( directory => $_ ) foreach grep !$index{$_}, @DIRS;
 
-    my $args = join ', ', map "q($_)", map { ($_, $path{$_}) }
+    my $args = join ', ', map "q($_)", map { ($_, "\$(DESTDIR)$path{$_}") }
         sort keys %path;
 
     printf "%-10s => %s\n", $_, $path{$_} for sort keys %path;
@@ -131,6 +144,7 @@ install ::
     if ( $path{lib} ) {
         $self->makemaker_args( INSTALLSITELIB => $path{'lib'} );
         $self->makemaker_args( INSTALLARCHLIB => $path{'lib'} );
+        $self->makemaker_args( INSTALLVENDORLIB => $path{'lib'} )
     } else {
         $self->makemaker_args( PM => { "" => "" }, );
     }
@@ -139,6 +153,13 @@ install ::
     $self->makemaker_args( INSTALLSITEMAN3DIR => "$RT::LocalPath/man/man3" );
     $self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
 
+    # INSTALLDIRS=vendor should install manpages into /usr/share/man.
+    # That is the default path in most distributions. Need input from
+    # Redhat, Centos etc.
+    $self->makemaker_args( INSTALLVENDORMAN1DIR => "/usr/share/man/man1" );
+    $self->makemaker_args( INSTALLVENDORMAN3DIR => "/usr/share/man/man3" );
+    $self->makemaker_args( INSTALLVENDORARCH => "/usr/share/man" );
+
     if (%has_etc) {
         print "For first-time installation, type 'make initdb'.\n";
         my $initdb = '';
@@ -258,4 +279,4 @@ sub _load_rt_handle {
 
 __END__
 
-#line 390
+#line 428

commit 2d500a438711a4c38eed429a8c97e95a60d8ba0e
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jul 20 16:24:01 2016 +0000

    Bump to 4.0.0

diff --git a/META.yml b/META.yml
index 3a486b6..107f45c 100644
--- a/META.yml
+++ b/META.yml
@@ -32,7 +32,7 @@ requires:
   perl: 5.10.1
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 4.0.0rc2
+version: 4.0.0
 x_module_install_rtx_version: '0.38'
 x_requires_rt: 4.4.1
 x_rt_too_new: 4.6.0
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 04980c4..eb2b05e 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -51,7 +51,7 @@ use 5.008003;
 use strict;
 use warnings;
 
-our $VERSION = '4.0.0rc2';
+our $VERSION = '4.0.0';
 
 use Scalar::Util qw(blessed);
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list