Thursday, March 28, 2013

ALMWORKS Bugzilla 3.4 virtual appliance upgrade to 4.0 with Gmail support

Sometimes we need to upgrade old virtual machine appliances.

The following manual shows the steps required to update a pretty old Bugzilla VM to a more recent Bugzilla version with Gmail support.

The manual does not cover the CVS to Bzr migration therefore update only handles to Bugzilla version 4.0

So let's see:

First start with VM backup or more better a clone of the old VM.

----------
Navigate browser and change password of admin user for at least 6 char length password. (version 4.0 does not support passwords less than 6 character length)

----------
(UPDATE OLD LINUX BOX (NO DIST UPGRADE))

login with bugzilla

backup old database
mysqldump --opt -u bugs -p bugs > bugs.sql
exit


login with root

here we need to update package sources.

nano /etc/apt/source.lst

-------------------
ensure following packages are in the package source
deb http://archive.debian.org/debian-archive/debian/ lenny main contrib non-free
deb http://archive.debian.org/debian-archive/debian-security/ lenny/updates main contrib non-free
deb http://archive.debian.org/debian-archive/debian-volatile lenny/volatile main

(Ctr+O)
(Ctr+X)

-------------------
Update apt packages with the new packages
apt-get update

Now upgrade old outdated packages
apt-get upgrade

(when asking for new password for mysql simply press enter to leave the old password)
(when asking for ssl conf select to keep current version)
O


reboot


(UPDATE Bugzilla - in place update)

(login as root)
apt-get install make

(remove packages no longer required after the upgrade)
apt-get autoremove

login bugzilla


(updating current 3.4 to latest 4.0 using csv)
cvs update -rBUGZILLA-4_0-STABLE -dP


(install Email::Send::Gmail)
perl install-module.pl Email::Send::Gmail

(install perl modules required for version 4.0)
perl install-module.pl CGI
perl install-module.pl Email::MIME
perl install-module.pl List::MoreUtils


./checksetup.pl
./checksetup.pl



(enabling Gmail option: http://rndm-snippets.blogspot.hu/2011/05/bugzilla-issue-tracking-send-mail.html)
nano Bugzilla/Mailer.pm

add usings:
use Email::Send::Gmail; 
use Email::Simple::Creator;  


change line:   
 if ($method eq "SMTP"){
to
 if ($method eq "SMTP" || $method eq "Gmail") { 

CTR+O
CTR+Q

Finally run checksetup last.
./checksetup.pl

-------------------
web browser (http://Bugzilla/ - admin)
(change email method in bugzilla administration to gmail.)

mailfrom:
username@gmail.com or username@your_domain.com (if you use your own domain via Google Applications)

smtpserver:
smtp.gmail.com

smtp_username:
username@gmail.com or username@your_domain.com (if you use your own domain via Google Applications)

smtp_password:
your Gmail password


Enjoy your updated Bugzilla version 4.0.10