pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/nss Do not conflict with MD5_Update from OpenSSL



details:   https://anonhg.NetBSD.org/pkgsrc/rev/52f98053d5e6
branches:  trunk
changeset: 323158:52f98053d5e6
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sun May 05 22:47:27 2019 +0000

description:
Do not conflict with MD5_Update from OpenSSL

Like SHA1_Update, define another name, NSS_MD5_Update and
use via CPP macto.
This change fixes PDF export of misc/libreoffice.

And make pkglint happier.

diffstat:

 devel/nss/Makefile                              |  14 ++++----
 devel/nss/buildlink3.mk                         |   6 +-
 devel/nss/distinfo                              |  11 +++---
 devel/nss/patches/patch-am                      |  19 +++++++++---
 devel/nss/patches/patch-nss_cmd_platlibs.mk     |   4 +-
 devel/nss/patches/patch-nss_coreconf_OpenBSD.mk |   4 +-
 devel/nss/patches/patch-nss_lib_freebl_blinit.c |   4 +-
 devel/nss/patches/patch-nss_lib_freebl_md5.c    |  38 +++++++++++++++++++++++++
 8 files changed, 77 insertions(+), 23 deletions(-)

diffs (193 lines):

diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/Makefile
--- a/devel/nss/Makefile        Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/Makefile        Sun May 05 22:47:27 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.164 2019/04/03 00:32:38 ryoon Exp $
+# $NetBSD: Makefile,v 1.165 2019/05/05 22:47:27 ryoon Exp $
 
 DISTNAME=              nss-${NSS_RELEASE:S/.0$//}
 NSS_RELEASE=           3.43.0
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            security
 MASTER_SITES=          ${MASTER_SITE_MOZILLA_ALL:=security/nss/releases/NSS_${NSS_DIST_DIR_VERSION:S/_0$//}_RTM/src/}
 
@@ -11,10 +11,10 @@
 COMMENT=               Libraries to support development of security-enabled applications
 LICENSE=               mpl-2.0
 
-CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}nss/tests/libpkix/libpkix.sh
-CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}nss/tests/multinit/multinit.sh
-CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}js/src/configure
-CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}configure
+CHECK_PORTABILITY_SKIP+=       nss/tests/libpkix/libpkix.sh
+CHECK_PORTABILITY_SKIP+=       nss/tests/multinit/multinit.sh
+CHECK_PORTABILITY_SKIP+=       js/src/configure
+CHECK_PORTABILITY_SKIP+=       configure
 
 CTF_SUPPORTED=         no # https://smartos.org/bugview/OS-6510
 
@@ -65,7 +65,7 @@
 SUBST_STAGE.64bit=     pre-configure
 SUBST_FILES.64bit=     nss/lib/freebl/*
 SUBST_SED.64bit=       -e 's,NSS_USE_64,_LP64,g'
-SUBST_MESSAGE.conf=    Use a generic 64bit check
+SUBST_MESSAGE.64bit=   Use a generic 64bit check
 
 # Just to be safe, do this as well as the _LP64 replacement
 # NSS has a lot more logic for USE_64
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/buildlink3.mk
--- a/devel/nss/buildlink3.mk   Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/buildlink3.mk   Sun May 05 22:47:27 2019 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.21 2018/01/07 13:04:08 rillig Exp $
+# $NetBSD: buildlink3.mk,v 1.22 2019/05/05 22:47:27 ryoon Exp $
 
 BUILDLINK_TREE+=       nss
 
 .if !defined(NSS_BUILDLINK3_MK)
 NSS_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.nss+=    nss>=3.14.0
-BUILDLINK_ABI_DEPENDS.nss+=    nss>=3.14.0
+BUILDLINK_API_DEPENDS.nss+=    nss>=3.43nb2
+BUILDLINK_ABI_DEPENDS.nss+=    nss>=3.43nb2
 BUILDLINK_PKGSRCDIR.nss?=      ../../devel/nss
 
 BUILDLINK_LIBDIRS.nss+=                lib/nss
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/distinfo
--- a/devel/nss/distinfo        Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/distinfo        Sun May 05 22:47:27 2019 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.94 2019/03/22 15:50:34 ryoon Exp $
+$NetBSD: distinfo,v 1.95 2019/05/05 22:47:27 ryoon Exp $
 
 SHA1 (nss-3.43.tar.gz) = f7c6adc80aae41686e6238df8f0ac50d5388cf11
 RMD160 (nss-3.43.tar.gz) = f864e768542364b7fb2b7d727579f6ced82cf0a6
 SHA512 (nss-3.43.tar.gz) = e9dfba5bd6f68c5ab58fc7a6fa1b16a035be1b1b7c436cf787bdc99257c5f54c78d73d94d015bffd29420df19b2a2818166c68fe592dd7208ab5605344827fb5
 Size (nss-3.43.tar.gz) = 23466026 bytes
-SHA1 (patch-am) = bab47640c0d25629f43578e7b788859418b27ecd
+SHA1 (patch-am) = fea682bf03bc8b645049f93ed58554ca45f47aca
 SHA1 (patch-an) = 4ab22f2a575676b5b640bc9a760b83eb05c75e69
 SHA1 (patch-md) = 8547c9414332c02221b96719dea1e09cb741f4d1
 SHA1 (patch-me) = 9da633e494c8656f22162b354d9710a770d24345
@@ -13,10 +13,11 @@
 SHA1 (patch-mh) = a46d3098a85c3a4a57895a9845bc1741fc5e9561
 SHA1 (patch-mj) = 08ca1a37afce99e0292a20348fc6855547f44e8a
 SHA1 (patch-mn) = 5b79783e48249044be1a904a6cfd20ba175b5fd4
-SHA1 (patch-nss_cmd_platlibs.mk) = 7dadcb72acf15714c61ae74b21c5baf45bc51d4c
-SHA1 (patch-nss_coreconf_OpenBSD.mk) = fccc17845c28f5b1268c96eb4e952e32dd530d1d
+SHA1 (patch-nss_cmd_platlibs.mk) = 01f4350de601b29c94e8a791a28daca226866bb6
+SHA1 (patch-nss_coreconf_OpenBSD.mk) = 1a4c3711d5d1f7f9e8d58b36145b15d7e444d754
 SHA1 (patch-nss_coreconf_command.mk) = 008f7670f164bf19555a7691f5a59fc8bf687078
-SHA1 (patch-nss_lib_freebl_blinit.c) = 94e2c7d64ae04bf2c18d3c4071cb6458536e4e3e
+SHA1 (patch-nss_lib_freebl_blinit.c) = d3b3757541fe9b80ec9aee3159c20ca0aa88bcc4
+SHA1 (patch-nss_lib_freebl_md5.c) = 5cbec40695e296f0713895fb85cd37f6df76b85b
 SHA1 (patch-nss_lib_util_utilpars.c) = 5d3000515b01037929730a752b7d7a0f46f06deb
 SHA1 (patch-nss_tests_all.sh) = f8d0fcfcd67dca757c9ce016660210b20b1e6e8f
 SHA1 (patch-nss_tests_merge_merge.sh) = 42a4866d226b1076740ba9a5e42c7604f2cb15a7
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/patches/patch-am
--- a/devel/nss/patches/patch-am        Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/patches/patch-am        Sun May 05 22:47:27 2019 +0000
@@ -1,12 +1,21 @@
-$NetBSD: patch-am,v 1.5 2016/09/30 11:59:12 ryoon Exp $
+$NetBSD: patch-am,v 1.6 2019/05/05 22:47:28 ryoon Exp $
 
-SHA1_Update conflicts with openssl which may be dynamically loaded
-at runtime via libcups or libgssapi so causing a crash due to using
+SHA1_Update and MD5_Update conflict with openssl which may be dynamically
+loaded at runtime via libcups or libgssapi so causing a crash due to using
 the wrong binding.  So rename here to avoid conflict.
 
---- nss/lib/freebl/blapi.h.orig        2016-09-26 06:00:51.000000000 +0000
+--- nss/lib/freebl/blapi.h.orig        2019-03-16 00:25:08.000000000 +0000
 +++ nss/lib/freebl/blapi.h
-@@ -1212,6 +1212,8 @@ extern void SHA1_DestroyContext(SHA1Cont
+@@ -1046,6 +1046,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
+@@ -1211,6 +1213,8 @@ extern void SHA1_DestroyContext(SHA1Cont
  */
  extern void SHA1_Begin(SHA1Context *cx);
  
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/patches/patch-nss_cmd_platlibs.mk
--- a/devel/nss/patches/patch-nss_cmd_platlibs.mk       Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/patches/patch-nss_cmd_platlibs.mk       Sun May 05 22:47:27 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-nss_cmd_platlibs.mk,v 1.1 2015/05/05 21:42:19 ryoon Exp $
+$NetBSD: patch-nss_cmd_platlibs.mk,v 1.2 2019/05/05 22:47:28 ryoon Exp $
+
+* Use sqlite3 via pkg-config to improve portability
 
 --- nss/cmd/platlibs.mk.orig   2015-04-30 20:00:23.000000000 +0000
 +++ nss/cmd/platlibs.mk
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/patches/patch-nss_coreconf_OpenBSD.mk
--- a/devel/nss/patches/patch-nss_coreconf_OpenBSD.mk   Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/patches/patch-nss_coreconf_OpenBSD.mk   Sun May 05 22:47:27 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-nss_coreconf_OpenBSD.mk,v 1.2 2016/05/25 13:17:13 ryoon Exp $
+$NetBSD: patch-nss_coreconf_OpenBSD.mk,v 1.3 2019/05/05 22:47:28 ryoon 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
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/patches/patch-nss_lib_freebl_blinit.c
--- a/devel/nss/patches/patch-nss_lib_freebl_blinit.c   Sun May 05 21:44:58 2019 +0000
+++ b/devel/nss/patches/patch-nss_lib_freebl_blinit.c   Sun May 05 22:47:27 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-nss_lib_freebl_blinit.c,v 1.2 2018/04/12 14:32:51 bouyer Exp $
+$NetBSD: patch-nss_lib_freebl_blinit.c,v 1.3 2019/05/05 22:47:28 ryoon Exp $
+
+* Fix for arm/aarch64
 
 --- nss/lib/freebl/blinit.c.orig       2018-04-09 15:38:16.000000000 +0000
 +++ nss/lib/freebl/blinit.c    2018-04-12 14:29:56.040326263 +0000
diff -r abf7ff19f8a4 -r 52f98053d5e6 devel/nss/patches/patch-nss_lib_freebl_md5.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/nss/patches/patch-nss_lib_freebl_md5.c      Sun May 05 22:47:27 2019 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-nss_lib_freebl_md5.c,v 1.1 2019/05/05 22:47:28 ryoon Exp $
+
+MD5_Update conflicts with openssl which may be dynamically loaded
+at runtime via libcups or libgssapi so causing a crash due to using
+the wrong binding.  So rename here to avoid conflict.
+
+--- nss/lib/freebl/md5.c.orig  2019-03-16 00:25:08.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);
+     }
+ 



Home | Main Index | Thread Index | Old Index