Hello everybody, Is there a way when installing a package like this : package { "rubygems": ensure => installed, } to pass -t parameter to apt-get in order to use a specific apt source ? EG : apt-get install -t lenny-backports rubygems Ideally I would not use exec ... I am on a Debian and I want to find a clean way to upgrade rubygems ... Thank you ! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sadly, no. I very much missed the feature. We ended up using the apt preferences file to implement that behaviour If I was doing it over I would use a define that added the package resource and also used concat to automatically build up the preferences entry. Regards, Daniel. On 09/12/2010 6:03 AM, "Adrian" <tofan.adrian@gmail.com> wrote: -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 8, 2010, at 6:38 PM, Daniel Pittman wrote:> Sadly, no. I very much missed the feature. We ended up using the apt preferences file to implement that behaviour > > If I was doing it over I would use a define that added the package resource and also used concat to automatically build up the preferences entry. > > Regards, Daniel. >That''s an interestring idea. I have one bit of advice about this. Make sure your source file requires your preferences file. If you don''t, it''s possible one day to get very unlucky and have only your source file pushed with nasty results. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 12/09/2010 05:13 AM, Patrick wrote:> > On Dec 8, 2010, at 6:38 PM, Daniel Pittman wrote: > >> Sadly, no. I very much missed the feature. We ended up using the apt >> preferences file to implement that behaviour >> >> If I was doing it over I would use a define that added the package >> resource and also used concat to automatically build up the >> preferences entry. >> >> Regards, Daniel. >> > > That''s an interestring idea. > > I have one bit of advice about this. Make sure your source file > requires your preferences file. If you don''t, it''s possible one day to > get very unlucky and have only your source file pushed with nasty results.Also note that starting with Squeeze, Debian ships a version of apt that supports an /etc/apt/preferences.d/. This makes pinning various packages using puppet feasible. Regards, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 8, 2010, at 11:45 PM, Felix Frank wrote:> On 12/09/2010 05:13 AM, Patrick wrote: >> >> On Dec 8, 2010, at 6:38 PM, Daniel Pittman wrote: >> >>> Sadly, no. I very much missed the feature. We ended up using the apt >>> preferences file to implement that behaviour >>> >>> If I was doing it over I would use a define that added the package >>> resource and also used concat to automatically build up the >>> preferences entry. >>> >>> Regards, Daniel. >>> >> >> That''s an interestring idea. >> >> I have one bit of advice about this. Make sure your source file >> requires your preferences file. If you don''t, it''s possible one day to >> get very unlucky and have only your source file pushed with nasty results. > > Also note that starting with Squeeze, Debian ships a version of apt that > supports an /etc/apt/preferences.d/. This makes pinning various packages > using puppet feasible.In theory you could cook something up with puppet_concat, but that does make things a lot easier. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 08/12/10 10:54, Adrian wrote:> Hello everybody, > > > Is there a way when installing a package like this : > > package { "rubygems": > ensure => installed, > } > > to pass -t parameter to apt-get in order to use a specific apt > source ? EG : apt-get install -t lenny-backports rubygems > > Ideally I would not use exec ... > > I am on a Debian and I want to find a clean way to upgrade > rubygems ...I went with the slightly messy solution of adding the requested repo to the package name: package { rubygems: name => $operatingsystemrelease ? { /^5\.0\./ => ''rubygems/lenny-backports'', default => ''rubygems'', }, ensure => latest, } This causes puppet to ''spam'' an "ensure created" line each run and a wasted call to apt-get. A temporary solution until squeeze appears and preferences.d is supported. There is an old puppet issue for this feature request but no solution was produced: http://projects.puppetlabs.com/issues/2406 Dan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 09/12/10 03:38, Daniel Pittman wrote:> Sadly, no. I very much missed the feature. We ended up using the apt > preferences file to implement that behaviour > > If I was doing it over I would use a define that added the package > resource and also used concat to automatically build up the preferences > entry.I have a define called apt::source that at the same time adds a source to sources.list.d and creates a fragment of apt preferences (with a carefully set pin priority), which when all concatenated form the central apt preferences file. This works flawlessly :) -- Brice Figureau My Blog: http://www.masterzen.fr/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 9, 2010, at 10:07 AM, Brice Figureau wrote:> On 09/12/10 03:38, Daniel Pittman wrote: >> Sadly, no. I very much missed the feature. We ended up using the apt >> preferences file to implement that behaviour >> >> If I was doing it over I would use a define that added the package >> resource and also used concat to automatically build up the preferences >> entry. > > I have a define called apt::source that at the same time adds a source > to sources.list.d and creates a fragment of apt preferences (with a > carefully set pin priority), which when all concatenated form the > central apt preferences file. > > This works flawlessly :)I would love to get my hands on that. Any chance you could post it? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 09/12/10 19:19, Patrick wrote:> > On Dec 9, 2010, at 10:07 AM, Brice Figureau wrote: > >> On 09/12/10 03:38, Daniel Pittman wrote: >>> Sadly, no. I very much missed the feature. We ended up using the apt >>> preferences file to implement that behaviour >>> >>> If I was doing it over I would use a define that added the package >>> resource and also used concat to automatically build up the preferences >>> entry. >> >> I have a define called apt::source that at the same time adds a source >> to sources.list.d and creates a fragment of apt preferences (with a >> carefully set pin priority), which when all concatenated form the >> central apt preferences file. >> >> This works flawlessly :) > > I would love to get my hands on that. Any chance you could post it?Here it is: https://gist.github.com/21ec1c202b7614a23086 It is not the complete apt class I''m using but should be a good start for you. It''s some old code I wrote 2 years ago, so the code style is not perfect :) It uses two definitions coming from David Schmidtt, concatenate_file which handles the fragment pattern and config_file which is just a file with the correct perms/backup... Oh and bonus, this also handles custom apt keys. Hope that helps, -- Brice Figureau My Blog: http://www.masterzen.fr/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 8/12/2010 9:54 PM, Adrian wrote:> Hello everybody, > > > Is there a way when installing a package like this : > > package { "rubygems": > ensure => installed, > } > > to pass -t parameter to apt-get in order to use a specific apt > source ? EG : apt-get install -t lenny-backports rubygems > > Ideally I would not use exec ... > > I am on a Debian and I want to find a clean way to upgrade > rubygems ... > > Thank you ! >Adrian, This ticket would address your requirement but it is not yet implemented. http://projects.puppetlabs.com/issues/2247 Ben -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi - On 12/12/10 05:01, Ben wrote:>> Is there a way when installing a package like this : >> >> package { "rubygems": >> ensure => installed, >> } >> >> to pass -t parameter to apt-get in order to use a specific apt >> source ? EG : apt-get install -t lenny-backports rubygems >> >> Ideally I would not use exec ...I myself use exec... Another workaround is to specify the version of the package. For example: package { "varnish": ensure => "2.1.5639-1~svn", } HTH -- Olivier -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Dec 11, 2010, at 11:59 PM, Olivier Le Cam wrote:> Hi - > > On 12/12/10 05:01, Ben wrote: >>> Is there a way when installing a package like this : >>> >>> package { "rubygems": >>> ensure => installed, >>> } >>> >>> to pass -t parameter to apt-get in order to use a specific apt >>> source ? EG : apt-get install -t lenny-backports rubygems >>> >>> Ideally I would not use exec ... > > I myself use exec... Another workaround is to specify the version of the package. For example: > > package { "varnish": > ensure => "2.1.5639-1~svn", > } >What do you use as the "unless"? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi everybody, thank you for advice. Unfortunately I didn''t managed to do what I planed. In fact I tried using Debian pinning which allowed me to upgrade ruby gems using the -t option (manualy). -t was needed and I didn''t managed to avoid it. Unfortunately Debian''s runbgems is highly modified. Using the upgraded rubygems I couldn''t install a gem called buildr only if I manually installed each of his dependencies(more than 15 gems) in order to have the proper version. All this took me one and half days of work (I am a Debian beginner). I am not sure if Debian''s policy is the good one, but it doesn''t work for me. I simply may not have the necessary skills for the moment. In the mean time I modified my bootstrap script in order to install ruby and rubygems from source (without apt-get). I really hope that a cleaner solution exists and I am looking forward to find it ;) Adrian On 12 déc. 2010, at 08:59, Olivier Le Cam wrote:> Hi - > > On 12/12/10 05:01, Ben wrote: >>> Is there a way when installing a package like this : >>> >>> package { "rubygems": >>> ensure => installed, >>> } >>> >>> to pass -t parameter to apt-get in order to use a specific apt >>> source ? EG : apt-get install -t lenny-backports rubygems >>> >>> Ideally I would not use exec ... > > I myself use exec... Another workaround is to specify the version of the package. For example: > > package { "varnish": > ensure => "2.1.5639-1~svn", > } > > HTH > > -- > Olivier > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Dec 13, 2010 at 06:44, Adrian Tofan <tofan.adrian@gmail.com> wrote:> thank you for advice. Unfortunately I didn''t managed to do what I planed. In fact I tried using Debian pinning which allowed me to upgrade ruby gems using the -t option (manualy). -t was needed and I didn''t managed to avoid it. > > Unfortunately Debian''s runbgems is highly modified. Using the upgraded rubygems I couldn''t install a gem called buildr only if I manually installed each of his dependencies(more than 15 gems) in order to have the proper version. > > All this took me one and half days of work (I am a Debian beginner). I am not sure if Debian''s policy is the good one, but it doesn''t work for me. I simply may not have the necessary skills for the moment.It is, in essence, a conflict between the Debian policies and the Ruby Gem policies, on which there is sadly no clear resolution at present. :/> In the mean time I modified my bootstrap script in order to install ruby and rubygems from source (without apt-get). I really hope that a cleaner solution exists and I am looking forward to find it ;)That *is* the cleaner solution, if you are willing to accept using a private Ruby. Debian set aside a bunch of areas, like /usr/local and /opt, in which you can easily drop this sort of local software with the assurance that it will not conflict with upstream software. Resolving the Debian Gem issue is hard, so I would suggest you continue the policy of a local source install of Ruby and gems, which you can then use with your application. (Alternately, you could use something like rvm to automate parts of this process for you. :) Regards, Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.