#250 tracking/exception for cpanm

Created 4 years ago by mmaslano
Modified 7 months ago

cpanm (perl-App-cpanminus) is bundling small modules in their code. The cpanm must have minimal dependency chain, so it's reasonable bundling.
Anyway after discussion in bugzilla #907464) I was persuaded that such bundling should be tracked (https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Requirement_if_you_bundle).

Could you give it exception and add it on the wiki? Thanks.

We talked about this today and fpc members seemed to be leaning towards this software's goals being contrary to our needs as a distro. We held off on a vote so we could get more information from you in case our assumptions were bad.

  • Members asked that the standard questions be answered https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Standard_questions
  • What are the benefits of bundling in particular? cpanminus as a whole says that it is self-contained (which didn't seem very applicable for an rpm managed system) and that it uses 10MB of RAM but it's unclear if that savings is a result of the bundling (and some members were worried about the precedent of allowing bundling based on upstream desire for optimizations.)

If you are able to attend next week's FPC meeting as well, we meet one hour before FESCo in #fedora-meeting-1 18:00 UTC. Discussion from this week's meeting is here:

to get an idea of how the discussion went this week and any bad assumptions we might have been making.

As a followup to yesterday's FPC meeting, I had a deeper look into this package.

* Unbundling the bundled modules is not too difficult and scriptable, e.g. this way (To be added to %prep)

grep '\$fatpacked{\"(.).pm\"}' bin/cpanm \
| while read a b c; do
module=$(echo "$a" | sed -e 's,\$fatpacked{\"(.
).pm\"}$,\1,' -e 's,/,::,g')
case $module in
App::cpanminus::script) continue;;
Module::CPANfile) continue;;
version::vpp) continue;;
delimiter=$(echo "$c" | sed "s,<<'(.*)';,\1,");
sed -i -e "/'$delimiter'/,/^$delimiter$/{ /^$delimiter$/a \
require $module;
d}" bin/cpanm
Explanation: Iterate over all bundled modules, cut out all Fedora provided modules and replace them with a corresponding "require <module>;" - This looks more difficult than it actually is.

  • Except of Module::CPANfile and version::vpp, all modules are in Fedora.

  • The most of the bundled modules are close to being current, however not all.

  • cpanm uses and bundles a deprecated module (Version::Requirements, supposed to be replaced by CPAN::Meta::Requirements), i.e. their bundling will sooner or later use obsolete code.

My conclusion:
There is no need for a bundling exception.
The 2 missing modules should be added to Fedora, ASAP.

Thanks Ralf, that looks like good approach.

Does that mean this ticket should be closed?

Yes. Please close the ticket. I will try to fix the package.

Login to comment on this ticket.