diff options
author | Renat Lumpau <rl03@gentoo.org> | 2005-06-26 21:18:35 +0000 |
---|---|---|
committer | Renat Lumpau <rl03@gentoo.org> | 2005-06-26 21:18:35 +0000 |
commit | e1cc09146bf68a25ab7e09c234b463bf8503c4bc (patch) | |
tree | d83957ce4cf060c5f2f55c9617008b7f58cd8ed7 /www-apps | |
parent | New upstream version. (diff) | |
download | gentoo-2-e1cc09146bf68a25ab7e09c234b463bf8503c4bc.tar.gz gentoo-2-e1cc09146bf68a25ab7e09c234b463bf8503c4bc.tar.bz2 gentoo-2-e1cc09146bf68a25ab7e09c234b463bf8503c4bc.zip |
Fixed reconfig script. Closes #80996 and #96072
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/bugzilla/ChangeLog | 10 | ||||
-rw-r--r-- | www-apps/bugzilla/Manifest | 18 | ||||
-rw-r--r-- | www-apps/bugzilla/bugzilla-2.18.1-r1.ebuild | 66 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.18.1-r1/apache.htaccess | 3 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.daily | 5 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.tab | 1 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.18.1-r1/reconfig | 110 | ||||
-rw-r--r-- | www-apps/bugzilla/files/digest-bugzilla-2.18.1-r1 | 1 |
8 files changed, 202 insertions, 12 deletions
diff --git a/www-apps/bugzilla/ChangeLog b/www-apps/bugzilla/ChangeLog index 3ee66e1fa7ce..db9cc918e29c 100644 --- a/www-apps/bugzilla/ChangeLog +++ b/www-apps/bugzilla/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-apps/bugzilla # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/bugzilla/ChangeLog,v 1.25 2005/06/26 20:46:22 rl03 Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/bugzilla/ChangeLog,v 1.26 2005/06/26 21:18:35 rl03 Exp $ + +*bugzilla-2.18.1-r1 (26 Jun 2005) + + 26 Jun 2005; Renat Lumpau <rl03@gentoo.org> + +files/2.18.1-r1/apache.htaccess, +files/2.18.1-r1/bugzilla.cron.daily, + +files/2.18.1-r1/bugzilla.cron.tab, +files/2.18.1-r1/reconfig, + +bugzilla-2.18.1-r1.ebuild: + Fixed reconfig script. Closes #80996 and #96072 26 Jun 2005; Renat Lumpau <rl03@gentoo.org> : Cleaning house. diff --git a/www-apps/bugzilla/Manifest b/www-apps/bugzilla/Manifest index be7b111c11d1..9957cb7b3bb8 100644 --- a/www-apps/bugzilla/Manifest +++ b/www-apps/bugzilla/Manifest @@ -1,8 +1,6 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 12f37762a11fd60727348437bf22a419 bugzilla-2.18.1.ebuild 1855 -MD5 1d67e202285b34292ff78b66f2c061dd ChangeLog 6241 +MD5 61ddbd328da0c84037c3d41b1a2a573f bugzilla-2.18.1-r1.ebuild 1692 +MD5 987400926ed6280a516d09655875fa2a ChangeLog 6542 MD5 f61bfa064e3acdfcd826e4a38b121196 metadata.xml 161 MD5 0606a9da89d19a505c52818d14de61e3 files/cronset.sh 70 MD5 b38d67b03726b84833bd8c5f632e4020 files/bugzilla.cron.tab 54 @@ -11,10 +9,8 @@ MD5 a001fc92584de0cd6f1a0d8de99ee6ce files/firstcheck.sh 48 MD5 4a9b1a263f16b2a53b44bce45350b373 files/bugzilla.conf 148 MD5 69de0903f09253375e69f72695675172 files/digest-bugzilla-2.18.1 68 MD5 0be5a588dc7fdfc9e4898a855bd32361 files/bugzilla.cron.daily 115 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) - -iD8DBQFCvxQ4EzitwsaoONoRAqx/AJ9R3q3ncMZcbtDVljMfEbN0NbZ6IwCfWxuz -aqXMKXwq4bFNq/YUcw+0LVc= -=urco ------END PGP SIGNATURE----- +MD5 69de0903f09253375e69f72695675172 files/digest-bugzilla-2.18.1-r1 68 +MD5 b38d67b03726b84833bd8c5f632e4020 files/2.18.1-r1/bugzilla.cron.tab 54 +MD5 0be5a588dc7fdfc9e4898a855bd32361 files/2.18.1-r1/bugzilla.cron.daily 115 +MD5 42151252d49e42c9839f80c80dff9138 files/2.18.1-r1/apache.htaccess 94 +MD5 627268c5a2c707a3aaf69312c68a3c66 files/2.18.1-r1/reconfig 4264 diff --git a/www-apps/bugzilla/bugzilla-2.18.1-r1.ebuild b/www-apps/bugzilla/bugzilla-2.18.1-r1.ebuild new file mode 100644 index 000000000000..af269a9c0134 --- /dev/null +++ b/www-apps/bugzilla/bugzilla-2.18.1-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/bugzilla/bugzilla-2.18.1-r1.ebuild,v 1.1 2005/06/26 21:18:35 rl03 Exp $ + +inherit webapp + +DESCRIPTION="Bugzilla is the Bug-Tracking System from the Mozilla project" +SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/webtools/${P}.tar.gz" +HOMEPAGE="http://www.bugzilla.org" + +LICENSE="MPL-1.1 NPL-1.1" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="apache2" + +# See http://www.bugzilla.org/docs216/html/stepbystep.html to verify dependancies +# updated list of deps: http://www.bugzilla.org/releases/2.18/release-notes.html +# removed deps: dev-perl/MIME-tools +RDEPEND=">=dev-db/mysql-3.23.41 + >=dev-lang/perl-5.6.0 + >=dev-perl/AppConfig-1.52 + >=perl-core/CGI-2.93 + >=dev-perl/TimeDate-1.16 + >=dev-perl/DBI-1.36 + >=dev-perl/DBD-mysql-2.1010 + >=perl-core/File-Spec-0.8.2 + >=dev-perl/Template-Toolkit-2.08 + >=dev-perl/Text-Tabs+Wrap-2001.0131 + >=dev-perl/Chart-2.3 + >=dev-perl/GD-1.20 + dev-perl/GDGraph + dev-perl/GDTextUtil + dev-perl/perl-ldap + >=dev-perl/PatchReader-0.9.4 + dev-perl/XML-Parser + apache2? ( >=net-www/apache-2.0 ) + !apache2? ( =net-www/apache-1* )" + +src_unpack() { + unpack ${A} + cd ${S} + # remove CVS directories + find . -type d -name 'CVS' -print | xargs rm -rf +} + +src_install () { + webapp_src_preinst + + cd ${S} + + cp -r ${S}/* ${D}/${MY_HTDOCSDIR} || die + for file in `find -type d -printf "%p/* "`; do + webapp_serverowned "${MY_HTDOCSDIR}/${file}" + done + + cp ${FILESDIR}/${PVR}/apache.htaccess ${D}/${MY_HTDOCSDIR}/.htaccess + + local FILE="bugzilla.cron.daily bugzilla.cron.tab" + cd ${FILESDIR}/${PVR} + cp ${FILE} ${D}/${MY_HTDOCSDIR} + + # add the reconfigure hook + webapp_hook_script ${FILESDIR}/${PVR}/reconfig + + webapp_src_install +} diff --git a/www-apps/bugzilla/files/2.18.1-r1/apache.htaccess b/www-apps/bugzilla/files/2.18.1-r1/apache.htaccess new file mode 100644 index 000000000000..eb747223ccec --- /dev/null +++ b/www-apps/bugzilla/files/2.18.1-r1/apache.htaccess @@ -0,0 +1,3 @@ +AddHandler cgi-script .cgi +Options +Indexes +ExecCGI +FollowSymLinks +DirectoryIndex index.cgi diff --git a/www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.daily b/www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.daily new file mode 100644 index 000000000000..e3e86589891d --- /dev/null +++ b/www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.daily @@ -0,0 +1,5 @@ +#!/bin/sh +cd /var/www/bugzilla/ +./collectstats.pl +./whineatnews.pl +echo "*** Bugzilla nighlty flush has done! ***" diff --git a/www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.tab b/www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.tab new file mode 100644 index 000000000000..0ac2ef6d65a6 --- /dev/null +++ b/www-apps/bugzilla/files/2.18.1-r1/bugzilla.cron.tab @@ -0,0 +1 @@ +0 0 * * * /var/www/bugzilla/bugzilla.cron.daily diff --git a/www-apps/bugzilla/files/2.18.1-r1/reconfig b/www-apps/bugzilla/files/2.18.1-r1/reconfig new file mode 100644 index 000000000000..29c46230453a --- /dev/null +++ b/www-apps/bugzilla/files/2.18.1-r1/reconfig @@ -0,0 +1,110 @@ +#!/bin/bash + +FILE="bugzilla.cron.daily bugzilla.cron.tab" + +function die () +{ + echo + echo "***" + echo "*** Fatal error: $*" + echo "***" + exit 1 +} + +if [ $1 = "install" ]; then + + cd "${MY_INSTALLDIR}" || die "Cannot find install dir ${MY_INSTALLDIR}" + + sed -e "s|/var/www/bugzilla|${MY_INSTALLDIR}|g;" -i ${FILE} + + [[ -a localconfig ]] && die "The following does not work on previous installations, please run checksetup.pl in ${MY_INSTALLDIR}" + + echo + echo "Finalizing the installation of bugzilla in ${MY_INSTALLDIR}" + echo + + # config setting + echo "Details for the bugzilla database" + echo "(This scripts creates the database & user)" + echo + + echo -n "mysql bugs db host [localhost]: "; read mybugshost + [[ -z "${mybugshost}" ]] && mybugshost="localhost" + + echo -n "mysql bugs db port [3306]: "; read mybugsport + [[ -z "${mybugsport}" ]] && mybugsport="3306" + + echo -n "mysql bugs db name [bugs]: "; read mybugsdb + [[ -z "${mybugsdb}" ]] && mybugsdb="bugs" + + echo -n "mysql bugs dbuser name [bugs]: "; read mybugsuser + [[ -z "${mybugsuser}" ]] && mybugsuser="bugs" + + echo -n "mysql bugs dbuser password: "; read mybugspwd + [[ -z "${mybugspwd}" ]] && die "Error: no dbuser password" + pw=${mybugspwd//\'/\\\'} + + echo -n "admin email [no@spam.com]: "; read myadminemail + [[ -z "${myadminemail}" ]] && myadminemail="no@spam.com" + + echo -n "admin password [password]: "; read myadminpwd + [[ -z "${myadminpwd}" ]] && myadminpwd="password" + + echo -n "admin real name [Foo Bar]: "; read myadminrealname + [[ -z "${myadminrealname}" ]] && myadminrealname="Foo Bar" + + # let's create a config file for checksetup.pl + echo "\$answer{'db_host'} = '\$db_host = \"${mybugshost}\";" > bz.cfg.pl + echo "\$db_port = ${mybugsport};" >> bz.cfg.pl + echo "\$db_name = \"${mybugsdb}\";" >> bz.cfg.pl + echo "\$db_user = \"${mybugsuser}\";';" >> bz.cfg.pl + echo "\$answer{'db_pass'} = q[\$db_pass = '${mybugspwd}';];" >> bz.cfg.pl + echo "\$answer{'db_sock'} = q[\$db_sock = '/var/run/mysqld/mysqld.sock';];" >> bz.cfg.pl + + echo "\$answer{'ADMIN_OK'} = 'Y';" >> bz.cfg.pl + echo "\$answer{'ADMIN_EMAIL'} = '${myadminemail}';" >> bz.cfg.pl + echo "\$answer{'ADMIN_PASSWORD'} = '${myadminpwd}';" >> bz.cfg.pl + echo "\$answer{'ADMIN_REALNAME'} = '${myadminrealname}';" >> bz.cfg.pl + + # privileges + echo "Setting correct privileges for bugzilla mysql connection" + echo -n "Please enter login info for user who has grant privileges on ${mybugshost} [${USER}]: "; read adminuser + [[ -z ${adminuser} ]] && adminuser="${USER}" + if [ "${mybugshost}" != "localhost" ]; then + echo -n "Client address for bugzilla (at db side) [$(hostname -f)]: "; read clientaddr + [[ -z ${clientaddr} ]] && clientaddr="$(hostname -f)" + fi + # this will be default for localhost + [[ -z ${clientaddr} ]] && clientaddr="${mybugshost}" + + # check the installed mysql version + type -p mysql &>/dev/null || die "mysql program not found ! Check your PATH (or did you emerge with --nodeps ?)" + mysql_version="`mysql -V | cut -d' ' -f6 | sed -e 's:,$::'`" + [[ -z ${mysql_version} ]] && die "mysql version check failed (got '${mysql_version}')" + extra_bugzie_privs="" + (( ${mysql_version:0:1} < 4 )) && extra_bugzie_privs=",LOCK TABLES,CREATE TEMPORARY TABLES" + + # if $bugshost == localhost, don't specify -h argument, so local socket can be used. + host=${mybugshost/localhost} + /etc/init.d/mysql restart || die "Could not (re)start mysql!" + mysql -u "${adminuser}" "${host:+-h ${host}}" -p \ + -P "${mybugsport}" \ + -e "GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP,REFERENCES${extra_bugzie_privs} ON ${mybugsdb}.* TO '${mybugsuser}'@'${clientaddr}' IDENTIFIED BY '${pw}'; FLUSH PRIVILEGES;" \ + || die "Error initializing database. Please grant permissions manually. See http://www.bugzilla.org/docs/2.18/html/configuration.html." + + echo "Setting the template for localconfig variables" + chmod 755 ./checksetup.pl + ./checksetup.pl bz.cfg.pl || exit 1 + + echo "Final step: setting all html templates and db tables" + ./checksetup.pl || exit 1 + + echo -n "Do you want to set a crontab [y/N]" ; read cronyes + if [ "${cronyes}+" = "y+" ] ; then + /usr/bin/crontab -u apache ${MY_INSTALLDIR}/bugzilla.cron.tab + fi + +else + [[ -z "${MY_INSTALLDIR}" ]] && die "${MY_INSTALLDIR} not found!" + rm -f "${FILES}" bz.cfg.pl +fi diff --git a/www-apps/bugzilla/files/digest-bugzilla-2.18.1-r1 b/www-apps/bugzilla/files/digest-bugzilla-2.18.1-r1 new file mode 100644 index 000000000000..e24a62e80d17 --- /dev/null +++ b/www-apps/bugzilla/files/digest-bugzilla-2.18.1-r1 @@ -0,0 +1 @@ +MD5 3765b0021377d626a9b8c50868dd51b9 bugzilla-2.18.1.tar.gz 1542054 |