I''m trying to install 2 packages where 2nd packages replaces certain files from first packages. package { "jboss": provider => yum, ensure => latest } package { "jboss-fix": provider => yum, ensure => latest } This seems to error out with message like "file ... from install of jboss-fix conflicts with file from package jboss" On command line I can use "sudo yum -y install jboss jboss-fix" and it works (or use rpm with "replacefiles" option for second rpm). Is it possible to get this done in puppet? TIA, Bakul -- 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.
jcbollinger
2010-Nov-05 13:26 UTC
[Puppet Users] Re: multiple package installation at same location
On Nov 4, 3:28 pm, Bakul <bakul.ghug...@gmail.com> wrote:> I''m trying to install 2 packages where 2nd packages replaces certain > files from first packages. > > package { "jboss": > provider => yum, > ensure => latest > > } > > package { "jboss-fix": > provider => yum, > ensure => latest > > } > > This seems to error out with message like "file ... from install of > jboss-fix conflicts with file from package jboss" > > On command line I can use "sudo yum -y install jboss jboss-fix" and it > works (or use rpm with "replacefiles" option for second rpm).You should be able to configure yum to always act as if the -y switch had been passed. See the "assumeyes" parameter. However, packages replacing others'' files is a bad idea. That''s why by default it requires confirmation or special options. I urge you to consider instead building packages that do not require such treatment. If you download the jboss source RPM, you should be able to quickly build an alternative jboss rpm that incorporates your changes. (Perhaps you would call *that* "jboss-fix".) You can make such an alternative package satisfy other packages'' dependencies on jboss by appropriate use of the "Provides:" header. Regards, John -- 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.
Bakul
2010-Nov-09 16:13 UTC
[Puppet Users] Re: multiple package installation at same location
I know that would be better option but it''s not possible to do it at this point (due to some non-technical issue). Is there anyway this can be handled in puppet. Thanks. On Nov 5, 8:26 am, jcbollinger <John.Bollin...@stJude.org> wrote:> On Nov 4, 3:28 pm, Bakul <bakul.ghug...@gmail.com> wrote: > > > > > > > > > > > I''m trying to install 2 packages where 2nd packages replaces certain > > files from first packages. > > > package { "jboss": > > provider => yum, > > ensure => latest > > > } > > > package { "jboss-fix": > > provider => yum, > > ensure => latest > > > } > > > This seems to error out with message like "file ... from install of > > jboss-fix conflicts with file from package jboss" > > > On command line I can use "sudo yum -y install jboss jboss-fix" and it > > works (or use rpm with "replacefiles" option for second rpm). > > You should be able to configure yum to always act as if the -y switch > had been passed. See the "assumeyes" parameter. > > However, packages replacing others'' files is a bad idea. That''s why > by default it requires confirmation or special options. I urge you to > consider instead building packages that do not require such > treatment. If you download the jboss source RPM, you should be able > to quickly build an alternative jboss rpm that incorporates your > changes. (Perhaps you would call *that* "jboss-fix".) You can make > such an alternative package satisfy other packages'' dependencies on > jboss by appropriate use of the "Provides:" header. > > Regards, > > John-- 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.
Matthew Black
2010-Nov-09 16:18 UTC
RE: [Puppet Users] Re: multiple package installation at same location
An alternative is to have puppet push out the contents of the RPM instead of trying to install from RPM. The problem with RPM is its not designed to have two different packages owning the same files, but there are ways around it. You would need to install the RPM via the RPM command with --force to make RPM ignore the conflict. -----Original Message----- From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Bakul Sent: Tuesday, November 09, 2010 11:14 AM To: Puppet Users Subject: [Puppet Users] Re: multiple package installation at same location I know that would be better option but it''s not possible to do it at this point (due to some non-technical issue). Is there anyway this can be handled in puppet. Thanks. On Nov 5, 8:26 am, jcbollinger <John.Bollin...@stJude.org> wrote:> On Nov 4, 3:28 pm, Bakul <bakul.ghug...@gmail.com> wrote: > > > > > > > > > > > I''m trying to install 2 packages where 2nd packages replaces certain > > files from first packages. > > > package { "jboss": > > provider => yum, > > ensure => latest > > > } > > > package { "jboss-fix": > > provider => yum, > > ensure => latest > > > } > > > This seems to error out with message like "file ... from install of > > jboss-fix conflicts with file from package jboss" > > > On command line I can use "sudo yum -y install jboss jboss-fix" and it > > works (or use rpm with "replacefiles" option for second rpm). > > You should be able to configure yum to always act as if the -y switch > had been passed. See the "assumeyes" parameter. > > However, packages replacing others'' files is a bad idea. That''s why > by default it requires confirmation or special options. I urge you to > consider instead building packages that do not require such > treatment. If you download the jboss source RPM, you should be able > to quickly build an alternative jboss rpm that incorporates your > changes. (Perhaps you would call *that* "jboss-fix".) You can make > such an alternative package satisfy other packages'' dependencies on > jboss by appropriate use of the "Provides:" header. > > Regards, > > John-- 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.
jcbollinger
2010-Nov-10 17:23 UTC
[Puppet Users] Re: multiple package installation at same location
On Nov 9, 10:13 am, Bakul <bakul.ghug...@gmail.com> wrote:> I know that would be better option but it''s not possible to do it at > this point (due to some non-technical issue). Is there anyway this can > be handled in puppet.Your manifests cannot directly specify command line parameters to be passed to yum. As I already wrote, however, you can configure yum (in /etc/yum.conf) so that -y is always assumed. (man yum.conf) Alternatively, you can create a new or modified yum package provider that does this, and install it into Puppet. That would narrow the scope to which the -y default would apply. (http:// docs.puppetlabs.com/guides/custom_types.html) I reiterate, however, that these options are not just _worse_ than building proper packages: they are BAD. If the jboss-fix package contains only a few files then it might be better all around to just manage those files directly, instead of distributing them in RPM form. Especially so if the changes are all in config files. -- 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.