Bug 270318

Summary: security/py-cryptography does not build with libressl-3.6.2
Product: Ports & Packages Reporter: jakub_lach
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me CC: fixer, freebsd, illusionusable715, zirias
Priority: --- Flags: bugzilla: maintainer-feedback? (sunpoet)
Version: Latest   
Hardware: Any   
OS: Any   

Description jakub_lach 2023-03-18 18:48:15 UTC
cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -march=penryn -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -march=penryn -I/usr/local/include -fstack-protecto                                    r-strong -fno-strict-aliasing -fPIC -I/usr/local/include/python3.9 -c build/temp.freebsd-13.2-STABLE-amd64-cpython-39/_openssl.c -o build/temp.freebsd-13.2-STABLE-amd64-cpython-39/build/temp.freebsd-13.2-STABLE-amd64-cpython-39/_openssl.o -Wconversion -Wno-error=sign-conversion build/temp.freebsd-13.2-STABLE-amd64-cpython-39/_openssl.c:922:8: error: redefinition of 'OPENSSL_cleanup' as different kind of symbol void (*OPENSSL_cleanup)(void) = NULL; 

<...>
Comment 1 Peter Putzer 2023-03-18 20:35:24 UTC
Looks like the port needs a bump to 38.0.4: https://github.com/pyca/cryptography/issues/7807
Comment 2 Peter Putzer 2023-03-18 20:35:42 UTC
Looks like the port needs a bump to 38.0.4: https://github.com/pyca/cryptography/issues/7807
Comment 3 Peter Putzer 2023-03-18 22:15:28 UTC
(In reply to Peter Putzer from comment #2)
I have been able to build the port using the OpenBSD patch https://github.com/openbsd/ports/blob/8c2bfe49f1d114455b417e380e84608e8303cdb1/security/py-cryptography/patches/patch-src__cffi_src_openssl_crypto_py
Comment 4 jakub_lach 2023-03-18 23:20:33 UTC
(In reply to Peter Putzer from comment #3)

Confirmed. The warnings are obviously still present.
Comment 5 Felix Palmen freebsd_committer freebsd_triage 2023-03-23 09:38:39 UTC
Fix suggested in review D39224
Comment 6 jakub_lach 2023-03-23 12:43:23 UTC
(In reply to Felix Palmen from comment #5)

That also works for me.
Comment 7 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-27 14:09:59 UTC
(In reply to Felix Palmen from comment #5)

Please go ahead.

BTW, patch-libressl35 can be renamed to patch-libressl since security/libressl in main is 3.6 now. Besides the rename, do you aware of anything in files/patch-libressl35 is only for LibreSSL 3.5 which can be removed?
Comment 8 Felix Palmen freebsd_committer freebsd_triage 2023-03-27 15:21:25 UTC
(In reply to Po-Chuan Hsieh from comment #7)
> do you aware of anything in files/patch-libressl35 is only for LibreSSL 3.5
> which can be removed?
Unfortunately, no. But checking that of course makes sense, so I'll do a bit of "trial&error" building before proceeding here and will update the review once done!
Comment 9 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-27 15:27:55 UTC
(In reply to Felix Palmen from comment #8)

You could just commit it after your testing.
Please also rename the patch to patch-libressl or patch-libressl36.
Thanks.
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-03-28 08:04:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b5363bc1f2ff8f2815d58a4b04451334d56d1394

commit b5363bc1f2ff8f2815d58a4b04451334d56d1394
Author:     Felix Palmen <zirias@FreeBSD.org>
AuthorDate: 2023-03-22 07:30:27 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-03-28 08:02:07 +0000

    security/py-cryptography: Fix with libressl 3.6

    PR:                     270318
    Approved by:            sunpoet (maintainer)
    Approved by:            tcberner (mentor, implicit: libressl)
    Differential Revision:  https://reviews.freebsd.org/D39224

 .../files/{patch-libressl35 => patch-libressl}     | 39 +++++++++++++++++-----
 1 file changed, 31 insertions(+), 8 deletions(-)
Comment 11 Felix Palmen freebsd_committer freebsd_triage 2023-03-28 08:07:35 UTC
Testing confirmed the whole patch is still needed. The updated patch was already confirmed here, so I assume this is now fixed.