Bug 10449 - Module-Build-Tiny fails tests with Mageia's perl (it's fine with a perl built from source)
: Module-Build-Tiny fails tests with Mageia's perl (it's fine with a perl built...
Status: RESOLVED FIXED
Product: Mageia
Classification: Unclassified
Component: RPM Packages
: Cauldron
: x86_64 Linux
: Normal Severity: normal
: ---
Assigned To: Jerome Quelin
:
:
:
: NEEDINFO, Triaged
:
:
  Show dependency treegraph
 
Reported: 2013-06-06 19:14 CEST by Shlomi Fish
Modified: 2014-04-07 09:36 CEST (History)
2 users (show)

See Also:
Source RPM: perl-5.18.0-3.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Shlomi Fish 2013-06-06 19:14:03 CEST
Description of problem:

When I build Module-Build-Tiny using the Mageia perl, then the tests fail. It's OK with a perl-5.18.0 on perlbrew:

[SHELL]

shlomif@telaviv1:~$ which perl
/usr/bin/perl
shlomif@telaviv1:~$ tar -xvf Module-Build-Tiny-0.023.tar.gz 
Module-Build-Tiny-0.023/
Module-Build-Tiny-0.023/INSTALL
Module-Build-Tiny-0.023/t/
Module-Build-Tiny-0.023/t/release-pod-syntax.t
Module-Build-Tiny-0.023/t/lib/
Module-Build-Tiny-0.023/t/lib/DistGen.pm
Module-Build-Tiny-0.023/t/simple.t
Module-Build-Tiny-0.023/t/00-compile.t
Module-Build-Tiny-0.023/Build.PL
Module-Build-Tiny-0.023/lib/
Module-Build-Tiny-0.023/lib/Module/
Module-Build-Tiny-0.023/lib/Module/Build/
Module-Build-Tiny-0.023/lib/Module/Build/Tiny.pm
Module-Build-Tiny-0.023/dist.ini
Module-Build-Tiny-0.023/LICENSE
Module-Build-Tiny-0.023/Todo
Module-Build-Tiny-0.023/META.json
Module-Build-Tiny-0.023/Changes
Module-Build-Tiny-0.023/MANIFEST
Module-Build-Tiny-0.023/META.yml
Module-Build-Tiny-0.023/README
shlomif@telaviv1:~$ cd Mod
Module-Build-Tiny-0.023/        Module-Build-Tiny-0.023.tar.gz
shlomif@telaviv1:~$ cd Module-Build-Tiny-0.023
shlomif@telaviv1:~/Module-Build-Tiny-0.023$ ls
Build.PL  dist.ini  lib      MANIFEST   META.yml  t
Changes   INSTALL   LICENSE  META.json  README    Todo                          
shlomif@telaviv1:~/Module-Build-Tiny-0.023$ perl Build.PL                       
Creating new 'Build' script for 'Module-Build-Tiny' version '0.023'             
shlomif@telaviv1:~/Module-Build-Tiny-0.023$ ./Build build                       
cp lib/Module/Build/Tiny.pm blib/lib/Module/Build/Tiny.pm                       
shlomif@telaviv1:~/Module-Build-Tiny-0.023$ ./Build test
t/00-compile.t .......... ok                                                    
t/release-pod-syntax.t .. skipped: these tests are for release candidate testing
t/simple.t .............. 7/? 
#   Failed test 'pm file in blib is readonly'
#   at t/simple.t line 91.
#          got: '128'
#     expected: '0'

#   Failed test 'script in blib is readonly'
#   at t/simple.t line 102.
#          got: '128'
#     expected: '0'
# Looks like you failed 2 tests of 23.
t/simple.t .............. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/23 subtests 

Test Summary Report
-------------------
t/simple.t            (Wstat: 512 Tests: 23 Failed: 2)
  Failed tests:  13, 17
  Non-zero exit status: 2
Files=3, Tests=24,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.39 cusr  0.03 csys =  0.45 CPU)
Result: FAIL
shlomif@telaviv1:~/Module-Build-Tiny-0.023$ 

[/SHELL]

See: https://metacpan.org/release/Module-Build-Tiny

Version-Release number of selected component (if applicable):

Cauldron.

How reproducible:

Always.

Steps to Reproduce:
1. wget http://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.023.tar.gz
2. Follow the steps in the shell session.
3.


Reproducible: 

Steps to Reproduce:
Comment 1 Jerome Quelin 2013-06-10 10:37:28 CEST
Please report the bug upstream. Even if it works fine with a perlbrew 5.18, it most likely is due to a weird interaction with some otherwise perfectly fine perl build options.

Indeed, I don't really think our chmod is broken. :-)
Comment 2 Shlomi Fish 2013-06-10 10:53:21 CEST
Hi Jerome,

(In reply to Jerome Quelin from comment #1)
> Please report the bug upstream. Even if it works fine with a perlbrew 5.18,
> it most likely is due to a weird interaction with some otherwise perfectly
> fine perl build options.
> 
> Indeed, I don't really think our chmod is broken. :-)

OK, I'll try to pinpoint the problem and report it upstream.

Regards,

-- Shlomi Fish
Comment 3 Shlomi Fish 2013-06-10 12:14:36 CEST
Hi Jerome,

(In reply to Shlomi Fish from comment #2)
> Hi Jerome,
> 
> (In reply to Jerome Quelin from comment #1)
> > Please report the bug upstream. Even if it works fine with a perlbrew 5.18,
> > it most likely is due to a weird interaction with some otherwise perfectly
> > fine perl build options.
> > 
> > Indeed, I don't really think our chmod is broken. :-)
> 
> OK, I'll try to pinpoint the problem and report it upstream.
> 

The perl that is built and installed using this script is able to pass the tests of Module-Build-Tiny perfectly fine:

<<<<<
sh Configure -des \
  -Dinc_version_list="5.18.0 5.16.3 5.16.3 5.16.2 5.16.2 5.16.1 5.16.1 5.16.0 5.16.0 5.14.2 5.14.1 5.14.0" \
  -Dcc='/usr/bin/gcc' \
  -Doptimize='-O2' -DDEBUGGING=-g \
-Dmyhostname=localhost -Dperladmin=root@localhost \
 -Dcf_email=root@localhost  \
  -Dperllibs='-lnsl -ldl -lm -lcrypt -lutil -lc -pthread'   \
  -Ud_csh \
  -Duseshrplib \
  -Duseithreads \
  -Di_db \
  -Di_ndbm \
  -Di_gdbm \
  -Dprefix="$HOME/apps/perl/mageia-perl-5.18.0-bug" \

>>>>>  

Am I missing anything?

Regards,

-- Shlomi Fish
Comment 4 Shlomi Fish 2013-06-13 17:54:26 CEST
Hi Jerome,

after some amount of investigation, I found out that the problem was likely caused by the patch perl-5.12.0-RC0-install-files-using-chmod-644.patch to the Mageia "perl" package that reads:

<<<<<
--- dist/ExtUtils-Install/lib/ExtUtils/Install.pm.orig	2009-08-03 21:36:03.000000000 +0200
+++ dist/ExtUtils-Install/lib/ExtUtils/Install.pm	2009-08-07 12:10:48.000000000 +0200
@@ -813,7 +813,7 @@
                 utime($atime,$mtime + $Is_VMS,$targetfile) unless $dry_run>1;
 
 
-                $mode = 0444 | ( $mode & 0111 ? 0111 : 0 );
+                $mode = 0644 | ( $mode & 0111 ? 0111 : 0 );
                 $mode = $mode | 0222
                     if $realtarget ne $targetfile;
                 _chmod( $mode, $targetfile, $verbose );
@@ -1215,7 +1215,7 @@
         }
         my($mode,$atime,$mtime) = (stat $from)[2,8,9];
         utime($atime,$mtime+$Is_VMS,$to);
-        _chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$to);
+        _chmod(0644 | ( $mode & 0111 ? 0111 : 0 ),$to);
         next unless $from =~ /\.pm$/;
         _autosplit($to,$autodir);
     }
>>>>

This is an old patch from 2009 applied against perl-5.12.0 originally. Do we really need it.

Thus the problem is specific with the Mageia perl.

Regards,

-- Shlomi Fish
Comment 5 Shlomi Fish 2013-06-13 19:27:12 CEST
Hi Jerome,

(In reply to Shlomi Fish from comment #4)
> Hi Jerome,
> 
> after some amount of investigation, I found out that the problem was likely
> caused by the patch perl-5.12.0-RC0-install-files-using-chmod-644.patch to
> the Mageia "perl" package that reads:
> 
> <<<<<
> --- dist/ExtUtils-Install/lib/ExtUtils/Install.pm.orig	2009-08-03
> 21:36:03.000000000 +0200
> +++ dist/ExtUtils-Install/lib/ExtUtils/Install.pm	2009-08-07
> 12:10:48.000000000 +0200
> @@ -813,7 +813,7 @@
>                  utime($atime,$mtime + $Is_VMS,$targetfile) unless
> $dry_run>1;
>  
>  
> -                $mode = 0444 | ( $mode & 0111 ? 0111 : 0 );
> +                $mode = 0644 | ( $mode & 0111 ? 0111 : 0 );
>                  $mode = $mode | 0222
>                      if $realtarget ne $targetfile;
>                  _chmod( $mode, $targetfile, $verbose );
> @@ -1215,7 +1215,7 @@
>          }
>          my($mode,$atime,$mtime) = (stat $from)[2,8,9];
>          utime($atime,$mtime+$Is_VMS,$to);
> -        _chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$to);
> +        _chmod(0644 | ( $mode & 0111 ? 0111 : 0 ),$to);
>          next unless $from =~ /\.pm$/;
>          _autosplit($to,$autodir);
>      }
> >>>>
> 
> This is an old patch from 2009 applied against perl-5.12.0 originally. Do we
> really need it.
> 
> Thus the problem is specific with the Mageia perl.
> 
> Regards,
> 
> -- Shlomi Fish

After commenting out the application of this patch in svn+ssh://svn.mageia.org/svn/packages/cauldron/perl/current/SPECS/perl.spec , I was able to successfully build and install perl and now the tests of Module-Build-Tiny succeed. Can we rebuild perl without this patch?

Regards,

-- Shlomi Fish
Comment 6 Christian Westgaard 2013-09-26 18:39:08 CEST
This bug applies to Mageia 3 aswell.

# cat /etc/issue
Mageia release 3 (Official) for x86_64
Kernel 3.8.13.4-desktop-1.mga3 on a 4-processor x86_64 / \l

# perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
# perl -V|grep patch
  Locally applied patches:
        Mageia patches


Building and testing Module-Build-Tiny-0.027
cp lib/Module/Build/Tiny.pm blib/lib/Module/Build/Tiny.pm
t/00-compile.t .......... ok
t/release-pod-syntax.t .. skipped: these tests are for release candidate testing

#   Failed test 'pm file in blib is readonly'
#   at t/simple.t line 91.
#          got: '128'
#     expected: '0'
Comment 7 Jerome Quelin 2014-02-24 09:31:17 CET
Sorry for the time to answer to this bug - real life kicked in.

So I ack-ed Shlomi to remove the faulty patch in cauldron, which he did on 2013-06-18 (http://svnweb.mageia.org/packages?view=revision&revision=444674).

Cauldron is now fixed, and mageia 4 too (patching done before branching mga4).
==> we need to do that for mageia 3 also?

Pros:
- bug exists in mga3
- mga3 eol is 2014-11-19

Cons:
- mga4 is already out, with a fixed perl
- module::build::tiny can be installed if really neeeded (force install)
- qa is overwhelmed with updates, so easing their workload would be nice
- perl is a critical package, and I prefer limiting its amount of updates to the very strict minimum.

So I'm waiting for your input before actually issuing an update. If you think that we should have an update for mga3, please speak up now and I'll do it. Otherwise we'll close as resolved/fixed.

Thank you - now NEEDINFO.
Comment 8 Shlomi Fish 2014-02-24 09:59:35 CET
Hi Jerome and all,

(In reply to Jerome Quelin from comment #7)
> Sorry for the time to answer to this bug - real life kicked in.
> 
> So I ack-ed Shlomi to remove the faulty patch in cauldron, which he did on
> 2013-06-18 (http://svnweb.mageia.org/packages?view=revision&revision=444674).
> 
> Cauldron is now fixed, and mageia 4 too (patching done before branching
> mga4).
> ==> we need to do that for mageia 3 also?
> 
> Pros:
> - bug exists in mga3
> - mga3 eol is 2014-11-19
> 
> Cons:
> - mga4 is already out, with a fixed perl
> - module::build::tiny can be installed if really neeeded (force install)
> - qa is overwhelmed with updates, so easing their workload would be nice
> - perl is a critical package, and I prefer limiting its amount of updates to
> the very strict minimum.
> 

For what it's worth, I don't think we should update the perl in Mageia 3.

Regards,

-- Shlomi Fish
Comment 9 Jerome Quelin 2014-04-07 09:36:30 CEST
closing then.

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