svn commit: r405526 - in head/security: . py-pymacaroons-pynacl py-pymacaroons-pynacl/files

Kubilay Kocak koobs at FreeBSD.org
Fri Jan 8 05:03:41 UTC 2016


Author: koobs
Date: Fri Jan  8 05:03:39 2016
New Revision: 405526
URL: https://svnweb.freebsd.org/changeset/ports/405526

Log:
  [NEW] security/py-pymacaroons-pynacl: Macaroon library for Python
  
  Macaroons, like cookies, are a form of bearer credential. Unlike opaque tokens,
  macaroons embed caveats that define specific authorization requirements for the
  target service, the service that issued the root macaroon and which is capable
  of verifying the integrity of macaroons it receives.
  
  WWW: https://github.com/matrix-org/pymacaroons
  
  PR:		205914
  Submitted by:	Brendan Molloy <brendan+freebsd at bbqsrc.net>

Added:
  head/security/py-pymacaroons-pynacl/
  head/security/py-pymacaroons-pynacl/Makefile   (contents, props changed)
  head/security/py-pymacaroons-pynacl/distinfo   (contents, props changed)
  head/security/py-pymacaroons-pynacl/files/
  head/security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py   (contents, props changed)
  head/security/py-pymacaroons-pynacl/pkg-descr   (contents, props changed)
Modified:
  head/security/Makefile

Modified: head/security/Makefile
==============================================================================
--- head/security/Makefile	Fri Jan  8 05:00:11 2016	(r405525)
+++ head/security/Makefile	Fri Jan  8 05:03:39 2016	(r405526)
@@ -853,6 +853,7 @@
     SUBDIR += py-pydeep
     SUBDIR += py-pyelliptic
     SUBDIR += py-pylibacl
+    SUBDIR += py-pymacaroons-pynacl
     SUBDIR += py-pyme
     SUBDIR += py-pynacl
     SUBDIR += py-pyptlib

Added: head/security/py-pymacaroons-pynacl/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/py-pymacaroons-pynacl/Makefile	Fri Jan  8 05:03:39 2016	(r405526)
@@ -0,0 +1,32 @@
+# Created by: Brendan Molloy <brendan+freebsd at bbqsrc.net>
+# $FreeBSD$
+
+PORTNAME=	pymacaroons-pynacl
+PORTVERSION=	0.9.3
+DISTVERSIONPREFIX=	v
+CATEGORIES=	security devel python
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	brendan+freebsd at bbqsrc.net
+COMMENT=	Macaroon library for Python
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pynacl>=0.3.0:${PORTSDIR}/security/py-pynacl \
+		${PYTHON_PKGNAMEPREFIX}six>=1.8.0:${PORTSDIR}/devel/py-six
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hypothesis>0:${PORTSDIR}/devel/py-hypothesis \
+		${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock \
+		${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose
+
+USES=           python
+USE_GITHUB=	yes
+USE_PYTHON=	autoplist distutils
+
+GH_ACCOUNT=	matrix-org
+GH_PROJECT=	pymacaroons
+
+do-test:
+	@(cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} nosetests)
+
+.include <bsd.port.mk>

Added: head/security/py-pymacaroons-pynacl/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/py-pymacaroons-pynacl/distinfo	Fri Jan  8 05:03:39 2016	(r405526)
@@ -0,0 +1,2 @@
+SHA256 (matrix-org-pymacaroons-v0.9.3_GH0.tar.gz) = 871399c4dc1dfab7a435df2d5f2954cbba51d275ca2e93a96abb8b35d348fe5a
+SIZE (matrix-org-pymacaroons-v0.9.3_GH0.tar.gz) = 20872

Added: head/security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py	Fri Jan  8 05:03:39 2016	(r405526)
@@ -0,0 +1,30 @@
+--- tests/functional_tests/functional_tests.py.orig	2016-01-04 04:05:59 UTC
++++ tests/functional_tests/functional_tests.py
+@@ -3,6 +3,7 @@ import json
+ 
+ from mock import *
+ from nose.tools import *
++from unittest import skipUnless
+ 
+ import nacl.bindings
+ 
+@@ -11,6 +12,11 @@ from pymacaroons.serializers import *
+ from pymacaroons.exceptions import *
+ from pymacaroons.utils import *
+ 
++# A test desires libnacl, but we don't need it.
++try:
++    import libnacl
++except:
++    pass
+ 
+ ZERO_NONCE = truncate_or_pad(
+     b'\0', size=nacl.bindings.crypto_secretbox_NONCEBYTES)
+@@ -297,6 +303,7 @@ never use the same secret twice',
+         )
+         assert_true(verified)
+ 
++    @skipUnless('libnacl' in globals(), 'libnacl imported already')
+     @patch('libnacl.secret.libnacl.utils.rand_nonce')
+     def test_inspect(self, rand_nonce):
+         # use a fixed nonce to ensure the same signature

Added: head/security/py-pymacaroons-pynacl/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/py-pymacaroons-pynacl/pkg-descr	Fri Jan  8 05:03:39 2016	(r405526)
@@ -0,0 +1,6 @@
+Macaroons, like cookies, are a form of bearer credential. Unlike opaque tokens,
+macaroons embed caveats that define specific authorization requirements for the
+target service, the service that issued the root macaroon and which is capable
+of verifying the integrity of macaroons it receives.
+
+WWW: https://github.com/matrix-org/pymacaroons


More information about the svn-ports-head mailing list