summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2016-07-18 09:06:06 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2016-07-29 11:00:56 +0200
commit06e58b6f54b60585d1d6eb27b62c2627bce5f2fe (patch)
tree773afaaf14f055428677b9371b0dd4467be530f3 /meta-oe
parent898b3977afec283c456c970a48d654c74f128d61 (diff)
downloadmeta-openembedded-06e58b6f54b60585d1d6eb27b62c2627bce5f2fe.tar.gz
cfengine: add recipe and base policy
Add recipes of cfengine and cfengine-masterfiles which provides base policy files. There are 3 optional database backend: qdbm, tokyocabinet and lmdb with descending priority. Package tokyocabinet is released as a rework of qdbm by same upstream author, so it is choosen to be default database backend. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452657 Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch28
-rw-r--r--meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb37
-rw-r--r--meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch28
-rw-r--r--meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch23
-rw-r--r--meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb71
5 files changed, 187 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch b/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch
new file mode 100644
index 000000000..3f8debc28
--- /dev/null
+++ b/meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Inappropriate [configuration]
2
3Directory /usr/local is not used for us. Remove the policy that not to install
4binaries to /usr/local/sbin.
5
6Signed-off-by: Kai Kang <kai.kang@windriver.com>
7---
8diff --git a/cfe_internal/update/update_bins.cf b/cfe_internal/update/update_bins.cf
9index 1796caa..697af0d 100644
10--- a/cfe_internal/update/update_bins.cf
11+++ b/cfe_internal/update/update_bins.cf
12@@ -55,16 +55,6 @@ bundle agent cfe_internal_bins
13 depth_search => u_recurse_basedir("inf"),
14 action => u_immediate;
15
16- "/usr/local/sbin/$(agents)"
17- comment => "Create symlinks of CFE binaries in /usr/local/sbin",
18- handle => canonify("cfe_internal_bins_files_sbin_$(agents)"),
19- move_obstructions => "true",
20- link_from => u_ln_s("$(sys.workdir)/bin/$(agents)");
21-
22- "/usr/local/sbin/$(agents).cfsaved"
23- comment => "Remove all .cfsaved file extension",
24- handle => canonify("cfe_internal_bins_files_remove_$(agent)_cfsaved"),
25- delete => u_tidy;
26 }
27
28 bundle agent cfe_internal_update_bins
diff --git a/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb b/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb
new file mode 100644
index 000000000..9d01c5128
--- /dev/null
+++ b/meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb
@@ -0,0 +1,37 @@
1#
2# Copyright (C) 2014 - 2016 Wind River Systems, Inc.
3#
4SUMMARY = "Base policy for CFEngine"
5
6DESCRIPTION = "CFEngine is an IT infrastructure automation framework \
7that helps engineers, system administrators and other stakeholders \
8in an IT system to manage and understand IT infrastructure throughout \
9its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit. \
10 \
11This package is intended to provide a stable base policy for \
12installations and upgrades, and is used by CFEngine 3.6 and newer. \
13 \
14The contents of this packge are intended to live in `/var/cfengine/masterfiles` \
15or wherever `$(sys.masterdir)` points. \
16"
17
18HOMEPAGE = "http://cfengine.com"
19
20LICENSE = "MIT"
21LIC_FILES_CHKSUM = "file://LICENSE;md5=52cd3d13af93180822888ab0088e9328"
22
23SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
24 file://remove-policy-of-usr-local-sbin.patch \
25"
26SRC_URI[md5sum] = "b101ddcd546738af6ec91be5c297cb24"
27SRC_URI[sha256sum] = "63dec2f8649f5f2788cd463dccf47f8dbe941522acfcf3093517f983bbfa0606"
28
29inherit autotools
30
31export EXPLICIT_VERSION="${PV}"
32
33EXTRA_OECONF = "--prefix=${localstatedir}/cfengine"
34
35FILES_${PN} += "${localstatedir}/cfengine"
36
37RDEPENDS_${PN} += "python-core"
diff --git a/meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch b/meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch
new file mode 100644
index 000000000..2295e415c
--- /dev/null
+++ b/meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Inappropriate [configuration]
2
3projlibdir use a hard coded lib path, this will cause error when build a 64bit
4target. So change it to suitable path.
5
6Signed-off-by: Song.Li <Song.Li@windriver.com>
7Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
8Signed-off-by: Kai Kang <kai.kang@windriver.com>
9---
10 configure.ac | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/configure.ac b/configure.ac
14index 38e2b9c..bc6b996 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -188,7 +188,7 @@ AS_IF([test x"$enable_fhs" = xyes], [
18 fi
19
20 sbindir='${exec_prefix}/bin' # /var/cfengine/bin despite being sbin_?
21- projlibdir='${exec_prefix}/lib'
22+ projlibdir='${libdir}'
23 mandir='${exec_prefix}/share/man'
24 ])
25
26--
271.7.1
28
diff --git a/meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch b/meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch
new file mode 100644
index 000000000..b9526f284
--- /dev/null
+++ b/meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Inappropriate [configuration]
2
3Set the path of default configure file.
4
5Signed-off-by: Kai Kang <kai.kang@windriver.com>
6---
7diff --git a/misc/init.d/cfengine3.in b/misc/init.d/cfengine3.in
8index d6ae26f..1dee283 100644
9--- a/misc/init.d/cfengine3.in
10+++ b/misc/init.d/cfengine3.in
11@@ -101,11 +101,7 @@ if [ -z "$LOCKDIR" ]; then
12 fi
13
14 # default control file
15-if [ "$DEBIAN" = "1" ]; then
16- DEFAULT=/etc/default/cfengine3
17-else
18- DEFAULT=/etc/sysconfig/cfengine3
19-fi
20+DEFAULT=/etc/default/cfengine3
21
22 if [ -f $DEFAULT ]; then
23 . $DEFAULT
diff --git a/meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb b/meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb
new file mode 100644
index 000000000..0bd5f3242
--- /dev/null
+++ b/meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb
@@ -0,0 +1,71 @@
1#
2# Copyright (C) 2014 - 2016 Wind River Systems, Inc.
3#
4SUMMARY = "CFEngine is an IT infrastructure automation framework"
5
6DESCRIPTION = "CFEngine is an IT infrastructure automation framework \
7that helps engineers, system administrators and other stakeholders \
8in an IT system to manage and understand IT infrastructure throughout \
9its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit."
10
11HOMEPAGE = "http://cfengine.com"
12
13LICENSE = "GPLv3"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=cd59c3650c8b7ff36bab1cc6587b097a"
15
16DEPENDS = "attr tokyocabinet"
17
18SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
19 file://change-hard-coded-lib-path.patch \
20 file://set-path-of-default-config-file.patch \
21"
22
23SRC_URI[md5sum] = "63da39655cfca30ca885fcc4a1bf8aa4"
24SRC_URI[sha256sum] = "32a38aedf1199c2361e1335e0d4a1d98f9efa7cd591bcb647f35c7395bb66f2d"
25
26inherit autotools systemd
27
28export EXPLICIT_VERSION="${PV}"
29
30SYSTEMD_SERVICE_${PN} = "cfengine3.service cfengine3-web.service"
31SYSTEMD_AUTO_ENABLE_${PN} = "disable"
32
33PACKAGECONFIG ??= "libpcre openssl \
34 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
36"
37PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2,"
38PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql,"
39PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql,"
40PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl,"
41PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt,"
42PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre,"
43PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl,"
44PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam,"
45PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml,"
46PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service"
47PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl,"
48
49EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet"
50
51do_install_append() {
52 install -d ${D}${localstatedir}/${BPN}/bin
53 for f in `ls ${D}${bindir}`; do
54 ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/
55 done
56
57 install -d ${D}${sysconfdir}/default
58 cat << EOF > ${D}${sysconfdir}/default/cfengine3
59RUN_CF_SERVERD=1
60RUN_CF_EXECD=1
61RUN_CF_MONITORD=1
62RUN_CF_HUB=0
63EOF
64
65 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
66 install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3
67 sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service
68 fi
69}
70
71RDEPENDS_${PN} += "${BPN}-masterfiles"