[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#864910: jessie-pu: package debconf/1.5.56+deb8u1



Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

I'd like to cherry-pick the fix to #863479 into jessie in order to
reduce stderr noise in upgrades to stretch.  The single commit on top of
the current version in jessie follows.  I've left it as UNRELEASED for
the time being pending advice on whether I should put stable or
oldstable in the changelog given what date it is ...

commit c2f59e3fe49ef72cf575ff65da8aedae54ac10e5
Author: Niko Tyni <ntyni@debian.org>
Date:   Sun May 21 13:25:38 2017 +0300

    Use File::Temp instead of the deprecated POSIX::tmpnam() in Debconf::TmpFile
    
    File::Temp is in perl-base since jessie, so using it here should be fine.
    
    We no longer need to handle the sysopen() part ourselves.
    
    [Amended by Colin Watson to bump Pre-Depends on perl-base.]
    
    Closes: #863071

diff --git a/Debconf/TmpFile.pm b/Debconf/TmpFile.pm
index 66b77ba4..3b4832d9 100644
--- a/Debconf/TmpFile.pm
+++ b/Debconf/TmpFile.pm
@@ -10,6 +10,7 @@ package Debconf::TmpFile;
 use strict;
 use IO::File;
 use Fcntl;
+use File::Temp;
 
 =head1 DESCRIPTION
 
@@ -32,8 +33,7 @@ my $filename;
 sub open {
 	my $fh; # will be autovivified
 	my $ext=shift || '';
-	do { $filename=POSIX::tmpnam().$ext }
-	until sysopen($fh, $filename, O_WRONLY|O_TRUNC|O_CREAT|O_EXCL, 0600);
+	($fh, $filename) = File::Temp::tempfile(SUFFIX => $ext);
 	return $fh;
 }
 
diff --git a/debian/changelog b/debian/changelog
index eb6740f1..6afa8d3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debconf (1.5.56+deb8u1) UNRELEASED; urgency=medium
+
+  [ Niko Tyni ]
+  * Use File::Temp instead of the deprecated POSIX::tmpnam() in
+    Debconf::TmpFile (closes: #863071).
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 21 May 2017 18:05:18 +0100
+
 debconf (1.5.56) unstable; urgency=medium
 
   [ Helmut Grohne ]
diff --git a/debian/control b/debian/control
index 80369e85..b17b05da 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ X-Python-Version: >= 2.6
 
 Package: debconf
 Priority: important
-Pre-Depends: perl-base (>= 5.6.1-4)
+Pre-Depends: perl-base (>= 5.20.1-3~)
 Conflicts: cdebconf (<< 0.96), debconf-tiny, apt (<< 0.3.12.1), menu (<= 2.1.3-1), dialog (<< 0.9b-20020814-1), whiptail (<< 0.51.4-11), whiptail-utf8 (<= 0.50.17-13), debconf-utils (<< 1.3.22)
 Provides: debconf-2.0
 Replaces: debconf-tiny

Thanks,

-- 
Colin Watson                                       [cjwatson@debian.org]


Reply to: