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

Bug#898466: wdg-html-validator: “validate” command-line script fails due to calling obsolete Perl routine



Package: wdg-html-validator
Version: 1.6.2-8
Severity: important
Tags: patch

Dear Maintainer,

Attempting to use the “validate” command to validate an HTML file produces
the error message:

    Unimplemented: POSIX::tmpnam(): use File::Temp instead at /usr/bin/validate line 662.

I was able to get it working again with the following patch:

--- /usr/bin/validate   2015-07-19 01:56:00.000000000 +1200
+++ /usr/local/bin/validate     2018-05-12 13:25:06.421172464 +1200
@@ -28,6 +28,7 @@
 use Getopt::Long qw(GetOptions);
 use Text::Wrap qw(wrap);
 use POSIX qw(:fcntl_h);
+use File::Temp qw/tempfile/;
 
 # If File::Spec::Functions isn't available, let's fall back quietly
 # to a replacement function.
@@ -659,7 +660,7 @@
 sub getTempFile {
     my $filename;
     do {
-        $filename = POSIX::tmpnam();
+        $filename = File::Temp::tempfile();
     } until sysopen(FH, $filename, O_RDWR|O_CREAT|O_EXCL, 0666);
 
     return ($filename, \*FH);

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_NZ.utf8), LANGUAGE=en_NZ:en (charmap=UTF-8) (ignored: LC_ALL set to en_NZ.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wdg-html-validator depends on:
ii  libhtml-parser-perl     3.72-3+b2
ii  libi18n-charset-perl    1.417-1
ii  libjconv-bin            2.8-7+b1
ii  libunicode-map8-perl    0.13+dfsg-4+b4
ii  libunicode-string-perl  2.10-1+b3
ii  libwww-perl             6.33-1
ii  opensp                  1.5.2-13+b1
ii  perl                    5.26.1-6
ii  sgml-data               2.0.10
ii  w3c-dtd-xhtml           1.2-4

Versions of packages wdg-html-validator recommends:
ii  apache2 [httpd]  2.4.33-1

Versions of packages wdg-html-validator suggests:
pn  wdg-html-reference  <none>

-- no debconf information

Reply to: