Bug 174930 - [PATCH] net/p5-Net-Server: Words that occur under specific conditions.
Summary: [PATCH] net/p5-Net-Server: Words that occur under specific conditions.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-perl (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 08:30 UTC by takefu
Modified: 2013-01-09 13:40 UTC (History)
1 user (show)

See Also:


Attachments
p5-Net-Server-2.006.patch (1.87 KB, patch)
2013-01-03 08:30 UTC, takefu
no flags Details | Diff
p5-Net-Server.tar.xz (1.07 KB, application/octet-stream)
2013-01-07 23:45 UTC, takefu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description takefu 2013-01-03 08:30:00 UTC
It is displayed by the specified condition as
"Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/site_perl/5.16.2/Net/Server.pm line 600."

See https://rt.cpan.org/Public/Bug/Display.html?id=78828

Added file(s):
- files/patch-lib-Net-Server.pm

Port maintainer (perl@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-03 08:30:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Anton Berezin freebsd_committer freebsd_triage 2013-01-03 09:01:39 UTC
State Changed
From-To: open->feedback

Could you resend a patch so that it actually applies?
Comment 3 takefu 2013-01-07 23:45:35 UTC
It files the patch, and it sends it.

-- 
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-01-09 13:30:54 UTC
Author: tobez
Date: Wed Jan  9 13:30:46 2013
New Revision: 310143
URL: http://svnweb.freebsd.org/changeset/ports/310143

Log:
  Fix spurious warnings triggered under certain conditions
  (see https://rt.cpan.org/Public/Bug/Display.html?id=78828).
  
  PR:	174930
  Submitted by:	Takefu <takefu at airport.fm>

Added:
  head/net/p5-Net-Server/files/
  head/net/p5-Net-Server/files/patch-lib-Net-Server.pm   (contents, props changed)
Modified:
  head/net/p5-Net-Server/Makefile

Modified: head/net/p5-Net-Server/Makefile
==============================================================================
--- head/net/p5-Net-Server/Makefile	Wed Jan  9 13:17:27 2013	(r310142)
+++ head/net/p5-Net-Server/Makefile	Wed Jan  9 13:30:46 2013	(r310143)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	p5-Net-Server
-# Date created:				24 Apr 2001
-# Whom:					Jesse McConnell <jesse@gallup.com>
-#
+# Created by: Jesse McConnell <jesse@gallup.com>
 # $FreeBSD$
-#
 
 PORTNAME=	Net-Server
 PORTVERSION=	2.006
+PORTREVISION=	1
 CATEGORIES=	net perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
@@ -46,6 +43,9 @@ MAN3=		Net::Server.3 \
 
 .include <bsd.port.options.mk>
 
+post-patch:
+	${RM} ${WRKSRC}/lib/Net/Server.pm.orig
+
 .if ${PORT_OPTIONS:MIPV6}
 BUILD_DEPENDS+=	p5-Socket6>=0.23:${PORTSDIR}/net/p5-Socket6
 RUN_DEPENDS+=	p5-Socket6>=0.23:${PORTSDIR}/net/p5-Socket6

Added: head/net/p5-Net-Server/files/patch-lib-Net-Server.pm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/p5-Net-Server/files/patch-lib-Net-Server.pm	Wed Jan  9 13:30:46 2013	(r310143)
@@ -0,0 +1,26 @@
+--- lib/Net/Server.pm.orig	2012-06-21 07:44:58.000000000 +0900
++++ lib/Net/Server.pm	2013-01-03 16:13:30.000000000 +0900
+@@ -587,7 +587,10 @@
+ 
+     # if the addr or host matches a deny, reject it immediately
+     foreach (@{ $prop->{'deny'} }) {
+-        return 0 if $prop->{'peerhost'} =~ /^$_$/ && defined $prop->{'reverse_lookups'};
++        return 0
++            if defined($prop->{'reverse_lookups'})
++            && defined($prop->{peerhost})
++            && $prop->{'peerhost'} =~ /^$_$/;
+         return 0 if $peeraddr =~ /^$_$/;
+     }
+     if (@{ $prop->{'cidr_deny'} }) {
+@@ -597,7 +600,10 @@
+ 
+     # if the addr or host isn't blocked yet, allow it if it is allowed
+     foreach (@{ $prop->{'allow'} }) {
+-        return 1 if $prop->{'peerhost'} =~ /^$_$/ && defined $prop->{'reverse_lookups'};
++        return 1
++            if defined($prop->{'reverse_lookups'})
++            && defined($prop->{peerhost})
++            && $prop->{'peerhost'} =~ /^$_$/;
+         return 1 if $peeraddr =~ /^$_$/;
+     }
+     if (@{ $prop->{'cidr_allow'} }) {
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Anton Berezin freebsd_committer freebsd_triage 2013-01-09 13:31:16 UTC
State Changed
From-To: feedback->closed

The fix has been committed (with modifications).  Thank you for your 
submission.