I have to install about 10 modules from CPAN on a machine to get an application going. Since the machine does not have an internet connection, I transfered the archived modules to it and installed them manually, with lots of 'perl Makefile.PL' and all that.
Is there already a way to automate this process ? I could write a bash script (or even better, a small Perl program ;-) to do the installations but surely there's already at least one solution out there,
Amongst the undoubtly many solutions, which one would you recommened ? This is for Linux-only systems. One nice criteria would be that the solution does not require itself 10 modules to run...
Thanks !
Update:
On CPAN I found megadistro, a recent package that, after a fe wtries, seems to successfully get from the CPAN specified modules, build them, and produce either a RPM, a Debian, or simply a tar.gz package.
I've chosen the tar.gz option for testing since this is part of the requirements.
My CPAN(PLUS) module(s) are set to operate as root. So far, I did not look into making it work as an ordinary user. So, to use megadistro I logged in as root. Warning: megadistro will not create the /root/.megadistro directory to put the archive file of all the modules. You have to create it beforehand.
1) I've created a text file with a few module names:
Acme::Bleach Acme::EyeDrops Acme::BadExample
2) I've created some test directories for megadistro to operate:
~/MegaDistro/mega_build/ ~/MegaDistro/mega_dl/ ~/MegaDistro/mega_extract/
3) I've launched megadistro like this, to produce a tar.gz file:
megadistro --build-only \ --modlist=~/MegaDistro/megadistro.list \ --fetchdir=~/MegaDistro/mega_dl \ --extractdir=~/MegaDistro/mega_extract \ --builddir=~/MegaDistro/mega_build
Megadistro then spent some time at the following line (on a X86_64 dual core fast machine it stayed there foreover, so I killed it, but on a plain x86 it works fine):
Rebuilding module indicies...
It then produced the following file in /root/.megadistro:
megadistro-20060303.tar.gz
And this archive file contains stuff like:
usr/lib/perl5/vendor_perl/5.8.6/i586-linux-thread-multi/auto/Acme/Blea +ch usr/lib/perl5/vendor_perl/5.8.6/Acme/Bleach.pm usr/lib/perl5/vendor_perl/5.8.6/Acme/EyeDrops.pm usr/lib/perl5/vendor_perl/5.8.6/Acme/BadExample.pm usr/share/man/man3/Acme::Bleach.3pm usr/share/man/man3/Acme::EyeDrops.3pm (so on so forth...)
So, it looks good. When megadistro hits a problem testing an application, it will interactively ask for forcing the install (Y/n). Could be a good idea to specify this as a parameter. It will also, or so it seems, download from the CPAN the dependencies.
Let us know if you try it too !
In reply to Repeated offline installs of same CPAN modules by carcassonne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |