From 4ea98af7a7fd80dc738ecf12eb406bc3030a676a Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Oct 29 2023 11:13:36 +0000 Subject: add back support for CURLOPT_RESOLV --- diff --git a/WWW-Curl-4.17-add-back-CURLOPT_RESOLV-support.patch b/WWW-Curl-4.17-add-back-CURLOPT_RESOLV-support.patch new file mode 100644 index 0000000..3c87dbf --- /dev/null +++ b/WWW-Curl-4.17-add-back-CURLOPT_RESOLV-support.patch @@ -0,0 +1,47 @@ +commit 379a461fa726498dcc7bf68e446c473eb73e310f +Author: Emmanuel Seyman +Date: Sun Oct 29 11:40:19 2023 +0100 + + revert commit 499baf9c3689c23dfc49196570fb230076c935de + + Commit 499baf9 added preprocessor conditionals based on whether + CURLOPT_RESOLVE is defined Unfortunately, CURLOPT_RESOLVE is an enum, + and NOT a preprocessor macro, so in effect this removed support for + CURLOPT_RESOLVE and results in a perl crash if the option is used. + +diff --git a/Curl.xs b/Curl.xs +index cfa282d..8085b49 100644 +--- a/Curl.xs ++++ b/Curl.xs +@@ -38,9 +38,7 @@ typedef enum { + SLIST_HTTPHEADER = 0, + SLIST_QUOTE, + SLIST_POSTQUOTE, +-#ifdef CURLOPT_RESOLVE + SLIST_RESOLVE, +-#endif + SLIST_LAST + } perl_curl_easy_slist_code; + +@@ -129,11 +127,9 @@ slist_index(int option) + case CURLOPT_POSTQUOTE: + return SLIST_POSTQUOTE; + break; +-#ifdef CURLOPT_RESOLVE + case CURLOPT_RESOLVE: + return SLIST_RESOLVE; + break; +-#endif + } + croak("Bad slist index requested\n"); + return SLIST_LAST; +@@ -745,9 +741,7 @@ curl_easy_setopt(self, option, value, push=0) + case CURLOPT_HTTPHEADER: + case CURLOPT_QUOTE: + case CURLOPT_POSTQUOTE: +-#ifdef CURLOPT_RESOLVE + case CURLOPT_RESOLVE: +-#endif + { + /* This is an option specifying a list, which we put in a curl_slist struct */ + AV *array = (AV *)SvRV(value); diff --git a/perl-WWW-Curl.spec b/perl-WWW-Curl.spec index c63f858..a840d98 100644 --- a/perl-WWW-Curl.spec +++ b/perl-WWW-Curl.spec @@ -14,6 +14,8 @@ Patch2: WWW-Curl-4.17-Adapt-to-changes-in-cURL-7.69.0.patch Patch3: WWW-Curl-4.17-Adapt-to-curl-7.87.0.patch # Workound a bug in cURL 7.87.0, bug #2160057, CPAN RT#145992 Patch4: WWW-Curl-4.17-Work-around-a-macro-bug-in-curl-7.87.0.patch +# Workound a bug in WWW::CURL 4.17, bug #2245689, GH #9 +Patch5: WWW-Curl-4.17-add-back-CURLOPT_RESOLV-support.patch BuildRequires: findutils BuildRequires: make BuildRequires: perl-interpreter @@ -38,16 +40,11 @@ BuildRequires: libcurl-devel WWW::Curl is a Perl extension interface for libcurl. %prep -%setup -q -n WWW-Curl-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%autosetup -n WWW-Curl-%{version} rm -rf inc && sed -i -e '/^inc\//d' MANIFEST %build -perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1 +/usr/bin/perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} %install @@ -77,6 +74,10 @@ make test %{_mandir}/man3/* %changelog +* Sun Oct 29 2023 Emmanuel Seyman - 4.17-36 +- Add back support for CURLOPT_RESOLV +- Use %%autosetup to apply all patches + * Fri Jul 21 2023 Fedora Release Engineering - 4.17-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild