Re: how to install perl modules w/ dependencies that mix packages & CPAN
Jonathan Thornburg wrote: > What's the "OpenBSD way" to install Perl modules which don't exist > as packages? > > The usual Perl idiom for "install module foo & all of its (recursive) > dependencies" is "cpan install foo", but this fetches all dependencies > from CPAN, ignoring any OpenBSD packages which may exist. What I'd like > is something like "cpan install foo", but with the semantics that for > each dependency, if there's OpenBSD package in /etc/installurl which > is the same module version as the latest CPAN version, then install > the OpenBSD package instead. Is there a utility already around which > does this? You can use perlbrew if you need some perl CPAN modules and don't mix them with the base system. It will recompile a perl version with your regular user, and so you will be able to use cpan as your regular user, the local perl won't mix with the system wide one.
Re: how to install perl modules w/ dependencies that mix packages & CPAN
On Fri, Aug 31, 2018 at 05:52:57PM -0700, Jonathan Thornburg wrote: > What's the "OpenBSD way" to install Perl modules which don't exist > as packages? > > The usual Perl idiom for "install module foo & all of its (recursive) > dependencies" is "cpan install foo", but this fetches all dependencies > from CPAN, ignoring any OpenBSD packages which may exist. What I'd like > is something like "cpan install foo", but with the semantics that for > each dependency, if there's OpenBSD package in /etc/installurl which > is the same module version as the latest CPAN version, then install > the OpenBSD package instead. Is there a utility already around which > does this? Nope, we don't have this kind of thing so far. One small problem being that the cpan semantics for dependencies are less stringent than OpenBSD's, so you can't really distinguish between BUILD and RUN depends. The only automated tool dealing with cpan we have is the GSoC work from Giannis Tsaraias, portgen
Re: how to install perl modules w/ dependencies that mix packages & CPAN
On Sat, Sep 01, 2018 at 12:52:57AM +, Jonathan Thornburg wrote: > What's the "OpenBSD way" to install Perl modules which don't exist > as packages? > > The usual Perl idiom for "install module foo & all of its (recursive) > dependencies" is "cpan install foo", but this fetches all dependencies > from CPAN, ignoring any OpenBSD packages which may exist. What I'd like > is something like "cpan install foo", but with the semantics that for > each dependency, if there's OpenBSD package in /etc/installurl which > is the same module version as the latest CPAN version, then install > the OpenBSD package instead. Is there a utility already around which > does this? > Afraid not. I've only added or updated a very small number of Perl ports. I've found that some are very simple to do. Just learn how and submit it to ports@ (which is the correct list for this question, just remember that for the future,please). Others must have patches. Really, they need some minor but crucial patches to be "OpenBSDified". This isn't linux. And when you start to talk about recursively adding multiple dependencies, that's where disaster strikes. A big mess with wrong locations, wrong this, wrong that. And exactly how would you even figure out the nightmare of updating or removal? After all, you don't have any idea where anything is. Testing? Not gonna work out. Security? Oh yeah, that's not important, is it? Your clients or your own data getting processed or lost? Oops! This is why everything is moving as a solid unified system and packages. Everything is examined by multiple eyes. Some Perl modules don't and cannot ever work under OpenBSD. Our ports system works well, but is plagued by all of those screwy linuxisms. Now, if you really want to do this sort of thing without adding to and using the existing ports tree, feel free to. See the instructions for doing a fresh re-install. You might need it. Seriousness aside, it's a good question to ask and anyone coming from another OS usually wants (expects?) to be able to do this. Welcome to OpenBSD! It's a tight ship and those ships usually don't sink! ;>) Chris Bennett
Re: how to install perl modules w/ dependencies that mix packages & CPAN
On Fri, Aug 31, 2018 at 10:08:48PM -0300, Alceu Rodrigues de Freitas Junior wrote: > Em 31/08/2018 21:52, Jonathan Thornburg escreveu: > > What's the "OpenBSD way" to install Perl modules which don't exist > > as packages? > I'm afraid that is no such thing. My best would to search something on ports > to do exactly that. I don't know of anything in ports to automatically merge CPAN dependencies and the ports tree, but I do know of portgen. http://man.openbsd.org/portgen > If there is no repository, you might want to take a look in ways to convert > Perl modules from CPAN into OpenBSD packages. I know there is an effort to > build those packages automatically for Linux (Ubuntu and CentOS). portgen is pretty good at it, I usually start there. It gets you most of the way to submitting something to be included in the ports tree. I don't know that it will ever reach the point where it just pulls stuff directly off the CPAN, but I do hope that someday what's required to exist in the ports tree is fairly minimal. For now though, portgen will create ports for the module and any dependencies that you can then adjust for anything that was not detected automatically. > Another possibility is to use perlbrew instead. I do use plenv for testing things on multiple perl versions and with different perl modules, but generally if I want to run something for real, rather than just from my homedir, I'll make ports for the required modules. https://github.com/tokuhirom/plenv l8rZ, -- andrew - http://afresh1.com Unix is very simple, but it takes a genius to understand the simplicity. -- Dennis Ritchie
Re: how to install perl modules w/ dependencies that mix packages & CPAN
I'm afraid that is no such thing. My best would to search something on ports to do exactly that. If there is no repository, you might want to take a look in ways to convert Perl modules from CPAN into OpenBSD packages. I know there is an effort to build those packages automatically for Linux (Ubuntu and CentOS). Another possibility is to use perlbrew instead. Regards, Alceu Em 31/08/2018 21:52, Jonathan Thornburg escreveu: What's the "OpenBSD way" to install Perl modules which don't exist as packages? The usual Perl idiom for "install module foo & all of its (recursive) dependencies" is "cpan install foo", but this fetches all dependencies from CPAN, ignoring any OpenBSD packages which may exist. What I'd like is something like "cpan install foo", but with the semantics that for each dependency, if there's OpenBSD package in /etc/installurl which is the same module version as the latest CPAN version, then install the OpenBSD package instead. Is there a utility already around which does this?
how to install perl modules w/ dependencies that mix packages & CPAN
What's the "OpenBSD way" to install Perl modules which don't exist as packages? The usual Perl idiom for "install module foo & all of its (recursive) dependencies" is "cpan install foo", but this fetches all dependencies from CPAN, ignoring any OpenBSD packages which may exist. What I'd like is something like "cpan install foo", but with the semantics that for each dependency, if there's OpenBSD package in /etc/installurl which is the same module version as the latest CPAN version, then install the OpenBSD package instead. Is there a utility already around which does this?