On 2013/03/23 14:10, Martijn Rijkeboer wrote:
> 
> > First of all, I'm not native English speaker :D What about this one?
> > Partly based on Debian package.
> 
> I'm also not a native English speaker...

Here's an updated diff including a reworked README.

I removed cf_serverd from the cfengine rc script so that the typical
case of client machines can use the script, and just add cf_serverd
where needed.

Other tweaks, reordered @sample so the directories are near the
files (at first it looked like the directory @sample's were
missing..) and on the @extraunexec rm -rf lines, try a bit harder
to avoid deleting @sample'd directories (add /* to the end),
it will still hit some, but not as many.

Don't create symlinks via @exec-add, they do not get properly
registered in the PLIST. (This was a big problem with texlive and
we have a nasty workaround in the quirks package as a result).
I have moved them to post-install so they can be included in the
package properly. Also I am only linking the relevant programs
inside /var/cfengine/bin/ rather than linking the whole directory
(this helps pkg_add if we ever move to static binaries in
/var/cfengine/bin in the future).

The shared library version numbers *must* be controlled by the
ports infrastructure. I have changed the version to 0.0, as we do
by convention for a new library (partly done to prove that
controlling the version number does actually work). However this
does not currently work; cfengine's build will need to be patched
to get this fixed.


Big caveat:  I have been looking at this from a porter's point
of view, and the perspective of trying to get the README usable
by somebody who has not come across cfengine before. I have
*not* tried running it yet and my understanding of how things work
in the README might not be entirely correct, so my changes here
need checking. :)

Still to-do:

The key file added in @exec either needs to get registered
properly in the plist, or just avoid running this automatically
and tell people to do it in README instead (probably easier).

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/cfengine/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile    11 Mar 2013 11:41:29 -0000      1.39
+++ Makefile    23 Mar 2013 15:39:39 -0000
@@ -1,26 +1,71 @@
-# $OpenBSD: Makefile,v 1.39 2013/03/11 11:41:29 espie Exp $
+# $OpenBSD: Makefile,v 1.38 2011/09/16 11:41:39 espie Exp $
 
-COMMENT=       GNU system administration tool for networks
+COMMENT =      GNU system administration tool for networks
 
-DISTNAME=              cfengine-2.2.10
-REVISION=      2
-CATEGORIES=    sysutils
-
-HOMEPAGE=      http://www.cfengine.org/
-
-MAINTAINER=    William Yodlowsky <b...@openbsd.rutgers.edu>
-
-# GPLv2+
-PERMIT_PACKAGE_CDROM=  Yes
-
-WANTLIB=               c crypto m pthread lib/db4/db>=4
-
-MASTER_SITES=          ${HOMEPAGE}/tarballs/
-
-CONFIGURE_STYLE=       gnu
-CONFIGURE_ARGS+=       --with-docs
-USE_GROFF =            Yes
-
-LIB_DEPENDS=           databases/db/v4
+DISTNAME =     cfengine-3.4.4
+SHARED_LIBS +=  promises       0.0 # 1.0
+CATEGORIES =   sysutils
+HOMEPAGE =     http://cfengine.com/
+
+MAINTAINER =   Okan Demirmen <o...@openbsd.org>
+
+# GPLv3
+PERMIT_PACKAGE_CDROM = Yes
+
+MASTER_SITES = ${HOMEPAGE}source-code/download?file=${DISTFILES}&dummy=/
+
+CFENGINE_BASE =                /var/cfengine
+CFENGINE_EXAMPLES =    ${PREFIX}/share/examples/cfengine
+SUBST_VARS +=          CFENGINE_BASE CFENGINE_EXAMPLES
+
+FLAVORS =              pgsql mysql
+FLAVOR ?=
+
+WANTLIB =              c crypto m pcre pthread qdbm
+CONFIGURE_STYLE =      gnu
+USE_GMAKE =            Yes
+LIB_DEPENDS =          databases/qdbm \
+                       devel/pcre
+CONFIGURE_ENV +=       CPPFLAGS="-I${LOCALBASE}/include" \
+                       LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ARGS =       --with-openssl=/usr \
+                       --with-pcre \
+                       --with-qdbm \
+                       --without-libxml2 \
+                       --without-libvirt \
+                       --enable-fhs \
+                       --with-workdir=${CFENGINE_BASE}
+MAKE_FLAGS +=          examplesdir="${CFENGINE_EXAMPLES}" \
+                       masterfilesdir="${CFENGINE_EXAMPLES}/CoreBase"
+
+.if ${FLAVOR:Mpgsql}
+WANTLIB +=             pq
+CONFIGURE_ARGS +=      --with-postgresql
+LIB_DEPENDS +=         databases/postgresql
+.else
+CONFIGURE_ARGS +=      --without-postgresql
+.endif
+
+.if ${FLAVOR:Mmysql}
+WANTLIB +=             mysqlclient_r
+CONFIGURE_ARGS +=      --with-mysql
+LIB_DEPENDS +=         databases/mysql
+.else
+CONFIGURE_ARGS +=      --without-mysql
+.endif
+
+#NO_TEST =             Yes
+
+post-extract:
+       perl -i -pe \
+               's|^sbin_PROGRAMS.*rpmvercmp||;' \
+               ${WRKDIST}/ext/Makefile.in
+
+post-install:
+       mkdir -p ${WRKINST}${CFENGINE_BASE}/bin
+       ln -s ${SYSCONFDIR}/cfengine ${WRKINST}${CFENGINE_BASE}/inputs
+.for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-report 
cf-runagent cf-serverd
+       ln -s ${TRUEPREFIX}/sbin/$i ${WRKINST}${CFENGINE_BASE}/bin/
+.endfor
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/cfengine/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo    1 Sep 2009 14:25:15 -0000       1.12
+++ distinfo    23 Mar 2013 15:39:39 -0000
@@ -1,5 +1,2 @@
-MD5 (cfengine-2.2.10.tar.gz) = O5D/i/LslBzTPPtl9QEvFg==
-RMD160 (cfengine-2.2.10.tar.gz) = Z/09yAJw3AAIh+Pb8m83IzjiYA8=
-SHA1 (cfengine-2.2.10.tar.gz) = AyvsC8Wf/ucXlCLpbf2QKvv5Q0A=
-SHA256 (cfengine-2.2.10.tar.gz) = 80aXzFLhNCxexLRaSt+fv/36BaaL3HxTOC9y0D4QZ4M=
-SIZE (cfengine-2.2.10.tar.gz) = 2690333
+SHA256 (cfengine-3.4.4.tar.gz) = ZXJgmFFyTsj8WMYEdHQuWQeYlGICDmwkYRHCcxrbajc=
+SIZE (cfengine-3.4.4.tar.gz) = 4689683
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure     1 Sep 2009 14:25:15 -0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-configure,v 1.7 2009/09/01 14:25:15 okan Exp $
---- configure.orig     Sat Apr 11 15:59:34 2009
-+++ configure  Thu May 28 17:33:23 2009
-@@ -23738,7 +23738,7 @@ $as_echo_n "checking Checking for GCC Specific compile
- if test x"$GCC" = "xyes"; then
- 
- 
--      GCC_CFLAG="-g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized"
-+      GCC_CFLAG=""
-       { $as_echo "$as_me:$LINENO: result: yes" >&5
- $as_echo "yes" >&6; }
- 
Index: patches/patch-doc_Makefile_in
===================================================================
RCS file: patches/patch-doc_Makefile_in
diff -N patches/patch-doc_Makefile_in
--- patches/patch-doc_Makefile_in       1 Sep 2009 14:25:15 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-doc_Makefile_in,v 1.5 2009/09/01 14:25:15 okan Exp $
---- doc/Makefile.in.orig       Sat Apr 11 15:59:32 2009
-+++ doc/Makefile.in    Thu May 28 17:32:35 2009
-@@ -69,7 +69,7 @@ NROFF = nroff
- MANS = $(man_MANS)
- docDATA_INSTALL = $(INSTALL_DATA)
- htmlDATA_INSTALL = $(INSTALL_DATA)
--DATA = $(doc_DATA) $(html_DATA)
-+DATA =
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- ACLOCAL = @ACLOCAL@
- AMTAR = @AMTAR@
-@@ -697,7 +697,7 @@ info: info-am
- 
- info-am: $(INFO_DEPS)
- 
--install-data-am: install-docDATA install-htmlDATA install-info-am \
-+install-data-am: install-info-am \
-       install-man
- 
- install-dvi: install-dvi-am
-@@ -818,7 +818,7 @@ uninstall-man: uninstall-man8
- 
- .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       dist-info distclean distclean-generic distclean-libtool \
--      distdir dvi dvi-am html html-am info info-am install \
-+      distdir dvi dvi-am info info-am install \
-       install-am install-data install-data-am install-docDATA \
-       install-dvi install-dvi-am install-exec install-exec-am \
-       install-html install-html-am install-htmlDATA install-info \
Index: patches/patch-inputs_Makefile_in
===================================================================
RCS file: patches/patch-inputs_Makefile_in
diff -N patches/patch-inputs_Makefile_in
--- patches/patch-inputs_Makefile_in    25 Apr 2009 22:07:37 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-inputs_Makefile_in,v 1.2 2009/04/25 22:07:37 okan Exp $
---- inputs/Makefile.in.orig    Wed Jun 11 12:39:21 2008
-+++ inputs/Makefile.in Thu Jul  3 13:02:36 2008
-@@ -15,7 +15,7 @@
- @SET_MAKE@
- 
- VPATH = @srcdir@
--pkgdatadir = $(datadir)/@PACKAGE@
-+pkgdatadir = $(datadir)/examples/@PACKAGE@
- pkglibdir = $(libdir)/@PACKAGE@
- pkgincludedir = $(includedir)/@PACKAGE@
- am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
Index: patches/patch-pub_getopt_c
===================================================================
RCS file: /cvs/ports/sysutils/cfengine/patches/patch-pub_getopt_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-pub_getopt_c
--- patches/patch-pub_getopt_c  17 Jun 2004 11:21:42 -0000      1.1
+++ patches/patch-pub_getopt_c  23 Mar 2013 15:39:39 -0000
@@ -1,11 +1,12 @@
 $OpenBSD: patch-pub_getopt_c,v 1.1 2004/06/17 11:21:42 sturm Exp $
---- pub/getopt.c.orig  2004-06-12 23:37:42.000000000 -0400
-+++ pub/getopt.c       2004-06-12 23:38:17.000000000 -0400
-@@ -60,6 +60,10 @@ Cambridge, MA 02139, USA.  */
- #include <stdlib.h>
- #endif        /* GNU C library.  */
+--- pub/getopt.c.orig  Tue Apr 10 04:20:40 2012
++++ pub/getopt.c       Fri Apr 13 17:58:20 2012
+@@ -62,6 +62,11 @@ Cambridge, MA 02139, USA.  */
+ 
+ char *getenv(const char *name);
  
 +#ifdef __OpenBSD__
++#include <string.h>
 +#include <unistd.h>
 +#endif
 +
Index: patches/patch-src_cflex_c
===================================================================
RCS file: patches/patch-src_cflex_c
diff -N patches/patch-src_cflex_c
--- patches/patch-src_cflex_c   1 Sep 2009 14:25:15 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_cflex_c,v 1.5 2009/09/01 14:25:15 okan Exp $
---- src/cflex.c.orig   Sat Apr 11 16:00:11 2009
-+++ src/cflex.c        Thu May 28 17:32:35 2009
-@@ -4890,7 +4890,7 @@ static void yy_load_buffer_state  (void)
- }
- 
- #ifndef __cplusplus
--extern int isatty (int );
-+#include <unistd.h>
- #endif /* __cplusplus */
-     
- /* Initializes or reinitializes a buffer.
Index: patches/patch-src_crypto_c
===================================================================
RCS file: patches/patch-src_crypto_c
diff -N patches/patch-src_crypto_c
--- patches/patch-src_crypto_c  12 Oct 2007 20:12:19 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_crypto_c,v 1.4 2007/10/12 20:12:19 sturm Exp $
---- src/crypto.c.orig  Mon Jul 10 13:53:47 2006
-+++ src/crypto.c       Sun Sep  2 15:44:05 2007
-@@ -294,7 +294,7 @@ snprintf(buffer,CF_BUFSIZE,"%d%d%25s",(int)CFSTARTTIME
- 
- EVP_DigestUpdate(&context,buffer,CF_BUFSIZE);
- 
--snprintf(pscomm,CF_BUFSIZE,"%s 
%s",VPSCOMM[VSYSTEMHARDCLASS],VPSOPTS[VSYSTEMHARDCLASS]);
-+snprintf(pscomm,CF_MAXLINKSIZE,"%s 
%s",VPSCOMM[VSYSTEMHARDCLASS],VPSOPTS[VSYSTEMHARDCLASS]);
- 
- if ((pp = cfpopen(pscomm,"r")) == NULL)
-    {
Index: patches/patch-src_do_c
===================================================================
RCS file: patches/patch-src_do_c
diff -N patches/patch-src_do_c
--- patches/patch-src_do_c      1 Sep 2009 14:25:15 -0000       1.9
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-src_do_c,v 1.9 2009/09/01 14:25:15 okan Exp $
---- src/do.c.orig      Sun Mar  8 12:27:56 2009
-+++ src/do.c   Thu May 28 17:32:35 2009
-@@ -3401,7 +3401,7 @@ if (MatchStringInFstab(mountpt))
-          
CfLog(cfinform,"---------------------------------------------------","");
-          
-          /* delete current fstab entry and unmount if necessary */
--         snprintf(mountspec,CF_BUFSIZE,".+:%s",mountpt);
-+         snprintf(mountspec,MAXPATHLEN,".+:%s",mountpt);
-          mntentry = LocateItemContainingRegExp(VMOUNTED,mountspec);
-          if (mntentry)
-             {
-@@ -3410,7 +3410,7 @@ if (MatchStringInFstab(mountpt))
-             strcat(mountspec,mountpt);
-             }
-          else  /* mountpt isn't mounted, so Unmount can use dummy host name */
--             snprintf(mountspec,CF_BUFSIZE,"host:%s",mountpt);
-+             snprintf(mountspec,MAXPATHLEN,"host:%s",mountpt);
-          
-          /* delete current fstab entry and unmount if necessary (don't rmdir) 
*/
-          cleaner.name        = mountspec;
Index: patches/patch-src_instrument_c
===================================================================
RCS file: patches/patch-src_instrument_c
diff -N patches/patch-src_instrument_c
--- patches/patch-src_instrument_c      1 Sep 2009 14:25:15 -0000       1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_instrument_c,v 1.3 2009/09/01 14:25:15 okan Exp $
---- src/instrument.c.orig      Fri Feb 27 15:18:32 2009
-+++ src/instrument.c   Thu May 28 17:32:35 2009
-@@ -542,7 +542,7 @@ while (dbcp->c_get(dbcp, &key, &value, DB_NEXT) == 0)
-    
-    tthen = (time_t)then;
- 
--   snprintf(datebuf,CF_BUFSIZE-1,"%s",ctime(&tthen));
-+   snprintf(datebuf,CF_MAXVARSIZE-1,"%s",ctime(&tthen));
-    datebuf[strlen(datebuf)-9] = '\0';                     /* Chop off second 
and year */
- 
-    snprintf(addr,15,"%s",hostname+1);
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/sysutils/cfengine/pkg/DESCR,v
retrieving revision 1.5
diff -u -p -r1.5 DESCR
--- pkg/DESCR   21 Jul 2005 15:16:47 -0000      1.5
+++ pkg/DESCR   23 Mar 2013 15:39:39 -0000
@@ -1,6 +1,5 @@
-Cfengine, or the configuration engine, is an autonomous agent and a
-middle to high level policy language for building expert systems which
-administrate and configure large computer networks. Cfengine uses the
-idea of classes and a primitive intelligence to define and automate the
-configuration and maintenance of system state, for small to huge
-configurations.
+Cfengine3 is an autonomous agent and a middle to high level policy
+language for building expert systems which administrate and configure
+large computer networks.  Cfengine3 uses the idea of classes and a
+primitive intelligence to define and automate the configuration and
+maintenance of system state, for small to huge configurations.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/cfengine/pkg/PLIST,v
retrieving revision 1.12
diff -u -p -r1.12 PLIST
--- pkg/PLIST   1 Sep 2009 14:25:15 -0000       1.12
+++ pkg/PLIST   23 Mar 2013 15:39:39 -0000
@@ -1,59 +1,345 @@
-@comment $OpenBSD: PLIST,v 1.12 2009/09/01 14:25:15 okan Exp $
-@info info/cfengine-Reference.info
-@info info/cfengine-Tutorial.info
-lib/libcfengine.a
-lib/libcfengine.la
-@man man/man8/cfagent.8
-@man man/man8/cfengine.8
-@man man/man8/cfenvd.8
-@man man/man8/cfenvgraph.8
-@man man/man8/cfetoolcheck.8
-@man man/man8/cfetoolcreate.8
-@man man/man8/cfetooldump.8
-@man man/man8/cfetoolgraph.8
-@man man/man8/cfetoolimport.8
-@man man/man8/cfetoolinfo.8
-@man man/man8/cfetoolupdate.8
-@man man/man8/cfexecd.8
-@man man/man8/cfkey.8
-@man man/man8/cfrun.8
-@man man/man8/cfservd.8
-@man man/man8/cfshow.8
-@bin sbin/cfagent
-sbin/cfdoc
-@bin sbin/cfenvd
-@bin sbin/cfenvgraph
-@bin sbin/cfetool
-@bin sbin/cfetoolgraph
-@bin sbin/cfexecd
-@bin sbin/cfkey
-@bin sbin/cfrun
-@bin sbin/cfservd
-@bin sbin/cfshow
-share/cfengine/
-share/cfengine/ChangeLog
-share/cfengine/INSTALL
-share/cfengine/NEWS
-share/cfengine/README
-share/cfengine/cfengine.el
+@comment $OpenBSD$
+@extraunexec rm -rf ${SYSCONFDIR}/cfengine/*
+@extraunexec rm -rf ${CFENGINE_BASE}/*
+lib/cfengine/
+lib/cfengine/libpromises.la
+@lib lib/cfengine/libpromises.so.${LIBpromises_VERSION}
+@man man/man8/cf-agent.8
+@man man/man8/cf-execd.8
+@man man/man8/cf-key.8
+@man man/man8/cf-monitord.8
+@man man/man8/cf-promises.8
+@man man/man8/cf-report.8
+@man man/man8/cf-runagent.8
+@man man/man8/cf-serverd.8
+@bin sbin/cf-agent
+@bin sbin/cf-execd
+@bin sbin/cf-key
+@bin sbin/cf-monitord
+@bin sbin/cf-promises
+@bin sbin/cf-report
+@bin sbin/cf-runagent
+@bin sbin/cf-serverd
+share/doc/cfengine/
+share/doc/cfengine/ChangeLog
+share/doc/cfengine/README
+share/doc/pkg-readmes/${FULLPKGNAME}
 share/examples/cfengine/
-share/examples/cfengine/cf.chflags.example
-share/examples/cfengine/cf.freebsd.example
-share/examples/cfengine/cf.ftp.example
-share/examples/cfengine/cf.groups.example
-share/examples/cfengine/cf.linux.example
-share/examples/cfengine/cf.main.example
-share/examples/cfengine/cf.motd.example
-share/examples/cfengine/cf.preconf.example
-share/examples/cfengine/cf.services.example
-share/examples/cfengine/cf.site.example
-share/examples/cfengine/cf.solaris.example
-share/examples/cfengine/cf.sun4.example
-share/examples/cfengine/cf.users.example
-share/examples/cfengine/cfagent.conf-advanced.example
-share/examples/cfengine/cfagent.conf.example
-share/examples/cfengine/cfrc.example
-share/examples/cfengine/cfrun.hosts.example
-share/examples/cfengine/cfservd.conf.example
-share/examples/cfengine/update.conf.example
-@extraunexec rm -fr /var/cfengine
+share/examples/cfengine/CoreBase/
+@mode 0700
+@sample ${SYSCONFDIR}/cfengine/
+@mode
+share/examples/cfengine/CoreBase/cf-sketch-runfile.cf
+@sample ${SYSCONFDIR}/cfengine/cf-sketch-runfile.cf
+share/examples/cfengine/CoreBase/controls/
+@sample ${SYSCONFDIR}/cfengine/controls/
+share/examples/cfengine/CoreBase/controls/cf_agent.cf
+@sample ${SYSCONFDIR}/cfengine/controls/cf_agent.cf
+share/examples/cfengine/CoreBase/controls/cf_execd.cf
+@sample ${SYSCONFDIR}/cfengine/controls/cf_execd.cf
+share/examples/cfengine/CoreBase/controls/cf_monitord.cf
+@sample ${SYSCONFDIR}/cfengine/controls/cf_monitord.cf
+share/examples/cfengine/CoreBase/controls/cf_report.cf
+@sample ${SYSCONFDIR}/cfengine/controls/cf_report.cf
+share/examples/cfengine/CoreBase/controls/cf_runagent.cf
+@sample ${SYSCONFDIR}/cfengine/controls/cf_runagent.cf
+share/examples/cfengine/CoreBase/controls/cf_serverd.cf
+@sample ${SYSCONFDIR}/cfengine/controls/cf_serverd.cf
+share/examples/cfengine/CoreBase/def.cf
+@sample ${SYSCONFDIR}/cfengine/def.cf
+share/examples/cfengine/CoreBase/libraries/
+@sample ${SYSCONFDIR}/cfengine/libraries/
+share/examples/cfengine/CoreBase/libraries/cfengine_stdlib.cf
+@sample ${SYSCONFDIR}/cfengine/libraries/cfengine_stdlib.cf
+share/examples/cfengine/CoreBase/promises.cf
+@sample ${SYSCONFDIR}/cfengine/promises.cf
+share/examples/cfengine/CoreBase/services/
+@sample ${SYSCONFDIR}/cfengine/services/
+share/examples/cfengine/CoreBase/services/init_msg.cf
+@sample ${SYSCONFDIR}/cfengine/services/init_msg.cf
+share/examples/cfengine/CoreBase/update.cf
+@sample ${SYSCONFDIR}/cfengine/update.cf
+share/examples/cfengine/active_directory.cf
+share/examples/cfengine/app_baseline.cf
+share/examples/cfengine/guest_environment_kvm.cf
+share/examples/cfengine/hostswithclass.cf
+share/examples/cfengine/motd.cf
+share/examples/cfengine/package_windows_feature.cf
+share/examples/cfengine/promise_knowledge.cf
+share/examples/cfengine/service_catalogue.cf
+share/examples/cfengine/service_catalogue_separate.cf
+share/examples/cfengine/sql_table_structure.cf
+share/examples/cfengine/unit_abort.cf
+share/examples/cfengine/unit_accessed_before.cf
+share/examples/cfengine/unit_accumulated_time.cf
+share/examples/cfengine/unit_acl.cf
+share/examples/cfengine/unit_acl_generic.cf
+share/examples/cfengine/unit_acl_ntfs.cf
+share/examples/cfengine/unit_acl_secret.cf
+share/examples/cfengine/unit_activedirectory_listusers.cf
+share/examples/cfengine/unit_activedirectory_showuser.cf
+share/examples/cfengine/unit_ago.cf
+share/examples/cfengine/unit_arrays.cf
+share/examples/cfengine/unit_backreferences_files.cf
+share/examples/cfengine/unit_badpromise.cf
+share/examples/cfengine/unit_badtype.cf
+share/examples/cfengine/unit_bsdflags.cf
+share/examples/cfengine/unit_bundle_return_values.cf
+share/examples/cfengine/unit_cf2_integration.cf
+share/examples/cfengine/unit_change_detect.cf
+share/examples/cfengine/unit_changedbefore.cf
+share/examples/cfengine/unit_chdir.cf
+share/examples/cfengine/unit_classes_global.cf
+share/examples/cfengine/unit_classmatch.cf
+share/examples/cfengine/unit_classvar_convergence.cf
+share/examples/cfengine/unit_commands.cf
+share/examples/cfengine/unit_compare.cf
+share/examples/cfengine/unit_control_expand.cf
+share/examples/cfengine/unit_controlclasses.cf
+share/examples/cfengine/unit_copy.cf
+share/examples/cfengine/unit_copy_classes.cf
+share/examples/cfengine/unit_copy_copbl.cf
+share/examples/cfengine/unit_copy_edit.cf
+share/examples/cfengine/unit_copydir_copbl.cf
+share/examples/cfengine/unit_copylinks.cf
+share/examples/cfengine/unit_countclassesmatching.cf
+share/examples/cfengine/unit_countlinesmatching.cf
+share/examples/cfengine/unit_create_filedir.cf
+share/examples/cfengine/unit_createdb.cf
+share/examples/cfengine/unit_customize_by_named_list.cf
+share/examples/cfengine/unit_defaults.cf
+share/examples/cfengine/unit_defaults2.cf
+share/examples/cfengine/unit_defaults3.cf
+share/examples/cfengine/unit_definitions.cf
+share/examples/cfengine/unit_deletelines.cf
+share/examples/cfengine/unit_depends_on.cf
+share/examples/cfengine/unit_depends_on2.cf
+share/examples/cfengine/unit_disable.cf
+share/examples/cfengine/unit_disable_and_rotate_files.cf
+share/examples/cfengine/unit_diskfree.cf
+share/examples/cfengine/unit_dollar.cf
+share/examples/cfengine/unit_edit_column_files.cf
+share/examples/cfengine/unit_edit_comment_lines.cf
+share/examples/cfengine/unit_edit_deletenotmatch.cf
+share/examples/cfengine/unit_edit_insert_fuzzylines.cf
+share/examples/cfengine/unit_edit_insert_lines.cf
+share/examples/cfengine/unit_edit_insert_lines_silly.cf
+share/examples/cfengine/unit_edit_passwd_file.cf
+share/examples/cfengine/unit_edit_passwd_file_basic.cf
+share/examples/cfengine/unit_edit_replace_string.cf
+share/examples/cfengine/unit_edit_sectioned_file.cf
+share/examples/cfengine/unit_edit_setvar.cf
+share/examples/cfengine/unit_edit_template.cf
+share/examples/cfengine/unit_edit_triggerclass.cf
+share/examples/cfengine/unit_env.cf
+share/examples/cfengine/unit_epimenides.cf
+share/examples/cfengine/unit_escape.cf
+share/examples/cfengine/unit_exec_args.cf
+share/examples/cfengine/unit_exec_in_sequence.cf
+share/examples/cfengine/unit_execd.cf
+share/examples/cfengine/unit_execresult.cf
+share/examples/cfengine/unit_expand.cf
+share/examples/cfengine/unit_failedcommand.cf
+share/examples/cfengine/unit_failsafe.cf
+@sample ${SYSCONFDIR}/cfengine/failsafe.cf
+share/examples/cfengine/unit_file_change_detection.cf
+share/examples/cfengine/unit_file_owner_list_template.cf
+share/examples/cfengine/unit_fileexists.cf
+share/examples/cfengine/unit_filenames.cf
+share/examples/cfengine/unit_fileperms.cf
+share/examples/cfengine/unit_filesexist.cf
+share/examples/cfengine/unit_filesexist2.cf
+share/examples/cfengine/unit_filesize.cf
+share/examples/cfengine/unit_fix_names.cf
+share/examples/cfengine/unit_getenv.cf
+share/examples/cfengine/unit_getfields.cf
+share/examples/cfengine/unit_getgid.cf
+share/examples/cfengine/unit_getindices.cf
+share/examples/cfengine/unit_getindices_and_values.cf
+share/examples/cfengine/unit_getmacaddress.cf
+share/examples/cfengine/unit_getregistry.cf
+share/examples/cfengine/unit_getuid.cf
+share/examples/cfengine/unit_getusers.cf
+share/examples/cfengine/unit_global_list_expansion.cf
+share/examples/cfengine/unit_global_list_expansion_2.cf
+share/examples/cfengine/unit_grep.cf
+share/examples/cfengine/unit_groupexists.cf
+share/examples/cfengine/unit_hash.cf
+share/examples/cfengine/unit_hashcomment.cf
+share/examples/cfengine/unit_hashmatch.cf
+share/examples/cfengine/unit_hashuncomment.cf
+share/examples/cfengine/unit_helloworld.cf
+share/examples/cfengine/unit_host2ip.cf
+share/examples/cfengine/unit_hostrange.cf
+share/examples/cfengine/unit_hostsseen.cf
+share/examples/cfengine/unit_hub.cf
+share/examples/cfengine/unit_id.cf
+share/examples/cfengine/unit_inherit.cf
+share/examples/cfengine/unit_insert_users.cf
+share/examples/cfengine/unit_intarray.cf
+share/examples/cfengine/unit_inventory_cpu.cf
+share/examples/cfengine/unit_iprange.cf
+share/examples/cfengine/unit_irange.cf
+share/examples/cfengine/unit_isdir.cf
+share/examples/cfengine/unit_islink.cf
+share/examples/cfengine/unit_isnewerthan.cf
+share/examples/cfengine/unit_isplain.cf
+share/examples/cfengine/unit_isvariable.cf
+share/examples/cfengine/unit_iteration.cf
+share/examples/cfengine/unit_join.cf
+share/examples/cfengine/unit_knowledge_driver.cf
+share/examples/cfengine/unit_knowledge_txt.cf
+share/examples/cfengine/unit_lastnode.cf
+share/examples/cfengine/unit_ldap.cf
+share/examples/cfengine/unit_linking.cf
+share/examples/cfengine/unit_literal_server.cf
+share/examples/cfengine/unit_locate_files_and_compress.cf
+share/examples/cfengine/unit_log_private.cf
+share/examples/cfengine/unit_loops.cf
+share/examples/cfengine/unit_lsdir.cf
+share/examples/cfengine/unit_maplist.cf
+share/examples/cfengine/unit_measure_log.cf
+share/examples/cfengine/unit_measurements.cf
+share/examples/cfengine/unit_menu.cf
+share/examples/cfengine/unit_meta.cf
+share/examples/cfengine/unit_method.cf
+share/examples/cfengine/unit_method_polymorph.cf
+share/examples/cfengine/unit_method_validate.cf
+share/examples/cfengine/unit_method_var.cf
+share/examples/cfengine/unit_method_var2.cf
+share/examples/cfengine/unit_module_exec.cf
+share/examples/cfengine/unit_module_exec_2.cf
+share/examples/cfengine/unit_monitord.cf
+share/examples/cfengine/unit_mount_fs.cf
+share/examples/cfengine/unit_multipassvars.cf
+share/examples/cfengine/unit_namespace.cf
+share/examples/cfengine/unit_namespace1.cf
+share/examples/cfengine/unit_namespace2.cf
+share/examples/cfengine/unit_namespace3.cf
+share/examples/cfengine/unit_namespace_class1.cf
+share/examples/cfengine/unit_namespace_classes.cf
+share/examples/cfengine/unit_namespace_var_meta.cf
+share/examples/cfengine/unit_namespace_var_meta2.cf
+share/examples/cfengine/unit_neighbourhood_watch.cf
+share/examples/cfengine/unit_null_config.cf
+share/examples/cfengine/unit_occurrences.cf
+share/examples/cfengine/unit_orchestrate_chain1.cf
+share/examples/cfengine/unit_orchestrate_chain2.cf
+share/examples/cfengine/unit_orchestrate_dominoes1.cf
+share/examples/cfengine/unit_orchestrate_dominoes2.cf
+share/examples/cfengine/unit_orchestrate_dragon.cf
+share/examples/cfengine/unit_orchestrate_dragon_load_balancer.cf
+share/examples/cfengine/unit_orchestrate_n_of_m.cf
+share/examples/cfengine/unit_orchestration_hostlist.cf
+share/examples/cfengine/unit_ordering.cf
+share/examples/cfengine/unit_package_apt.cf
+share/examples/cfengine/unit_package_freebsd.cf
+share/examples/cfengine/unit_package_latest.cf
+share/examples/cfengine/unit_package_msi_file.cf
+share/examples/cfengine/unit_package_msi_version.cf
+share/examples/cfengine/unit_package_rpm.cf
+share/examples/cfengine/unit_package_solaris.cf
+share/examples/cfengine/unit_package_yum.cf
+share/examples/cfengine/unit_package_zypper.cf
+share/examples/cfengine/unit_parallel_exec.cf
+share/examples/cfengine/unit_parsestringarray.cf
+share/examples/cfengine/unit_pathtype.cf
+share/examples/cfengine/unit_pattern_and_edit.cf
+share/examples/cfengine/unit_peers.cf
+share/examples/cfengine/unit_postfix.cf
+share/examples/cfengine/unit_process_kill.cf
+share/examples/cfengine/unit_process_matching.cf
+share/examples/cfengine/unit_process_matching2.cf
+share/examples/cfengine/unit_process_matching3.cf
+share/examples/cfengine/unit_process_restart.cf
+share/examples/cfengine/unit_process_restart_basic.cf
+share/examples/cfengine/unit_process_signalling.cf
+share/examples/cfengine/unit_product.cf
+share/examples/cfengine/unit_promises.cf
+share/examples/cfengine/unit_readlist.cf
+share/examples/cfengine/unit_readtcp.cf
+share/examples/cfengine/unit_reg_multiline.cf
+share/examples/cfengine/unit_regarray.cf
+share/examples/cfengine/unit_regex_win.cf
+share/examples/cfengine/unit_regextract.cf
+share/examples/cfengine/unit_registry.cf
+share/examples/cfengine/unit_registry_cache.cf
+share/examples/cfengine/unit_regline.cf
+share/examples/cfengine/unit_reglist.cf
+share/examples/cfengine/unit_remoteclasses.cf
+share/examples/cfengine/unit_remoteclasses2.cf
+share/examples/cfengine/unit_remotescalar.cf
+share/examples/cfengine/unit_remove_deadlinks.cf
+share/examples/cfengine/unit_rename.cf
+share/examples/cfengine/unit_repairedcommand.cf
+share/examples/cfengine/unit_report_custom.cf
+share/examples/cfengine/unit_report_diffs.cf
+share/examples/cfengine/unit_report_state.cf
+share/examples/cfengine/unit_reporting.cf
+share/examples/cfengine/unit_reporttofile.cf
+share/examples/cfengine/unit_resolveconf.cf
+share/examples/cfengine/unit_returnszero.cf
+share/examples/cfengine/unit_root_passwd.cf
+share/examples/cfengine/unit_select_class.cf
+share/examples/cfengine/unit_select_mode.cf
+share/examples/cfengine/unit_select_region.cf
+share/examples/cfengine/unit_select_size.cf
+share/examples/cfengine/unit_selectservers.cf
+share/examples/cfengine/unit_server_callback.cf
+share/examples/cfengine/unit_server_copy_localhost.cf
+share/examples/cfengine/unit_server_copy_purge.cf
+share/examples/cfengine/unit_server_copy_remote.cf
+share/examples/cfengine/unit_server_flatcopy_localhost.cf
+share/examples/cfengine/unit_service_disable.cf
+share/examples/cfengine/unit_service_start.cf
+share/examples/cfengine/unit_services_concept.cf
+share/examples/cfengine/unit_services_win.cf
+share/examples/cfengine/unit_setuidlog.cf
+share/examples/cfengine/unit_setvar.cf
+share/examples/cfengine/unit_software_dist.cf
+share/examples/cfengine/unit_software_update_version_yum.cf
+share/examples/cfengine/unit_splitstring.cf
+share/examples/cfengine/unit_storage.cf
+share/examples/cfengine/unit_strcmp.cf
+share/examples/cfengine/unit_stringarray.cf
+share/examples/cfengine/unit_switchcase.cf
+share/examples/cfengine/unit_syslog.cf
+share/examples/cfengine/unit_syslog2.cf
+share/examples/cfengine/unit_template.cf
+share/examples/cfengine/unit_template2.cf
+share/examples/cfengine/unit_test_environment.cf
+share/examples/cfengine/unit_tidy_all_files.cf
+share/examples/cfengine/unit_translatepath.cf
+share/examples/cfengine/unit_update.cf
+share/examples/cfengine/unit_user_edit.cf
+share/examples/cfengine/unit_user_edit_method.cf
+share/examples/cfengine/unit_userexists.cf
+share/examples/cfengine/unit_varclass.cf
+share/examples/cfengine/unit_varexpansion.cf
+share/examples/cfengine/unit_varnet.cf
+share/examples/cfengine/unit_vars.cf
+share/examples/cfengine/unit_warnifline.cf
+share/examples/cfengine/unit_webserver.cf
+share/examples/cfengine/unit_zenoss.cf
+share/examples/cfengine/win_dns_client.cf
+share/examples/cfengine/win_emergency.cf
+share/examples/cfengine/win_registry.cf
+share/examples/cfengine/win_schedule.cf
+@sample ${CFENGINE_BASE}/
+@sample ${CFENGINE_BASE}/masterfiles/
+@exec if [ ! -f ${CFENGINE_BASE}/ppkeys/localhost.priv ]; then %D/sbin/cf-key 
>/dev/null; fi
+@rcscript ${RCDIR}/cf_execd
+@rcscript ${RCDIR}/cf_monitord
+@rcscript ${RCDIR}/cf_serverd
+@rcscript ${RCDIR}/cfengine
+@cwd ${CFENGINE_BASE}
+bin/
+bin/cf-agent
+bin/cf-execd
+bin/cf-key
+bin/cf-monitord
+bin/cf-promises
+bin/cf-report
+bin/cf-runagent
+bin/cf-serverd
+inputs
Index: pkg/README
===================================================================
RCS file: pkg/README
diff -N pkg/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/README  23 Mar 2013 15:39:39 -0000
@@ -0,0 +1,61 @@
+$OpenBSD$
+
++-----------------------------------------------------------------------
+| Running ${FULLPKGNAME} on OpenBSD
++-----------------------------------------------------------------------
+
+Getting started
+===============
+During installation, a cfengine key was generated in ${CFENGINE_BASE}/ppkeys
+and sample configuration files placed in ${SYSCONFDIR}/cfengine.
+
+Configuring client machines
+---------------------------
+Client machines contact a policy hub to fetch up-to-date policies.
+This is done by the cf-agent(8) program, which can be run manually
+(especially while you are setting things up), but is usually started
+periodically by cf-execd(8).
+
+Clients also usually run cf-monitord(8) to collect statistics.
+
+Configuration files for these programs are in ${SYSCONFDIR}/cfengine/controls/:
+cf_agent.cf, cf_monitord.cf and cf_execd.cf.
+
+To start these programs automatically at boot, you can add the following
+line to /etc/rc.conf.local:
+
+pkg_scripts="${pkg_scripts} cfengine"
+
+Configuring policy hubs (cfengine "servers")
+--------------------------------------------
+Policy hubs also need to run cf-serverd(8). Again an rc.d(8) script
+is provided which can be added to /etc/rc.conf.local:
+
+pkg_scripts="${pkg_scripts} cf_serverd"
+
+For more information, see the quickstart guide for an introduction, and
+reference manual for more details:
+
+       https://cfengine.com/manuals/cf3-quickstart
+       https://cfengine.com/manuals/cf3-reference
+
+Resource limits
+===============
+cf-report(8) may require more file descriptors than are available by
+default.  If you run into problems, increase limits in your shell (for
+example, in ksh(1) you might use "ulimit -n 256").
+
+For a more permanent change, increase the openfiles limits for your
+user's class in /etc/login.conf; this takes effect at login.
+
+Notable changes from cfengine community packages
+================================================
+The standard packages from cfengine.com have statically-linked programs
+in /var/cfengine, but the OpenBSD packages are dynamically-linked and
+depend on libraries in ${LOCALBASE}. As a result, some of the self-
+repair functionality is not available.
+
+For upstream compatibility, the following symlinks have been installed:
+
+    /var/cfengine/inputs -> ${SYSCONFDIR}/cfengine
+    /var/cfengine/bin -> ${LOCALBASE}/sbin
Index: pkg/cf_execd.rc
===================================================================
RCS file: pkg/cf_execd.rc
diff -N pkg/cf_execd.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/cf_execd.rc     23 Mar 2013 15:39:39 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="/var/cfengine/bin/cf-execd"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1
Index: pkg/cf_monitord.rc
===================================================================
RCS file: pkg/cf_monitord.rc
diff -N pkg/cf_monitord.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/cf_monitord.rc  23 Mar 2013 15:39:39 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="/var/cfengine/bin/cf-monitord"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1
Index: pkg/cf_serverd.rc
===================================================================
RCS file: pkg/cf_serverd.rc
diff -N pkg/cf_serverd.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/cf_serverd.rc   23 Mar 2013 15:39:39 -0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="/var/cfengine/bin/cf-serverd"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1
Index: pkg/cfengine.rc
===================================================================
RCS file: pkg/cfengine.rc
diff -N pkg/cfengine.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/cfengine.rc     23 Mar 2013 15:39:39 -0000
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+# "meta" script running the following rc.d(8) scripts with the given argument
+
+_pkg_scripts="cf_execd cf_monitord"
+
+if [ "$1" = stop ]; then
+        for _i in ${_pkg_scripts}; do _l="${_i} ${_l}"; done
+        _pkg_scripts=${_l% }
+fi
+
+for _i in ${_pkg_scripts}; do ${RCDIR}/${_i} $1; done

Reply via email to