Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: What is the best way to install CPAN modules on Debian?

by moritz (Cardinal)
on Mar 26, 2009 at 14:50 UTC ( [id://753423]=note: print w/replies, xml ) Need Help??


in reply to What is the best way to install CPAN modules on Debian?

I think it was JavaFan who told me he uses the idea of having cpan installation dirs writable by a special group, and told me it worked fine. Maybe we'll hear from him... (Update: he was even faster than me... read for yourself :-)
However, there is still a downside. Unless I am missing something in the documentation (am I?), the debian package simply calls the CPAN modules's own make files. That means that you are still dependent on the quality of the CPAN module writer's build scripts. If they have put in something that conflicts with the system Perl, one has the same problems as one would have downloading directly from CPAN.

First of all let me clarify that it does call the Makefile of the package via make install, with a special path prefix. I usually run dh-make-perl under fakeroot, so that it does no damage to my system if something is accidentally written to the wrong location.

There is a still the conflict with core modules, or for example when installing TAP::Parser 3.0 (I think) on Debian Etch it conflicted with perl core's prove utility. That's something that you can only avoid by using a separate perl installation independent from the system perl.

On my desktop I usually go the dh-make-perl route, and sometimes install a blead perl in /usr/local/ for testing. When I ran /usr/local/bin/perl -MCPAN -e shell I never had problems that modules where accidentally installed into / or /usr/ instead.

Replies are listed 'Best First'.
Re^2: What is the best way to install CPAN modules on Debian?
by JavaFan (Canon) on Mar 26, 2009 at 16:14 UTC
    I think it was JavaFan who told me he uses the idea of having cpan installation dirs writable by a special group, and told me it worked fine.
    Actually, I use a special user (usually I call the user perl, camel or onion). But then I use said user to install anything Perl related - I never tried installing half of it as root, and the other half as someone else. About the only module that requires an additional step when installing is Tk on the local machine while using sudo su - xxx to switch users; I don't allow others to open windows on my X client, and hence Tk's test will fail when run as a different user. Running xauth fixes that.

    But none of that really relates to what the OP wants to do, so I didn't mention it.

      I don't allow others to open windows on my X client, and hence Tk's test will fail when run as a different user. Running xauth fixes that.

      i use ssh -X for that. e.g. 'ssh -X otheruser@localhost' or 'ssh -X otheruser@remotehost'.

      it's the least hassle way of allowing other UIDs temporary access to my X server.

      oh, and as for the original thread topic - i use dh-make-perl, and have done so for many years without problem.

      For a systems administrator, if not for a programmer, it is THE best way to use non-packaged CPAN modules and still have a consistent environment across hundreds of systems. package it once on your fastest/best dev box and ship it out using scp and install with dpkg (or, if you're doing it a lot, make your own apt repository for your local packages)

        i use ssh -X for that.
        Yes, that would work, if set up with ssh keys. I typically create adminstrative users like the one I'm talking about without any passwords or ssh keys. It removes a possible line of attack. (Yes, I'm paranoid).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://753423]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-18 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found