Bug 435505 - Encode module in perl package can generate warnings.
Encode module in perl package can generate warnings.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl (Show other bugs)
5.1
All Linux
low Severity low
: rc
: ---
Assigned To: Stepan Kasal
desktop-bugs@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-29 14:42 EST by Jason Smith
Modified: 2010-01-12 04:40 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 493358 554661 (view as bug list)
Environment:
Last Closed: 2009-01-20 16:11:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 199785 None None None Never

  None (edit)
Description Jason Smith 2008-02-29 14:42:04 EST
Description of problem:
Perl's Encode module looks for a Encode::ConfigLocal module by calling:

eval { require Encode::ConfigLocal };

This Encode::ConfigLocal module does not exist, but since the require is wrapped
in an eval, it is not a fatal error, but depending on how the perl script is
written, this can generate warning messages, if for example the script is
catching eval errors and logging them.


Version-Release number of selected component (if applicable):
perl-5.8.8-10.el5_0.2 but I have also seen this in RHEL3 & RHEL4.


Additional info:
This was also reported in bugzilla issue #199785, but was closed without a fix
for some reason.  Since this can easily be fixed by executing "enc2xs -C",
shouldn't the perl package include this command in either the rpm build script
or a post-install script?
Comment 1 Marcela Mašláňová 2008-04-30 06:41:06 EDT
Could you be more specific? I see in generated file (by enc2xs) file including
definition of package mentioned above.

Also the issue doesn't exist any more.
Comment 2 Jason Smith 2008-04-30 08:19:35 EDT
If you have a perl script that catches and prints eval errors and it tried to
load the Encode module while running, it will print the message.  Here is an
example:

$ perl -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode;
print "Hello world.\n";'
Die: Can't locate Encode/ConfigLocal.pm in @INC (@INC contains:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi
/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi
/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Encode.pm line 52.

Hello world.

I have tested this on RHEL3, 4 & 5, with the same results.  The suggested
solution is to run the command: "enc2xs -C", so the best fix is to probably put
this into either the perl build/install script when making the rpm, or maybe in
a %post install script in the resulting perl rpm.

~Jason
Comment 3 Stepan Kasal 2008-05-08 08:27:59 EDT
This problem is tracked upstream as
http://rt.cpan.org/Public/Bug/Display.html?id=11511

BTW, it's not possible to directly run enc2xs in the build tree nor in the
BuildRoot.  But that's not a problem, an empty ConfigLocal.pm can be created
directly from the template.  It is necessary to flag it as "config, noreplace" then.
But running "enc2xs -C" from %post would also work.
And there is a third alternative solution: fix Encode.pm so that it avoids the
"require" in the file does not exist, as proposed on the upstream bug.

Let's check the upstream decision just before we get to actual work on a patch.
Comment 4 RHEL Product and Program Management 2008-06-02 16:16:08 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 5 Stepan Kasal 2008-07-04 05:39:10 EDT
Note that upstream has provided us a path:
http://rt.cpan.org/Public/Bug/Display.html?id=11511#txn-481431
Comment 11 errata-xmlrpc 2009-01-20 16:11:20 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0117.html

Note You need to log in before you can comment on or make changes to this bug.