Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 4e237fd705495e1e21ef20696443e053 > files > 983

bugzilla-5.0.4-3.mga7.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>3.11.4. Migrating from a Tarball &#8212; Bugzilla 5.0.4 documentation</title>
    <link rel="stylesheet" href="../_static/bugzilla.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '5.0.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="3.11.5. Upgrading with a Tarball" href="upgrading-with-a-tarball.html" />
    <link rel="prev" title="3.11.3. Migrating from CVS" href="migrating-from-cvs.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="upgrading-with-a-tarball.html" title="3.11.5. Upgrading with a Tarball"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="migrating-from-cvs.html" title="3.11.3. Migrating from CVS"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">Bugzilla 5.0.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >3. Installation and Maintenance Guide</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="upgrading.html" accesskey="U">3.11. Upgrading</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="migrating-from-a-tarball">
<span id="id1"></span><h1>3.11.4. Migrating from a Tarball<a class="headerlink" href="#migrating-from-a-tarball" title="Permalink to this headline">¶</a></h1>
<p>The procedure to migrate to Git is as follows. The idea is to switch without
changing the version of Bugzilla you are using, to minimise the risk of
conflict or problems. Any upgrade can then happen as a separate step.</p>
<div class="section" id="download-code-from-git">
<h2>3.11.4.1. Download Code from Git<a class="headerlink" href="#download-code-from-git" title="Permalink to this headline">¶</a></h2>
<p>First, you need to find what version of Bugzilla you are using. It should be
in the top right corner of the front page but, if not, open the file
<code class="file docutils literal"><span class="pre">Bugzilla/Constants.pm</span></code> in your Bugzilla directory and search for
<code class="docutils literal"><span class="pre">BUGZILLA_VERSION</span></code>.</p>
<p>Then, you need to download an additional copy of your <em>current</em> version of
Bugzilla from the git repository, and place it in a separate directory
alongside your existing Bugzilla installation (which we will assume is in a
directory called <code class="file docutils literal"><span class="pre">bugzilla</span></code>).</p>
<p>To do this, you will need a copy of the <strong class="command">git</strong> program. All Linux
distributions have it; search your package manager for &quot;git&quot;. On Windows or
Mac OS X, you can
<a class="reference external" href="http://www.git-scm.com/downloads">download the official build</a>.</p>
<p>Once git is installed, run these commands to pull a copy of Bugzilla:</p>
<p><strong class="command">git clone https://github.com/bugzilla/bugzilla bugzilla-new</strong></p>
<p><strong class="command">cd bugzilla-new</strong></p>
<p><strong class="command">git checkout release-$VERSION</strong></p>
<p>Replace $VERSION with the three-digit version number of your current Bugzilla,
e.g. &quot;4.2.2&quot;. (If the the final digit would have been a 0, omit it - so use
&quot;4.4&quot; for the first release in the 4.4 series.)</p>
<p>You will get a message about a 'detached HEAD'. Don't worry; your head is
still firmly attached to your shoulders.</p>
</div>
<div class="section" id="save-any-local-customizations">
<h2>3.11.4.2. Save Any Local Customizations<a class="headerlink" href="#save-any-local-customizations" title="Permalink to this headline">¶</a></h2>
<p>Go into your original Bugzilla directory and run this command:</p>
<p><strong class="command">diff -ru -x data -x lib -x docs -x .git -x CVS -x .cvsignore -x .bzr -x .bzrignore -x .bzrrev ../bugzilla-new . &gt; ../patch.diff</strong></p>
<p>If you have made customizations to your Bugzilla, and you made them by
changing the Bugzilla code itself (rather than using the Extension system),
then <code class="file docutils literal"><span class="pre">patch.diff</span></code> will have significant content. You will want to keep a copy
of those changes by keeping a copy of this file and any files referenced in it
by &quot;Only in&quot; lines. If the file has zero size or only insignificant content,
you haven't made any local customizations of this sort.</p>
</div>
<div class="section" id="shut-down-bugzilla">
<h2>3.11.4.3. Shut Down Bugzilla<a class="headerlink" href="#shut-down-bugzilla" title="Permalink to this headline">¶</a></h2>
<p>At this point, you should shut down Bugzilla to make sure nothing changes
while you make the switch. Go into the administrative interface and put an
appropriate message into the <span class="param">shutdownhtml</span> parameter, which is in the
&quot;General&quot; section of the administration parameters. As the name implies, HTML
is allowed.</p>
<p>This would be a good time to make <a class="reference internal" href="backups.html#backups"><span class="std std-ref">Backups</span></a>. We shouldn't be affecting
the database, but you can't be too careful.</p>
</div>
<div class="section" id="copy-across-data-and-modules">
<h2>3.11.4.4. Copy Across Data and Modules<a class="headerlink" href="#copy-across-data-and-modules" title="Permalink to this headline">¶</a></h2>
<p>Copy the contents of the following directories from your current installation
of Bugzilla into the corresponding directory in <code class="file docutils literal"><span class="pre">bugzilla-new/</span></code>:</p>
<div class="highlight-none"><div class="highlight"><pre><span></span>lib/
data/
template/en/custom (may or may not exist)
</pre></div>
</div>
<p>You also need to copy any extensions you have written or installed, which are
in the <code class="file docutils literal"><span class="pre">extensions/</span></code> directory. Copy across any subdirectories which do not exist
in your new install.</p>
<p>Lastly, copy the following file from your current installation of Bugzilla
into the corresponding place in <code class="file docutils literal"><span class="pre">bugzilla-new/</span></code>:</p>
<div class="highlight-none"><div class="highlight"><pre><span></span>localconfig
</pre></div>
</div>
<p>This file contains your database password and access details. Because your
two versions of Bugzilla are the same, this should all work fine.</p>
</div>
<div class="section" id="reapply-local-customizations">
<h2>3.11.4.5. Reapply Local Customizations<a class="headerlink" href="#reapply-local-customizations" title="Permalink to this headline">¶</a></h2>
<p>If your <code class="file docutils literal"><span class="pre">patch.diff</span></code> file was zero sized, you can
jump to the next step. Otherwise, you have to apply the patch to your new
installation. If you are on Windows and you don’t have the <strong class="command">patch</strong>
program, you can download it from
<a class="reference external" href="http://gnuwin32.sourceforge.net/packages/patch.htm">GNUWin</a>. Once
downloaded, you must copy patch.exe into the Windows directory.</p>
<p>Copy <code class="file docutils literal"><span class="pre">patch.diff</span></code> into the <code class="file docutils literal"><span class="pre">bugzilla-new</span></code> directory and then do:</p>
<p><strong class="command">patch -p0 --dry-run &lt; patch.diff</strong></p>
<p>The patch should apply cleanly because you have exactly the same version of
Bugzilla in both directories. If it does, remove the <strong class="command">--dry-run</strong> and
rerun the command to apply it for real. If it does not apply cleanly, it is
likely that you have managed to get a Bugzilla version mismatch between the
two directories.</p>
</div>
<div class="section" id="swap-the-new-version-in">
<h2>3.11.4.6. Swap The New Version In<a class="headerlink" href="#swap-the-new-version-in" title="Permalink to this headline">¶</a></h2>
<p>Now we swap the directories over, and run checksetup.pl to confirm that all
is well. From the directory containing the <code class="file docutils literal"><span class="pre">bugzilla</span></code> and
<code class="file docutils literal"><span class="pre">bugzilla-new</span></code> directories, run:</p>
<p><strong class="command">mv bugzilla bugzilla-old</strong></p>
<p><strong class="command">mv bugzilla-new bugzilla</strong></p>
<p><strong class="command">cd bugzilla</strong></p>
<p><strong class="command">./checksetup.pl</strong></p>
<p>Running <code class="file docutils literal"><span class="pre">checksetup.pl</span></code> should not result in any changes to your database at
the end of the run. If it does, then it's most likely that the two versions
of Bugzilla you have are not, in fact, the same.</p>
</div>
<div class="section" id="re-enable-bugzilla">
<h2>3.11.4.7. Re-enable Bugzilla<a class="headerlink" href="#re-enable-bugzilla" title="Permalink to this headline">¶</a></h2>
<p>Go into the administrative interface and clear the contents of the
<span class="param">shutdownhtml</span> parameter.</p>
</div>
<div class="section" id="test-bugzilla">
<h2>3.11.4.8. Test Bugzilla<a class="headerlink" href="#test-bugzilla" title="Permalink to this headline">¶</a></h2>
<p>Use your Bugzilla for several days to check that the switch has had no
detrimental effects. Then, if necessary, follow the instructions in
<a class="reference internal" href="upgrading-with-git.html#upgrading-with-git"><span class="std std-ref">Upgrading with Git</span></a> to upgrade to the latest version of Bugzilla.</p>
</div>
<div class="section" id="rolling-back">
<h2>3.11.4.9. Rolling Back<a class="headerlink" href="#rolling-back" title="Permalink to this headline">¶</a></h2>
<p>If something goes wrong at any stage of the switching process (e.g. your
patch doesn't apply, or checksetup doesn't complete), you can always just
switch the directories back (if you've got that far) and re-enable Bugzilla
(if you disabled it) and then seek help. Even if you have re-enabled Bugzilla,
and find a problem a little while down the road, you are still using the same
version so there would be few side effects to switching the directories back
a day or three later.</p>
<hr class="docutils" />
<p>This documentation undoubtedly has bugs; if you find some, please file
them <a class="reference external" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&amp;component=Documentation">here</a>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../index.html">
              <img class="logo" src="../_static/bugzilla.png" alt="Logo"/>
            </a></p>
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">3.11.4. Migrating from a Tarball</a><ul>
<li><a class="reference internal" href="#download-code-from-git">3.11.4.1. Download Code from Git</a></li>
<li><a class="reference internal" href="#save-any-local-customizations">3.11.4.2. Save Any Local Customizations</a></li>
<li><a class="reference internal" href="#shut-down-bugzilla">3.11.4.3. Shut Down Bugzilla</a></li>
<li><a class="reference internal" href="#copy-across-data-and-modules">3.11.4.4. Copy Across Data and Modules</a></li>
<li><a class="reference internal" href="#reapply-local-customizations">3.11.4.5. Reapply Local Customizations</a></li>
<li><a class="reference internal" href="#swap-the-new-version-in">3.11.4.6. Swap The New Version In</a></li>
<li><a class="reference internal" href="#re-enable-bugzilla">3.11.4.7. Re-enable Bugzilla</a></li>
<li><a class="reference internal" href="#test-bugzilla">3.11.4.8. Test Bugzilla</a></li>
<li><a class="reference internal" href="#rolling-back">3.11.4.9. Rolling Back</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="migrating-from-cvs.html"
                        title="previous chapter">3.11.3. Migrating from CVS</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="upgrading-with-a-tarball.html"
                        title="next chapter">3.11.5. Upgrading with a Tarball</a></p>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="upgrading-with-a-tarball.html" title="3.11.5. Upgrading with a Tarball"
             >next</a></li>
        <li class="right" >
          <a href="migrating-from-cvs.html" title="3.11.3. Migrating from CVS"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">Bugzilla 5.0.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >3. Installation and Maintenance Guide</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="upgrading.html" >3.11. Upgrading</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
    </div>
  </body>
</html>