Managing Bugzilla
How to Get the Bugzilla RPM Packages
We use the 4.4 series of Bugzilla.
Bugzilla security releases come out every few months. Each fixes a number of security holes and it's usually recommended that a site upgrade to the newest release as soon as possible.
Our Bugzilla 4.4 is installed by RPMs. This is how:
- From koji.fedoraproject.org download an SRPM for your Bugzilla version. These only ever seem to be available for recent versions of Fedora.
- Install your SRPM.
- For SL6 only, edit the
bugzilla.spec
file to change all "requires filters" and "provides filters" from RPM 4.9 format to the older RPM 4.8 format. Both of these formats are described on this Fedora wiki page.
For Bugzilla 4.2.3 and 4.2.4 this meant removing these lines:
# Remove private modules from the requires stream
%global __requires_exclude %__requires_exclude|^perl\\(sanitycheck.cgi\\)$
# Remove all optional modules from the requires stream
# mod_perl modules
%global __requires_exclude %__requires_exclude|^perl\\(Apache2::
%global __requires_exclude %__requires_exclude|^perl\\(ModPerl::
# authentification modules
%global __requires_exclude %__requires_exclude|^perl\\(Authen::Radius\\)$
%global __requires_exclude %__requires_exclude|^perl\\(Net::LDAP\\)$
# database modules
%global __requires_exclude %__requires_exclude|^perl\\(DBD::Oracle\\)$
%global __requires_exclude %__requires_exclude|^perl\\(DBD::Pg\\)$
%global __requires_exclude %__requires_exclude|^perl\\(DBI::db\\)$
%global __requires_exclude %__requires_exclude|^perl\\(DBI::st\\)$
# inbound email modules
%global __requires_exclude %__requires_exclude|^perl\\(Email::MIME::Attachment::Stripper\\)$
%global __requires_exclude %__requires_exclude|^perl\\(Email::Reply\\)$
# bug moving modules
%global __requires_exclude %__requires_exclude|^perl\\(MIME::Parser\\)$
%global __requires_exclude %__requires_exclude|^perl\\(XML::Twig\\)$
# xml-rpc and json-rpc modules
%global __requires_exclude %__requires_exclude|^perl\\(XMLRPC::
%global __requires_exclude %__requires_exclude|^perl\\(HTTP::Message\\)$
%global __requires_exclude %__requires_exclude|^perl\\(Test::Taint\\)$
# extension modules
%global __requires_exclude %__requires_exclude|^perl\\(Image::Magick\\)$
# and remove the extensions from the provides stream
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::BmpConvert\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::Example\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::Example::Auth::Login\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::Example::Auth::Verify\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::Example::Config\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::Example::WebService\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::OldBugMove\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::OldBugMove::Params\\)$
%global __provides_exclude %__provides_exclude|^perl\\(Bugzilla::Extension::Voting\\)$
and replacing them with these:
%{?filter_setup:
%filter_from_requires /Bugzilla::Extension::Example::Util/d
%filter_from_requires /sanitycheck.cgi/d
%filter_from_requires /Apache2::/d
%filter_from_requires /ModPerl::/d
%filter_from_requires /Authen::Radius/d
%filter_from_requires /Net::LDAP/d
%filter_from_requires /DBD::Oracle/d
%filter_from_requires /DBD::Pg/d
%filter_from_requires /DBD::db/d
%filter_from_requires /DBD::st/d
%filter_from_requires /Email::MIME::Attachment::Stripper/d
%filter_from_requires /Email::Reply/d
%filter_from_requires /MIME::Parser/d
%filter_from_requires /XML::Twig/d
%filter_from_requires /XMLRPC::/d
%filter_from_requires /HTTP::Message/d
%filter_from_requires /Test::Taint/d
%filter_from_requires /Image::Magick/d
%filter_from_provides /Bugzilla::Extension::BmpConvert/d
%filter_from_provides /Bugzilla::Extension::Example/d
%filter_from_provides /Bugzilla::Extension::Example::Util/d
%filter_from_provides /Bugzilla::Extension::Example::Auth::Login/d
%filter_from_provides /Bugzilla::Extension::Example::Auth::Verify/d
%filter_from_provides /Bugzilla::Extension::Example::Config/d
%filter_from_provides /Bugzilla::Extension::Example::WebService/d
%filter_from_provides /Bugzilla::Extension::OldBugMove/d
%filter_from_provides /Bugzilla::Extension::OldBugMove::Params/d
%filter_from_provides /Bugzilla::Extension::Voting/d
%filter_setup
}
- Having done this your RPM should build cleanly. Build it then use the resulting SRPM to make SL6 RPMs:
pkgforge submit -B world --platforms sl6 /your/new/bugzilla.src.rpm
Installing a new minor release
If you're upgrading to a new minor version of the same release series,
e.g. 4.2.4 to 4.2.5, try just running
diff
on the original spec
files for the two versions. You may find that they're so similar that
you can get away with altering your old .inf spec file to make the new
one, and building it with the new tarball. Then
pkgforge
it as
above.
Then to install the 4.2.4 to 4.2.5 upgrade I did this:
- Alter
profile.packages
to install the new RPMs for bugzilla
, bugzilla-doc
and bugzilla-contrib
.
- Tweak Nagios
-
% om apacheconf stop
-
% om updaterpms run -- -t
-
% om updaterpms run
-
# /usr/share/bugzilla/checksetup.pl
-
% om apacheconf start
The same procedure also worked to upgrade from 4.2.5 to 4.2.7, and from 4.2.7 to 4.2.9.
Upgrading from Bugzilla 3 to 4
The Bugzilla package requirements are all defined in
lcfg/options/bugzilla.h
.
If you want Bugzilla version 4 then you need to
#define BUGZILLA_VERSION 4
before including
lcfg/options/bugzilla.h
(or a file which includes it such as
dice/options/bugzilla-server.h
). This will get you the
packages for the latest stable Bugzilla 4.2 release. If you don't do this you'll get the old Bugzilla 3 packages.
Upgrading from Bugzilla 3 was easier than expected. This is roughly what to do.
- get an up-to-date SQL dump of the old Bugzilla's database.
- On your freshly upgraded machine which already has the bugzilla config on it - this gets you mysql and a configured bugzilla installation -
% cat -> /tmp/whatever
DROP DATABASE bugs;
CREATE DATABASE bugs DEFAULT CHARACTER SET utf8;
^D
%
% cat /tmp/whatever | om mysql runcommand
% cat mydump.sql | om mysql runcommand
% nsu
# mysql_upgrade -p
This converts the dump to a more modern mysql format. The command may tell you that the data doesn't need to be upgraded. I reckon it's wrong. Repeat the command but this time add the
--force
option. (I think it's being misled by the utf8 character set.)
# /usr/share/bugzilla/checksetup.pl
This is the central configuration tool of Bugzilla - it sets up the database correctly, checks your perl modules, your Bugzilla configuration, etc. In this case it'll go through your data converting it to the latest database schema. NB The bugzilla component will already have run
checksetup.pl
for you, but you can run it as many times as you like.
--
ChrisCooke - 15 Nov 2012