Skip to content

Perl CPAN Support, Broken tar --strip-components Command #1517

@wbraswell

Description

@wbraswell

Another bug, this time found while packaging the Alien::astyle software from CPAN.

$ fpm --no-cpan-test --cpan-verbose --verbose --debug-workspace --workdir /home/wbraswell/rperl_packager_tmp/ -t rpm -s cpan Alien::astyle
...
Setting workdir {:workdir=>"/home/wbraswell/rperl_packager_tmp/", :level=>:info}
Asking metacpan about a module {:module=>"Alien::astyle", :level=>:info}
Downloading perl module {:distribution=>"Alien-astyle", :version=>nil, :level=>:info}
Setting package name from 'distribution' {:distribution=>"Alien-astyle", :level=>:info}
Installing any build or configure dependencies {:level=>:info}
cpanm (App::cpanminus) 1.7044 on perl 5.016003 built for x86_64-linux-thread-multi {:level=>:info}
Work directory is /home/wbraswell/.cpanm/work/1530682819.10424 {:level=>:info}
You have make /usr/bin/make {:level=>:info}
You have LWP 6.05 {:level=>:info}
You have /usr/bin/tar: tar (GNU tar) 1.26 {:level=>:info}
Copyright (C) 2011 Free Software Foundation, Inc. {:level=>:info}
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. {:level=>:info}
This is free software: you are free to change and redistribute it. {:level=>:info}
There is NO WARRANTY, to the extent permitted by law. {:level=>:info}
 {:level=>:info}
Written by John Gilmore and Jay Fenlason. {:level=>:info}
You have /usr/bin/unzip {:level=>:info}
Entering /home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59/module {:level=>:info}
--> Working on /home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59/module {:level=>:info}
Configuring /home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59/module ... N/A {:level=>:info}
! Configuring /home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59/module failed. See /home/wbraswell/.cpanm/work/1530682819.10424/build.log for details. {:level=>:info}
Process failed: cpanm failed (exit code 1). Full command was:["cpanm", "-L", "/home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59/cpan", "/home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59/module", "--installdeps", "-n", "--verbose"] {:level=>:error}
plugin directory {:plugin=>"cpan", :pathtype=>:build_path, :path=>"/home/wbraswell/rperl_packager_tmp/package-cpan-build-8a40f27acfd35733cd6c9f21ebcd00a98f5d8e5b87eaf730b3551d185a59"}

If we extract and re-create the cpanm command referenced above, we get the following bad output, seemingly due to a missing "Alien-astyle-0.010000/" in the build path.

BAD:

$ cpanm -L /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/cpan /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module --installdeps -n --verbose

--> Working on /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module
Entering /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module
Configuring /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module ... N/A
! Configuring /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module failed.

If we add the missing "Alien-astyle-0.010000/" then we get good output.

GOOD:

$ cpanm -L /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/cpan /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module/Alien-astyle-0.010000/ --installdeps -n --verbose

--> Working on /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module/Alien-astyle-0.010000/
Entering /home/wbraswell/rperl_packager_tmp/package-cpan-build-a616575d76bb29a7becb46e682bc3fb544dd31028ccfa5a9fd7285e29192/module/Alien-astyle-0.010000
Checking configure dependencies from META.yml
Checking if you have File::ShareDir 1.03 ... Yes (1.116)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.63_02)
Checking if you have Alien::Base::ModuleBuild 0.020 ... No
==> Found dependencies: Alien::Base::ModuleBuild
Searching Alien::Base::ModuleBuild (0.020) on cpanmetadb ...
--> Working on Alien::Base::ModuleBuild
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Base-ModuleBuild-1.04.tar.gz ... OK
Unpacking Alien-Base-ModuleBuild-1.04.tar.gz
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions