2016-12-23 08:00:57 +03:00
|
|
|
#!/usr/bin/env bash
|
2017-01-26 21:49:57 +03:00
|
|
|
#
|
|
|
|
# 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/.
|
|
|
|
################################################################################
|
|
|
|
#
|
2016-10-25 21:38:17 +03:00
|
|
|
# This script builds NSS with gyp and ninja.
|
|
|
|
#
|
|
|
|
# This build system is still under development. It does not yet support all
|
|
|
|
# the features or platforms that NSS supports.
|
2016-10-15 09:45:05 +03:00
|
|
|
|
2016-10-25 21:38:17 +03:00
|
|
|
set -e
|
|
|
|
|
2017-01-21 16:23:56 +03:00
|
|
|
cwd=$(cd $(dirname $0); pwd -P)
|
2019-07-16 00:40:37 +03:00
|
|
|
dist_dir="$cwd/../dist"
|
|
|
|
argsfile="$dist_dir/build_args"
|
|
|
|
source "$cwd/coreconf/nspr.sh"
|
|
|
|
source "$cwd/coreconf/sanitizers.sh"
|
2017-06-07 10:21:08 +03:00
|
|
|
GYP=${GYP:-gyp}
|
2016-11-16 16:06:23 +03:00
|
|
|
|
2016-11-02 12:29:58 +03:00
|
|
|
# Usage info
|
2017-01-21 16:23:56 +03:00
|
|
|
show_help()
|
|
|
|
{
|
2019-07-16 00:40:37 +03:00
|
|
|
cat "$cwd/help.txt"
|
2016-11-02 12:29:58 +03:00
|
|
|
}
|
2016-10-15 09:45:05 +03:00
|
|
|
|
2017-01-21 16:23:56 +03:00
|
|
|
run_verbose()
|
|
|
|
{
|
|
|
|
if [ "$verbose" = 1 ]; then
|
|
|
|
echo "$@"
|
|
|
|
exec 3>&1
|
|
|
|
else
|
|
|
|
exec 3>/dev/null
|
|
|
|
fi
|
|
|
|
"$@" 1>&3 2>&3
|
|
|
|
exec 3>&-
|
|
|
|
}
|
|
|
|
|
2019-07-16 00:40:37 +03:00
|
|
|
# The prehistoric bash on Mac doesn't support @Q quoting.
|
|
|
|
# The consequences aren't that serious, unless there are odd arrangements of spaces.
|
|
|
|
if /usr/bin/env bash -c 'x=1;echo "${x@Q}"' >/dev/null 2>&1; then
|
|
|
|
Q() { echo "${@@Q}"; }
|
|
|
|
else
|
|
|
|
Q() { echo "$@"; }
|
|
|
|
fi
|
|
|
|
|
2016-10-25 21:38:17 +03:00
|
|
|
if [ -n "$CCC" ] && [ -z "$CXX" ]; then
|
|
|
|
export CXX="$CCC"
|
|
|
|
fi
|
|
|
|
|
2016-11-02 12:29:58 +03:00
|
|
|
opt_build=0
|
|
|
|
build_64=0
|
|
|
|
clean=0
|
|
|
|
rebuild_gyp=0
|
2017-01-21 16:23:56 +03:00
|
|
|
rebuild_nspr=0
|
Bug 1577822 - land NSS a3ee4f26b4c1 UPGRADE_NSS_RELEASE, r=kjacobs
2019-09-18 Kevin Jacobs <kjacobs@mozilla.com>
* cmd/lib/derprint.c:
Bug 1581024 - Check for pointer wrap in derprint.c. r=jcj
Check for pointer wrap on output-length check in the derdump
utility.
[a3ee4f26b4c1] [tip]
2019-09-18 Giulio Benetti <giulio.benetti@micronovasrl.com>
* lib/freebl/gcm-aarch64.c:
Bug 1580126 - Fix build failure on aarch64_be while building
freebl/gcm r=kjacobs
Build failure is caused by different #ifdef conditions in gcm.c and
gcm-aarch64.c that leads to double declaration of the same gcm_*
functions.
Fix #ifdef condition in gcm-aarch64.c making it the same as the one
in gcm.c.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
[fa0d958de0c3]
2019-09-17 Kai Engert <kaie@kuix.de>
* automation/taskcluster/graph/src/extend.js:
Bug 1385039 - Build NSPR tests as part of NSS continuous
integration. r=kjacobs
[cc97f1a93038]
2019-09-17 Landry Breuil <landry@openbsd.org>
* lib/freebl/Makefile:
Bug 1581391 - include gcm-aarch64 on all unices, not only linux
r=kjacobs
[e7b4f293fa4e]
2019-09-17 Martin Thomson <mt@lowentropy.net>
* mach:
Bug 1581041 - Rename mach-commands to mach-completion, r=jcj
This means that we can point our completion at the gecko one.
[bc91272fcbdc]
2019-09-16 Jenine <jenine_c@outlook.com>
* cmd/pk11importtest/pk11importtest.c, lib/softoken/pkcs11.c:
Bug 1558313 - Fix clang warnings in pk11importtest.c and pkcs11.c
r=marcusburghardt
[4569b745f74e]
2019-09-13 Daiki Ueno <dueno@redhat.com>
* lib/certhigh/certvfy.c:
Bug 1542207, fix policy check on signature algorithms, r=rrelyea
Reviewers: rrelyea
Reviewed By: rrelyea
Bug #: 1542207
[ed8a41d16c1c]
2019-09-05 Daiki Ueno <dueno@redhat.com>
* lib/freebl/drbg.c:
Bug 1560329, drbg: perform continuous test on entropy source,
r=rrelyea
Summary: FIPS 140-2 section 4.9.2 requires a conditional self test
to check that consecutive entropy blocks from the system are
different. As neither getentropy() nor /dev/urandom provides that
check on the output, this adds the self test at caller side.
Reviewers: rrelyea
Reviewed By: rrelyea
Bug #: 1560329
[c66dd879d16a]
2019-09-06 Martin Thomson <mt@lowentropy.net>
* automation/taskcluster/graph/src/queue.js:
Bug 1579290 - Disable LSAN during builds, r=ueno
Summary: See the bug description for details.
[f28f3d7b7cf0]
2019-09-13 Kai Engert <kaie@kuix.de>
* Makefile, build.sh, coreconf/nspr.sh, help.txt:
Bug 1385061 - Build NSPR tests with NSS make; Add gyp parameters to
build/run NSPR tests. r=jcj
[8b4a226f7d23]
2019-09-11 Kai Engert <kaie@kuix.de>
* nss.gyp:
Bug 1577359 - Build atob and btoa for Thunderbird. r=jcj
[1fe61aadaf57]
2019-09-10 Marcus Burghardt <mburghardt@mozilla.com>
* cmd/pk12util/pk12util.c:
Bug 1579036 - Define error when trying to export non-existent cert
with pk12util. r=jcj
[65ab97f03c89]
2019-09-04 Martin Thomson <mt@lowentropy.net>
* gtests/mozpkix_gtest/pkixder_input_tests.cpp:
Bug 1578626 - Remove undefined nullptr decrement, r=keeler
Summary: This uses uintptr_t to avoid the worst. It still looks
terrible and might trip static analysis warnings, but the
reinterpret_cast should hide that.
This assumes that sizeof(uintptr_t) == sizeof(void*), so I've added
an assertion so that we'll at least fail the test on those systems.
(We could use GTEST_SKIP instead, but we don't have that in the
version of gtest that we use.)
Reviewers: keeler
Tags: #secure-revision
Bug #: 1578626
[d2485b1c997e]
2019-09-05 Marcus Burghardt <mburghardt@mozilla.com>
* gtests/pk11_gtest/pk11_find_certs_unittest.cc:
Bug 1578751 - Ensure a consistent style for
pk11_find_certs_unittest.cc. r=jcj
Adjusted the style and clang-format after the changes in some var
names.
[e95fee7f59e5]
Differential Revision: https://phabricator.services.mozilla.com/D46246
--HG--
extra : moz-landing-system : lando
2019-09-18 06:27:20 +03:00
|
|
|
build_nspr_tests=0
|
|
|
|
run_nspr_tests=0
|
|
|
|
exit_after_nspr=0
|
2016-11-02 12:29:58 +03:00
|
|
|
target=Debug
|
2016-11-16 16:06:23 +03:00
|
|
|
verbose=0
|
2016-11-21 08:01:05 +03:00
|
|
|
fuzz=0
|
2017-01-21 16:23:56 +03:00
|
|
|
fuzz_tls=0
|
|
|
|
fuzz_oss=0
|
2017-03-08 10:40:46 +03:00
|
|
|
no_local_nspr=0
|
2019-05-29 18:52:05 +03:00
|
|
|
sslkeylogfile=1
|
2016-11-16 16:06:23 +03:00
|
|
|
|
2017-01-21 16:23:56 +03:00
|
|
|
gyp_params=(--depth="$cwd" --generator-output=".")
|
|
|
|
ninja_params=()
|
2016-11-02 12:29:58 +03:00
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Assume that the target architecture is the same as the host by default.
|
2019-07-16 00:40:37 +03:00
|
|
|
host_arch=$(python "$cwd/coreconf/detect_host_arch.py")
|
2018-10-16 07:00:24 +03:00
|
|
|
target_arch=$host_arch
|
|
|
|
|
|
|
|
# Assume that MSVC is wanted if this is running on windows.
|
|
|
|
platform=$(uname -s)
|
|
|
|
if [ "${platform%-*}" = "MINGW32_NT" -o "${platform%-*}" = "MINGW64_NT" ]; then
|
|
|
|
msvc=1
|
2016-11-02 12:29:58 +03:00
|
|
|
fi
|
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Parse command line arguments.
|
2019-07-16 00:40:37 +03:00
|
|
|
all_args=("$@")
|
2016-10-25 21:38:17 +03:00
|
|
|
while [ $# -gt 0 ]; do
|
2018-10-16 07:00:24 +03:00
|
|
|
case "$1" in
|
2019-07-16 00:40:37 +03:00
|
|
|
--rebuild)
|
|
|
|
if [[ ! -e "$argsfile" ]]; then
|
|
|
|
echo "Unable to rebuild" 1>&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
IFS=$'\r\n' GLOBIGNORE='*' command eval 'previous_args=($(<"$argsfile"))'
|
|
|
|
exec /usr/bin/env bash -c "$(Q "$0")"' "$@"' "$0" "${previous_args[@]}"
|
|
|
|
;;
|
2016-11-02 12:29:58 +03:00
|
|
|
-c) clean=1 ;;
|
2017-11-24 11:00:26 +03:00
|
|
|
-cc) clean_only=1 ;;
|
2018-10-16 06:42:22 +03:00
|
|
|
-v) ninja_params+=(-v); verbose=1 ;;
|
2018-10-16 07:00:24 +03:00
|
|
|
-j) ninja_params+=(-j "$2"); shift ;;
|
|
|
|
--gyp|-g) rebuild_gyp=1 ;;
|
|
|
|
--opt|-o) opt_build=1 ;;
|
|
|
|
-m32|--m32) target_arch=ia32; echo 'Warning: use -t instead of -m32' 1>&2 ;;
|
|
|
|
-t|--target) target_arch="$2"; shift ;;
|
|
|
|
--target=*) target_arch="${1#*=}" ;;
|
|
|
|
--clang) export CC=clang; export CCC=clang++; export CXX=clang++; msvc=0 ;;
|
|
|
|
--gcc) export CC=gcc; export CCC=g++; export CXX=g++; msvc=0 ;;
|
|
|
|
--msvc) msvc=1 ;;
|
2017-01-21 16:23:56 +03:00
|
|
|
--scan-build) enable_scanbuild ;;
|
|
|
|
--scan-build=?*) enable_scanbuild "${1#*=}" ;;
|
2018-10-16 07:00:24 +03:00
|
|
|
--disable-tests) gyp_params+=(-Ddisable_tests=1) ;;
|
|
|
|
--pprof) gyp_params+=(-Duse_pprof=1) ;;
|
2017-01-21 16:23:56 +03:00
|
|
|
--asan) enable_sanitizer asan ;;
|
|
|
|
--msan) enable_sanitizer msan ;;
|
|
|
|
--ubsan) enable_ubsan ;;
|
|
|
|
--ubsan=?*) enable_ubsan "${1#*=}" ;;
|
2018-10-16 07:00:24 +03:00
|
|
|
--fuzz) fuzz=1 ;;
|
|
|
|
--fuzz=oss) fuzz=1; fuzz_oss=1 ;;
|
|
|
|
--fuzz=tls) fuzz=1; fuzz_tls=1 ;;
|
2017-01-21 16:23:56 +03:00
|
|
|
--sancov) enable_sancov ;;
|
|
|
|
--sancov=?*) enable_sancov "${1#*=}" ;;
|
2018-01-23 13:48:27 +03:00
|
|
|
--emit-llvm) gyp_params+=(-Demit_llvm=1 -Dsign_libs=0) ;;
|
2017-01-21 16:23:56 +03:00
|
|
|
--no-zdefs) gyp_params+=(-Dno_zdefs=1) ;;
|
2019-05-01 22:07:31 +03:00
|
|
|
--static) gyp_params+=(-Dstatic_libs=1) ;;
|
2018-10-16 07:00:24 +03:00
|
|
|
--ct-verif) gyp_params+=(-Dct_verif=1) ;;
|
|
|
|
--nspr) nspr_clean; rebuild_nspr=1 ;;
|
Bug 1577822 - land NSS a3ee4f26b4c1 UPGRADE_NSS_RELEASE, r=kjacobs
2019-09-18 Kevin Jacobs <kjacobs@mozilla.com>
* cmd/lib/derprint.c:
Bug 1581024 - Check for pointer wrap in derprint.c. r=jcj
Check for pointer wrap on output-length check in the derdump
utility.
[a3ee4f26b4c1] [tip]
2019-09-18 Giulio Benetti <giulio.benetti@micronovasrl.com>
* lib/freebl/gcm-aarch64.c:
Bug 1580126 - Fix build failure on aarch64_be while building
freebl/gcm r=kjacobs
Build failure is caused by different #ifdef conditions in gcm.c and
gcm-aarch64.c that leads to double declaration of the same gcm_*
functions.
Fix #ifdef condition in gcm-aarch64.c making it the same as the one
in gcm.c.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
[fa0d958de0c3]
2019-09-17 Kai Engert <kaie@kuix.de>
* automation/taskcluster/graph/src/extend.js:
Bug 1385039 - Build NSPR tests as part of NSS continuous
integration. r=kjacobs
[cc97f1a93038]
2019-09-17 Landry Breuil <landry@openbsd.org>
* lib/freebl/Makefile:
Bug 1581391 - include gcm-aarch64 on all unices, not only linux
r=kjacobs
[e7b4f293fa4e]
2019-09-17 Martin Thomson <mt@lowentropy.net>
* mach:
Bug 1581041 - Rename mach-commands to mach-completion, r=jcj
This means that we can point our completion at the gecko one.
[bc91272fcbdc]
2019-09-16 Jenine <jenine_c@outlook.com>
* cmd/pk11importtest/pk11importtest.c, lib/softoken/pkcs11.c:
Bug 1558313 - Fix clang warnings in pk11importtest.c and pkcs11.c
r=marcusburghardt
[4569b745f74e]
2019-09-13 Daiki Ueno <dueno@redhat.com>
* lib/certhigh/certvfy.c:
Bug 1542207, fix policy check on signature algorithms, r=rrelyea
Reviewers: rrelyea
Reviewed By: rrelyea
Bug #: 1542207
[ed8a41d16c1c]
2019-09-05 Daiki Ueno <dueno@redhat.com>
* lib/freebl/drbg.c:
Bug 1560329, drbg: perform continuous test on entropy source,
r=rrelyea
Summary: FIPS 140-2 section 4.9.2 requires a conditional self test
to check that consecutive entropy blocks from the system are
different. As neither getentropy() nor /dev/urandom provides that
check on the output, this adds the self test at caller side.
Reviewers: rrelyea
Reviewed By: rrelyea
Bug #: 1560329
[c66dd879d16a]
2019-09-06 Martin Thomson <mt@lowentropy.net>
* automation/taskcluster/graph/src/queue.js:
Bug 1579290 - Disable LSAN during builds, r=ueno
Summary: See the bug description for details.
[f28f3d7b7cf0]
2019-09-13 Kai Engert <kaie@kuix.de>
* Makefile, build.sh, coreconf/nspr.sh, help.txt:
Bug 1385061 - Build NSPR tests with NSS make; Add gyp parameters to
build/run NSPR tests. r=jcj
[8b4a226f7d23]
2019-09-11 Kai Engert <kaie@kuix.de>
* nss.gyp:
Bug 1577359 - Build atob and btoa for Thunderbird. r=jcj
[1fe61aadaf57]
2019-09-10 Marcus Burghardt <mburghardt@mozilla.com>
* cmd/pk12util/pk12util.c:
Bug 1579036 - Define error when trying to export non-existent cert
with pk12util. r=jcj
[65ab97f03c89]
2019-09-04 Martin Thomson <mt@lowentropy.net>
* gtests/mozpkix_gtest/pkixder_input_tests.cpp:
Bug 1578626 - Remove undefined nullptr decrement, r=keeler
Summary: This uses uintptr_t to avoid the worst. It still looks
terrible and might trip static analysis warnings, but the
reinterpret_cast should hide that.
This assumes that sizeof(uintptr_t) == sizeof(void*), so I've added
an assertion so that we'll at least fail the test on those systems.
(We could use GTEST_SKIP instead, but we don't have that in the
version of gtest that we use.)
Reviewers: keeler
Tags: #secure-revision
Bug #: 1578626
[d2485b1c997e]
2019-09-05 Marcus Burghardt <mburghardt@mozilla.com>
* gtests/pk11_gtest/pk11_find_certs_unittest.cc:
Bug 1578751 - Ensure a consistent style for
pk11_find_certs_unittest.cc. r=jcj
Adjusted the style and clang-format after the changes in some var
names.
[e95fee7f59e5]
Differential Revision: https://phabricator.services.mozilla.com/D46246
--HG--
extra : moz-landing-system : lando
2019-09-18 06:27:20 +03:00
|
|
|
--nspr-test-build) build_nspr_tests=1 ;;
|
|
|
|
--nspr-test-run) run_nspr_tests=1 ;;
|
|
|
|
--nspr-only) exit_after_nspr=1 ;;
|
2017-03-08 10:40:46 +03:00
|
|
|
--with-nspr=?*) set_nspr_path "${1#*=}"; no_local_nspr=1 ;;
|
|
|
|
--system-nspr) set_nspr_path "/usr/include/nspr/:"; no_local_nspr=1 ;;
|
2018-10-16 07:00:24 +03:00
|
|
|
--system-sqlite) gyp_params+=(-Duse_system_sqlite=1) ;;
|
2018-10-16 06:42:22 +03:00
|
|
|
--enable-fips) gyp_params+=(-Ddisable_fips=0) ;;
|
2018-10-16 07:00:24 +03:00
|
|
|
--enable-libpkix) gyp_params+=(-Ddisable_libpkix=0) ;;
|
2018-10-01 17:44:32 +03:00
|
|
|
--mozpkix-only) gyp_params+=(-Dmozpkix_only=1 -Ddisable_tests=1 -Dsign_libs=0) ;;
|
2019-05-29 18:52:05 +03:00
|
|
|
--disable-keylog) sslkeylogfile=0 ;;
|
2019-07-16 00:40:37 +03:00
|
|
|
-D*) gyp_params+=("$1") ;;
|
2017-01-21 16:23:56 +03:00
|
|
|
*) show_help; exit 2 ;;
|
2016-10-25 21:38:17 +03:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
2016-10-15 09:45:05 +03:00
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Set the target architecture and build type.
|
|
|
|
gyp_params+=(-Dtarget_arch="$target_arch")
|
2017-01-21 16:23:56 +03:00
|
|
|
if [ "$opt_build" = 1 ]; then
|
2016-11-02 12:29:58 +03:00
|
|
|
target=Release
|
2016-10-25 21:38:17 +03:00
|
|
|
else
|
2016-11-02 12:29:58 +03:00
|
|
|
target=Debug
|
2016-10-15 09:45:05 +03:00
|
|
|
fi
|
2018-10-16 07:00:24 +03:00
|
|
|
|
2019-05-29 18:52:05 +03:00
|
|
|
gyp_params+=(-Denable_sslkeylogfile="$sslkeylogfile")
|
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Do special setup.
|
2017-01-21 16:23:56 +03:00
|
|
|
if [ "$fuzz" = 1 ]; then
|
2019-07-16 00:40:37 +03:00
|
|
|
source "$cwd/coreconf/fuzz.sh"
|
2017-01-21 16:23:56 +03:00
|
|
|
fi
|
2018-10-16 07:00:24 +03:00
|
|
|
nspr_set_flags $sanitizer_flags
|
|
|
|
if [ ! -z "$sanitizer_flags" ]; then
|
|
|
|
gyp_params+=(-Dsanitizer_flags="$sanitizer_flags")
|
|
|
|
fi
|
2016-11-16 16:06:23 +03:00
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
if [ "$msvc" = 1 ]; then
|
2019-07-16 00:40:37 +03:00
|
|
|
source "$cwd/coreconf/msvc.sh"
|
2018-10-16 07:00:24 +03:00
|
|
|
fi
|
|
|
|
|
2017-01-21 16:23:56 +03:00
|
|
|
# -c = clean first
|
2017-11-24 11:00:26 +03:00
|
|
|
if [ "$clean" = 1 -o "$clean_only" = 1 ]; then
|
2017-01-21 16:23:56 +03:00
|
|
|
nspr_clean
|
2019-07-16 00:40:37 +03:00
|
|
|
rm -rf "$cwd/out"
|
2017-01-21 16:23:56 +03:00
|
|
|
rm -rf "$dist_dir"
|
2017-11-24 11:00:26 +03:00
|
|
|
# -cc = only clean, don't build
|
|
|
|
if [ "$clean_only" = 1 ]; then
|
|
|
|
echo "Cleaned"
|
|
|
|
exit 0
|
|
|
|
fi
|
2017-01-21 16:23:56 +03:00
|
|
|
fi
|
2016-11-21 08:01:05 +03:00
|
|
|
|
2019-07-16 00:40:37 +03:00
|
|
|
# Setup build paths.
|
|
|
|
target_dir="$cwd/out/$target"
|
|
|
|
mkdir -p "$target_dir"
|
|
|
|
dist_dir=$(mkdir -p "$dist_dir"; cd "$dist_dir"; pwd -P)
|
|
|
|
gyp_params+=(-Dnss_dist_dir="$dist_dir")
|
|
|
|
|
2017-01-21 16:23:56 +03:00
|
|
|
# This saves a canonical representation of arguments that we are passing to gyp
|
|
|
|
# or the NSPR build so that we can work out if a rebuild is needed.
|
|
|
|
# Caveat: This can fail for arguments that are position-dependent.
|
|
|
|
# e.g., "-e 2 -f 1" and "-e 1 -f 2" canonicalize the same.
|
|
|
|
check_config()
|
|
|
|
{
|
|
|
|
local newconf="$1".new oldconf="$1"
|
|
|
|
shift
|
|
|
|
mkdir -p $(dirname "$newconf")
|
2019-07-16 00:40:37 +03:00
|
|
|
echo CC="$(Q "$CC")" >"$newconf"
|
|
|
|
echo CCC="$(Q "$CCC")" >>"$newconf"
|
|
|
|
echo CXX="$(Q "$CXX")" >>"$newconf"
|
|
|
|
echo target_arch="$(Q "$target_arch")" >>"$newconf"
|
|
|
|
for i in "$@"; do echo "$i"; done | sort >>"$newconf"
|
2017-01-21 16:23:56 +03:00
|
|
|
|
|
|
|
# Note: The following diff fails if $oldconf isn't there as well, which
|
|
|
|
# happens if we don't have a previous successful build.
|
|
|
|
! diff -q "$newconf" "$oldconf" >/dev/null 2>&1
|
|
|
|
}
|
2016-11-21 08:01:05 +03:00
|
|
|
|
2019-07-16 00:40:37 +03:00
|
|
|
gyp_config="$cwd/out/gyp_config"
|
|
|
|
nspr_config="$cwd/out/$target/nspr_config"
|
2016-11-21 08:01:05 +03:00
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Now check what needs to be rebuilt.
|
2017-01-21 16:23:56 +03:00
|
|
|
# If we don't have a build directory make sure that we rebuild.
|
|
|
|
if [ ! -d "$target_dir" ]; then
|
|
|
|
rebuild_nspr=1
|
2016-11-16 16:06:23 +03:00
|
|
|
rebuild_gyp=1
|
2019-07-16 00:40:37 +03:00
|
|
|
elif [ ! -d "$dist_dir/$target" ]; then
|
2017-01-21 16:23:56 +03:00
|
|
|
rebuild_nspr=1
|
2016-10-25 21:38:17 +03:00
|
|
|
fi
|
2016-11-07 08:01:08 +03:00
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
if check_config "$nspr_config" \
|
2019-07-16 00:40:37 +03:00
|
|
|
nspr_cflags="$(Q "$nspr_cflags")" \
|
|
|
|
nspr_cxxflags="$(Q "$nspr_cxxflags")" \
|
|
|
|
nspr_ldflags="$(Q "$nspr_ldflags")"; then
|
2017-01-21 16:23:56 +03:00
|
|
|
rebuild_nspr=1
|
|
|
|
fi
|
2017-01-19 12:08:33 +03:00
|
|
|
|
2019-07-16 00:40:37 +03:00
|
|
|
if check_config "$gyp_config" "$(Q "${gyp_params[@]}")"; then
|
2017-01-21 16:23:56 +03:00
|
|
|
rebuild_gyp=1
|
2016-11-07 08:01:08 +03:00
|
|
|
fi
|
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Save the chosen target.
|
2019-07-16 00:40:37 +03:00
|
|
|
echo "$target" > "$dist_dir/latest"
|
|
|
|
for i in "${all_args[@]}"; do echo "$i"; done > "$argsfile"
|
2016-11-16 16:06:23 +03:00
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# Build.
|
|
|
|
# NSPR.
|
2017-03-08 10:40:46 +03:00
|
|
|
if [[ "$rebuild_nspr" = 1 && "$no_local_nspr" = 0 ]]; then
|
2019-07-16 00:40:37 +03:00
|
|
|
nspr_clean
|
2018-10-16 07:00:24 +03:00
|
|
|
nspr_build
|
2019-07-16 00:40:37 +03:00
|
|
|
mv -f "$nspr_config.new" "$nspr_config"
|
2017-01-21 16:23:56 +03:00
|
|
|
fi
|
Bug 1577822 - land NSS a3ee4f26b4c1 UPGRADE_NSS_RELEASE, r=kjacobs
2019-09-18 Kevin Jacobs <kjacobs@mozilla.com>
* cmd/lib/derprint.c:
Bug 1581024 - Check for pointer wrap in derprint.c. r=jcj
Check for pointer wrap on output-length check in the derdump
utility.
[a3ee4f26b4c1] [tip]
2019-09-18 Giulio Benetti <giulio.benetti@micronovasrl.com>
* lib/freebl/gcm-aarch64.c:
Bug 1580126 - Fix build failure on aarch64_be while building
freebl/gcm r=kjacobs
Build failure is caused by different #ifdef conditions in gcm.c and
gcm-aarch64.c that leads to double declaration of the same gcm_*
functions.
Fix #ifdef condition in gcm-aarch64.c making it the same as the one
in gcm.c.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
[fa0d958de0c3]
2019-09-17 Kai Engert <kaie@kuix.de>
* automation/taskcluster/graph/src/extend.js:
Bug 1385039 - Build NSPR tests as part of NSS continuous
integration. r=kjacobs
[cc97f1a93038]
2019-09-17 Landry Breuil <landry@openbsd.org>
* lib/freebl/Makefile:
Bug 1581391 - include gcm-aarch64 on all unices, not only linux
r=kjacobs
[e7b4f293fa4e]
2019-09-17 Martin Thomson <mt@lowentropy.net>
* mach:
Bug 1581041 - Rename mach-commands to mach-completion, r=jcj
This means that we can point our completion at the gecko one.
[bc91272fcbdc]
2019-09-16 Jenine <jenine_c@outlook.com>
* cmd/pk11importtest/pk11importtest.c, lib/softoken/pkcs11.c:
Bug 1558313 - Fix clang warnings in pk11importtest.c and pkcs11.c
r=marcusburghardt
[4569b745f74e]
2019-09-13 Daiki Ueno <dueno@redhat.com>
* lib/certhigh/certvfy.c:
Bug 1542207, fix policy check on signature algorithms, r=rrelyea
Reviewers: rrelyea
Reviewed By: rrelyea
Bug #: 1542207
[ed8a41d16c1c]
2019-09-05 Daiki Ueno <dueno@redhat.com>
* lib/freebl/drbg.c:
Bug 1560329, drbg: perform continuous test on entropy source,
r=rrelyea
Summary: FIPS 140-2 section 4.9.2 requires a conditional self test
to check that consecutive entropy blocks from the system are
different. As neither getentropy() nor /dev/urandom provides that
check on the output, this adds the self test at caller side.
Reviewers: rrelyea
Reviewed By: rrelyea
Bug #: 1560329
[c66dd879d16a]
2019-09-06 Martin Thomson <mt@lowentropy.net>
* automation/taskcluster/graph/src/queue.js:
Bug 1579290 - Disable LSAN during builds, r=ueno
Summary: See the bug description for details.
[f28f3d7b7cf0]
2019-09-13 Kai Engert <kaie@kuix.de>
* Makefile, build.sh, coreconf/nspr.sh, help.txt:
Bug 1385061 - Build NSPR tests with NSS make; Add gyp parameters to
build/run NSPR tests. r=jcj
[8b4a226f7d23]
2019-09-11 Kai Engert <kaie@kuix.de>
* nss.gyp:
Bug 1577359 - Build atob and btoa for Thunderbird. r=jcj
[1fe61aadaf57]
2019-09-10 Marcus Burghardt <mburghardt@mozilla.com>
* cmd/pk12util/pk12util.c:
Bug 1579036 - Define error when trying to export non-existent cert
with pk12util. r=jcj
[65ab97f03c89]
2019-09-04 Martin Thomson <mt@lowentropy.net>
* gtests/mozpkix_gtest/pkixder_input_tests.cpp:
Bug 1578626 - Remove undefined nullptr decrement, r=keeler
Summary: This uses uintptr_t to avoid the worst. It still looks
terrible and might trip static analysis warnings, but the
reinterpret_cast should hide that.
This assumes that sizeof(uintptr_t) == sizeof(void*), so I've added
an assertion so that we'll at least fail the test on those systems.
(We could use GTEST_SKIP instead, but we don't have that in the
version of gtest that we use.)
Reviewers: keeler
Tags: #secure-revision
Bug #: 1578626
[d2485b1c997e]
2019-09-05 Marcus Burghardt <mburghardt@mozilla.com>
* gtests/pk11_gtest/pk11_find_certs_unittest.cc:
Bug 1578751 - Ensure a consistent style for
pk11_find_certs_unittest.cc. r=jcj
Adjusted the style and clang-format after the changes in some var
names.
[e95fee7f59e5]
Differential Revision: https://phabricator.services.mozilla.com/D46246
--HG--
extra : moz-landing-system : lando
2019-09-18 06:27:20 +03:00
|
|
|
|
|
|
|
if [ "$exit_after_nspr" = 1 ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# gyp.
|
2017-01-21 16:23:56 +03:00
|
|
|
if [ "$rebuild_gyp" = 1 ]; then
|
2019-07-16 00:40:37 +03:00
|
|
|
if ! hash "$GYP" 2> /dev/null; then
|
|
|
|
echo "Building NSS requires an installation of gyp: https://gyp.gsrc.io/" 1>&2
|
|
|
|
exit 3
|
2017-05-16 18:12:24 +03:00
|
|
|
fi
|
2017-01-21 16:23:56 +03:00
|
|
|
# These extra arguments aren't used in determining whether to rebuild.
|
2019-07-16 00:40:37 +03:00
|
|
|
obj_dir="$dist_dir/$target"
|
|
|
|
gyp_params+=(-Dnss_dist_obj_dir="$obj_dir")
|
2017-03-08 10:40:46 +03:00
|
|
|
if [ "$no_local_nspr" = 0 ]; then
|
|
|
|
set_nspr_path "$obj_dir/include/nspr:$obj_dir/lib"
|
|
|
|
fi
|
2016-10-25 21:38:17 +03:00
|
|
|
|
2019-07-16 00:40:37 +03:00
|
|
|
run_verbose run_scanbuild ${GYP} -f ninja "${gyp_params[@]}" "$cwd/nss.gyp"
|
2016-11-16 16:06:23 +03:00
|
|
|
|
2019-07-16 00:40:37 +03:00
|
|
|
mv -f "$gyp_config.new" "$gyp_config"
|
2016-10-15 09:45:05 +03:00
|
|
|
fi
|
|
|
|
|
2018-10-16 07:00:24 +03:00
|
|
|
# ninja.
|
|
|
|
if hash ninja-build 2>/dev/null; then
|
2018-10-16 06:42:22 +03:00
|
|
|
ninja=ninja-build
|
2018-10-16 07:00:24 +03:00
|
|
|
elif hash ninja 2>/dev/null; then
|
|
|
|
ninja=ninja
|
2016-10-25 21:38:17 +03:00
|
|
|
else
|
2019-07-16 00:40:37 +03:00
|
|
|
echo "Building NSS requires an installation of ninja: https://ninja-build.org/" 1>&2
|
|
|
|
exit 3
|
2016-10-25 21:38:17 +03:00
|
|
|
fi
|
2019-07-16 00:40:37 +03:00
|
|
|
run_scanbuild "$ninja" -C "$target_dir" "${ninja_params[@]}"
|