What is Bugzilla
Bugzilla is a bug- or issue-tracking system. Bug-tracking systems allow individual or
groups of developers effectively to keep track of outstanding problems with their
product. Most commercial defect-tracking software vendors at the time charged
enormous licensing fees, and Bugzilla quickly became a favorite of the open-source
crowd (with its genesis in the open-source browser project, Mozilla). It is now the
de-facto standard defect-tracking system against which all others are measured.
Akadia Bugzilla @ https://support.akadia.com
Akadia's Extensions to Bugzilla
Bugzilla allows each user, with an access to the bug tracking system, that she/he can
create other accounts. This is not desired, if you open Bugzilla against your
customers. It's desired, that the Bugzilla Administrator is the only person, which
can create such accounts. We changed the Templates and some CGI Perl scripts, to
disallow this functionality. The most restrictive action is to disallow to execute
the CGI scripts index.cgi and createaccount.cgi.
cd /usr/local/bugzilla
mv index.cgi index.cgi.OFF
mv createaccount.cgi createaccount.cgi.OFF
chmod 400 index.cgi.OFF
chmod 400 createaccount.cgi.OFF
Required Software
We tested the installation on the following environment:
-
Apache 2.0.54
-
MySQL 4.1.11 (Source Distribution)
-
Bugzilla 2.18
Perl Modules
Install the following Perl Modules from http://search.span.org with
perl Makefile.PL
make
make test
make install
-rw-r--r-- 1 root
root 54413 2004-02-04 11:33
AppConfig-1.56.tar.gz
-rw-r--r-- 1 root
root 131942 2004-10-03 11:30
Bit-Vector-6.4.tar.gz
-rw-r--r-- 1 root
root 1843040 2005-05-10 10:21 bugzilla-2.18.tar.gz
-rw-r--r-- 1 root
root 16789 2004-05-02 09:05
Carp-Clan-5.3.tar.gz
-rw-r--r-- 1 root
root 225687 2005-05-05 22:16
CGI.pm-3.09.tar.gz
-rw-r--r-- 1 root
root 516041 2004-01-14 16:10 Chart-2.3.tar.gz
-rw-r--r-- 1 root
root 144980 2005-01-30 22:47
Compress-Zlib-1.34.tar.gz
-rw-r--r-- 1 root
root 31931 2003-08-25 13:49
Data-Dumper-2.121.tar.gz
-rw-r--r-- 1 root
root 206622 2004-10-03 11:31
Date-Calc-5.4.tar.gz
-rw-r--r-- 1 root
root 116789 2005-04-27 02:14
DBD-mysql-2.9007.tar.gz
-rw-r--r-- 1 root
root 378698 2005-03-14 18:03 DBI-1.48.tar.gz
-rw-r--r-- 1 root
root 16855 2000-07-01 14:30
File-Spec-0.82.tar.gz
-rw-r--r-- 1 root
root 31603 2005-02-22 22:42
File-Temp-0.16.tar.gz
-rw-r--r-- 1 root
root 587617 2005-05-09 20:33 gd-2.0.33.tar.gz
-rw-r--r-- 1 root
root 252706 2005-03-09 22:04 GD-2.23.tar.gz
-rw-r--r-- 1 root
root 130020 2003-07-01 07:14
GDGraph-1.43.tar.gz
-rw-r--r-- 1 root
root 97855 2002-12-06 21:23
GD-Graph3d-0.63.tar.gz
-rw-r--r-- 1 root
root 64698 2003-06-19 03:10
GDTextUtil-0.86.tar.gz
-rw-r--r-- 1 root
root 82304 2005-01-06 10:09
HTML-Parser-3.45.tar.gz
-rw-r--r-- 1 root
root 7869 2004-12-30 08:47
HTML-Tagset-3.04.tar.gz
-rw-r--r-- 1 root
root 312250 2004-01-07 13:47
Image-Info-1.16.tar.gz
-rw-r--r-- 1 root
root 123479 2003-07-21 08:59
Image-Size-2.992.tar.gz
-rw-r--r-- 1 root
root 234773 2004-12-11 16:48
libwww-perl-5.803.tar.gz
-rw-r--r-- 1 root
root 64335 2004-08-21 04:34
libxml-perl-0.08.tar.gz
-rw-r--r-- 1 root
root 2406 1997-02-26 19:21
Math-Trig-0.02.tar.gz
-rw-r--r-- 1 root
root 385018 2005-01-20 22:24
MIME-tools-5.417.tar.gz
-rw-r--r-- 1 root
root 9037 2004-07-17 20:06
PatchReader-0.9.5.tar.gz
-rw-r--r-- 1 root
root 189159 2004-07-22 16:24
patchutils-0.2.30.tar.gz
-rw-r--r-- 1 root
root 35023 2003-07-24 17:45
Pod-POM-0.17.tar.gz
-rw-r--r-- 1 root
root 843175 2004-10-04 13:48
Template-Toolkit-2.14.tar.gz
-rw-r--r-- 1 root
root 5523 2005-03-27 04:58
Test-Manifest-1.14.tar.gz
-rw-r--r-- 1 root
root 17431 2005-05-05 00:47
Text-Autoformat-1.13.tar.gz
-rw-r--r-- 1 root
root 20902 2003-05-07 11:46
Text-Reform-1.11.tar.gz
-rw-r--r-- 1 root
root 7557 2001-09-30 07:17
Text-Tabs+Wrap-2001.0929.tar.gz
-rw-r--r-- 1 root
root 23536 2005-03-08 00:53
Tie-DBI-1.01.tar.gz
-rw-r--r-- 1 root
root 22366 2003-06-03 11:04
TimeDate-1.16.tar.gz
-rw-r--r-- 1 root
root 96050 2004-11-05 15:21
URI-1.35.tar.gz
-rw-r--r-- 1 root
root 116710 2003-07-29 00:54
XML-DOM-1.43.tar.gz
-rw-r--r-- 1 root
root 3313 2001-06-26 15:34
XML-RegExp-0.03.tar.gz
-rw-r--r-- 1 root
root 38586 2004-08-13 06:19
XML-RSS-1.05.tar.gz
-rw-r--r-- 1 root
root 39832 2003-01-26 20:38
XML-XPath-1.13.tar.gz
Installation and Configuration
Apache 2.0.54
./configure --prefix=/usr/local/apache \
--enable-mods-shared=most \
--enable-ssl=shared \
--enable-mime-magic \
--enable-cern-meta \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-usertrack \
--enable-unique-id \
--enable-deflate
make
make install
cd /usr/local/apache
rm -rf logs
ln -s /var/log/httpd logs
cd /var/log
chown root:apache httpd
chmod 775 httpd
Edit the Configuration File httpd.conf:
You'll want to make sure that your web server will run any file with the .cgi
extension as a CGI and not just display it. If you're using Apache that means
uncommenting the following line in the httpd.conf file:
AddHandler cgi-script .cgi
With Apache you'll also want to make sure that within the httpd.conf file the line:
Options ExecCGI
AllowOverride Limit
Here is our full httpd.conf file:
ServerRoot "/usr/local/apache"
Listen 80
ExtendedStatus On
User apache
Group apache
ServerAdmin martin dot zahn at akadia dot ch
ServerName venus.hsz.akadia.com
UseCanonicalName On
DocumentRoot "/usr/local/bugzilla"
<Directory />
Options FollowSymLinks
Options ExecCGI
AllowOverride Limit
</Directory>
<Directory "/usr/local/bugzilla">
Options Indexes FollowSymLinks
Options ExecCGI
AllowOverride Limit
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html
AddHandler cgi-script .cgi
MySQL
Find the detailed Installation here
Bugzilla
You should untar the Bugzilla files into a directory that you're willing to make
writable by the default web server user. You may decide to put the files in the main
web space for your web server or perhaps in /usr/local/apache with a symbolic link in
the web space that points to the Bugzilla directory.
mkdir /usr/local/bugzilla
cd /usr/local/bugzilla
gunzip bugzilla-2.18.tar.gz
tar xvf bugzilla-2.18.tar
Once all the files are in a web accessible directory, make that directory writable by
your webserver's user. This is a temporary step until you run the post-install
checksetup.pl script, which locks down your installation.
Lastly, you'll need to set up a symbolic link to /usr/bonsaitools/bin/perl for the
correct location of your Perl executable (probably /usr/bin/perl). Otherwise you must
hack all the .cgi files to change where they look for Perl. This can be done using
the following Perl one-liner, but I suggest using the symlink approach to avoid
upgrade hassles.
mkdir -p /usr/bonsaitools/bin
cd /usr/bonsaitools/bin
ln -s /usr/bin/perl perl
Setting Up the MySQL Database
After you've gotten all the software installed and working you're ready to start
preparing the database for its life as the back end to a high quality bug tracker.
First, you'll want to fix MySQL permissions to allow access from Bugzilla. For the
purpose of this Installation section, the Bugzilla username will be "bugs", and will
have minimal permissions.
Begin by giving the MySQL root user a password. MySQL passwords are limited to 16
characters.
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
shell> mysql --user=root --password='new_password'
mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO bugs@localhost
IDENTIFIED BY 'some_pass' WITH GRANT
OPTION;
Next, we use an SQL GRANT command to create a "bugs" user, and grant sufficient
permissions for checksetup.pl, which we'll use later, to work its magic. This also
restricts the "bugs" user to operations within a database called "bugs", and only
allows the account to connect from "localhost". Modify it to reflect your setup if
you will be connecting from another machine or as a different user.
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES ON
bugs.* TO bugs@localhost;
mysql> GRANT LOCK TABLES ON bugs.* TO bugs@localhost;
mysql> GRANT CREATE TEMPORARY TABLES ON bugs.* TO bugs@localhost;
mysql> FLUSH PRIVILEGES;
checksetup.pl
Next, run the magic checksetup.pl script. This script is designed to make sure your
MySQL database and other configuration options are consistent with the Bugzilla CGI
files. It will make sure Bugzilla files and directories have reasonable permissions,
set up the data directory, and create all the MySQL tables.
cd /usr/local/bugzilla
./checksetup.pl
The first time you run it, it will create a file called localconfig.
This file contains a variety of settings you may need to tweak including how Bugzilla
should connect to the MySQL database.
The connection settings include:
-
server's host: just use "localhost" if the MySQL server is local
-
database name: "bugs" if you're following these directions
-
MySQL username: "bugs" if you're following these directions
-
Password for the "bugs" MySQL account; (<bugs_password>) above
Once you are happy with the settings, su to the user your web server runs as, and
re-run checksetup.pl.
cd /usr/local/bugzilla
./checksetup.pl
On this second run, it will create the database and an administrator account for
which you will be prompted to provide information. The checksetup.pl script is designed so that you can run it at
any time without causing harm. You should run it after any upgrade to Bugzilla.
Checking perl modules ...
Checking for AppConfig (v1.52) ok:
found v1.56
Checking for
CGI (v2.93) ok: found v3.09
Checking for Data::Dumper (any) ok: found
v2.121
Checking for Date::Format (v2.21) ok: found v2.22
Checking for
DBI (v1.36) ok: found v1.48
Checking for DBD::mysql (v2.1010) ok: found
v2.9007
Checking for File::Spec (v0.82) ok: found
v0.82
Checking for File::Temp (any)
ok: found v0.16
Checking for Template (v2.08)
ok: found v2.14
Checking for Text::Wrap (v2001.0131) ok: found
v2001.0929
The following Perl modules are optional:
Checking
for GD
(v1.20) ok: found v2.23
Checking for Chart::Base (v1.0) ok: found
v2.3
Checking for XML::Parser (any) ok:
found v2.31
Checking for GD::Graph
(any) ok: found v1.43
Checking for GD::Text::Align (any) ok: found v1.18
Checking for PatchReader (v0.9.4) ok: found v0.9.5
Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Checking for MySQL Server (v3.23.41) ok: found v4.1.11-log
Populating duplicates table...
Optional Additional Configuration
As long as you installed the GD and Graph::Base Perl modules you might as well turn
on the nifty Bugzilla bug reporting graphs. By now you have a fully functional
Bugzilla, but what good are bugs if they're not annoying? To help make those bugs
more annoying you can set up Bugzilla's automatic whining system to complain at
engineers which leave their bugs in the NEW state without triaging them.
crontab -l
0 0 * * * cd /usr/local/bugzilla; ./collectstats.pl
5 0 * * * cd /usr/local/bugzilla; ./whineatnews.pl
Template Customisation
One of the large changes for 2.16 was the templatisation of the entire user-facing
UI, using the Template
Toolkit. Administrators can now configure the look and feel of Bugzilla
without having to edit Perl files or face the nightmare of massive merge conflicts
when they upgrade to a newer version in the future.
Copy all templates from /usr/local/bugzilla/template/en/default to /usr/local/bugzilla/template/en/custom
Templates in this directory structure automatically override any identically-named
and identically-located templates in the default directory.
The custom directory does not exist at first and must be
created if you want to use it.
cd /usr/local/bugzilla/template/en/custom
ls -l
drwxr-x--- 14
root apache 4096
2005-05-10 09:53 ./
drwxr-x--- 5 root
apache 4096 2005-05-10 08:53 ../
drwxr-x--- 7 root
apache 4096 2005-01-15 21:24 account/
drwxr-x--- 7 root
apache 4096 2005-01-15 21:24 admin/
drwxr-x--- 3 root
apache 4096 2005-01-15 21:24 attachment/
drwxr-x--- 7 root
apache 4096 2005-01-15 21:24 bug/
-rw-r----- 1 root
apache 4240 2003-06-23 20:01 config.js.tmpl
-rw-r----- 1 root
apache 5618 2003-06-23 20:01 config.rdf.tmpl
drwx------ 2 root
apache 4096 2005-01-15 21:24 CVS/
-rw-r----- 1 root
apache 10654 2004-09-15 01:30 filterexceptions.pl
drwxr-x--- 3 root
apache 4096 2005-01-15 21:24 flag/
drwxr-x--- 3 root
apache 4096 2005-05-10 09:31 global/
-rw-r----- 1 root
apache 3392 2005-05-10 09:51 index.html.tmpl
drwxr-x--- 3 root
apache 4096 2005-05-10 09:18 list/
drwxr-x--- 3 root
apache 4096 2005-01-15 21:24 pages/
drwxr-x--- 3 root
apache 4096 2005-05-10 09:41 reports/
drwxr-x--- 3 root
apache 4096 2005-01-15 21:24 request/
drwxr-x--- 3 root
apache 4096 2005-01-15 21:24 search/
-rw-r----- 1 root
apache 5282 2005-05-10 09:53
sidebar.xul.tmpl
More Information to Templatisation can be found on bugzilla.org: http://www.bugzilla.org/docs/2.18/html/cust-templates.html
|