nss: Upgrade to release 3.31.1 and update patches
This commit updates the NSS to release 3.31.1 and NSPR to 4.15. It also updates the external/nss/nss.patch and external/nss/nss-android.patch to incorporate the NSS source changes. Change-Id: Icdd933b67e717f8d91622cd5f6001e34e261b746 Reviewed-on: https://gerrit.libreoffice.org/41636 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
committed by
Michael Stahl
parent
8c21ecc8f5
commit
c6df07f905
@@ -166,8 +166,8 @@ export MYTHES_SHA256SUM := 1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
|
||||
export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
|
||||
export NEON_SHA256SUM := 00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd
|
||||
export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
|
||||
export NSS_SHA256SUM := 8cb8624147737d1b4587c50bf058afbb6effc0f3c205d69b5ef4077b3bfed0e4
|
||||
export NSS_TARBALL := nss-3.29.5-with-nspr-4.13.1.tar.gz
|
||||
export NSS_SHA256SUM := 571ef672468d92808d5a4cd15ee17f914720fbe377eb40fe18e8b9a4f3da24ee
|
||||
export NSS_TARBALL := nss-3.31.1-with-nspr-4.15.tar.gz
|
||||
export ODFGEN_SHA256SUM := 2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
|
||||
export ODFGEN_VERSION_MICRO := 6
|
||||
export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
|
||||
|
89
external/nss/nss-android.patch
vendored
89
external/nss/nss-android.patch
vendored
@@ -159,92 +159,3 @@
|
||||
# -Wno-parentheses-equality : because clang warns about macro expansions
|
||||
WARNING_CFLAGS += $(call disable_warning,parentheses-equality)
|
||||
ifdef BUILD_OPT
|
||||
--- a/nss.org/nss/lib/freebl/unix_rand.c 2017-08-14 18:58:33.632405656 +0530
|
||||
+++ b/nss/nss/lib/freebl/unix_rand.c 2017-08-14 18:59:34.319025410 +0530
|
||||
@@ -682,6 +682,7 @@ RNG_GetNoise(void *buf, size_t maxbytes)
|
||||
return n;
|
||||
}
|
||||
|
||||
+#ifndef __ANDROID__
|
||||
#define SAFE_POPEN_MAXARGS 10 /* must be at least 2 */
|
||||
|
||||
/*
|
||||
@@ -809,6 +810,7 @@ safe_pclose(FILE *fp)
|
||||
|
||||
return status;
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef DARWIN
|
||||
#include <TargetConditionals.h>
|
||||
@@ -820,12 +822,16 @@ safe_pclose(FILE *fp)
|
||||
/* Fork netstat to collect its output by default. Do not unset this unless
|
||||
* another source of entropy is available
|
||||
*/
|
||||
+#ifndef __ANDROID__
|
||||
#define DO_NETSTAT 1
|
||||
+#endif
|
||||
|
||||
void
|
||||
RNG_SystemInfoForRNG(void)
|
||||
{
|
||||
+ #ifndef __ANDROID__
|
||||
FILE *fp;
|
||||
+ #endif
|
||||
char buf[BUFSIZ];
|
||||
size_t bytes;
|
||||
const char *const *cp;
|
||||
@@ -860,11 +866,13 @@ RNG_SystemInfoForRNG(void)
|
||||
};
|
||||
#endif
|
||||
|
||||
+#ifndef __ANDROID__
|
||||
#if defined(BSDI)
|
||||
static char netstat_ni_cmd[] = "netstat -nis";
|
||||
#else
|
||||
static char netstat_ni_cmd[] = "netstat -ni";
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
GiveSystemInfo();
|
||||
|
||||
@@ -890,7 +898,10 @@ RNG_SystemInfoForRNG(void)
|
||||
if (gethostname(buf, sizeof(buf)) == 0) {
|
||||
RNG_RandomUpdate(buf, strlen(buf));
|
||||
}
|
||||
+
|
||||
+ #ifndef __ANDROID__
|
||||
GiveSystemInfo();
|
||||
+ #endif
|
||||
|
||||
/* grab some data from system's PRNG before any other files. */
|
||||
bytes = RNG_FileUpdate("/dev/urandom", SYSTEM_RNG_SEED_COUNT);
|
||||
@@ -939,8 +950,10 @@ RNG_SystemInfoForRNG(void)
|
||||
* and for Solaris 8 we have the libkstat interface, so we don't need to
|
||||
* fork netstat.
|
||||
*/
|
||||
-
|
||||
+#ifndef __ANDROID__
|
||||
#undef DO_NETSTAT
|
||||
+#endif
|
||||
+
|
||||
if (!bytes) {
|
||||
/* On Solaris 8, /dev/urandom isn't available, so we use libkstat. */
|
||||
PRUint32 kstat_bytes = 0;
|
||||
@@ -952,6 +965,7 @@ RNG_SystemInfoForRNG(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef __ANDROID__
|
||||
#ifdef DO_NETSTAT
|
||||
fp = safe_popen(netstat_ni_cmd);
|
||||
if (fp != NULL) {
|
||||
@@ -960,6 +974,7 @@ RNG_SystemInfoForRNG(void)
|
||||
safe_pclose(fp);
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
#define TOTAL_FILE_LIMIT 1000000 /* one million */
|
||||
|
116
external/nss/nss.patch
vendored
116
external/nss/nss.patch
vendored
@@ -1,5 +1,16 @@
|
||||
--- a/nss.orig/nspr/pr/src/misc/prnetdb.c 2016-02-12 14:51:25.000000000 +0100
|
||||
+++ b/nss/nspr/pr/src/misc/prnetdb.c 2016-03-04 19:23:00.462892600 +0100
|
||||
--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
|
||||
+++ b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
|
||||
@@ -7034,7 +7034,7 @@
|
||||
PR_MD_CSRCS=linux.c
|
||||
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
||||
DSO_CFLAGS=-fPIC
|
||||
- DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
|
||||
+ DSO_LDOPTS='-shared -Wl,-z,origin -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)'
|
||||
_OPTIMIZE_FLAGS=-O2
|
||||
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
|
||||
# combo is not yet good at debugging inlined
|
||||
--- a/nss.orig/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:44:13.690045031 +0530
|
||||
+++ b/nss/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:47:03.810814019 +0530
|
||||
@@ -438,7 +438,7 @@
|
||||
char *buf = *bufp;
|
||||
PRIntn buflen = *buflenp;
|
||||
@@ -9,21 +20,8 @@
|
||||
PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
|
||||
if (buflen < skip) {
|
||||
return 0;
|
||||
diff -ru a/nspr/configure b/nspr/configure
|
||||
--- a/a/nspr/configure 2014-09-29 16:46:38.427423757 +0100
|
||||
+++ b/b/nspr/configure 2014-09-29 16:47:42.984012225 +0100
|
||||
@@ -7018,7 +7018,7 @@
|
||||
PR_MD_CSRCS=linux.c
|
||||
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
||||
DSO_CFLAGS=-fPIC
|
||||
- DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
|
||||
+ DSO_LDOPTS='-shared -Wl,-z,origin -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)'
|
||||
_OPTIMIZE_FLAGS=-O2
|
||||
_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that
|
||||
# combo is not yet good at debugging inlined
|
||||
diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
|
||||
--- a/a/nss/cmd/platlibs.mk 2014-09-29 16:46:38.306422654 +0100
|
||||
+++ b/b/nss/cmd/platlibs.mk 2014-09-29 16:47:42.987012253 +0100
|
||||
--- a/a/nss/cmd/platlibs.mk 2017-08-29 23:44:13.554044416 +0530
|
||||
+++ b/b/nss/cmd/platlibs.mk 2017-08-29 23:46:09.638569150 +0530
|
||||
@@ -10,17 +10,22 @@
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
@@ -51,10 +49,9 @@ diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
diff -ru nss.orig/nss/coreconf/arch.mk nss/nss/coreconf/arch.mk
|
||||
--- a/nss.orig/nss/coreconf/arch.mk 2016-02-12 15:36:18.000000000 +0100
|
||||
+++ b/nss/nss/coreconf/arch.mk 2016-02-23 20:48:31.595941079 +0100
|
||||
@@ -280,11 +280,17 @@
|
||||
--- a/nss.org/nss/coreconf/arch.mk 2017-08-29 23:44:13.646044832 +0530
|
||||
+++ b/nss/nss/coreconf/arch.mk 2017-08-29 23:45:51.494487134 +0530
|
||||
@@ -305,11 +305,17 @@
|
||||
OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
|
||||
endif
|
||||
OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
|
||||
@@ -74,9 +71,8 @@ diff -ru nss.orig/nss/coreconf/arch.mk nss/nss/coreconf/arch.mk
|
||||
#
|
||||
# Define USE_DEBUG_RTL if you want to use the debug runtime library
|
||||
# (RTL) in the debug build
|
||||
diff -ru a/nss/coreconf/FreeBSD.mk b/nss/coreconf/FreeBSD.mk
|
||||
--- a/a/nss/coreconf/FreeBSD.mk 2014-09-29 16:46:38.189421588 +0100
|
||||
+++ b/b/nss/coreconf/FreeBSD.mk 2014-09-29 16:47:42.984012225 +0100
|
||||
--- a/nss.org/nss/coreconf/FreeBSD.mk 2017-08-29 23:44:13.642044814 +0530
|
||||
+++ b/nss/nss/coreconf/FreeBSD.mk 2017-08-29 23:45:20.850348615 +0530
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
@@ -85,19 +81,18 @@ diff -ru a/nss/coreconf/FreeBSD.mk b/nss/coreconf/FreeBSD.mk
|
||||
|
||||
#
|
||||
# The default implementation strategy for FreeBSD is pthreads.
|
||||
diff -ru a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
|
||||
--- a/a/nss/coreconf/Linux.mk 2014-09-29 16:46:38.189421588 +0100
|
||||
+++ b/b/nss/coreconf/Linux.mk 2014-09-29 16:47:42.985012235 +0100
|
||||
@@ -157,7 +160,7 @@
|
||||
--- a/nss.org/nss/coreconf/Linux.mk 2017-08-29 23:44:13.642044814 +0530
|
||||
+++ b/nss/nss/coreconf/Linux.mk 2017-08-29 23:47:26.318915759 +0530
|
||||
@@ -147,7 +147,7 @@
|
||||
# Also, -z defs conflicts with Address Sanitizer, which emits relocations
|
||||
# against the libsanitizer runtime built into the main executable.
|
||||
ZDEFS_FLAG = -Wl,-z,defs
|
||||
ifneq ($(USE_ASAN),1)
|
||||
-DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
|
||||
+DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
|
||||
endif
|
||||
LDFLAGS += $(ARCHFLAG)
|
||||
+DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
|
||||
LDFLAGS += $(ARCHFLAG) -z noexecstack
|
||||
|
||||
@@ -189,8 +192,13 @@
|
||||
# On Maemo, we need to use the -rpath-link flag for even the standard system
|
||||
@@ -177,8 +177,13 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -111,9 +106,8 @@ diff -ru a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
|
||||
|
||||
# The -rpath '$$ORIGIN' linker option instructs this library to search for its
|
||||
# dependencies in the same directory where it resides.
|
||||
diff -ru a/nss/coreconf/rules.mk b/nss/coreconf/rules.mk
|
||||
--- a/a/nss/coreconf/rules.mk 2014-09-29 16:46:38.188421578 +0100
|
||||
+++ b/b/nss/coreconf/rules.mk 2014-09-29 16:47:42.986012244 +0100
|
||||
--- a/nss.org/nss/coreconf/rules.mk 2017-08-29 23:44:13.646044832 +0530
|
||||
+++ b/nss/nss/coreconf/rules.mk 2017-08-29 23:47:37.442966042 +0530
|
||||
@@ -261,7 +261,7 @@
|
||||
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
|
||||
$(AR) $(subst /,\\,$(OBJS))
|
||||
@@ -123,34 +117,43 @@ diff -ru a/nss/coreconf/rules.mk b/nss/coreconf/rules.mk
|
||||
endif
|
||||
$(RANLIB) $@
|
||||
|
||||
diff -ru a/nss/coreconf/SunOS5.mk b/nss/coreconf/SunOS5.mk
|
||||
--- a/a/nss/coreconf/SunOS5.mk 2014-09-29 16:46:38.175421471 +0100
|
||||
+++ b/b/nss/coreconf/SunOS5.mk 2014-09-29 16:47:42.985012235 +0100
|
||||
@@ -48,8 +48,12 @@
|
||||
--- a/nss.org/nss/coreconf/SunOS5.mk 2017-08-29 23:44:13.646044832 +0530
|
||||
+++ b/nss/nss/coreconf/SunOS5.mk 2017-08-29 23:45:00.902258445 +0530
|
||||
@@ -48,8 +48,11 @@
|
||||
# OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
|
||||
endif
|
||||
else
|
||||
- CC = cc
|
||||
- CCC = CC
|
||||
+# CC is taken from environment automatically.
|
||||
+# CC = cc
|
||||
+# Use CXX from environment.
|
||||
+# CCC = CC
|
||||
+ CCC = $(CXX)
|
||||
+
|
||||
+ # CC is taken from environment automatically.
|
||||
+ # CC = cc
|
||||
+ # Use CXX from environment.
|
||||
+ # CCC = CC
|
||||
+ CCC = $(CXX)
|
||||
ASFLAGS += -Wa,-P
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
|
||||
ifndef BUILD_OPT
|
||||
diff -ru a/nss/Makefile b/nss/Makefile
|
||||
--- a/a/nss/Makefile 2014-09-29 16:46:38.171421425 +0100
|
||||
+++ b/b/nss/Makefile 2014-09-29 16:47:42.987012253 +0100
|
||||
--- a/nss.org/nss/coreconf/Werror.mk 2017-08-29 23:44:13.646044832 +0530
|
||||
+++ b/nss/nss/coreconf/Werror.mk 2017-08-29 23:44:23.994091608 +0530
|
||||
@@ -94,7 +94,8 @@
|
||||
endif #ndef NSS_ENABLE_WERROR
|
||||
|
||||
ifeq ($(NSS_ENABLE_WERROR),1)
|
||||
- WARNING_CFLAGS += -Werror
|
||||
+ # We do not treat warnings as errors.
|
||||
+ # WARNING_CFLAGS += -Werror
|
||||
else
|
||||
# Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
|
||||
# Use this to disable use of that #pragma and the warnings it suppresses.
|
||||
--- a/nss.org/nss/Makefile 2017-08-29 23:44:13.402043729 +0530
|
||||
+++ b/nss/nss/Makefile 2017-08-29 23:44:39.774162939 +0530
|
||||
@@ -1,3 +1,5 @@
|
||||
+export AR
|
||||
+export RANLIB
|
||||
#! gmake
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
@@ -91,10 +91,10 @@
|
||||
@@ -89,10 +91,10 @@
|
||||
NSPR_CONFIGURE_ENV = CC=gcc CXX=g++
|
||||
endif
|
||||
ifdef CC
|
||||
@@ -163,16 +166,3 @@ diff -ru a/nss/Makefile b/nss/Makefile
|
||||
endif
|
||||
# Remove -arch definitions. NSPR can't handle that.
|
||||
NSPR_CONFIGURE_ENV := $(filter-out -arch x86_64,$(NSPR_CONFIGURE_ENV))
|
||||
diff -ru nss.orig/nss/coreconf/Werror.mk nss/nss/coreconf/Werror.mk
|
||||
--- a/nss.orig/nss/coreconf/Werror.mk 2016-02-12 15:36:18.000000000 +0100
|
||||
+++ b/nss/nss/coreconf/Werror.mk 2016-02-23 23:58:15.119584046 +0100
|
||||
@@ -94,7 +94,8 @@
|
||||
endif #ndef NSS_ENABLE_WERROR
|
||||
|
||||
ifeq ($(NSS_ENABLE_WERROR),1)
|
||||
- WARNING_CFLAGS += -Werror
|
||||
+# We do not treat warnings as errors.
|
||||
+# WARNING_CFLAGS += -Werror
|
||||
else
|
||||
# Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
|
||||
# Use this to disable use of that #pragma and the warnings it suppresses.
|
||||
|
Reference in New Issue
Block a user