From owner-freebsd-perl@FreeBSD.ORG Sun Sep 28 12:10:12 2008 Return-Path: Delivered-To: perl@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DE710657D7; Sun, 28 Sep 2008 12:10:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 382ED8FC17; Sun, 28 Sep 2008 12:10:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8SCA1QF068131; Sun, 28 Sep 2008 12:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8SCA102068130; Sun, 28 Sep 2008 12:10:01 GMT (envelope-from gnats) Resent-Date: Sun, 28 Sep 2008 12:10:01 GMT Resent-Message-Id: <200809281210.m8SCA102068130@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Cc: perl@freebsd.org Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5BFA106569B for ; Sun, 28 Sep 2008 12:03:08 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0CF8FC12 for ; Sun, 28 Sep 2008 12:03:08 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from amnesiac.at.no.dns ([91.78.250.120]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1KjuzT-000FRj-Ep for FreeBSD-gnats-submit@freebsd.org; Sun, 28 Sep 2008 16:03:07 +0400 Received: by shadow.localdomain (Postfix, from userid 1001) id 421D61719D; Sun, 28 Sep 2008 16:03:11 +0400 (MSD) Message-Id: <20080928120311.421D61719D@amnesiac.at.no.dns> Date: Sun, 28 Sep 2008 16:03:11 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: perl@freebsd.org Cc: Subject: ports/127695: [patch] security/p5-Net-SSLeay: shut up interactive prompt for BATCH mode X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 12:10:12 -0000 >Number: 127695 >Category: ports >Synopsis: [patch] security/p5-Net-SSLeay: shut up interactive prompt for BATCH mode >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 28 12:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-CURRENT amd64 >Organization: Code Labs >Environment: System: FreeBSD XXX 8.0-CURRENT FreeBSD 8.0-CURRENT #5: Tue Sep 23 18:11:49 MSD 2008 root@XXX:/usr/obj/usr/src/sys/XXX amd64 >Description: Currently security/p5-Net-SSLeay interactively prompts user about external tests during the port configuration phase: ----- Do you want to run external tests? These tests *will* *fail* if you do not have network connectivity. [n] ^C ----- It is very annoying to have this prompt during 'portupgrade -a' or the like -- it effectively hangs the process before human will type something on the keyboard, so routine upgrades of the installed ports are very "attention-hungry". >How-To-Repeat: Try to build security/p5-Net-SSLeay. >Fix: The following patch shuts up the prompt (and disables external tests) when BATCH variable is defined: --- disable-prompts-for-BATCH-mode.patch begins here --- diff -urN ./Makefile ../p5-Net-SSLeay/Makefile --- ./Makefile 2008-09-28 15:48:50.000000000 +0400 +++ ../p5-Net-SSLeay/Makefile 2008-09-28 15:53:55.000000000 +0400 @@ -7,6 +7,7 @@ PORTNAME= Net-SSLeay PORTVERSION= 1.35 +PORTREVISION= 1 CATEGORIES= security perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- @@ -20,6 +21,10 @@ MAN3= Net::SSLeay.3 Net::SSLeay::Handle.3 +.if defined(BATCH) +EXTRA_PATCHES+= ${PATCHDIR}/BATCH.patch +.endif + .if !defined(NOPORTEXAMPLES) PORTEXAMPLES= * post-install: diff -urN ./files/BATCH.patch ../p5-Net-SSLeay/files/BATCH.patch --- ./files/BATCH.patch 1970-01-01 03:00:00.000000000 +0300 +++ ../p5-Net-SSLeay/files/BATCH.patch 2008-09-28 15:48:31.000000000 +0400 @@ -0,0 +1,22 @@ +Disables prompt for the external connectivity tests. Meant to be used +in BATCH mode of port building. +--- inc/Module/Install/PRIVATE/Net/SSLeay.pm.orig 2008-09-28 15:43:59.000000000 +0400 ++++ inc/Module/Install/PRIVATE/Net/SSLeay.pm 2008-09-28 15:46:52.000000000 +0400 +@@ -45,15 +45,8 @@ + + $self->makemaker_args( CCCDLFLAGS => $opts->{cccdlflags} ); + +- if ( $self->prompt( +- "Do you want to run external tests?\n". +- "These tests *will* *fail* if you do not have network connectivity.", +- 'n', +- ) =~ /^y/i ) { +- $self->tests('t/*/*.t t/*/*/*.t'); +- } else { +- $self->tests('t/local/*.t t/handle/local/*.t'); +- } ++ # Skip tests that need network connectivity. ++ $self->tests('t/local/*.t t/handle/local/*.t'); + } + + sub ssleay_get_build_opts { --- disable-prompts-for-BATCH-mode.patch ends here --- Perhaps it will be better to conditionalize the external tests via WITH/WITHOUT variables. I can draft the needed modifications, if it is desirable. >Release-Note: >Audit-Trail: >Unformatted: