diff options
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/cfengine/ChangeLog | 19 | ||||
-rw-r--r-- | net-misc/cfengine/cfengine-2.2.6.ebuild | 87 | ||||
-rw-r--r-- | net-misc/cfengine/files/cfengine-2.2.6-typo-fix.patch | 12 | ||||
-rwxr-xr-x | net-misc/cfengine/files/cfenvd.rc6 | 17 | ||||
-rwxr-xr-x | net-misc/cfengine/files/cfexecd.rc6 | 17 |
5 files changed, 150 insertions, 2 deletions
diff --git a/net-misc/cfengine/ChangeLog b/net-misc/cfengine/ChangeLog index 86e3b44d180f..32bdfa8fcafb 100644 --- a/net-misc/cfengine/ChangeLog +++ b/net-misc/cfengine/ChangeLog @@ -1,6 +1,21 @@ # ChangeLog for net-misc/cfengine -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/ChangeLog,v 1.80 2007/03/21 21:05:41 marineam Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/ChangeLog,v 1.81 2008/04/28 19:27:29 ramereth Exp $ + +*cfengine-2.2.6 (28 Apr 2008) + + 28 Apr 2008; Lance Albertson <ramereth@gentoo.org> + +files/cfengine-2.2.6-typo-fix.patch, +files/cfenvd.rc6, + +files/cfexecd.rc6, +cfengine-2.2.6.ebuild: + * Bump package to 2.2.6 + - Update DESCRIPTION,HOMEPAGE,SRC_URI fields + - Add portage-utils depend + - Add typo patch for this specific version + - Fix man pages that use /usr/local + - Add init scripts for cfenvd & cfexecd + - Fix documentation + - Remove references to cfportage since upstream now has it builtin + - Update postinst section *cfengine-2.1.22-r1 (21 Mar 2007) diff --git a/net-misc/cfengine/cfengine-2.2.6.ebuild b/net-misc/cfengine/cfengine-2.2.6.ebuild new file mode 100644 index 000000000000..f8edd5f9f95f --- /dev/null +++ b/net-misc/cfengine/cfengine-2.2.6.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/cfengine-2.2.6.ebuild,v 1.1 2008/04/28 19:27:29 ramereth Exp $ + +inherit eutils + +DESCRIPTION="An automated suite of programs for configuring and maintaining +Unix-like computers" +HOMEPAGE="http://www.cfengine.org/" +SRC_URI="http://www.cfengine.org/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86" +IUSE="" + +DEPEND=">=sys-libs/db-4 + >=dev-libs/openssl-0.9.7 + app-portage/portage-utils" + +src_unpack() { + unpack ${A} + epatch "${FILESDIR}/${P}"-typo-fix.patch +} + +src_compile() { + # Enforce /var/cfengine for historical compatibility + econf \ + --with-workdir=/var/cfengine \ + --with-berkeleydb=/usr || die + + # Fix Makefile to skip doc,inputs, & contrib install to wrong locations + sed -i -e 's/\(DIST_SUBDIRS.*\) contrib inputs doc/\1/' Makefile + sed -i -e 's/\(SUBDIRS.*\) contrib inputs/\1/' Makefile + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile + + # Fix man pages + sed -i -e 's/\/usr\/local/\/usr/' doc/*.8 + + emake || die +} + +src_install() { + newinitd "${FILESDIR}"/cfservd.rc6 cfservd + newinitd "${FILESDIR}"/cfenvd.rc6 cfenvd + newinitd "${FILESDIR}"/cfexecd.rc6 cfexecd + + make DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog README TODO INSTALL + + # Manually install doc and inputs + doman doc/*.8 + docinto examples + dodoc inputs/*.example + + # Create cfengine working directory + mkdir -p "${D}"/var/cfengine + fperms 700 /var/cfengine + keepdir /var/cfengine/bin + keepdir /var/cfengine/inputs + dodir /var/cfengine/modules +} + +pkg_postinst() { + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ] + then + einfo "Generating keys for localhost." + /usr/sbin/cfkey + fi + + # Copy cfagent into the cfengine tree otherwise cfexecd won't + # find it. Most hosts cache their copy of the cfengine + # binaries here. This is the default search location for the + # binaries. + + cp /usr/sbin/cf{agent,servd,execd} /var/cfengine/bin/ + + einfo + einfo "NOTE: The cfportage module has been deprecated in favor of the" + einfo " upstream 'packages' action." + einfo + einfo "Init scripts for cfservd, cfenvd, and cfexecd are now provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cfexecd -F" + einfo +} diff --git a/net-misc/cfengine/files/cfengine-2.2.6-typo-fix.patch b/net-misc/cfengine/files/cfengine-2.2.6-typo-fix.patch new file mode 100644 index 000000000000..db53583f6fe9 --- /dev/null +++ b/net-misc/cfengine/files/cfengine-2.2.6-typo-fix.patch @@ -0,0 +1,12 @@ +diff -ur cfengine-2.2.6-orig/src/cfenvd.c cfengine-2.2.6/src/cfenvd.c +--- cfengine-2.2.6-orig/src/cfenvd.c 2008-04-21 23:26:19.000000000 -0700 ++++ cfengine-2.2.6/src/cfenvd.c 2008-04-28 12:08:46.000000000 -0700 +@@ -36,7 +36,7 @@ + #include "cf.defs.h" + #include "cf.extern.h" + #ifdef HAVE_SYS_LOADAVG_H +-v# include <sys/loadavg.h> ++# include <sys/loadavg.h> + #else + # define LOADAVG_5MIN 1 + #endif diff --git a/net-misc/cfengine/files/cfenvd.rc6 b/net-misc/cfengine/files/cfenvd.rc6 new file mode 100755 index 000000000000..5c76bd88dbf2 --- /dev/null +++ b/net-misc/cfengine/files/cfenvd.rc6 @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting cfenvd" + start-stop-daemon --start --quiet --exec /usr/sbin/cfenvd + eend $? +} + +stop() { + ebegin "Stopping cfenvd" + start-stop-daemon --stop --quiet --exec /usr/sbin/cfenvd + eend $? +} diff --git a/net-misc/cfengine/files/cfexecd.rc6 b/net-misc/cfengine/files/cfexecd.rc6 new file mode 100755 index 000000000000..43cc144fff41 --- /dev/null +++ b/net-misc/cfengine/files/cfexecd.rc6 @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting cfexecd" + start-stop-daemon --start --quiet --exec /usr/sbin/cfexecd + eend $? +} + +stop() { + ebegin "Stopping cfexecd" + start-stop-daemon --stop --quiet --exec /usr/sbin/cfexecd + eend $? +} |