[Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
Hi, you may try this module: http://forge.puppetlabs.com/ptomulik/packagex which implements `portsx` provider (FreeBSD ports). W dniu środa, 7 sierpnia 2013 17:17:33 UTC+2 użytkownik joel johnston napisał: Shouldn't pkg_add be using the -r option for package management? I worked around by forcing the client to use ports instead, but it stinks. Any thoughts? -- 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/c2034d36-8d4a-4b2d-b1ef-e4f558d52f77%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
I've had a little time to look at this. What looks to be happening is that the URI class adds a hard leading slash to ftp:// uri path components which fetch(1) doesn't handle well. You can work around this by setting the package resource's 'source' parameter to use the http:// scheme. Set it globally using a resource default in your site.pp. if $operatingsystem == 'FreeBSD' { $majorversion = regsubst($kernelversion, '^([0-9]+)\.([0-9]+)$', '\1') $scheme = 'http' $host = 'ftp2.us.freebsd.org' $urlpath = /pub/FreeBSD/ports/${hardwareisa}/packages-${majorversion}-stable/ Package { source = ${scheme}://${host}/${urlpath} } } On Tuesday, August 20, 2013 12:15:38 PM UTC-7, joel johnston wrote: So I think the core issue at this point is that no matter where I try to set PACKAGESITE (on the server via rc, on the client via rc, on the shell via overrides) the path to the ftp server always returns: Error: /Stage[main]/Rsync/Package[net/rsync]/ensure: change from absent to present failed: Execution of '/usr/sbin/pkg_add -f ftp://ftp.freebsd.org/%2Fpub/FreeBSD/ports/amd64/packages-9-stable/All/rsync-3.0.9_3.tbz' returned 1: pkg_add: unable to fetch 'ftp://ftp.freebsd.org/ The url is bad/wrong. For some reason it is injecting this %2F in front of pub where it SHOULD just be /pub/ How and where is this getting set and how can I change it? On Mon, Aug 12, 2013 at 5:54 PM, badgerious badg...@hotmail.comjavascript: wrote: I should disclaim that I'm not a huge FreeBSD guy, but do have a couple of FreeBSD boxes around. I've been content getting all packages with 'pkg_add -r' (which seems to work fine with the unpatched freebsd provider); no idea about the interactions with ports you've mentioned. Couple of others things regarding the patch (semi tangential): 1) If you do an install of puppet 3.2.3 from ports with ruby 1.9.3, you get piles of warnings during puppet runs due to some class variable use in the freebsd provider. This is fixed in vanilla puppet 3.2.3, but undone by the patch. 2) If the freebsd provider is broken, seems like it should be going back upstream rather than patching in the port (forgive my ignorance if this is in fact happening and the patch is interim). Eric On Monday, August 12, 2013 3:35:41 PM UTC-5, Russell Jackson wrote: The standard provider doesn't work with packages that have multiple origins (the apache ports for instance) because the package name doesn't match was is recorded in the package database. So, what will happen is that puppet will think the package isn't installed on every run and attempt to install it. The only sane way around that was to use the package origin as a key and duplicated the '-r' functionality in the provider; this is what the patch does. Passing '-f' to pkg_add was questionable, but I remember there being problems without it. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/1CqH0u84u6g/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com javascript:. To post to this group, send email to puppet...@googlegroups.comjavascript:. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- ___ Joel Johnston 760.437.5116 www.metaband.net www.j03l.com -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
The real isssue I seem to be having is that puppet agent is ignoring my PACKAGESITE variable. I've set it accordingly per: http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Free_Bsd/8 pkg_add -r whatever works fine from the command line in bash and sh, but puppet runs use the url above instead of what I've set. Any ideas where I can set the packagesite var so that puppet can pick it up? On Wed, Aug 21, 2013 at 7:35 AM, Eugene Vilensky evilen...@googlemail.com wrote: On Tue, Aug 20, 2013 at 2:15 PM, joel johnston joeldjohns...@gmail.com wrote: The url is bad/wrong. For some reason it is injecting this %2F in front of pub where it SHOULD just be /pub/ %2F is a '/' in url encoding, maybe there is a trailing slash somewhere you can remove which will allow a proper URL to be constructed. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/1CqH0u84u6g/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- ___ Joel Johnston 760.437.5116 www.metaband.net www.j03l.com -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
On Tue, Aug 20, 2013 at 2:15 PM, joel johnston joeldjohns...@gmail.com wrote: The url is bad/wrong. For some reason it is injecting this %2F in front of pub where it SHOULD just be /pub/ %2F is a '/' in url encoding, maybe there is a trailing slash somewhere you can remove which will allow a proper URL to be constructed. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
So I think the core issue at this point is that no matter where I try to set PACKAGESITE (on the server via rc, on the client via rc, on the shell via overrides) the path to the ftp server always returns: Error: /Stage[main]/Rsync/Package[net/rsync]/ensure: change from absent to present failed: Execution of '/usr/sbin/pkg_add -f ftp://ftp.freebsd.org/%2Fpub/FreeBSD/ports/amd64/packages-9-stable/All/rsync-3.0.9_3.tbz' returned 1: pkg_add: unable to fetch 'ftp://ftp.freebsd.org/ The url is bad/wrong. For some reason it is injecting this %2F in front of pub where it SHOULD just be /pub/ How and where is this getting set and how can I change it? On Mon, Aug 12, 2013 at 5:54 PM, badgerious badge...@hotmail.com wrote: I should disclaim that I'm not a huge FreeBSD guy, but do have a couple of FreeBSD boxes around. I've been content getting all packages with 'pkg_add -r' (which seems to work fine with the unpatched freebsd provider); no idea about the interactions with ports you've mentioned. Couple of others things regarding the patch (semi tangential): 1) If you do an install of puppet 3.2.3 from ports with ruby 1.9.3, you get piles of warnings during puppet runs due to some class variable use in the freebsd provider. This is fixed in vanilla puppet 3.2.3, but undone by the patch. 2) If the freebsd provider is broken, seems like it should be going back upstream rather than patching in the port (forgive my ignorance if this is in fact happening and the patch is interim). Eric On Monday, August 12, 2013 3:35:41 PM UTC-5, Russell Jackson wrote: The standard provider doesn't work with packages that have multiple origins (the apache ports for instance) because the package name doesn't match was is recorded in the package database. So, what will happen is that puppet will think the package isn't installed on every run and attempt to install it. The only sane way around that was to use the package origin as a key and duplicated the '-r' functionality in the provider; this is what the patch does. Passing '-f' to pkg_add was questionable, but I remember there being problems without it. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/1CqH0u84u6g/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- ___ Joel Johnston 760.437.5116 www.metaband.net www.j03l.com -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
The standard provider doesn't work with packages that have multiple origins (the apache ports for instance) because the package name doesn't match was is recorded in the package database. So, what will happen is that puppet will think the package isn't installed on every run and attempt to install it. The only sane way around that was to use the package origin as a key and duplicated the '-r' functionality in the provider; this is what the patch does. Passing '-f' to pkg_add was questionable, but I remember there being problems without it. On Thursday, August 8, 2013 6:09:07 AM UTC-7, badgerious wrote: Did you install puppet from ports? I did a 3.2.3 install recently and noticed that there is a patchhttp://svnweb.freebsd.org/ports/head/sysutils/puppet/files/optpatch-package_origin?revision=311088view=markupin that port that reverts back to an older version of the freebsd package provider, apparently for ruby 1.8 compatibility. I got rid of the optpatch-package_origin file and reinstalled the port to get the proper package provider, which does indeed use '-r'. Eric -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
I should disclaim that I'm not a huge FreeBSD guy, but do have a couple of FreeBSD boxes around. I've been content getting all packages with 'pkg_add -r' (which seems to work fine with the unpatched freebsd provider); no idea about the interactions with ports you've mentioned. Couple of others things regarding the patch (semi tangential): 1) If you do an install of puppet 3.2.3 from ports with ruby 1.9.3, you get piles of warnings during puppet runs due to some class variable use in the freebsd provider. This is fixed in vanilla puppet 3.2.3, but undone by the patch. 2) If the freebsd provider is broken, seems like it should be going back upstream rather than patching in the port (forgive my ignorance if this is in fact happening and the patch is interim). Eric On Monday, August 12, 2013 3:35:41 PM UTC-5, Russell Jackson wrote: The standard provider doesn't work with packages that have multiple origins (the apache ports for instance) because the package name doesn't match was is recorded in the package database. So, what will happen is that puppet will think the package isn't installed on every run and attempt to install it. The only sane way around that was to use the package origin as a key and duplicated the '-r' functionality in the provider; this is what the patch does. Passing '-f' to pkg_add was questionable, but I remember there being problems without it. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Freebsd + Puppet 3.2.2 pkg_add -f ?
Did you install puppet from ports? I did a 3.2.3 install recently and noticed that there is a patchhttp://svnweb.freebsd.org/ports/head/sysutils/puppet/files/optpatch-package_origin?revision=311088view=markupin that port that reverts back to an older version of the freebsd package provider, apparently for ruby 1.8 compatibility. I got rid of the optpatch-package_origin file and reinstalled the port to get the proper package provider, which does indeed use '-r'. Eric -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.