diff --git a/README.md b/README.md index 4b75c7e..3b418b6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # puppet +Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs +administrative tasks (such as adding users, installing packages, and updating server +configurations) based on a centralized specification. + diff --git a/puppet-3.3.2.gem b/puppet-3.3.2.gem new file mode 100644 index 0000000..8004312 Binary files /dev/null and b/puppet-3.3.2.gem differ diff --git a/puppet.spec b/puppet.spec new file mode 100644 index 0000000..2630db4 --- /dev/null +++ b/puppet.spec @@ -0,0 +1,156 @@ +%define puppet_groupid 65432 +%define puppet_userid 65432 + +Name: puppet +Version: 3.3.2 +Release: 1mamba +Summary: An automated administrative engine for your Linux, Unix, and Windows systems +Group: System/Management +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://puppetlabs.com/ +Source: https://rubygems.org/downloads/puppet-%{version}.gem +License: Apache License 2.0 +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildRequires: ruby +Requires: ruby +Requires: ruby-facter +Requires: ruby-hiera +Requires: ruby-json_pure +Requires: ruby-rgen +Requires(pre): pwdutils +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs +administrative tasks (such as adding users, installing packages, and updating server +configurations) based on a centralized specification. + +%prep +%setup -q -c + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + +gem install --no-user-install --ignore-dependencies -i "%{buildroot}$gemdir" \ + --no-ri --no-rdoc -n "%{buildroot}/usr/bin" "%{SOURCE0}" + +# Set up vim and emacs +install -Dp -m0644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/vim/ftdetect/puppet.vim \ + %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/puppet.vim +install -Dp -m0644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/vim/syntax/puppet.vim \ + %{buildroot}%{_datadir}/vim/vimfiles/syntax/puppet.vim +install -Dp -m0644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/emacs/puppet-mode.el \ + %{buildroot}%{_datadir}/emacs/site-lisp/puppet-mode.el +install -Dp -m0644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/emacs/puppet-mode-init.el \ + %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d/puppet-mode-init.el + +# Configuration and rc scripts +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/redhat/puppet.conf \ + %{buildroot}%{_sysconfdir}/puppet/puppet.conf +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/conf/fileserver.conf \ + %{buildroot}%{_sysconfdir}/puppet/fileserver.conf +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/conf/auth.conf \ + %{buildroot}%{_sysconfdir}/puppet/auth.conf +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/conf/tagmail.conf \ + %{buildroot}%{_sysconfdir}/puppet/tagmail.conf + +# Setup tmpfiles.d config +install -d %{buildroot}%{_libdir}/tmpfiles.d/ +echo "D /run/puppet 0755 puppet puppet -" > %{buildroot}%{_libdir}/tmpfiles.d/puppet.conf + +# Logrotate +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/redhat/logrotate \ + %{buildroot}%{_sysconfdir}/logrotate.d/puppet + +# Systemd files +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/systemd/puppetagent.service \ + %{buildroot}/lib/systemd/system/puppet.service +install -Dm 644 \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/systemd/puppetmaster.service \ + %{buildroot}/lib/systemd/system/puppetmaster.service + +# Create puppet homedir and hieradir +install -d %{buildroot}/var/lib/puppet + +install -d %{buildroot}%{_mandir} +mv %{buildroot}${gemdir}/gems/puppet-%{version}/man/* %{buildroot}/usr/share/man + +rm -rf \ + %{buildroot}${gemdir}/gems/puppet-%{version}/ext/{autotest,debian,freebsd,\ +gentoo,osx,redhat,solaris,suse,windows} + +rm -f %{buildroot}${gemdir}/cache/puppet-%{version}.gem + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%pre +if [ $1 -ge 1 ]; then + groupadd puppet -g %{puppet_groupid} 2>/dev/null + useradd -u %{puppet_userid} -c 'Puppet service' -d /dev/null -g puppet \ + -s /bin/false puppet 2>/dev/null +fi +: + +%post +if [ $1 -ge 1 ]; then + systemctl -q daemon-reload +fi +: + +%preun +if [ $1 -eq 0 ]; then + groupdel puppet 2>/dev/null + userdel puppet 2>/dev/null +fi +: + +%postun +if [ $1 -eq 0 ]; then + systemctl -q daemon-reload +fi +: + +%files +%defattr(-,root,root) +%dir %{_sysconfdir}/puppet +%config(noreplace) %{_sysconfdir}/puppet/auth.conf +%config(noreplace) %{_sysconfdir}/puppet/fileserver.conf +%config(noreplace) %{_sysconfdir}/puppet/puppet.conf +%config(noreplace) %{_sysconfdir}/puppet/tagmail.conf +%{_sysconfdir}/logrotate.d/puppet +%{_bindir}/puppet +%{_libdir}/ruby/gems/*/specifications/puppet-3.3.2.gemspec +%dir %{_libdir}/ruby/gems/*/gems/puppet-%{version} +%{_libdir}/ruby/gems/*/gems/puppet-%{version}/* +/lib/systemd/system/puppet.service +/lib/systemd/system/puppetmaster.service +%{_libdir}/tmpfiles.d/puppet.conf +%{_datadir}/emacs/site-lisp/puppet-mode.el +%{_datadir}/emacs/site-lisp/site-start.d/puppet-mode-init.el +%{_datadir}/vim/vimfiles/ftdetect/puppet.vim +%{_datadir}/vim/vimfiles/syntax/puppet.vim +%{_mandir}/man5/puppet.conf.5* +%{_mandir}/man8/extlookup2hiera.8* +%{_mandir}/man8/puppet*.8* +%attr(0755,puppet,puppet) %dir /var/lib/puppet + +%changelog +* Wed Dec 11 2013 Silvan Calarco 3.3.2-1mamba +- package created using the webbuild interface