Skip to content

Commit

Permalink
Merge branch '5.0-trunk'
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Aug 17, 2023
2 parents f4fc3db + 0072407 commit 5585771
Show file tree
Hide file tree
Showing 80 changed files with 1,862 additions and 532 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/github-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
run: |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV
echo "DOCKER_BUILDKIT=0" >> $GITHUB_ENV
- name: Check out RT
uses: actions/checkout@v2
- name: Cache .prove state
Expand Down Expand Up @@ -57,14 +58,15 @@ jobs:
fields: |
[{ "title": "Configuration", "value": "RT Server, SQLite", "short": true },
{ "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }]
rt_test_mariadb:
rt_test_mariadb_apache_proxy_fcgi:
runs-on: ubuntu-latest
steps:
- name: Set up for tests
shell: bash
run: |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV
echo "DOCKER_BUILDKIT=0" >> $GITHUB_ENV
- name: Checkout RT
uses: actions/checkout@v2
- name: Cache .prove state
Expand All @@ -80,10 +82,11 @@ jobs:
docker run --network rt --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:10.6
docker build --network rt -t rt-base .
docker run -d -v $GITHUB_WORKSPACE:/rt --env RT_TEST_DB_HOST=mariadb --env RT_TEST_RT_HOST=172.16.0.0/255.240.0.0 --network rt --name rt rt-base
docker exec rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps"
docker exec rt bash -c "chown -R rt-user /rt; touch /etc/apache2/mime.types"
docker exec -e USER=rt-user -u rt-user rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --enable-gpg --enable-smime && mkdir -p /rt/var && make testdeps && chmod a+rX /rt/sbin/*"
- name: Run RT tests
shell: bash
run: docker exec rt bash -c "cd /rt && RT_TEST_PARALLEL_NUM=5 make test-parallel"
run: docker exec -e RT_TEST_WEB_HANDLER=apache+proxy_fcgi -e HTTPD_ROOT=/etc/apache2 -e RT_TEST_APACHE=/usr/sbin/apache2 -e RT_TEST_APACHE_MODULES=/usr/lib/apache2/modules -u rt-user rt bash -c "cd /rt && RT_TEST_PARALLEL_NUM=5 make test-parallel"
- name: Get run time
if: always()
shell: bash
Expand All @@ -108,7 +111,7 @@ jobs:
failure_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests failed in ${env.RT_GA_TEST_TIME}'
cancelled_text: '${env.RT_BRANCH_NAME} (${env.GITHUB_RUN_NUMBER}) tests cancelled in ${env.RT_GA_TEST_TIME}'
fields: |
[{ "title": "Configuration", "value": "RT Server, MariaDB 10.6", "short": true },
[{ "title": "Configuration", "value": "Apache mod_proxy_fcgi, MariaDB 10.6", "short": true },
{ "title": "URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}?check_suite_focus=true", "short": true }]
rt_test_mysql8:
runs-on: ubuntu-latest
Expand All @@ -118,6 +121,7 @@ jobs:
run: |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV
echo "DOCKER_BUILDKIT=0" >> $GITHUB_ENV
- name: Checkout RT
uses: actions/checkout@v2
- name: Cache .prove state
Expand Down Expand Up @@ -171,6 +175,7 @@ jobs:
run: |
echo "RT_BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "RT_GA_START_TIME=$(date +%s)" >> $GITHUB_ENV
echo "DOCKER_BUILDKIT=0" >> $GITHUB_ENV
- name: Checkout RT
uses: actions/checkout@v2
- name: Cache .prove state
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/t/security/embargo/
/t/tmp/
/sbin/rt-attributes-viewer
/sbin/rt-clean-attributes
/sbin/rt-clean-sessions
/sbin/rt-clean-shorteners
/sbin/rt-dump-database
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is for testing only.

FROM bpssysadmin/rt-base-debian:RT-5.0.3-buster-20230421
FROM bpssysadmin/rt-base-debian:RT-5.0.4-buster-20230703

ENV RT_TEST_PARALLEL 1
ENV RT_TEST_DEVEL 1
Expand Down
3 changes: 2 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ BINARIES = $(RT_MAILGATE_BIN) \
$(RT_CRON_BIN)

SYSTEM_BINARIES = rt-attributes-viewer \
rt-munge-attachments \
rt-clean-attributes \
rt-clean-sessions \
rt-clean-shorteners \
rt-dump-initialdata \
rt-dump-metadata \
rt-email-dashboards \
Expand All @@ -151,6 +151,7 @@ SYSTEM_BINARIES = rt-attributes-viewer \
rt-fulltext-indexer \
rt-importer \
rt-ldapimport \
rt-munge-attachments \
rt-passwd \
rt-preferences-viewer \
rt-search-attributes \
Expand Down
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ o Perl 5.10.1 or later (http://www.perl.org).

o A supported SQL database

Currently supported: MySQL 5.7 with InnoDB support
Currently supported: MySQL 5.7, 8 with InnoDB support
MariaDB 10.2 or later with InnoDB support
Postgres 9.5 or later
Oracle 12c or later
Expand Down Expand Up @@ -244,8 +244,8 @@ GENERAL INSTALLATION
Add the following lines to /etc/aliases (or your local equivalent)
on your mail server:

rt: "|/opt/rt5/bin/rt-mailgate --queue general --action correspond --url http://rt.example.com/"
rt-comment: "|/opt/rt5/bin/rt-mailgate --queue general --action comment --url http://rt.example.com/"
rt: "|/opt/rt5/bin/rt-mailgate --queue general --action correspond --url http://rt.example.com"
rt-comment: "|/opt/rt5/bin/rt-mailgate --queue general --action comment --url http://rt.example.com"

You'll need to add similar lines for each queue you want to be able to
send email to. To find out more about how to configure RT's email
Expand Down
3 changes: 1 addition & 2 deletions README.MySQL
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ because this is the first version to provide full support for 4 byte
utf8 characters in tables and indexes. Read on for details on this
change.

Note that MySQL 8 is not yet supported because of changes to the group
keyword.
Starting with RT version 5.0.4, MySQL 8 is also supported.

RT 5.0.0 now defaults MySQL tables to utf8mb4, which is available in
versions before 5.7.7. However, before MySQL version 5.7.7, utf8mb4
Expand Down
6 changes: 3 additions & 3 deletions bin/rt-mailgate.in
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ sub slurp_message {
Usual invocation (from MTA):

rt-mailgate --action (correspond|comment|...) --queue queuename
--url http://your.rt.server/
--url http://your.rt.server
[ --debug ]
[ --extension (queue|action|ticket) ]
[ --timeout seconds ]
Expand Down Expand Up @@ -416,10 +416,10 @@ monitoring. For instance, if you're using F</etc/aliases> and you have a
"bugs" queue, you will want something like this:

bugs: "|@RT_BIN_PATH_R@/rt-mailgate --queue bugs --action correspond
--url http://rt.mycorp.com/"
--url http://rt.mycorp.com"

bugs-comment: "|@RT_BIN_PATH_R@/rt-mailgate --queue bugs --action comment
--url http://rt.mycorp.com/"
--url http://rt.mycorp.com"

Note that you don't have to run your RT server on your mail server, as
the mail gateway will happily relay to a different machine.
Expand Down
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,8 @@ AC_CONFIG_FILES([
Makefile
etc/RT_Config.pm
lib/RT/Generated.pm
t/data/configs/apache2.2+mod_perl.conf
t/data/configs/apache2.2+fastcgi.conf
t/data/configs/apache2.4+mod_perl.conf
t/data/configs/apache2.4+fastcgi.conf
t/data/configs/apache2.4+proxy_fcgi.conf
t/data/configs/apache2.4+fcgid.conf],
)
AC_OUTPUT
5 changes: 5 additions & 0 deletions docs/UPGRADING-4.4
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,11 @@ we have replaced it with the GraphViz2 module.
Systems using C<--enable-graphviz> will be prompted to install the Perl
GraphViz2 module when upgrading.

=item * MySQL 8 now supported

Starting with RT 4.4.7, RT now supports MySQL 8. Note that as part of this upgrade
you also need to update the module L<DBIx::SearchBuilder>.

=back

=cut
11 changes: 11 additions & 0 deletions docs/UPGRADING-5.0
Original file line number Diff line number Diff line change
Expand Up @@ -606,4 +606,15 @@ custom field in articles.

=back

=head1 UPGRADING FROM 5.0.4 AND EARLIER

=over 4

=item * MySQL 8 now supported

Starting with RT 5.0.5, RT now supports MySQL 8. Note that as part of this upgrade
you also need to update the module L<DBIx::SearchBuilder>.

=back

=cut
51 changes: 47 additions & 4 deletions docs/query_builder.pod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ L<Dashboard and Reports|docs/dashboards_reporting.pod> document.

=head1 Basic Ticket Searches

Let's look for tickets in the "RT" queue (RT's bugtracker for itself) that have
Let's look for tickets in the "RT" queue (RT's bug tracker for itself) that have
been resolved in the last year. (These examples assume it's currently mid June,
2015). To do that, we specify the search criteria (Queue is RT, Status is
resolved, and Resolved after 2014-06-15) in the upper left hand section of the
Expand Down Expand Up @@ -262,7 +262,7 @@ directly into the Advanced search box.
Once you add a queue to your search using one of the options above, you'll see
any custom fields applied to those queues at the bottom of the list of values in
the Add Criteria section. To search for all tickets with a custom field that
has some value, pick the comparision ("matches", "is", etc.), add a value,
has some value, pick the comparison ("matches", "is", etc.), add a value,
and click "Add these terms" to build the search.

If you have a custom field named "Transport Type", for example, that has
Expand Down Expand Up @@ -388,7 +388,7 @@ changes made to a ticket through its life. Each of the entries displayed in the
ticket history at the bottom of the ticket display page is a transaction.

In some cases, RT users looking for a particular reply on a ticket will
search in their email client rather than in RT because they will remenber
search in their email client rather than in RT because they will remember
getting the email with the information they need. On a busy ticket, it
can be a challenge to find the reply from Jane some time this week. The
Transaction Query Builder now makes that sort of search easy.
Expand All @@ -409,7 +409,7 @@ Next, for Created select "after" and type "1 week ago". RT will then automatical
figure out the date 7 days ago and show you only results in the last 7 days.

Finally for Type select "is" and select "Correspond". Correspond is the name RT
users internally for all replies on a ticket.
uses internally for all replies on a ticket.

Run the search and you'll see all replies from Jane on any tickets over the
last week. Note that you'll see all transactions you have rights to see, even
Expand All @@ -433,6 +433,49 @@ you can type the following query directly in the Query box:
and then click "Apply" to let RT validate it. RT will display any syntax errors
if you make any mistakes so you can fix them.

=head2 Dynamic Search Values (Placeholders)

RT supports some dynamic search values, or placeholders, that change based on
some condition in RT. One placeholder is "__CurrentUser__", which is replaced
by the id of the currently logged in user when the search is run. For example,
you could create a search like this:

Owner = '__CurrentUser__' AND Status = '__Active__'

You can then put this on a shared dashboard and each logged-in user will see
a listing of tickets they own, without having to create a separate saved
search for each user. Note in the example above we also use the "__Active__"
placeholder, which automatically finds all active statuses for a given
lifecycle. If you look at the default RT homepage, you'll see the search
"10 highest priority tickets I own" is created with exactly this
search.

If you need the username of the current user rather than the id, you
can use "__CurrentUserName__".

The value "__SelectedUser__" is similar and it defaults to the current
user if run with a search by itself. However, if you create a dashboard,
add the component "SavedSearchSelectUser", and also add your saved search,
you can select a different user with the user search box on the page.
Once you select a new user, all searches on that dashboard will have
"__SelectedUser__" replaced by the user you selected. This makes it
easy to see tickets for other people, which can be useful for a project
manager or help desk supervisor to check on their team's tickets.

The default "Bookmarked Tickets" uses another placeholder, in this
case as a value for "id":

id = '__Bookmarked__'

That finds all tickets bookmarked by the current user. Bookmarks are
added using the bookmark icon in the menu on each ticket.

These search terms can be used with additional search terms like any
other search. So you could create a new saved search to show only your
new or open bookmarked tickets like this:

id = '__Bookmarked__' AND ( Status = "new" OR Status = "open" )

=head2 Valid Search Values

In the above example, search values like C<'resolved'>, C<'2019-04-01'>,
Expand Down
5 changes: 3 additions & 2 deletions docs/ticket_metadata.pod
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ will update itself with the opposite relationship).

=head2 Parent

Parent tickets have children tickets, all of which must be resolved before the
parent ticket can be resolved.
Parent tickets have children tickets, which perhaps were opened as a result of
investigating the parent ticket. Parent and children do not enforce a resolution
order.

How would one use this information in searches? Let's say you're using RT to
manage a release of the software your company makes. Often times release
Expand Down
46 changes: 40 additions & 6 deletions docs/web_deployment.pod
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,20 @@ C<mod_speling> will cause RT's CSS and JS to not be loaded, making RT
appear unstyled. C<mod_cache> will cache cookies, making users be
spontaneously logged in as other users in the system.

See also L<authentication/Apache configuration>, in case you intend to
See also L<authentication/Apache Configuration>, in case you intend to
use Apache to provide authentication.

=head3 prefork MPM
=head3 mod_fcgid

Apache can run with several different
L<Multi-Processing Modules (MPMs)|https://httpd.apache.org/docs/2.4/mpm.html>.
RT is designed to run only with the L<prefork MPM|https://httpd.apache.org/docs/2.4/mod/prefork.html>.
To use mod_fcgid, you need to run it with the L<prefork MPM|https://httpd.apache.org/docs/2.4/mod/prefork.html>.
Most Linux distributions today use the event MPM by default, so it is
important to make sure Apache is configured to use prefork on your RT
server. If you do not use prefork MPM, RT will start okay but fail under
production load, either because the web server crashes or performance
severely degrades.

=head3 mod_fcgid

B<WARNING>: Before mod_fcgid 2.3.6, the maximum request size was 1GB.
Starting in 2.3.6, this is now 128Kb. This is unlikely to be large
enough for any RT install that handles attachments. You can read more
Expand Down Expand Up @@ -80,6 +78,35 @@ to return to the old default.
</Location>
</VirtualHost>

=head3 mod_proxy_fcgi

This Apache module supports proxying requests via the FastCGI protocol.
In addition to running Apache, you also need to start RT FCGI processes
separately with a command like this:

/opt/rt5/sbin/rt-server.fcgi --listen /opt/rt5/var/rt.sock --nproc 10

In this configuration, RT runs with L<Plack::Handler::FCGI> and supports any
arguments documented there.

Below is the corresponding Apache configuration:

<VirtualHost rt.example.com>
AddDefaultCharset UTF-8

ProxyPass / unix:/opt/rt5/var/rt.sock|fcgi://localhost/
ProxyFCGIBackendType GENERIC
ProxyFCGISetEnvIf "true" SCRIPT_NAME ""
</VirtualHost>

Note that the SCRIPT_NAME directive is needed to avoid issues with URIs not
being properly encoded, causing errors with URIs that have spaces.

In our testing we have found that this method shares more memory between
RT FCGI processes, so it can allow you to run more RT processes with less
memory. This comes at the cost of some extra management of the FCGI processes,
which mod_fcgid handles for you.

=head3 mod_perl 2.xx

B<WARNING: mod_perl 1.99_xx is not supported.>
Expand Down Expand Up @@ -199,7 +226,7 @@ related C<ScriptAlias> and C<Location> directives with C</rt>. You
should also make sure C<DocumentRoot> is B<not> set to
C</opt/rt5/share/html/>, otherwise RT's source will be served from C</>.

For example: if you're using the sample FastCGI config above, you might change
For example: if you're using the sample mod_fcgid config above, you might change
the relevant directives to:

ScriptAlias /rt /opt/rt5/sbin/rt-server.fcgi/
Expand All @@ -211,6 +238,13 @@ the relevant directives to:
...
</Location>

If you are using mod_proxy_fcgi, change these:

ProxyPass /rt/ unix:/opt/rt5/var/rt.sock|fcgi://localhost/
<Location /rt>
ProxyFCGISetEnvIf "true" SCRIPT_NAME "/rt"
</Location>

If you're using the sample mod_perl configuration, you only need to change the
C<Location> directive.

Expand Down
Loading

0 comments on commit 5585771

Please sign in to comment.