Fix segfault in SSL handling that manifests on OpenSSL 1.1.0 x86_64

(CPAN RT#118584, RHBZ#1390468)
This commit is contained in:
Paul Howarth 2016-11-25 08:57:19 +00:00
parent e0ba07bde7
commit 2876e5e6f0
2 changed files with 23 additions and 11 deletions

13
AnyEvent-7.13-ssl.patch Normal file
View File

@ -0,0 +1,13 @@
Fix for CPAN RT#118584 from Mike McCauley (Net::SSLeay upstream)
--- lib/AnyEvent/Handle.pm
+++ lib/AnyEvent/Handle.pm
@@ -2224,7 +2224,7 @@ sub starttls {
# Net::SSLeay::CTX_set_mode ($ssl,
# (eval { local $SIG{__DIE__}; Net::SSLeay::MODE_ENABLE_PARTIAL_WRITE () } || 1)
# | (eval { local $SIG{__DIE__}; Net::SSLeay::MODE_ACCEPT_MOVING_WRITE_BUFFER () } || 2));
- Net::SSLeay::CTX_set_mode ($tls, 1|2);
+ Net::SSLeay::set_mode ($tls, 1|2);
$self->{_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ());
$self->{_wbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ());

View File

@ -6,17 +6,15 @@
# Use weak dependencies where available
%global have_weak_deps 0%{?fedora} > 20 || 0%{?rhel} > 7
# SSL in Rawhide is currently flaky, probably due to pulling in a mix of OpenSSL versions
%global flaky_ssl 0%{?fedora} == 26
Name: perl-AnyEvent
Version: 7.13
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Framework for multiple event loops
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/AnyEvent/
Source0: http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/AnyEvent-%{version}%{?subver}.tar.gz
Patch0: AnyEvent-7.13-ssl.patch
# Build requirements
BuildRequires: coreutils
@ -52,11 +50,7 @@ BuildRequires: perl(Unicode::Normalize)
# Test suite requirements
BuildRequires: perl(File::Spec)
%if !(%flaky_ssl)
BuildRequires: perl(Net::SSLeay) >= 1.33
%else
BuildConflicts: perl-Net-SSLeay
%endif
BuildRequires: perl(Test::More)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
@ -75,9 +69,7 @@ BuildRequires: perl(Glib) >= 1.210
BuildRequires: perl(POE) >= 1.312
BuildRequires: perl(Tk)
%if 0%{?fedora}
%if !(%flaky_ssl)
BuildRequires: perl(AnyEvent::AIO)
%endif
BuildRequires: perl(EV) >= 4.00
BuildRequires: perl(IO::AIO) >= 4.13
BuildRequires: perl(IO::Async::Loop) >= 0.33
@ -146,6 +138,9 @@ time).
%prep
%setup -q -n AnyEvent-%{version}%{?subver}
# Fix segfault in SSL handling that manifests on OpenSSL 1.1.0 x86_64
%patch0
%build
PERL_CANARY_STABILITY_NOPROMPT=1 perl Makefile.PL INSTALLDIRS=vendor
@ -202,8 +197,12 @@ make test
%changelog
* Fri Nov 25 2016 Paul Howarth <paul@city-fan.org> - 7.13-4
- Fix segfault in SSL handling that manifests on OpenSSL 1.1.0 x86_64
(CPAN RT#118584, RHBZ#1390468)
* Tue Nov 1 2016 Paul Howarth <paul@city-fan.org> - 7.13-3
- Avoid interactive prompt duing build (#1390463)
- Avoid interactive prompt during build (#1390463)
- For now, BuildConflict with perl-Net-SSLeay on Rawhide (#1390468)
* Mon Oct 17 2016 Paul Howarth <paul@city-fan.org> - 7.13-2