From 957b9f7d7fb682186beacbd9f90b8daaa57f6623 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 27 Mar 2024 20:15:22 +0000 Subject: [PATCH] import CS perl-AnyEvent-7.14-8.el8 --- ...yEvent-7.14-fix_minimal_dh_algorithm.patch | 12 +++++ SPECS/perl-AnyEvent.spec | 46 ++++++++++++++++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 SOURCES/AnyEvent-7.14-fix_minimal_dh_algorithm.patch diff --git a/SOURCES/AnyEvent-7.14-fix_minimal_dh_algorithm.patch b/SOURCES/AnyEvent-7.14-fix_minimal_dh_algorithm.patch new file mode 100644 index 0000000..68a0687 --- /dev/null +++ b/SOURCES/AnyEvent-7.14-fix_minimal_dh_algorithm.patch @@ -0,0 +1,12 @@ +diff -r -u AnyEvent-7.14.orig/t/80_ssltest.t AnyEvent-7.14/t/80_ssltest.t +--- AnyEvent-7.14.orig/t/80_ssltest.t 2012-05-13 01:06:34.000000000 +0200 ++++ AnyEvent-7.14/t/80_ssltest.t 2023-08-23 11:28:59.863150707 +0200 +@@ -11,7 +11,7 @@ + use AnyEvent::Handle; + use AnyEvent::TLS; + +-my $ctx = new AnyEvent::TLS cert_file => $0; ++my $ctx = new AnyEvent::TLS cert_file => $0, dh => "schmorp2048"; + + for my $mode (1..5) { + ok (1, "mode $mode"); diff --git a/SPECS/perl-AnyEvent.spec b/SPECS/perl-AnyEvent.spec index d19fb23..a46f8ac 100644 --- a/SPECS/perl-AnyEvent.spec +++ b/SPECS/perl-AnyEvent.spec @@ -13,12 +13,14 @@ Name: perl-AnyEvent Version: 7.14 -Release: 6%{?dist} +Release: 8%{?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 +# rhbz#2108086 - Build is failing in %check section +Patch0: AnyEvent-7.14-fix_minimal_dh_algorithm.patch # Build requirements BuildRequires: coreutils @@ -137,6 +139,9 @@ Requires: perl(Unicode::Normalize) # underlying modules are not currently available in Fedora %global __provides_exclude ^perl[(](AnyEvent(::Impl::(Cocoa|FLTK|UV))?|DB)[)]$ +# Remove private test modules +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(.::t/io_common\\)$ + %description AnyEvent provides an identical interface to multiple event loops. This allows @@ -145,8 +150,25 @@ same event loop (as multiple event loops cannot coexist peacefully at any one time). +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness + + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + + %prep %setup -q -n AnyEvent-%{version}%{?subver} +%patch0 -p1 +# Help generators to recognize Perl scripts +for F in $(find t/ -name '*.t'); do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build @@ -157,6 +179,14 @@ make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test %check @@ -203,7 +233,21 @@ make test %{_mandir}/man3/AnyEvent::Util.3* +%files tests +%{_libexecdir}/%{name} + + %changelog +* Wed Nov 15 2023 Michal Josef Špaček - 7.14-8 +- Update tests for nitrate + Resolves: RHEL-5540 + +* Wed Aug 23 2023 Michal Josef Špaček - 7.14-7 +- Fix tests run by adding better algorithm + Resolves: rhbz#2108086 +- Package tests + Resolves: rhbz#2108086 + * Tue Jul 17 2018 Petr Pisar - 7.14-6 - Do not test optional backends