On Thu, Mar 21, 2019 at 12:35:18PM +0200, Paul Irofti wrote:
> Hi,
> 
> Here is a trivial diff to update rt to 4.4.4.
> 
> No database scheme changes. Mostly a security update, fixes a bunch of
> CVEs. Changelog here:
> 
>   https://docs.bestpractical.com/release-notes/rt/4.4.4
> 
> OK?

OK afresh1@, maybe check because my portcheck(1) patch says it needs
FIX_EXTRACT_PERMISSIONS, although I didn't look to see if that was the
problem bluhm@ reported.

https://marc.info/?l=openbsd-ports&m=155257606718448&w=2

Also, I didn't like that running tests didn't work, so I messed with
that a bit and there's a new patch here that enables tests to mostly
run.

Tests don't pass with mysql (missing some depends for one) and I
couldn't actually get it to work with SQLite (it tried to init the db
twice), and postgres is still connecting to the "template1" db instead
of the testrt4 db, so not sure what's going on there yet, but this seems
like a better start than just having tests be interactive.


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/rt/Makefile,v
retrieving revision 1.42
diff -u -p -r1.42 Makefile
--- Makefile    28 Sep 2018 09:03:49 -0000      1.42
+++ Makefile    24 Mar 2019 21:23:12 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=               industrial-grade ticketing system
 
-DISTNAME=              rt-4.4.3
+DISTNAME=              rt-4.4.4
 CATEGORIES=            www
 
 MAINTAINER=            Robert Nagy <[email protected]>
@@ -72,7 +72,6 @@ RUN_DEPENDS=          converters/p5-Convert-ASN1
                        textproc/p5-Regexp-Common \
                        textproc/p5-String-ShellQuote \
                        textproc/p5-Text-Quoted \
-                       textproc/p5-Text-Quoted \
                        textproc/p5-Text-Template \
                        textproc/p5-Text-WikiFormat \
                        textproc/p5-Text-Wrapper \
@@ -127,24 +126,78 @@ BUILD_DEPENDS+=           security/gnupg \
 FLAVORS=               pgsql sqlite
 FLAVOR?=
 
+# from RT::Test
+DATABASE=      rt4test
+RT_TEST_CONFIG +=      $$$$BinPath         q{$${WRKSRC}/bin}
+RT_TEST_CONFIG +=      $$$$SbinPath        q{$${WRKSRC}/sbin}
+RT_TEST_CONFIG +=      $$$$StaticPath      q{$${WRKSRC}/share/static}
+RT_TEST_CONFIG +=      $$$$EtcPath         q{$${WRKDIR}/etc}
+RT_TEST_CONFIG +=      $$$$VarPath         q{$${WRKDIR}$${VARBASE}/www}
+RT_TEST_CONFIG +=      $$$$MasonDataDir    q{$${WRKDIR}$${VARBASE}/mason_data}
+RT_TEST_CONFIG +=      $$$$MasonSessionDir \
+                       q{$${WRKDIR}$${VARBASE}/session_data}
+RT_TEST_CONFIG +=      $$$$DatabaseName    q{$${DATABASE}}
+
 .if ${FLAVOR:Mpgsql}
 RUN_DEPENDS+=          databases/p5-DBD-Pg
 CONFIGURE_ARGS+=       --with-db-type=Pg
+MODULES+=              databases/postgresql
+RT_TEST_CONFIG +=      $$$$DatabaseType  q{Pg}
+MODPOSTGRESQL_TEST_CMD = \
+       perl -I${WRKSRC}/lib -I${WRKDIR}/etc ${WRKSRC}/sbin/rt-setup-database \
+           --action init --skip-create \
+           --datadir=${WRKDIR}/etc --dba-password=ignored; \
+        ${MAKE_PROGRAM} ${ALL_TEST_FLAGS} -f ${MAKE_FILE} ${TEST_TARGET}
 .elif ${FLAVOR:Msqlite}
 RUN_DEPENDS+=          databases/p5-DBD-SQLite
+RT_TEST_CONFIG +=      $$$$DatabaseType  q{SQLite}
 CONFIGURE_ARGS+=       --with-db-type=SQLite
+do-test:
+       perl -I${WRKSRC}/lib -I${WRKDIR}/etc ${WRKSRC}/sbin/rt-setup-database \
+           --action init \
+           --datadir=${WRKDIR}/etc --dba-password=ignored; \
+       ${MAKE_PROGRAM} ${ALL_TEST_FLAGS} -f ${MAKE_FILE} ${TEST_TARGET}
 .else
 RUN_DEPENDS+=          databases/p5-DBD-mysql
+MODULES+=              databases/mariadb
+RT_TEST_CONFIG +=      $$$$DatabaseType  q{mysql}
+RT_TEST_CONFIG +=      %DatabaseExtraDSN \
+                       mysql_socket=>q{$${MODMARIADB_TEST_SOCKET}}
+MODMARIADB_TEST_DBNAME =       ${DATABASE}
+MODMARIADB_TEST_CMD = \
+       perl -I${WRKSRC}/lib -I${WRKDIR}/etc ${WRKSRC}/sbin/rt-setup-database \
+           --action init --skip-create \
+           --datadir=${WRKDIR}/etc --dba-password=ignored; \
+       ${MAKE_PROGRAM} ${ALL_TEST_FLAGS} -f ${MAKE_FILE} ${TEST_TARGET}
 .endif
 
-# needs an initialized database and /etc/rt3/RT_Config.pm to be present
-TEST_IS_INTERACTIVE=   Yes
 TEST_TARGET=           test
-TEST_DEPENDS=          devel/p5-Log-Dispatch-Perl
-# fill these in with appropriate values
-TEST_ENV=              RT_DBA_USER=rt_user RT_DBA_PASSWORD=1234
+TEST_DEPENDS=          ${RUN_DEPENDS} \
+                       devel/p5-List-MoreUtils \
+                       devel/p5-Log-Dispatch-Perl \
+                       devel/p5-Test-MockTime \
+                       devel/p5-Test-NoWarnings \
+                       devel/p5-Universal-require
+
+TEST_ENV=      RT_DBA_USER=rt_user RT_DBA_PASSWORD=1234 \
+               PERL5LIB=${WRKDIR}/etc
+
+pre-test:
+       ${INSTALL_DATA_DIR} ${WRKDIR}/etc
+       ${INSTALL_DATA_DIR} ${WRKDIR}${VARBASE}
+       ${INSTALL_DATA_DIR} ${WRKDIR}${VARBASE}/www
+       ${INSTALL_DATA}     ${WRKSRC}/etc/RT_Config.pm ${WRKDIR}/etc/
+       ${INSTALL_DATA}     ${WRKSRC}/etc/initialdata  ${WRKDIR}/etc/
+       ${INSTALL_DATA}     ${WRKSRC}/etc/schema.*     ${WRKDIR}/etc/
+       sed -i "s,${VARBASE}/www,${WRKDIR}${VARBASE}/www," \
+           ${WRKDIR}/etc/RT_Config.pm
+.for var value in ${RT_TEST_CONFIG}
+       echo 'Set(${var}, ${value});' >> ${WRKDIR}/etc/RT_Config.pm
+.endfor
 
 post-install:
        @mv ${PREFIX}/sbin/standalone_httpd ${PREFIX}/sbin/rt-standalone_httpd
+
+FIX_EXTRACT_PERMISSIONS=       Yes
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/rt/distinfo,v
retrieving revision 1.20
diff -u -p -r1.20 distinfo
--- distinfo    28 Sep 2018 09:03:49 -0000      1.20
+++ distinfo    24 Mar 2019 21:23:12 -0000
@@ -1,2 +1,2 @@
-SHA256 (rt-4.4.3.tar.gz) = c4q0PKyQJCCzUlRZ4ohRXVETDYWBBln2yKfiI8d9rbE=
-SIZE (rt-4.4.3.tar.gz) = 9584927
+SHA256 (rt-4.4.4.tar.gz) = NMMWpKeNfum5XUORUw+bs/8+3Znrvr+sY1TtFz6UCIQ=
+SIZE (rt-4.4.4.tar.gz) = 9977845
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/www/rt/patches/patch-Makefile_in,v
retrieving revision 1.5
diff -u -p -r1.5 patch-Makefile_in
--- patches/patch-Makefile_in   28 Sep 2018 09:03:49 -0000      1.5
+++ patches/patch-Makefile_in   24 Mar 2019 21:23:12 -0000
@@ -1,3 +1,5 @@
+$OpenBSD$
+
 Index: Makefile.in
 --- Makefile.in.orig
 +++ Makefile.in
@@ -16,7 +18,7 @@ Index: Makefile.in
  CONFIG_FILE           =       $(CONFIG_FILE_PATH)/RT_Config.pm
  SITE_CONFIG_FILE      =       $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
  
-@@ -286,13 +292,13 @@ fixperms:
+@@ -288,13 +294,13 @@ fixperms:
  
        chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)$(RT_BIN_PATH)
  
@@ -34,7 +36,7 @@ Index: Makefile.in
  
        chmod 0440 $(DESTDIR)$(CONFIG_FILE)
        chmod 0640 $(DESTDIR)$(SITE_CONFIG_FILE)
-@@ -305,7 +311,7 @@ fixperms:
+@@ -307,7 +313,7 @@ fixperms:
  
        # Make upgrade scripts executable if they are in the source.
        #
@@ -43,7 +45,7 @@ Index: Makefile.in
                chmod a+x "$(DESTDIR)$(RT_ETC_PATH)/upgrade/$$file" ; \
        done
  
-@@ -360,7 +366,7 @@ clean-mason-cache:
+@@ -362,7 +368,7 @@ clean-mason-cache:
        rm -rf $(DESTDIR)$(MASON_DATA_PATH)/etc/*
        rm -rf $(DESTDIR)$(MASON_DATA_PATH)/obj/*
  
@@ -52,7 +54,7 @@ Index: Makefile.in
  
  files-install: libs-install etc-install config-install bin-install 
sbin-install html-install doc-install font-install po-install static-install
  
-@@ -368,6 +374,7 @@ config-install:
+@@ -370,6 +376,7 @@ config-install:
  @COMMENT_INPLACE_LAYOUT@      $(INSTALL) -m 0755 -o $(BIN_OWNER) -g 
$(RTGROUP) -d $(DESTDIR)$(CONFIG_FILE_PATH)
  @COMMENT_INPLACE_LAYOUT@      -$(INSTALL) -m 0440 -o $(BIN_OWNER) -g 
$(RTGROUP)  etc/RT_Config.pm $(DESTDIR)$(CONFIG_FILE)
  @COMMENT_INPLACE_LAYOUT@      [ -f $(DESTDIR)$(SITE_CONFIG_FILE) ] || 
$(INSTALL) -m 0640 -o $(BIN_OWNER) -g $(RTGROUP) etc/RT_SiteConfig.pm 
$(DESTDIR)$(SITE_CONFIG_FILE) 
@@ -60,7 +62,7 @@ Index: Makefile.in
  @COMMENT_INPLACE_LAYOUT@      @echo "Installed configuration. About to 
install RT in  $(RT_PATH)"
  
  test: 
-@@ -454,16 +461,16 @@ doc-install:
+@@ -456,16 +463,16 @@ doc-install:
  
  
  etc-install:
Index: patches/patch-sbin_rt-test-dependencies_in
===================================================================
RCS file: /cvs/ports/www/rt/patches/patch-sbin_rt-test-dependencies_in,v
retrieving revision 1.4
diff -u -p -r1.4 patch-sbin_rt-test-dependencies_in
--- patches/patch-sbin_rt-test-dependencies_in  28 Sep 2018 09:03:49 -0000      
1.4
+++ patches/patch-sbin_rt-test-dependencies_in  24 Mar 2019 21:23:12 -0000
@@ -2,15 +2,6 @@ $OpenBSD: patch-sbin_rt-test-dependencie
 Index: sbin/rt-test-dependencies.in
 --- sbin/rt-test-dependencies.in.orig
 +++ sbin/rt-test-dependencies.in
-@@ -139,7 +139,7 @@ Digest::MD5 2.27
- Digest::SHA
- Email::Address 1.908
- Email::Address::List 0.02
--Encode 2.64
-+Encode 2.60
- Errno
- File::Glob
- File::ShareDir
 @@ -244,7 +244,7 @@ XML::Simple
  .
  
Index: patches/patch-t_99-policy_t
===================================================================
RCS file: patches/patch-t_99-policy_t
diff -N patches/patch-t_99-policy_t
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-t_99-policy_t 24 Mar 2019 21:23:12 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: t/99-policy.t
+--- t/99-policy.t.orig
++++ t/99-policy.t
+@@ -7,6 +7,7 @@ use IPC::Run3;
+ 
+ my @files;
+ find( { wanted   => sub {
++            return if /\.orig$/ || /\.in$/;
+             push @files, $File::Find::name if -f;
+             $File::Find::prune = 1 if $_ eq "t/tmp" or m{/\.git$};
+         },
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/rt/pkg/PLIST,v
retrieving revision 1.23
diff -u -p -r1.23 PLIST
--- pkg/PLIST   28 Sep 2018 09:03:49 -0000      1.23
+++ pkg/PLIST   24 Mar 2019 21:23:12 -0000
@@ -399,8 +399,10 @@ sbin/rt-externalize-attachments
 sbin/rt-fulltext-indexer
 sbin/rt-importer
 sbin/rt-ldapimport
+sbin/rt-munge-attachments
 sbin/rt-passwd
 sbin/rt-preferences-viewer
+sbin/rt-search-attributes
 sbin/rt-serializer
 sbin/rt-server
 sbin/rt-server.fcgi
@@ -414,6 +416,7 @@ sbin/rt-validate-aliases
 sbin/rt-validator
 share/doc/pkg-readmes/${PKGSTEM}
 share/doc/rt3/
+share/doc/rt3/GDPR.pod
 share/doc/rt3/README
 share/doc/rt3/UPGRADING-2.0
 share/doc/rt3/UPGRADING-3.0
@@ -430,6 +433,7 @@ share/doc/rt3/authentication.pod
 share/doc/rt3/automating_rt.pod
 share/doc/rt3/backups.pod
 share/doc/rt3/charts.pod
+share/doc/rt3/custom_roles.pod
 share/doc/rt3/customizing/
 share/doc/rt3/customizing/approvals.pod
 share/doc/rt3/customizing/articles_introduction.pod
@@ -463,6 +467,10 @@ share/doc/rt3/images/complicated-search-
 share/doc/rt3/images/create-setowner-action.png
 share/doc/rt3/images/current-search.png
 share/doc/rt3/images/customize-dashboards-menu.png
+share/doc/rt3/images/customroles-apply-to-queue.png
+share/doc/rt3/images/customroles-assign-on-ticket-create.png
+share/doc/rt3/images/customroles-create-a-customrole.png
+share/doc/rt3/images/customroles-query-builder.png
 share/doc/rt3/images/dashboard-chart.png
 share/doc/rt3/images/dashboard-content-invoices.png
 share/doc/rt3/images/dashboard-content.png
@@ -1067,6 +1075,8 @@ share/examples/rt3/upgrade/generate-rtad
 @sample ${SYSCONFDIR}/rt3/upgrade/generate-rtaddressregexp
 share/examples/rt3/upgrade/generate-rtaddressregexp.in
 @sample ${SYSCONFDIR}/rt3/upgrade/generate-rtaddressregexp.in
+share/examples/rt3/upgrade/reset-sequences
+share/examples/rt3/upgrade/reset-sequences.in
 share/examples/rt3/upgrade/sanity-check-stylesheets
 @sample ${SYSCONFDIR}/rt3/upgrade/sanity-check-stylesheets
 share/examples/rt3/upgrade/sanity-check-stylesheets.in
@@ -1227,6 +1237,7 @@ share/rt3/html/Admin/Groups/Members.html
 share/rt3/html/Admin/Groups/Memberships.html
 share/rt3/html/Admin/Groups/Modify.html
 share/rt3/html/Admin/Groups/UserRights.html
+share/rt3/html/Admin/Groups/autohandler
 share/rt3/html/Admin/Groups/index.html
 share/rt3/html/Admin/Queues/
 share/rt3/html/Admin/Queues/CustomField.html
@@ -1462,6 +1473,7 @@ share/rt3/html/Elements/Logo
 share/rt3/html/Elements/MakeClicky
 share/rt3/html/Elements/Menu
 share/rt3/html/Elements/MessageBox
+share/rt3/html/Elements/Modal
 share/rt3/html/Elements/MyAdminQueues
 share/rt3/html/Elements/MyAssets
 share/rt3/html/Elements/MyRT
@@ -1658,6 +1670,9 @@ share/rt3/html/NoAuth/rss/dhandler
 share/rt3/html/Prefs/
 share/rt3/html/Prefs/AboutMe.html
 share/rt3/html/Prefs/DashboardsInMenu.html
+share/rt3/html/Prefs/Elements/
+share/rt3/html/Prefs/Elements/EditAboutMe
+share/rt3/html/Prefs/Elements/ShowAboutMe
 share/rt3/html/Prefs/MyRT.html
 share/rt3/html/Prefs/Other.html
 share/rt3/html/Prefs/QueueList.html
@@ -1770,6 +1785,7 @@ share/rt3/html/SelfService/Elements/
 share/rt3/html/SelfService/Elements/GotoTicket
 share/rt3/html/SelfService/Elements/Header
 share/rt3/html/SelfService/Elements/MyRequests
+share/rt3/html/SelfService/Elements/RequestUpdate
 share/rt3/html/SelfService/Elements/SearchArticle
 share/rt3/html/SelfService/Helpers/
 share/rt3/html/SelfService/Helpers/Autocomplete/
@@ -1780,7 +1796,13 @@ share/rt3/html/SelfService/Helpers/Uploa
 share/rt3/html/SelfService/Helpers/Upload/Add
 share/rt3/html/SelfService/Helpers/Upload/Delete
 share/rt3/html/SelfService/Prefs.html
+share/rt3/html/SelfService/Search/
+share/rt3/html/SelfService/Search/Results.tsv
 share/rt3/html/SelfService/Update.html
+share/rt3/html/SelfService/User/
+share/rt3/html/SelfService/User/Elements/
+share/rt3/html/SelfService/User/Elements/RelatedData
+share/rt3/html/SelfService/User/RelatedData.tsv
 share/rt3/html/SelfService/index.html
 share/rt3/html/Ticket/
 share/rt3/html/Ticket/Attachment/
@@ -1859,9 +1881,11 @@ share/rt3/html/User/Elements/Portlets/Cr
 share/rt3/html/User/Elements/Portlets/ExtraInfo
 share/rt3/html/User/Elements/Portlets/InactiveTickets
 share/rt3/html/User/Elements/Portlets/UserAssets
+share/rt3/html/User/Elements/RelatedData
 share/rt3/html/User/Elements/TicketList
 share/rt3/html/User/Elements/UserInfo
 share/rt3/html/User/History.html
+share/rt3/html/User/RelatedData.tsv
 share/rt3/html/User/Search.html
 share/rt3/html/User/Summary.html
 share/rt3/html/Widgets/
@@ -1942,6 +1966,7 @@ share/rt3/po/pl.po
 share/rt3/po/pt.po
 share/rt3/po/pt_BR.po
 share/rt3/po/pt_PT.po
+share/rt3/po/ro.po
 share/rt3/po/rt.pot
 share/rt3/po/ru.po
 share/rt3/po/sk.po
@@ -2280,6 +2305,7 @@ share/rt3/static/css/base/portlets.css
 share/rt3/static/css/base/print.css
 share/rt3/static/css/base/record.css
 share/rt3/static/css/base/rights-editor.css
+share/rt3/static/css/base/shredder.css
 share/rt3/static/css/base/superfish-navbar.css
 share/rt3/static/css/base/superfish-vertical.css
 share/rt3/static/css/base/superfish.css
@@ -2400,7 +2426,7 @@ share/rt3/static/js/farbtastic.js
 share/rt3/static/js/forms.js
 share/rt3/static/js/history-folding.js
 share/rt3/static/js/i18n.js
-share/rt3/static/js/jquery-1.11.3.min.js
+share/rt3/static/js/jquery-1.12.4p1.min.js
 share/rt3/static/js/jquery-ui-patch-datepicker.js
 share/rt3/static/js/jquery-ui-timepicker-addon.js
 share/rt3/static/js/jquery-ui.min.js

Reply via email to