Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Oct 2004 13:57:50 +0800 (CST)
From:      Cheng-Lung Sung <clsung@tw.freebsd.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        autrijus@autrijus.org
Subject:   ports/73029: [PATCH] www/rt: update to 3.0.12
Message-ID:  <20041023055750.9ACB6106CB0@FreeBSD.csie.NCTU.edu.tw>
Resent-Message-ID: <200410230600.i9N60hbY075859@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         73029
>Category:       ports
>Synopsis:       [PATCH] www/rt: update to 3.0.12
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 23 06:00:43 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Cheng-Lung Sung
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
FreeBSD @ Taiwan
>Environment:
System: FreeBSD FreeBSD.csie.NCTU.edu.tw 4.10-STABLE FreeBSD 4.10-STABLE #0: Sat May 29 08:18:00 CST 2004
>Description:
- Update to 3.0.12

Added file(s):
- files/patch-lib::RT::Handle.pm
- files/patch-sbin::rt-setup-database.in

Port maintainer (autrijus@autrijus.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- rt-3.0.12.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/www/rt3/Makefile,v
retrieving revision 1.40
diff -u -u -r1.40 Makefile
--- Makefile	12 Aug 2004 15:46:05 -0000	1.40
+++ Makefile	23 Oct 2004 05:57:04 -0000
@@ -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 @@
 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 @@
 		${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 @@
 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 @@
 .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 @@
 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 @@
 	@${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>
 
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/www/rt3/distinfo,v
retrieving revision 1.15
diff -u -u -r1.15 distinfo
--- distinfo	26 May 2004 07:47:34 -0000	1.15
+++ distinfo	23 Oct 2004 05:57:04 -0000
@@ -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
Index: pkg-install
===================================================================
RCS file: /home/pcvs/ports/www/rt3/pkg-install,v
retrieving revision 1.1
diff -u -u -r1.1 pkg-install
--- pkg-install	8 May 2003 15:15:06 -0000	1.1
+++ pkg-install	23 Oct 2004 05:57:04 -0000
@@ -2,9 +2,7 @@
 # $FreeBSD: ports/www/rt3/pkg-install,v 1.1 2003/05/08 15:15:06 demon Exp $
 #
 
-if [ "$2" != "PRE-INSTALL" ]; then
-    exit 0
-fi
+if [ x"$2" = xPRE-INSTALL ]; then
 
 GROUP=rt
 
@@ -14,6 +12,27 @@
 	else
 		echo "Adding group \"${GROUP}\" failed..."
 		exit 1
+	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
 
Index: pkg-message
===================================================================
RCS file: /home/pcvs/ports/www/rt3/pkg-message,v
retrieving revision 1.5
diff -u -u -r1.5 pkg-message
--- pkg-message	18 Nov 2003 09:21:10 -0000	1.5
+++ pkg-message	23 Oct 2004 05:57:04 -0000
@@ -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/.
 
-=====================================================================
+=======================================================================
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/www/rt3/pkg-plist,v
retrieving revision 1.10
diff -u -u -r1.10 pkg-plist
--- pkg-plist	12 Aug 2004 15:46:05 -0000	1.10
+++ pkg-plist	23 Oct 2004 05:57:04 -0000
@@ -178,8 +178,8 @@
 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 @@
 @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
Index: files/patch-lib::RT::Handle.pm
===================================================================
RCS file: files/patch-lib::RT::Handle.pm
diff -N files/patch-lib::RT::Handle.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-lib::RT::Handle.pm	23 Oct 2004 05:57:04 -0000
@@ -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, 
Index: files/patch-sbin::rt-setup-database.in
===================================================================
RCS file: files/patch-sbin::rt-setup-database.in
diff -N files/patch-sbin::rt-setup-database.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-sbin::rt-setup-database.in	23 Oct 2004 05:57:04 -0000
@@ -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');
+ 
+ }
+ 
--- rt-3.0.12.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041023055750.9ACB6106CB0>