summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVanush "Misha" Paturyan2016-09-08 19:57:26 +0100
committerVanush "Misha" Paturyan2016-09-08 20:03:37 +0100
commite7ca2c609274e0c1c2b7da2636ba2e78dfe90095 (patch)
tree676b891b35c15aa2862cd860f477a1e57c1941aa
parent6e65e83f1294b3870ff9cab97a33b5fd38878a39 (diff)
downloadaur-e7ca2c609274e0c1c2b7da2636ba2e78dfe90095.tar.gz
3.7.4 and better systemd integration
Version bump to 3.7.4 and a better way to integrate cfengine with systemd. Individual services can be enabled/disabled and will be started or ignored when cfengine.service is started.
-rw-r--r--PKGBUILD20
-rw-r--r--cf-execd.service20
-rw-r--r--cf-monitord.service22
-rw-r--r--cf-serverd.service17
-rw-r--r--cfengine3.service3
5 files changed, 60 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b416d7ace542..d793167cad18 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Vanush Misha Paturyan <ektich+cfengine-aur@gmail.com>
-# https://github.com/zizzfizzix/pkgbuilds
+# https://aur.archlinux.org/cfengine.git
#
# 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.7.3
-pkgrel=2
+pkgver=3.7.4
+pkgrel=1
pkgdesc='Automated suite of programs for configuring and maintaining Unix-like computers.'
url='http://www.cfengine.org'
license=('GPL3')
@@ -16,18 +16,20 @@ depends=('lmdb' 'openssl' 'pcre' 'libxml2' 'pam')
makedepends=('which')
optdepends=('libvirt' 'postgresql-libs' 'libmariadbclient' 'acl')
install=${pkgname}.install
+#https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-3.7.4.tar.gz
source=("${pkgname}-${pkgver}.tar.gz::https://cfengine-package-repos.s3.amazonaws.com/tarballs/${pkgname}-${pkgver}.tar.gz"
"cfengine-masterfiles-${pkgver}.tar.gz::https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-${pkgver}.tar.gz"
'cf-execd.service'
'cf-monitord.service'
'cf-serverd.service'
'cfengine3.service')
-md5sums=('dcd0a8b9490dfafad124c5135900f08b'
- 'f7d1260a6fe9f6ce9a00c70c984a7252'
- 'a6d35b4460d5478afe03c7b920f09da6'
- '674271fe623d27b0410642cabc1d442e'
- '542358aab95c89017ca6dc65b864c079'
- '2f950573baa3dfa7ee06e011ece2f2d8')
+
+md5sums=('7322acc96a693bda2726030365c90bcc'
+ 'c52543997cc3921213c56f4579d68fdc'
+ '6edac71eaac0a19fc5b8129f17d82bb2'
+ '199a7867b60a3e4013da4ac42343e22e'
+ 'f8783637895f6f3dd19a6ba689181d41'
+ '4b89518da032b45073e46a993fd7fe26')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
diff --git a/cf-execd.service b/cf-execd.service
index 6e384c045c64..9c05e8153604 100644
--- a/cf-execd.service
+++ b/cf-execd.service
@@ -1,13 +1,27 @@
[Unit]
Description=CFEngine Execution Daemon
+Documentation=man:cf-execd https://docs.cfengine.com/latest/reference-components-cf-execd.html
+
After=network.target
+
+# The following ensures that the service is activated only if we have a
+# promises.cf in place. If there is no promises.cf, there is no configuration
+# for the service either...
+ConditionPathExists=/var/cfengine/inputs/promises.cf
+
+# The following allows stopping/restarting of this service when
+# cfengine3.serice is stopped/restarted
PartOf=cfengine3.service
+[Install]
+# The following ensures that the symlink to this unit is created in the
+# cfengine3.service.requires/ directory when this unit is enabled
+# with "systemctl enable" command, and removed with "systemctl disable"
+RequiredBy=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
+
diff --git a/cf-monitord.service b/cf-monitord.service
index cd8fc2f92d4b..53d11368341b 100644
--- a/cf-monitord.service
+++ b/cf-monitord.service
@@ -1,13 +1,25 @@
[Unit]
Description=CFEngine Monitoring Daemon
-PartOf=cfengine3.service
+Documentation=man:cf-monitord https://docs.cfengine.com/latest/reference-components-cf-monitord.html
+
After=network.target
+# The following ensures that the service is activated only if we have a
+# promises.cf in place.
+ConditionPathExists=/var/cfengine/inputs/promises.cf
+
+# The following allows stopping/restarting of this service when
+# cfengine3.serice is stopped/restarted
+PartOf=cfengine3.service
+
+[Install]
+# The following ensures that the symlink to this unit is created in the
+# cfengine3.service.requires/ directory when this unit is enabled
+# with "systemctl enable" command, and removed with "systemctl disable"
+RequiredBy=cfengine3.service
+
+
[Service]
ExecStart=/var/cfengine/bin/cf-monitord
Type=forking
PIDFile=/var/cfengine/cf-monitord.pid
-
-[Install]
-WantedBy=cfengine3.service
-WantedBy=multi-user.target
diff --git a/cf-serverd.service b/cf-serverd.service
index 2b01f3b8e31d..3aba3f6dc66d 100644
--- a/cf-serverd.service
+++ b/cf-serverd.service
@@ -1,13 +1,22 @@
[Unit]
Description=CFEngine Server Daemon
-PartOf=cfengine3.service
+Documentation=man:cf-serverd https://docs.cfengine.com/latest/reference-components-cf-serverd.html
+
After=network.target
+# The following ensures that the service is activated only if we have a
+# promises.cf in place.
+PartOf=cfengine3.service
+
+[Install]
+# The following ensures that the symlink to this unit is created in the
+# cfengine3.service.requires/ directory when this unit is enabled
+# with "systemctl enable" command, and removed with "systemctl disable"
+RequiredBy=cfengine3.service
+
[Service]
ExecStart=/var/cfengine/bin/cf-serverd
Type=forking
PIDFile=/var/cfengine/cf-serverd.pid
-[Install]
-WantedBy=cfengine3.service
-WantedBy=multi-user.target
+
diff --git a/cfengine3.service b/cfengine3.service
index 92a2b7fc354f..47c39c647087 100644
--- a/cfengine3.service
+++ b/cfengine3.service
@@ -1,7 +1,8 @@
[Unit]
Description=CFEngine 3 daemons
+Documentation=https://docs.cfengine.com/lts
+
After=network.target
-Requires=cf-execd.service cf-monitord.service cf-serverd.service
[Service]
Type=oneshot