OK sthen@ for anyone who wants to import/update ... On 13 June 2015 16:13:10 BST, Johan Huldtgren <johan+openbsd-po...@huldtgren.com> wrote: >Minor update from 2.1.0 to 2.2.0. Diff and the dependencies attached. > >thanks, > >.jh > >On 2015-06-08 06:40, Stuart Henderson wrote: >> On 2015/06/05 09:23, Johan Huldtgren wrote: >>> Any takers? If I can get all these deps imported I can proceed to >>> actually >>> get the py-discogs-client updated. >> >> So, py-cryptography plus its deps are now in, the remaining ones >before >> we can update py-discogs-client are >> >> py-jwt >> py-test-cov >> py-oauthlib >> >> >>> On 2015-05-27 07:26, Stuart Henderson wrote: >>> >OK sthen@ if someone would like to import www/py-jwt and >>> >devel/py-test-cov. >>> >(Re-included in the tar.gz attached to this mail). Note that py-jwt >(and >>> >py-oauthlib) require py-cryptography (plus deps) from the port that >>> >I already sent out, which is still awaiting OKs/import. >>> > >>> >http://marc.info/?l=openbsd-ports&m=143219761119821&w=2 >>> > >>> >Slight tweak for py-oauthlib from that file, updated version >attached, >>> >also OK sthen@ to import. >>> > >>> >I think it would be reasonable to defer handling the remaining >oauthlib >>> >test failures until we run into problems with real programs, they >are >>> >all of the "algorithm not supported" variety and with this version >>> >there's nothing to suggest any major problem with the port. >>> > >>> >--- Makefile.orig Wed May 27 12:14:56 2015 >>> >+++ Makefile Wed May 27 12:18:01 2015 >>> >@@ -6,22 +6,12 @@ V = 0.20150523 >>> > GH_ACCOUNT = idan >>> > GH_PROJECT = oauthlib >>> > GH_COMMIT = 16cd3b255b2c86ec7da412357cad899c72d8dbf7 >>> >-DISTFILES = master${EXTRACT_SUFX} >>> >-DISTNAME = ${GH_PROJECT}-${V} >>> >-PKGNAME = py-${GH_PROJECT}-${V} >>> >+DISTNAME = py-${GH_PROJECT}-$V >>> > CATEGORIES = security >>> > MAINTAINER = Johan Huldtgren <jhuldtg...@gmail.com> >>> > >>> >-HOMEPAGE = https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/ >>> >- >>> >-MASTER_SITES = ${HOMEPAGE}archive/ >>> >- >>> > # BSD >>> > PERMIT_PACKAGE_CDROM = Yes >>> >- >>> >-EXTRACT_SUFX = .zip >>> >- >>> >-WRKDIST = ${WRKDIR}/${GH_PROJECT}-master >>> > >>> > MODULES = lang/python >>> > MODPY_SETUPTOOLS = Yes >>> >--- distinfo.orig Wed May 27 12:20:27 2015 >>> >+++ distinfo Wed May 27 12:17:30 2015 >>> >@@ -1,2 +1,2 @@ >>> >-SHA256 (master.zip) = vrdYFF1cw9EXt9DAVH+Rtx7D8Y6kCEpJ3kSTuEd8CLI= >>> >-SIZE (master.zip) = 226775 >>> >+SHA256 (py-oauthlib-0.20150523.tar.gz) = >>> >G9lXPHw+EIF5/s2aTkz+jrPWb4IuO6PcnoDbY4A/whM= >>> >+SIZE (py-oauthlib-0.20150523.tar.gz) = 142548 >>> > >>> > >>> >On 2015/05/26 19:26, Johan Huldtgren wrote: >>> >>On 2015-05-20 04:43, Stuart Henderson wrote: >>> >>> >>> >>>The distfile unpacks with no group-readable permissions. >>> >>>Simplest fix is probably >>> >>> >>> >>>post-extract: >>> >>> chmod -R o+rX ${WRKSRC} >>> >> >>> >>fixed. >>> >> >>> >>>So either we need an older PyJWT, or we need oauthlib head. I >wouldn't be >>> >>>averse to using head from a github checkout, but that is what >needs >>> >>>py-cryptography. >>> >> >>> >>ok, using the py-crypotography and it's depends from the other >thread, I >>> >>cobbled together a new port of py-oauthlib head together with the >latest >>> >>py-jwt. It builds and packages, and I can use py-discogs-client >together >>> >>with beets (really my only way of testing functionality). However >>> >>'make test' still fails, albeit with different errors than before: >>> >> >>> >>===> Regression tests for py-oauthlib-0.20150523 >>> >>cd /usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master && >>> >>/usr/local/bin/python2.7 -m unittest discover >>> >>>............................E..............................E........................EE...............E................................................................................................EE..EE..................................... >>> >>>====================================================================== >>> >>ERROR: test_rsa_signature >>> >>>(tests.oauth1.rfc5849.endpoints.test_base.SignatureVerificationTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/endpoints/test_base.py", >>> >>line 388, in test_rsa_signature >>> >> self.assertTrue(self.e._check_signature(r)) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/endpoints/base.py", >>> >>line 190, in _check_signature >>> >> valid_signature = signature.verify_rsa_sha1(request, rsa_key) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 596, in verify_rsa_sha1 >>> >> alg = _jwt_rs1_signing_algorithm() >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 474, in _jwt_rs1_signing_algorithm >>> >> _jwtrs1 = jwtalgo.RSAAlgorithm(jwtalgo.hashes.SHA1) >>> >>AttributeError: 'module' object has no attribute 'RSAAlgorithm' >>> >> >>> >>>====================================================================== >>> >>ERROR: test_rsa_method >>> >>(tests.oauth1.rfc5849.test_client.SignatureMethodTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/test_client.py", >>> >>line 89, in test_rsa_method >>> >> u, h, b = client.sign('http://example.com') >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/__init__.py", >>> >>line 306, in sign >>> >> ('oauth_signature', self.get_oauth_signature(request))) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/__init__.py", >>> >>line 153, in get_oauth_signature >>> >> sig = >self.SIGNATURE_METHODS[self.signature_method](base_string, >>> >>self) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 503, in sign_rsa_sha1_with_client >>> >> return sign_rsa_sha1(base_string, client.rsa_key) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 496, in sign_rsa_sha1 >>> >> alg = _jwt_rs1_signing_algorithm() >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 474, in _jwt_rs1_signing_algorithm >>> >> _jwtrs1 = jwtalgo.RSAAlgorithm(jwtalgo.hashes.SHA1) >>> >>AttributeError: 'module' object has no attribute 'RSAAlgorithm' >>> >> >>> >>>====================================================================== >>> >>ERROR: test_sign_rsa_sha1 >>> >>(tests.oauth1.rfc5849.test_signatures.SignatureTests) >>> >>Verify RSA-SHA1 signature against one created by OpenSSL. >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/test_signatures.py", >>> >>line 311, in test_sign_rsa_sha1 >>> >> sign = sign_rsa_sha1(base_string, private_key) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 496, in sign_rsa_sha1 >>> >> alg = _jwt_rs1_signing_algorithm() >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 474, in _jwt_rs1_signing_algorithm >>> >> _jwtrs1 = jwtalgo.RSAAlgorithm(jwtalgo.hashes.SHA1) >>> >>AttributeError: 'module' object has no attribute 'RSAAlgorithm' >>> >> >>> >>>====================================================================== >>> >>ERROR: test_sign_rsa_sha1_with_client >>> >>(tests.oauth1.rfc5849.test_signatures.SignatureTests) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/test_signatures.py", >>> >>line 324, in test_sign_rsa_sha1_with_client >>> >> sign = sign_rsa_sha1_with_client(base_string, self.client) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 503, in sign_rsa_sha1_with_client >>> >> return sign_rsa_sha1(base_string, client.rsa_key) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 496, in sign_rsa_sha1 >>> >> alg = _jwt_rs1_signing_algorithm() >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 474, in _jwt_rs1_signing_algorithm >>> >> _jwtrs1 = jwtalgo.RSAAlgorithm(jwtalgo.hashes.SHA1) >>> >>AttributeError: 'module' object has no attribute 'RSAAlgorithm' >>> >> >>> >>>====================================================================== >>> >>ERROR: test_request_body >(tests.oauth2.rfc6749.clients.test_service_application.ServiceApplicationClientTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File "/usr/local/lib/python2.7/site-packages/mock.py", line >1201, in >>> >>patched >>> >> return func(*args, **keywargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth2/rfc6749/clients/test_service_application.py", >>> >>line 90, in test_request_body >>> >> body=self.body) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/clients/service_application.py", >>> >>line 169, in prepare_request_body >>> >> assertion = jwt.encode(claim, key, 'RS256') >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jwt.py", >line 53, >>> >>in >>> >>encode >>> >> json_payload, key, algorithm, headers, json_encoder >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jws.py", >line >>> >>101, in >>> >>encode >>> >> raise NotImplementedError('Algorithm not supported') >>> >>NotImplementedError: Algorithm not supported >>> >> >>> >>>====================================================================== >>> >>ERROR: test_authorization_grant >>> >>(tests.oauth2.rfc6749.test_server.SignedTokenEndpointTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File "/usr/local/lib/python2.7/site-packages/mock.py", line >1201, in >>> >>patched >>> >> return func(*args, **keywargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth2/rfc6749/test_server.py", >>> >>line 234, in test_authorization_grant >>> >> '', body=body) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/base.py", >>> >>line 64, in wrapper >>> >> return f(endpoint, uri, *args, **kwargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/token.py", >>> >>line 100, in create_token_response >>> >> request, self.default_token_type) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py", >>> >>line 240, in create_token_response >>> >> token = token_handler.create_token(request, >refresh_token=True) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 256, in create_token >>> >> 'access_token': self.token_generator(request), >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 217, in signed_token_generator >>> >> return common.generate_signed_token(private_pem, request) >>> >> File >>> >>>"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/common.py", >>> >>line 243, in generate_signed_token >>> >> token = jwt.encode(claims, private_pem, 'RS256') >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jwt.py", >line 53, >>> >>in >>> >>encode >>> >> json_payload, key, algorithm, headers, json_encoder >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jws.py", >line >>> >>101, in >>> >>encode >>> >> raise NotImplementedError('Algorithm not supported') >>> >>NotImplementedError: Algorithm not supported >>> >> >>> >>>====================================================================== >>> >>ERROR: test_client_grant >>> >>(tests.oauth2.rfc6749.test_server.SignedTokenEndpointTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File "/usr/local/lib/python2.7/site-packages/mock.py", line >1201, in >>> >>patched >>> >> return func(*args, **keywargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth2/rfc6749/test_server.py", >>> >>line 277, in test_client_grant >>> >> '', body=body) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/base.py", >>> >>line 64, in wrapper >>> >> return f(endpoint, uri, *args, **kwargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/token.py", >>> >>line 100, in create_token_response >>> >> request, self.default_token_type) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py", >>> >>line 80, in create_token_response >>> >> token = token_handler.create_token(request, >refresh_token=False) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 256, in create_token >>> >> 'access_token': self.token_generator(request), >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 217, in signed_token_generator >>> >> return common.generate_signed_token(private_pem, request) >>> >> File >>> >>>"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/common.py", >>> >>line 243, in generate_signed_token >>> >> token = jwt.encode(claims, private_pem, 'RS256') >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jwt.py", >line 53, >>> >>in >>> >>encode >>> >> json_payload, key, algorithm, headers, json_encoder >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jws.py", >line >>> >>101, in >>> >>encode >>> >> raise NotImplementedError('Algorithm not supported') >>> >>NotImplementedError: Algorithm not supported >>> >> >>> >>>====================================================================== >>> >>ERROR: test_password_grant >>> >>(tests.oauth2.rfc6749.test_server.SignedTokenEndpointTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File "/usr/local/lib/python2.7/site-packages/mock.py", line >1201, in >>> >>patched >>> >> return func(*args, **keywargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth2/rfc6749/test_server.py", >>> >>line 249, in test_password_grant >>> >> '', body=body) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/base.py", >>> >>line 64, in wrapper >>> >> return f(endpoint, uri, *args, **kwargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/token.py", >>> >>line 100, in create_token_response >>> >> request, self.default_token_type) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py", >>> >>line 113, in create_token_response >>> >> token = token_handler.create_token(request, >self.refresh_token) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 256, in create_token >>> >> 'access_token': self.token_generator(request), >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 217, in signed_token_generator >>> >> return common.generate_signed_token(private_pem, request) >>> >> File >>> >>>"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/common.py", >>> >>line 243, in generate_signed_token >>> >> token = jwt.encode(claims, private_pem, 'RS256') >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jwt.py", >line 53, >>> >>in >>> >>encode >>> >> json_payload, key, algorithm, headers, json_encoder >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jws.py", >line >>> >>101, in >>> >>encode >>> >> raise NotImplementedError('Algorithm not supported') >>> >>NotImplementedError: Algorithm not supported >>> >> >>> >>>====================================================================== >>> >>ERROR: test_scopes_and_user_id_stored_in_access_token >>> >>(tests.oauth2.rfc6749.test_server.SignedTokenEndpointTest) >>> >>>---------------------------------------------------------------------- >>> >>Traceback (most recent call last): >>> >> File "/usr/local/lib/python2.7/site-packages/mock.py", line >1201, in >>> >>patched >>> >> return func(*args, **keywargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth2/rfc6749/test_server.py", >>> >>line 264, in test_scopes_and_user_id_stored_in_access_token >>> >> '', body=body) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/base.py", >>> >>line 64, in wrapper >>> >> return f(endpoint, uri, *args, **kwargs) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/endpoints/token.py", >>> >>line 100, in create_token_response >>> >> request, self.default_token_type) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py", >>> >>line 113, in create_token_response >>> >> token = token_handler.create_token(request, >self.refresh_token) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 256, in create_token >>> >> 'access_token': self.token_generator(request), >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth2/rfc6749/tokens.py", >>> >>line 217, in signed_token_generator >>> >> return common.generate_signed_token(private_pem, request) >>> >> File >>> >>>"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/common.py", >>> >>line 243, in generate_signed_token >>> >> token = jwt.encode(claims, private_pem, 'RS256') >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jwt.py", >line 53, >>> >>in >>> >>encode >>> >> json_payload, key, algorithm, headers, json_encoder >>> >> File "/usr/local/lib/python2.7/site-packages/jwt/api_jws.py", >line >>> >>101, in >>> >>encode >>> >> raise NotImplementedError('Algorithm not supported') >>> >>NotImplementedError: Algorithm not supported >>> >> >>> >>>---------------------------------------------------------------------- >>> >>Ran 241 tests in 1.545s >>> >> >>> >>FAILED (errors=9) >>> >>*** Error 1 in . (Makefile:42 'do-test') >>> >>*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2793 >>> >>'/usr/ports/pobj/py-oauthlib-0.20150523/.test_done') >>> >>*** Error 1 in /usr/ports/mystuff/security/py-oauthlib >>> >>(/usr/ports/infrastructure/mk/bsd.port.mk:2486 'test') >>> >> >>> >>Any hints gratefully accepted. The attached file contains >>> >>the latest py-oauthlib, plus it's depends. >>> >> >>> >>thanks, >>> >> >>> >>.jh >>>
-- Sent from a phone, please excuse the formatting.