diff options
author | Renat Lumpau <rl03@gentoo.org> | 2005-10-03 23:19:53 +0000 |
---|---|---|
committer | Renat Lumpau <rl03@gentoo.org> | 2005-10-03 23:19:53 +0000 |
commit | 93a7be2f04f1ae32a9045485db88213d17ab4cb0 (patch) | |
tree | 9da1d195096b988948baf4ce41481b100182c84b /www-apps/bugzilla/files | |
parent | Stable on sh. (diff) | |
download | gentoo-2-93a7be2f04f1ae32a9045485db88213d17ab4cb0.tar.gz gentoo-2-93a7be2f04f1ae32a9045485db88213d17ab4cb0.tar.bz2 gentoo-2-93a7be2f04f1ae32a9045485db88213d17ab4cb0.zip |
Reconfig hook is no longer interactive, per bug #107918.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'www-apps/bugzilla/files')
-rw-r--r-- | www-apps/bugzilla/files/2.18/postinstall-en.txt | 4 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.18/reconfig | 83 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.20/postinstall-en.txt | 7 | ||||
-rw-r--r-- | www-apps/bugzilla/files/2.20/reconfig | 123 |
4 files changed, 15 insertions, 202 deletions
diff --git a/www-apps/bugzilla/files/2.18/postinstall-en.txt b/www-apps/bugzilla/files/2.18/postinstall-en.txt new file mode 100644 index 000000000000..2b3391f1a859 --- /dev/null +++ b/www-apps/bugzilla/files/2.18/postinstall-en.txt @@ -0,0 +1,4 @@ +Bugzilla has been installed into ${MY_INSTALLDIR} + +To finish the installation, please read +http://www.bugzilla.org/docs/2.18/html/installation.html diff --git a/www-apps/bugzilla/files/2.18/reconfig b/www-apps/bugzilla/files/2.18/reconfig index f62bfe278642..9d2c893b1711 100644 --- a/www-apps/bugzilla/files/2.18/reconfig +++ b/www-apps/bugzilla/files/2.18/reconfig @@ -2,7 +2,7 @@ FILE="bugzilla.cron.daily bugzilla.cron.tab" -function die () +function die () { echo echo "***" @@ -12,85 +12,8 @@ function die () } 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//\'/\\\'} - - # 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 - - # 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 - + sed -e "s|/var/www/bugzilla|${MY_INSTALLDIR}|g" -i ${FILE} || die "sed failed" else - [[ -z "${MY_INSTALLDIR}" ]] && die "${MY_INSTALLDIR} not found!" - rm -f "${FILES}" bz.cfg.pl + echo "done" fi diff --git a/www-apps/bugzilla/files/2.20/postinstall-en.txt b/www-apps/bugzilla/files/2.20/postinstall-en.txt index ba8abb222a26..8dabca5e6590 100644 --- a/www-apps/bugzilla/files/2.20/postinstall-en.txt +++ b/www-apps/bugzilla/files/2.20/postinstall-en.txt @@ -1,2 +1,7 @@ -Please read the Release Notes, especially if you are upgrading: +Bugzilla has been installed into ${MY_INSTALLDIR} + +To finish the installation, please read + http://www.bugzilla.org/docs/2.20/html/installation.html + +Also, please read the Release Notes, especially if you are upgrading: http://www.bugzilla.org/releases/2.20/release-notes.html diff --git a/www-apps/bugzilla/files/2.20/reconfig b/www-apps/bugzilla/files/2.20/reconfig index 4d24f23d0adf..71b0acea2585 100644 --- a/www-apps/bugzilla/files/2.20/reconfig +++ b/www-apps/bugzilla/files/2.20/reconfig @@ -2,7 +2,7 @@ FILE="bugzilla.cron.daily bugzilla.cron.tab" -function die () +function die () { echo echo "***" @@ -12,127 +12,8 @@ function die () } 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 "If you want to use Postgres, please enter numeric IP" - echo "or the config script will hang" - echo -n "bugs db host [127.0.0.1]: "; read mybugshost - [[ -z "${mybugshost}" ]] && mybugshost="127.0.0.1" - - echo -n "bugs db driver (mysql or pg) [mysql]: "; read mydriver - [[ -z "${mydriver}" ]] && mydriver="mysql" - - if [[ ${mydriver} == "mysql" ]]; then - port="3306" - granter="root" - elif [[ ${mydriver} == "pg" ]]; then - port="5432" - granter="postgres" - else - die "Wrong db driver" - fi - - echo -n "bugs db port [${port}]: "; read mybugsport - [[ -z "${mybugsport}" ]] && mybugsport="${port}" - - echo -n "bugs db name [bugs]: "; read mybugsdb - [[ -z "${mybugsdb}" ]] && mybugsdb="bugs" - - echo -n "bugs dbuser name [bugs]: "; read mybugsuser - [[ -z "${mybugsuser}" ]] && mybugsuser="bugs" - - echo -n "bugs dbuser password: "; read mybugspwd - [[ -z "${mybugspwd}" ]] && die "Error: no dbuser password" - pw=${mybugspwd//\'/\\\'} - - echo -n "your SMTP server [localhost]: "; read mysmtp - [[ -z "${mysmtp}" ]] && mysmtp="localhost" - - # let's create a config file for checksetup.pl - echo "\$answer{'db_host'} = q[" > bz.cfg.pl - echo "\$db_host = '${mybugshost}';" >> bz.cfg.pl - echo "\$db_driver = '${mydriver}';" >> 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 "];" >> bz.cfg.pl - echo "\$answer{'db_pass'} = q[\$db_pass = '${mybugspwd}';];" >> bz.cfg.pl - echo "\$answer{'SMTP_SERVER'} = q['${mysmtp}';];" >> bz.cfg.pl - if [[ ${mydriver} == "mysql" ]]; then - echo "\$answer{'db_sock'} = q[\$db_sock = '/var/run/mysqld/mysqld.sock';];" >> bz.cfg.pl - elif [[ ${mydriver} == "pg" ]]; then - echo "\$answer{'db_sock'} = q[\$db_sock = '/tmp/.s.PGSQL.${mybugsport}';];" >> bz.cfg.pl - else - die "Wrong db driver" - fi - - # privileges - echo "Setting correct privileges for bugzilla connection" - echo -n "Please enter login info for user who has grant privileges on ${mybugshost} [${granter}]: "; read adminuser - [[ -z ${adminuser} ]] && adminuser="${granter}" - if [ "${mybugshost}" != "127.0.0.1" ]; 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}" - - if [[ ${mydriver} == "mysql" ]]; then - - # 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/"127.0.0.1"} - /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/tip/html/configuration.html." - - elif [[ ${mydriver} == "pg" ]]; then - # if $bugshost == localhost, don't specify -h argument, so local socket can be used. - host=${mybugshost/"127.0.0.1"} - /etc/init.d/postgresql restart || die "Could not (re)start postgresql!" - createdb -U "${adminuser}" ${host:+-h ${host}} -W \ - -p "${mybugsport}" -O "${mybugsuser}" "${mybugsdb}" \ - || die "Error initializing database. Please grant permissions manually. See http://www.bugzilla.org/docs/tip/html/configuration.html." - - else - die "Wrong db driver" - fi - - echo "Setting the template for localconfig variables" - cd ${MY_INSTALLDIR} || die - 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 - + sed -e "s|/var/www/bugzilla|${MY_INSTALLDIR}|g" -i ${FILE} || die "sed failed" else echo "done." fi |