Camel in a Hat

Packaging CPAN distributions on perl without '.' in @INC

Petr Pisar, 2017-02-20T10:17:15
Hello,

those who follow Perl 5 Porters know that Perl 5.26.0 will be possible to be
built without '.' in the default @INC path
<http://search.cpan.org/~abigail/perl-5.25.9/pod/perl5257delta.pod#%27.%27_and_(a)INC>
and that being it default 5.28.0 behavior is the current plan. For security
reasons, I'd like to configure perl this way as soon as possible. That means
perl-5.26.0 in Fedora 27.

Removing dot from @INC will affect many CPAN distributions (last estimate was
3000). Reportedly, there will be applied some mitigations to CPAN clients and
Test::Harness to ease the transition. But you can already see distributions
applying a fix now, like inc::Module::Install users:

--- Module-Install-CheckLib-0.10/Makefile.PL
+++ Module-Install-CheckLib-0.12/Makefile.PL
@@ -1,3 +1,4 @@
+use if ! ( grep { $_ eq '.' } @INC ), qw[lib .];
 use strict;
 use inc::Module::Install;

The exact fix varies, somebody injects the dot only when needed (like the
example above), somebody injects the dot unconditionally, somebody loads
modules by absolute paths based on FindBin output.

But the main point of this message is my recommendation to count with this
change when packaging and not to forget to build-require perl(lib) in cases
similar to the quoted one.

-- Petr
Discussion

On new zlib breaking perl

Petr Pisar, 2017-02-10T09:12:34
Hello,

you could notice that after Rawhide upgraded zlib from 1.2.8 to 1.2.11 perl
(bug #1420326), perl-Compress-Raw-Zlib (bug #1419841), and perl-IO-Compress
(bug #1420012) started failing tests.

The reason is zlib-1.2.9 changed behavior of deflateParams() function and this
change propagates to all zlib users. Because perl-Compress-Raw-Zlib tests
a Perl wrapper for deflateParams(), perl-Compress-Raw-Zlib build fails. Because
perl-IO-Compress is built on top of Compress::Raw::Zlib and it does the same
tests, it fails. And perl bundles both of the distributions and thus fails
either.

I prepared test adjustements, posted them to upstreams, and applied to
perl-Compress-Raw-Zlib. But then Paul reported the new tests do not work
with ancient zlib version that exist in RHELs. So I looked again at the
Compress-Raw-Zlib code and found out there is a deficiency in deflateParams()
wrapper. Correct fix that could hide the zlib behavior change for Perl
programs and thus eliminite need for patching tests in all the three packages
will require more work
<https://rt.cpan.org/Public/Bug/Display.html?id=119762>.

Because upstream is working on it I believe there will bw proper fix once day.
In the mean time, I will patch the tests in Fedora packages because we need
buildable perl (we have Fedora mass rebuild, new GCC, some perl bug fixes
ahead). I believe patching the tests does not make things worse because the
current binary packages are already affected by the new zlib that is already
in use. When proper fix is available I will revert the patches.

-- Petr
Discussion

Reviews needed: perl-Mail-Message and perl-Mail-Transport

Tom Callaway, 2017-02-07T16:27:58
These new components came out of perl-Mail-Box at 3.000. I need them
reviewed to update Mail::Box.

https://bugzilla.redhat.com/show_bug.cgi?id=1420099
https://bugzilla.redhat.com/show_bug.cgi?id=1420100

~tom

==
Red Hat
Discussion
Generated from https://lists.fedoraproject.org/archives/list/perl-devel%40lists.fedoraproject.org/ at 2017-02-20T10:03:02. Report issues with this page to Petr Pisar <ppisar@redhat.com>.