Bug#415969: libsys-syslog-perl: namespace pollution

Niko Tyni ntyni at iki.fi
Wed Apr 4 15:44:52 UTC 2007


clone 415969 -1 -2
retitle -1 libsys-syslog-perl: warning from closelog()
retitle -2 libsys-syslog-perl: missing manual page
retitle 415969 libsys-syslog-perl: relation to Sys::Syslog in perl-modules should be documented
tag -1 upstream patch
forwarded -1 http://rt.cpan.org/Public/Bug/Display.html?id=25488
tag -2 upstream patch
forwarded -2 http://rt.cpan.org/Public/Bug/Display.html?id=26097
thanks

On Fri, Mar 23, 2007 at 01:19:23PM +0000, Justin B Rye wrote:
> Package: libsys-syslog-perl
> Version: 0.18-1
> Severity: normal
> 
> This package uses the same module name as the Sys::Syslog included
> as /usr/lib/perl/5.8.8/Sys/Syslog.pm in the package perl itself, but
> puts it in /usr/lib/perl5.

This is a feature. The package contains a newer version of Sys::Syslog
than the one bundled with Perl 5.8.8 (0.13). This is standard practice.
Quoting Debian Perl Policy, Section 4.1:

 The Perl distribution includes many modules available separately from
 CPAN, which may have a newer version. The intent of the @INC ordering
 (described in Module Path, Section 2.3) is to allow such modules to be
 packaged to vendor which take precedence over the version in core. A
 packaged module which shadows a core module in this way must be a
 newer version.

Obviously, the separately packaged version should be backwards-compatible,
and it's a bug if it isn't.

> When the admin installs mailscanner (Depends: libsys-syslog-perl),
> users' scripts that call "use Sys::Syslog" silently change
> behaviour.  In my own case, the closelog() function started giving 
> me new error messages like this one:
> 
> jbr at hurakan:~$ perl -MSys::Syslog -we 'openlog qw(va pid); closelog'
> Use of uninitialized value in string eq at /usr/lib/perl5/Sys/Syslog.pm line 631.

Sure, the warning is a bug, and I'm cloning it into another bug report.
This is also upstream bug #25488 [1]. I'm attaching the patch from
the upstream report. This will be fixed in the next Debian version of
this package.

> (That's a second bug.)  Fortunately I spotted the ".../perl5/...";
> otherwise it would have been even more confusing.  As it was, "man
> Sys::Syslog" was telling me about the wrong version (this package 
> contains no manpage - bug three). 

The missing manual page is indeed another bug, and I'm cloning another
bug report for it as well. The upstream distribution does not build and
install a man page by default. I have reported this as upstream bug #26097
[2]. Patch attached; this will be fixed in the next Debian version.

> Why does this package even exist?  Do we in fact know that packages
> that depend on it such as mailscanner, ps-watcher etc need anything
> more than /usr/lib/perl/5.8.8/Sys/Syslog.pm?  

The libsys-syslog-perl package was introduced in Debian by Matthias
Klose exactly because mailscanner requires a newer Sys::Syslog than
the one currently bundled with Perl. This is mentioned in the first
libsys-syslog-perl changelog entry.

> If they do, it seems to me it should mean either
> 
>  a) mailscanner depends on perl >> something

This is not possible until a newer version of perl with the newer
Sys::Syslog is in Debian. The maintainer of the Debian perl package
rarely if ever updates the modules in the core Perl package from those
bundled upstream, but rather prefers having them packaged separately,
which is what we are doing here. See eg. #383517.

> or
> 
>  b) mailscanner depends on a co-installable fork, Sys::Syslog2

This is not a fork, it's another version of the same module by
the same upstream author.

> or as an absolute last resort,
> 
>  z) some sort of warning is given in the package description that
> 	these libraries stomp all over perl's namespace

I agree: the libsys-syslog-perl package description should mention that
it's a newer version of the same package that's included in perl-modules.
I will add this for the next version of the package.

> And that's only a mitigating workaround, not a fix.  It will only
> help at all if sysadmins routinely scrutinise the long descriptions
> on library packages before letting them be automatically installed,
> and that's an unreasonable thing to expect.

I disagree: as long as the new version is backwards-compatible, there
is no problem. Any incompatibilities must be fixed, of course.

I hope this satisfies your concerns. Thanks for reporting these issues.

[1] http://rt.cpan.org/Public/Bug/Display.html?id=25488
[2] http://rt.cpan.org/Public/Bug/Display.html?id=26097

Cheers,
-- 
Niko Tyni   ntyni at iki.fi
-------------- next part --------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

diff -u -r Sys-Syslog-0.18.orig/Syslog.pm Sys-Syslog-0.18/Syslog.pm
- --- Sys-Syslog-0.18.orig/Syslog.pm	2006-08-29 05:26:09.000000000 +0800
+++ Sys-Syslog-0.18/Syslog.pm	2007-03-17 01:10:58.000000000 +0800
@@ -628,7 +628,7 @@
     $connected = 0;
     $syslog_send = undef;
 
- -    if($current_proto eq 'native') {
+    if(defined $current_proto && $current_proto eq 'native') {
         eval { close_xs() };
         return 1;
     }
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFF+s/ai9gubzC5S1wRAl3nAJ9YXIYqhC2i5TsQKKPnGAckQeZWDwCdEzUA
U0BbbCp2ziRnRJHhtHWsmWo=
=HQO8
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: man-page-missing.patch
Type: text/x-diff
Size: 360 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20070404/6753beac/man-page-missing.bin


More information about the pkg-perl-maintainers mailing list