To answer the original question: when a software vendor delivers software
that does not conform to your distributions native packaging format, invest
some time in the excellent FPM <https://fpm.readthedocs.io/en/latest/> tool
that can build native packages for your local environment. Injecting the
complexity of dragging a vendor's ... err ... prioritisation decisions into
your production systems is really only the last resort if you can't get it
to work *any* other way.



On Tue, 14 Apr 2020 at 12:53, Andy Hall <andyjohnh...@gmail.com> wrote:

> exactly just push the devs of the package resource type to add a new
> provider. I mean nodejs is kinds popular now so I see no reason not to add
> it...
>

If I may chime in as one of the devs of the package resource type:

My understanding is that - like ruby and python - only very few people
actually use the system installed version of npm and npm packages. Instead
the default workflow uses custom installs and multiple "virtual"
environments stashed away in their application directories. At least for
ruby and python this makes the main package providers practically unusable
because they either
* interfere with system-packaged gems/packages/modules
or
* can't detect which virtual environment to use
or - if we were to magically solve enumerating virtual environments on the
systems
* find multiple versions of the same package and confuse puppet even more

See the puppet_gem and puppetserver_gem for ways this has been "fixed" for
ruby gems. Both of which are very application-specific workarounds for
those problems that are not  generalizable.

I hope this provides enough reasons why this won't get added any time soon.


Cheers, David

>
> On Tuesday, April 14, 2020 at 7:04:46 AM UTC+1, Dirk Heinrichs wrote:
>>
>> Am Samstag, den 11.04.2020, 12:15 +0200 schrieb Martin Alfke:
>>
>> Of course for just pip/bundle/etc. I can do something like
>>
>>   exec { 'install':
>>     command => 'pip/bundle/npm install',
>>     creates => 'some file created by the pip/bundle/npm
>>     }
>>
>> but still it's painful because if the pip/bundle/npm failed the exec would
>> not be execute again, unless you put every file create by the 10000
>> dependencies need for every software.
>>
>> The worst case for me is those software installed by some
>>
>>   wget 'URL' | sh
>>
>> (Ok I know it's not secure...) but well...
>>
>>
>> The same pattern: let the wget | sudo bash command run on a dev platform
>> or a container and build a package.
>>
>>
>> Either this, or: Write a package provider, like the ones already
>> available for Ruby gems or Python modules, which turns this into
>>
>> package { 'foo':
>> ...
>> provider => npm,
>> ...
>> }
>>
>>
>> Bye...
>>
>> Dirk
>>
>> --
>>
>> *Dirk Heinrichs*
>> Senior Systems Engineer, Delivery Pipeline
>> OpenText ™ Discovery | Recommind
>> *Phone*: +49 2226 15966 18
>> *Email*: dhei...@opentext.com
>> *Website*: www.recommind.de
>> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
>> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
>> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
>> This e-mail may contain confidential and/or privileged information. If
>> you are not the intended recipient (or have received this e-mail in error)
>> please notify the sender immediately and destroy this e-mail. Any
>> unauthorized copying, disclosure or distribution of the material in this
>> e-mail is strictly forbidden
>> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
>> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
>> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
>> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
>> Weitergabe dieser Mail sind nicht gestattet.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/89c471a3-fc4e-466f-ad7d-0cb81e7d77f8%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/89c471a3-fc4e-466f-ad7d-0cb81e7d77f8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALF7fHb_Vj1AxPuMNyYtQ%2Brt04t4PXEQhc9-KDGqzfng5vt4FQ%40mail.gmail.com.

Reply via email to