nss: bump version

This commit is contained in:
Jerome Duval
2021-04-01 11:41:56 +02:00
parent c8e472d9cf
commit 9fd876cfa4
4 changed files with 1 additions and 515 deletions

View File

@@ -12,7 +12,7 @@ LICENSE="GNU GPL v2
REVISION="1"
NSS_VERSION=`echo $portVersion | sed 's/\./_/g'`
SOURCE_URI="https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_${NSS_VERSION}_RTM/src/nss-$portVersion.tar.gz"
CHECKSUM_SHA256="86d6df7cece25b8d4efa53e4c19af903c484eb79871163f37b5232bb406a5478"
CHECKSUM_SHA256="182d2fef629102ae9423aabf2c192242b565cf5098e82c5a26cf70c5e4ea2221"
SOURCE_DIR="nss-$portVersion/nss"
PATCHES="nss-$portVersion.patchset"

View File

@@ -1,210 +0,0 @@
SUMMARY="Mozilla's library that implements PKI support"
DESCRIPTION="Network Security Services (NSS) is a set of libraries designed \
to support cross-platform development of security-enabled client and server \
applications. Applications built with NSS can support SSL v2 and v3, TLS, \
PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and \
other security standards."
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
COPYRIGHT="Mozilla Foundation"
LICENSE="GNU GPL v2
GNU LGPL v2.1
MPL v2.0"
REVISION="1"
gitCommit="e2023b9800089e77edbbf9ca3c86f9f0e4a83f73"
SOURCE_URI="https://github.com/nss-dev/nss/archive/$gitCommit.tar.gz"
CHECKSUM_SHA256="89dd5ff1115b4d34a7594b636a14ddcda5d5cc7c086ceffb44b7cf30722fe0d4"
SOURCE_DIR="nss-$gitCommit"
PATCHES="nss-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
nss$secondaryArchSuffix = $portVersion compat >= 3
cmd:addbuiltin$secondaryArchSuffix = $portVersion compat >= 3
cmd:atob$secondaryArchSuffix = $portVersion compat >= 3
cmd:baddbdir$secondaryArchSuffix = $portVersion compat >= 3
cmd:bltest$secondaryArchSuffix = $portVersion compat >= 3
cmd:btoa$secondaryArchSuffix = $portVersion compat >= 3
cmd:certcgi$secondaryArchSuffix = $portVersion compat >= 3
cmd:certutil$secondaryArchSuffix = $portVersion compat >= 3
cmd:checkcert$secondaryArchSuffix = $portVersion compat >= 3
cmd:chktest$secondaryArchSuffix = $portVersion compat >= 3
cmd:cmsutil$secondaryArchSuffix = $portVersion compat >= 3
cmd:conflict$secondaryArchSuffix = $portVersion compat >= 3
cmd:crlutil$secondaryArchSuffix = $portVersion compat >= 3
cmd:crmftest$secondaryArchSuffix = $portVersion compat >= 3
cmd:dbtest$secondaryArchSuffix = $portVersion compat >= 3
cmd:derdump$secondaryArchSuffix = $portVersion compat >= 3
cmd:dertimetest$secondaryArchSuffix = $portVersion compat >= 3
cmd:digest$secondaryArchSuffix = $portVersion compat >= 3
cmd:ecperf$secondaryArchSuffix = $portVersion compat >= 3
cmd:encodeinttest$secondaryArchSuffix = $portVersion compat >= 3
cmd:fbectest$secondaryArchSuffix = $portVersion compat >= 3
cmd:fipstest$secondaryArchSuffix = $portVersion compat >= 3
cmd:httpserv$secondaryArchSuffix = $portVersion compat >= 3
cmd:listsuites$secondaryArchSuffix = $portVersion compat >= 3
cmd:makepqg$secondaryArchSuffix = $portVersion compat >= 3
cmd:mangle$secondaryArchSuffix = $portVersion compat >= 3
cmd:modutil$secondaryArchSuffix = $portVersion compat >= 3
cmd:multinit$secondaryArchSuffix = $portVersion compat >= 3
cmd:nonspr10$secondaryArchSuffix = $portVersion compat >= 3
cmd:nss_policy_check$secondaryArchSuffix = $portVersion compat >= 3
cmd:ocspclnt$secondaryArchSuffix = $portVersion compat >= 3
cmd:ocspresp$secondaryArchSuffix = $portVersion compat >= 3
cmd:oidcalc$secondaryArchSuffix = $portVersion compat >= 3
cmd:p7content$secondaryArchSuffix = $portVersion compat >= 3
cmd:p7env$secondaryArchSuffix = $portVersion compat >= 3
cmd:p7sign$secondaryArchSuffix = $portVersion compat >= 3
cmd:p7verify$secondaryArchSuffix = $portVersion compat >= 3
cmd:pk11ectest$secondaryArchSuffix = $portVersion compat >= 3
cmd:pk11gcmtest$secondaryArchSuffix = $portVersion compat >= 3
cmd:pk11importtest$secondaryArchSuffix = $portVersion compat >= 3
cmd:pk11mode$secondaryArchSuffix = $portVersion compat >= 3
cmd:pk12util$secondaryArchSuffix = $portVersion compat >= 3
cmd:pk1sign$secondaryArchSuffix = $portVersion compat >= 3
cmd:pkix_errcodes$secondaryArchSuffix = $portVersion compat >= 3
cmd:pp$secondaryArchSuffix = $portVersion compat >= 3
cmd:pwdecrypt$secondaryArchSuffix = $portVersion compat >= 3
cmd:remtest$secondaryArchSuffix = $portVersion compat >= 3
cmd:rsaperf$secondaryArchSuffix = $portVersion compat >= 3
cmd:rsapoptst$secondaryArchSuffix = $portVersion compat >= 3
cmd:sdrtest$secondaryArchSuffix = $portVersion compat >= 3
cmd:secmodtest$secondaryArchSuffix = $portVersion compat >= 3
cmd:selfserv$secondaryArchSuffix = $portVersion compat >= 3
cmd:shlibsign$secondaryArchSuffix = $portVersion compat >= 3
cmd:signtool$secondaryArchSuffix = $portVersion compat >= 3
cmd:signver$secondaryArchSuffix = $portVersion compat >= 3
cmd:ssltap$secondaryArchSuffix = $portVersion compat >= 3
cmd:strsclnt$secondaryArchSuffix = $portVersion compat >= 3
cmd:symkeyutil$secondaryArchSuffix = $portVersion compat >= 3
cmd:tstclnt$secondaryArchSuffix = $portVersion compat >= 3
cmd:vfychain$secondaryArchSuffix = $portVersion compat >= 3
cmd:vfyserv$secondaryArchSuffix = $portVersion compat >= 3
lib:libfreebl3$secondaryArchSuffix = $portVersion compat >= 3
lib:libnss3$secondaryArchSuffix = $portVersion compat >= 3
lib:libnssckbi$secondaryArchSuffix = $portVersion compat >= 3
lib:libnssckbi_testlib$secondaryArchSuffix = $portVersion compat >= 3
lib:libnssdbm3$secondaryArchSuffix = $portVersion compat >= 3
lib:libnssutil3$secondaryArchSuffix = $portVersion compat >= 3
lib:libsmime3$secondaryArchSuffix = $portVersion compat >= 3
lib:libsoftokn3$secondaryArchSuffix = $portVersion compat >= 3
lib:libssl3$secondaryArchSuffix = $portVersion compat >= 3
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libnspr4$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
nss${secondaryArchSuffix}_devel = $portVersion compat >= 3
devel:libfreebl3$secondaryArchSuffix = $portVersion compat >= 3
devel:libnss3$secondaryArchSuffix = $portVersion compat >= 3
devel:libnssckbi$secondaryArchSuffix = $portVersion compat >= 3
devel:libnssckbi_testlib$secondaryArchSuffix = $portVersion compat >= 3
devel:libnssdbm3$secondaryArchSuffix = $portVersion compat >= 3
devel:libnssutil3$secondaryArchSuffix = $portVersion compat >= 3
devel:libsmime3$secondaryArchSuffix = $portVersion compat >= 3
devel:libsoftokn3$secondaryArchSuffix = $portVersion compat >= 3
devel:libssl3$secondaryArchSuffix = $portVersion compat >= 3
"
REQUIRES_devel="
nss$secondaryArchSuffix == $portVersion base
devel:libnspr4$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libnspr4$secondaryArchSuffix >= 4.12
devel:libsqlite3$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
TEST_REQUIRES="
cmd:find
"
BUILD()
{
# FIXME: $secondaryArchSuffix is wrong here (_arch). What should be used?
myCPPFLAGS="${CPPFLAGS} `pkg-config nspr --cflags`"
myLDFLAGS="${LDFLAGS} `pkg-config nspr --libs-only-L`"
# export BUILD_OPT=1
export NSDISTMODE=copy
export FREEBL_NO_DEPEND=1
export NSS_ALLOW_SSLKEYLOGFILE=1
export NSS_ENABLE_WERROR=0
export ASFLAGS=""
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
export USE_64=1
fi
for d in . lib/dbm ; do
CPPFLAGS="${myCPPFLAGS}"
LDFLAGS="${myLDFLAGS}"
make -j1 -C ${d}
done
}
INSTALL()
{
# files are in /sources/dist
mkdir -p $includeDir $binDir
mkdir -p $(dirname $libDir)
cp ../dist/*/bin/* $binDir
cp -r ../dist/*/lib $libDir
cp -r ../dist/public/nss $includeDir
# strip debug info
strip $binDir/*
strip $libDir/*
# set up the develop directory correctly
prepareInstalledDevelLibs libnss3 libfreebl3 libnssckbi libnssdbm3 \
libnssutil3 libsmime3 libsoftokn3 libssl3
mkdir -p $developLibDir/pkgconfig
cat > $developLibDir/pkgconfig/nss.pc << EOF
prefix=${prefix}
exec_prefix=${prefix}
libdir=${libDir}
includedir=${includeDir}
Name: NSS
Description: Network Security Services
Version: $portVersion
Requires: nspr
Libs: -L${developLibDir} -lssl3 -lsmime3 -lnss3 -lnssutil3
Cflags: -I${includeDir}/nss
EOF
# devel package
packageEntries devel \
$developDir
rm $libDir/*.a
}
TEST()
{
cd ../dist/*/lib
export LIBRARY_PATH=$LIBRARY_PATH:$PWD
echo "host localhost and domain localdomain must exist!"
cd -
cd tests
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
export USE_64=1
fi
HOST=localhost DOMSUF=localdomain ./all.sh
}

View File

@@ -1,304 +0,0 @@
From 996f779dbd7c54c188b84b1f7bbdeebc029bc2d5 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Sat, 5 Jul 2014 02:12:23 +0200
Subject: Haiku support
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index 750696d..b53cfea 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -7,7 +7,7 @@ include $(CORE_DEPTH)/coreconf/UNIX.mk
XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS)
-USE_PTHREADS =
+USE_PTHREADS = 1
ifeq ($(USE_PTHREADS),1)
IMPL_STRATEGY = _PTH
@@ -27,7 +27,7 @@ else
CPU_ARCH = x86
endif
-MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
ifdef BUILD_OPT
OPTIMIZER = -O2
endif
diff --git a/coreconf/arch.mk b/coreconf/arch.mk
index 2012d18..9beb71e 100644
--- a/coreconf/arch.mk
+++ b/coreconf/arch.mk
@@ -33,6 +33,14 @@ else
OS_RELEASE := $(shell uname -r)
endif
+#
+# Force the Haiku machines to use BeOS.
+#
+
+ifeq ($(OS_ARCH),Haiku)
+ OS_ARCH = BeOS
+endif
+
#
# Force the IRIX64 machines to use IRIX.
#
diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h
index e961dd1..58a6481 100644
--- a/lib/dbm/include/mcom_db.h
+++ b/lib/dbm/include/mcom_db.h
@@ -60,7 +60,7 @@ typedef PRUint32 uint32;
#include <sys/byteorder.h>
#endif
-#if defined(__linux) || defined(__BEOS__)
+#if defined(__linux) || defined(BEOS)
#include <endian.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER __BYTE_ORDER
--
2.30.0
From 04075f6fe0fce5972d73d642562bb97dcfc6d73b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Sep 2014 13:09:35 +0000
Subject: define RTLD_NOLOAD
diff --git a/lib/freebl/stubs.c b/lib/freebl/stubs.c
index c42f694..edee40a 100644
--- a/lib/freebl/stubs.c
+++ b/lib/freebl/stubs.c
@@ -718,6 +718,10 @@ freebl_InitNSSUtil(void *lib)
return SECSuccess;
}
+#ifndef RTLD_NOLOAD
+ #define RTLD_NOLOAD 0
+#endif
+
/*
* fetch the library if it's loaded. For NSS it should already be loaded
*/
--
2.30.0
From 8a0e3c98cc214ce0b85ae875de611c64f19340d8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Sep 2014 13:40:13 +0000
Subject: skip optionally the signing part
diff --git a/cmd/shlibsign/Makefile b/cmd/shlibsign/Makefile
index a119205..9e38c1c 100644
--- a/cmd/shlibsign/Makefile
+++ b/cmd/shlibsign/Makefile
@@ -95,7 +95,9 @@ else
endif
endif
+ifndef SKIP_SHLIBSIGN
libs: install
+endif
ifdef CHECKLOC
$(MAKE) $(CHECKLOC)
endif
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index b53cfea..51fe162 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -45,3 +45,5 @@ ARCH = beos
DSO_CFLAGS = -fPIC
DSO_LDOPTS =
+
+SKIP_SHLIBSIGN=1
--
2.30.0
From 60187d9ed0b1f38c6035d587304a0bae870c84a8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 25 Sep 2014 14:14:26 +0000
Subject: use system libs
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index 51fe162..fe54580 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -47,3 +47,6 @@ DSO_CFLAGS = -fPIC
DSO_LDOPTS =
SKIP_SHLIBSIGN=1
+USE_SYSTEM_ZLIB = 1
+ZLIB_LIBS = -lz
+NSS_USE_SYSTEM_SQLITE=1
--
2.30.0
From a9e55db3e59ac5a41e390d2eaea0ff10ac289de0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 24 Nov 2015 19:12:08 +0000
Subject: avoid some tests.
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index fe54580..3bc0ce3 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -50,3 +50,4 @@ SKIP_SHLIBSIGN=1
USE_SYSTEM_ZLIB = 1
ZLIB_LIBS = -lz
NSS_USE_SYSTEM_SQLITE=1
+NSS_DISABLE_GTESTS=1
--
2.30.0
From 7b7729e4917f32461d29ca881831742b55c43e4f Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Fri, 27 Apr 2018 21:38:56 +0200
Subject: Enable -Bsymbolic for BeOS target
* Fixes infinite loop in RNG_RNGInit.
diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile
index 269e34c..43be218 100644
--- a/lib/freebl/Makefile
+++ b/lib/freebl/Makefile
@@ -352,7 +352,7 @@ endif
# to bind the blapi function references in FREEBLVector vector
# (ldvector.c) to the blapi functions defined in the freebl
# shared libraries.
-ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
+ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD BeOS, $(OS_TARGET)))
MKSHLIB += -Wl,-Bsymbolic
endif
--
2.30.0
From 2a3eee07466060601275239c6ec433fbe78675f7 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Sat, 11 Aug 2018 00:46:36 +0200
Subject: Define XP_HAIKU
* Fixes build error caused by BeOS defines in NSPR header.
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index 3bc0ce3..d25df28 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -5,7 +5,7 @@
include $(CORE_DEPTH)/coreconf/UNIX.mk
-XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS)
+XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS -DXP_HAIKU)
USE_PTHREADS = 1
--
2.30.0
From 3eb83392f170a00a3b58d09ba8734c4abe3812de Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 14 Aug 2018 09:00:06 +1000
Subject: Fix build for x64
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index d25df28..9cc8afc 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -27,6 +27,10 @@ else
CPU_ARCH = x86
endif
+ifeq ($(USE_64),1)
+ CPU_ARCH = x86_64
+endif
+
MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
ifdef BUILD_OPT
OPTIMIZER = -O2
--
2.30.0
From bef456342fe648370fcdf8b221af6cb6e6c7c9cc Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 15 Aug 2018 11:12:46 +1000
Subject: Fix build for x86
diff --git a/cmd/httpserv/httpserv.c b/cmd/httpserv/httpserv.c
index c7277f3..eb806e2 100644
--- a/cmd/httpserv/httpserv.c
+++ b/cmd/httpserv/httpserv.c
@@ -1325,7 +1325,7 @@ main(int argc, char **argv)
FILE *tmpfile = fopen(pidFile, "w+");
if (tmpfile) {
- fprintf(tmpfile, "%d", getpid());
+ fprintf(tmpfile, "%d", (int)getpid());
fclose(tmpfile);
}
}
diff --git a/cmd/selfserv/selfserv.c b/cmd/selfserv/selfserv.c
index 6b6f53a..efb021c 100644
--- a/cmd/selfserv/selfserv.c
+++ b/cmd/selfserv/selfserv.c
@@ -2864,7 +2864,7 @@ main(int argc, char **argv)
FILE *tmpfile = fopen(pidFile, "w+");
if (tmpfile) {
- fprintf(tmpfile, "%d", getpid());
+ fprintf(tmpfile, "%d", (int)getpid());
fclose(tmpfile);
}
}
--
2.30.0
From 891b22aa8e45f600bb86c36ebd241885cb0bfa18 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 28 Feb 2021 18:25:30 +0100
Subject: Mapfile for Haiku
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
index 9cc8afc..9370890 100644
--- a/coreconf/BeOS.mk
+++ b/coreconf/BeOS.mk
@@ -48,10 +48,17 @@ endif
ARCH = beos
DSO_CFLAGS = -fPIC
-DSO_LDOPTS =
+DSO_LDOPTS = -shared
SKIP_SHLIBSIGN=1
USE_SYSTEM_ZLIB = 1
ZLIB_LIBS = -lz
NSS_USE_SYSTEM_SQLITE=1
NSS_DISABLE_GTESTS=1
+
+MKSHLIB = $(CC) $(DSO_LDOPTS)
+ifdef MAPFILE
+ MKSHLIB += -Wl,--version-script,$(MAPFILE)
+endif
+PROCESS_MAP_FILE = grep -v ';-' $< | \
+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
--
2.30.0