This is a new package for cfengine on OpenWrt. cfengine enables to
automate administration for a huge number of clients.

Signed-off-by: Christoph König <christoph.koe...@ikt.uni-hannover.de>

---

Index: cfengine/files/update.conf
===================================================================
--- cfengine/files/update.conf  (revision 0)
+++ cfengine/files/update.conf  (revision 0)
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+#######
+# default update.conf => put in /etc/cfengine/inputs on every host
+#######
+
+control:
+   actionsequence  = ( copy tidy )             # copy and clean up
+   domain          = ( mydomain.name )         # domain name of our testbed
+   policyhost      = ( aa.bb.cc.dd )           # this is the policyhost,
+                                               # I use the IP because a new
+                                               # host has no name resolution
+                                               # to a named server
+   master_cfinput  = ( /etc/cfengine )         # here are the masterfiles
+                                               # located on policyhost
+   workdir         = ( /etc/cfengine )         # working directory of
+                                               # cfengine on openwrt
+   SplayTime = ( 2 )
+
+# copy instructions: copy the complete inputs directory from policyhost
+# to client. Remark: exclude=files and ignore=directories
+copy:
+     $(master_cfinput)            dest=$(workdir)/inputs
+                                  r=inf
+                                  mode=600
+                                  type=binary
+                                  exclude=*.lst
+                                  exclude=*~
+                                  exclude=#*
+                                  ignore=.svn
+                                  server=$(policyhost)
+                                  trustkey=true
+
+# tidy instructions: delete seven days old files in output directory
+tidy:
+     $(workdir)/outputs pattern=* age=7
+     $(workdir)/inputs pattern=*.swp age=7 recurse=inf
+     $(workdir)/inputs pattern=*.cfsaved age=7 recurse=inf
Index: cfengine/files/cfagent.conf
===================================================================
--- cfengine/files/cfagent.conf (revision 0)
+++ cfengine/files/cfagent.conf (revision 0)
@@ -0,0 +1,2 @@
+#put in /etc/cfengine/inputs/
+#if you are here, start with the tutorial on cfengine.org
Index: cfengine/patches/001-configure.patch
===================================================================
--- cfengine/patches/001-configure.patch        (revision 0)
+++ cfengine/patches/001-configure.patch        (revision 0)
@@ -0,0 +1,29 @@
+--- a/configure
++++ b/configure
+@@ -16166,7 +16166,7 @@
+ See \`config.log' for more details." >&5
+ $as_echo "$as_me: error: cannot run test program while cross compiling
+ See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }; }
++    }; }
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -16237,7 +16237,7 @@
+ See \`config.log' for more details." >&5
+ $as_echo "$as_me: error: cannot run test program while cross compiling
+ See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }; }
++    }; }
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -16472,7 +16472,7 @@
+ See \`config.log' for more details." >&5
+ $as_echo "$as_me: error: cannot run test program while cross compiling
+ See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }; }
++    }; }
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
Index: cfengine/Makefile
===================================================================
--- cfengine/Makefile   (revision 0)
+++ cfengine/Makefile   (revision 0)
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME       := cfengine
+PKG_VERSION    := 2.2.10
+PKG_RELEASE    := 1
+PKG_SOURCE     := $(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL := http://www.cfengine.org/tarballs
+PKG_MD5SUM     := 3b90ff8bf2ec941cd33cfb65f5012f16
+PKG_CAT        := zcat
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cfengine
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE:=Fully automated system administration
+  URL:=http://www.cfengine.org
+  DEPENDS:=+libpthread +libdb47 +openssl-util +librt
+  MAINTAINER:=Christoph Koenig <christoph.koe...@ikt.uni-hannover.de>
+endef
+
+define Package/cfengine/description
+ It takes some time to build the system up- but if it's running,
+ you wonder how you ever could live without it.
+endef
+
+define Package/cfengine/conffiles
+/etc/cfengine/inputs/cfagent.conf
+/etc/cfengine/inputs/update.conf
+endef
+
+define Build/Configure
+       $(call Build/Configure/Default, \
+           --with-berkeleydb="$(STAGING_DIR)/usr/lib" \
+           --target=$(GNU_TARGET_NAME) \
+           --host=$(GNU_TARGET_NAME) \
+           --build=$(GNU_HOST_NAME) \
+           --with-openssl="$(STAGING_DIR)/usr"\
+           --with-workdir="/etc/cfengine"\
+       )
+endef
+
+define Package/cfengine/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cfagent $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cfkey $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/cfengine/inputs
+       $(INSTALL_DATA) ./files/update.conf $(1)/etc/cfengine/inputs/update.conf
+       $(INSTALL_DATA) ./files/cfagent.conf 
$(1)/etc/cfengine/inputs/cfagent.conf
+endef
+
+$(eval $(call BuildPackage,cfengine))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to