Skip to content

Commit

Permalink
Bug 835919 - Allow optionally building nss without softoken in the tr…
Browse files Browse the repository at this point in the history
…ee, r=wtc

- Remove unneede changes in to the test scrips
- Add needed comments for package maintainers and reviewers
- Fix whitespace usage on the makefiles
  • Loading branch information
Elio Maldonado committed May 6, 2013
1 parent 271e9a7 commit f29bce8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 26 deletions.
10 changes: 6 additions & 4 deletions cmd/Makefile
Expand Up @@ -15,11 +15,13 @@ DIRS += libpkix
endif

ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
BLTEST_SRCDIR=
FIPSTEST_SRCDIR=
BLTEST_SRCDIR =
FIPSTEST_SRCDIR =
SHLIBSIGN_SRCDIR =
else
BLTEST_SRCDIR = bltest
FIPSTEST_SRCDIR = fipstest
BLTEST_SRCDIR = bltest
FIPSTEST_SRCDIR = fipstest
SHLIBSIGN_SRCDIR = shlibsign
endif

LOWHASHTEST_SRCDIR=
Expand Down
2 changes: 1 addition & 1 deletion cmd/manifest.mn
Expand Up @@ -47,7 +47,7 @@ DIRS = lib \
selfserv \
signtool \
signver \
shlibsign \
$(SHLIBSIGN_SRCDIR) \
smimetools \
ssltap \
strsclnt \
Expand Down
6 changes: 4 additions & 2 deletions cmd/platlibs.mk
Expand Up @@ -36,11 +36,13 @@ ifdef USE_STATIC_LIBS

DEFINES += -DNSS_USE_STATIC_LIBS
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
ifndef USE_SYSTEM_FREEBL
ifndef NSS_USE_SYSTEM_FREEBL
CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
SOFTOKENLIB=$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX)
else
# Use the system freebl and softoken libraries
# Use the system installed freebl static library and set softoken one to empty.
# Some tools need to link statically with freebl but none with softoken. Only
# the softoken shared library, not the static one, is installed in the system.
CRYPTOLIB=$(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
SOFTOKENLIB=
EXTRA_SHARED_LIBS += \
Expand Down
6 changes: 3 additions & 3 deletions lib/Makefile
Expand Up @@ -64,9 +64,9 @@ include $(CORE_DEPTH)/coreconf/rules.mk

ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
# Not included when building nss without softoken
UTIL_SRCDIR=
FREEBL_SRCDIR=
SOFTOKEN_SRCDIR=
UTIL_SRCDIR =
FREEBL_SRCDIR =
SOFTOKEN_SRCDIR =
else
# default is to include all
UTIL_SRCDIR = util
Expand Down
7 changes: 6 additions & 1 deletion lib/manifest.mn
Expand Up @@ -16,7 +16,12 @@ DEPTH = ..
# smime
# ckfw (builtins module)
# crmf jar (not dll's)
DIRS = $(UTIL_SRCDIR) $(FREEBL_SRCDIR) $(SQLITE_SRCDIR) $(DBM_SRCDIR) $(SOFTOKEN_SRCDIR) \
DIRS = \
$(UTIL_SRCDIR) \
$(FREEBL_SRCDIR) \
$(SQLITE_SRCDIR) \
$(DBM_SRCDIR) \
$(SOFTOKEN_SRCDIR) \
base dev pki \
libpkix \
certdb certhigh pk11wrap cryptohi nss \
Expand Down
5 changes: 1 addition & 4 deletions tests/cipher/cipher.sh
Expand Up @@ -66,16 +66,13 @@ cipher_main()
failedStr=""
inOff=0
res=0
# If nss was built without softoken use the system installed bltest tool.
# The FREEBL_BINDIR location is platform dependent. See the comments
# regarding this location in tests/common/init.sh.
while [ $inOff -lt 8 ]
do
outOff=0
while [ $outOff -lt 8 ]
do
echo "bltest -T -m $PARAM -d $CIPHERTESTDIR -1 $inOff -2 $outOff"
${PROFTOOL} ${FREEBL_BINDIR}/bltest${PROG_SUFFIX} -T -m $PARAM -d $CIPHERTESTDIR -1 $inOff -2 $outOff
${PROFTOOL} ${BINDIR}/bltest${PROG_SUFFIX} -T -m $PARAM -d $CIPHERTESTDIR -1 $inOff -2 $outOff
if [ $? -ne 0 ]; then
failedStr="$failedStr[$inOff:$outOff]"
fi
Expand Down
11 changes: 0 additions & 11 deletions tests/common/init.sh
Expand Up @@ -647,17 +647,6 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
ulimit -c unlimited
fi

#################################################################
# If we built nss without softoken use the system installed tool.
# Fedora, for example, uses /usr/lib${ARCH}/unsupported-tools but
# other platform may place the system installed tests somewhere else.
# The FREEBL_BINDIR environment variable will have been set by the
# package maintainer.
if [ ${NSS_BUILD_WITHOUT_SOFTOKEN} = "1" ]; then
export FREEBL_BINDIR=${FREEBL_BINDIR}
else
export FREEBL_BINDIR=${BINDIR}
fi
SCRIPTNAME=$0
INIT_SOURCED=TRUE #whatever one does - NEVER export this one please
fi

0 comments on commit f29bce8

Please sign in to comment.