Commit a2ed19bc authored by Andrew Branson's avatar Andrew Branson

Merge branch 'jb36034' into 'master'

[build] Switch to internal sqlite for NSS, to avoid build problems. JB#36034

See merge request !10
parents c915719a 75003600
From 44c4c045cb725643b4fd4a4bd6c049a8797687b1 Mon, 4 Mar 2019 17:53:46 +0100
From: Andrew Branson <andrew.branson@jollamobile.com>
Date: Mon, 4 Mar 2019 16:17:04 +0100
Subject: [PATCH] Rename sqlite library to avoid clashing with system
diff --git a/nss/coreconf/config.gypi b/nss/coreconf/config.gypi
index 5813787..f1b79ba 100644
--- a/nss/coreconf/config.gypi
+++ b/nss/coreconf/config.gypi
@@ -81,7 +81,7 @@
'nspr_lib_dir%': '<(nspr_lib_dir)',
'nspr_include_dir%': '<(nspr_include_dir)',
'use_system_sqlite%': '<(use_system_sqlite)',
- 'sqlite_libs%': ['-lsqlite3'],
+ 'sqlite_libs%': ['-lnsssqlite3'],
'dll_prefix': '<(dll_prefix)',
'dll_suffix': '<(dll_suffix)',
'freebl_name': '<(freebl_name)',
diff --git a/nss/coreconf/location.mk b/nss/coreconf/location.mk
index b11558a..943122d 100644
--- a/nss/coreconf/location.mk
+++ b/nss/coreconf/location.mk
@@ -72,7 +72,7 @@
endif
ifndef SQLITE_LIB_NAME
- SQLITE_LIB_NAME = sqlite3
+ SQLITE_LIB_NAME = nsssqlite3
endif
MK_LOCATION = included
diff --git a/nss/lib/sqlite/manifest.mn b/nss/lib/sqlite/manifest.mn
index 022749b..b2b5191 100644
--- a/nss/lib/sqlite/manifest.mn
+++ b/nss/lib/sqlite/manifest.mn
@@ -6,7 +6,7 @@
MODULE = nss
-LIBRARY_NAME = sqlite
+LIBRARY_NAME = nsssqlite
LIBRARY_VERSION = 3
MAPFILE = $(OBJDIR)/sqlite.def
DEFINES += -DSQLITE_THREADSAFE=1
diff --git a/nss/lib/sqlite/nsssqlite.def b/nss/lib/sqlite/nsssqlite.def
new file mode 120000
index 0000000..f8cd2b2
--- /dev/null
+++ b/nss/lib/sqlite/nsssqlite.def
@@ -0,0 +1 @@
+sqlite.def
\ No newline at end of file
diff --git a/nss/lib/sqlite/sqlite.def b/nss/lib/sqlite/sqlite.def
index 00fa623..3de3051 100644
--- a/nss/lib/sqlite/sqlite.def
+++ b/nss/lib/sqlite/sqlite.def
@@ -17,7 +17,7 @@
;+# directives are hidden behind ";", ";+", and ";-"
;+SQLITE_3 {
;+ global:
-LIBRARY sqlite3 ;-
+LIBRARY nsssqlite3 ;-
EXPORTS ;-
sqlite3_aggregate_context;
sqlite3_aggregate_count;
diff --git a/nss/lib/sqlite/sqlite.gyp b/nss/lib/sqlite/sqlite.gyp
index 6969893..a4c7cad 100644
--- a/nss/lib/sqlite/sqlite.gyp
+++ b/nss/lib/sqlite/sqlite.gyp
@@ -27,7 +27,7 @@
]
},
{
- 'target_name': 'sqlite3',
+ 'target_name': 'nsssqlite3',
'type': 'shared_library',
'dependencies': [
'sqlite'
diff --git a/nss/nss.gyp b/nss/nss.gyp
index 3ec33fd..17ddb59 100644
--- a/nss/nss.gyp
+++ b/nss/nss.gyp
@@ -19,7 +19,7 @@
'dependencies': [
'lib/nss/nss.gyp:nss3',
'lib/smime/smime.gyp:smime3',
- 'lib/sqlite/sqlite.gyp:sqlite3',
+ 'lib/sqlite/sqlite.gyp:nsssqlite3',
'lib/ssl/ssl.gyp:ssl3',
'lib/util/util.gyp:nssutil3',
],
--- nss/lib/Makefile 2010/11/16 13:55:53 1.1
+++ nss/lib/Makefile 2010/11/16 13:57:29
@@ -62,11 +62,11 @@
ZLIB_SRCDIR = zlib # Add the zlib directory to DIRS.
endif
-ifndef MOZILLA_CLIENT
-ifndef NSS_USE_SYSTEM_SQLITE
-SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS.
-endif
-endif
+#ifndef MOZILLA_CLIENT
+#ifndef NSS_USE_SYSTEM_SQLITE
+#SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS.
+#endif
+#endif
ifndef MOZILLA_CLIENT
ifeq ($(OS_ARCH),Linux)
--- nss/lib/softoken/manifest.mn 2010/11/16 13:56:14 1.1
+++ nss/lib/softoken/manifest.mn 2010/11/16 13:58:24
@@ -47,9 +47,9 @@
DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\" -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\"
-ifdef SQLITE_INCLUDE_DIR
-INCLUDES += -I$(SQLITE_INCLUDE_DIR)
-endif
+#ifdef SQLITE_INCLUDE_DIR
+#INCLUDES += -I$(SQLITE_INCLUDE_DIR)
+#endif
EXPORTS = \
secmodt.h \
......@@ -25,7 +25,6 @@ Requires: nspr >= %{nspr_version}
Requires: nss-system-init
Requires: p11-kit-trust
BuildRequires: nspr-devel >= %{nspr_version}
BuildRequires: sqlite-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig
BuildRequires: gawk
......@@ -50,7 +49,6 @@ Source14: nss-pem-1.0.4.tar.xz
Source15: nss-pem.cmake
Source16: nss-prelink.conf
Patch1: nss-nolocalsql.patch
Patch2: add-relro-linker-option.patch
Patch3: renegotiate-transitional.patch
Patch8: nss-sysinit-userdb-first.patch
......@@ -73,6 +71,7 @@ Patch50: iquote.patch
# Local patch for TLS_ECDHE_{ECDSA|RSA}_WITH_3DES_EDE_CBC_SHA ciphers
Patch58: rhbz1185708-enable-ecc-3des-ciphers-by-default.patch
Patch62: nss-skip-util-gtest.patch
Patch63: Rename-sqlite-library-to-avoid-clashing-with-system.patch
%description
Network Security Services (NSS) is a set of libraries designed to
......@@ -169,7 +168,6 @@ PEM file reader for Network Security Services (NSS), implemented as a PKCS#11 mo
%setup -q -n %{name}-%{nss_archive_version}
%setup -q -T -D -n %{name}-%{nss_archive_version} -a 14
%patch1 -p0 -b .nolocalsql
%patch2 -p0 -b .relro
%patch3 -p0 -b .transitional
%patch8 -p0 -b .userdbfirst
......@@ -180,6 +178,7 @@ PEM file reader for Network Security Services (NSS), implemented as a PKCS#11 mo
pushd nss
%patch62 -p1 -b .skip_util_gtest
popd
%patch63 -p1 -b .rename_sqlite3
%build
......@@ -226,9 +225,6 @@ export NSPR_LIB_DIR
export NSSUTIL_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nss-util | sed 's/-I//'`
export NSSUTIL_LIB_DIR=%{_libdir}
NSS_USE_SYSTEM_SQLITE=1
export NSS_USE_SYSTEM_SQLITE
export NSS_ALLOW_SSLKEYLOGFILE=1
export NSS_DISABLE_GTESTS=1
......@@ -498,7 +494,7 @@ echo "test suite completed"
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/doc/nss-tools
# Copy the binary libraries we want
for file in libnss3.so libnsssysinit.so libsmime3.so libssl3.so libsoftokn3.so libsoftokn3.chk libnssdbm3.so libnssdbm3.chk libfreebl3.so libfreebl3.chk libfreeblpriv3.so libfreeblpriv3.chk libnssutil3.so
for file in libnss3.so libnsssysinit.so libsmime3.so libssl3.so libsoftokn3.so libsoftokn3.chk libnssdbm3.so libnssdbm3.chk libfreebl3.so libfreebl3.chk libfreeblpriv3.so libfreeblpriv3.chk libnsssqlite3.so libnssutil3.so
do
%{__install} -p -m 755 dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
done
......@@ -601,6 +597,7 @@ ln -s -f setup-nsssysinit.sh $RPM_BUILD_ROOT/%{_bindir}/setup-nsssysinit
%{_libdir}/libfreebl3.chk
%{_libdir}/libfreeblpriv3.so
%{_libdir}/libfreeblpriv3.chk
%{_libdir}/libnsssqlite3.so
%dir %{_sysconfdir}/pki/nssdb
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/cert8.db
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/pki/nssdb/key3.db
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment