# Copyright 2004-2013 SPARTA, Inc.  All rights reserved.
# See the COPYING file included with the dnssec-tools package for details.

			     DNSSEC-Tools
			Is your domain secure?

This directory contains a patch to apply to the mozilla code for
enabling DNSSEC checking of URL DNS names.  It is in beta form with a
lot of debugging but should be usable in testing environments.

The current patches are for Firefox 3.0.6, though they may work with
other 3.X releases.


Needed Files depending on what is being built:

  +-------------------------+-----------+--------------+--------------+
  |                         |Firefox RPM|Firefox source|Mozilla Source|
  +-------------------------+-----------+--------------+--------------+
  |dnssec-firefox.patch     |X          |X             |              |
  |dnssec-both.patch        |X          |X             |X             |
  |dnssec-mozconfig.patch   |X          |              |              |
  |firefox-spec.patch       |X          |              |              |
  +-------------------------+-----------+--------------+--------------+

######################################################################
# PREREQUISITES

  All of the following instructions assume you have the dnssec-tools
  package already install (specifically, libval and libsres).

######################################################################
# FIREFOX RPM
#

  The Fedora RPMs require patched xulrunner and nspr RPMS being
  installed first.  See README.nspr and README.xulrunner for
  instructions on rebuilding these RPMs for DNSSEC support.

  If you don't already have a rpm build tree, create one with
  rpmdeb-setuptree.  To build the firefox linux RPM on Fedora:

    cd ~/rpmbuild/SRPMS
    yumdownloader --source firefox
    # or: fedpkg co firefox && cd firefox && fedpkg switch-branch f13
    rpm -ivh firefox-*

    cd ~/rpmbuild/SPECS/
    patch < ~/dnssec-tools/apps/mozilla/firefox-spec.patch
    cd ~/dnssec-tools/apps/mozilla/
    cp dnssec-firefox.patch dnssec-both.patch dnssec-mozconfig.patch ~/rpmbuild/SOURCES/
    rpmbuild -bb ~/rpmbuild/SPECS/firefox.spec
    # or: fedpkg local
    sudo rpm -Fvh ~/rpmbuild/RPMS/firefox-*

######################################################################
# FIREFOX FROM SOURCE
#

  The following summarizes what you need to do in order to build
  firefox from a source tree including the DNSSEC support.  It is
  probably best to follow an example from your distribution when
  creating a .mozconfig file.  The DNSSEC support should be
  automatically detected by configure and turned on if you have
  dnssec-tools installed.


  tar xjf firefox-3.0.6-source.tar.bz2
  cd mozilla/mozilla-*
  patch -b -z .dnssec -p1 < ~/dnssec-tools/apps/mozilla/dnssec-firefox.patch
  patch -b -z .dnssec -p1 < ~/dnssec-tools/apps/mozilla/dnssec-both.patch
  patch -b -z .dnssec -p1 < ~/dnssec-tools/apps/mozilla/dnssec-nspr.patch

  # create a .mozconfig file; this is a stripped down version of what
  # gets put into the fedora RPMs but should work everywhere???:
  cat >> .mozconfig << EOF
. $topsrcdir/browser/config/mozconfig

ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --with-pthreads
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-pango
ac_add_options --enable-svg
ac_add_options --enable-canvas

ac_add_options --with-system-openssl=/path/to/openssl
ac_add_options --with-system-val=/path/to/libval-threads
ac_add_options --with-system-sres=/path/to/libsres

EOF

  # finally build it all:
  make -f client.mk build


######################################################################
