diff options
author | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-09-08 15:58:15 +0000 |
---|---|---|
committer | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-09-08 15:58:15 +0000 |
commit | 9df7397989463b1d19a940923ea52d1eeb05943e (patch) | |
tree | 8e08f5f8f50e10f0293de75499421e9319b7eea1 /www-apps | |
parent | Change profile to virtual/dev-manager (diff) | |
download | gentoo-2-9df7397989463b1d19a940923ea52d1eeb05943e.tar.gz gentoo-2-9df7397989463b1d19a940923ea52d1eeb05943e.tar.bz2 gentoo-2-9df7397989463b1d19a940923ea52d1eeb05943e.zip |
Rewritten to work with the new webapp-config
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/issue-tracker/ChangeLog | 7 | ||||
-rw-r--r-- | www-apps/issue-tracker/files/digest-issue-tracker-4.0.3-r1 | 1 | ||||
-rw-r--r-- | www-apps/issue-tracker/files/postinstall-en.txt | 38 | ||||
-rw-r--r-- | www-apps/issue-tracker/files/reconfig | 92 | ||||
-rw-r--r-- | www-apps/issue-tracker/issue-tracker-4.0.3-r1.ebuild | 44 |
5 files changed, 181 insertions, 1 deletions
diff --git a/www-apps/issue-tracker/ChangeLog b/www-apps/issue-tracker/ChangeLog index f48b73f0f4c5..8c4714899d2c 100644 --- a/www-apps/issue-tracker/ChangeLog +++ b/www-apps/issue-tracker/ChangeLog @@ -1,6 +1,6 @@ # ChangeLog for www-apps/issue-tracker # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/issue-tracker/ChangeLog,v 1.3 2004/09/05 08:46:13 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/issue-tracker/ChangeLog,v 1.4 2004/09/08 15:58:15 karltk Exp $ 05 Sep 2004; Sven Wegener <swegener@gentoo.org> : Fixed ChangeLog header. @@ -9,6 +9,11 @@ issue-tracker-4.0.3.ebuild: Masked issue-tracker-4.0.3.ebuild stable for ppc +*issue-tracker-4.0.3-r1 (29 Aug 2004) + + 29 Aug 2004; Karl Trygve Kalleberg <karltk@gentoo.org> + issue-tracker-4.0.3-r1.ebuild: Rewrite, by rl103, for the new webapp-config. + *issue-tracker-4.0.3 (15 Aug 2004) 15 Aug 2004; Stuart Herbert <stuart@gentoo.org> +metadata.xml, diff --git a/www-apps/issue-tracker/files/digest-issue-tracker-4.0.3-r1 b/www-apps/issue-tracker/files/digest-issue-tracker-4.0.3-r1 new file mode 100644 index 000000000000..4e17c935b262 --- /dev/null +++ b/www-apps/issue-tracker/files/digest-issue-tracker-4.0.3-r1 @@ -0,0 +1 @@ +MD5 dbf3b8d4e46fb00170891b9c549d6e3c issue-tracker-4.0.3.tar.bz2 191396 diff --git a/www-apps/issue-tracker/files/postinstall-en.txt b/www-apps/issue-tracker/files/postinstall-en.txt new file mode 100644 index 000000000000..fb75ea6acfce --- /dev/null +++ b/www-apps/issue-tracker/files/postinstall-en.txt @@ -0,0 +1,38 @@ +You will need to configure issue-tracker for a particular database + +(1) First, you must decide on: + - a database username, <it-username> + - a database name in the database, <it-dbname> + +(2) Next, you must create the database + +For MySQL: +mysqladmin -p -u <it-username> create <it-dbname> +mysql -p -u <it-username> <it-dbname> \ + < ${MY_INSTALLDIR}/issue-tracker/setup/schema.mysql +mysql -p -u <it-username> <it-dbname> \ + < ${MY_INSTALLDIR}/issue-tracker/setup/data.sql +mysql -p -u <it-username> <it-dbname> \ + < ${MY_INSTALLDIR}/issue-tracker/setup/indexes.sql + +For PostgreSQL: +createdb -U <it-username> <it-dbname> +psql -U <it-username> \ + < ${MY_INSTALLDIR}/issue-tracker/setup/schema.pgsql +psql -U <it-username> \ + < ${MY_INSTALLDIR}/issue-tracker/setup/data.sql +psql -U <it-username> \ + < ${MY_INSTALLDIR}/issue-tracker/setup/indexes.sql + +(3) Next, you will need to configure issue-tracker +cp ${MY_INSTALLDIR}/issue-tracker/conf/config.php-default \ + ${MY_INSTALLDIR}/issue-tracker/conf/config.php" + +Edit ${MY_INSTALLDIR}/issue-tracker/conf/config.php +with name=<it-dbname>, user=<it-username> and the correct db info + +Make sure you don't just edit the commented-out example;) + +(4) Finally, you must restart the server, log in to the +issue-tracker as admin/demo, and change the password in Preferences. + diff --git a/www-apps/issue-tracker/files/reconfig b/www-apps/issue-tracker/files/reconfig new file mode 100644 index 000000000000..f58646ec63c2 --- /dev/null +++ b/www-apps/issue-tracker/files/reconfig @@ -0,0 +1,92 @@ +#!/bin/bash + +function die() { + echo '***************' + echo + echo $1 + echo + echo '***************' + exit 1 +} + +if [ $1 = "start" -o $1 = "install" ]; then + + # default values + SUPPORTED_DB="MySQL PostgreSQL" + PN="issue-tracker" + D_DBNAME="it" + D_DBUSER="it" + D_DBHOST="localhost" + + echo "Configuring ${PN}:" + echo + # config setting + select DB_TYPE in ${SUPPORTED_DB}; do [ -z ${DB_TYPE} ] || break; done + + echo -n "Database name [${D_DBNAME}]: "; read DBNAME + if (test -z ${DBNAME}) ; then DBNAME=${D_DBNAME} ; fi + + echo -n "Database host [${D_DBHOST}]: "; read DBHOST + if (test -z ${DBHOST}) ; then DBHOST=${D_DBHOST} ; fi + echo "IMPORTANT: be sure that the database daemon is running on ${DBHOST}" + + echo -n "Database user name [${D_DBUSER}]: "; read DBUSER + if (test -z ${DBUSER}) ; then DBUSER=${D_DBUSER} ; fi + + echo -n "${DBUSER}'s password: "; read DBPASS + + # privileges + echo "Configuring your database connection:" + echo -n "Please enter login info for user who has grant privileges on ${DBHOST} [$USER]: "; read adminuser + if (test -z ${adminuser}) ; then adminuser="$USER" ; fi + if [ "${DBHOST}" != "localhost" ]; then + echo -n "Client address (at db side) [$(hostname -f)]: "; read clientaddr + if (test -z ${clientaddr}) ; then clientaddr="$(hostname -f)" ; fi + fi + # this will be default for localhost + if (test -z ${clientaddr}) ; then clientaddr="${DBHOST}" ; fi + + # if $DBHOST == localhost, don't specify -h argument, so local socket can be used. + host=${DBHOST/localhost} + + case ${DB_TYPE} in + "MySQL" ) { + mysqladmin -p -u ${adminuser} ${host:+-h ${host}} create ${DBNAME} + mysql -u ${adminuser} ${host:+-h ${host}} -p mysql --exec="GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${DBNAME}.* TO ${DBUSER}@${clientaddr} IDENTIFIED BY '${DBPASS}'; FLUSH PRIVILEGES;" || { + echo "Error running query!" + echo + echo "Please run it manually on ${host}." + echo + echo " \$ mysql -u ${adminuser} -p mysql --exec=\"GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON ${DBNAME}.* TO ${DBUSER}@${clientaddr} IDENTIFIED BY '${DBPASS}'; FLUSH PRIVILEGES;\"" + echo + } + DB_TYPE="mysql" + DBPORT="3306" + mysql -u ${adminuser} ${host:+-h ${host}} -p ${DBNAME} < ${MY_INSTALLDIR}/setup/schema.mysql + mysql -u ${adminuser} ${host:+-h ${host}} -p ${DBNAME} < ${MY_INSTALLDIR}/setup/data.sql + mysql -u ${adminuser} ${host:+-h ${host}} -p ${DBNAME} < ${MY_INSTALLDIR}/setup/indexes.sql + };; + "PostgreSQL" ) { + DB_TYPE="pgsql" + DBPORT="5432" + createdb -U ${adminuser} ${host:+-h ${host}} ${DBNAME} + psql -U ${adminuser} ${host:+-h ${host}} ${DBNAME} < ${MY_INSTALLDIR}/setup/schema.pgsql + psql -U ${adminuser} ${host:+-h ${host}} ${DBNAME} < ${MY_INSTALLDIR}/setup/data.sql + psql -U ${adminuser} ${host:+-h ${host}} ${DBNAME} < ${MY_INSTALLDIR}/setup/indexes.sql + } + ;; + esac + echo + echo "These and more settings can be found in ${MY_INSTALLDIR}/conf/config.php" + echo + # editing config file + sed -e "s|<type>|${DB_TYPE}| + s|<host>|${DBHOST}| + s|<port>|${DBPORT}| + s|<name>|${DBNAME}| + s|<user>|${DBUSER}| + s|<pass>|${DBPASS}| + " -i ${MY_INSTALLDIR}/conf/config.php-default +else + echo $1 +fi diff --git a/www-apps/issue-tracker/issue-tracker-4.0.3-r1.ebuild b/www-apps/issue-tracker/issue-tracker-4.0.3-r1.ebuild new file mode 100644 index 000000000000..1dbce9b70db7 --- /dev/null +++ b/www-apps/issue-tracker/issue-tracker-4.0.3-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/issue-tracker/issue-tracker-4.0.3-r1.ebuild,v 1.1 2004/09/08 15:58:15 karltk Exp $ + +inherit webapp + +DESCRIPTION="Issue tracking system" +HOMEPAGE="http://www.issue-tracker.com/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc" +IUSE="" +DEPEND="$DEPEND" +RDEPEND="virtual/php + || ( dev-db/mysql dev-db/postgresql )" + +src_unpack() { + unpack ${A} + sed -r 's/(Could not.*_URL_.*manually.*)\"\);/\1\";/' -i ${S}/conf/const.php || die +} + +src_install() { + webapp_src_preinst + cd ${S} + + dodoc docs/* + + # copy over everything but docs + cp -R [ch-z]* ${D}/${MY_HTDOCSDIR} + cp -R download ${D}/${MY_HTDOCSDIR} + # the following needs to be serverowned as per Edwin Robertson <tm@tuxmonkey.com> + local MY_FILES="sessions logs download css themes" + for file in ${MY_FILES}; do + webapp_serverowned "${MY_HTDOCSDIR}/${file}" + done + for file in `find cache -type d`; do + webapp_serverowned "${MY_HTDOCSDIR}/${file}" + done + + webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt +# webapp_hook_script ${FILESDIR}/reconfig + + webapp_src_install +} |