summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVanush Misha Paturyan2014-03-12 17:44:34 +0000
committerVanush Misha Paturyan2014-04-07 09:42:33 +0100
commitae17cdac22c5c38152d7f88995735fb327c012c7 (patch)
tree09138a77f77c26c160d1e4698966c8b8a81f5d30
parent1052302d0727a047ef9fbd68a20905be25bf92a9 (diff)
downloadaur-ae17cdac22c5c38152d7f88995735fb327c012c7.tar.gz
cfengine: using /var/cfengine instead of /var/lib/cfengine
creating symlins in /var/cfengine/bin auto-detecting optional dependencies during build adding 'acl' to list of optional dependencies
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD19
-rw-r--r--cf-execd.service4
-rw-r--r--cf-monitord.service4
-rw-r--r--cf-serverd.service4
-rw-r--r--cfengine.install19
6 files changed, 35 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bef5e490b5c..19966b9f203 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,14 +16,15 @@ pkgbase = cfengine
optdepends = libvirt
optdepends = postgresql-libs
optdepends = libmariadbclient
+ optdepends = acl
source = cfengine-3.5.3.tar.gz::http://cfengine.com/source-code/download?file=cfengine-3.5.3.tar.gz
source = cf-execd.service
source = cf-monitord.service
source = cf-serverd.service
md5sums = c840eb0163924ca657ab180fe5a170b4
- md5sums = bf64e1dedbcef5a74e3b585076135c87
- md5sums = c56bde562ec29c1533433a320f4f4b5d
- md5sums = 2a3aed38b03b14335a70103e45d42ee8
+ md5sums = dba17dc5133b8fa86de11577120d46c5
+ md5sums = a2f9db31408f288cb934397ffb474db3
+ md5sums = ff28f7de9b81b4673082a2640a318896
pkgname = cfengine
diff --git a/PKGBUILD b/PKGBUILD
index cc68d093ab2..36b09b0d80e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,32 +13,32 @@ license=('GPL3')
arch=('i686' 'x86_64')
depends=('qdbm' 'openssl' 'pcre' 'libxml2')
makedepends=('which')
-optdepends=('tokyocabinet' 'libvirt' 'postgresql-libs' 'libmariadbclient')
+optdepends=('tokyocabinet' 'libvirt' 'postgresql-libs' 'libmariadbclient' 'acl')
install=${pkgname}.install
source=("${pkgname}-${pkgver}.tar.gz::http://cfengine.com/source-code/download?file=${pkgname}-${pkgver}.tar.gz"
'cf-execd.service'
'cf-monitord.service'
'cf-serverd.service')
md5sums=('c840eb0163924ca657ab180fe5a170b4'
- 'bf64e1dedbcef5a74e3b585076135c87'
- 'c56bde562ec29c1533433a320f4f4b5d'
- '2a3aed38b03b14335a70103e45d42ee8')
+ 'dba17dc5133b8fa86de11577120d46c5'
+ 'a2f9db31408f288cb934397ffb474db3'
+ 'ff28f7de9b81b4673082a2640a318896')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure \
--prefix=/usr \
- --with-workdir=/var/lib/${pkgname} \
+ --with-workdir=/var/${pkgname} \
--with-openssl \
--with-pcre \
--with-libacl=check \
--with-libxml2 \
- --without-libvirt \
+ --with-libvirt=check \
--with-qdbm \
- --without-mysql \
- --without-tokyocabinet \
- --without-postgresql
+ --with-mysql=check \
+ --with-tokyocabinet=check \
+ --with-postgresql=check
make
}
@@ -57,4 +57,3 @@ package() {
}
# vim:set ts=2 sw=2 et:
-
diff --git a/cf-execd.service b/cf-execd.service
index 12d0fb9750d..b56fb41a7d2 100644
--- a/cf-execd.service
+++ b/cf-execd.service
@@ -3,9 +3,9 @@ Description=CFEngine Execution Daemon
After=syslog.target
[Service]
-ExecStart=/usr/bin/cf-execd
+ExecStart=/var/cfengine/bin/cf-execd
Type=forking
-PIDFile=/srv/cfengine/cf-execd.pid
+PIDFile=/var/cfengine/cf-execd.pid
[Install]
WantedBy=multi-user.target
diff --git a/cf-monitord.service b/cf-monitord.service
index 584c26e25f5..b76135df2ae 100644
--- a/cf-monitord.service
+++ b/cf-monitord.service
@@ -3,9 +3,9 @@ Description=CFEngine Monitoring Daemon
After=syslog.target
[Service]
-ExecStart=/usr/bin/cf-monitord
+ExecStart=/var/cfengine/bin/cf-monitord
Type=forking
-PIDFile=/srv/cfengine/cf-monitord.pid
+PIDFile=/var/cfengine/cf-monitord.pid
[Install]
WantedBy=multi-user.target
diff --git a/cf-serverd.service b/cf-serverd.service
index 14f6014235b..3ad8ebee44d 100644
--- a/cf-serverd.service
+++ b/cf-serverd.service
@@ -3,9 +3,9 @@ Description=CFEngine Server Daemon
After=syslog.target
[Service]
-ExecStart=/usr/bin/cf-serverd
+ExecStart=/var/cfengine/bin/cf-serverd
Type=forking
-PIDFile=/srv/cfengine/cf-serverd.pid
+PIDFile=/var/cfengine/cf-serverd.pid
[Install]
WantedBy=multi-user.target
diff --git a/cfengine.install b/cfengine.install
index f8eba1f0d57..fad7bbaca45 100644
--- a/cfengine.install
+++ b/cfengine.install
@@ -1,11 +1,24 @@
post_install() {
- if [ ! -f /var/lib/cfengine/ppkeys/localhost.priv ]; then
+ if [ ! -f /var/cfengine/ppkeys/localhost.priv ]; then
cf-key > /dev/null
fi
- if ! [ -f /var/lib/cfengine/masterfiles/promises.cf ]; then
- cp -R /usr/share/CoreBase/* /var/lib/cfengine/masterfiles/
+ if ! [ -f /var/cfengine/masterfiles/promises.cf ]; then
+ cp -R /usr/share/CoreBase/* /var/cfengine/masterfiles/
fi
+
+ if ! [ -f /var/cfengine/bin/cf-promises ]; then
+ cd /var/cfengine/bin
+ ln -s /usr/bin/cf-* .
+ fi
+
+ echo "Bootstrap cfengine with cf-agent --bootstrap <IP address of policy server>"
}
+post_remove() {
+
+ if [ -d /var/cfengine/bin ]; then
+ rm /var/cfengine/bin/*
+ fi
+}