Permalink
Browse files

Merge puppet3 PKGBUILD into puppet

  • Loading branch information...
GregSutcliffe committed Nov 8, 2012
1 parent 33840ab commit 91529aa7b2d196bd24657cd746c5c563938d62c7
Showing with 94 additions and 41 deletions.
  1. +52 −19 puppet/PKGBUILD
  2. +12 −0 puppet/fileserver.conf
  3. +26 −0 puppet/hiera.yaml
  4. +4 −2 puppet/puppet.conf
  5. +0 −10 puppet/puppet.service
  6. +0 −10 puppet/puppetmaster.service
View
@@ -5,33 +5,49 @@
# 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>
+
+# RC style, reserved for later use
+#pkgname=puppet
+#_rc=8
+#_pkgver=3.0.0
+#pkgver=${_pkgver}_rc${_rc}
pkgname=puppet
-pkgver=2.7.19
-pkgrel=2
+pkgver=3.0.1
+pkgrel=1
+_hieraver=1.1.1
pkgdesc="A system for automating system administration tasks."
arch=("any")
url="http://puppetlabs.com/projects/puppet/"
license=("APACHE")
depends=("ruby" "ruby-shadow" "facter")
backup=("etc/puppet/puppet.conf")
options=(emptydirs)
+provides=("puppet")
+conflicts=("puppet")
install="puppet.install"
-source=("http://puppetlabs.com/downloads/puppet/puppet-$pkgver.tar.gz"
- "puppet"
- "puppetmaster"
- "puppetmaster.service"
- "puppet.conf"
- "puppet.service")
-md5sums=('ba76fa7831df53db7424a8d523465ef5'
+source=(http://puppetlabs.com/downloads/puppet/puppet-${pkgver//_/-}.tar.gz
+ http://downloads.puppetlabs.com/hiera/hiera-puppet-1.0.0rc3.tar.gz
+ http://downloads.puppetlabs.com/hiera/hiera-${_hieraver}.tar.gz
+ http://downloads.puppetlabs.com/hiera/hiera-json-0.4.0.tgz
+ fileserver.conf
+ puppet
+ puppet.conf
+ puppetmaster
+ hiera.yaml)
+md5sums=('2117e3a1964ac54fcd36d926eed3db94'
+ '6829fb5735e179b90b0491971d9b46a8'
+ '20f485d09d5ab39e6d4e4f27e0dd97af'
+ '389be2d95502d41d26da330207a33db3'
+ 'ffacd9bfb9c7656a3a345dbc5eb0e67a'
'59dbf39e251bc4877e7604a5876c642d'
+ 'a7d61d20e46b411eb50ad5279987584a'
'4c507c580cb28d7a5adc9ea6b3626657'
- '7af26262ce01900a560ab02e7a38a91c'
- 'a6c0ce2eb12d62fdd3421aa9dff3477d'
- 'e9c544886335d0dd9b0f6f669cee83eb')
+ 'c2f380cdcffab3956fe9f6e261d6ea32')
package() {
- cd $srcdir/puppet-$pkgver
+ cd $srcdir/puppet-${pkgver//_/-}
# Install
ruby ./install.rb \
@@ -40,6 +56,16 @@ package() {
--sbindir=/usr/sbin \
--mandir=/usr/share/man
+ # Hiera is essential for Puppet3
+ install -d $pkgdir/usr/lib/ruby/site_ruby/1.9.1/lib/
+ cp -r $srcdir/hiera-${_hieraver}/lib/* $pkgdir/usr/lib/ruby/site_ruby/1.9.1/
+ cp -r $srcdir/hiera-json-0.4.0/lib/* $pkgdir/usr/lib/ruby/site_ruby/1.9.1/
+ cp -r $srcdir/hiera-json-0.4.0/spec* $pkgdir/usr/lib/ruby/site_ruby/1.9.1/hiera/backend/
+ cp -r $srcdir/hiera-puppet-1.0.0rc3/lib/* $pkgdir/usr/lib/ruby/site_ruby/1.9.1/
+ install -d $pkgdir/usr/bin/
+ install -Dp -m0755 $srcdir/hiera-${_hieraver}/bin/* $pkgdir/usr/bin/
+ install -Dp -m0755 $srcdir/hiera-puppet-1.0.0rc3/bin/* $pkgdir/usr/bin/
+
# Set up vim and emacs
install -Dp -m0644 ext/vim/ftdetect/puppet.vim $pkgdir/usr/share/vim/vimfiles/ftdetect/puppet.vim
install -Dp -m0644 ext/vim/syntax/puppet.vim $pkgdir/usr/share/vim/vimfiles/syntax/puppet.vim
@@ -49,20 +75,27 @@ package() {
# Configuration and rc scripts
install -d $pkgdir/etc/{puppet,rc.d}
install -m 644 $srcdir/puppet.conf $pkgdir/etc/puppet/puppet.conf
+ install -m 644 $srcdir/fileserver.conf $pkgdir/etc/puppet/fileserver.conf
+
+ # Setup tmpfiles.d config
+ install -d $pkgdir/etc/tmpfiles.d
+ echo "D /var/run/puppet 0755 puppet puppet -" > $pkgdir/etc/tmpfiles.d/puppet.conf
+
+ # Configuration for hiera / symlink is there to use hiera within puppet.
+ install -m 644 $srcdir/hiera.yaml $pkgdir/etc/
+ ln -snf /etc/hiera.yaml ${pkgdir}/etc/puppet/hiera.yaml
# Systemd files
- install -Dm 644 $srcdir/puppet.service $pkgdir/usr/lib/systemd/system/puppet.service
- install -Dm 644 $srcdir/puppetmaster.service $pkgdir/usr/lib/systemd/system/puppetmaster.service
+ install -Dm 644 $srcdir/puppet-${pkgver//_/-}/ext/systemd/puppetagent.service $pkgdir/usr/lib/systemd/system/puppetagent.service
+ install -Dm 644 $srcdir/puppet-${pkgver//_/-}/ext/systemd/puppetmaster.service $pkgdir/usr/lib/systemd/system/puppetmaster.service
- # Create puppet homedir
+ # Create puppet homedir and hieradir
install -d $pkgdir/var/lib/puppet
+ install -d $pkgdir/var/lib/hiera
install -D $srcdir/puppet $pkgdir/etc/rc.d/puppet
install -D $srcdir/puppetmaster $pkgdir/etc/rc.d/puppetmaster
- # Move pi to prevent file conflict
- mv $pkgdir/usr/bin/pi $pkgdir/usr/bin/puppet-pi
-
# Copy the LICENSE file in the usual directory
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
install -m 644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
View
@@ -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
View
@@ -0,0 +1,26 @@
+---
+:backend:
+ - yaml
+ - json
+ - puppet
+
+:hierarchy:
+ - defaults
+ - global
+
+:yaml:
+# datadir is empty here, so hiera uses its defaults:
+# - /var/lib/hiera on *nix
+# - %CommonAppData%\PuppetLabs\hiera\var on Windows
+# When specifying a datadir, make sure the directory exists.
+ :datadir:
+
+:json:
+# datadir is empty here, so hiera uses its defaults:
+# - /var/lib/hiera on *nix
+# - %CommonAppData%\PuppetLabs\hiera\var on Windows
+# When specifying a datadir, make sure the directory exists.
+ :datadir:
+
+:puppet:
+ :datasource: data
View
@@ -1,4 +1,8 @@
[main]
+ # The Puppet var directory
+ # The default value is '/var/lib/puppet'
+ vardir = /var/lib/puppet
+
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
@@ -9,8 +13,6 @@
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
- ssldir = $vardir/ssl
- factpath=$vardir/lib/facter
pluginsync=true
View
@@ -1,10 +0,0 @@
-[Unit]
-Description=Puppet agent
-Wants=basic.target
-After=basic.target
-
-[Service]
-Type=forking
-PIDFile=/run/puppet/agent.pid
-ExecStartPre=/usr/bin/install -d -o puppet -m 755 /run/puppet
-ExecStart=/usr/bin/puppet agent
@@ -1,10 +0,0 @@
-[Unit]
-Description=Puppet master
-Wants=basic.target
-After=basic.target
-
-[Service]
-Type=forking
-PIDFile=/run/puppet/master.pid
-ExecStartPre=/usr/bin/install -d -o puppet -m 755 /run/puppet
-ExecStart=/usr/bin/puppet master

0 comments on commit 91529aa

Please sign in to comment.