Annotation of wikisrc/users/ryoon/how_to_update_www_firefox.mdwn, revision 1.3

1.3     ! ryoon       1: [[!meta title="How to update pkgsrc/www/firefox"]]
1.1       ryoon       2: 
1.3     ! ryoon       3: This article shows how to update pkgsrc/www/firefox package to latest release.
        !             4: You can use Mozilla's Mercurial (hg) repositories to track upstream changes.
1.1       ryoon       5: 
1.3     ! ryoon       6: You should have pkgsrc/meta-pkgs/pkg_developer package.
1.1       ryoon       7: 
1.3     ! ryoon       8: # Clone hg tree
        !             9: See <https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial>.
1.1       ryoon      10: 
1.3     ! ryoon      11: You should follow "Using Bookmarks to Manage Multiple Repositories from a Single Clone" section.
1.1       ryoon      12: 
                     13: 
1.3     ! ryoon      14: # Update trees to latest
        !            15: 
        !            16:        $ hg pull central
        !            17:        $ hg pull inbound
        !            18:        $ hg pull aurora
        !            19:        $ hg pull beta
        !            20:        $ hg pull release
        !            21: 
        !            22:        $ hg update
        !            23: 
        !            24: 
        !            25: # Checkout last release source, and create your branch
        !            26: 
        !            27: Find latest release.
        !            28: 
        !            29:        $ hg branches | grep 2901
        !            30:        GECKO2901_2014050617_RELBRANCH 207485:3fd2b5510ccf
        !            31:        (snip)
        !            32: 
        !            33: Checkout the branch.
        !            34: 
        !            35:        $ hg checkout GECKO2901_2014050617_RELBRANCH
        !            36: 
        !            37: Create named branch for applying pkgsrc patches
        !            38: 
        !            39:        $ hg branch pkgsrc_firefox-29.0.1
        !            40:        $ hg commit -m "Create pkgsrc_firefox-29.0.1 branch for applying pkgsrc patches"
        !            41: 
        !            42: Add .*\.orig$ to .hgignore, and commit this change
        !            43: 
        !            44:        $ hg commit -m "Ignore .orig files" .hgignore
        !            45: 
        !            46: 
        !            47: # Apply pkgsrc patches
        !            48: 
        !            49:        $ pushd /usr/pkgsrc/www/firefox
        !            50:        $ mkpatches -c
        !            51:        $ popd
        !            52:        $ cat /usr/pkgsrc/www/firefox/patches/patch-*|patch -p0
        !            53:        $ hg add ...(necessary files)
        !            54:        $ hg commit -m "Apply pkgsrc patches for firefox-29.0.1nb2"
        !            55: 
        !            56: 
        !            57: # Checkout latest beta source, and create your branch
        !            58: 
        !            59: Find latest branch.
        !            60: 
        !            61:        $ hg branches | grep 300b9
        !            62:        GECKO300b9_2014052918_RELBRANCH 199964:b7037f050049
        !            63: 
        !            64: Checkout the branch.
        !            65: 
        !            66:        $ hg checkout GECKO300b9_2014052918_RELBRANCH
        !            67: 
        !            68: Create named branch for working.
        !            69: 
        !            70:        $ hg branch ryoon_firefox-30.b9
        !            71: 
        !            72: Create named branch for applying pkgsrc patches
        !            73: 
        !            74:        $ hg branch ryoon_firefox-30.0
        !            75:        $ hg commit -m "Create ryoon_firefox-30.0 branch for applying freebsd-gecko patches"
        !            76: 
        !            77: Add .*\.orig$ to .hgignore, and commit this change
        !            78: 
        !            79:        $ hg commit -m "Ignore .orig files" .hgignore
        !            80: 
        !            81: Apply patches from freebsd-gecko
        !            82: 
        !            83:        $ cat ~/repos/freebsd-gecko/trunk/www/firefox/files/patch-*|patch -p0
        !            84: 
        !            85: Fix rejected patches manually
        !            86: 
        !            87:        $ hg status | grep rej$
        !            88:        $ vi path/to/a/certain/file.c
        !            89: 
        !            90: Commit the patches
        !            91: 
        !            92:        $ hg add (necessary files)
        !            93:        $ hg commit -m "Apply freebsd-gecko patches for firefox-30.0"
        !            94: 
        !            95: 
        !            96: # Merge your patches
        !            97: 
        !            98:        $ hg merge pkgsrc_firefox-29.0.1
        !            99:        $ hg resolve -l
        !           100:        $ vi file/marked/as/U
        !           101:        $ hg resolve --mark file/marked/as/U
        !           102:        (loop)
        !           103:        $ hg commit -m "Merge pkgsrc_firefox-29.0.1 brnach to 30.0"
        !           104: 
        !           105: 
        !           106: # Create patch file for patch -p0
        !           107: 
        !           108:        $ hg diff -r (revision of first commit in ryoon_freebsd-30.0) | \
        !           109:        sed -e 's!^--- a/!--- !' -e 's!^+++ b/!+++ !' > ~/firefox-30.0.diff
        !           110:        vi ~/firefox-30.0.diff
        !           111:        (Remove patch to .hgignore)
        !           112:        (Remove patch to .hgtags)
        !           113: 
        !           114: # Create patches/patch-* for pkgsrc/www/firefox
        !           115: 
        !           116:        $ cd /usr/pkgsrc/www/firefox
        !           117:        $ vi Makefile
        !           118:        (Update version)
        !           119:        (Remove PKGREVISION)
        !           120:        (Fix WRKSRC)
        !           121:        $ make mdi
        !           122:        $ make extract
        !           123:        $ pushd ${WRKOBJDIR}/www/firefox/work/mozilla-beta
        !           124:        $ patch -p0 < ~/firefox-30.0.diff
        !           125:        $ popd
        !           126:        $ mkpatches
        !           127:        $ patchdiff
        !           128:        $ make mps
        !           129: 
        !           130: # Test your patches
        !           131: 
        !           132:        $ make clean && make package

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb