Bug 216825 - security/py-cryptography: update to 1.7.2, fix build with libressl-devel
Summary: security/py-cryptography: update to 1.7.2, fix build with libressl-devel
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthew Rezny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-05 13:59 UTC by Piotr Kubaj
Modified: 2017-07-05 12:50 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (koobs)


Attachments
patch (3.41 KB, patch)
2017-02-05 13:59 UTC, Piotr Kubaj
no flags Details | Diff
update security/py-cryptography to 1.7.2 (2.46 KB, patch)
2017-02-07 02:18 UTC, Matthew Rezny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 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 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 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 2017-02-23 00:31:14 UTC
maintainer timed out