From d592f9a5e0f014aa97a531e6a78b6f770f4f40cd Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 15 May 2018 15:03:42 +0200 Subject: [PATCH] Call sockhostname method on correct class object (bug #1578026) --- ...emon-6.01-Call-sockhostname-on-class-object.patch | 12 ++++++++++++ perl-HTTP-Daemon.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 HTTP-Daemon-6.01-Call-sockhostname-on-class-object.patch diff --git a/HTTP-Daemon-6.01-Call-sockhostname-on-class-object.patch b/HTTP-Daemon-6.01-Call-sockhostname-on-class-object.patch new file mode 100644 index 0000000..ebd0e95 --- /dev/null +++ b/HTTP-Daemon-6.01-Call-sockhostname-on-class-object.patch @@ -0,0 +1,12 @@ +diff -up HTTP-Daemon-6.01/lib/HTTP/Daemon.pm.orig HTTP-Daemon-6.01/lib/HTTP/Daemon.pm +--- HTTP-Daemon-6.01/lib/HTTP/Daemon.pm.orig 2018-05-15 13:26:53.449652641 +0200 ++++ HTTP-Daemon-6.01/lib/HTTP/Daemon.pm 2018-05-15 13:28:14.239205445 +0200 +@@ -61,7 +61,7 @@ sub url + $url .= '[' . inet_ntop(AF_INET6, $addr) . ']'; + } + else { +- my $host = $addr->sockhostname; ++ my $host = $self->sockhostname; + if (!defined $host) { + if (sockaddr_family($addr) eq AF_INET6) { + $host = '[' . inet_ntop(AF_INET6, $addr) . ']'; diff --git a/perl-HTTP-Daemon.spec b/perl-HTTP-Daemon.spec index c6d8e47..fa1d826 100644 --- a/perl-HTTP-Daemon.spec +++ b/perl-HTTP-Daemon.spec @@ -1,6 +1,6 @@ Name: perl-HTTP-Daemon Version: 6.01 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Simple HTTP server class License: GPL+ or Artistic URL: http://search.cpan.org/dist/HTTP-Daemon/ @@ -11,6 +11,9 @@ Patch0: HTTP-Daemon-6.01-Add-IPv6-support.patch # Accept undefined and empty-string LocalAddr as IO::Socket::INET does, # CPAN RT#91699, CPAN RT#123069 Patch1: HTTP-Daemon-6.01-Handle-undef-and-empty-LocalAddr.patch +# Call "sockhostname" method on class object instead of binary string +# bug #1578026, CPAN RT#125242 +Patch2: HTTP-Daemon-6.01-Call-sockhostname-on-class-object.patch BuildArch: noarch BuildRequires: make BuildRequires: perl-generators @@ -59,6 +62,7 @@ IO::Socket::IP, so you can perform socket operations directly on it too. %setup -q -n HTTP-Daemon-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 @@ -77,6 +81,9 @@ make test %{_mandir}/man3/* %changelog +* Tue May 15 2018 Jitka Plesnikova - 6.01-22 +- Call "sockhostname" method on correct class object (bug #1578026) + * Thu Feb 08 2018 Fedora Release Engineering - 6.01-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild