From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C89EE1396D9 for ; Thu, 26 Oct 2017 08:55:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 022F22BC012; Thu, 26 Oct 2017 08:55:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BB1D42BC012 for ; Thu, 26 Oct 2017 08:55:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A402133BE33 for ; Thu, 26 Oct 2017 08:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EFD25315 for ; Thu, 26 Oct 2017 08:55:02 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: <1509008095.0b935c7c65b88d3e755a97fcfd40bb8eeaf3c0f7.kentnl@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Log-TraceMessages/files/, dev-perl/Log-TraceMessages/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-perl/Log-TraceMessages/Log-TraceMessages-1.400.0-r1.ebuild dev-perl/Log-TraceMessages/files/Log-TraceMessages-1.400.0-posix-tmpnam.patch X-VCS-Directories: dev-perl/Log-TraceMessages/files/ dev-perl/Log-TraceMessages/ X-VCS-Committer: kentnl X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: 0b935c7c65b88d3e755a97fcfd40bb8eeaf3c0f7 X-VCS-Branch: master Date: Thu, 26 Oct 2017 08:55:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d9ccabbf-f9d3-4e62-a517-46aad252a2fc X-Archives-Hash: d7451c67e60bc574241259b9db369a72 commit: 0b935c7c65b88d3e755a97fcfd40bb8eeaf3c0f7 Author: Kent Fredric gentoo org> AuthorDate: Thu Oct 26 08:54:06 2017 +0000 Commit: Kent Fredric gentoo org> CommitDate: Thu Oct 26 08:54:55 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b935c7c dev-perl/Log-TraceMessages: Fix POSIX::tmpnam test failures bug #617052 Closes: https://bugs.gentoo.org/617052 Package-Manager: Portage-2.3.8, Repoman-2.3.3 .../Log-TraceMessages-1.400.0-r1.ebuild | 4 +- .../Log-TraceMessages-1.400.0-posix-tmpnam.patch | 78 ++++++++++++++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/dev-perl/Log-TraceMessages/Log-TraceMessages-1.400.0-r1.ebuild b/dev-perl/Log-TraceMessages/Log-TraceMessages-1.400.0-r1.ebuild index ff06c2c74f6..533799d8bc6 100644 --- a/dev-perl/Log-TraceMessages/Log-TraceMessages-1.400.0-r1.ebuild +++ b/dev-perl/Log-TraceMessages/Log-TraceMessages-1.400.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -15,5 +15,5 @@ IUSE="" RDEPEND=">=dev-perl/HTML-FromText-1.004" DEPEND="${RDEPEND}" - +PATCHES=("${FILESDIR}/${P}-posix-tmpnam.patch") SRC_TEST="do" diff --git a/dev-perl/Log-TraceMessages/files/Log-TraceMessages-1.400.0-posix-tmpnam.patch b/dev-perl/Log-TraceMessages/files/Log-TraceMessages-1.400.0-posix-tmpnam.patch new file mode 100644 index 00000000000..e5e4066198b --- /dev/null +++ b/dev-perl/Log-TraceMessages/files/Log-TraceMessages-1.400.0-posix-tmpnam.patch @@ -0,0 +1,78 @@ +From 26d6f87b667e9087694633b38750c8ef230fefca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 22 May 2017 15:18:01 +0200 +Subject: Use File::Temp::tempfile instead of POSIX::tmpnam +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Perl 5.26.0 removed POSIX::tmpnam(). + +Bug: https://rt.cpan.org/Ticket/Display.html?id=115089 +Bug: https://bugs.gentoo.org/617052 + +Signed-off-by: Petr Písař +--- + Makefile.PL | 5 ++++- + test.pl | 10 +++++----- + 2 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 9ff3e55..01f41a9 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -4,5 +4,8 @@ use ExtUtils::MakeMaker; + WriteMakefile( + 'NAME' => 'Log::TraceMessages', + 'VERSION_FROM' => 'TraceMessages.pm', # finds $VERSION +- 'PREREQ_PM' => { 'HTML::FromText' => '1.004' }, ++ 'PREREQ_PM' => { ++ 'File::Temp' => '0', ++ 'HTML::FromText' => '1.004', ++ }, + ); +diff --git a/test.pl b/test.pl +index d1afa67..c8635a7 100644 +--- a/test.pl ++++ b/test.pl +@@ -21,7 +21,7 @@ print "ok 1\n"; + ######################### End of black magic. + + use strict; +-use POSIX qw(tmpnam); ++use File::Temp qw(tempfile); + my $test_str = 'test < > &'; + my $debug = 0; + my $out; +@@ -50,7 +50,7 @@ print "ok 4\n"; + # Test 5 - t() with $CGI == 0 after setting a logfile + ${Log::TraceMessages::On} = 1; + ${Log::TraceMessages::CGI} = 0; +-my $tmp = tmpnam(); ++my ($fd, $tmp) = tempfile(); + ${Log::TraceMessages::Logfile} = $tmp; + $out = grab_output("t('$test_str')"); + ${Log::TraceMessages::Logfile} = undef; +@@ -68,7 +68,7 @@ unlink $tmp or die "cannot unlink $tmp: $!"; + # Test 6 - t() with $CGI == 1 after setting a different logfile + ${Log::TraceMessages::On} = 1; + ${Log::TraceMessages::CGI} = 1; +-my $tmp = tmpnam(); ++my ($fd, $tmp) = tempfile(); + ${Log::TraceMessages::Logfile} = $tmp; + $out = grab_output("t('$test_str')"); + ${Log::TraceMessages::Logfile} = undef; +@@ -124,8 +124,8 @@ print "ok 11\n"; + sub grab_output($) { + die 'usage: grab_stderr(string to eval)' if @_ != 1; + my $code = shift; +- require POSIX; +- my $tmp_o = POSIX::tmpnam(); my $tmp_e = POSIX::tmpnam(); ++ my ($fd_o, $tmp_o) = File::Temp::tempfile(); ++ my ($fd_e, $tmp_e) = File::Temp::tempfile(); + local *OLDOUT, *OLDERR; + + print "running code: $code\n" if $debug; +-- +2.14.3 +