Bug 216825

Summary: security/py-cryptography: update to 1.7.2, fix build with libressl-devel
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Matthew Rezny <rezny>
Status: Closed FIXED    
Severity: Affects Only Me CC: koobs
Priority: --- Flags: koobs: maintainer-feedback? (koobs)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
update security/py-cryptography to 1.7.2 none

Description Piotr Kubaj freebsd_committer freebsd_triage 2017-02-05 13:59:23 UTC
Created attachment 179645 [details]
patch

The port currently fails with:
cc -DNDEBUG -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -fPIC -I/usr/local/include/python2.7 -c build/temp.freebsd-10.3-RELEASE-p7-amd64-2.7/_openssl.c -o build/temp.freebsd-10.3-RELEASE-p7-amd64-2.7/build/temp.freebsd-10.3-RELEASE-p7-amd64-2.7/_openssl.o
build/temp.freebsd-10.3-RELEASE-p7-amd64-2.7/_openssl.c:3413:19: error: expected identifier or '('
static const long X509_V_ERR_HOSTNAME_MISMATCH = 0;
                  ^
/usr/local/include/openssl/x509_vfy.h:357:41: note: expanded from macro 'X509_V_ERR_HOSTNAME_MISMATCH'
#define         X509_V_ERR_HOSTNAME_MISMATCH                    62
                                                                ^
build/temp.freebsd-10.3-RELEASE-p7-amd64-2.7/_openssl.c:3414:19: error: expected identifier or '('
static const long X509_V_ERR_EMAIL_MISMATCH = 0;
                  ^
/usr/local/include/openssl/x509_vfy.h:358:38: note: expanded from macro 'X509_V_ERR_EMAIL_MISMATCH'
#define         X509_V_ERR_EMAIL_MISMATCH                       63
                                                                ^
build/temp.freebsd-10.3-RELEASE-p7-amd64-2.7/_openssl.c:3415:19: error: expected identifier or '('
static const long X509_V_ERR_IP_ADDRESS_MISMATCH = 0;
                  ^
/usr/local/include/openssl/x509_vfy.h:359:43: note: expanded from macro 'X509_V_ERR_IP_ADDRESS_MISMATCH'
#define         X509_V_ERR_IP_ADDRESS_MISMATCH                  64
                                                                ^
3 errors generated.
error: command 'cc' failed with exit status 1
*** Error code 1


The attached patch fixes those errors, allowing the port to build properly. This patch is from https://github.com/openbsd/ports/blob/master/security/py-cryptography/patches/patch-src__cffi_src_openssl_x509_vfy_py

Since it removes some code, it's only applied when libressl-devel is the default library.

It builds fine on Poudriere on 11.0.
Comment 1 Matthew Rezny freebsd_committer freebsd_triage 2017-02-07 02:18:47 UTC
Created attachment 179688 [details]
update security/py-cryptography to 1.7.2

I happened upon the same issue, updated the port, and prepared a patch prior to finding this PR. My solution is less intrusive so I've attached it as an alternative.

QA: Poudriere on 10.3/11.0 amd64/i386 OK
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-02-22 19:10:53 UTC
A commit references this bug:

Author: rezny
Date: Wed Feb 22 19:10:27 UTC 2017
New revision: 434632
URL: https://svnweb.freebsd.org/changeset/ports/434632

Log:
  Update to 1.7.2 and fix building with libressl-devel

  PR:		216825
  Approved by:	maintainer (timeout), swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9711

Changes:
  head/security/py-cryptography/Makefile
  head/security/py-cryptography/distinfo
  head/security/py-cryptography/files/
  head/security/py-cryptography/files/patch-src___cffi__src_openssl_x509__vfy.py
Comment 3 Matthew Rezny freebsd_committer freebsd_triage 2017-02-23 00:31:14 UTC
maintainer timed out