cpan modules & native linux packages

cpan is great - one finds a lot of modules for really everything. the problem comes from installing those modules.

indeed, your system comes with a perl and some cpan modules packaged for your distribution. and mixing them with modules installed directly by cpan(1) or cpanp(1) is the best way to wreck havoc on your system.

enters cpanplus backends, allowing one to easily create native linux packages for you distribution using:

cpan2dist Foo::Bar

pretty straighforward, assuming there's a backend available for your distribution...

so i created cpanplus::dist::mdv, and life was good: i created rpms when i wanted some new modules. it has even become the official way to create rpm packages from cpan modules for mandriva.

unfortunately, it's still not enough, even if jos agreed to integrate a --install flag in cpan2dist to install prereqs after building them.

indeed, you don't want to build a prereq when this one might be already available from your distribution. moreover, once a package is installed, you'd like to submit the new package to your distribution, for other users to benefit from them (assuming you're a contributor for your distribution).

lazyness helping, i always let it go. but lazyness strikes back: always repeating the same steps to check if a prereq is provided by mandriva, building them or installing them, and then submitting them is not that a good way to spend my time.

so one week ago, i've decided to create an app::cpan2pkg module (not yet on cpan), a curses application build around cpan2dist and taking care of every itch mentioned earlier.

it is really a glue application, meant to reuse existing command lines, but taking the decisions automatically and chaining the steps.

note that it's called app::cpan2pkg, and not app::cpan2mdv. i intend to write it so that one can adapt it to other distributions workflows. of course, currently i'm focusing on mandriva, the distribution i'm using. but if others want to plug in, they're more than welcome!

it is currently in version 0.1.0 (except to see it soon on cpan), and is able to extract the module prereqs. i'll let you know about the progress...

No comments:

Post a Comment