Bugzilla

From Gentoo Wiki
Jump to: navigation, search
 As of April 10th, 2015, the information in this article is probably outdated. You can help the Gentoo community by verifying and updating this article.
Resources
Note
This article refers to the Bugzilla web application. Go here for the Gentoo Bugzilla guide.

Bugzilla is a web application for tracking bugs.

Installation

USE flags

USE flags for www-apps/bugzilla Bugzilla is the Bug-Tracking System from the Mozilla project

extras Optional Perl modules
graphviz Add support for the Graphviz library
modperl Enable www-apache/mod_perl support
mysql Add mySQL Database support
postgres Add support for the postgresql database
sqlite Add support for sqliteembedded sql database
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
vhosts Add support for installing web-based applications into a virtual-hosting environment

Emerge

root #emerge --ask www-apps/bugzilla

MySQL

Install MySQL, then create a database for Bugzilla:

root #mysql -u root -p
mysql> CREATE DATABASE IF NOT EXISTS `bugs` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
mysql> CREATE USER 'bugs'@'localhost' IDENTIFIED BY 'changeme';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `bugs`.* TO 'bugs'@'localhost' IDENTIFIED BY 'changeme';
mysql> \q

Configuration

Apache

FILE /etc/portage/package.use/apache
www-servers/apache APACHE2_MODULES: access_compat

Adjust configs

FILE /var/www/localhost/htdocs/bugzilla/localconfig
$db_pass = 'changeme';
FILE /etc/mysql/my.cnf
max_allowed_packet = 4M
root #/var/www/localhost/htdocs/bugzilla/checksetup.pl
root #
cat >> /etc/apache2/vhosts.d/default_vhost.include << EOF
<Directory /var/www/localhost/htdocs/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All FileInfo Indexes Options
Require all granted
</Directory>
EOF
root #/etc/init.d/apache2 restart

Web end

Finally, point a web browser to http://127.0.0.1/bugzilla/

Troubleshooting

If after executing checksetup.pl you get something like

root #/var/www/localhost/htdocs/bugzilla/checksetup.pl
Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 104. 
Compilation failed in require at Bugzilla/Mailer.pm line 21,  line 755.
BEGIN failed--compilation aborted at Bugzilla/Mailer.pm line 21,  line 755.
Compilation failed in require at Bugzilla/Auth.pm line 22,  line 755.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22,  line 755.
Compilation failed in require at Bugzilla.pm line 23,  line 755.
BEGIN failed--compilation aborted at Bugzilla.pm line 23,  line 755.
Compilation failed in require at ./checksetup.pl line 75,  line 755.

Try and comment this line [1] [2].

FILE /var/www/localhost/htdocs/bugzilla/Bugzilla/Util.pm
$var =~ tr/\x{202a}-\x{202e}//d;

Then re-execute checksetup.pl

References

  1. Mozilla bug 1588175 - Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.
  2. Perl issue 17271 - Safe.pm


See also