pkg provider / Solaris 11 / Install package from source

asked 2017-05-05 05:06:41 -0500

rssh22 gravatar image

updated 2017-05-05 10:48:14 -0500

smarlow gravatar image

I need to upgrade the Solaris 11 agent package 'puppet-agent@1.9.3,5.11-1.sparc.p5p'. The system currently has this version:

puppet-agent (puppetlabs.com) 1.8.2-1 i--

My manifest is as simple as this:

class profile::unix::puppet::agent () {

  package {'puppet-agent': 
    provider => 'pkg',
    source   => '/glshared/puppet-agent/puppet-agent@1.9.3,5.11-1.sparc.p5p',
    ensure   => '1.9.3-5',
  }  
}

I get the next error while running the agent:

Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet-pil00.msc.es
Info: Applying configuration version '1493978637'
Notice: this node is: puppet-pil00
Notice: /Stage[main]/Profile::Unix::App::Base/Notify[this node is: puppet-pil00]/message: defined 'message' as 'this node is: puppet-pil00'
Error: Execution of '/usr/bin/pkg list -Hvfa puppet-agent@1.9.3' returned 1: pkg list: no packages matching 'puppet-agent@1.9.3' known
Error: /Stage[main]/Profile::Unix::Puppet::Agent/Package[puppet-agent]/ensure: change from 1.8.2,5.11-1:20161206T010446Z to 1.9.3 failed: Execution of '/usr/bin/pkg list -Hvfa puppet-agent@1.9.3' returned 1: pkg list: no packages matching 'puppet-agent@1.9.3' known
Info: Stage[main]: Unscheduling all events on Stage[main]

So, how can I install Solaris 11 packages from file through puppet?

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Is the file path `/glshared/puppet-agent/puppet-agent@1.9.3,5.11-1.sparc.p5p` accessible? It looks like you have a comma in there between 3 and 5.

smarlow gravatar imagesmarlow ( 2017-05-05 10:49:47 -0500 )edit

Did you find a fix for this? I'm running into a similar issue. The problem seems to be that the pkg provider for Sol11 ignores the source parameter. It should be adding "-g <source>" to the pkg call.

jciernia gravatar imagejciernia ( 2017-05-23 12:46:57 -0500 )edit

I had to create a publisher (Solaris 11 repository) in wich I publish the package I wanted to upgrade: root@puppet-pil00:/tmp# pkg list -a puppet-agent NAME (PUBLISHER) VERSION IFO puppet-agent (puppetlabs.com) 1.10.1-1

rssh22 gravatar imagerssh22 ( 2017-06-12 11:17:00 -0500 )edit