ptomulik / puppet-portsng

Ports provider for package resource type
Other
3 stars 1 forks source link

Usage fails on puppet 7 due to hardcoded path #4

Open thegushi opened 2 years ago

thegushi commented 2 years ago

I am attempting to use this module on freeBSD 14, where there is no pkg repo (you can build pkg from ports, which I've done, and my system is in an "installed" state, but I'd like this module to take over).

In puppet 7 with r10k and pluginsync, we get the following failures:

Error: Could not autoload puppet/provider/package/portsng: cannot load such file -- puppet/util/ptomulik/package/ports
Error: Facter: error while resolving custom facts in /var/puppet/lib/facter/package_provider.rb Could not autoload puppet/provider/package/portsng: cannot load such file -- puppet/util/ptomulik/package/ports
Error: Could not autoload puppet/provider/package/portsng: cannot load such file -- puppet/util/ptomulik/package/ports
Error: Failed to apply catalog: Parameter provider failed on Package[zsh]: Could not autoload puppet/provider/package/portsng: cannot load such file -- puppet/util/ptomulik/package/ports (file: /usr/local/etc/puppet/code/environments/ports/modules/nnn_pkg/manifests/zsh.pp, line: 9)

It looks like this is due to the hardcoded:

require 'puppet/util/ptomulik/package/ports' require 'puppet/util/ptomulik/package/ports/options'

And these paths do not exist in /var/puppet (I'm not sure if something should create them).

ptomulik commented 2 years ago

Well, AFAIR, if the module is installed from puppetforge, additional modules should be installed as dependencies: ptomulik/portsutil and ptomulik/backports. The files, you mentioned, shall be provided by ptomulik/portsutil.

ptomulik commented 2 years ago

I haven't used puppet for several years. So it's really hard to recall things, and as I see, it evolved quite a lot.