File:  [NetBSD Developer Wiki] / wikisrc / users / ryoon / how_to_update_www_firefox.mdwn
Revision 1.8: download - view: text, annotated - select for diffs
Mon Jun 6 12:14:56 2016 UTC (7 years, 3 months ago) by ryoon
Branches: MAIN
CVS tags: HEAD
Update updating procedure for www/firefox

    1: [[!meta title="How to update pkgsrc/www/firefox"]]
    2: 
    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.
    5: 
    6: You should have pkgsrc/meta-pkgs/pkg_developer package.
    7: 
    8: # Clone hg tree
    9: See <https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial>.
   10: 
   11: You should follow "Using Bookmarks to Manage Multiple Repositories from a Single Clone" section.
   12: 
   13: 
   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 tags|grep 46_
   30: 	(snip)
   31: 	FIREFOX_46_0_1_RELEASE		341775:0b8492c110be
   32: 	(snip)
   33: 
   34: Checkout the branch.
   35: 
   36: 	$ hg checkout FIREFOX_46_0_1_RELEASE
   37: 
   38: Create named branch for applying pkgsrc patches
   39: 
   40: 	$ hg branch pkgsrc_firefox-46.0.1
   41: 	$ hg commit -m "Create pkgsrc_firefox-46.0.1 branch for applying pkgsrc patches"
   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)
   55: 	$ hg commit -m "Apply pkgsrc patches for firefox-46.0.1nb1"
   56: 
   57: 
   58: # Checkout latest beta source, and create your branch
   59: 
   60: Find latest branch.
   61: 
   62: 	$ hg tags | grep 47_
   63: 	(snip)
   64: 	FIREFOX_47_0b9_RELEASE		341367:2ee4473c729a
   65: 	(snip)
   66: 
   67: Checkout the branch.
   68: 
   69: 	$ hg checkout FIREFOX_47_0b9_RELEASE
   70: 
   71: Create named branch for working.
   72: 
   73: 	$ hg branch ryoon_firefox-47.0b9
   74: 	$ hg commit -m "Create ryoon_firefox-47.0 branch for merging pkgsrc patches"
   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: 
   82: 	$ hg merge pkgsrc_firefox-46.0.1
   83: 	$ hg resolve -l
   84: 	$ vi file/marked/as/U
   85: 	$ hg resolve --mark file/marked/as/U
   86: 	(loop)
   87: 	$ hg commit -m "Merge pkgsrc_firefox-46.0.1 branch to 47.0"
   88: 
   89: 
   90: # Create patch file for patch -p0
   91: 
   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
   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: 	(Fix WRKSRC variable)
  105: 	$ make mdi
  106: 	$ make extract
  107: 	$ pushd ${WRKOBJDIR}/www/firefox/work/mozilla-beta
  108: 	$ patch -p0 < ~/firefox-47.0.diff
  109: 	$ popd
  110: 	$ mkpatches
  111: 	$ patchdiff
  112: 	$ make mps
  113: 
  114: # Test your patches
  115: 
  116: 	$ make clean && make package

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