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

1.3       ryoon       1: [[!meta title="How to update pkgsrc/www/firefox"]]
1.1       ryoon       2: 
1.10      ryoon       3: This article shows you how to update pkgsrc/www/firefox package to latest
                      4: release.
1.3       ryoon       5: You can use Mozilla's Mercurial (hg) repositories to track upstream changes.
1.1       ryoon       6: 
1.10      ryoon       7: You should have pkgsrc/meta-pkgs/pkg_developer package
                      8: and pkgsrc/devel/py-mercurial package.
1.1       ryoon       9: 
1.3       ryoon      10: # Clone hg tree
1.10      ryoon      11: See <http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmozilla/unifiedrepo.html>
1.1       ryoon      12: 
1.10      ryoon      13: You should follow "Working with the Unified Repo" section.
                     14: In short, run:
1.11    ! ryoon      15: 
1.10      ryoon      16:        $ hg clone https://hg.mozilla.org/mozilla-unified
1.1       ryoon      17: 
1.3       ryoon      18: # Update trees to latest
                     19: 
                     20:        $ hg update
                     21: 
                     22: 
                     23: # Checkout last release source, and create your branch
                     24: 
                     25: Find latest release.
                     26: 
1.10      ryoon      27:        $ hg tags|grep 50_
1.8       ryoon      28:        (snip)
1.10      ryoon      29:        FIREFOX_50_1_0_RELEASE         359965:8612c3320053
1.3       ryoon      30:        (snip)
                     31: 
                     32: Checkout the branch.
                     33: 
1.10      ryoon      34:        $ hg checkout FIREFOX_50_1_0_RELEASE
1.3       ryoon      35: 
                     36: Create named branch for applying pkgsrc patches
                     37: 
1.10      ryoon      38:        $ hg branch pkgsrc_firefox-50.1.0
                     39:        $ hg commit -m "Create pkgsrc_firefox-50.1.0 branch for applying pkgsrc patches"
1.3       ryoon      40: 
                     41: Add .*\.orig$ to .hgignore, and commit this change
                     42: 
                     43:        $ hg commit -m "Ignore .orig files" .hgignore
                     44: 
                     45: 
                     46: # Apply pkgsrc patches
                     47: 
                     48:        $ pushd /usr/pkgsrc/www/firefox
                     49:        $ mkpatches -c
                     50:        $ popd
                     51:        $ cat /usr/pkgsrc/www/firefox/patches/patch-*|patch -p0
                     52:        $ hg add ...(necessary files)
1.10      ryoon      53:        $ hg commit -m "Apply pkgsrc patches for firefox-50.1.0nb3"
1.3       ryoon      54: 
                     55: 
                     56: # Checkout latest beta source, and create your branch
                     57: 
                     58: Find latest branch.
                     59: 
1.10      ryoon      60:        $ hg tags | grep 51_
1.8       ryoon      61:        (snip)
1.10      ryoon      62:        FIREFOX_51_0b14_RELEASE        364880:09142d07fd73
1.8       ryoon      63:        (snip)
1.3       ryoon      64: 
                     65: Checkout the branch.
                     66: 
1.10      ryoon      67:        $ hg checkout FIREFOX_51_0b14_RELEASE
1.3       ryoon      68: 
                     69: Create named branch for working.
                     70: 
1.10      ryoon      71:        $ hg branch ryoon_firefox-51.0
                     72:        $ hg commit -m "Create ryoon_firefox-51.0 branch for merging pkgsrc patches"
1.3       ryoon      73: 
                     74: Add .*\.orig$ to .hgignore, and commit this change
                     75: 
                     76:        $ hg commit -m "Ignore .orig files" .hgignore
                     77: 
                     78: # Merge your patches
                     79: 
1.10      ryoon      80:        $ hg merge pkgsrc_firefox-50.1.0
1.3       ryoon      81:        $ hg resolve -l
                     82:        $ vi file/marked/as/U
                     83:        $ hg resolve --mark file/marked/as/U
                     84:        (loop)
1.10      ryoon      85:        $ hg commit -m "Merge pkgsrc_firefox-50.1.0 branch to 51.0"
1.3       ryoon      86: 
                     87: 
                     88: # Create patch file for patch -p0
                     89: 
1.10      ryoon      90:        $ hg diff -r (revision of first commit in ryoon_firefox-51.0) | \
                     91:        sed -e 's!^--- a/!--- !' -e 's!^+++ b/!+++ !' > ~/firefox-51.0.diff
                     92:        $ vi ~/firefox-51.0.diff
1.3       ryoon      93:        (Remove patch to .hgignore)
                     94:        (Remove patch to .hgtags)
                     95: 
                     96: # Create patches/patch-* for pkgsrc/www/firefox
                     97: 
                     98:        $ cd /usr/pkgsrc/www/firefox
                     99:        $ vi Makefile
                    100:        (Update version)
                    101:        (Remove PKGREVISION)
                    102:        $ make mdi
                    103:        $ make extract
1.10      ryoon     104:        $ pushd ${WRKOBJDIR}/www/firefox/work/${DISTNAME}
                    105:        $ patch -p0 < ~/firefox-51.0.diff
1.3       ryoon     106:        $ popd
                    107:        $ mkpatches
                    108:        $ patchdiff
                    109:        $ make mps
                    110: 
                    111: # Test your patches
                    112: 
                    113:        $ make clean && make package

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