FAQ
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+unsubscribe@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.

Search Discussions

  • Badgerious at Aug 8, 2013 at 1:09 pm
    Did you install puppet from ports? I did a 3.2.3 install recently and
    noticed that there is a patch<http://svnweb.freebsd.org/ports/head/sysutils/puppet/files/optpatch-package_origin?revision=311088&view=markup>in 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+unsubscribe@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.
  • Russell Jackson at Aug 12, 2013 at 8:35 pm
    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 patch<http://svnweb.freebsd.org/ports/head/sysutils/puppet/files/optpatch-package_origin?revision=311088&view=markup>in 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+unsubscribe@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.
  • Badgerious at Aug 13, 2013 at 12:54 am
    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+unsubscribe@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 at Aug 20, 2013 at 7:15 pm
    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 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+unsubscribe@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+unsubscribe@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.
  • Eugene Vilensky at Aug 21, 2013 at 2:37 pm

    On Tue, Aug 20, 2013 at 2:15 PM, joel johnston 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+unsubscribe@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 at Aug 24, 2013 at 4:22 pm
    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
    wrote:
    On Tue, Aug 20, 2013 at 2:15 PM, joel johnston 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+unsubscribe@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+unsubscribe@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.
  • Badgerious at Aug 24, 2013 at 5:55 pm
    Hi Joel,

    From your copy&paste above, looks like pkg_add isn't using the '-r' switch,
    so PACKAGESITE is not being touched at all. My guess is that you're using
    the freebsd package provider with the patch I mentioned earlier. The patched
    provider <https://gist.github.com/anonymous/6329465> doesn't use '-r'.

    Something else you may want to look into (haven't tried it yet myself, but
    plan to) is this provider for pkgng:
    https://github.com/xaque208/puppet-pkgng

    Eric
    On Saturday, August 24, 2013 11:22:39 AM UTC-5, joel johnston wrote:

    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?
    --
    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+unsubscribe@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.
  • Russell Jackson at Aug 26, 2013 at 7:41 am
    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 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.com<javascript:>.
    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+unsubscribe@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.
  • Pawel Tomulik at Dec 9, 2013 at 12:01 pm
    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+unsubscribe@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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 7, '13 at 3:17p
activeDec 9, '13 at 12:01p
posts10
users5
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase