Bugzilla 4.4.6 on Ubuntu 14.04 / 14.10 (trusty / utopic) server

This document IS NOT intended to be a complete guide. It's rather a collection of notes.


Perl modules

Most of the modules bugzilla depends on are available as deb packages via Ubuntu repositories. Below are ubuntu packages that contain most of them.

core:

libdatetime-perl
libdbi-perl
libemail-send-perl
libemail-mime-perl
liblist-moreutils-perl
libmath-random-isaac-perl
libtemplate-perl
liburi-perl

DB:

DBMSdeb package
postgreslibdbd-pg-perl
mysqllibdbd-mysql-perl

some optional:

deb packageperl modulefeature
libauthen-sasl-perlAuthen::SASLSMTP Authentication
libtheschwartz-perlTheSchwartzMail Queueing
libdaemon-generic-perlDaemon::Generic
libfile-slurp-perlFile::Slurp
libfile-mimeinfo-perlFile::MimeInfo::MagicSniff MIME type of attachments
libio-stringy-perlIO::Scalar
libencode-detect-perlEncode::DetectAutomatic charset detection for text attachments
libmime-tools-perlMIME::ParserMove Bugs Between Installations
libxml-twig-perlXML::TwigMove Bugs Between Installations, Automatic Update Notifications
libhtml-scrubber-perlHTML::ScrubberMore HTML in Product/Group Descriptions
libchart-perlChart::LinesGraphical Reports, New Charts, Old Charts
libgd-graph-perlGD::Graph
libtemplate-plugin-gd-perlTemplate::Plugin::GD::Image
libhtml-formattext-withlinks-perlHTML::FormatText::WithLinksInbound Email
libemail-reply-perlEmail::ReplyInbound Email (by default available only on 14.10, but see these notes)

The above list of optional packages does not cover modules providing custom authentication methods (LDAP, Radius) and custom access methods (XML-RPC, JSON-RPC). These modules may be available as deb packages, but I haven't checked it.
The list also does not cover PatchReader module providing patch viewing feature, as it's not available as a deb package.

libemail-reply-perl

This deb package is available in Ubuntu 14.10 but not in 14.04.
However, on 14.04 you can install version from 14.10 without problems: it's architecture independent and does not have any dependencies specific to 14.10. Just download it from here and install with dpkg.


TLS support in SMTP

You need module Email::Send::SMTP::TLS. It's not available as a deb package so you need to install it by cpan:

sudo cpan Email::Send::SMTP::TLS
You will also need to install libnet-smtp-tls-butmaintained-perl deb package that provides dependencies for the above module.
After that you need to do some minor (3 line) change to bugzilla code as described here.
For your convenience here is the patch:
diff -u bugzilla-4.4.6/Bugzilla/Mailer.pm bugzilla-4.4.6-tls/Bugzilla/Mailer.pm 
--- bugzilla-4.4.6/Bugzilla/Mailer.pm	2014-10-06 23:32:08.000000000 +0700
+++ bugzilla-4.4.6-tls/Bugzilla/Mailer.pm	2015-01-06 17:01:26.128503247 +0700
@@ -123,10 +123,12 @@
         }
     }
 
-    if ($method eq "SMTP") {
+    if ($method eq "SMTP" || $method eq 'SMTP::TLS' ) {
         push @args, Host  => Bugzilla->params->{"smtpserver"},
                     username => Bugzilla->params->{"smtp_username"},
                     password => Bugzilla->params->{"smtp_password"},
+                    User => Bugzilla->params->{"smtp_username"},
+                    Password => Bugzilla->params->{"smtp_password"},
                     Hello => $hostname, 
                     ssl => Bugzilla->params->{'smtp_ssl'},
                     Debug => Bugzilla->params->{'smtp_debug'};
After that SMTP::TLS will be available as mail_delivery_method in bugzilla email configuration. Note that smtp_ssl should be set to Off.


mod_cgi(d) vs mod_perl

mod_perl is faster but uses more RAM. So the choice depends on what you are concerned more about.
mod_cgi and mod_cgid are a part of apache deb package, so all you need to do is this command:

sudo a2enmod cgi
It will even chose appropriate cgi or cgid for you based on your installed MPM :)

To run bugzilla under mod_perl you need 2 additional perl modules: Apache2::SizeLimit and Linux::Pid. Apache2::SizeLimit is bundled together with mod_perl in libapache2-mod-perl2 deb package.

On Ubuntu 14.10 Linux::Pid is available in liblinux-pid-perl deb package. Unfortunately this package is not available on 14.04 and the one from 14.10 cannot be just installed on 14.04 as it depends on a newer version of perl. I haven't tried yet to port it to 14.04 so for now I've installed it via cpan:
sudo cpan Linux::Pid



Copyright 2015 Piotr Morgwai KotarbiƄski
Licensed under the Apache License, Version 2.0