wiki:UpdatingBugzilla

Version 43 (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.
    # master v4.2.11 merge has parents of    master r174778                       and upstream tag release-4.2.11
    4b64f382a2fc1fb4afbed5c9edc94ef2eb5c91eb 255573a4808ab531c9e8711e44e00b7b652075f3 3e1e67bed36bbe454c654f1e0a16ce73e724a5e0
    # master v4.2.7 merge has parents of     master r174764                       and upstream tag release-4.2.7
    985ca379414dd5b51eea47ea42d235e7546db7d8 09f74fe94c6d96846757181c358a0d42e2e73f51 7355bd53bc4b20e248550e5467142a79e9512fbc
    # master v4.2.1 merge has parents of     master r173253                       and upstream tag release-4.2.1
    09f74fe94c6d96846757181c358a0d42e2e73f51 873ce20171c99c92b9c83d0ebce1d2fc0eedbd5c 07c6bfa4cea83c8284b04add26729f552c93bafc
    # master v3.2.3 merge has parents of     master r45519                        and upstream tag release-3.2.3
    4b974c2db64b5e85e72498b0c43100e2ea380a48 355650f88422025d80d5b5ca7f908d653936556e 780da003de2a006fefa6310f073e3c6be0281a6d
    # master v3.0.3 merge has parents of     master r44547                        and upstream tag release-3.0.3
    355650f88422025d80d5b5ca7f908d653936556e e9b8dc46dc0a804f199a0b1c2dfa4d2112608c8a c21a45673aade4ddc65b28b8b5b8a5f76870c796
    
  • Push repository to central git server.

For now this is internal to Apple, but we may expose it later on git.webkit.org.

Setup from git-svn Repository

TBD. The idea here is to pull the repo from a central git server, then add remotes for the git-svn and the upstream repositories.

Update

  • Update git-svn of Websitesbugs.webkit.org` in svn.
        cd bugzilla.git
        git checkout master
        git svn rebase)
    
  • Pull updates from the upstream repository.
        cd bugzilla.git
        git fetch upstream/master
        git fetch --tags upstream
    

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.