NSS Shared DB Test
1. Getting the shared DB sources:
The majority of the code for building with the shared DB is located under softoken. In the branch BOB_SHARED_DB. This branch is kept up to date with the tip, so you should be able to just pull the branch on top of your standard NSS build.
- . checkout NSS as normal.
- . cd mozilla/security/nss/lib
- . mv softoken softoken.orig
- . cvs checkout -r NSS_BOB_SHARED softoken
2. Getting sqlite3. If you don't have a system version of sqlite3, you will need to build it. (If you have a system version you can skip this step:
- . in mozilla/security/nss/lib: cvs checkout -r NSS_BOB_SHARED sqlite
- . Patch the makefile as follows:
Index: Makefile =================================================================== RCS file: /cvsroot/mozilla/security/nss/lib/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- Makefile 25 Apr 2004 15:03:01 -0000 1.9 +++ Makefile 31 May 2007 01:23:13 -0000 @@ -62,6 +62,24 @@ DIRS := $(filter-out fortcrypt,$(DIRS)) endif
+# +# automatically determine if we need to build our own sqlite +# or if we can use the system version. This is one thing configure +# would be good for. +# +ifndef BUILD_LOCAL_SQLITE +INCLUDEDIR=$(patsubst -I%,%,$(INCLUDES) -I/usr/include) +sqlitesearch=$(addsuffix /sqlite3.h,$(INCLUDEDIR)) + +ifeq ($(wildcard $(sqlitesearch)),) +BUILD_LOCAL_SQLITE=1 +endif +endif + +ifdef BUILD_LOCAL_SQLITE +DIRS := sqlite $(DIRS) +endif +
3. This should be enough to build the nss shared libraries. If you want to build the commands, patch the command line directory with the patch from bug 217538 (https://bugzilla.mozilla.org/show_bug.cgi?id=217538) (the patch is https://bugzilla.mozilla.org/attachment.cgi?id=266699 )
4. If you want to test the shared library, then apply the test patch from the same bug (https://bugzilla.mozilla.org/attachment.cgi?id=266700)
Build and test NSS as normal.