debian/0000755000000000000000000000000012235033275007170 5ustar debian/README.Debian0000644000000000000000000000234411731707536011244 0ustar There are some tweaks which were applied to the standard cfengine3 installation and you should be aware of them: *) cfengine3 is FHS, that means that, unlike the original, we log in /var/log, the binaries are located in /usr/sbin; for upstream compatibility we have the following symlinks: /etc/cfengine3 -> /var/lib/cfengine3/inputs /usr/sbin -> /var/lib/cfengine3/bin§ *) to enable the daemons you need to modify /etc/default/cfengine3 and set the proper variables; the daemons won't be started unless there is an /etc/cfengine3/promises.cf file present; if you want to test that everything is working you can do: cp /usr/share/doc/cfengine3/examples/example_config/* /etc/cfengine3/ At this point you MUST adapt /etc/cfengine3/site.cf to your needs, you may want to remove the blank auth for the user 'mark' (the author of cfengine), and anything that update your config files When everything is ready you can start the daemons: /etc/init.d/cfengine3 start *) By default we are not starting any daemon, in most of your installations you will only need the cfagent with a proper configuration file *) For more info you should have a look at the reference manual and the relevant docs: http://www.cfengine.org/manuals/cf3-reference.html debian/dirs0000644000000000000000000000002711731150471010051 0ustar usr/sbin etc/cfengine3 debian/source/0000755000000000000000000000000011731150471010466 5ustar debian/source/format0000644000000000000000000000001411731150471011674 0ustar 3.0 (quilt) debian/source/include-binaries0000644000000000000000000000003611731150471013625 0ustar docs/ContributorStatement.pdf debian/copyright0000644000000000000000000002362012114607605011126 0ustar Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 Upstream-Maintainer: Mark Burgess Upstream-Source: http://www.cfengine.org/download.php Upstream-Name: cfengine Files: * Copyright: 2008, Cfengine AS License: GPL-3 Files: src/sort.c Copyright: 2001, Simon Tatham License: BSD Files: pub/getopt* Copyright: 1987-1994, Free Software Foundation, Inc. License LGPL-2+ Files: pub/strndup.c Copyright: 1988-1993, The Regents of the University of California License: BSD Files: pub/snprintf.[ch] Copyright: 1999, Mark Martinec License: Frontier Artistic License Files: pub/getloadavg.c Copyright: 1985-1997, Free Software Foundation, Inc. License: GPL-2+ Files: pub/{regex.c,gnuregex.h} Copyright: 1993, Free Software Foundation, Inc. License: GPL-2+ Files: debian/* Copyright: 2009, Antonio Radici License: GPL-3 License: GPL-2+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of version 2 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2' License: GPL-3 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. On Debian GNU/Linux systems, the complete text of version 3 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-3' In addition, as a special exception, the author of this program gives permission to link the code of its release with the OpenSSL project's "OpenSSL" library (or with modified versions of it that use the same license as the "OpenSSL" library), and distribute the linked executables. You must obey the GNU General Public License in all respects for all of the code used other than "OpenSSL". If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. License: LGPL-2+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of the LGPL-2 can be found at /usr/share/common-licenses/LGPL-2 on any Debian system. License: Frontier Artistic License THE FRONTIER ARTISTIC LICENSE Version 1.0 Copyright © (c) 1999 by Samuel Reynolds. Derived from the "Artistic License" at "OpenSource.org". Submitted to OpenSource.org for Open Source Initiative certification. PREAMBLE The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. DEFINITIONS o "Package" refers to the script, suite, file, or collection of scripts, suites, and/or files distributed by the Copyright Holder, and to derivatives of that Package created through textual modification. o "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. o "Copyright Holder" is whoever is named in the copyright statement or statements for the package. o "You" is you, if you're thinking about copying or distributing this Package. o "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) o "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. TERMS 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes, and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed script, suite, or file stating how and when you changed that script, suite, or file, and provided that you do at least ONE of the following: a) Use the modified Package only within your corporation or organization, or retain the modified Package solely for personal use. b) Place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. c) Rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page (or equivalent) for each non-standard executable that clearly documents how it differs from the Standard Version. d) Make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) Distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) Accompany the distribution with the machine-readable source of the Package with your modifications. c) Accompany any non-standard executables with their corresponding Standard Version executables, give the non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) Make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. Scripts, suites, or programs supplied by you that depend on or otherwise make use of this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/postrm0000644000000000000000000000042711731150471010440 0ustar #! /bin/sh set -e VDIR=/var/lib/cfengine3 if [ "$1" = "purge" ]; then if [ -d "$VDIR" ]; then cd "$VDIR" find . -mindepth 1 -maxdepth 1 \ -name inputs -prune -o -print0 | xargs -0r rm -rf cd /; rmdir "$VDIR" fi rm -f /etc/default/cfengine3 fi #DEBHELPER# debian/cfengine3.doc-base0000644000000000000000000000045211731350600012423 0ustar Document: cfengine3 Title: cfengine3 manual Author: Mark Burgess Abstract: The documentation for cfengine3, a tool for configuring and maintaining network machines Section: System/Administration Format: HTML Index: /usr/share/doc/cfengine3/html/agents.html Files: /usr/share/doc/cfengine3/html/* debian/changelog0000644000000000000000000001432612235033275011050 0ustar cfengine3 (3.2.4-2+nmu1build1) trusty; urgency=low * No change rebuild against db 5.3. -- Dmitrijs Ledkovs Fri, 01 Nov 2013 23:18:21 +0000 cfengine3 (3.2.4-2+nmu1) unstable; urgency=medium * Non-maintainer upload. * Include full text of the Frontier Artistic License (closes: #701864). -- Michael Gilbert Sun, 03 Mar 2013 08:53:27 +0000 cfengine3 (3.2.4-2) unstable; urgency=low * debian/{README.Debian,links}: + restoring /var/lib/cfengine3/inputs as a link to /etc/cfengine3 (Closes: 664636). -- Antonio Radici Mon, 19 Mar 2012 19:56:35 +0000 cfengine3 (3.2.4-1) unstable; urgency=low * New upstream release * debian/watch: + refreshed to use the new upstream URLs * debian/control: + Standards-Version updated to 3.9.3, no change required * debian/patches: + refreshed all patches, removed fix-error-typos + added 626647-kfreebsd-support.patch to add kfreebsd support (Closes: 626647) * debian/cfengine3.install: + installing the distributed share/doc directory, exmaples included. * debian/README.Debian: + updated to reflect that inputs/ are now in examples_config/ * debian/links: + dropped the /var/lib/cfengine3/inputs link because it does not exist anymore upstream * debian/cfengine3.doc-base: dropping cf3.html which was removed by upstream and replacing it with agents.html (this is debatable but from the next version we will get a better HTML doc). -- Antonio Radici Sat, 17 Mar 2012 18:12:34 +0000 cfengine3 (3.1.5-1) unstable; urgency=low * New upstream release * debian/patches: refreshed * debian/control: Standards-Version bumped to 3.9.2, no changes required * rewrites to use dh: + debian/rules: simplified and all rm's removed + debian/cfengine3.install: selectively install what we need + debian/control: added a versioned debhelper -- Antonio Radici Fri, 06 May 2011 22:23:11 +0000 cfengine3 (3.1.5~b1-1) unstable; urgency=low * New upstream release * debian/patches: + fhs-compliance: patch from Andreas Larsson to include a missing line to be fully compliant with FHS (Closes: 619580) + remove-man-errors: s/sucessfully/successfully/g * debian/watch: removed the repack for copyright issues, the pdf is not shipped anymore by upstream * debian/copyright: + removing any reference to repack.sh and its licenses + copyright updates suggested by Mikhail Gusarov (Closes: 620961) * debian/rules: + reformatted configure opts and added htmldir to include the html docs in the package (Closes: 609367) + disabled nova and constellation, not included in the free version + added dh_autoreconf and dh_autoreconf_clean * debian/cfengine3.doc-base: added a doc-base for the HTML doc distributed * debian/control: + added dh-autoreconf to Build-Depends * debian/source/local-options: unapply all patches after the build -- Antonio Radici Mon, 11 Apr 2011 17:45:21 +0100 cfengine3 (3.1.4+dsfg-1) unstable; urgency=low * New upstream release (Closes: 610962) * debian/patches: + all patches refreshed -- Antonio Radici Mon, 07 Mar 2011 00:36:34 +0000 cfengine3 (3.1.2+dfsg-1) experimental; urgency=low * New upstream release (Closes: 585619, 605534) * debian/cfengine3.init: quote the unquoted variables (Closes: 605044) * debian/postrm: clean up files during purge (Closes: 606359) * debian/patches: all refreshed/re-adapted * debian/rules: added --enable-shared=no, otherwise libpromises.so.1 will be shipped * debian/cfengine3.default: variable names now compatible with cfengine3.init (Closes: 602404) -- Antonio Radici Mon, 03 Jan 2011 21:08:59 +0000 cfengine3 (3.1.0~b2+dfsg-1) experimental; urgency=low * New upstream release (Closes: 598541) * debian/control: + Standards-Version bumped to 3.9.1 * debian/patches: + all patches refreshed + fix-error-typos removed, integrated upstream + fhs-compliance to create the workdir (Closes: 597552) * debian/source/include-binaries: + docs/ContributorStatement.pdf added -- Antonio Radici Sun, 17 Oct 2010 21:55:10 +0100 cfengine3 (3.0.5+dfsg-1) unstable; urgency=low * New upstream release * debian/watch: modified again to catch the newest versions * debian/patches: + all patches: refreshed + cf-monitor-pid: removed, it is upstream -- Antonio Radici Wed, 09 Jun 2010 23:14:56 +0100 cfengine3 (3.0.4+dfsg-1) unstable; urgency=low * debian/watch: modified to catch the newest versions * debian/control: + removed DMUA + bumped Standards-Version to 3.8.4 (no changed needed) * debian/patches: + all patches refreshed + rename-doesnt-fail: removed, it is incorporated upstream + added some more typos to patches/fix-error-typos * Switch to dpkg-source 3.0 (quilt) format + debian/control: removed quilt from B-D + debian/rules: removed patch/unpatch and quilt include + debian/README.source removed * debian/cfengin3.lintian-overrides: + overridden a spelling error (it is not) -- Antonio Radici Fri, 30 Apr 2010 08:11:20 +0100 cfengine3 (3.0.2+dfsg-2) unstable; urgency=low * debian/control: + adding missing full stops (Closes: 550108) + updating my mail to antonio@debian.org + adding a B-D to libpcre3-dev (Closes: 552520) + cfengine2 no longer in Conflicts (Closes: 555479) * debian/rules: do not compress .cf files * debian/patches: + fix-example-paths added, to adapt examples to our FHS compliant paths (Closes: 552144) + remove-man-errors: fix for some minor typos (Closes: 552473) + rename-doesnt-fail: prevent failures if rename fails (Closes: 555932) + fix-error-typos: to fix a small typo in cf-agent, so lintian is happy * debian/README.Debian: + warn people to modify site.cf before starting the daemons -- Antonio Radici Tue, 08 Dec 2009 16:19:24 +0000 cfengine3 (3.0.2+dfsg-1) unstable; urgency=low * Initial release (Closes: #518059) -- Antonio Radici Wed, 23 Sep 2009 20:52:47 +0100 debian/postinst0000644000000000000000000000212611731150471010775 0ustar #!/bin/sh # postinst script for cfengine # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package INPUTS=/var/lib/cfengine3/inputs make_key () { if [ ! -f /var/lib/cfengine3/ppkeys/localhost.priv ]; then cf-key fi } case "$1" in configure) make_key ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/control0000644000000000000000000000267712235033275010607 0ustar Source: cfengine3 Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Antonio Radici Build-Depends: debhelper (>= 7.0.50), autotools-dev, libdb-dev, libssl-dev, flex, bison, libpcre3-dev, dh-autoreconf Standards-Version: 3.9.3 Homepage: http://www.cfengine.org/ Vcs-Browser: http://git.debian.org/?p=collab-maint/cfengine3.git Vcs-Git: git://git.debian.org/git/collab-maint/cfengine3.git Package: cfengine3 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: tool for configuring and maintaining network machines Cfengine is a suite of programs for integrated autonomic management of either individual or networked computers. . Cfengine 3 is both a more powerful and much simplified version of cfengine, which has been designed to inter operate with cfengine 2 rather than be backwards compatible with it. . With cfengine 3 you can install, configure and maintain computers using powerful hands-free tools. Package: cfengine3-dbg Architecture: any Section: debug Priority: extra Depends: cfengine3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: debugging symbols for cfengine3 The main purpose of cfengine is to allow the system administrator to create a single central file which will define how every host on a network should be configured. . This package contains the debugging symbols for cfengine3. debian/info0000644000000000000000000000011411731150471010040 0ustar docs/cf3-reference.info-2 docs/cf3-reference.info docs/cf3-reference.info-1 debian/cfengine3.install0000644000000000000000000000044011731346507012424 0ustar debian/tmp/usr/sbin/* usr/sbin/ debian/tmp/usr/share/man/* usr/share/man/ debian/tmp/usr/share/doc/cfengine/* usr/share/doc/cfengine3/ docs/*.html usr/share/doc/cfengine3/html docs/*.png usr/share/doc/cfengine3/html debian/rules0000755000000000000000000000132111731347451010251 0ustar #!/usr/bin/make -f # vim:noet:ts=4:sw=4: %: dh $@ override_dh_auto_configure: dh_autoreconf ./configure --enable-shared=no \ --without-nova \ --without-constellation \ --prefix=/usr \ --with-sql=no \ --with-workdir=/var/lib/cfengine3 \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --htmldir=\$${prefix}/share/doc/cfengine3/html \ CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" override_dh_clean: dh_autoreconf_clean dh_clean override_dh_compress: dh_compress -X.cf override_dh_installinfo: override_dh_strip: dh_strip --dbg-package=cfengine3-dbg override_dh_installchangelogs: rm debian/cfengine3/usr/share/doc/cfengine3/ChangeLog dh_installchangelogs debian/watch0000644000000000000000000000074211731150471010222 0ustar # Compulsory line, this is a version 3 file version=3 # usually the cfengine maintainer releases versions like x.x.xb7 or x.x.xa4 # *before* the official version, which does not contain any letter, so we need # to adapt our version otherwise uscan will believe, for example, that 3.0.2 is # older than 3.0.2b3 opts="uversionmangle=s{([a-z]\d)}{~$1}i,filenamemangle=s{/tarballs/download.php\?file=}{}" \ http://www.cfengine.org/pages/source_code /tarballs/.+?cfengine-(.*)\.tar\.gz debian/cfengine3.lintian-overrides0000644000000000000000000000026511731150471014412 0ustar # not a spelling error, the correct phrase is "offering these package-promise # suggestions to ..." cfengine3: spelling-error-in-binary usr/sbin/cf-agent these package this package debian/clean0000644000000000000000000000026711731150471010200 0ustar # cruft removal from the upstream tarball tests/units/*~ config.log tests/file_operands/Makefile tests/units/Makefile # doc removal (they are autogenerated) docs/*.8 docs/texinfo.tex debian/patches/0000755000000000000000000000000011731351034010613 5ustar debian/patches/626647-kfreebsd-support.patch0000644000000000000000000000104211731340320015700 0ustar Simple patch to add kfreebsd support, created by Cristoph Egger (cristoph@debian.org). Index: cfengine3/configure.ac =================================================================== --- cfengine3.orig/configure.ac 2012-03-18 10:54:53.000000000 +0000 +++ cfengine3/configure.ac 2012-03-18 10:54:58.000000000 +0000 @@ -734,7 +734,7 @@ AC_DEFINE(IRIX) CFLAGS="$CFLAGS -w" ;; - linux*) + linux*|*bsd*gnu) AC_DEFINE(LINUX, [], [Linux build]) AC_CHECK_LIB(nss_nis, yp_get_default_domain) AC_CHECK_LIB(acl,main) debian/patches/fix-examples-paths.patch0000644000000000000000000000326411731154302015357 0ustar The purpose of this patch is to fix all the pats according to what was modified by the fhs-compliance patch; see #552144 for more details I'm also removing the auto-update of the binaries because the debian package is supposed to update the binaries, rather than cf-execd itself Index: cfengine3/examples/example_config/update.cf =================================================================== --- cfengine3.orig/examples/example_config/update.cf 2012-03-17 18:30:58.000000000 +0000 +++ cfengine3/examples/example_config/update.cf 2012-03-17 18:31:58.000000000 +0000 @@ -26,24 +26,16 @@ { vars: - "master_location" string => "/var/cfengine/masterfiles"; + "master_location" string => "/var/lib/cfengine3/masterfiles"; files: - "/var/cfengine/inputs" + "/var/lib/cfengine3/inputs" perms => u_p("600"), copy_from => mycopy("$(master_location)","localhost"), depth_search => urecurse("inf"), action => uimmediate; - - "/var/cfengine/bin" - - perms => u_p("700"), - copy_from => mycopy("/usr/local/sbin","localhost"), - file_select => cf3_files, - depth_search => urecurse("inf"), - action => uimmediate; } ############################################ Index: cfengine3/examples/example_config/site.cf =================================================================== --- cfengine3.orig/examples/example_config/site.cf 2012-03-17 18:32:19.000000000 +0000 +++ cfengine3/examples/example_config/site.cf 2012-03-17 18:32:31.000000000 +0000 @@ -306,7 +306,7 @@ exec_fix:: - "0,5,10,15,20,25,30,35,40,45,50,55 * * * * /var/cfengine/bin/cf-execd -F"; + "0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/sbin/cf-execd -F"; replace_patterns: debian/patches/fhs-compliance.patch0000644000000000000000000000671711731153226014542 0ustar A patch to implement various things to be FHS (and Debian policy) compliant: PID files will go to /var/run; the configuration files will go to /etc/cfengine3 (same as we did with cfengine2); logs to /var/log That symlink is created by debian/links but we need to remove the actual creation of the inputs dir any cf-* binary will fail Index: cfengine3/src/generic_agent.c =================================================================== --- cfengine3.orig/src/generic_agent.c 2012-03-17 18:20:33.000000000 +0000 +++ cfengine3/src/generic_agent.c 2012-03-17 18:23:07.000000000 +0000 @@ -502,7 +502,6 @@ CfOut(cf_verbose,"","Work directory is %s\n",CFWORKDIR); snprintf(HASHDB,CF_BUFSIZE-1,"%s%c%s",CFWORKDIR,FILE_SEPARATOR,CF_CHKDB); - snprintf(vbuff,CF_BUFSIZE,"%s%cinputs%cupdate.conf",CFWORKDIR,FILE_SEPARATOR,FILE_SEPARATOR); MakeParentDirectory(vbuff,force); snprintf(vbuff,CF_BUFSIZE,"%s%cbin%ccf-agent -D from_cfexecd",CFWORKDIR,FILE_SEPARATOR,FILE_SEPARATOR); @@ -1255,7 +1254,7 @@ } else { - snprintf(LOGFILE,CF_BUFSIZE,"%s%ccfagent.%s.log",CFWORKDIR,FILE_SEPARATOR,VSYSNAME.nodename); + snprintf(LOGFILE,CF_BUFSIZE,"/var/log/cfagent.%s.log",VSYSNAME.nodename); } @@ -1898,7 +1897,7 @@ { FILE *fp; -snprintf(PIDFILE,CF_BUFSIZE-1,"%s%c%s",CFWORKDIR,FILE_SEPARATOR,filename); +snprintf(PIDFILE,CF_BUFSIZE-1,"/var/run/%s",filename); if ((fp = fopen(PIDFILE,"w")) == NULL) { Index: cfengine3/src/agent.c =================================================================== --- cfengine3.orig/src/agent.c 2012-03-17 18:00:21.000000000 +0000 +++ cfengine3/src/agent.c 2012-03-17 18:21:39.000000000 +0000 @@ -347,7 +347,7 @@ status which we need for setting returns */ -snprintf(filename,CF_BUFSIZE,"%s/cfagent.%s.log",CFWORKDIR,VSYSNAME.nodename); +snprintf(filename,CF_BUFSIZE,"/var/log/cfagent.%s.log",VSYSNAME.nodename); MapName(filename); if ((fp = fopen(filename,"a")) != NULL) Index: cfengine3/src/files_interfaces.c =================================================================== --- cfengine3.orig/src/files_interfaces.c 2012-03-17 18:00:21.000000000 +0000 +++ cfengine3/src/files_interfaces.c 2012-03-17 18:21:39.000000000 +0000 @@ -1322,7 +1322,7 @@ b.edits.backup = cfa_nobackup; b.edits.maxfilesize = 1000000; -snprintf(filename,CF_BUFSIZE,"%s/cfagent.%s.log",CFWORKDIR,VSYSNAME.nodename); +snprintf(filename,CF_BUFSIZE,"/var/log/cfagent.%s.log",VSYSNAME.nodename); MapName(filename); if (!LoadFileAsItemList(&VSETUIDLIST,filename,b,pp)) @@ -1342,7 +1342,7 @@ b.edits.backup = cfa_nobackup; b.edits.maxfilesize = 1000000; -snprintf(filename,CF_BUFSIZE,"%s/cfagent.%s.log",CFWORKDIR,VSYSNAME.nodename); +snprintf(filename,CF_BUFSIZE,"/var/log/cfagent.%s.log",VSYSNAME.nodename); MapName(filename); PurgeItemList(&VSETUIDLIST,"SETUID/SETGID"); Index: cfengine3/src/transaction.c =================================================================== --- cfengine3.orig/src/transaction.c 2012-03-17 18:00:21.000000000 +0000 +++ cfengine3/src/transaction.c 2012-03-17 18:21:39.000000000 +0000 @@ -174,7 +174,7 @@ sum = (CF_MACROALPHABET * sum + cc_operand[i]) % CF_HASHTABLESIZE; } -snprintf(cflog,CF_BUFSIZE,"%s/cf3.%.40s.runlog",CFWORKDIR,host); +snprintf(cflog,CF_BUFSIZE,"/var/log/cf3.%.40s.runlog",host); snprintf(cflock,CF_BUFSIZE,"lock.%.100s.%s.%.100s_%d_%s",pp->bundle,cc_operator,cc_operand,sum,str_digest); snprintf(cflast,CF_BUFSIZE,"last.%.100s.%s.%.100s_%d_%s",pp->bundle,cc_operator,cc_operand,sum,str_digest); debian/patches/remove-man-errors.patch0000644000000000000000000000700011731345363015221 0ustar the docs are autogenerated by -M, it all boils down to this source file; I'm removing all the man errors from here Index: cfengine3/src/generic_agent.c =================================================================== --- cfengine3.orig/src/generic_agent.c 2012-03-18 11:45:42.000000000 +0000 +++ cfengine3/src/generic_agent.c 2012-03-18 11:45:43.000000000 +0000 @@ -1758,7 +1758,7 @@ { if (options[i].has_arg) { - printf("--%-12s, -%c value - %s\n",options[i].name,(char)options[i].val,hints[i]); + printf("--%-12s, -%c - %s\n",options[i].name,(char)options[i].val,hints[i]); } else { @@ -1785,12 +1785,12 @@ printf(".SH SYNOPSIS:\n\n %s [options]\n\n.SH DESCRIPTION:\n\n%s\n",GetArg0(component),id); printf(".B cfengine\n" - "is a self-healing configuration and change management based system. You can think of" + "is a self-healing configuration and change management based system. You can think of \n" ".B cfengine\n" "as a very high level language, much higher level than Perl or shell. A" "single statement is called a promise, and compliance can result in many hundreds of files" "being created, or the permissions of many hundreds of" - "files being set. The idea of " + "files being set. The idea of \n" ".B cfengine\n" "is to create a one or more sets of configuration files which will" "classify and describe the setup of every host in a network.\n"); @@ -1801,7 +1801,7 @@ { if (options[i].has_arg) { - printf(".IP \"--%s, -%c\" value\n%s\n",options[i].name,(char)options[i].val,hints[i]); + printf(".IP \"--%s, -%c\"\n%s\n",options[i].name,(char)options[i].val,hints[i]); } else { @@ -1814,10 +1814,10 @@ ".SH INFORMATION\n"); printf("\nBug reports: http://bug.cfengine.com, "); -printf(".pp\nCommunity help: http://forum.cfengine.com\n"); -printf(".pp\nCommunity info: http://www.cfengine.com/pages/community\n"); -printf(".pp\nSupport services: http://www.cfengine.com\n"); -printf(".pp\nThis software is Copyright (C) 2008-%d CFEngine AS.\n", BUILD_YEAR); +printf(".PP\nCommunity help: http://forum.cfengine.com\n"); +printf(".PP\nCommunity info: http://www.cfengine.com/pages/community\n"); +printf(".PP\nSupport services: http://www.cfengine.com\n"); +printf(".PP\nThis software is Copyright (C) 2008-%d CFEngine AS.\n", BUILD_YEAR); } /*******************************************************************/ Index: cfengine3/src/evalfunction.c =================================================================== --- cfengine3.orig/src/evalfunction.c 2012-03-18 11:45:42.000000000 +0000 +++ cfengine3/src/evalfunction.c 2012-03-18 11:45:43.000000000 +0000 @@ -225,7 +225,7 @@ return rval; } - Debug("Database opened succesfully.\n"); + Debug("Database opened successfully.\n"); /* Acquire a cursor for the database. */ Index: cfengine3/src/runagent.c =================================================================== --- cfengine3.orig/src/runagent.c 2012-03-18 11:45:47.000000000 +0000 +++ cfengine3/src/runagent.c 2012-03-18 11:45:53.000000000 +0000 @@ -547,7 +547,7 @@ */ if (BACKGROUND || INTERACTIVE) { - CfOut(cf_error, "", "Warning: 'background_children' setting from 'body runagent control' is overriden by command-line option."); + CfOut(cf_error, "", "Warning: 'background_children' setting from 'body runagent control' is overridden by command-line option."); } else { debian/patches/series0000644000000000000000000000014411731351034012027 0ustar remove-man-errors.patch fhs-compliance.patch fix-examples-paths.patch 626647-kfreebsd-support.patch debian/compat0000644000000000000000000000000211731150471010364 0ustar 7 debian/cfengine3.init0000755000000000000000000001453411731150471011726 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: cfengine3 # Required-Start: $remote_fs $network $syslog # Required-Stop: $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: initscript for cfengine3 # Description: starts all the daemon needed by cfengine3 if they are # enabled on /etc/default/cfengine3 ### END INIT INFO # Author: Antonio Radici # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="datacenter management platform" NAME=cfengine3 PIDROOT=/var/run SCRIPTNAME=/etc/init.d/$NAME CFEXECD_DAEMON=/usr/sbin/cf-execd CFSERVERD_DAEMON=/usr/sbin/cf-serverd CFMONITORD_DAEMON=/usr/sbin/cf-monitord #DAEMON_ARGS="--options args" #PIDFILE=/var/run/$NAME.pid # Exit if the package is not installed [ -x "$CFEXECD_DAEMON" ] || exit 0 [ -x "$CFSERVERD_DAEMON" ] || exit 0 [ -x "$CFMONITORD_DAEMON" ] || exit 0 # defaults RUN_CFMONITORD=1 RUN_CFEXECD=1 RUN_CFSERVERD=1 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { DAEMON=$1 DAEMON_NAME=`basename $DAEMON` PIDFILE="$PIDROOT/$DAEMON_NAME.pid" # get the args [ $DAEMON_NAME = "cf-monitord" ] && DAEMON_ARGS="$CFMONITORD_ARGS" [ $DAEMON_NAME = "cf-serverd" ] && DAEMON_ARGS="$CFSERVERD_ARGS" [ $DAEMON_NAME = "cf-execd" ] && DAEMON_ARGS="$CFEXECD_ARGS" # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS \ || return 2 } # # Function that stops the daemon/service # do_stop() { DAEMON=$1 DAEMON_NAME=`basename $DAEMON` PIDFILE="$PIDROOT/$DAEMON_NAME.pid" # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $DAEMON_NAME RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks # and if the daemon is only ever run from this initscript. # If the above conditions are not satisfied then add some other code # that waits for the process to drop all resources that could be # needed by services started subsequently. A last resort is to # sleep for some time. start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { DAEMON=$1 DAEMON_NAME=`basename $DAEMON` PIDFILE="$PIDROOT/$DAEMON_NAME.pid" # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $DAEMON_NAME return 0 } # Function to start the cfengine daemons start_cfengine() { RETVAL=0 if [ "$RUN_CFMONITORD" = "1" ]; then do_start $CFMONITORD_DAEMON [ $? = "0" ] || RETVAL=$? fi if [ "$RUN_CFSERVERD" = "1" ]; then do_start $CFSERVERD_DAEMON [ $? = "0" ] || RETVAL=$? fi if [ "$RUN_CFEXECD" = "1" ]; then do_start $CFEXECD_DAEMON [ $? = "0" ] || RETVAL=$? fi return $RETVAL } # Function to stop the cfengine daemons stop_cfengine() { RETVAL=0 if [ "$RUN_CFEXECD" = "1" ]; then do_stop $CFEXECD_DAEMON [ $? = "0" ] || RETVAL=$? fi if [ "$RUN_CFMONITORD" = "1" ]; then do_stop $CFMONITORD_DAEMON [ $? = "0" ] || RETVAL=$? fi if [ "$RUN_CFSERVERD" = "1" ]; then do_stop $CFSERVERD_DAEMON [ $? = "0" ] || RETVAL=$? fi return $RETVAL } # Function to return the status of the cfengine daemons status_cfengine() { RETVAL=0 if [ "$RUN_CFMONITORD" = "1" ]; then status_of_proc "$CFMONITORD_DAEMON" "cf-monitord" [ $? = 0 ] || RETVAL=1 fi if [ "$RUN_CFSERVERD" = "1" ]; then status_of_proc "$CFSERVERD_DAEMON" "cf-serverd" [ $? = 0 ] || RETVAL=1 fi if [ "$RUN_CFEXECD" = "1" ]; then status_of_proc "$CFEXECD_DAEMON" "cf-execd" [ $? = 0 ] || RETVAL=1 fi return $RETVAL } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" start_cfengine case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" stop_cfengine case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; status) status_cfengine exit $? ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" stop_cfengine case "$?" in 0|1) sleep 8; #otherwise the lock db becomes corrupted start_cfengine case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac : debian/links0000644000000000000000000000010611731707473010240 0ustar etc/cfengine3 var/lib/cfengine3/inputs usr/sbin var/lib/cfengine3/bin debian/cfengine3.default0000644000000000000000000000100711731150471012373 0ustar # Defaults for cfengine initscript # sourced by /etc/init.d/cfengine3 # installed at /etc/default/cfengine3 by the maintainer scripts # # This is a POSIX shell fragment # # Set variable to 1 to start the daemon; 0 otherwise. # to start these three daemons you need the /etc/cfengine3/promises.cf # have a look at the examples in /usr/share/doc/cfengine3/examples RUN_CFMONITORD=0 RUN_CFSERVERD=0 RUN_CFEXECD=0 # Additional options that are passed to the daemons CFMONITORD_ARGS="" CFSERVERD_ARGS="" CFEXECD_ARGS=""