File:  [NetBSD Developer Wiki] / wikisrc / users / ryoon / how_to_update_www_firefox.mdwn
Revision 1.7: download - view: text, annotated - select for diffs
Fri Jan 16 14:04:45 2015 UTC (7 years, 7 months ago) by ryoon
Branches: MAIN
CVS tags: HEAD
Fix pasto.

    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 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.0b9
   71: 	$ hg commit -m "Create ryoon_firefox-30.0 branch for applying freebsd-gecko patches"
   72: 
   73: Add .*\.orig$ to .hgignore, and commit this change
   74: 
   75: 	$ hg commit -m "Ignore .orig files" .hgignore
   76: 
   77: Apply patches from freebsd-gecko
   78: 
   79: 	$ cat ~/repos/freebsd-gecko/trunk/www/firefox/files/patch-*|patch -p0
   80: 
   81: Fix rejected patches manually
   82: 
   83: 	$ hg status | grep rej$
   84: 	$ vi path/to/a/certain/file.c
   85: 
   86: Commit the patches
   87: 
   88: 	$ hg add (necessary files)
   89: 	$ hg commit -m "Apply freebsd-gecko patches for firefox-30.0"
   90: 
   91: 
   92: # Merge your patches
   93: 
   94: 	$ hg merge pkgsrc_firefox-29.0.1
   95: 	$ hg resolve -l
   96: 	$ vi file/marked/as/U
   97: 	$ hg resolve --mark file/marked/as/U
   98: 	(loop)
   99: 	$ hg commit -m "Merge pkgsrc_firefox-29.0.1 branch to 30.0"
  100: 
  101: 
  102: # Create patch file for patch -p0
  103: 
  104: 	$ hg diff -r (revision of first commit in ryoon_freebsd-30.0) | \
  105: 	sed -e 's!^--- a/!--- !' -e 's!^+++ b/!+++ !' > ~/firefox-30.0.diff
  106: 	$ vi ~/firefox-30.0.diff
  107: 	(Remove patch to .hgignore)
  108: 	(Remove patch to .hgtags)
  109: 
  110: # Create patches/patch-* for pkgsrc/www/firefox
  111: 
  112: 	$ cd /usr/pkgsrc/www/firefox
  113: 	$ vi Makefile
  114: 	(Update version)
  115: 	(Remove PKGREVISION)
  116: 	(Fix WRKSRC variable)
  117: 	$ make mdi
  118: 	$ make extract
  119: 	$ pushd ${WRKOBJDIR}/www/firefox/work/mozilla-beta
  120: 	$ patch -p0 < ~/firefox-30.0.diff
  121: 	$ popd
  122: 	$ mkpatches
  123: 	$ patchdiff
  124: 	$ make mps
  125: 
  126: # Test your patches
  127: 
  128: 	$ make clean && make package

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