diff options
author | aurelien <tek@localhost.localdomain> | 2012-11-22 18:56:54 +0100 |
---|---|---|
committer | aurelien <tek@localhost.localdomain> | 2012-11-22 18:56:54 +0100 |
commit | 8298bee7828000bf1ab55304695872472883ab65 (patch) | |
tree | deb47595e25e8acddff6fce94a403c918e6d909f /pcr | |
parent | f97ff910471fb3ae2c8ea69befecaae8cbf6dbea (diff) |
+ facter puppet ruby-hiera-json ruby-hiera ruby-shadow
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/facter/PKGBUILD | 30 | ||||
-rw-r--r-- | pcr/puppet/PKGBUILD | 86 | ||||
-rw-r--r-- | pcr/puppet/fileserver.conf | 12 | ||||
-rwxr-xr-x | pcr/puppet/puppet | 45 | ||||
-rw-r--r-- | pcr/puppet/puppet.conf | 32 | ||||
-rw-r--r-- | pcr/puppet/puppet.install | 46 | ||||
-rwxr-xr-x | pcr/puppet/puppetmaster | 45 | ||||
-rw-r--r-- | pcr/ruby-hiera-json/PKGBUILD | 26 | ||||
-rw-r--r-- | pcr/ruby-hiera/PKGBUILD | 34 | ||||
-rw-r--r-- | pcr/ruby-hiera/hiera.yaml | 21 | ||||
-rw-r--r-- | pcr/ruby-shadow/PKGBUILD | 24 |
11 files changed, 401 insertions, 0 deletions
diff --git a/pcr/facter/PKGBUILD b/pcr/facter/PKGBUILD new file mode 100644 index 000000000..956569001 --- /dev/null +++ b/pcr/facter/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr> +# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr> +# Contributor: Thomas S Hatch <thatch45 (at) Gmail.com> +# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres + +pkgname=facter +pkgver=1.6.14 +pkgrel=1 +pkgdesc="A library for collecting facts about your system." +arch=("any") +url="http://puppetlabs.com/projects/facter/" +license=("APACHE") +depends=("ruby" "inetutils" "net-tools") +options=(!emptydirs) +source=(http://puppetlabs.com/downloads/facter/facter-$pkgver.tar.gz) +md5sums=('b6c3df8ad1781c10d30785c58a4504ef') + +package() { + cd $srcdir/facter-$pkgver + + ruby ./install.rb \ + --destdir=$pkgdir \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin + + install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}" + install -m 644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + +} diff --git a/pcr/puppet/PKGBUILD b/pcr/puppet/PKGBUILD new file mode 100644 index 000000000..02e8f32c8 --- /dev/null +++ b/pcr/puppet/PKGBUILD @@ -0,0 +1,86 @@ +# Puppet: Installer: Arch +# 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> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +# RC style, reserved for later use +#pkgname=puppet +#_rc=8 +#_pkgver=3.0.0 +#pkgver=${_pkgver}_rc${_rc} + +pkgname=puppet +pkgver=3.0.1 +pkgrel=5 +pkgdesc="A system for automating system administration tasks." +arch=("any") +url="http://puppetlabs.com/projects/puppet/" +license=("APACHE") +depends=("ruby" "ruby-shadow" "facter" "ruby-hiera" "ruby-hiera-json") +makedepends=('which') +backup=("etc/puppet/puppet.conf") +options=(emptydirs) +provides=("puppet" "vim-puppet" "ruby-hiera-puppet") +conflicts=("puppet3" "ruby-puppet" "vim-puppet" "ruby-hiera-puppet") +install="puppet.install" +source=(http://puppetlabs.com/downloads/puppet/puppet-${pkgver//_/-}.tar.gz + fileserver.conf + puppet + puppet.conf + puppetmaster) +md5sums=('2117e3a1964ac54fcd36d926eed3db94' + 'ffacd9bfb9c7656a3a345dbc5eb0e67a' + '59dbf39e251bc4877e7604a5876c642d' + 'a7d61d20e46b411eb50ad5279987584a' + '4c507c580cb28d7a5adc9ea6b3626657') + +package() { + cd $srcdir/puppet-${pkgver//_/-} + + # Install + ruby ./install.rb \ + --destdir=$pkgdir \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --mandir=/usr/share/man + + + # 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 + install -Dp -m0644 ext/emacs/puppet-mode.el $pkgdir/usr/share/emacs/site-lisp/puppet-mode.el + install -Dp -m0644 ext/emacs/puppet-mode-init.el $pkgdir/usr/share/emacs/site-lisp/site-start.d/puppet-mode-init.el + + # 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. + ln -snf /etc/hiera.yaml ${pkgdir}/etc/puppet/hiera.yaml + + # Systemd files + 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 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 + + # 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" + +} diff --git a/pcr/puppet/fileserver.conf b/pcr/puppet/fileserver.conf new file mode 100644 index 000000000..67e387ca0 --- /dev/null +++ b/pcr/puppet/fileserver.conf @@ -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 diff --git a/pcr/puppet/puppet b/pcr/puppet/puppet new file mode 100755 index 000000000..4126be850 --- /dev/null +++ b/pcr/puppet/puppet @@ -0,0 +1,45 @@ +#!/bin/bash +DAEMON=$(type -p puppetd) + +. /etc/rc.conf +. /etc/rc.d/functions +[ -f /etc/conf.d/puppet ] && . /etc/conf.d/puppet + +PID=$(pidof -xo %PPID $DAEMON) +case "$1" in + start) + stat_busy "Starting Puppet Daemon" + if [ -z "$PID" ]; then + [ -f /var/run/puppet.pid ] && rm -f /var/run/puppet.pid + $DAEMON $PUPPETD_ARGS + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + PID=$(pidof -xo %PPID $DAEMON) + echo $PID > /var/run/puppet.pid + add_daemon puppet + stat_done + fi + ;; + stop) + stat_busy "Stopping Puppet Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon puppet + rm -f /var/run/puppet.pid + stat_done + fi + ;; + restart) + $0 stop + if [ ! -z $PID ]; then + while ps -p $PID > /dev/null; do sleep 1; done + fi + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/pcr/puppet/puppet.conf b/pcr/puppet/puppet.conf new file mode 100644 index 000000000..aa5868dee --- /dev/null +++ b/pcr/puppet/puppet.conf @@ -0,0 +1,32 @@ +[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 + + # Where Puppet PID files are kept. + # The default value is '$vardir/run'. + rundir = /var/run/puppet + + # Where SSL certificates are kept. + # The default value is '$confdir/ssl'. + pluginsync=true + + +[agent] + # The file in which puppetd stores a list of the classes + # associated with the retrieved configuratiion. Can be loaded in + # the separate ``puppet`` executable using the ``--loadclasses`` + # option. + # The default value is '$confdir/classes.txt'. + classfile = $vardir/classes.txt + + # Where puppetd caches the local configuration. An + # extension indicating the cache format is added automatically. + # The default value is '$confdir/localconfig'. + localconfig = $vardir/localconfig + +#[master] diff --git a/pcr/puppet/puppet.install b/pcr/puppet/puppet.install new file mode 100644 index 000000000..928df566b --- /dev/null +++ b/pcr/puppet/puppet.install @@ -0,0 +1,46 @@ +# Puppet: Installer: Arch +# Maintainer: 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> + +pre_install() { + getent group puppet &>/dev/null || groupadd -r puppet -g 52 &>/dev/null + getent passwd puppet &>/dev/null || useradd -r -u 52 -g puppet -d /var/lib/puppet -s /sbin/nologin -c "Puppet" puppet &>/dev/null || : +} + +pre_upgrade() { + pre_install + usermod -d /var/lib/puppet puppet &>/dev/null || : +} + +post_install() { + : +} + +pre_remove() { +if [ -f /var/run/puppetmasterd.pid ]; then + PIDOF=$(pidof -xo %PPID puppetmasterd) + PIDFILE=$(cat /var/run/puppetmasterd.pid) + if [ $PIDOF -eq $PIDFILE ]; then + /etc/rc.d/puppetmaster stop + fi +fi + +if [ -f /var/run/puppetd.pid ]; then + PIDOF=$(pidof -xo %PPID puppetd) + PIDFILE=$(cat /var/run/puppetd.pid) + if [ $PIDOF -eq $PIDFILE ]; then + /etc/rc.d/puppet stop + fi +fi +} + +post_remove() { + # Remove user and group + userdel puppet +} + +op=$1 +shift + +$op "$@" diff --git a/pcr/puppet/puppetmaster b/pcr/puppet/puppetmaster new file mode 100755 index 000000000..8b3971053 --- /dev/null +++ b/pcr/puppet/puppetmaster @@ -0,0 +1,45 @@ +#!/bin/bash +DAEMON=$(type -p puppetmasterd) + +. /etc/rc.conf +. /etc/rc.d/functions +[ -f /etc/conf.d/puppetmaster ] && . /etc/conf.d/puppetmaster + +PID=$(pidof -xo %PPID $DAEMON) +case "$1" in + start) + stat_busy "Starting Puppet Master Daemon" + if [ -z "$PID" ]; then + [ -f /var/run/puppetmaster.pid ] && rm -f /var/run/puppetmaster.pid + $DAEMON $PUPPETMASTER_ARGS + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + PID=$(pidof -xo %PPID $DAEMON) + echo $PID > /var/run/puppetmaster.pid + add_daemon puppetmaster + stat_done + fi + ;; + stop) + stat_busy "Stopping Puppet Master Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon puppetmaster + rm -f /var/run/puppetmaster.pid + stat_done + fi + ;; + restart) + $0 stop + if [ ! -z $PID ]; then + while ps -p $PID > /dev/null; do sleep 1; done + fi + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/pcr/ruby-hiera-json/PKGBUILD b/pcr/ruby-hiera-json/PKGBUILD new file mode 100644 index 000000000..4d80244c8 --- /dev/null +++ b/pcr/ruby-hiera-json/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Jochen Schalanda <jochen+aur@schalanda.name> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO> + +_gemname=hiera-json +pkgname=ruby-$_gemname +pkgver=0.4.0 +pkgrel=1 +pkgdesc='Store Hiera data in JSON' +arch=(any) +url='http://projects.puppetlabs.com/projects/hiera/' +license=('MIT') +depends=('ruby') +makedepends=('rubygems' 'ruby-hiera') +source=(http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem) +noextract=($_gemname-$pkgver.gem) + +package() { + cd "$srcdir" + # _gemdir is defined inside package() because if ruby[gems] is not installed on + # the system, makepkg will exit with an error when sourcing the PKGBUILD. + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + + gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \ + -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem" +} + diff --git a/pcr/ruby-hiera/PKGBUILD b/pcr/ruby-hiera/PKGBUILD new file mode 100644 index 000000000..c4d51fe44 --- /dev/null +++ b/pcr/ruby-hiera/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Jochen Schalanda <jochen+aur@schalanda.name> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +_gemname=hiera +pkgname=ruby-$_gemname +pkgver=1.1.1 +pkgrel=1 +pkgdesc="A pluggable data store for hierarcical data." +arch=(any) +url='http://projects.puppetlabs.com/projects/hiera/' +license=('MIT') +depends=('ruby') +makedepends=('rubygems') +source=( + "http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem" + 'hiera.yaml') +noextract=($_gemname-$pkgver.gem) + +package() { + cd "$srcdir" + # _gemdir is defined inside package() because if ruby[gems] is not installed on + # the system, makepkg will exit with an error when sourcing the PKGBUILD. + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + + gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \ + -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem" + + # Create hiera default directory + install -d $pkgdir/var/lib/hiera + + # Create hiera default configuration + install -d $pkgdir/etc + install -m 644 $srcdir/hiera.yaml $pkgdir/etc/ +} diff --git a/pcr/ruby-hiera/hiera.yaml b/pcr/ruby-hiera/hiera.yaml new file mode 100644 index 000000000..cd0be3fec --- /dev/null +++ b/pcr/ruby-hiera/hiera.yaml @@ -0,0 +1,21 @@ +--- +:backend: + - yaml + - json +: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: diff --git a/pcr/ruby-shadow/PKGBUILD b/pcr/ruby-shadow/PKGBUILD new file mode 100644 index 000000000..5b7ee1972 --- /dev/null +++ b/pcr/ruby-shadow/PKGBUILD @@ -0,0 +1,24 @@ +# Contributor: Thomas S Hatch <thatch45@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=ruby-shadow +pkgver=2.1.4 +pkgrel=5 +pkgdesc="Interface for shadow passwords for Ruby" +arch=(i686 x86_64 arm) +depends=('ruby') +license=('publicdomain') +url=('https://github.com/apalmblad/ruby-shadow.git') +source=("https://github.com/apalmblad/ruby-shadow/archive/$pkgver.tar.gz") + + +build() { + cd $srcdir/$pkgname-$pkgver + ruby extconf.rb + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install +} |