Bugzilla
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
+sqlite
Add support for sqlite - embedded sql database
apache2
Add Apache2 support
doc
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
mysql
Add mySQL Database support
postgres
Add support for the postgresql database
selinux
!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
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
Users might prefer to emerge app-admin/webapp-config and configure it before proceeding to emerge www-apps/bugzilla .
Install www-apps/bugzilla :
root #emerge --ask www-apps/bugzillaDatabase
MySQL
Install dev-db/mysql but prefer a 5.x version [1] , then create a user for the bugzilla database:
root #mysql -u root -pmysql> CREATE USER 'bugs'@'localhost' IDENTIFIED BY '$db_pass'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '$db_pass'; mysql> FLUSH PRIVILEGES; mysql> \q
PostgreSQL
Once PostgreSQL is installed and set up on the system, install bugzilla with the postgres USE flag, then create a user and a database for bugzilla to use:
root #su - postgrespostgrescreateuser -U postgres -dRSP bugsEdit the following configuration file and add the following line (adjust according to PostgeSQL version):
/etc/postgresql-15/pg_hba.confhost all bugs 127.0.0.1 255.255.255.255 md5
Then restart the database server:
root #/etc/init.d/postgresql restartOr:
root #rc-service postgresql-15 restartChecksetup
Change directory to /var/www/localhost/htdocs/bugzilla, then execute checksetup.pl:
root #cd /var/www/localhost/htdocs/bugzillaroot #./checksetup.plThe first execution produces a localconfig file, in which the information about the database used must be put. The comments in that files are self-explanatory. Next, re-run checksetup.pl, which will create the database, configure bugzilla and create the admin user.
Configuration
Apache
Add bugzilla to the default vhost:
/etc/apache2/vhosts.d/default_vhost.include<Directory"/var/www/localhost/htdocs/bugzilla"> AddHandlercgi-script.cgi Options+ExecCGI+FollowSymLinks DirectoryIndexindex.cgiindex.html AllowOverrideAll </Directory>
Or alternatively define another vhost, which will make bugzilla directly available at https://127.0.0.1:
/etc/apache2/vhosts.d/bugzilla_vhost.conf<VirtualHost*:80> ServerNamelocalhost DocumentRoot"/var/www/localhost/htdocs/bugzilla" <Directory"/var/www/localhost/htdocs/bugzilla"> AddHandlercgi-script.cgi Options+ExecCGI+FollowSymLinks DirectoryIndexindex.cgiindex.html AllowOverrideAll Requireallgranted </Directory> <IfModulempm_peruser_module> ServerEnvironmentapacheapache </IfModule> CustomLog/var/log/apache2/bugzilla_access.logcombined ErrorLog/var/log/bugzilla_error.log </VirtualHost>
Then restart the web server:
root #/etc/init.d/apache2 restartWeb end
Finally, point a web browser to https://127.0.0.1/bugzilla/ or https://127.0.0.1 depending on the configuration. Log in with the admin account and bugzilla will invite to proceed to the essential post-installation configuration [2] .
Upgrading
Bugzilla cannot be downgraded.
Before upgrading, it is recommended to backup the application and its database.
To upgrade bugzilla app-admin/webapp-config [3] can be used. Upgrade is done automatically if the package is emerged without the vhosts flag. Finally, after upgrading, checksetup.pl should always be run to apply database changes and set file permissions [4] .
Upgrades can also be done manually as follows, which applies if you installed your bugzilla application to /var/www/localhost/htdocs/bugzilla, you may replace this location accordingly. Before emerging bugzilla, move your bugzilla directory:
root #mv /var/www/localhost/htdocs/bugzilla /var/www/localhost/htdocs/bugzilla-oldThen emerge bugzilla:
root #emerge -av www-apps/bugzillaNext, copy the directories data, lib (may be empty) and template/en/custom (may not exist) from your previous installation to your new installation, together with the previous localconfig file. Then run checksetup.pl:
root #cp /var/www/localhost/htdocs/bugzilla-old/data /var/www/localhost/htdocs/bugzilla/
root #cp -r /var/www/localhost/htdocs/bugzilla-old/lib /var/www/localhost/htdocs/bugzilla/
root #cp -r /var/www/localhost/htdocs/bugzilla-old/template/en/custom var/www/localhost/htdocs/bugzilla/
root #cp /var/www/localhost/htdocs/bugzilla-old/localconfig var/www/localhost/htdocs/bugzilla/
root #cd /var/www/localhost/htdocs/bugzilla/
root #./checksetup.pl
After having ascertained that the new installation works as expected, the old bugzilla directory may be deleted.
Troubleshooting
If after executing checksetup.pl an output similar to the following is received:
root #/var/www/localhost/htdocs/bugzilla/checksetup.plUndefined 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.Then comment this line [5] [6] .
/var/www/localhost/htdocs/bugzilla/Bugzilla/Util.pm$var=~tr/\x{202a}-\x{202e}//d;
Then re-execute checksetup.pl.
More documentation
Find more documentation on the official bugzilla documentation page [7] .
References
- ↑ https://bugzilla.mozilla.org/show_bug.cgi?id=1604051 [MySQL 8 Compatibility]
- ↑ https://bugzilla.readthedocs.io/en/5.0/installing/essential-post-install-config.html [Essential Post-Installation Configuration]
- ↑ Webapp-config
- ↑ https://bugs.gentoo.org/124282 [Update causes internal error]
- ↑ Mozilla bug 1588175 - Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.
- ↑ Perl issue 17271 - Safe.pm
- ↑ https://bugzilla.readthedocs.io/en/5.0/index.html [Bugzilla Documentation]