Dear all, How can I create a yum repo like this? [rpmforge] name = RHEL $releasever - RPMforge.net - dag baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge enabled = 1 protect = 0 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck = 1 [rpmforge-extras] name = RHEL $releasever - RPMforge.net - extras baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras enabled = 0 protect = 0 I see, "descr" can''t be used more than once in the same yumrepo{} section. What''s the work around? Cheers!! -- 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.
Steven Acres
2011-Apr-16 19:08 UTC
Re: [Puppet Users] How to create multi-option yum repo file?
On Sat, Apr 16, 2011 at 7:07 AM, Sans <r.santanu.das@gmail.com> wrote:> Dear all, > > How can I create a yum repo like this? > > [rpmforge] > name = RHEL $releasever - RPMforge.net - dag > baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge > enabled = 1 > protect = 0 > gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag > gpgcheck = 1 > > [rpmforge-extras] > name = RHEL $releasever - RPMforge.net - extras > baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras > enabled = 0 > protect = 0 > > I see, "descr" can''t be used more than once in the same yumrepo{} > section. What''s the work around? Cheers!! > > -- > 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. > >Hey, Take a look at the yum module from puzzle.ch here: https://github.com/puzzle/puppet-yum -- Cheers, Steven ----------------------- Steven Acres UNIX/Linux System Administrator -- 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
2011-Apr-18 17:11 UTC
[Puppet Users] Re: How to create multi-option yum repo file?
On Apr 16, 6:07 am, Sans <r.santanu....@gmail.com> wrote:> Dear all, > > How can I create a yum repo like this? > > [rpmforge] > name = RHEL $releasever - RPMforge.net - dag > baseurl =http://apt.sw.be/redhat/el5/en/$basearch/rpmforge > enabled = 1 > protect = 0 > gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag > gpgcheck = 1 > > [rpmforge-extras] > name = RHEL $releasever - RPMforge.net - extras > baseurl =http://apt.sw.be/redhat/el5/en/$basearch/extras > enabled = 0 > protect = 0If the file exists before the Puppet run, then Puppet will not split it up, but when Puppet creates a new repo definition it always goes into its own file. You could, however, concatenate the resulting files after the fact, probably via an exec. If having the repos in multiple files bothers you, the go vote for bug #2062.> I see, "descr" can''t be used more than once in the same yumrepo{} > section. What''s the work around? Cheers!!I didn''t know this was a restriction. If it is, then it will apply whether you declare your Yumrepos in the same or different blocks. There is no reason why it should need to be unique, so if you indeed see such behavior then I''d file a ticket. On the other hand, I cannot imagine why it would be important to have identical "descr" properties for two or more distinct Yumrepos. In fact, I''m not even seeing why it would be a good idea. The workaround is to assign values that describe your repos specifically enough that you have no duplicates. 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.
On Apr 18, 6:11 pm, jcbollinger <John.Bollin...@stJude.org> wrote:> > > [rpmforge-extras] > > name = RHEL $releasever - RPMforge.net - extras > > baseurl =http://apt.sw.be/redhat/el5/en/$basearch/extras > > enabled = 0 > > protect = 0 > > If the file exists before the Puppet run, then Puppet will not split > it up, but when Puppet creates a new repo definition it always goes > into its own file. You could, however, concatenate the resulting > files after the fact, probably via an exec. If having the repos in > multiple files bothers you, the go vote for bug #2062. >Although it''s bothering me a to some extent, it''s more likely a question of compatibility. When the RHEL is the OS in question, RHEL itself delivers the repo in the format, whilst Puppet doesn''t support that yet (as far as I understood in my few days of experience). Thanks for the info on the bug reporting, I''ll look for it.> > I see, "descr" can''t be used more than once in the same yumrepo{} > > section. What''s the work around? Cheers!! > > I didn''t know this was a restriction. If it is, then it will apply > whether you declare your Yumrepos in the same or different blocks. > There is no reason why it should need to be unique, so if you indeed > see such behavior then I''d file a ticket. >Looks like I was doing something wrong when I tried that for the first time. If I do something like this: yumrepo { ''rpmforge'': descr = ''RHEL $releasever - RPMforge.net - dag'', baseurl = ''http://apt.sw.be/redhat/el5/en/$basearch/rpmforge'', enabled = ''1'''' protect = ''0'', gpgcheck = ''1'', gpgkey = ''file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag''; ''rpmforge-extras'': descr = ''RHEL $releasever - RPMforge.net - extras'', baseurl = ''http://apt.sw.be/redhat/el5/en/$basearch/extras'', enabled = ''0'', protect = ''0''; } Puppet creates two separate file, which actually does makes sense the way Puppet works.> On the other hand, I cannot imagine why it would be important to have > identical "descr" properties for two or more distinct Yumrepos. In > fact, I''m not even seeing why it would be a good idea. The workaround > is to assign values that describe your repos specifically enough that > you have no duplicates. >Maybe I confused you with my question, but I didn''t mean to say identical "descr" and as you can see above, I wasn''t using identical "descr" properties at all. Cheers!! -- 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
2011-Apr-19 15:02 UTC
[Puppet Users] Re: How to create multi-option yum repo file?
On Apr 18, 7:03 pm, Sans <r.santanu....@gmail.com> wrote:> On Apr 18, 6:11 pm, jcbollinger <John.Bollin...@stJude.org> wrote:[...]> > If the file exists before the Puppet run, then Puppet will not split > > it up, but when Puppet creates a new repo definition it always goes > > into its own file. You could, however, concatenate the resulting > > files after the fact, probably via an exec. If having the repos in > > multiple files bothers you, the go vote for bug #2062. > > Although it''s bothering me a to some extent, it''s more likely a > question of compatibility. When the RHEL is the OS in question, RHEL > itself delivers the repo in the format, whilst Puppet doesn''t support > that yet (as far as I understood in my few days of experience). Thanks > for the info on the bug reporting, I''ll look for it.As I wrote before, "If the file exists before the Puppet run, then Puppet will not split it up." Perhaps I should have been more specific: in that case, Puppet will work fine with the file containing multiple repo declarations. It will successfully manage all the repositories defined in such a file, and it will keep them together in that file. This has worked since at least 0.24.8. What Puppet does not like is the same repo being defined in more than one file, and perhaps that''s what you''ve run into. Yum supposedly accepts duplicates, so that might contribute to the appearance that the problem is with Puppet. As far as i can tell, however, Yum''s *treatment* of duplicates is undocumented, so I cannot fault Puppet for objecting.> > > > I see, "descr" can''t be used more than once in the same yumrepo{} > > > section. What''s the work around? Cheers!! > > > I didn''t know this was a restriction. If it is, then it will apply > > whether you declare your Yumrepos in the same or different blocks. > > There is no reason why it should need to be unique, so if you indeed > > see such behavior then I''d file a ticket. > > Looks like I was doing something wrong when I tried that for the first > time. If I do something like this:[...]> Puppet creates two separate file, which actually does makes sense the > way Puppet works.I''m glad you''ve sorted it out. 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.