summaryrefslogtreecommitdiffstats
path: root/security/nss/doc/rst/legacy/reference/building_and_installing_nss
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/doc/rst/legacy/reference/building_and_installing_nss')
-rw-r--r--security/nss/doc/rst/legacy/reference/building_and_installing_nss/build_instructions/index.rst152
-rw-r--r--security/nss/doc/rst/legacy/reference/building_and_installing_nss/index.rst12
-rw-r--r--security/nss/doc/rst/legacy/reference/building_and_installing_nss/installation_guide/index.rst50
-rw-r--r--security/nss/doc/rst/legacy/reference/building_and_installing_nss/migration_to_hg/index.rst49
-rw-r--r--security/nss/doc/rst/legacy/reference/building_and_installing_nss/sample_manual_installation/index.rst27
5 files changed, 290 insertions, 0 deletions
diff --git a/security/nss/doc/rst/legacy/reference/building_and_installing_nss/build_instructions/index.rst b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/build_instructions/index.rst
new file mode 100644
index 0000000000..bc6e44a765
--- /dev/null
+++ b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/build_instructions/index.rst
@@ -0,0 +1,152 @@
+.. _mozilla_projects_nss_reference_building_and_installing_nss_build_instructions:
+
+Build instructions
+==================
+
+.. container::
+
+ .. note::
+
+ These instructions are outdated. Use the :ref:`mozilla_projects_nss_building` page for more
+ recent information.
+
+ Numerous optional features of NSS builds are controlled through make variables.
+
+ gmake is GNU make, usually your Linux-distro-regular "make" binary file, unless maybe it is a BSD
+ make. Make variables may be set on the gmake command line, e.g.,
+
+ .. code::
+
+ gmake variable=value variable=value target1 target2
+
+ or defined in the environment, e.g. (for POSIX shells),
+
+ .. code::
+
+ variable=value; export variable
+ gmake target1 target2
+
+ Here are some (not all) of the make variables that affect NSS builds:
+
+ - BUILD_OPT: If set to 1, means do optimized non-DEBUG build. Default is DEBUG, non-optimized
+ build.
+ - USE_DEBUG_RTL: If set to 1, on Windows, causes build with debug version of the C run-time
+ library.
+ - NS_USE_GCC: On platforms where gcc is not the native compiler, tells NSS to build with gcc
+ instead of the native compiler. Default is to build with the native compiler.
+ - USE_64: On platforms that support both 32-bit and 64-bit ABIs, tells NSS to build for the
+ 64-bit ABI. Default is 32-bit ABI, except on platforms that do not support a 32-bit ABI.
+ - MOZ_DEBUG_SYMBOLS: tells NSS to build with debug symbols, even in an optimized build. On
+ windows, in both DEBUG and optimized builds, when using MSVC, tells NSS to put symbols in a
+ .pdb file. Required to build with MSVC 8 (2005 Express). Default is not to put debug symbols
+ into optimized builds, and for MSVC, is to put symbols into the .exe or .dll file.
+ - NSDISTMODE: If set to 'copy', mozilla/dist/<OBJ_STUFF>/bin/\* real files instead of symbolic
+ links.
+
+ These variables should be either undefined, or set to "1". Results are undefined for variables
+ set to "0".
+
+ For Windows, install
+ the `MozillaBuild <https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites#mozillabuild>`__ environment
+ and Microsoft Visual Studio 2010. (The free edition works, and other versions like Visual Studio
+ 2008 and Visual Studio 2012 may also work.) Use start-shell-msvc2010.bat from MozillaBuild to get
+ a bash shell with the PATH already configured, and execute these instructions from within that
+ bash shell.
+
+ For RHEL-5, you need to use the new assembler. You can install the new assembler as root as
+ follows:
+
+ .. code::
+
+ yum install binutils220
+
+ You can then use the new assembler by adding /usr/libexec/binutils220 to the beginning of your
+ build path. This can be done in sh or bash as follows:
+
+ .. code::
+
+ export PATH=/usr/libexec/binutils220:$PATH
+
+ The following build instructions should work for all platforms (with some platform-specific
+ changes as noted).
+
+.. _build_instructions_for_recent_versions_(mercurial):
+
+`Build Instructions for Recent Versions (Mercurial) <#build_instructions_for_recent_versions_(mercurial)>`__
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ #. Clone the NSPR and NSS repositories.
+
+ .. code::
+
+ hg clone https://hg.mozilla.org/projects/nspr
+ hg clone https://hg.mozilla.org/projects/nss
+
+ #. If you want to build a releases other than the tips of these repositories, then switch to the
+ release tags:
+
+ .. code::
+
+ cd nspr
+ hg update NSPR_4_9_5_RTM
+ cd ../nss
+ hg update NSS_3_14_2_RTM
+ cd ..
+
+ #. Set environment variables:
+
+ #. If you want a non-debug optimized build, set ``BUILD_OPT=1`` in your environment.
+ Otherwise, you get a debug build. On Windows, if you want a debug build with the system's
+ debug RTL libraries, set ``USE_DEBUG_RTL=1`` in your environment.
+ #. On Unix platforms, except Alpha/OSF1, if you want a build for the system's 64-bit ABI, set
+ ``USE_64=1`` in your environment. By default, NSS builds for the 32-bit environment on all
+ platforms except Alpha/OSF1.
+ #. To build with ``gcc`` on platforms other than Linux and Windows, you need to set two more
+ environment variables:
+
+ - ``NS_USE_GCC=1``
+ ``NO_MDUPDATE=1``
+
+ #. For HP-UX, you must set the environment variable ``USE_PTHREADS`` to 1.
+
+ #. ``cd nss``
+
+ #. ``gmake nss_build_all``
+
+ The output of the build will be in the ``dist`` directory alongside the ``nspr`` and ``nss``
+ directories.
+
+ For information on troubleshooting the build system, see
+ :ref:`mozilla_projects_nss_reference_troubleshoot`.
+
+.. _build_instructions_for_older_versions_(cvs):
+
+`Build Instructions for Older Versions (CVS) <#build_instructions_for_older_versions_(cvs)>`__
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ #. Set the environment variable ``CVSROOT`` to
+ ``:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot``
+
+ #. ``cvs login`` (if you haven't before).
+
+ #. Check out NSPR and NSS:
+
+ .. code::
+
+ cvs co -r NSPR_4_9_5_RTM NSPR
+ cvs co -r NSS_3_14_2_RTM NSS
+
+ #. Set environment variables as described in the Mercurial-based instructions.
+
+ #. ``cd mozilla/security/nss``
+
+ #. ``gmake nss_build_all``
+
+ The output of the build will be in ``mozilla/dist`` subdirectory.
+
+ For information on troubleshooting the build system, see
+ :ref:`mozilla_projects_nss_reference_troubleshoot`. \ No newline at end of file
diff --git a/security/nss/doc/rst/legacy/reference/building_and_installing_nss/index.rst b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/index.rst
new file mode 100644
index 0000000000..c51a681b8a
--- /dev/null
+++ b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/index.rst
@@ -0,0 +1,12 @@
+.. _mozilla_projects_nss_reference_building_and_installing_nss:
+
+Building and installing NSS
+===========================
+
+.. container::
+
+ This chapter describes how to build and install NSS.
+
+ - :ref:`mozilla_projects_nss_reference_building_and_installing_nss_build_instructions`
+ - :ref:`mozilla_projects_nss_reference_building_and_installing_nss_installation_guide`
+ - :ref:`mozilla_projects_nss_reference_building_and_installing_nss_sample_manual_installation` \ No newline at end of file
diff --git a/security/nss/doc/rst/legacy/reference/building_and_installing_nss/installation_guide/index.rst b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/installation_guide/index.rst
new file mode 100644
index 0000000000..0a2f382e4b
--- /dev/null
+++ b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/installation_guide/index.rst
@@ -0,0 +1,50 @@
+.. _mozilla_projects_nss_reference_building_and_installing_nss_installation_guide:
+
+Installation guide
+==================
+
+.. container::
+
+ The build system of NSS originated from Netscape's build system, which predated the "configure;
+ make; make test; make install" sequence that we're familiar with now. Our makefiles also have an
+ "install" target, but it has a different meaning: our "install" means installing the headers,
+ libraries, and programs in the appropriate directories under mozilla/dist.
+
+ So right now you need to manually install the headers, libraries, and programs in the directories
+ you want. If you install the libraries in a directory other than /usr/lib, you usually need to
+ set the LD_LIBRARY_PATH environment variable. You can avoid that by installing the libraries in a
+ directory that is $ORIGIN/../lib, where $ORIGIN is the directory where the programs are
+ installed. This is done here:
+ `http://lxr.mozilla.org/security/sour...platlibs.mk#53 <http://lxr.mozilla.org/security/source/security/nss/cmd/platlibs.mk#53>`__
+
+ .. code::
+
+ 53 ifeq ($(OS_ARCH), Linux)
+ 54 ifeq ($(USE_64), 1)
+ 55 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
+ 56 else
+ 57 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
+ 58 endif
+ 59 endif
+
+ For example, if you install certutil in /foo/bar/nss/bin and the .so's in /foo/bar/nss/lib, then
+ you only need to add /foo/bar/nss/bin to your PATH; you don't need to set LD_LIBRARY_PATH.
+
+ The libraries you need to install are listed below.
+
+ NSPR:
+
+ - libnspr4.so
+ - libplds4.so
+ - libplc4.so
+
+ NSS: (Note the use of \* for libfreebl -- some platforms have multiple ones)
+
+ - libfreebl*3.so
+ - libfreebl*3.chk
+ - libsoftokn3.so
+ - libsoftokn3.chk
+ - libnss3.so
+ - libsmime3.so
+ - libssl3.so
+ - libnssckbi.so \ No newline at end of file
diff --git a/security/nss/doc/rst/legacy/reference/building_and_installing_nss/migration_to_hg/index.rst b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/migration_to_hg/index.rst
new file mode 100644
index 0000000000..11bd04eabe
--- /dev/null
+++ b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/migration_to_hg/index.rst
@@ -0,0 +1,49 @@
+.. _mozilla_projects_nss_reference_building_and_installing_nss_migration_to_hg:
+
+Migration to HG
+===============
+
+.. container::
+
+ | The NSPR, NSS and related projects have stopped using Mozilla'a CVS server, but have migrated
+ to
+ | Mozilla's HG (Mercurial) server.
+ | Each project now lives in its own separate space, they can be found at:
+ | https://hg.mozilla.org/projects/nspr/
+ | https://hg.mozilla.org/projects/nss/
+ | https://hg.mozilla.org/projects/jss/
+ | https://hg.mozilla.org/projects/python-nss/
+
+ | This migration has been used as an opportunity to change the layout of the
+ | source directories.
+ | For NSPR, "mozilla/nsprpub" has been removed from the directory
+ | hierarchy, all files now live in the top directory of the NSPR
+ | repository.
+ | Likewise for NSS and JSS, "mozilla/security" has been removed and files
+ | now live at the top level. In addition for NSS, we have merged the
+ | contents of directories mozilla/dbm and mozilla/security/dbm into the
+ | new directory lib/dbm.
+ | Besides the new layout, the build system hasn't changed. Most parts of
+ | the NSS build instructions remain valid, especially the instructions
+ | about setting environment variables.
+ | Updated instructions for building NSS with NSPR can be found at:
+ | :ref:`mozilla_projects_nss_reference_building_and_installing_nss_build_instructions`
+ | It's best to refer to the above document to learn about the various
+ | environment variables that you might have to set to build on your
+ | platform (this part hasn't changed).
+ | However, below is a brief summary that shows how to checkout the
+ | source code and build both NSPR and NSS:
+ | mkdir workarea
+ | cd workarea
+ | hg clone https://hg.mozilla.org/projects/nspr
+ | hg clone https://hg.mozilla.org/projects/nss
+ | cd nss
+ | # set USE_64=1 on 64 bit architectures
+ | # set BUILD_OPT=1 to get an optimized build
+ | make nss_build_all
+ | Note that the JSS project has been given a private copy of the former
+ | mozilla/security/coreconf directory, allowing it to remain stable,
+ | and only update its build system as necessary.
+ | Because of the changes described above, we have decided to use a new
+ | series of (minor) version numbers. The first releases using the new code
+ | layout will be NSPR 4.10 and NSS 3.15 \ No newline at end of file
diff --git a/security/nss/doc/rst/legacy/reference/building_and_installing_nss/sample_manual_installation/index.rst b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/sample_manual_installation/index.rst
new file mode 100644
index 0000000000..bc570c2e13
--- /dev/null
+++ b/security/nss/doc/rst/legacy/reference/building_and_installing_nss/sample_manual_installation/index.rst
@@ -0,0 +1,27 @@
+.. _mozilla_projects_nss_reference_building_and_installing_nss_sample_manual_installation:
+
+Sample manual installation
+==========================
+
+.. container::
+
+ |
+ | The NSS build system does not include a target to install header files and shared libraries in
+ the system directories, so this needs to be done manually.
+
+ After building NSS with *"gmake nss_build_all"*, the resulting build can be found in the NSS
+ source tree as follows:
+
+ - NSS header files: *mozilla/dist/public/nss*
+ - NSPR header files: *mozilla/dist/*\ **<OBJ-DIR>**\ */include*
+ - NSPR/NSS shared libs: *mozilla/dist/*\ **<OBJ-DIR>**\ */lib*
+ - NSS binary executables: *mozilla/dist/*\ **<OBJ-DIR>**\ */bin*.
+
+ where **<OBJ-DIR>** would vary according to the type of build and the platform. For example,
+ **<OBJ-DIR>** for a debug build of NSS on the x86 platform with a Linux kernel version 2.6 with
+ glibc would be: Linux2.6_x86_glibc_PTH_DBG.OBJ
+
+ From these directories, you can copy the files to any system (or other) directory. If the
+ destination directories are not what's standard for the system (e.g. /usr/include, /usr/lib and
+ /usr/bin for a Linux system), you need to edit the corresponding environment variables or
+ compiler/linker arguments. \ No newline at end of file