aboutsummaryrefslogtreecommitdiffstats
path: root/www/rt3
diff options
context:
space:
mode:
authorclsung <clsung@FreeBSD.org>2004-10-23 15:29:33 +0800
committerclsung <clsung@FreeBSD.org>2004-10-23 15:29:33 +0800
commit5c15819b317eab46cc8b3b47971b1fe44f558259 (patch)
treeb147d5f36c015b88e1cab06a834b978c5c15ff8e /www/rt3
parentb5875f970765b6d6ee9eccab958f5ce0921e52d3 (diff)
downloadfreebsd-ports-gnome-5c15819b317eab46cc8b3b47971b1fe44f558259.tar.gz
freebsd-ports-gnome-5c15819b317eab46cc8b3b47971b1fe44f558259.tar.zst
freebsd-ports-gnome-5c15819b317eab46cc8b3b47971b1fe44f558259.zip
- update 3.0.12
- add two patch files for SQLite PR: ports/73029 Submitted by: clsung Approved by: maintainer (Autrijus Tang), co-mentor (vanilla)
Diffstat (limited to 'www/rt3')
-rw-r--r--www/rt3/Makefile36
-rw-r--r--www/rt3/distinfo4
-rw-r--r--www/rt3/files/patch-lib::RT::Handle.pm19
-rw-r--r--www/rt3/files/patch-sbin::rt-setup-database.in54
-rw-r--r--www/rt3/pkg-install25
-rw-r--r--www/rt3/pkg-message26
-rw-r--r--www/rt3/pkg-plist3
7 files changed, 137 insertions, 30 deletions
diff --git a/www/rt3/Makefile b/www/rt3/Makefile
index 4c8add46b82f..69efe0421b0b 100644
--- a/www/rt3/Makefile
+++ b/www/rt3/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= rt
-PORTVERSION?= 3.0.11
-PORTREVISION?= 1
+PORTVERSION?= 3.0.12
CATEGORIES= www
MASTER_SITES?= http://download.bestpractical.com/pub/rt/release/ \
http://download.bestpractical.com/pub/rt/devel/ \
@@ -18,7 +17,6 @@ MAINTAINER= autrijus@autrijus.org
COMMENT?= RT is an industrial-grade ticketing system written in Perl
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} \
- ${SITE_PERL}/Apache/Mason.pm:${PORTSDIR}/www/p5-HTML-Mason \
${SITE_PERL}/Apache/Session.pm:${PORTSDIR}/www/p5-Apache-Session \
${SITE_PERL}/Cache/Cache.pm:${PORTSDIR}/devel/p5-Cache-Cache \
${SITE_PERL}/CGI/Cookie.pm:${PORTSDIR}/www/p5-CGI.pm \
@@ -30,6 +28,7 @@ BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} \
${SITE_PERL}/Getopt/Long.pm:${PORTSDIR}/devel/p5-Getopt-Long \
${SITE_PERL}/${PERL_ARCH}/HTML/Entities.pm:${PORTSDIR}/www/p5-HTML-Parser \
${SITE_PERL}/HTML/FormatText.pm:${PORTSDIR}/textproc/p5-HTML-Format \
+ ${SITE_PERL}/HTML/Mason.pm:${PORTSDIR}/www/p5-HTML-Mason \
${SITE_PERL}/HTML/TreeBuilder.pm:${PORTSDIR}/www/p5-HTML-Tree \
${SITE_PERL}/Locale/Maketext.pm:${PORTSDIR}/devel/p5-Locale-Maketext \
${SITE_PERL}/Locale/Maketext/Fuzzy.pm:${PORTSDIR}/devel/p5-Locale-Maketext-Fuzzy \
@@ -53,8 +52,8 @@ BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} \
RUN_DEPENDS= ${BUILD_DEPENDS}
HAS_CONFIGURE= yes
-NO_BUILD= yes
-NO_PACKAGE= Executes scripts in post-install phase
+#NO_BUILD= yes
+#NO_PACKAGE= Executes scripts in post-install phase
CONFIGURE_ARGS= --prefix=${RT_PATH} \
--enable-layout=${LAYOUT} \
@@ -72,7 +71,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache2/mod_fastcgi.so:${PORTSDIR}/www/mod_
.else
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/mod_fastcgi.so:${PORTSDIR}/www/mod_fastcgi
.endif
-BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/FCGI.pm:${PORTSDIR}/www/p5-FastCGI
+BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/FCGI.pm:${PORTSDIR}/www/p5-FastCGI
DEPENDS_ARGS+= WITHOUT_MODPERL=yes
.else
BUILD_DEPENDS+= ${SITE_PERL}/Apache/DBI.pm:${PORTSDIR}/www/p5-Apache-DBI
@@ -88,13 +87,13 @@ BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/libperl.so:${PORTSDIR}/www/mod_perl
DB_TYPE?= mysql
.if ${DB_TYPE} == "Oracle"
-BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Oracle.pm:${PORTSDIR}/databases/p5-DBD-Oracle
+BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Oracle.pm:${PORTSDIR}/databases/p5-DBD-Oracle
.else
.if ${DB_TYPE} == "Pg"
-BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
+BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
.else
.if ${DB_TYPE} == "SQLite"
-BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite
+BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite
.else
DB_TYPE= mysql
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
@@ -125,22 +124,23 @@ pre-fetch:
@${ECHO} " DB_DBA_PASSWORD=password Password of database administrator"
@${ECHO} " WITH_FASTCGI Use FastCGI instead of mod_perl"
@${ECHO} " WITH_APACHE2 Use Apache2 as the web server"
- @${ECHO} " INITIAL_INSTALL Do initialize DB (for initial install only)"
+ @${ECHO} " INITIAL_INSTALL Do initialize DB (for initial setup only)"
@${ECHO} ""
pre-install:
- PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} \
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} \
${PKGNAME} PRE-INSTALL
+post-patch:
+ @${FIND} ${WRKSRC} -name "*.orig" -a -exec ${RM} -f {} \;
+
post-install:
@${INSTALL_DATA} ${WRKSRC}/README ${RT_PATH}/README
-.if !defined(INITIAL_INSTALL)
- @echo Upgrade of RT3 complete.
-.else
- -@${PERL} $(RT_PATH)/sbin/rt-setup-database --force --action drop --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
- -@${PERL} $(RT_PATH)/sbin/rt-setup-database --force --action init --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
- @${SED} s!%%RT_PATH%%!${RT_PATH}!g ${PKGMESSAGE}
-.endif
+ @PKG_PREFIX=${PREFIX} RT_PATH=${RT_PATH} \
+ DB_DBA_USER=${DB_DBA_USER} DB_DBA_PASSWORD=${DB_DBA_USER} \
+ INITIAL_INSTALL=${INITIAL_INSTALL} PKGMESSAGE=${PKGMESSAGE} \
+ ${SH} ${PKGINSTALL} \
+ ${PKGNAME} POST-INSTALL
.include <bsd.port.pre.mk>
diff --git a/www/rt3/distinfo b/www/rt3/distinfo
index 9bcd0a53eb4f..949d1d8a3077 100644
--- a/www/rt3/distinfo
+++ b/www/rt3/distinfo
@@ -1,2 +1,2 @@
-MD5 (rt-3.0.11.tar.gz) = 69a8a4c0fdc173a8eb9dafb46fa84f9c
-SIZE (rt-3.0.11.tar.gz) = 1068922
+MD5 (rt-3.0.12.tar.gz) = c4ef0339aae95398e66928b41b6b92c1
+SIZE (rt-3.0.12.tar.gz) = 1073930
diff --git a/www/rt3/files/patch-lib::RT::Handle.pm b/www/rt3/files/patch-lib::RT::Handle.pm
new file mode 100644
index 000000000000..92a2ca011ab1
--- /dev/null
+++ b/www/rt3/files/patch-lib::RT::Handle.pm
@@ -0,0 +1,19 @@
+--- lib/RT/Handle.pm Tue Mar 9 07:54:00 2004
++++ lib/RT/Handle.pm Wed Sep 22 12:46:41 2004
+@@ -78,12 +78,16 @@
+
+ =cut
+
++use File::Spec;
+
+ sub BuildDSN {
+ my $self = shift;
+ # Unless the database port is a positive integer, we really don't want to pass it.
+ $RT::DatabasePort = undef unless (defined $RT::DatabasePort && $RT::DatabasePort =~ /^(\d+)$/);
+ $RT::DatabaseHost = undef unless (defined $RT::DatabaseHost && $RT::DatabaseHost ne '');
++$RT::DatabaseName = File::Spec->catfile($RT::VarPath, $RT::DatabaseName)
++ if ($RT::DatabaseType eq 'SQLite') and
++ not File::Spec->file_name_is_absolute($RT::DatabaseName);
+
+
+ $self->SUPER::BuildDSN(Host => $RT::DatabaseHost,
diff --git a/www/rt3/files/patch-sbin::rt-setup-database.in b/www/rt3/files/patch-sbin::rt-setup-database.in
new file mode 100644
index 000000000000..d46be3b96eca
--- /dev/null
+++ b/www/rt3/files/patch-sbin::rt-setup-database.in
@@ -0,0 +1,54 @@
+--- sbin/rt-setup-database.in Tue Apr 27 03:30:25 2004
++++ sbin/rt-setup-database.in Wed Sep 22 12:46:43 2004
+@@ -87,10 +108,30 @@
+ print "...skipped as ".$args{'dba'} ." is not " . $RT::DatabaseUser . " or we're working with Oracle.\n";
+ }
+
+- $dbh->disconnect;
+- $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} )
+- || die $DBI::errstr;
++ if ($RT::DatabaseType eq "mysql") {
++ # Check which version we're running
++ my ($version) = $dbh->selectrow_hashref("show variables like 'version'")->{Value} =~ /^(\d\.\d+)/;
++ print "*** Warning: RT is unsupported on MySQL versions before 4.0.x\n" if $version < 4;
++
++ # MySQL must have InnoDB support
++ my $innodb = $dbh->selectrow_hashref("show variables like 'have_innodb'")->{Value};
++ if ($innodb eq "NO") {
++ die "RT requires that MySQL be compiled with InnoDB table support.\n".
++ "See http://dev.mysql.com/doc/mysql/en/InnoDB.html\n";
++ } elsif ($innodb eq "DISABLED") {
++ die "RT requires that MySQL InnoDB table support be enabled.\n".
++ ($version < 4
++ ? "Add 'innodb_data_file_path=ibdata1:10M:autoextend' to the [mysqld] section of my.cnf\n"
++ : "Remove the 'skip-innodb' line from your my.cnf file, restart MySQL, and try again.\n");
++ }
++ }
++
++ # SQLite can't deal with the disconnect/reconnect
++ unless ($RT::DatabaseType eq 'SQLite') {
+
++ $dbh->disconnect;
++ $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} ) || die $DBI::errstr;
++ }
+ print "Now populating database schema.\n";
+ insert_schema();
+ print "Now inserting database ACLs\n";
+@@ -364,7 +409,7 @@
+ exit(1);
+ }
+ print "done.\n";
+- $RT::Handle->Disconnect();
++ $RT::Handle->Disconnect() unless ($RT::DatabaseType eq 'SQLite');
+
+ }
+
+@@ -563,7 +608,7 @@
+ }
+ print "done.\n";
+ }
+- $RT::Handle->Disconnect();
++ $RT::Handle->Disconnect() unless ($RT::DatabaseType eq 'SQLite');
+
+ }
+
diff --git a/www/rt3/pkg-install b/www/rt3/pkg-install
index c7a940c2aa4d..1ab8adde9174 100644
--- a/www/rt3/pkg-install
+++ b/www/rt3/pkg-install
@@ -2,9 +2,7 @@
# $FreeBSD$
#
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
+if [ x"$2" = xPRE-INSTALL ]; then
GROUP=rt
@@ -17,4 +15,25 @@ if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
fi
fi
+fi
+
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ x"${RT_PATH}" = x ]; then
+ RT_PATH="${PKG_PREFIX}/rt3"
+ fi
+
+ if [ x"${INITIAL_INSTALL}" = x ]; then
+ echo "Upgrade of RT3 complete."
+ echo ""
+ echo "If this is actually your first installation, please run:"
+ echo " " perl ${RT_PATH}/sbin/rt-setup-database --action init --dba DB_DBA_USER --prompt-for-dba-password
+ echo ""
+ echo "Substitute DB_DBA_USER with database administrator's name."
+ else
+ perl ${RT_PATH}/sbin/rt-setup-database --force --action drop --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
+ perl ${RT_PATH}/sbin/rt-setup-database --force --action init --dba ${DB_DBA_USER} --dba-password ${DB_DBA_PASSWORD}
+ sed s!%%RT_PATH%%!${RT_PATH}!g ${PKGMESSAGE}
+ fi
+fi
+
exit 0
diff --git a/www/rt3/pkg-message b/www/rt3/pkg-message
index 414f02c0b294..6c1b0aaeb723 100644
--- a/www/rt3/pkg-message
+++ b/www/rt3/pkg-message
@@ -1,14 +1,28 @@
-=====================================================================
+=======================================================================
To complete the installation of this port, please follow these steps:
1. Edit %%RT_PATH%%/etc/RT_SiteConfig.pm, by referring to
the default config file (%%RT_PATH%%/etc/RT_Config.pm).
-2. Configure the email and web gateways. Please refer to
+2. Set up the web server by adding something like this to your
+ Apache configuration file:
+
+ AddDefaultCharset UTF-8
+ DocumentRoot %%RT_PATH%%/share/html
+ PerlRequire %%RT_PATH%%/bin/webmux.pl
+ <Directory "%%RT_PATH%%/share/html">
+ Allow from all
+ </Directory>
+ <Location />
+ SetHandler perl-script
+ PerlHandler RT::Mason
+ </Location>
+
+3. Configure the email and web gateways. Please refer to
'SETTING UP THE MAIL GATEWAY' in %%RT_PATH%%/README
-3. Restart Apache.
-4. Do remember to *CHANGE* the root's password for the web interface.
+4. Restart Apache.
+5. Do remember to *CHANGE* the root's password for the web interface.
The default is "password" (without the quotes.)
-5. Configure RT per the instructions at http://www.fsck.com/rtfm/.
+6. Configure RT per the instructions at http://wiki.bestpractical.com/.
-=====================================================================
+=======================================================================
diff --git a/www/rt3/pkg-plist b/www/rt3/pkg-plist
index b49302221ba3..8642fbe7a26b 100644
--- a/www/rt3/pkg-plist
+++ b/www/rt3/pkg-plist
@@ -178,8 +178,8 @@ rt3/lib/t/data/nested-rfc-822
rt3/lib/t/data/new-ticket-from-iso-8859-1
rt3/lib/t/data/new-ticket-from-iso-8859-1-full
rt3/lib/t/data/notes-uuencoded
-rt3/lib/t/data/russian-subject-no-content-type
rt3/lib/t/data/rt-send-cc
+rt3/lib/t/data/russian-subject-no-content-type
rt3/lib/t/data/text-html-in-russian
rt3/lib/t/data/text-html-with-umlaut
rt3/lib/t/regression/00placeholder
@@ -449,6 +449,7 @@ rt3/share/html/l
@dirrm rt3/share
@dirrm rt3/sbin
@dirrm rt3/local/po
+@dirrm rt3/local/lib
@dirrm rt3/local/html
@dirrm rt3/local/etc
@dirrm rt3/local