Hello, I just made packages for puppet for OpenSuSE. They are available at my yum repo at http://lmmri.fri.uni-lj.si/suse/ I had to change the init scripts and the first line of puppetd and puppetmaster programs from #!/usr/bin/env ruby to #!/usr/bin/ruby otherwise the killproc from init scripts could not kill the daemons. Unfortunately I had to change the spec file as well. I wonder if there is posible to make a spec file that would work for both suse and redhat? The patch can be found at http://lmmri.fri.uni-lj.si/suse/SOURCES/puppet.suse.patch the spec is at http://lmmri.fri.uni-lj.si/suse/SPECS/puppet.spec Martin Vuk
On Wed, 2006-08-02 at 12:02 +0200, Martin Vuk wrote:> Hello, > > I just made packages for puppet for OpenSuSE. They are available at my > yum repo at > http://lmmri.fri.uni-lj.si/suse/Excellent !> I had to change the init scripts and the first line of puppetd and > puppetmaster programs from > > #!/usr/bin/env ruby to #!/usr/bin/ruby > > otherwise the killproc from init scripts could not kill the daemons.I just fixed that issue in the very latest puppet.spec; having said that, there''s probably enough differences between RH and SuSe to justify forking the various files.> Unfortunately I had to change the spec file as well. > I wonder if there is posible to make a spec file that would work for > both suse and redhat?>From looking at the diffs between your and my specfiles, it seems thathaving one specfile for RH and SuSe would require some ugly %if magic; and since I don''t have a SuSe box anywhere, somebody else (you? ;) will need to maintain the SuSe specfile, anyway. David
On Aug 2, 2006, at 5:02 AM, Martin Vuk wrote:> Hello, > > I just made packages for puppet for OpenSuSE. They are available at my > yum repo at > http://lmmri.fri.uni-lj.si/suse/Very cool! I''ve added a link to this site on the installation page.> I had to change the init scripts and the first line of puppetd and > puppetmaster programs from > > #!/usr/bin/env ruby to #!/usr/bin/ruby > > otherwise the killproc from init scripts could not kill the daemons. > Unfortunately I had to change the spec file as well. > I wonder if there is posible to make a spec file that would work for > both suse and redhat? > > The patch can be found at > http://lmmri.fri.uni-lj.si/suse/SOURCES/puppet.suse.patch > the spec is at > http://lmmri.fri.uni-lj.si/suse/SPECS/puppet.specSounds like you and david have this under control, but if there''s anything you need me to do, please let me know. -- Luke Kanies http://madstop.com 615-594-8199
Hi, On Wed, Aug 02, 2006 at 10:14:24AM -0700, David Lutterkort wrote:> I just fixed that issue in the very latest puppet.spec;Great, so I can steal from you again;-)> having said > that, there''s probably enough differences between RH and SuSe to justify > forking the various files.Unfortunately yes. I tried to make init scripts working on both, but the result was a mess with a lot of if''s. Anyway thanks to David''s nice redhat packages, I didn''t have much difficulties adjusting them to suse.> having one specfile for RH and SuSe would require some ugly %if magic; > and since I don''t have a SuSe box anywhere, somebody else (you? ;) will > need to maintain the SuSe specfile, anyway.I figured it would be ugly. It seems I''ll have to maintain it anyway ;-). I will try to follow closely to redhat spec file, so I can use the adjustments David makes. Martin
On Wed, Aug 02, 2006 at 01:44:15PM -0500, Luke Kanies wrote:> Sounds like you and david have this under control, but if there''s > anything you need me to do, please let me know.Well, since you ask. I''ve attached a patch that adds support for enable keyword for service on suse system. It would be nice to include it in main puppet distribution. Where can I submit bugs/enhancements? It seems that trac at http://www.reductivelabs.com/cgi-bin/puppet.cgi does not allow submiting bugs to anonymous users. Martin BTW Are devel and users list still the same? -------------- next part -------------- diff -uNr puppet-0.18.4/lib/puppet/type/service/suse.rb puppet/lib/puppet/type/service/suse.rb --- puppet-0.18.4/lib/puppet/type/service/suse.rb 1970-01-01 01:00:00.000000000 +0100 +++ puppet/lib/puppet/type/service/suse.rb 2006-08-02 15:58:39.000000000 +0200 @@ -0,0 +1,21 @@ +require ''puppet/type/service/init'' + +# Manage SuSE services. Everything is same as redhat, but enable/disable +# is special. +Puppet.type(:service).newsvctype(:suse, :redhat) do + + def enabled? + begin + output = util_execute("/sbin/chkconfig #{self[:name]} 2>&1").chomp + rescue Puppet::ExecutionFailure + return :false + end + # If it''s enabled on SuSE, then it will print output showing on + # at the end + if output =~ /.* on$/ + return :true + else + return :false + end + end +end diff -uNr puppet-0.18.4/lib/puppet/type/service.rb puppet/lib/puppet/type/service.rb --- puppet-0.18.4/lib/puppet/type/service.rb 2006-07-21 17:44:22.000000000 +0200 +++ puppet/lib/puppet/type/service.rb 2006-08-02 16:00:36.000000000 +0200 @@ -286,7 +286,9 @@ end when "CentOS", "RedHat", "Fedora": @defsvctype = self.svctype(:redhat) - else + when "SuSE": + @defsvctype = self.svctype(:suse) + else if Facter["kernel"] == "Linux" Puppet.notice "Using service type %s for %s" % ["init", Facter["operatingsystem"].value] @@ -575,5 +577,6 @@ require ''puppet/type/service/debian'' require ''puppet/type/service/redhat'' require ''puppet/type/service/smf'' +require ''puppet/type/service/suse'' # $Id: service.rb 1295 2006-06-17 02:04:50Z luke $
> BTW Are devel and users list still the same?No they''ve been split recently. -doc
Martin Vuk wrote:> On Wed, Aug 02, 2006 at 01:44:15PM -0500, Luke Kanies wrote: >> Sounds like you and david have this under control, but if there''s >> anything you need me to do, please let me know. > Well, since you ask. I''ve attached a patch that adds support for > enable keyword for service on suse system. It would be nice to include it > in main puppet distribution. Where can I submit bugs/enhancements? > > It seems that trac at > http://www.reductivelabs.com/cgi-bin/puppet.cgi > does not allow submiting bugs to anonymous users.I used to allow them, but we were getting tons of spam and Trac doesn''t deal well (at all?) with spam. The front page lists a user and password you can use to log in, though, and then you can submit patches and bugs that way.> Martin > > BTW Are devel and users list still the same?I just split them a couple of weeks ago, so they haven''t really settled into clearly separate lists. I expect that the users list will always be a superset of the dev list, but all Trac operations go to the dev list, not the users lists. -- The chief lesson I have learned in a long life is that the only way to make a man trustworthy is to trust him; and the surest way to make him untrustworthy is to distrust him and show your distrust. -- Henry L. Stimson --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Wed, Aug 02, 2006 at 10:36:52PM +0200, Martin Vuk wrote:> in main puppet distribution. Where can I submit bugs/enhancements? > > It seems that trac at > http://www.reductivelabs.com/cgi-bin/puppet.cgi > does not allow submiting bugs to anonymous users.As per the last paragraph on that page, you can login as ''puppet'' with the password ''reductive''. The previous edition of the page had that info, but it was unobtrusive. I''ve just made it a lot more visible.> BTW Are devel and users list still the same?No, they''ve always been separate lists. There just wasn''t any -users list until about a week or two ago. - Matt