File:  [NetBSD Developer Wiki] / wikisrc / users / ryoon / how_to_update_www_firefox.mdwn
Revision 1.10: download - view: text, annotated - select for diffs
Sun Jan 22 13:00:58 2017 UTC (5 years, 6 months ago) by ryoon
Branches: MAIN
CVS tags: HEAD
Explain pkgsrc/www/firefox update instruction with recent example

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

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