Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Feb 2011 19:55:00 GMT
From:      Ruslan Mahmatkhanov <cvs-src@yandex.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/154531: [PATCH] devel/flyspray: let user choose PostgreSQL as backend
Message-ID:  <201102051955.p15Jt0o4003567@red.freebsd.org>
Resent-Message-ID: <201102052000.p15K0LuG032938@freefall.freebsd.org>

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

>Number:         154531
>Category:       ports
>Synopsis:       [PATCH] devel/flyspray: let user choose PostgreSQL as backend
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 05 20:00:21 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ruslan Mahmatkhanov
>Release:        8.2-PRERELEASE
>Organization:
>Environment:
8.2-PRERELEASE i386
>Description:
- add WITH_POSTGRESQL option. default off.
- remove md5
- extend port instructions for postgresql users.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruNa flyspray.orig/Makefile flyspray/Makefile
--- flyspray.orig/Makefile	2009-05-03 15:38:20.000000000 +0400
+++ flyspray/Makefile	2011-02-05 22:47:20.000000000 +0300
@@ -24,7 +24,8 @@
 
 OPTIONS=	GRAPHVIZ "Install Graphviz for task dependency graphs" off \
 		MYSQLI "Use MySQLi Database Interface" on \
-		MYSQL "Use MySQL Database Interface" off
+		MYSQL "Use MySQL Database Interface" off \
+		POSTGRES "Use PostgreSQL Database Interface" off
 
 FLYSPRAYDIR=	${PREFIX}/share/${PORTNAME}
 ATTACHMENTDIR=	${DBDIR}/${PORTNAME}/attachments
@@ -54,7 +55,7 @@
 
 .include <bsd.port.pre.mk>
 
-.if !defined(WITHOUT_MYSQL)
+.if defined(WITH_MYSQL)
 USE_PHP+=	mysql
 .endif
 
@@ -62,7 +63,11 @@
 USE_PHP+=	mysqli
 .endif
 
-.ifdef WITH_GRAPHVIZ
+.if defined(WITH_POSTGRES)
+USE_PHP+=	pgsql
+.endif
+
+.if defined(WITH_GRAPHVIZ)
 RUN_DEPENDS+=	${LOCALBASE}/bin/dot:${PORTSDIR}/graphics/graphviz
 .endif
 
diff -ruNa flyspray.orig/distinfo flyspray/distinfo
--- flyspray.orig/distinfo	2009-05-03 15:38:20.000000000 +0400
+++ flyspray/distinfo	2011-02-05 22:29:35.000000000 +0300
@@ -1,3 +1,2 @@
-MD5 (flyspray-0.9.9.6.zip) = 095b46b08881554790830edab51970ed
 SHA256 (flyspray-0.9.9.6.zip) = c5c728bb66aca8c8ded3533387a751a129a2096b230f9dd1c16f77d1767bbe6c
 SIZE (flyspray-0.9.9.6.zip) = 1573955
diff -ruNa flyspray.orig/files/README.FreeBSD flyspray/files/README.FreeBSD
--- flyspray.orig/files/README.FreeBSD	2008-10-25 23:10:42.000000000 +0400
+++ flyspray/files/README.FreeBSD	2011-02-05 22:44:46.000000000 +0300
@@ -4,12 +4,16 @@
 0) If you are upgrading from a previous version of flyspray, please skip to
    the Upgrading section below.
 
-1) Create a mysql database for Flyspray to use.  Here is one way to do that,
-   from the unix/linux command line, entering your mysql root password when
-   prompted:
+1) Create a database for Flyspray to use.  Here is one way to do that, from 
+   the unix/linux command line, entering your mysql root password (in case
+   using mysql backend) when prompted:
 
+For MySQL:
 # mysqladmin -u root -p create flyspray
 
+For PostgreSQL:
+# createdb -U pgsql flyspray
+
 2) Insert the following configuration into your Apache httpd.conf:
 
 	Alias "/flyspray/" "%%FLYSPRAYDIR%%/"
@@ -41,8 +45,6 @@
 7) Report any bugs you find back to http://bugs.flyspray.org/ or the mailing
    list linked from the Flyspray homepage.
 
-8) Note that this version of Flyspray does not support PostgreSQL.
-
 Upgrading from previous versions of Flyspray
 ============================================
 
@@ -50,8 +52,9 @@
 
 0) read %%DOCSDIR%%/UPGRADING.txt.
 
-1) back up your old flyspray task database using "mysqldump".  No, really,
-   you seriously run the risk of losing data if you don't do this.
+1) back up your old flyspray task database using "mysqldump" for mysql and
+   "pg_dump" for postgresql.  No, really, you seriously run the risk of 
+   losing data if you don't do this.
 
 2) save a copy of %%FLYSPRAYDIR%%/flyspray.conf.php before running
    portupgrade.  This will need to be restored after you've upgraded the
diff -ruNa flyspray.orig/pkg-deinstall flyspray/pkg-deinstall
--- flyspray.orig/pkg-deinstall	2007-09-05 18:53:57.000000000 +0400
+++ flyspray/pkg-deinstall	2011-02-05 22:39:52.000000000 +0300
@@ -9,6 +9,9 @@
 	echo ""
 	echo "# rm -rf /var/db/flyspray"
 	echo "# mysqladmin -u root -p drop flyspray"
+	echo "or"
+	echo "# dropdb -U pgsql flyspray"
+	echo "if you are using PostgreSQL backend"
 	echo ""
 	echo "Thanks for using Flyspray!"
 	echo "--"


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



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