Add recipes of cfengine and its dependency tokyocabinet
cover Add recipes of cfengine and its dependency tokyocabinet
From: Kai Kang <[email protected]>
Kai Kang (2):
tokyocabinet: add recipe
cfengine: add recipe and base policy
.../remove-policy-of-usr-local-sbin.patch | 28 +++++++++ .../cfengine/cfengine-masterfiles_3.9.0.bb | 37 +++++++++++ .../cfengine/change-hard-coded-lib-path.patch | 28 +++++++++ .../cfengine/set-path-of-default-config-file.patch | 23 +++++++ .../recipes-extended/cfengine/cfengine_3.9.0.bb | 71 ++++++++++++++++++++++ .../remove-hard-coded-include-and-lib-paths.patch | 43 +++++++++++++ .../tokyocabinet/tokyocabinet_1.4.48.bb | 27 ++++++++ 7 files changed, 257 insertions(+) create mode 100644 meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch create mode 100644 meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb create mode 100644 meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch create mode 100644 meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch create mode 100644 meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb create mode 100644 meta-oe/recipes-support/tokyocabinet/tokyocabinet/remove-hard-coded-include-and-lib-paths.patch create mode 100644 meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb
Signature · 1 line
2.6.1
PATCH 1/2 tokyocabinet: add recipe
From: Kai Kang <[email protected]>
tokyocabinet is a modern implementation of DBM. And we will use it as default database for cfengine.
--- .../remove-hard-coded-include-and-lib-paths.patch | 43 ++++++++++++++++++++++ .../tokyocabinet/tokyocabinet_1.4.48.bb | 27 ++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 meta-oe/recipes-support/tokyocabinet/tokyocabinet/remove-hard-coded-include-and-lib-paths.patch create mode 100644 meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb
meta-oe/recipes-support/tokyocabinet/tokyocabinet/remove-hard-coded-include-and-lib-paths.patch new file +43 -0
@@ -0,0 +1,43 @@ +Upstream-Status: Inappropriate [embedded specific] + +There are hardcode paths in configure.in eg: /usr/include, $HOME/include etc. +These paths will cause Makefile to search host path when doing cross-compiling. +and bitbake will prompt this as an error. So remove them. + +Signed-off-by: Song.Li <[email protected]> +Signed-off-by: Kai Kang <[email protected]> +--- + configure.in | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/configure.in b/configure.in +index bcfd5bc..5b24947 100644 +--- a/configure.in ++++ b/configure.in +@@ -32,21 +32,15 @@ MYPCFILES="tokyocabinet.pc" + + # Building flags + MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2" +-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include" ++MYCPPFLAGS="-I." + MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__" +-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib" ++MYLDFLAGS="-L." + MYCMDLDFLAGS="" + MYRUNPATH="\$(LIBDIR)" + MYLDLIBPATHENV="LD_LIBRARY_PATH" + MYPOSTCMD="true" + + # Building paths +-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" +-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb" +-CPATH="$HOME/include:/usr/local/include:$CPATH" +-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH" +-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" +-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" + export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH + + +-- +1.7.9.5 +
meta-oe/recipes-support/tokyocabinet/tokyocabinet_1.4.48.bb new file +27 -0
@@ -0,0 +1,27 @@ +# +# Copyright (C) 2012 - 2016 Wind River Systems, Inc. +# +SUMMARY = "A modern implementation of DBM" + +DESCRIPTION = "Tokyo Cabinet is a library of routines for managing a database. \ +The database is a simple data file containing records, each is a pair of a key \ +and a value. Every key and value is serial bytes with variable length. \ +Both binary data and character string can be used as a key and a value. \ +There is neither concept of data tables nor data types. \ +Records are organized in hash table, B+ tree, or fixed-length array." + +HOMEPAGE = "http://fallabs.com/tokyocabinet/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI = "http://fallabs.com/tokyocabinet/${BP}.tar.gz \ + file://remove-hard-coded-include-and-lib-paths.patch \ +" + +SRC_URI[md5sum] = "fd03df6965f8f56dd5b8518ca43b4f5e" +SRC_URI[sha256sum] = "a003f47c39a91e22d76bc4fe68b9b3de0f38851b160bbb1ca07a4f6441de1f90" + +DEPENDS = "bzip2 zlib" + +inherit autotools-brokensep
Signature · 1 line
2.6.1
PATCH 2/2 cfengine: add recipe and base policy
In reply to [email protected]From: Kai Kang <[email protected]>
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
--- .../remove-policy-of-usr-local-sbin.patch | 28 +++++++++ .../cfengine/cfengine-masterfiles_3.9.0.bb | 37 +++++++++++ .../cfengine/change-hard-coded-lib-path.patch | 28 +++++++++ .../cfengine/set-path-of-default-config-file.patch | 23 +++++++ .../recipes-extended/cfengine/cfengine_3.9.0.bb | 71 ++++++++++++++++++++++ 5 files changed, 187 insertions(+) create mode 100644 meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch create mode 100644 meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb create mode 100644 meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch create mode 100644 meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch create mode 100644 meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb
meta-oe/recipes-extended/cfengine/cfengine-masterfiles/remove-policy-of-usr-local-sbin.patch new file +28 -0
@@ -0,0 +1,28 @@ +Upstream-Status: Inappropriate [configuration] + +Directory /usr/local is not used for us. Remove the policy that not to install +binaries to /usr/local/sbin. + +Signed-off-by: Kai Kang <[email protected]> +--- +diff --git a/cfe_internal/update/update_bins.cf b/cfe_internal/update/update_bins.cf +index 1796caa..697af0d 100644 +--- a/cfe_internal/update/update_bins.cf ++++ b/cfe_internal/update/update_bins.cf +@@ -55,16 +55,6 @@ bundle agent cfe_internal_bins + depth_search => u_recurse_basedir("inf"), + action => u_immediate; + +- "/usr/local/sbin/$(agents)" +- comment => "Create symlinks of CFE binaries in /usr/local/sbin", +- handle => canonify("cfe_internal_bins_files_sbin_$(agents)"), +- move_obstructions => "true", +- link_from => u_ln_s("$(sys.workdir)/bin/$(agents)"); +- +- "/usr/local/sbin/$(agents).cfsaved" +- comment => "Remove all .cfsaved file extension", +- handle => canonify("cfe_internal_bins_files_remove_$(agent)_cfsaved"), +- delete => u_tidy; + } + + bundle agent cfe_internal_update_bins
meta-oe/recipes-extended/cfengine/cfengine-masterfiles_3.9.0.bb new file +37 -0
@@ -0,0 +1,37 @@ +# +# Copyright (C) 2014 - 2016 Wind River Systems, Inc. +# +SUMMARY = "Base policy for CFEngine" + +DESCRIPTION = "CFEngine is an IT infrastructure automation framework \ +that helps engineers, system administrators and other stakeholders \ +in an IT system to manage and understand IT infrastructure throughout \ +its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit. \ + \ +This package is intended to provide a stable base policy for \ +installations and upgrades, and is used by CFEngine 3.6 and newer. \ + \ +The contents of this packge are intended to live in `/var/cfengine/masterfiles` \ +or wherever `$(sys.masterdir)` points. \ +" + +HOMEPAGE = "http://cfengine.com" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=52cd3d13af93180822888ab0088e9328" + +SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \ + file://remove-policy-of-usr-local-sbin.patch \ +" +SRC_URI[md5sum] = "b101ddcd546738af6ec91be5c297cb24" +SRC_URI[sha256sum] = "63dec2f8649f5f2788cd463dccf47f8dbe941522acfcf3093517f983bbfa0606" + +inherit autotools + +export EXPLICIT_VERSION="${PV}" + +EXTRA_OECONF = "--prefix=${localstatedir}/cfengine" + +FILES_${PN} += "${localstatedir}/cfengine" + +RDEPENDS_${PN} += "python-core"
meta-oe/recipes-extended/cfengine/cfengine/change-hard-coded-lib-path.patch new file +28 -0
@@ -0,0 +1,28 @@ +Upstream-Status: Inappropriate [configuration] + +projlibdir use a hard coded lib path, this will cause error when build a 64bit +target. So change it to suitable path. + +Signed-off-by: Song.Li <[email protected]> +Signed-off-by: Jackie Huang <[email protected]> +Signed-off-by: Kai Kang <[email protected]> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 38e2b9c..bc6b996 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -188,7 +188,7 @@ AS_IF([test x"$enable_fhs" = xyes], [ + fi + + sbindir='${exec_prefix}/bin' # /var/cfengine/bin despite being sbin_? +- projlibdir='${exec_prefix}/lib' ++ projlibdir='${libdir}' + mandir='${exec_prefix}/share/man' + ]) + +-- +1.7.1 +
meta-oe/recipes-extended/cfengine/cfengine/set-path-of-default-config-file.patch new file +23 -0
@@ -0,0 +1,23 @@ +Upstream-Status: Inappropriate [configuration] + +Set the path of default configure file. + +Signed-off-by: Kai Kang <[email protected]> +--- +diff --git a/misc/init.d/cfengine3.in b/misc/init.d/cfengine3.in +index d6ae26f..1dee283 100644 +--- a/misc/init.d/cfengine3.in ++++ b/misc/init.d/cfengine3.in +@@ -101,11 +101,7 @@ if [ -z "$LOCKDIR" ]; then + fi + + # default control file +-if [ "$DEBIAN" = "1" ]; then +- DEFAULT=/etc/default/cfengine3 +-else +- DEFAULT=/etc/sysconfig/cfengine3 +-fi ++DEFAULT=/etc/default/cfengine3 + + if [ -f $DEFAULT ]; then + . $DEFAULT
meta-oe/recipes-extended/cfengine/cfengine_3.9.0.bb new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.6.1