summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose17112016-01-28 18:06:51 +0100
committerjose17112016-01-28 18:06:51 +0100
commite2e89e343e7656984736210661dbcd429ad04e0c (patch)
tree05628330d584457ca5af7cf87ff651c6a1591dd6
downloadaur-puppet-git.tar.gz
adopted from aur3
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD71
-rw-r--r--puppet.install23
3 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3fbf00f8a96
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+# Generated by mksrcinfo v8
+# Thu Jan 28 17:06:30 UTC 2016
+pkgbase = puppet-git
+ pkgdesc = Server automation framework and application
+ pkgver = 4.3.2.r210.g6bb616d
+ pkgrel = 1
+ url = http://puppetlabs.com/puppet/puppet-open-source
+ install = puppet.install
+ arch = any
+ license = APACHE
+ depends = facter
+ depends = hiera
+ depends = logrotate
+ depends = ruby-shadow
+ 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 = git://github.com/puppetlabs/puppet.git
+ md5sums = SKIP
+
+pkgname = puppet-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ac4aedf80f3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Jose Riha <jose1711 gmail com>
+# Contributor: Jonathan Steel <jsteel at aur.archlinux.org>
+# Contributor: Luca Cesari <mirshann (at) bewq (dot) org>
+# 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>
+
+_pkgname=puppet
+pkgname=puppet-git
+pkgver=4.3.2.r210.g6bb616d
+pkgrel=1
+pkgdesc="Server automation framework and application"
+arch=('any')
+url="http://puppetlabs.com/puppet/puppet-open-source"
+license=('APACHE')
+depends=('facter' 'hiera' 'logrotate' 'ruby-shadow')
+provides=('puppet')
+conflicts=('puppet')
+backup=('etc/puppet/auth.conf' 'etc/puppet/fileserver.conf'
+ 'etc/puppet/puppet.conf' 'etc/puppet/tagmail.conf')
+install=$_pkgname.install
+source=(git://github.com/puppetlabs/puppet.git)
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir"/$_pkgname
+
+ git describe | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd $_pkgname
+
+ # FS#45044: fix file location
+ sed -i 's_/opt/puppetlabs/puppet_/usr_' ext/systemd/puppet.service
+}
+
+package() {
+ cd $_pkgname
+
+ ruby install.rb --destdir="$pkgdir" --sitelibdir="$( ruby -e \
+ 'puts RbConfig::CONFIG["vendorlibdir"]' )"
+
+ install -d "$pkgdir"/{var/lib/$_pkgname,usr/lib/tmpfiles.d}
+
+ echo "d /run/puppetlabs 0755 $_pkgname $_pkgname -" > \
+ "$pkgdir"/usr/lib/tmpfiles.d/$_pkgname.conf
+
+ # systemd
+ install -Dm644 "$srcdir"/$_pkgname/ext/systemd/$_pkgname.service \
+ "$pkgdir"/usr/lib/systemd/system/$_pkgname.service
+
+ # vim and emacs
+ install -Dm644 "$srcdir"/$_pkgname/ext/vim/ftdetect/$_pkgname.vim \
+ "$pkgdir"/usr/share/vim/vimfiles/ftdetect/$_pkgname.vim
+ install -Dm644 "$srcdir"/$_pkgname/ext/vim/syntax/$_pkgname.vim \
+ "$pkgdir"/usr/share/vim/vimfiles/syntax/$_pkgname.vim
+ install -Dm644 "$srcdir"/$_pkgname/ext/emacs/$_pkgname-mode.el \
+ "$pkgdir"/usr/share/emacs/site-lisp/$_pkgname-mode.el
+ install -Dm644 "$srcdir"/$_pkgname/ext/emacs/$_pkgname-mode-init.el \
+ "$pkgdir"/usr/share/emacs/site-lisp/site-start.d/$_pkgname-mode-init.el
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
+
+ # Match permissions that puppet sets when running
+ chmod 775 "$pkgdir"/var/lib/puppet
+ chmod 750 "$pkgdir"/var/log/puppetlabs/puppet
+
+ rm -r "$pkgdir"/var/run
+}
diff --git a/puppet.install b/puppet.install
new file mode 100644
index 00000000000..2c0b78ae38b
--- /dev/null
+++ b/puppet.install
@@ -0,0 +1,23 @@
+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 /sbin/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
+}
+
+post_remove() {
+ userdel puppet
+}