wiki:UpdatingBugzilla

Version 24 (modified by ddkilzer@webkit.org, 13 years ago) (diff)

--

Updating Bugzilla

This page describes a process to update the Bugzilla instance running on bugs.webkit.org.

Setup

  • Install bzr, bzr-fastimport and bzr-svn. If you're using MacPorts:
        sudo port install bzr-fastimport
        sudo port install bzr-svn
    
  • Install git and git-svn. If you're using MacPorts:
        sudo port install git-core +svn
    
  • Install git-bzr.

Unfortunately, there is currently a proliferation of git-bzr commands, each of which behave in a slightly different manner. Until there is a single, blessed git-bzr command, I'll assume that you're using commit 61d60075fb548f1d49d54b1a98b8b568e68ecc44 from the kfish branch of git-bzr.

If you're using MacPorts:

(1) Download Portfile (not Portfile.2) from MacPorts ticket #24763.

(2) In a terminal window run the following commands. Note that you may want to use a different directory other than /opt/mports/trunk/dports, but you'll have to add it to /opt/local/etc/macports/sources.conf. The /opt/mports directory comes from instructions on installing MacPorts from subversion:

    sudo -s
    mkdir /opt/mports/trunk/dports/devel/git-bzr
    cd /opt/mports/trunk/dports/devel/git-bzr
    mv ~/Downloads/Portfile .
    chown root:admin Portfile
    chmod 644 Portfile
    cd /opt/mports/trunk/dports
    portindex
    port install git-bzr
    exit
  • Check out Bugzilla sources from bzr. At minimum check out trunk, the branch that contains the current version used by bugs.webkit.org and the branch that you want to merge to.
        mkdir bzr
        cd bzr
        bzr co bzr://bzr.mozilla.org/bugzilla/trunk bugzilla-trunk
        bzr co bzr://bzr.mozilla.org/bugzilla/3.6 bugzilla-3.6
        bzr co bzr://bzr.mozilla.org/bugzilla/3.4 bugzilla-3.4
        bzr co bzr://bzr.mozilla.org/bugzilla/3.2 bugzilla-3.2
        cd ..
    
  • Import BugsSite from the WebKit repository into a local git repository.
        mkdir BugsSite.git
        cd BugsSite.git
        git svn init -T trunk/BugsSite http://svn.webkit.org/repository/webkit
        git svn fetch
        cd ..
    
  • Create a local git repository to do the merge.
        mkdir bugzilla.git
        cd bugzilla.git
        git init
    
  • Import the BugsSite.git repository:
        git remote add -f BugsSite ../BugsSite.git
    
  • Import the Bugzilla branches from bzr:
        git bzr add bugzilla-trunk ../bzr/bugzilla-trunk
        git bzr add bugzilla-3.2-branch ../bzr/bugzilla-3.2
        git bzr add bugzilla-3.4-branch ../bzr/bugzilla-3.4
        git bzr add bugzilla-3.6-branch ../bzr/bugzilla-3.6
    
    NOTE: If you get an error about too many authors while importing, see Bug 496677 and MacPorts ticket #26954.
  • Create a .git/info/grafts file to provide artificial merge points between the two remote repositories.
    # BugsSite 3.2.3 merge has parents of    BugsSite r45519                      and bzr tag Bugzilla-3.2.3
    4b974c2db64b5e85e72498b0c43100e2ea380a48 355650f88422025d80d5b5ca7f908d653936556e 780da003de2a006fefa6310f073e3c6be0281a6d
    
  • Create a local git branch to track the BugsSite master branch.
        git branch --track master remotes/BugsSite/master
    

Update

  • Update bzr branches (if needed).
        (cd bzr/bugzilla-trunk && bzr update)
        (cd bzr/bugzilla-3.2 && bzr update)
        (cd bzr/bugzilla-3.4 && bzr update)
        (cd bzr/bugzilla-3.6 && bzr update)
    
  • Update git mirror of BugsSite in svn.
        (cd BugsSite.git && git svn rebase)
    
  • Update the merge repository.
        cd bugzilla.git
        git fetch BugsSite
        git bzr fetch bugzilla-trunk
        git bzr fetch bugzilla-3.2-branch
        git bzr fetch bugzilla-3.4-branch
        git bzr fetch bugzilla-3.6-branch
    

Merge

  • Merge the new Bugzilla using a tag imported from bzr.
        git merge --squash --no-commit bugzilla-3.6.1
    
  • Clean up any conflicts when the merge is done.
  • Create a patch of changes to custom template files. These custom template files will need to be updated and the patch merged after the Bugzilla merge.
        for F in `find template/en/custom -type f | egrep -v '/(review|reviewform|rietveldreview).html.tmpl'`; do git diff HEAD:`echo $F | sed -e 's#/custom/#/default/#'` HEAD:$F; done > template-changes.diff
    
    Then copy the updated default template files over the custom template files, then reapply the patch.
        # TBD
    
    Alternatively, apply the changes from the default template files to the custom template files, then fix any merge conflicts:
        for F in `find template/en/custom -type f | egrep -v '/(review|reviewform|rietveldreview).html.tmpl'`; do G=`echo $F | sed -e 's#/custom/#/default/#'`; echo $F && git diff HEAD..bugzilla-3.6.1 $G | patch -p1 $F; done
    
  • Apply changes made to standard CSS skin to custom CSS skin.
        # TBD
    
  • Test the merged Bugzilla locally.
        ./checksetup.pl
        # TBD
    
  • Schedule downtime for the update.
  • Do the update.