Browse Source

cfengine of teh specific version

master
Von Random 5 years ago
parent
commit
5c5e572ef9
  1. 34
      cfengine/.SRCINFO
  2. 72
      cfengine/PKGBUILD
  3. 13
      cfengine/cf-execd.service
  4. 13
      cfengine/cf-monitord.service
  5. 13
      cfengine/cf-serverd.service
  6. 40
      cfengine/cfengine.install
  7. 13
      cfengine/cfengine3.service

34
cfengine/.SRCINFO

@ -0,0 +1,34 @@
pkgbase = cfengine
pkgdesc = Automated suite of programs for configuring and maintaining Unix-like computers.
pkgver = 3.7.3
pkgrel = 2
url = http://www.cfengine.org
install = cfengine.install
arch = i686
arch = x86_64
license = GPL3
makedepends = which
depends = lmdb
depends = openssl
depends = pcre
depends = libxml2
depends = pam
optdepends = libvirt
optdepends = postgresql-libs
optdepends = libmariadbclient
optdepends = acl
source = cfengine-3.7.3.tar.gz::https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-3.7.3.tar.gz
source = cfengine-masterfiles-3.7.3.tar.gz::https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-3.7.3.tar.gz
source = cf-execd.service
source = cf-monitord.service
source = cf-serverd.service
source = cfengine3.service
md5sums = dcd0a8b9490dfafad124c5135900f08b
md5sums = f7d1260a6fe9f6ce9a00c70c984a7252
md5sums = a6d35b4460d5478afe03c7b920f09da6
md5sums = 674271fe623d27b0410642cabc1d442e
md5sums = 542358aab95c89017ca6dc65b864c079
md5sums = 2f950573baa3dfa7ee06e011ece2f2d8
pkgname = cfengine

72
cfengine/PKGBUILD

@ -0,0 +1,72 @@
# originally by:
# Maintainer: Vanush Misha Paturyan <ektich+cfengine-aur@gmail.com>
# https://github.com/zizzfizzix/pkgbuilds
#
# Contributor: Kuba Serafinowski <zizzfizzix AT gmail DOT com>
# Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
# Contributor: Christian Berendt <christian@thorlin.de>
pkgname=cfengine
pkgver=3.4.1
pkgrel=2
epoch=1
pkgdesc='Automated suite of programs for configuring and maintaining Unix-like computers.'
url='http://www.cfengine.org'
license=('GPL3')
arch=('i686' 'x86_64')
depends=('lmdb' 'openssl' 'pcre' 'libxml2' 'pam')
makedepends=('which')
optdepends=('libvirt' 'postgresql-libs' 'libmariadbclient' 'acl')
install=${pkgname}.install
source=(
"${pkgname}-${pkgver}.tar.gz::https://cfengine-package-repos.s3.amazonaws.com/tarballs/${pkgname}-${pkgver}.tar.gz"
'cf-execd.service'
'cf-monitord.service'
'cf-serverd.service'
'cfengine3.service'
)
md5sums=(
'96e2221ca0e1341f4abacde81df41ac2'
'a6d35b4460d5478afe03c7b920f09da6'
'674271fe623d27b0410642cabc1d442e'
'542358aab95c89017ca6dc65b864c079'
'2f950573baa3dfa7ee06e011ece2f2d8'
)
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--with-workdir=/var/${pkgname} \
--with-openssl \
--with-pcre \
--with-libacl=check \
--with-libxml2 \
--with-libvirt=check \
--with-lmdb \
--with-mysql=check \
--with-postgresql=check
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=$pkgdir install
install -D -m644 ${srcdir}/cf-execd.service \
${pkgdir}/usr/lib/systemd/system/cf-execd.service
install -D -m644 ${srcdir}/cf-serverd.service \
${pkgdir}/usr/lib/systemd/system/cf-serverd.service
install -D -m644 ${srcdir}/cf-monitord.service \
${pkgdir}/usr/lib/systemd/system/cf-monitord.service
install -D -m644 ${srcdir}/cfengine3.service \
${pkgdir}/usr/lib/systemd/system/cfengine3.service
install -d -m755 ${pkgdir}/var/cfengine/bin
for f in $(ls ${pkgdir}/usr/bin); do
/bin/ln -s /usr/bin/$f ${pkgdir}/var/cfengine/bin
done
}

13
cfengine/cf-execd.service

@ -0,0 +1,13 @@
[Unit]
Description=CFEngine Execution Daemon
After=network.target
PartOf=cfengine3.service
[Service]
ExecStart=/var/cfengine/bin/cf-execd
Type=forking
PIDFile=/var/cfengine/cf-execd.pid
[Install]
WantedBy=cfengine3.service
WantedBy=multi-user.target

13
cfengine/cf-monitord.service

@ -0,0 +1,13 @@
[Unit]
Description=CFEngine Monitoring Daemon
PartOf=cfengine3.service
After=network.target
[Service]
ExecStart=/var/cfengine/bin/cf-monitord
Type=forking
PIDFile=/var/cfengine/cf-monitord.pid
[Install]
WantedBy=cfengine3.service
WantedBy=multi-user.target

13
cfengine/cf-serverd.service

@ -0,0 +1,13 @@
[Unit]
Description=CFEngine Server Daemon
PartOf=cfengine3.service
After=network.target
[Service]
ExecStart=/var/cfengine/bin/cf-serverd
Type=forking
PIDFile=/var/cfengine/cf-serverd.pid
[Install]
WantedBy=cfengine3.service
WantedBy=multi-user.target

40
cfengine/cfengine.install

@ -0,0 +1,40 @@
PREFIX=/var/cfengine
post_install() {
# generate a host key
if [ ! -f $PREFIX/ppkeys/localhost.priv ]; then
$PREFIX/bin/cf-key > /dev/null
fi
# copy the stock policy for the new installations and create promies_validated
if ! [ -f $PREFIX/masterfiles/promises.cf ]; then
/bin/cp -R /usr/share/doc/cfengine/CoreBase/masterfiles/* $PREFIX/masterfiles/
$PREFIX/bin/cf-promises -T $PREFIX/masterfiles
fi
# copy modules/packages (part of stock policy)
if ! [ -f $PREFIX/modules/packages ]; then
mkdir -p $PREFIX/modules/packages
fi
if cd /usr/share/doc/cfengine/CoreBase/modules/packages; then
for module in *; do
if ! [ -f $PREFIX/modules/packages/$module ]; then
cp $module $PREFIX/modules/packages
fi
done
fi
#if ! [ -f /var/cfengine/bin/cf-promises ]; then
# cd /var/cfengine/bin
# ln -s /usr/bin/cf-* .
#fi
echo -e "\nBootstrap cfengine with cf-agent --bootstrap <IP address of policy server>\n"
echo -e "\nRun systemctl enable cfengine3 to enable CFEngine 3\n"
}
post_remove() {
if [ -d /var/cfengine/bin ]; then
rm /var/cfengine/bin/*
fi
}

13
cfengine/cfengine3.service

@ -0,0 +1,13 @@
[Unit]
Description=CFEngine 3 daemons
After=network.target
Requires=cf-execd.service cf-monitord.service cf-serverd.service
[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save