.gear/rules | 2 + .../tags/f0da8b66ac0074a28e310f8b12f2bccefaca4741 | 6 + .gear/tags/list | 1 + conf/altlinux/fileserver.conf | 12 ++ conf/altlinux/logrotate | 8 + conf/altlinux/puppet.conf | 29 ++++ conf/altlinux/puppet.sysconfig | 11 ++ conf/altlinux/puppetd.init | 95 ++++++++++++ conf/altlinux/puppetmaster.sysconfig | 9 + conf/altlinux/puppetmasterd.init | 94 +++++++++++ install.rb | 15 +- lib/puppet/defaults.rb | 16 +-- lib/puppet/feature/base.rb | 2 +- lib/puppet/network/http_server/mongrel.rb | 1 - lib/puppet/provider/package/aptrpm.rb | 2 + lib/puppet/provider/package/yum.rb | 104 ------------- lib/puppet/provider/package/yumhelper.py | 120 --------------- lib/puppet/provider/service/redhat.rb | 2 +- lib/puppet/provider/sshkey/parsed.rb | 1 + puppet.spec | 162 ++++++++++++++++++++ 20 files changed, 447 insertions(+), 245 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..4fcfd99 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: @version@:. +diff: @version@:. . diff --git a/.gear/tags/f0da8b66ac0074a28e310f8b12f2bccefaca4741 b/.gear/tags/f0da8b66ac0074a28e310f8b12f2bccefaca4741 new file mode 100644 index 0000000..bbaaf78 --- /dev/null +++ b/.gear/tags/f0da8b66ac0074a28e310f8b12f2bccefaca4741 @@ -0,0 +1,6 @@ +object b2c1149b5f374df77ad3e017749f22f6981a453f +type commit +tag 0.24.6 +tagger Alexey I. Froloff 1225486306 +0300 + +0.24.6 diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..f2dec21 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +f0da8b66ac0074a28e310f8b12f2bccefaca4741 0.24.6 diff --git a/conf/altlinux/fileserver.conf b/conf/altlinux/fileserver.conf new file mode 100644 index 0000000..67e387c --- /dev/null +++ b/conf/altlinux/fileserver.conf @@ -0,0 +1,12 @@ +# This file consists of arbitrarily named sections/modules +# defining where files are served from and to whom + +# Define a section 'files' +# Adapt the allow/deny settings to your needs. Order +# for allow/deny does not matter, allow always takes precedence +# over deny +# [files] +# path /var/lib/puppet/files +# allow *.example.com +# deny *.evil.example.com +# allow 192.168.0.0/24 diff --git a/conf/altlinux/logrotate b/conf/altlinux/logrotate new file mode 100644 index 0000000..079c3d9 --- /dev/null +++ b/conf/altlinux/logrotate @@ -0,0 +1,8 @@ +/var/log/puppet/*log { + missingok + create 0644 _puppet _puppet + postrotate + /sbin/service puppetmasterd condrestart >/dev/null 2>&1 ||: + /sbin/service puppetd reload > /dev/null 2>&1 ||: + endscript +} diff --git a/conf/altlinux/puppet.conf b/conf/altlinux/puppet.conf new file mode 100644 index 0000000..70dcb02 --- /dev/null +++ b/conf/altlinux/puppet.conf @@ -0,0 +1,29 @@ +[main] + # Where Puppet stores dynamic and growing data. + # The default value is '/var/puppet'. + vardir = /var/lib/puppet + + # The Puppet log directory. + # The default value is '$vardir/log'. + logdir = /var/log/puppet + + # Where Puppet PID files are kept. + # The default value is '$vardir/run'. + rundir = /var/run/puppet + + # Where SSL certificates are kept. + # The default value is '$confdir/ssl'. + ssldir = $vardir/ssl + +[puppetd] + # The file in which puppetd stores a list of the classes + # associated with the retrieved configuratiion. Can be loaded in + # the separate ``puppet`` executable using the ``--loadclasses`` + # option. + # The default value is '$confdir/classes.txt'. + classfile = $vardir/classes.txt + + # Where puppetd caches the local configuration. An + # extension indicating the cache format is added automatically. + # The default value is '$confdir/localconfig'. + localconfig = $vardir/localconfig diff --git a/conf/altlinux/puppet.sysconfig b/conf/altlinux/puppet.sysconfig new file mode 100644 index 0000000..3befdd4 --- /dev/null +++ b/conf/altlinux/puppet.sysconfig @@ -0,0 +1,11 @@ +# The puppetmaster server +#PUPPET_SERVER=puppet + +# If you wish to specify the port to connect to do so here +#PUPPET_PORT=8140 + +# Where to log to. Specify syslog to send log messages to the system log. +#PUPPET_LOG=/var/log/puppet/puppet.log + +# You may specify other parameters to the puppet client here +#PUPPET_EXTRA_OPTS=--waitforcert=500 diff --git a/conf/altlinux/puppetd.init b/conf/altlinux/puppetd.init new file mode 100644 index 0000000..0eaedd1 --- /dev/null +++ b/conf/altlinux/puppetd.init @@ -0,0 +1,95 @@ +#!/bin/sh +# +# puppet Init script for running the puppet client daemon +# +# chkconfig: - 98 02 +# description: Enables periodic system configuration checks through puppet. +# processname: puppetd +# config: /etc/sysconfig/puppet +# pidfile: /var/run/puppet/puppetd.pid + +# Do not load RH compatibility interface. +WITHOUT_RC_COMPAT=1 + +# Source function library. +. /etc/init.d/functions + +SourceIfNotEmpty /etc/sysconfig/puppet + +PIDFILE=/var/run/puppet/puppetd.pid +LOCKFILE=/var/lock/subsys/puppet +RETVAL=0 + +PUPPET_OPTS= +[ -z "$PUPPET_SERVER" ] || PUPPET_OPTS="--server=$PUPPET_SERVER" +[ -z "$PUPPET_LOG" ] || PUPPET_OPTS="$PUPPET_OPTS --logdest=$PUPPET_LOG" +[ -z "$PUPPET_PORT" ] || PUPPET_OPTS="$PUPPET_OPTS --port=$PUPPET_PORT" +PUPPET_OPTS="$PUPPET_OPTS $PUPPET_EXTRA_OPTS" + +start() +{ + start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- puppetd $PUPPET_OPTS + RETVAL=$? + return $RETVAL +} + +stop() +{ + stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root --displayname puppetd -- /usr/bin/ruby + RETVAL=$? + return $RETVAL +} + +restart() +{ + stop + start +} + +reload() +{ + msg_reloading template + stop_daemon --pidfile "$PIDFILE" --expect-user root -HUP --displayname puppetd -- /usr/bin/ruby + RETVAL=$? + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload) + reload + ;; + restart) + restart + ;; + condstop) + if [ -e "$LOCKFILE" ]; then + stop + fi + ;; + condrestart) + if [ -e "$LOCKFILE" ]; then + restart + fi + ;; + condreload) + if [ -e "$LOCKFILE" ]; then + reload + fi + ;; + status) + status --pidfile "$PIDFILE" --expect-user root --displayname puppetd -- /usr/bin/ruby + RETVAL=$? + ;; + *) + msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/conf/altlinux/puppetmaster.sysconfig b/conf/altlinux/puppetmaster.sysconfig new file mode 100644 index 0000000..fe673cc --- /dev/null +++ b/conf/altlinux/puppetmaster.sysconfig @@ -0,0 +1,9 @@ +# Location of the main manifest +#PUPPETMASTER_MANIFEST=/etc/puppet/manifests/site.pp + +# Where to log general messages to. +# Specify syslog to send log messages to the system log. +#PUPPETMASTER_LOG=syslog + +# You may specify other parameters to the puppetmaster here +#PUPPETMASTER_EXTRA_OPTS=--noca diff --git a/conf/altlinux/puppetmasterd.init b/conf/altlinux/puppetmasterd.init new file mode 100644 index 0000000..6e7c115 --- /dev/null +++ b/conf/altlinux/puppetmasterd.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# puppetmaster This shell script enables the puppetmaster server +# +# chkconfig: - 65 45 +# description: Server for the puppet system management tool +# processname: puppetmasterd +# config: /etc/sysconfig/puppetmaster +# pidfile: /var/run/puppet/puppetmasterd.pid + +# Do not load RH compatibility interface. +WITHOUT_RC_COMPAT=1 + +# Source function library. +. /etc/init.d/functions + +SourceIfNotEmpty /etc/sysconfig/puppetmaster + +PIDFILE=/var/run/puppet/puppetmasterd.pid +LOCKFILE=/var/lock/subsys/puppetmaster +RETVAL=0 + +PUPPETMASTER_OPTS= +[ -z "$PUPPETMASTER_MANIFEST" ] || PUPPETMASTER_OPTS="--manifest=$PUPPETMASTER_MANIFEST" +[ -z "$PUPPETMASTER_LOG" ] || PUPPETMASTER_OPTS="$PUPPETMASTER_OPTS --logdest=$PUPPETMASTER_LOG" +PUPPETMASTER_OPTS="$PUPPETMASTER_OPTS $PUPPETMASTER_EXTRA_OPTS" + +start() +{ + start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user _puppet -- puppetmasterd $PUPPETMASTER_OPTS + RETVAL=$? + return $RETVAL +} + +stop() +{ + stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user _puppet --displayname puppetmasterd -- /usr/bin/ruby + RETVAL=$? + return $RETVAL +} + +restart() +{ + stop + start +} + +reload() +{ + msg_reloading template + stop_daemon --pidfile "$PIDFILE" --expect-user _puppet -HUP --displayname puppetmasterd -- /usr/bin/ruby + RETVAL=$? + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload) + reload + ;; + restart) + restart + ;; + condstop) + if [ -e "$LOCKFILE" ]; then + stop + fi + ;; + condrestart) + if [ -e "$LOCKFILE" ]; then + restart + fi + ;; + condreload) + if [ -e "$LOCKFILE" ]; then + reload + fi + ;; + status) + status --pidfile "$PIDFILE" --expect-user _puppet --displayname puppetmasterd -- /usr/bin/ruby + RETVAL=$? + ;; + *) + msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/install.rb b/install.rb index 3fa3822..83d3d28 100755 --- a/install.rb +++ b/install.rb @@ -93,8 +93,7 @@ def do_libs(libs, strip = 'lib/') olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, '')) op = File.dirname(olf) File.makedirs(op, true) - File.chmod(0755, op) - File.install(lf, olf, 0755, true) + File.install(lf, olf, 0644, true) end end @@ -258,10 +257,10 @@ def prepare_installation # To be deprecated once people move over to using --destdir option if (destdir = ENV['DESTDIR']) - bindir = "#{destdir}#{bindir}" - sbindir = "#{destdir}#{sbindir}" - mandir = "#{destdir}#{mandir}" - sitelibdir = "#{destdir}#{sitelibdir}" + bindir = Config::CONFIG['bindir'] + sbindir = Config::CONFIG['sbindir'] + mandir = Config::CONFIG['mandir'] + sitelibdir = sitelibdir FileUtils.makedirs(bindir) FileUtils.makedirs(sbindir) @@ -381,11 +380,11 @@ def install_binfile(from, op_file, target) fail "Cannot find a temporary directory" unless tmp_dir tmp_file = File.join(tmp_dir, '_tmp') - ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) + ruby = File.join('/usr/bin', Config::CONFIG['ruby_install_name']) File.open(from) do |ip| File.open(tmp_file, "w") do |op| - ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) + ruby = File.join('/usr/bin', Config::CONFIG['ruby_install_name']) op.puts "#!#{ruby}" contents = ip.readlines if contents[0] =~ /^#!/ diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index e1b6dc4..f83c489 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -16,7 +16,7 @@ module Puppet else # Else, use system-wide directories. conf = "/etc/puppet" - var = "/var/puppet" + var = "/var/lib/puppet" end self.setdefaults(:main, @@ -29,14 +29,11 @@ module Puppet ) if name == "puppetmasterd" - logopts = {:default => "$vardir/log", - :mode => 0750, - :owner => "$user", - :group => "$group", + logopts = {:default => "/var/log/puppet", :desc => "The Puppet log directory." } else - logopts = ["$vardir/log", "The Puppet log directory."] + logopts = ["$/var/log/puppet", "The Puppet log directory."] end setdefaults(:main, :logdir => logopts) @@ -61,14 +58,13 @@ module Puppet might result in spurious service restarts)." }, :ssldir => { - :default => "$confdir/ssl", + :default => "$vardir/ssl", :mode => 0771, :owner => "root", :desc => "Where SSL certificates are kept." }, :rundir => { :default => rundir, - :mode => 01777, :desc => "Where Puppet PID files are kept." }, :genconfig => [false, @@ -298,8 +294,8 @@ module Puppet ) self.setdefaults(:puppetmasterd, - :user => ["puppet", "The user puppetmasterd should run as."], - :group => ["puppet", "The group puppetmasterd should run as."], + :user => ["_puppet", "The user puppetmasterd should run as."], + :group => ["_puppet", "The group puppetmasterd should run as."], :manifestdir => ["$confdir/manifests", "Where puppetmasterd looks for its manifests."], :manifest => ["$manifestdir/site.pp", diff --git a/lib/puppet/feature/base.rb b/lib/puppet/feature/base.rb index 518e9b4..410a037 100644 --- a/lib/puppet/feature/base.rb +++ b/lib/puppet/feature/base.rb @@ -18,7 +18,7 @@ Puppet.features.add(:libshadow, :libs => ["shadow"]) Puppet.features.add(:root) { require 'puppet/util/suidmanager'; Puppet::Util::SUIDManager.uid == 0 } # We've got mongrel available -Puppet.features.add(:mongrel, :libs => %w{rubygems mongrel puppet/network/http_server/mongrel}) +Puppet.features.add(:mongrel, :libs => %w{mongrel puppet/network/http_server/mongrel}) # We have lcs diff Puppet.features.add :diff, :libs => %w{diff/lcs diff/lcs/hunk} diff --git a/lib/puppet/network/http_server/mongrel.rb b/lib/puppet/network/http_server/mongrel.rb index 6b2325d..b2517a3 100644 --- a/lib/puppet/network/http_server/mongrel.rb +++ b/lib/puppet/network/http_server/mongrel.rb @@ -27,7 +27,6 @@ # This file is based heavily on a file retrieved from # http://ttt.ggnore.net/2006/11/15/xmlrpc-with-mongrel-and-ruby-off-rails/ -require 'rubygems' require 'mongrel' require 'xmlrpc/server' require 'puppet/network/xmlrpc/server' diff --git a/lib/puppet/provider/package/aptrpm.rb b/lib/puppet/provider/package/aptrpm.rb index 9b3e7f0..c93ccbf 100644 --- a/lib/puppet/provider/package/aptrpm.rb +++ b/lib/puppet/provider/package/aptrpm.rb @@ -10,6 +10,8 @@ Puppet::Type.type(:package).provide :aptrpm, :parent => :rpm, :source => :rpm do commands :aptcache => "apt-cache" commands :rpm => "rpm" + defaultfor :operatingsystem => :altlinux + if command('rpm') confine :true => begin rpm('-ql', 'rpm') diff --git a/lib/puppet/provider/package/yum.rb b/lib/puppet/provider/package/yum.rb deleted file mode 100755 index 56fad1a..0000000 --- a/lib/puppet/provider/package/yum.rb +++ /dev/null @@ -1,104 +0,0 @@ -Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do - desc "Support via ``yum``." - - has_feature :versionable - - commands :yum => "yum", :rpm => "rpm", :python => "python" - - YUMHELPER = File::join(File::dirname(__FILE__), "yumhelper.py") - - attr_accessor :latest_info - - if command('rpm') - confine :true => begin - rpm('--version') - rescue Puppet::ExecutionFailure - false - else - true - end - end - - defaultfor :operatingsystem => [:fedora, :centos, :redhat] - - def self.prefetch(packages) - if Process.euid != 0 - raise Puppet::Error, "The yum provider can only be used as root" - end - super - return unless packages.detect { |name, package| package.should(:ensure) == :latest } - - # collect our 'latest' info - updates = {} - python(YUMHELPER).each_line do |l| - l.chomp! - next if l.empty? - if l[0,4] == "_pkg" - hash = nevra_to_hash(l[5..-1]) - [hash[:name], "#{hash[:name]}.#{hash[:arch]}"].each do |n| - updates[n] ||= [] - updates[n] << hash - end - end - end - - # Add our 'latest' info to the providers. - packages.each do |name, package| - if info = updates[package[:name]] - package.provider.latest_info = info[0] - end - end - end - - def install - should = @resource.should(:ensure) - self.debug "Ensuring => #{should}" - wanted = @resource[:name] - - # XXX: We don't actually deal with epochs here. - case should - when true, false, Symbol - # pass - should = nil - else - # Add the package version - wanted += "-%s" % should - end - - output = yum "-d", "0", "-e", "0", "-y", :install, wanted - - is = self.query - unless is - raise Puppet::Error, "Could not find package %s" % self.name - end - - # FIXME: Should we raise an exception even if should == :latest - # and yum updated us to a version other than @param_hash[:ensure] ? - if should && should != is[:ensure] - raise Puppet::Error, "Failed to update to version #{should}, got version #{is[:ensure]} instead" - end - end - - # What's the latest package version available? - def latest - upd = latest_info - unless upd.nil? - # FIXME: there could be more than one update for a package - # because of multiarch - return "#{upd[:version]}-#{upd[:release]}" - else - # Yum didn't find updates, pretend the current - # version is the latest - if properties[:ensure] == :absent - raise Puppet::DevError, "Tried to get latest on a missing package" - end - return properties[:ensure] - end - end - - def update - # Install in yum can be used for update, too - self.install - end -end - diff --git a/lib/puppet/provider/package/yumhelper.py b/lib/puppet/provider/package/yumhelper.py deleted file mode 100644 index 8eab0d0..0000000 --- a/lib/puppet/provider/package/yumhelper.py +++ /dev/null @@ -1,120 +0,0 @@ -# Python helper script to query for the packages that have -# pending updates. Called by the yum package provider -# -# (C) 2007 Red Hat Inc. -# David Lutterkort - -import sys -import string -import re - -# this maintains compatibility with really old platforms with python 1.x -from os import popen, WEXITSTATUS - -# Try to use the yum libraries by default, but shell out to the yum executable -# if they are not present (i.e. yum <= 2.0). This is only required for RHEL3 -# and earlier that do not support later versions of Yum. Once RHEL3 is EOL, -# shell_out() and related code can be removed. -try: - import yum -except ImportError: - useyumlib = 0 -else: - useyumlib = 1 - -OVERRIDE_OPTS = { - 'debuglevel': 0, - 'errorlevel': 0, - 'logfile': '/dev/null' -} - -def pkg_lists(my): - my.doConfigSetup() - - for k in OVERRIDE_OPTS.keys(): - if hasattr(my.conf, k): - setattr(my.conf, k, OVERRIDE_OPTS[k]) - else: - my.conf.setConfigOption(k, OVERRIDE_OPTS[k]) - - my.doTsSetup() - my.doRpmDBSetup() - return my.doPackageLists('updates') - -def shell_out(): - try: - p = popen("/usr/bin/env yum check-update 2>&1") - output = p.readlines() - rc = p.close() - - if rc is not None: - # None represents exit code of 0, otherwise the exit code is in the - # format returned by wait(). Exit code of 100 from yum represents - # updates available. - if WEXITSTATUS(rc) != 100: - return WEXITSTATUS(rc) - else: - # Exit code is None (0), no updates waiting so don't both parsing output - return 0 - - # Yum prints a line of hyphens (old versions) or a blank line between - # headers and package data, so skip everything before them - skipheaders = 0 - for line in output: - if not skipheaders: - if re.compile("^((-){80}|)$").search(line): - skipheaders = 1 - continue - - # Skip any blank lines - if re.compile("^[ \t]*$").search(line): - continue - - # Format is: - # Yum 1.x: name arch (epoch:)?version - # Yum 2.0: name arch (epoch:)?version repo - # epoch is optional if 0 - - p = string.split(line) - pname = p[0] - parch = p[1] - pevr = p[2] - - # Separate out epoch:version-release - evr_re = re.compile("^(\d:)?(\S+)-(\S+)$") - evr = evr_re.match(pevr) - - pepoch = "" - if evr.group(1) is None: - pepoch = "0" - else: - pepoch = evr.group(1).replace(":", "") - pversion = evr.group(2) - prelease = evr.group(3) - - print "_pkg", pname, pepoch, pversion, prelease, parch - - return 0 - except: - print sys.exc_info()[0] - return 1 - -if useyumlib: - try: - try: - my = yum.YumBase() - ypl = pkg_lists(my) - for pkg in ypl.updates: - print "_pkg %s %s %s %s %s" % (pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch) - finally: - my.closeRpmDB() - except IOError, e: - print "_err IOError %d %s" % (e.errno, e) - sys.exit(1) - except AttributeError, e: - # catch yumlib errors in buggy 2.x versions of yum - print "_err AttributeError %s" % e - sys.exit(1) -else: - rc = shell_out() - sys.exit(rc) diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb index faa7547..db497f2 100755 --- a/lib/puppet/provider/service/redhat.rb +++ b/lib/puppet/provider/service/redhat.rb @@ -6,7 +6,7 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init do commands :chkconfig => "/sbin/chkconfig", :service => "/sbin/service" - defaultfor :operatingsystem => [:redhat, :fedora, :suse, :centos, :sles] + defaultfor :operatingsystem => [:altlinux, :redhat, :fedora, :suse, :centos, :sles] def self.defpath superclass.defpath diff --git a/lib/puppet/provider/sshkey/parsed.rb b/lib/puppet/provider/sshkey/parsed.rb index 6f7d98f..de06a57 100755 --- a/lib/puppet/provider/sshkey/parsed.rb +++ b/lib/puppet/provider/sshkey/parsed.rb @@ -3,6 +3,7 @@ require 'puppet/provider/parsedfile' known = nil case Facter.value(:operatingsystem) when "Darwin": known = "/etc/ssh_known_hosts" +when "ALTLinux": known = "/etc/openssh/ssh_known_hosts" else known = "/etc/ssh/ssh_known_hosts" end diff --git a/puppet.spec b/puppet.spec new file mode 100644 index 0000000..3e26cb3 --- /dev/null +++ b/puppet.spec @@ -0,0 +1,162 @@ +# vim: set ft=spec : -*- rpm-spec -*- + +Name: puppet +Version: 0.24.6 +Release: alt3 + +Summary: System administration - Automated +Group: System/Servers +License: MIT +Url: http://reductivelabs.com/projects/puppet/ + +Packager: Sir Raorn + +BuildArch: noarch + +Source: %name-%version.tar +Patch: %name-%version-%release.patch + +# Automatically added by buildreq on Sat Nov 01 2008 (-bi) +BuildRequires: rpm-build-ruby ruby-facter ruby-module-etc ruby-module-misc ruby-module-openssl ruby-module-xmlrpc ruby-tool-irb + +%description +Puppet lets you centrally manage every important aspect of your +system using a cross-platform specification language that manages +all the separate elements normally aggregated in different files, +like users, cron jobs, and hosts, along with obviously discrete +elements like packages, services, and files. + +%package http_server-mongrel +Summary: Mongrel HTTP server for Puppet +Group: System/Servers +PreReq: %name = %version-%release + +%description http_server-mongrel +Mongrel HTTP server for Puppet. + +%package http_server-rack +Summary: Rack HTTP server for Puppet +Group: System/Servers +PreReq: %name = %version-%release + +%description http_server-rack +Rack HTTP server for Puppet. + +%package http_server-webrick +Summary: WEBrick HTTP server for Puppet +Group: System/Servers +PreReq: %name = %version-%release + +%description http_server-webrick +WEBrick HTTP server for Puppet. + +%package server +Summary: Server for the puppet system management tool +Group: System/Servers +Requires: %name = %version-%release + +%description server +Provides the central puppet server daemon which provides manifests +to clients. The server can also function as a certificate authority +and file server. + +You may need to install appropriate %name-http_server-XXX. + +%prep +%setup +%patch -p1 + +%build +mkdir sbin +mv bin/{puppetd,puppetca,puppetmasterd} sbin + +%install +mkdir -p %buildroot{%_sysconfdir/{logrotate.d,sysconfig,puppet/manifests},%_localstatedir/puppet,%_logdir/puppet,%_var/run/puppet,%_initdir} +DESTDIR=%buildroot %ruby_vendor install.rb +install -p -m644 conf/altlinux/*.conf %buildroot%_sysconfdir/puppet +install -p -m755 conf/altlinux/puppetd.init %buildroot%_initdir/puppetd +install -p -m755 conf/altlinux/puppetmasterd.init %buildroot%_initdir/puppetmasterd +install -p -m644 conf/altlinux/puppet.sysconfig %buildroot%_sysconfdir/sysconfig/puppet +install -p -m644 conf/altlinux/puppetmaster.sysconfig %buildroot%_sysconfdir/sysconfig/puppetmaster +install -p -m644 conf/altlinux/logrotate %buildroot%_sysconfdir/logrotate.d/puppet + +%pre +%_sbindir/groupadd -r -f _puppet +%_sbindir/useradd -r -n -g _puppet -d %_localstatedir/puppet -s /dev/null -c Puppet _puppet >/dev/null 2>&1 ||: + +%post +%post_service puppetd + +%preun +%preun_service puppetd + +%post server +%post_service puppetmasterd + +%preun server +%preun_service puppetmasterd + +%files +%config %_initdir/puppetd +%dir %_sysconfdir/puppet +%config(noreplace) %_sysconfdir/puppet/puppet.conf +%config(noreplace) %_sysconfdir/sysconfig/puppet +%config(noreplace) %_sysconfdir/logrotate.d/puppet +%_bindir/pi +%_bindir/puppet +%_bindir/ralsh +%_bindir/filebucket +%_sbindir/puppetd +%ruby_sitelibdir/* +%exclude %ruby_sitelibdir/puppet/network/http/[^h]* +%exclude %ruby_sitelibdir/puppet/network/http_server/* +%_man8dir/pi.8* +%_man8dir/puppet.8* +%_man8dir/puppet.conf.8* +%_man8dir/ralsh.8* +%_man8dir/filebucket.8* +%_man8dir/puppetd.8* +%attr(1770,root,_puppet) %dir %_localstatedir/puppet +%attr(1770,root,_puppet) %dir %_logdir/puppet +%attr(1770,root,_puppet) %dir %_var/run/puppet + +%files http_server-mongrel +%ruby_sitelibdir/puppet/network/http/mongrel* +%ruby_sitelibdir/puppet/network/http_server/mongrel.rb + +%files http_server-rack +%doc ext/passenger +%ruby_sitelibdir/puppet/network/http_server/rack.rb + +%files http_server-webrick +%ruby_sitelibdir/puppet/network/http/webrick* +%ruby_sitelibdir/puppet/network/http_server/webrick.rb + +%files server +%config %_initdir/puppetmasterd +%dir %_sysconfdir/puppet +%config(noreplace) %_sysconfdir/puppet/fileserver.conf +%config(noreplace) %_sysconfdir/sysconfig/puppetmaster +%_bindir/puppetrun +%_sbindir/puppetmasterd +%_sbindir/puppetca +%_man8dir/puppetrun.8* +%_man8dir/puppetmasterd.8* +%_man8dir/puppetca.8* +%attr(1770,root,_puppet) %dir %_localstatedir/puppet +%attr(1770,root,_puppet) %dir %_logdir/puppet +%attr(1770,root,_puppet) %dir %_var/run/puppet + +%changelog +* Sat Dec 20 2008 Sir Raorn 0.24.6-alt3 +- Fixed interpackage dependencies + +* Sat Dec 20 2008 Sir Raorn 0.24.6-alt2 +- Cleaned up build deps + +* Sat Nov 01 2008 Sir Raorn 0.24.6-alt1 +- [0.24.6] + +* Tue Aug 26 2008 Sir Raorn 0.24.5-alt1 +- Built for Sisyphus +