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

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: 
1.8       ryoon      29:        $ hg tags|grep 46_
                     30:        (snip)
                     31:        FIREFOX_46_0_1_RELEASE          341775:0b8492c110be
1.3       ryoon      32:        (snip)
                     33: 
                     34: Checkout the branch.
                     35: 
1.8       ryoon      36:        $ hg checkout FIREFOX_46_0_1_RELEASE
1.3       ryoon      37: 
                     38: Create named branch for applying pkgsrc patches
                     39: 
1.8       ryoon      40:        $ hg branch pkgsrc_firefox-46.0.1
                     41:        $ hg commit -m "Create pkgsrc_firefox-46.0.1 branch for applying pkgsrc patches"
1.3       ryoon      42: 
                     43: Add .*\.orig$ to .hgignore, and commit this change
                     44: 
                     45:        $ hg commit -m "Ignore .orig files" .hgignore
                     46: 
                     47: 
                     48: # Apply pkgsrc patches
                     49: 
                     50:        $ pushd /usr/pkgsrc/www/firefox
                     51:        $ mkpatches -c
                     52:        $ popd
                     53:        $ cat /usr/pkgsrc/www/firefox/patches/patch-*|patch -p0
                     54:        $ hg add ...(necessary files)
1.8       ryoon      55:        $ hg commit -m "Apply pkgsrc patches for firefox-46.0.1nb1"
1.3       ryoon      56: 
                     57: 
                     58: # Checkout latest beta source, and create your branch
                     59: 
                     60: Find latest branch.
                     61: 
1.8       ryoon      62:        $ hg tags | grep 47_
                     63:        (snip)
                     64:        FIREFOX_47_0b9_RELEASE          341367:2ee4473c729a
                     65:        (snip)
1.3       ryoon      66: 
                     67: Checkout the branch.
                     68: 
1.8       ryoon      69:        $ hg checkout FIREFOX_47_0b9_RELEASE
1.3       ryoon      70: 
                     71: Create named branch for working.
                     72: 
1.8       ryoon      73:        $ hg branch ryoon_firefox-47.0b9
                     74:        $ hg commit -m "Create ryoon_firefox-47.0 branch for merging pkgsrc patches"
1.3       ryoon      75: 
                     76: Add .*\.orig$ to .hgignore, and commit this change
                     77: 
                     78:        $ hg commit -m "Ignore .orig files" .hgignore
                     79: 
                     80: # Merge your patches
                     81: 
1.8       ryoon      82:        $ hg merge pkgsrc_firefox-46.0.1
1.3       ryoon      83:        $ hg resolve -l
                     84:        $ vi file/marked/as/U
                     85:        $ hg resolve --mark file/marked/as/U
                     86:        (loop)
1.8       ryoon      87:        $ hg commit -m "Merge pkgsrc_firefox-46.0.1 branch to 47.0"
1.3       ryoon      88: 
                     89: 
                     90: # Create patch file for patch -p0
                     91: 
1.8       ryoon      92:        $ hg diff -r (revision of first commit in ryoon_firefox-47.0b9) | \
                     93:        sed -e 's!^--- a/!--- !' -e 's!^+++ b/!+++ !' > ~/firefox-47.0.diff
                     94:        $ vi ~/firefox-47.0.diff
1.3       ryoon      95:        (Remove patch to .hgignore)
                     96:        (Remove patch to .hgtags)
                     97: 
                     98: # Create patches/patch-* for pkgsrc/www/firefox
                     99: 
                    100:        $ cd /usr/pkgsrc/www/firefox
                    101:        $ vi Makefile
                    102:        (Update version)
                    103:        (Remove PKGREVISION)
                    104:        $ make mdi
                    105:        $ make extract
                    106:        $ pushd ${WRKOBJDIR}/www/firefox/work/mozilla-beta
1.8       ryoon     107:        $ patch -p0 < ~/firefox-47.0.diff
1.3       ryoon     108:        $ popd
                    109:        $ mkpatches
                    110:        $ patchdiff
                    111:        $ make mps
                    112: 
                    113: # Test your patches
                    114: 
                    115:        $ make clean && make package

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