[MeeGo-dev] Perl / CPAN integration on MeeGo?
jeremiah.foster at pelagicore.com
Tue Mar 9 04:31:46 CST 2010
On Mar 8, 2010, at 7:16 PM, M. Edward (Ed) Borasky wrote:
>> btw I would really like to have some good tooling, that would make it
>> basically automatic to create a package for a (sane) CPAN project,
>> in a way that it is a good, valid and clean package. We can then build a
>> 2nd layer of tooling around that, that would scan CPAN for updates
>> and notify the maintainer of the package for evaluation to see if the
>> new version should be used...
Hic sunt dracones.
Two issues here;
1. Bots cannot create packages as well as humans
2. Much of this work is already done
Perl has the great good fortune of using well defined standard tools, like tarballs, for its tooling and installation. This is one of the things that has made CPAN so successful. CPAN also has an extensive testing service: CPANTS including some checks to see if a given module is able to be packaged easily. In the past I've worked with people like Gabor Szabo to improve the CPANTS to Debian interface, so I know that there is lots of work done to make sure the average perl module gets easily packaged in whichever Linux distro you're using.
The next stage is making the entire process automatic and here too, much work has been done. Someone in this thread mentioned one of the tools and I'll mention a couple here:
1. dh-make-perl which is used as a wrapper around cpan2deb
2. CPANPLUS which has support for creating rpms and debs on-the-fly
Since MeeGo is rpm based, the second tool seems more likely usable, though in my experience the dh-make-perl tool is better. Both could be cannibalized for a new tool, but I suspect that would not be necessary or even desirable. CPAN has libraries from which one can sub-class new tools to do testing and installation, so much of the initial hard lifting is done. It is always nice (and in Maemo it is necessary) to have a human email address to contact when a package is buggy or needs attention.
The debian perl team has some interesting tools for packaging perl modules which might work well with rpms too. The Package Entropy Tracker is particularly useful.
>> I'm sure various pieces already exist.. just a matter of getting enough
>> glue to make it fit together nicely.
> Gentoo, being mostly "install from source", has the guts of it. A Gentoo
> "package" is a bash script to install the software, whether it be a
> classic "configure && make && make install" or a "cpan <module-name" or
> a "gem install <gem-name>", etc. It makes packaging of upstream stuff a
> lot easier - Gentoo maintains the dependency structure for the packages,
> so if you just install a Ruby gem, you get Ruby installed if it isn't
> there already.
I don't think the Gentoo model of asking users to compile software is going to work in MeeGo.
> Debian has a larger collection of packaged Perl, Python and even R
> libraries than the other distros primarily because of the hard work of a
> few folks like Dirk Eddelbuettel. I don't think they have a truly
> automatic or near-automatic scheme like Gentoo's.
dh-make-perl is pretty automatic, it can build and install a package for you.
> I guess we should start talking about this stuff on the openSUSE Build
> Service mailing list - I think I'm still on it, although I'm sort of
> tied up in Twitter stuff till after Chirp.
This is the model we should follow, since this is the model that MeeGo apparently will use:
1. Write your perl software
2. Upload to CPAN
3. Pull from CPAN into OBS
4. Pull from OBS to MeeGo
More information about the MeeGo-dev