wiki:UpdatingBugzilla

Version 36 (modified by ddkilzer@apple.com, 7 years ago) (diff)

--

Updating Bugzilla

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

Setup from Scratch

This section describes how to set up a merge environment from scratch. If you already have a git-svn repo for Websites/bugs.webkit.org, you can skip to the Setup from git-svn Repository section.

  • Install git and git-svn. If you have a modern Xcode on macOS, these are already installed. If you're using MacPorts:
        sudo port install git-core +svn
    
  • Import Websites/bugs.webkit.org from the WebKit repository into a local git-svn repository.
        mkdir bugzilla.git
        cd bugzilla.git
        git svn init -T trunk/Websites/bugs.webkit.org http://svn.webkit.org/repository/webkit
        git svn fetch
    
  • Import the upstream Bugzilla git repository.
        git remote add -f upstream https://github.com/bugzilla/bugzilla.git
    
  • Create a local git branch to track the upstream/master branch.
        git branch --track upstream remotes/upstream/master
    
  • 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
    

Setup from git-svn Repository

TBD.

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)
        (cd bzr/bugzilla-4.0 && bzr update)
        (cd bzr/bugzilla-4.2 && 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
        git bzr fetch bugzilla-4.0-branch
        git bzr fetch bugzilla-4.2-branch
    

Merge

  • Merge the new Bugzilla using a tag imported from bzr.
        git merge --squash --no-commit bugzilla-4.2.1
    
  • Clean up any conflicts when the merge is done.
  • Locate any customize templates that no longer exist:
        for F in `find template/en/custom -type f | sed -e 's#/custom/#/default/#'`; do if [ ! -f $F ]; then echo $F; fi; done
    
    Note that these custom templates have no Bugzilla equivalent:
        template/en/custom/attachment/review.html.tmpl
        template/en/custom/attachment/reviewform.html.tmpl
        template/en/custom/attachment/rietveldreview.html.tmpl
    
  • Compare merged tree with bugzilla-4.2 branch to make sure there isn't any left-over cruft. Remove any cruft found.
        diff -urN -x .git -x .bzr bzr/bugzilla-4.2 bugzilla.git
    
  • 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-4.2.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.
  • Commit changes from git repository to subversion.
  • Do the update.
  • Update grafts file for new version just committed.