Skip Menu |

This queue is for tickets about the Log-TraceMessages CPAN distribution.

Report information
The Basics
Id: 115089
Status: open
Priority: 0/
Queue: Log-TraceMessages

People
Owner: Nobody in particular
Requestors: gregoa [...] cpan.org
KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: gregoa [...] cpan.org
Subject: liblog-tracemessages-perl: Calling POSIX::tmpnam() is deprecated
We have the following bug reported to the Debian package of Log-TraceMessages (https://bugs.debian.org/826436): It doesn't seem to be a bug in the packaging, so you may want to take a look. Thanks! ------8<-----------8<-----------8<-----------8<-----------8<----- Package: liblog-tracemessages-perl Version: 1.4-3 Severity: minor User: debian-perl@lists.debian.org Usertags: perl-5.24-transition Building this package triggers a deprecation warning with Perl 5.24 (currently in experimental): PERL_DL_NONLAZY=1 "/usr/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl 1..11 ok 1 Calling POSIX::tmpnam() is deprecated at test.pl line 128. Calling POSIX::tmpnam() is deprecated at test.pl line 128. ok 2 ok 3 ok 4 Calling POSIX::tmpnam() is deprecated at test.pl line 53. ok 5 Calling POSIX::tmpnam() is deprecated at test.pl line 71. ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 A full build log is available at http://perl.debian.net/rebuild-logs/perl-5.24-throwaway/liblog-tracemessages-perl_1.4-3/ -- Niko Tyni ntyni@debian.org ------8<-----------8<-----------8<-----------8<-----------8<----- Thanks for considering, gregor herrmann, Debian Perl Group
On 2016-06-05 12:03:34, GREGOA wrote: Show quoted text
> We have the following bug reported to the Debian package of > Log-TraceMessages (https://bugs.debian.org/826436): > > It doesn't seem to be a bug in the packaging, so you may want to take > a look. Thanks! > > ------8<-----------8<-----------8<-----------8<-----------8<----- > > Package: liblog-tracemessages-perl > Version: 1.4-3 > Severity: minor > User: debian-perl@lists.debian.org > Usertags: perl-5.24-transition > > Building this package triggers a deprecation warning with Perl 5.24 > (currently in experimental): > > PERL_DL_NONLAZY=1 "/usr/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl > 1..11 > ok 1 > Calling POSIX::tmpnam() is deprecated at test.pl line 128. > Calling POSIX::tmpnam() is deprecated at test.pl line 128. > ok 2 > ok 3 > ok 4 > Calling POSIX::tmpnam() is deprecated at test.pl line 53. > ok 5 > Calling POSIX::tmpnam() is deprecated at test.pl line 71. > ok 6 > ok 7 > ok 8 > ok 9 > ok 10 > ok 11 > > A full build log is available at > http://perl.debian.net/rebuild-logs/perl-5.24-throwaway/liblog- > tracemessages-perl_1.4-3/
With perl 5.25.1 (and later) this is a fatal error: PERL_DL_NONLAZY=1 "/bbbike/perl-5.25.1t/bin/perl5.25.1" "-Iblib/lib" "-Iblib/arch" test.pl 1..11 Unimplemented: POSIX::tmpnam(): use File::Temp instead at /opt/perl-5.25.1t/lib/5.25.1/x86_64-linux-thread-multi/POSIX.pm line 187. Unimplemented: POSIX::tmpnam() at test.pl line 24. BEGIN failed--compilation aborted at test.pl line 24. not ok 1 Makefile:833: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 255
From: ppisar [...] redhat.com
Dne Ne 05.čen.2016 12:03:34, GREGOA napsal(a): Show quoted text
> Building this package triggers a deprecation warning with Perl 5.24 > (currently in experimental): > > PERL_DL_NONLAZY=1 "/usr/bin/perl" "-Iblib/lib" "-Iblib/arch" test.pl > 1..11 > ok 1 > Calling POSIX::tmpnam() is deprecated at test.pl line 128. > Calling POSIX::tmpnam() is deprecated at test.pl line 128.
A fix is attached.
Subject: Log-TraceMessages-1.4-Use-File-Temp-tempfile-instead-of-POSIX-tmpnam.patch
From 2dee259f876678100006d7c430a5580a77ff2c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Mon, 22 May 2017 15:18:01 +0200 Subject: [PATCH] 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(). CPAN RT#115089 Signed-off-by: Petr Písař <ppisar@redhat.com> --- 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.9.4