First commit for patches still under review.
BUG1168917_BRANCH
First commit for patches still under review.
--- a/Makefile
+++ b/Makefile
@@ -21,16 +21,21 @@ include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
+# Note for downstream package maintainers: if building with
+# NSS_BUILD_UTIL_ONLY or NSS_BUILD_SOFTOKEN_ONLY set up
+# export NSS_DISABLE_GTESTS=1 via the spec files or other
+# mechanism controling the build
+
ifdef NSS_DISABLE_GTESTS
DIRS := $(filter-out external_tests,$(DIRS))
endif
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
--- a/cmd/manifest.mn
+++ b/cmd/manifest.mn
@@ -1,18 +1,32 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = ..
# MODULE = seccmd
+ifdef NSS_BUILD_UTIL_ONLY
+REQUIRES = nspr
+
+DIRS = \
+ $(NULL)
+else
REQUIRES = nss nspr libdbm
+ifdef NSS_BUILD_SOFTOKEN_ONLY
+DIRS = lib \
+ $(BLTEST_SRCDIR) \
+ $(FIPSTEST_SRCDIR) \
+ $(LOWHASHTEST_SRCDIR) \
+ $(SHLIBSIGN_SRCDIR) \
+ $(NULL)
+else
DIRS = lib \
addbuiltin \
atob \
$(BLTEST_SRCDIR) \
btoa \
certcgi \
certutil \
checkcert \
@@ -53,16 +67,18 @@ DIRS = lib \
strsclnt \
symkeyutil \
tests \
tstclnt \
vfychain \
vfyserv \
modutil \
$(NULL)
+endif
+endif
TEMPORARILY_DONT_BUILD = \
$(NULL)
# rsaperf \
#
# needs to look at what needs to happen to make jar build in
# the binary release environment.
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -41,35 +41,53 @@ ifeq ($(OS_ARCH),Linux)
SYSINIT_SRCDIR = sysinit # Add the sysinit directory to DIRS.
endif
endif
ifndef NSS_DISABLE_DBM
DBM_SRCDIR = dbm # Add the dbm directory to DIRS.
endif
+ifeq ($(NSS_BUILD_UTIL_ONLY),1)
+SYSINIT_SRCDIR=
+endif
+
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
-ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
-# Not included when building nss without softoken
-UTIL_SRCDIR =
-FREEBL_SRCDIR =
-SOFTOKEN_SRCDIR =
+ifeq ($(NSS_BUILD_UTIL_ONLY),1)
+ UTIL_SRCDIR = util
+ FREEBL_SRCDIR =
+ SOFTOKEN_SRCDIR =
else
-# default is to include all
-UTIL_SRCDIR = util
-FREEBL_SRCDIR = freebl
-SOFTOKEN_SRCDIR = softoken
+ ifeq ($(NSS_BUILD_SOFTOKEN_ONLY),1)
+ UTIL_SRCDIR =
+ FREEBL_SRCDIR = freebl
+ SOFTOKEN_SRCDIR = softoken
+ else
+ ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
+ # Not included when building nss without softoken
+ # This build type uses the build results of the prior
+ # NSS_BUILD_UTIL_ONLY and NSS_BUILD_SOFTOKEN_ONLY builds
+ UTIL_SRCDIR =
+ FREEBL_SRCDIR =
+ SOFTOKEN_SRCDIR =
+ else
+ # default is to include all
+ UTIL_SRCDIR = util
+ FREEBL_SRCDIR = freebl
+ SOFTOKEN_SRCDIR = softoken
+ endif
+ endif
endif
--- a/lib/manifest.mn
+++ b/lib/manifest.mn
@@ -11,29 +11,51 @@ DEPTH = ..
# softoken and prereqs.
# stan (not a separate dll yet)
# libpkix (not a separate dll)
# nss base (traditional)
# ssl
# smime
# ckfw (builtins module)
# crmf jar (not dll's)
-DIRS = \
+ifdef NSS_BUILD_UTIL_ONLY
+ DIRS = \
+ $(UTIL_SRCDIR) \
+ $(NULL)
+else
+ ifdef NSS_BUILD_SOFTOKEN_ONLY
+ # Building softoken (and freebl) only requires that the paths
+ # to the locations where the util headers and libraries were
+ # previously installed by a prior util-only build, likely in
+ # in a system location that varies with the distribution. This
+ # cannot be addressed here and requires that downstream package
+ # mantainers add suitable modifications.
+ DIRS = \
+ $(UTIL_SRCDIR) \
+ $(FREEBL_SRCDIR) \
+ $(SQLITE_SRCDIR) \
+ $(DBM_SRCDIR) \
+ $(SOFTOKEN_SRCDIR) \
+ $(NULL)
+ else
+ DIRS = \
$(UTIL_SRCDIR) \
$(FREEBL_SRCDIR) \
$(SQLITE_SRCDIR) \
$(DBM_SRCDIR) \
$(SOFTOKEN_SRCDIR) \
base dev pki \
libpkix \
certdb certhigh pk11wrap cryptohi nss \
$(ZLIB_SRCDIR) ssl \
pkcs7 pkcs12 smime \
crmf jar \
ckfw $(SYSINIT_SRCDIR) \
$(NULL)
+ endif
+endif
# fortcrypt is no longer built
#
# these dirs are not built at the moment
#
#NOBUILD_DIRS = jar
--- a/tests/all.sh
+++ b/tests/all.sh
@@ -305,19 +305,26 @@ fi
# last file created.
if [ "${NSS_BUILD_SOFTOKEN_ONLY}" = "1" ]; then
LAST_FILE_BUILT=shlibsign
else
LAST_FILE_BUILT=modutil
fi
if [ ! -f ${DIST}/${OBJDIR}/bin/${LAST_FILE_BUILT}${PROG_SUFFIX} ]; then
+ if [ "${NSS_BUILD_UTIL_ONLY}" = "1" ]; then
+ # Currently no tests are run or built when building util only.
+ # This may change in the future, atob and bota are
+ # possible candidates.
+ echo "No tests were built"
+ else
echo "Build Incomplete. Aborting test." >> ${LOGFILE}
html_head "Testing Initialization"
Exit "Checking for build"
+ fi
fi
# NOTE:
# Lists of enabled tests and other settings are stored to ${ENV_BACKUP}
# file and are are restored after every test cycle.
ENV_BACKUP=${HOSTDIR}/env.sh
env_backup > ${ENV_BACKUP}