pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/nss nss: hide symbols on NetBSD like on other pl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/46f05dfa91ec
branches:  trunk
changeset: 451802:46f05dfa91ec
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat May 01 21:52:02 2021 +0000

description:
nss: hide symbols on NetBSD like on other platforms

Remove local workarounds again

Bump PKGREVISION.

diffstat:

 devel/nss/Makefile                                          |   4 +-
 devel/nss/distinfo                                          |   9 +-
 devel/nss/patches/patch-nss_coreconf_NetBSD.mk              |  75 +++++++++++-
 devel/nss/patches/patch-nss_coreconf_OpenBSD.mk             |   4 +-
 devel/nss/patches/patch-nss_lib_freebl_blapi.h              |  29 -----
 devel/nss/patches/patch-nss_lib_freebl_md5.c                |  41 -------
 devel/nss/patches/patch-nss_lib_freebl_sha-fast-amd64-sun.s |  51 --------
 7 files changed, 75 insertions(+), 138 deletions(-)

diffs (279 lines):

diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/Makefile
--- a/devel/nss/Makefile        Sat May 01 19:09:33 2021 +0000
+++ b/devel/nss/Makefile        Sat May 01 21:52:02 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.204 2021/04/23 16:07:43 rin Exp $
+# $NetBSD: Makefile,v 1.205 2021/05/01 21:52:02 wiz Exp $
 
 DISTNAME=              nss-${NSS_RELEASE:S/.0$//}
 NSS_RELEASE=           3.64.0
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            devel security
 MASTER_SITES=          ${MASTER_SITE_MOZILLA_ALL:=security/nss/releases/NSS_${NSS_DIST_DIR_VERSION:S/_0$//}_RTM/src/}
 
diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/distinfo
--- a/devel/nss/distinfo        Sat May 01 19:09:33 2021 +0000
+++ b/devel/nss/distinfo        Sat May 01 21:52:02 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.128 2021/04/23 16:07:43 rin Exp $
+$NetBSD: distinfo,v 1.129 2021/05/01 21:52:02 wiz Exp $
 
 SHA1 (nss-3.64.tar.gz) = e8f7dd8ab325a57a46b1d717c86bdae1be66e911
 RMD160 (nss-3.64.tar.gz) = bad3022ebac60e794d999dd7c74092c6b80c39d0
@@ -10,14 +10,11 @@
 SHA1 (patch-mn) = 5b79783e48249044be1a904a6cfd20ba175b5fd4
 SHA1 (patch-nss_cmd_platlibs.mk) = 01f4350de601b29c94e8a791a28daca226866bb6
 SHA1 (patch-nss_cmd_shlibsign_sign.sh) = 7948b7b502a4c148ee185836dde8a84d3aa388af
-SHA1 (patch-nss_coreconf_NetBSD.mk) = 61901b8f5d3f5b18b5f52dbb6c43215d425c70e5
-SHA1 (patch-nss_coreconf_OpenBSD.mk) = 1a4c3711d5d1f7f9e8d58b36145b15d7e444d754
+SHA1 (patch-nss_coreconf_NetBSD.mk) = 3def6739b8776dcb98ee78f712b0d76192ec29b4
+SHA1 (patch-nss_coreconf_OpenBSD.mk) = 944f71fcaaa7d5b2b3ed008341b1392a65480f2b
 SHA1 (patch-nss_coreconf_command.mk) = a7b682d367825b48f8802fa30cee83f10680bb74
 SHA1 (patch-nss_lib_freebl_aes-armv8.c) = aa698f61dd3d66ba707a9b5425bc15d057244ad7
-SHA1 (patch-nss_lib_freebl_blapi.h) = 1fa1acb0a988f71cf4229faa2cc9155a105b6799
 SHA1 (patch-nss_lib_freebl_gcm-aarch64.c) = 311cfe7ca58e91285052d0ca27bd2df3f325071b
-SHA1 (patch-nss_lib_freebl_md5.c) = 7d0b88710c3bc099f3a76bce8bb95a7538ccf0bc
-SHA1 (patch-nss_lib_freebl_sha-fast-amd64-sun.s) = 11a043550811b19f4c71b67971efe69855cb1071
 SHA1 (patch-nss_lib_util_utilpars.c) = 5d3000515b01037929730a752b7d7a0f46f06deb
 SHA1 (patch-nss_tests_all.sh) = b328778b538db66f5447f962f23afd6f650f7071
 SHA1 (patch-nss_tests_merge_merge.sh) = 42a4866d226b1076740ba9a5e42c7604f2cb15a7
diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/patches/patch-nss_coreconf_NetBSD.mk
--- a/devel/nss/patches/patch-nss_coreconf_NetBSD.mk    Sat May 01 19:09:33 2021 +0000
+++ b/devel/nss/patches/patch-nss_coreconf_NetBSD.mk    Sat May 01 21:52:02 2021 +0000
@@ -1,20 +1,81 @@
-$NetBSD: patch-nss_coreconf_NetBSD.mk,v 1.2 2021/04/23 16:07:43 rin Exp $
+$NetBSD: patch-nss_coreconf_NetBSD.mk,v 1.3 2021/05/01 21:52:02 wiz Exp $
+
+Match more closely to OpenBSD.mk, and in particular, hide symbols (MAPFILE).
 
 - fix wrong value of CPU_ARCH on NetBSD/evbarm-earmv7f
 - s/aarch64eb/aarch64/
 
---- nss/coreconf/NetBSD.mk.orig        2021-04-16 01:17:44.000000000 +0900
-+++ nss/coreconf/NetBSD.mk     2021-04-24 00:37:05.764452953 +0900
-@@ -15,6 +15,12 @@
+--- nss/coreconf/NetBSD.mk.orig        2021-04-15 16:17:44.000000000 +0000
++++ nss/coreconf/NetBSD.mk
+@@ -5,9 +5,10 @@
+ 
+ include $(CORE_DEPTH)/coreconf/UNIX.mk
+ 
+-DEFAULT_COMPILER      = gcc
+-CC                    = gcc
+-CCC                   = g++
++CC                    ?= gcc
++CXX                   ?= g++
++DEFAULT_COMPILER      = ${CC}
++CCC                   = ${CXX}
+ RANLIB                        = ranlib
+ 
+ CPU_ARCH              := $(shell uname -p)
+@@ -15,16 +16,14 @@ ifeq ($(CPU_ARCH),i386)
  OS_REL_CFLAGS         = -Di386
  CPU_ARCH              = x86
  endif
+-
+-ifndef OBJECT_FMT
+-OBJECT_FMT            := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi)
 +ifeq (,$(filter-out earm%,$(CPU_ARCH)))
 +CPU_ARCH              = arm
 +endif
 +ifeq ($(CPU_ARCH),aarch64eb)
 +CPU_ARCH              = aarch64
-+endif
+ endif
+ 
+-ifeq ($(OBJECT_FMT),ELF)
+ DLL_SUFFIX            = so
+-else
+-DLL_SUFFIX            = so.1.0
+-endif
+ 
+ OS_CFLAGS             = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+ 
+@@ -33,9 +32,16 @@ OS_LIBS                     = -lcompat
+ ARCH                  = netbsd
  
- ifndef OBJECT_FMT
- OBJECT_FMT            := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi)
+ DSO_CFLAGS            = -fPIC -DPIC
+-DSO_LDOPTS            = -shared
+-ifeq ($(OBJECT_FMT),ELF)
+-DSO_LDOPTS            += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
++DSO_LDOPTS            = -shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
++
++#
++# The default implementation strategy for NetBSD is pthreads.
++#
++ifndef CLASSIC_NSPR
++USE_PTHREADS          = 1
++DEFINES                       += -D_THREAD_SAFE -D_REENTRANT
++OS_LIBS                       += -pthread
++DSO_LDOPTS            += -pthread
+ endif
+ 
+ ifdef LIBRUNPATH
+@@ -44,12 +50,8 @@ endif
+ 
+ MKSHLIB                       = $(CC) $(DSO_LDOPTS)
+ ifdef MAPFILE
+-# Add LD options to restrict exported symbols to those in the map file
++      MKSHLIB += -Wl,--version-script,$(MAPFILE)
+ endif
+-# Change PROCESS to put the mapfile in the correct format for this platform
+-PROCESS_MAP_FILE = cp $< $@
+-
+-
+-G++INCLUDES           = -I/usr/include/g++
++PROCESS_MAP_FILE = grep -v ';-' $< | \
++        sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
+ 
+-INCLUDES              += -I/usr/X11R6/include
diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/patches/patch-nss_coreconf_OpenBSD.mk
--- a/devel/nss/patches/patch-nss_coreconf_OpenBSD.mk   Sat May 01 19:09:33 2021 +0000
+++ b/devel/nss/patches/patch-nss_coreconf_OpenBSD.mk   Sat May 01 21:52:02 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-nss_coreconf_OpenBSD.mk,v 1.3 2019/05/05 22:47:28 ryoon Exp $
+$NetBSD: patch-nss_coreconf_OpenBSD.mk,v 1.4 2021/05/01 21:52:02 wiz Exp $
 
 * Use non-versioned libraries for OpenBSD too
 
---- nss/coreconf/OpenBSD.mk.orig       2016-05-17 07:58:45.000000000 +0000
+--- nss/coreconf/OpenBSD.mk.orig       2021-04-15 16:17:44.000000000 +0000
 +++ nss/coreconf/OpenBSD.mk
 @@ -24,7 +24,7 @@ OS_LIBS                      += -pthread
  DSO_LDOPTS            += -pthread
diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/patches/patch-nss_lib_freebl_blapi.h
--- a/devel/nss/patches/patch-nss_lib_freebl_blapi.h    Sat May 01 19:09:33 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-$NetBSD: patch-nss_lib_freebl_blapi.h,v 1.1 2021/04/15 08:54:54 wiz Exp $
-
-Some symbols conflict with openssl.
-If nss is loaded first, it can call into openssl's code,
-which has different struct sizes. This can lead to weird
-coredumps.
-
-https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/Al0Pt0zhARE
-
---- nss/lib/freebl/blapi.h.orig        2021-03-18 14:22:42.000000000 +0000
-+++ nss/lib/freebl/blapi.h
-@@ -1122,6 +1122,8 @@ extern void MD5_DestroyContext(MD5Contex
- */
- extern void MD5_Begin(MD5Context *cx);
- 
-+#define MD5_Update NSS_MD5_Update
-+
- /*
- ** Update the MD5 hash function with more data.
- **  "cx" the context
-@@ -1287,6 +1289,8 @@ extern void SHA1_DestroyContext(SHA1Cont
- */
- extern void SHA1_Begin(SHA1Context *cx);
- 
-+#define SHA1_Update NSS_SHA1_Update
-+
- /*
- ** Update the SHA-1 hash function with more data.
- **  "cx" the context
diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/patches/patch-nss_lib_freebl_md5.c
--- a/devel/nss/patches/patch-nss_lib_freebl_md5.c      Sat May 01 19:09:33 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-$NetBSD: patch-nss_lib_freebl_md5.c,v 1.3 2021/04/15 08:54:54 wiz Exp $
-
-Some symbols conflict with openssl.
-If nss is loaded first, it can call into openssl's code,
-which has different struct sizes. This can lead to weird
-coredumps.
-
-https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/Al0Pt0zhARE
-
---- nss/lib/freebl/md5.c.orig  2021-03-18 14:22:42.000000000 +0000
-+++ nss/lib/freebl/md5.c
-@@ -205,7 +205,7 @@ MD5_HashBuf(unsigned char *dest, const u
-     MD5Context cx;
- 
-     MD5_Begin(&cx);
--    MD5_Update(&cx, src, src_length);
-+    NSS_MD5_Update(&cx, src, src_length);
-     MD5_End(&cx, dest, &len, MD5_HASH_LEN);
-     memset(&cx, 0, sizeof cx);
-     return SECSuccess;
-@@ -419,7 +419,7 @@ md5_compress(MD5Context *cx, const PRUin
- }
- 
- void
--MD5_Update(MD5Context *cx, const unsigned char *input, unsigned int inputLen)
-+NSS_MD5_Update(MD5Context *cx, const unsigned char *input, unsigned int inputLen)
- {
-     PRUint32 bytesToConsume;
-     PRUint32 inBufIndex = cx->lsbInput & 63;
-@@ -509,9 +509,9 @@ MD5_End(MD5Context *cx, unsigned char *d
-     lowInput <<= 3;
- 
-     if (inBufIndex < MD5_END_BUFFER) {
--        MD5_Update(cx, padbytes, MD5_END_BUFFER - inBufIndex);
-+        NSS_MD5_Update(cx, padbytes, MD5_END_BUFFER - inBufIndex);
-     } else {
--        MD5_Update(cx, padbytes,
-+        NSS_MD5_Update(cx, padbytes,
-                    MD5_END_BUFFER + MD5_BUFFER_SIZE - inBufIndex);
-     }
- 
diff -r 07367c28da6e -r 46f05dfa91ec devel/nss/patches/patch-nss_lib_freebl_sha-fast-amd64-sun.s
--- a/devel/nss/patches/patch-nss_lib_freebl_sha-fast-amd64-sun.s       Sat May 01 19:09:33 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-$NetBSD: patch-nss_lib_freebl_sha-fast-amd64-sun.s,v 1.1 2021/04/15 08:54:54 wiz Exp $
-
-Some symbols conflict with openssl.
-If nss is loaded first, it can call into openssl's code,
-which has different struct sizes. This can lead to weird
-coredumps.
-
-https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/Al0Pt0zhARE
-
---- nss/lib/freebl/sha-fast-amd64-sun.s.orig   2021-03-18 14:22:42.000000000 +0000
-+++ nss/lib/freebl/sha-fast-amd64-sun.s
-@@ -1680,9 +1680,9 @@ shaCompress:
- .LFE7:
-       .size   shaCompress, .-shaCompress
-       .align 16
--.globl SHA1_Update
--      .type   SHA1_Update, @function
--SHA1_Update:
-+.globl NSS_SHA1_Update
-+      .type   NSS_SHA1_Update, @function
-+NSS_SHA1_Update:
- .LFB5:
-       pushq   %rbp
- .LCFI5:
-@@ -1768,7 +1768,7 @@ SHA1_Update:
-       call    shaCompress
-       jmp     .L245
- .LFE5:
--      .size   SHA1_Update, .-SHA1_Update
-+      .size   NSS_SHA1_Update, .-NSS_SHA1_Update
-       .section        .rodata
-       .align 32
-       .type   bulk_pad.0, @object
-@@ -1870,7 +1870,7 @@ SHA1_End:
-       subl    %r8d, %edx
-       andl    $63, %edx
-       incl    %edx
--      call    SHA1_Update@PLT
-+      call    NSS_SHA1_Update@PLT
-       movq    %rbx, %rdi
-       movq    %r12, %rsi
-       shrq    $32, %rdi
-@@ -1989,7 +1989,7 @@ SHA1_HashBuf:
-       movl    %r12d, %edx
-       movq    %r13, %rsi
-       movq    %rbx, %rdi
--      call    SHA1_Update@PLT
-+      call    NSS_SHA1_Update@PLT
-       leaq    -292(%rbp), %rdx
-       movq    %r14, %rsi
-       movq    %rbx, %rdi



Home | Main Index | Thread Index | Old Index