Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 130107
Status: open
Priority: 0/
Queue: Net-Server

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

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



From: gregoa [...] cpan.org
Subject: libnet-server-perl: Using Sys::Syslog triggers warning - Argument "0.33_01" isn't numeric
We have the following bug reported to the Debian package of Net-Server, c.f. https://bugs.debian.org/922765 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: libnet-server-perl Version: 2.009-1 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, using Sys::Syslog for logging triggers: Argument "0.33_01" isn't numeric in numeric lt (<) at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm line 39. Oneliner testcase perl -e "package Test; use base qw( Net::Server::PreFork ); use strict; Test->run({ log_file => 'Sys::Syslog' }); 1;" Sys::Syslog defines VERSION as 0.33_01 whereas Net::Server::Log::Sys::Syslog compares it numerically: 37 } else { 38 if (! defined $prop->{'syslog_logsock'}) { 39 $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < 0.15) ? 'unix' : ''; 40 } 41 if ($prop->{'syslog_logsock'} =~ /^(|native|tcp|udp|unix|inet|stream|console)$/) { 42 $prop->{'syslog_logsock'} = $1; 43 } else { 44 $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < 0.15) ? 'unix' : ''; Workaround is to set the syslog_logsock to something usable: perl -e "package Test; use base qw( Net::Server::PreFork ); use strict; Test->run({ log_file => 'Sys::Syslog', syslog_logsock => 'unix'}); 1;" Flo - -- System Information: Debian Release: 9.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.18.0-0.bpo.1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages libnet-server-perl depends on: ii libcgi-pm-perl 4.35-1 ii libio-multiplex-perl 1.16-1 ii libio-socket-inet6-perl 2.72-2 ii libio-socket-ssl-perl 2.044-1 ii libnet-cidr-perl 0.18-1 ii libnet-ssleay-perl 1.80-1 ii libsocket6-perl 0.27-1+b1 ii perl 5.24.1-3+deb9u5 libnet-server-perl recommends no packages. Versions of packages libnet-server-perl suggests: ii liblog-log4perl-perl 1.48-1+deb9u1 - -- no debconf information -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdb9o7oebX2papQ/KkN1BIMsJ8i8FAlxtQjUACgkQkN1BIMsJ 8i/JkQ//Uig+ywj1kauX3V9aZUrY3pZgwd40vHBRx9+xSj0gXmW5EcUrRKWTF9/X QO+EXTD5m6YW2mrG4GYRYmNiwt5EEsEsUCFF/4XCvrylHbGFRGgr7AAjprTlh3kO fsGwUlFlCAoxNUgkOaWUdcPMNVX8XRCbNEVOdsCV78waInehFLXHRpMDcvGTLfUJ qzA58Q6wHmVPG5a7NmBgcls0RMEPn3mwI/5NL8jrpfELcOy6x0NLsHNbcFFGYEgX bf1dl0Qi9b9p3AcoWc8kunhfxUsjvmcABxUss/tZ18xBAkFXeTZDJ+wDd33EOJN0 5U8UpkIakl9mgY96XfAV5f4TxbsVnAPvHinJy4rWXjQjulKiknuRShmMrvPJqcgJ d3b5Cx1HEp/qoH6I6+o4rizk22+9af7Cw6Ye6IQJr5FUgkgpeIxO7oTULXa0xJpR ikTnijwBtmKxOl5oZBy9tNRxMi4f3+CkOfqohwna+OzOwSJX7BQV24+JcK/Ev/Zq 9LCz5+lWeTdofF/3agPg3aQOKIGdV25JP4oi2kQmav2XzkDnQxRLSlzm+/S0GYV0 jx8aF6x+JHihUxk9uHzsJ4OGjOCF55U3HpYhk5xXvPxz+ptp7vNAI/U36YkIl+D+ 8FDV1nKh6Mc5Q12hvLDdjQmGqf/BtIPp78b+e+6s3acGmW1DvBw= =kZSS -----END PGP SIGNATURE----- ------8<-----------8<-----------8<-----------8<-----------8<----- Thanks for considering, gregor herrmann, Debian Perl Group
Hi, I created a patch. I hope this helps. Thank you, -- twata On 2019-7月-19 金 09:49:45, GREGOA wrote: Show quoted text
> We have the following bug reported to the Debian package of > Net-Server, c.f. https://bugs.debian.org/922765 > > 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: libnet-server-perl > Version: 2.009-1 > Severity: normal > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Hi, > using Sys::Syslog for logging triggers: > > Argument "0.33_01" isn't numeric in numeric lt (<) at > /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm line 39. > > Oneliner testcase > > perl -e "package Test; use base qw( Net::Server::PreFork ); use > strict; > Test->run({ log_file => 'Sys::Syslog' }); 1;" > > Sys::Syslog defines VERSION as 0.33_01 whereas > Net::Server::Log::Sys::Syslog compares it numerically: > > 37 } else { > 38 if (! defined $prop->{'syslog_logsock'}) { > 39 $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < > 0.15) ? 'unix' : ''; > 40 } > 41 if ($prop->{'syslog_logsock'} =~ > /^(|native|tcp|udp|unix|inet|stream|console)$/) { > 42 $prop->{'syslog_logsock'} = $1; > 43 } else { > 44 $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < > 0.15) ? 'unix' : ''; > > > Workaround is to set the syslog_logsock to something usable: > > perl -e "package Test; use base qw( Net::Server::PreFork ); use > strict; > Test->run({ log_file => 'Sys::Syslog', syslog_logsock => > 'unix'}); 1;" > > Flo > > > - -- System Information: > Debian Release: 9.6 > APT prefers stable-updates > APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, > 'proposed-updates'), (500, 'stable') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.18.0-0.bpo.1-amd64 (SMP w/4 CPU cores) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), > LANGUAGE=en_US:en (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > > Versions of packages libnet-server-perl depends on: > ii libcgi-pm-perl 4.35-1 > ii libio-multiplex-perl 1.16-1 > ii libio-socket-inet6-perl 2.72-2 > ii libio-socket-ssl-perl 2.044-1 > ii libnet-cidr-perl 0.18-1 > ii libnet-ssleay-perl 1.80-1 > ii libsocket6-perl 0.27-1+b1 > ii perl 5.24.1-3+deb9u5 > > libnet-server-perl recommends no packages. > > Versions of packages libnet-server-perl suggests: > ii liblog-log4perl-perl 1.48-1+deb9u1 > > - -- no debconf information > > -----BEGIN PGP SIGNATURE----- > > iQIzBAEBCAAdFiEEdb9o7oebX2papQ/KkN1BIMsJ8i8FAlxtQjUACgkQkN1BIMsJ > 8i/JkQ//Uig+ywj1kauX3V9aZUrY3pZgwd40vHBRx9+xSj0gXmW5EcUrRKWTF9/X > QO+EXTD5m6YW2mrG4GYRYmNiwt5EEsEsUCFF/4XCvrylHbGFRGgr7AAjprTlh3kO > fsGwUlFlCAoxNUgkOaWUdcPMNVX8XRCbNEVOdsCV78waInehFLXHRpMDcvGTLfUJ > qzA58Q6wHmVPG5a7NmBgcls0RMEPn3mwI/5NL8jrpfELcOy6x0NLsHNbcFFGYEgX > bf1dl0Qi9b9p3AcoWc8kunhfxUsjvmcABxUss/tZ18xBAkFXeTZDJ+wDd33EOJN0 > 5U8UpkIakl9mgY96XfAV5f4TxbsVnAPvHinJy4rWXjQjulKiknuRShmMrvPJqcgJ > d3b5Cx1HEp/qoH6I6+o4rizk22+9af7Cw6Ye6IQJr5FUgkgpeIxO7oTULXa0xJpR > ikTnijwBtmKxOl5oZBy9tNRxMi4f3+CkOfqohwna+OzOwSJX7BQV24+JcK/Ev/Zq > 9LCz5+lWeTdofF/3agPg3aQOKIGdV25JP4oi2kQmav2XzkDnQxRLSlzm+/S0GYV0 > jx8aF6x+JHihUxk9uHzsJ4OGjOCF55U3HpYhk5xXvPxz+ptp7vNAI/U36YkIl+D+ > 8FDV1nKh6Mc5Q12hvLDdjQmGqf/BtIPp78b+e+6s3acGmW1DvBw= > =kZSS > -----END PGP SIGNATURE----- > > > ------8<-----------8<-----------8<-----------8<-----------8<----- > > > Thanks for considering, > gregor herrmann, > Debian Perl Group
Subject: Net-Server-2.009-rt130107.patch
--- Net-Server-2.009/lib/Net/Server/Log/Sys/Syslog.pm 2017-08-11 03:19:34.000000000 +0900 +++ Net-Server-2.009-patched/lib/Net/Server/Log/Sys/Syslog.pm 2019-08-02 22:03:44.300000002 +0900 @@ -25,6 +25,9 @@ my ($class, $server) = @_; my $prop = $server->{'server'}; + my $syslog_version = $Sys::Syslog::VERSION; + $syslog_version =~ s/_.*//; + $server->configure({ syslog_logsock => \$prop->{'syslog_logsock'}, syslog_ident => \$prop->{'syslog_ident'}, @@ -36,12 +39,12 @@ # do nothing - assume they have what they want } else { if (! defined $prop->{'syslog_logsock'}) { - $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < 0.15) ? 'unix' : ''; + $prop->{'syslog_logsock'} = ($syslog_version < 0.15) ? 'unix' : ''; } if ($prop->{'syslog_logsock'} =~ /^(|native|tcp|udp|unix|inet|stream|console)$/) { $prop->{'syslog_logsock'} = $1; } else { - $prop->{'syslog_logsock'} = ($Sys::Syslog::VERSION < 0.15) ? 'unix' : ''; + $prop->{'syslog_logsock'} = ($syslog_version < 0.15) ? 'unix' : ''; } }