From owner-svn-ports-head@freebsd.org Tue Mar 6 15:56:04 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 224D8F3D4FE; Tue, 6 Mar 2018 15:56:04 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CBAA57CDC6; Tue, 6 Mar 2018 15:56:03 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C68CE14F29; Tue, 6 Mar 2018 15:56:03 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26Fu3uA065801; Tue, 6 Mar 2018 15:56:03 GMT (envelope-from jhale@FreeBSD.org) Received: (from jhale@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26Fu3hH065796; Tue, 6 Mar 2018 15:56:03 GMT (envelope-from jhale@FreeBSD.org) Message-Id: <201803061556.w26Fu3hH065796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhale set sender to jhale@FreeBSD.org using -f From: "Jason E. Hale" Date: Tue, 6 Mar 2018 15:56:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463729 - in head/security: . py-python-nss py-python-nss/files X-SVN-Group: ports-head X-SVN-Commit-Author: jhale X-SVN-Commit-Paths: in head/security: . py-python-nss py-python-nss/files X-SVN-Commit-Revision: 463729 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 15:56:04 -0000 Author: jhale Date: Tue Mar 6 15:56:03 2018 New Revision: 463729 URL: https://svnweb.freebsd.org/changeset/ports/463729 Log: New port: security/py-python-nss python-nss is a Python binding for NSS (Network Security Services) and NSPR (Netscape Portable Runtime). NSS provides cryptography services supporting SSL, TLS, PKI, PKIX, X509, PKCS*, etc. NSS is an alternative to OpenSSL and used extensively by major software projects. NSS is FIPS-140 certified. NSS is built upon NSPR because NSPR provides an abstraction of common operating system services, particularly in the areas of networking and process management. Python also provides an abstraction of common operating system services but because NSS and NSPR are tightly bound, python-nss exposes elements of NSPR. WWW: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Python_binding_for_NSS Added: head/security/py-python-nss/ head/security/py-python-nss/Makefile (contents, props changed) head/security/py-python-nss/distinfo (contents, props changed) head/security/py-python-nss/files/ head/security/py-python-nss/files/patch-test_test__digest.py (contents, props changed) head/security/py-python-nss/pkg-descr (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Tue Mar 6 15:38:27 2018 (r463728) +++ head/security/Makefile Tue Mar 6 15:56:03 2018 (r463729) @@ -979,6 +979,7 @@ SUBDIR += py-pyscard SUBDIR += py-pysha3 SUBDIR += py-python-gnupg + SUBDIR += py-python-nss SUBDIR += py-python-openid SUBDIR += py-python-registry SUBDIR += py-python-social-auth Added: head/security/py-python-nss/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-python-nss/Makefile Tue Mar 6 15:56:03 2018 (r463729) @@ -0,0 +1,41 @@ +# $FreeBSD$ + +PORTNAME= python-nss +PORTVERSION= 1.0.1 +CATEGORIES= security python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= jhale@FreeBSD.org +COMMENT= Python bindings for NSS and NSPR + +LICENSE= LGPL21+ GPLv2+ MPL20 +LICENSE_COMB= dual +LICENSE_FILE_LGPL21+ = ${WRKSRC}/LICENSE.lgpl +LICENSE_FILE_GPLv2+ = ${WRKSRC}/LICENSE.gpl +LICENSE_FILE_MPL20= ${WRKSRC}/LICENSE.mpl + +LIB_DEPENDS= libnspr4.so:devel/nspr \ + libnss3.so:security/nss + +USES= python tar:bzip2 +USE_PYTHON= autoplist distutils + +PYDISTUTILS_CONFIGUREARGS= --include-root="${LOCALBASE}/include" \ + --include-root="${LOCALBASE}/include/nss" +PYDISTUTILS_BUILDARGS= ${PYDISTUTILS_CONFIGUREARGS} +PYDISTUTILS_INSTALLARGS= -c -O1 --prefix=${PREFIX} ${PYDISTUTILS_CONFIGUREARGS} + +LDFLAGS+= -L${LOCALBASE}/lib/nss + +TEST_TARGET= # empty +TEST_WRKSRC= ${WRKSRC}/test +DO_MAKE_TEST= ${SETENV} ${TEST_ENV} ${PYTHON_CMD} run_tests -t + +post-patch: + @(cd ${WRKSRC}/test && ${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|g' setup_certs.py test_pkcs12.py) + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/nss/*.so + +.include Added: head/security/py-python-nss/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-python-nss/distinfo Tue Mar 6 15:56:03 2018 (r463729) @@ -0,0 +1,3 @@ +TIMESTAMP = 1520339740 +SHA256 (python-nss-1.0.1.tar.bz2) = 7fbad8d4b0a379e62d1c11441e87782e3084547b7a83ac44bd5f308540aeeb1c +SIZE (python-nss-1.0.1.tar.bz2) = 222059 Added: head/security/py-python-nss/files/patch-test_test__digest.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-python-nss/files/patch-test_test__digest.py Tue Mar 6 15:56:03 2018 (r463729) @@ -0,0 +1,34 @@ +Convert coreutils commands to FreeBSD equivalents + +--- test/test_digest.py.orig 2018-03-06 14:23:55 UTC ++++ test/test_digest.py +@@ -45,7 +45,7 @@ class TestDigest(unittest.TestCase): + # + # We want to read the reference result from the subprocess as text + # not binary, thus universal_newlines must be True. +- proc = subprocess.Popen([ref_cmd, in_filename], stdout=subprocess.PIPE, ++ proc = subprocess.Popen([ref_cmd, '-r', in_filename], stdout=subprocess.PIPE, + universal_newlines=True) + stdout, stderr = proc.communicate() + reference_digest = stdout.split()[0] +@@ -103,16 +103,16 @@ class TestDigest(unittest.TestCase): + (hash_oid_name, reference_digest, test_digest)) + + def test_md5(self): +- self.do_test('md5', 'md5sum', nss.md5_digest, nss.SEC_OID_MD5) ++ self.do_test('md5', 'md5', nss.md5_digest, nss.SEC_OID_MD5) + + def test_sha1(self): +- self.do_test('sha1', 'sha1sum', nss.sha1_digest, nss.SEC_OID_SHA1) ++ self.do_test('sha1', 'sha1', nss.sha1_digest, nss.SEC_OID_SHA1) + + def test_sha256(self): +- self.do_test('sha256', 'sha256sum', nss.sha256_digest, nss.SEC_OID_SHA256) ++ self.do_test('sha256', 'sha256', nss.sha256_digest, nss.SEC_OID_SHA256) + + def test_sha512(self): +- self.do_test('sha512', 'sha512sum', nss.sha512_digest, nss.SEC_OID_SHA512) ++ self.do_test('sha512', 'sha512', nss.sha512_digest, nss.SEC_OID_SHA512) + + + #------------------------------------------------------------------------------- Added: head/security/py-python-nss/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/py-python-nss/pkg-descr Tue Mar 6 15:56:03 2018 (r463729) @@ -0,0 +1,13 @@ +python-nss is a Python binding for NSS (Network Security Services) +and NSPR (Netscape Portable Runtime). NSS provides cryptography +services supporting SSL, TLS, PKI, PKIX, X509, PKCS*, etc. NSS is +an alternative to OpenSSL and used extensively by major software +projects. NSS is FIPS-140 certified. + +NSS is built upon NSPR because NSPR provides an abstraction of +common operating system services, particularly in the areas of +networking and process management. Python also provides an abstraction +of common operating system services but because NSS and NSPR are +tightly bound, python-nss exposes elements of NSPR. + +WWW: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Python_binding_for_NSS