File:  [NetBSD Developer Wiki] / wikisrc / users / ryoon / how_to_update_www_firefox.mdwn
Revision 1.9: download - view: text, annotated - select for diffs
Sun Jun 19 09:21:40 2016 UTC (4 years, 4 months ago) by ryoon
Branches: MAIN
CVS tags: HEAD
Recently WRKSRC reflects tarball filename

[[!meta title="How to update pkgsrc/www/firefox"]]

This article shows how to update pkgsrc/www/firefox package to latest release.
You can use Mozilla's Mercurial (hg) repositories to track upstream changes.

You should have pkgsrc/meta-pkgs/pkg_developer package.

# Clone hg tree
See <https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial>.

You should follow "Using Bookmarks to Manage Multiple Repositories from a Single Clone" section.


# Update trees to latest

	$ hg pull central
	$ hg pull inbound
	$ hg pull aurora
	$ hg pull beta
	$ hg pull release

	$ hg update


# Checkout last release source, and create your branch

Find latest release.

	$ hg tags|grep 46_
	(snip)
	FIREFOX_46_0_1_RELEASE		341775:0b8492c110be
	(snip)

Checkout the branch.

	$ hg checkout FIREFOX_46_0_1_RELEASE

Create named branch for applying pkgsrc patches

	$ hg branch pkgsrc_firefox-46.0.1
	$ hg commit -m "Create pkgsrc_firefox-46.0.1 branch for applying pkgsrc patches"

Add .*\.orig$ to .hgignore, and commit this change

	$ hg commit -m "Ignore .orig files" .hgignore


# Apply pkgsrc patches

	$ pushd /usr/pkgsrc/www/firefox
	$ mkpatches -c
	$ popd
	$ cat /usr/pkgsrc/www/firefox/patches/patch-*|patch -p0
	$ hg add ...(necessary files)
	$ hg commit -m "Apply pkgsrc patches for firefox-46.0.1nb1"


# Checkout latest beta source, and create your branch

Find latest branch.

	$ hg tags | grep 47_
	(snip)
	FIREFOX_47_0b9_RELEASE		341367:2ee4473c729a
	(snip)

Checkout the branch.

	$ hg checkout FIREFOX_47_0b9_RELEASE

Create named branch for working.

	$ hg branch ryoon_firefox-47.0b9
	$ hg commit -m "Create ryoon_firefox-47.0 branch for merging pkgsrc patches"

Add .*\.orig$ to .hgignore, and commit this change

	$ hg commit -m "Ignore .orig files" .hgignore

# Merge your patches

	$ hg merge pkgsrc_firefox-46.0.1
	$ hg resolve -l
	$ vi file/marked/as/U
	$ hg resolve --mark file/marked/as/U
	(loop)
	$ hg commit -m "Merge pkgsrc_firefox-46.0.1 branch to 47.0"


# Create patch file for patch -p0

	$ hg diff -r (revision of first commit in ryoon_firefox-47.0b9) | \
	sed -e 's!^--- a/!--- !' -e 's!^+++ b/!+++ !' > ~/firefox-47.0.diff
	$ vi ~/firefox-47.0.diff
	(Remove patch to .hgignore)
	(Remove patch to .hgtags)

# Create patches/patch-* for pkgsrc/www/firefox

	$ cd /usr/pkgsrc/www/firefox
	$ vi Makefile
	(Update version)
	(Remove PKGREVISION)
	$ make mdi
	$ make extract
	$ pushd ${WRKOBJDIR}/www/firefox/work/mozilla-beta
	$ patch -p0 < ~/firefox-47.0.diff
	$ popd
	$ mkpatches
	$ patchdiff
	$ make mps

# Test your patches

	$ make clean && make package

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