Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 9e41a94a3e659caa5b91706d5c415d34 > files > 980

bugzilla-4.4.11-1.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>2.7.&#160;Upgrading to New Releases</title><link rel="stylesheet" type="text/css" href="../../style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><meta name="keywords" content="Bugzilla, Guide, installation, FAQ, administration, integration, MySQL, Mozilla, webtools"><link rel="home" href="index.html" title="The Bugzilla Guide - 4.4.11 Release"><link rel="up" href="installing-bugzilla.html" title="Chapter&#160;2.&#160;Installing Bugzilla"><link rel="prev" href="nonroot.html" title="2.6.&#160;UNIX (non-root) Installation Notes"><link rel="next" href="administration.html" title="Chapter&#160;3.&#160;Administering Bugzilla"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.7.&#160;Upgrading to New Releases</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="nonroot.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;2.&#160;Installing Bugzilla</th><td width="20%" align="right">&#160;<a accesskey="n" href="administration.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="upgrade"></a>2.7.&#160;Upgrading to New Releases</h2></div></div></div><p>Upgrading to new Bugzilla releases is very simple. There is
      a script named <code class="filename">checksetup.pl</code> included with
      Bugzilla that will automatically do all of the database migration
      for you.</p><p>The following sections explain how to upgrade from one
      version of Bugzilla to another. Whether you are upgrading
      from one bug-fix version to another (such as 4.2 to 4.2.1)
      or from one major version to another (such as from 4.0 to 4.2),
      the instructions are always the same.</p><div class="note" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
        Any examples in the following sections are written as though the
        user were updating to version 4.2.1, but the procedures are the
        same no matter what version you're updating to. Also, in the
        examples, the user's Bugzilla installation is found at
        <code class="filename">/var/www/html/bugzilla</code>. If that is not the
        same as the location of your Bugzilla installation, simply
        substitute the proper paths where appropriate.
      </p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="upgrade-before"></a>2.7.1.&#160;Before You Upgrade</h3></div></div></div><p>Before you start your upgrade, there are a few important
        steps to take:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
            Read the <a class="ulink" href="http://www.bugzilla.org/releases/" target="_top">Release
            Notes</a> of the version you're upgrading to,
            particularly the "Notes for Upgraders" section.
          </p></li><li class="listitem"><p>
            View the Sanity Check (<a class="xref" href="sanitycheck.html" title="3.16.&#160;Checking and Maintaining Database Integrity">Section&#160;3.16, &#8220;Checking and Maintaining Database Integrity&#8221;</a>) page
            on your installation before upgrading. Attempt to fix all warnings
            that the page produces before you go any further, or you may
            experience problems  during your upgrade.
          </p></li><li class="listitem"><p>
            Shut down your Bugzilla installation by putting some HTML or
            text in the shutdownhtml parameter
            (see <a class="xref" href="parameters.html" title="3.1.&#160;Bugzilla Configuration">Section&#160;3.1, &#8220;Bugzilla Configuration&#8221;</a>).
          </p></li><li class="listitem"><p>
            Make a backup of the Bugzilla database.
            <span class="emphasis"><em>THIS IS VERY IMPORTANT</em></span>. If
            anything goes wrong during the upgrade, your installation
            can be corrupted beyond recovery. Having a backup keeps you safe.
          </p><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
              Upgrading is a one-way process. You cannot "downgrade" an
              upgraded Bugzilla. If you wish to revert to the old Bugzilla
              version for any reason, you will have to restore your database
              from this backup.
            </p></td></tr></table></div><p>Here are some sample commands you could use to backup
            your database, depending on what database system you're
            using. You may have to modify these commands for your
            particular setup.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">MySQL:</span></dt><dd><p>
                  <span class="command"><strong>mysqldump --opt -u bugs -p bugs &gt; bugs.sql</strong></span>
                </p></dd><dt><span class="term">PostgreSQL:</span></dt><dd><p>
                  <span class="command"><strong>pg_dump --no-privileges --no-owner -h localhost -U bugs
                    &gt; bugs.sql</strong></span>
                </p></dd></dl></div></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="upgrade-files"></a>2.7.2.&#160;Getting The New Bugzilla</h3></div></div></div><p>There are three ways to get the new version of Bugzilla.
        We'll list them here briefly and then explain them
        more later.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Bzr (<a class="xref" href="upgrade.html#upgrade-bzr" title="2.7.2.2.&#160;Upgrading using Bzr">Section&#160;2.7.2.2, &#8220;Upgrading using Bzr&#8221;</a>)</span></dt><dd><p>
              If you have <span class="command"><strong>bzr</strong></span> installed on your machine
              and you have Internet access, this is the easiest way to
              upgrade, particularly if you have made modifications
              to the code or templates of Bugzilla.
            </p></dd><dt><span class="term">Download the tarball (<a class="xref" href="upgrade.html#upgrade-tarball" title="2.7.2.3.&#160;Upgrading using the tarball">Section&#160;2.7.2.3, &#8220;Upgrading using the tarball&#8221;</a>)</span></dt><dd><p>
              This is a very simple way to upgrade, and good if you
              haven't made many (or any) modifications to the code or
              templates of your Bugzilla.
            </p></dd><dt><span class="term">Patches (<a class="xref" href="upgrade.html#upgrade-patches" title="2.7.2.4.&#160;Upgrading using patches">Section&#160;2.7.2.4, &#8220;Upgrading using patches&#8221;</a>)</span></dt><dd><p>
              If you have made modifications to your Bugzilla, and
              you don't have Internet access or you don't want to use
              bzr, then this is the best way to upgrade.
            </p><p>
              You can only do minor upgrades (such as 4.2 to 4.2.1 or
              4.2.1 to 4.2.2) with patches.
            </p></dd></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="upgrade-modified"></a>2.7.2.1.&#160;If you have modified your Bugzilla</h4></div></div></div><p>
          If you have modified the code or templates of your Bugzilla,
          then upgrading requires a bit more thought and effort.
          A discussion of the various methods of updating compared with
          degree and methods of local customization can be found in
          <a class="xref" href="cust-templates.html#template-method" title="6.3.2.&#160;Choosing a Customization Method">Section&#160;6.3.2, &#8220;Choosing a Customization Method&#8221;</a>.
        </p><p>
          The larger the jump you are trying to make, the more difficult it
          is going to be to upgrade if you have made local customizations.
          Upgrading from 4.2 to 4.2.1 should be fairly painless even if
          you are heavily customized, but going from 2.18 to 4.2 is going
          to mean a fair bit of work re-writing your local changes to use
          the new files, logic, templates, etc. If you have done no local
          changes at all, however, then upgrading should be approximately
          the same amount of work regardless of how long it has been since
          your version was released.
        </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="upgrade-bzr"></a>2.7.2.2.&#160;Upgrading using Bzr</h4></div></div></div><p>
          This requires that you have bzr installed (most Unix machines do),
          and requires that you are able to access
          <a class="ulink" href="http://bzr.mozilla.org/bugzilla/" target="_top">bzr.mozilla.org</a>,
          which may not be an option if you don't have Internet access.
        </p><p>
          The following shows the sequence of commands needed to update a
          Bugzilla installation via Bzr, and a typical series of results.
          These commands assume that you already have Bugzilla installed
          using Bzr.
        </p><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            If your installation is still using CVS, you must first convert
            it to Bzr. A very detailed step by step documentation can be
            found on <a class="ulink" href="https://wiki.mozilla.org/Bugzilla:Moving_From_CVS_To_Bazaar" target="_top">wiki.mozilla.org</a>.
          </p></td></tr></table></div><pre class="programlisting">
bash$ <span class="command"><strong>cd /var/www/html/bugzilla</strong></span>
bash$ <span class="command"><strong>bzr switch 4.2</strong></span> (only run this command when not yet running 4.2)
bash$ <span class="command"><strong>bzr up -r tag:bugzilla-4.2.1</strong></span>
+N  extensions/MoreBugUrl/
+N  extensions/MoreBugUrl/Config.pm
+N  extensions/MoreBugUrl/Extension.pm
...
 M  Bugzilla/Attachment.pm
 M  Bugzilla/Attachment/PatchReader.pm
 M  Bugzilla/Bug.pm
...
All changes applied successfully.
        </pre><div class="caution" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            If a line in the output from <span class="command"><strong>bzr up</strong></span> mentions
            a conflict, then that represents a file with local changes that
            Bzr was unable to properly merge. You need to resolve these
            conflicts manually before Bugzilla (or at least the portion using
            that file) will be usable.
          </p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="upgrade-tarball"></a>2.7.2.3.&#160;Upgrading using the tarball</h4></div></div></div><p>
          If you are unable (or unwilling) to use Bzr, another option that's
          always available is to obtain the latest tarball from the <a class="ulink" href="http://www.bugzilla.org/download/" target="_top">Download Page</a> and 
          create a new Bugzilla installation from that.
        </p><p>
          This sequence of commands shows how to get the tarball from the
          command-line; it is also possible to download it from the site
          directly in a web browser. If you go that route, save the file
          to the <code class="filename">/var/www/html</code>
          directory (or its equivalent, if you use something else) and 
          omit the first three lines of the example.
        </p><pre class="programlisting">
bash$ <span class="command"><strong>cd /var/www/html</strong></span>
bash$ <span class="command"><strong>wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.2.1.tar.gz</strong></span>
<span class="emphasis"><em>(Output omitted)</em></span>
bash$ <span class="command"><strong>tar xzvf bugzilla-4.2.1.tar.gz</strong></span>
bugzilla-4.2.1/
bugzilla-4.2.1/colchange.cgi
<span class="emphasis"><em>(Output truncated)</em></span>
bash$ <span class="command"><strong>cd bugzilla-4.2.1</strong></span>
bash$ <span class="command"><strong>cp ../bugzilla/localconfig* .</strong></span>
bash$ <span class="command"><strong>cp -r ../bugzilla/data .</strong></span>
bash$ <span class="command"><strong>cd ..</strong></span>
bash$ <span class="command"><strong>mv bugzilla bugzilla.old</strong></span>
bash$ <span class="command"><strong>mv bugzilla-4.2.1 bugzilla</strong></span>
        </pre><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            The <span class="command"><strong>cp</strong></span> commands both end with periods which
            is a very important detail--it means that the destination
            directory is the current working directory.
          </p></td></tr></table></div><div class="caution" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            If you have some extensions installed, you will have to copy them
            to the new bugzilla directory too. Extensions are located in
            <code class="filename">bugzilla/extensions/</code>. Only copy those you
            installed, not those managed by the Bugzilla team.
          </p></td></tr></table></div><p>
          This upgrade method will give you a clean install of Bugzilla.
          That's fine if you don't have any local customizations that you
          want to maintain. If you do have customizations, then you will 
          need to reapply them by hand to the appropriate files.
        </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="upgrade-patches"></a>2.7.2.4.&#160;Upgrading using patches</h4></div></div></div><p>
          A patch is a collection of all the bug fixes that have been made
          since the last bug-fix release.
        </p><p>
          If you are doing a bug-fix upgrade&#8212;that is, one where only the 
          last number of the revision changes, such as from 4.2 to
          4.2.1&#8212;then you have the option of obtaining and applying a
          patch file from the <a class="ulink" href="http://www.bugzilla.org/download/" target="_top">Download Page</a>.
        </p><p>
          As above, this example starts with obtaining the file via the 
          command line. If you have already downloaded it, you can omit the
          first two commands.
        </p><pre class="programlisting">
bash$ <span class="command"><strong>cd /var/www/html/bugzilla</strong></span>
bash$ <span class="command"><strong>wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.2-to-4.2.1.diff.gz</strong></span>
<span class="emphasis"><em>(Output omitted)</em></span>
bash$ <span class="command"><strong>gunzip bugzilla-4.2-to-4.2.1.diff.gz</strong></span>
bash$ <span class="command"><strong>patch -p1 &lt; bugzilla-4.2-to-4.2.1.diff</strong></span>
patching file Bugzilla/Constants.pm
patching file enter_bug.cgi
<span class="emphasis"><em>(etc.)</em></span>
        </pre><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
            Be aware that upgrading from a patch file does not change the
            entries in your <code class="filename">.bzr</code> directory.
            This could make it more difficult to upgrade using Bzr
            (<a class="xref" href="upgrade.html#upgrade-bzr" title="2.7.2.2.&#160;Upgrading using Bzr">Section&#160;2.7.2.2, &#8220;Upgrading using Bzr&#8221;</a>) in the future.
          </p></td></tr></table></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="upgrade-completion"></a>2.7.3.&#160;Completing Your Upgrade</h3></div></div></div><p>
        Now that you have the new Bugzilla code, there are a few final
        steps to complete your upgrade.
      </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
            If your new Bugzilla installation is in a different
            directory or on a different machine than your old Bugzilla
            installation, make sure that you have copied the
            <code class="filename">data</code> directory and the
            <code class="filename">localconfig</code> file from your old Bugzilla
            installation. (If you followed the tarball instructions
            above, this has already happened.)
          </p></li><li class="listitem"><p>
            If this is a major update, check that the configuration
            (<a class="xref" href="configuration.html" title="2.2.&#160;Configuration">Section&#160;2.2, &#8220;Configuration&#8221;</a>) for your new Bugzilla is
            up-to-date. Sometimes the configuration requirements change
            between major versions.
          </p></li><li class="listitem"><p>
            If you didn't do it as part of the above configuration step,
            now you need to run <span class="command"><strong>checksetup.pl</strong></span>, which
            will do everything required to convert your existing database
            and settings for the new version:
          </p><pre class="programlisting">
bash$ <span class="command"><strong>cd /var/www/html/bugzilla</strong></span>
bash$ <span class="command"><strong>./checksetup.pl</strong></span>
          </pre><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
              The period at the beginning of the command
              <span class="command"><strong>./checksetup.pl</strong></span> is important and cannot
              be omitted.
            </p></td></tr></table></div><div class="caution" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Caution"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
              If this is a major upgrade (say, 3.6 to 4.2 or similar),
              running <span class="command"><strong>checksetup.pl</strong></span> on a large
              installation (75,000 or more bugs) can take a long time,
              possibly several hours.
            </p></td></tr></table></div></li><li class="listitem"><p>
            Clear any HTML or text that you put into the shutdownhtml
            parameter, to re-activate Bugzilla.
          </p></li><li class="listitem"><p>
            View the Sanity Check (<a class="xref" href="sanitycheck.html" title="3.16.&#160;Checking and Maintaining Database Integrity">Section&#160;3.16, &#8220;Checking and Maintaining Database Integrity&#8221;</a>) page in your
            upgraded Bugzilla.
          </p><p>
            It is recommended that, if possible, you fix any problems
            you see, immediately. Failure to do this may mean that Bugzilla
            will not work correctly. Be aware that if the sanity check page
            contains more errors after an upgrade, it doesn't necessarily
            mean there are more errors in your database than there were
            before, as additional tests are added to the sanity check over
            time, and it is possible that those errors weren't being
            checked for in the old version.
          </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="upgrade-notifications"></a>2.7.4.&#160;Automatic Notifications of New Releases</h3></div></div></div><p>
        Bugzilla 3.0 introduced the ability to automatically notify
        administrators when new releases are available, based on the
        <code class="literal">upgrade_notification</code> parameter, see
        <a class="xref" href="parameters.html" title="3.1.&#160;Bugzilla Configuration">Section&#160;3.1, &#8220;Bugzilla Configuration&#8221;</a>. Administrators will see these
        notifications when they access the <code class="filename">index.cgi</code>
        page, i.e. generally when logging in. Bugzilla will check once per
        day for new releases, unless the parameter is set to
        <span class="quote">&#8220;<span class="quote">disabled</span>&#8221;</span>. If you are behind a proxy, you may have to set
        the <code class="literal">proxy_url</code> parameter accordingly. If the proxy
        requires authentication, use the
        <code class="literal">http://user:pass@proxy_url/</code> syntax.
      </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="nonroot.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="installing-bugzilla.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="administration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.6.&#160;UNIX (non-root) Installation Notes&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;3.&#160;Administering Bugzilla</td></tr></table></div></body></html>