diff options
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | PKGBUILD | 75 | ||||
-rw-r--r-- | puppet.install | 19 |
3 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ecbd5bb8a418 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +# Generated by makepkg 4.2.1 +# Sun May 17 20:19:47 UTC 2015 +pkgbase = puppet3 + pkgdesc = Server automation framework and application + pkgver = 3.8.0 + pkgrel = 1 + url = http://puppetlabs.com/puppet/puppet-open-source + install = puppet.install + arch = any + license = APACHE + depends = facter + depends = hiera + optdepends = ruby-shadow: user password management + optdepends = logrotate + provides = puppet + conflicts = puppet + backup = etc/puppet/auth.conf + backup = etc/puppet/fileserver.conf + backup = etc/puppet/puppet.conf + backup = etc/puppet/tagmail.conf + source = puppet-3.8.0.tar.gz::http://github.com/puppetlabs/puppet/archive/3.8.0.tar.gz + md5sums = 8aa3fa694feb4aa27448e1e3e0749de6 + +pkgname = puppet3 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..de041e270a51 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# $Id: PKGBUILD 130872 2015-04-07 09:31:38Z jsteel $ +# Maintainer: Jonathan Steel <jsteel at archlinux.org> +# Contributor: Greg Sutcliffe <puppet-aur (at) emeraldreverie (dot) org> +# Contributor: Hyacinthe Cartiaux <hyacinthe (dot) cartiaux (at) free (dot) fr> +# Contributor: Thomas S Hatch <thatch45 (at) Gmail (dot) com> +# Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com> +# Contributor: Miah Johnson <miah (at) chia-pet dot org> +# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com> +# Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com> + +pkgname=puppet3 +pkgver=3.8.0 +pkgrel=1 +pkgdesc="Server automation framework and application" +arch=('any') +url="http://puppetlabs.com/puppet/puppet-open-source" +license=('APACHE') +depends=('facter' 'hiera') +optdepends=('ruby-shadow: user password management' + 'logrotate') +provides=('puppet') +conflicts=('puppet') +backup=('etc/puppet/auth.conf' 'etc/puppet/fileserver.conf' + 'etc/puppet/puppet.conf' 'etc/puppet/tagmail.conf') +install=puppet.install +source=(puppet-$pkgver.tar.gz::http://github.com/puppetlabs/puppet/archive/$pkgver.tar.gz) +md5sums=('8aa3fa694feb4aa27448e1e3e0749de6') + +prepare() { + cd puppet-$pkgver + + # Ruby 2.2 fixes + sed -i 's/: "syck"$/: (defined?(Psych) \&\& YAML == Psych ? "psych" : "syck")/' \ + lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb + sed -i 485,488d lib/puppet/defaults.rb +} + +package() { + cd puppet-$pkgver + + ruby install.rb --destdir="$pkgdir" --sitelibdir="$( ruby -e \ + 'puts RbConfig::CONFIG["vendorlibdir"]' )" + + install -Dm644 "$srcdir"/puppet-$pkgver/ext/redhat/puppet.conf \ + "$pkgdir"/etc/puppet/puppet.conf + install -Dm644 "$srcdir"/puppet-$pkgver/ext/redhat/logrotate \ + "$pkgdir"/etc/logrotate.d/puppet + install -Dm644 "$srcdir"/puppet-$pkgver/conf/fileserver.conf \ + "$pkgdir"/etc/puppet/fileserver.conf + install -Dm644 "$srcdir"/puppet-$pkgver/conf/tagmail.conf \ + "$pkgdir"/etc/puppet/tagmail.conf + + install -d "$pkgdir"/{var/lib/puppet,usr/lib/tmpfiles.d} + + echo "d /var/run/puppet 0755 puppet puppet -" > \ + "$pkgdir"/usr/lib/tmpfiles.d/puppet.conf + + # systemd + install -Dm644 "$srcdir"/puppet-$pkgver/ext/systemd/puppet.service \ + "$pkgdir"/usr/lib/systemd/system/puppet.service + install -Dm644 "$srcdir"/puppet-$pkgver/ext/systemd/puppetmaster.service \ + "$pkgdir"/usr/lib/systemd/system/puppetmaster.service + + # vim and emacs + install -Dm644 "$srcdir"/puppet-$pkgver/ext/vim/ftdetect/puppet.vim \ + "$pkgdir"/usr/share/vim/vimfiles/ftdetect/puppet.vim + install -Dm644 "$srcdir"/puppet-$pkgver/ext/vim/syntax/puppet.vim \ + "$pkgdir"/usr/share/vim/vimfiles/syntax/puppet.vim + install -Dm644 "$srcdir"/puppet-$pkgver/ext/emacs/puppet-mode.el \ + "$pkgdir"/usr/share/emacs/site-lisp/puppet-mode.el + install -Dm644 "$srcdir"/puppet-$pkgver/ext/emacs/puppet-mode-init.el \ + "$pkgdir"/usr/share/emacs/site-lisp/site-start.d/puppet-mode-init.el + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/puppet/LICENSE +} diff --git a/puppet.install b/puppet.install new file mode 100644 index 000000000000..95b0a3630838 --- /dev/null +++ b/puppet.install @@ -0,0 +1,19 @@ +pre_install() { + getent group puppet &>/dev/null || groupadd -r puppet -g 52 + getent passwd puppet &>/dev/null || useradd -r -u 52 -g puppet \ + -d /var/lib/puppet -s /usr/bin/nologin -c "Puppet" puppet +} + +pre_upgrade() { + pre_install +} + +pre_remove() { + if [[ -f /var/run/puppet/master.pid ]]; then + systemctl stop puppetmaster + fi + + if [[ -f /var/run/puppet/agent.pid ]]; then + systemctl stop puppet + fi +} |