File puppet.spec of Package puppet
#
# spec file for package puppet
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
#%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
Name: puppet
Version: 2.6.4
Release: 3.1
License: GPLv2+
Group: Productivity/Networking/System
Url: http://reductivelabs.com/projects/puppet/
Source: %{name}-%{version}.tar.bz2
Source1: puppetmaster.fw
Source2: puppet.fw
Source3: puppet.sysconfig
Source4: puppetmasterd.sysconfig
Patch: %{name}-%{version}-yumconf.diff
Patch1: %{name}-%{version}-init.diff
Requires: ruby >= 1.8.1
Requires: facter >= 1.1.4
PreReq: pwdutils %insserv_prereq %fillup_prereq
BuildRequires: facter >= 1.1.4
BuildRequires: ruby >= 1.8.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: A network tool for managing many disparate systems
%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 server
License: GPLv2+
Group: Productivity/Networking/System
PreReq: puppet = %{version}-%{release} %insserv_prereq %fillup_prereq
Summary: A network tool for managing many disparate systems
%description server
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.
%prep
%setup -q
%patch
%patch1
sed -i 's#/usr/local/bin/ruby#/usr/bin/ruby#' lib/puppet/external/nagios.rb
%build
%install
DESTDIR=$RPM_BUILD_ROOT ruby -rvendor-specific install.rb install --prefix=%{buildroot}
install -d -m 755 $RPM_BUILD_ROOT/var/lib/puppet
mkdir -p $RPM_BUILD_ROOT/etc/puppet
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/var/lib/puppet
#mkdir -p $RPM_BUILD_ROOT/var/run/puppet
mkdir -p $RPM_BUILD_ROOT/var/log/puppet
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m0644 conf/redhat/puppet.conf $RPM_BUILD_ROOT/etc/puppet/puppet.conf
install -m0644 conf/auth.conf $RPM_BUILD_ROOT/etc/puppet/auth.conf
install -m0755 conf/suse/client.init $RPM_BUILD_ROOT/etc/init.d/puppet
install -m0755 conf/suse/server.init $RPM_BUILD_ROOT/etc/init.d/puppetmasterd
ln -sf ../../etc/init.d/puppet $RPM_BUILD_ROOT/%{_sbindir}/rcpuppet
ln -sf ../../etc/init.d/puppetmasterd $RPM_BUILD_ROOT/%{_sbindir}/rcpuppetmasterd
#install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_fwdefdir}/puppetmasterd
#install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_fwdefdir}/puppet
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
cp %{S:3} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.puppet
cp %{S:4} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.puppetmasterd
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/ruby/vendor_ruby/%{rb_ver}/puppet/external/nagios.rb
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/ruby/vendor_ruby/%{rb_ver}/puppet/network/http_server/mongrel.rb
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/ruby/vendor_ruby/%{rb_ver}/puppet/relationship.rb
%clean
rm -rf $RPM_BUILD_ROOT
%pre
getent group puppet >/dev/null || /usr/sbin/groupadd -o -r puppet
getent passwd puppet >/dev/null || /usr/sbin/useradd -r -g puppet -d /var/lib/puppet -s /bin/false -c "Puppet daemon" puppet
%preun
%stop_on_removal puppet
%postun
%restart_on_update puppet
%insserv_cleanup
%post
%fillup_and_insserv
%preun server
%stop_on_removal puppetmasterd
%post server
%fillup_and_insserv -f
%postun server
%restart_on_update puppetmasterd
%insserv_cleanup
%files
%defattr(-,root,root,-)
%doc CHANGELOG COPYING LICENSE README
%{_bindir}/pi
%{_bindir}/filebucket
%{_bindir}/puppet
%{_bindir}/ralsh
%{_bindir}/puppetdoc
%{_sbindir}/puppetca
%dir %{_libdir}/ruby/vendor_ruby/%{rb_ver}/puppet
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/puppet/*
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/puppet.rb
%dir /etc/puppet
%dir /var/lib/puppet
%dir /var/log/puppet
#%dir /var/run/puppet
%config /etc/puppet/puppet.conf
%config /etc/puppet/auth.conf
%{_mandir}/man?/*
/etc/init.d/puppet
%{_sbindir}/rcpuppet
%{_sbindir}/puppetd
#%config %{_fwdefdir}/puppet
/var/adm/fillup-templates/sysconfig.puppet
%files server
%defattr(-, root, root, 0755)
%dir %attr(755,root,root) /var/lib/puppet
%{_sbindir}/puppetmasterd
%{_sbindir}/puppetrun
/etc/init.d/puppetmasterd
#%config %{_fwdefdir}/puppetmasterd
%{_sbindir}/rcpuppetmasterd
%{_sbindir}/puppetqd
/var/adm/fillup-templates/sysconfig.puppetmasterd
%changelog
* Fri Jan 28 2011 vcizek@novell.com
- update to 2.6.4
* bugfixes: bnc#667867
Ship auth.conf as part of installing from source
* Tue Oct 5 2010 anicka@suse.cz
- update to 2.6.1
* bugfixes, manpage fixes
* Thu Aug 19 2010 anicka@suse.cz
- update to 2.6.0
* major release with many new configuration options and new
language features
* Mon Aug 16 2010 anicka@suse.cz
- respect sysconfig settings (bnc#620808)
* Tue Jul 20 2010 anicka@suse.cz
- create puppet user not only for server package (bnc#623884)
* Tue Mar 2 2010 anicka@suse.cz
- update to 0.25.4
* bugfixes
- create user puppet (fixes bnc#576453)
* Wed Apr 15 2009 mantel@suse.de
- update to 0.24.8
* Mon Apr 6 2009 mantel@suse.de
- add zypper.rb plugin by Leo Eraly
* Mon Feb 9 2009 anicka@suse.cz
- update to 2.4.7
* Deprecate the NetInfo nameservice provider. Use directoryservice
instead
* Add macauthorization type
* Refactoring the thread-safety in Puppet::Util
* Removing the included testing gems; you must now install them
yourself
* Refactoring of SELinux functions to use native Ruby SELinux
interface
* Removing all mention of EPM, RPM, or Sun packages.
* Replaced SELInux calls to binaries with Ruby SELinux bindings
* Adding support to the user type for: profiles, auths, project,
key/value pairs (extension to Solaris RBAC support added in
0.24.6)
* Added a number of confines to package providers
* lots of bugfixes
- add sysconfig, firewall definitions, package
init scripts (bnc#465778)
* Tue Sep 9 2008 anicka@suse.cz
- update to 0.24.5
* You can now select the encoding format when transferring
the catalog, with 'yaml' still being the default but 'marshal'
being an option.
* Removed support for the 'node_name' setting in LDAP and external
node lookups.
* Also removed support for 'default' nodes in external nodes.
* Exporting or collecting resources no longer raises an exception
when no storeconfigs is enabled, it just produces a warning.
* Always using the cert name to store yaml files
* Added support for the --all option to puppetca --clean. If
puppetca --clean --all is issued then all client certificates
are removed.
* Resources now return the 'should' value for properties from
the [] accessor method (they previously threw an exception when
this method was used with properties).
* Modified the 'master' handler to use the Catalog class to
compile node configurations, rather than using the Configuration
handler, which was never used directly.
* Modified the 'master' handler (responsible for sending
configurations to clients) to always return Time.now as its
compile date, so configurations will always get recompiled.
* Saving new facts now expires any cached node information.
* Switching how caching is handled, so that objects now all
have an expiration date associated with them. This makes it
much easier to know whether a given cached object should be used
or if it should be regenerated.
* Changing the default environment to production.
- fix installation script (man8 permissions)
* Mon Sep 1 2008 anicka@suse.cz
- package created (version 0.24.4)