diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-11-01 18:47:11 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2011-11-01 18:47:11 +0000 |
commit | 945c0429c76c739b2db4f42d16c3de38c3bd35a4 (patch) | |
tree | 9d2595f2ade1e75f66d7fd7dcde8249b0bd500e2 /net-misc/cfengine | |
parent | Version bump. ebuild based on Victor Tseng <palatis@gmail.com> (diff) | |
download | gentoo-2-945c0429c76c739b2db4f42d16c3de38c3bd35a4.tar.gz gentoo-2-945c0429c76c739b2db4f42d16c3de38c3bd35a4.tar.bz2 gentoo-2-945c0429c76c739b2db4f42d16c3de38c3bd35a4.zip |
Revbump with a fix for some hardened boxes in infra and OSUOSL.
(Portage version: 2.2.0_alpha70/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/cfengine')
-rw-r--r-- | net-misc/cfengine/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/cfengine/cfengine-2.2.10-r4.ebuild | 111 |
2 files changed, 118 insertions, 1 deletions
diff --git a/net-misc/cfengine/ChangeLog b/net-misc/cfengine/ChangeLog index 86f995bfe801..6bd3942e4504 100644 --- a/net-misc/cfengine/ChangeLog +++ b/net-misc/cfengine/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/cfengine # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/ChangeLog,v 1.138 2011/09/20 15:35:34 idl0r Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/ChangeLog,v 1.139 2011/11/01 18:47:11 robbat2 Exp $ + +*cfengine-2.2.10-r4 (01 Nov 2011) + + 01 Nov 2011; Robin H. Johnson <robbat2@gentoo.org> + +cfengine-2.2.10-r4.ebuild: + Revbump with a fix for some hardened boxes in infra and OSUOSL. *cfengine-3.2.1 (20 Sep 2011) diff --git a/net-misc/cfengine/cfengine-2.2.10-r4.ebuild b/net-misc/cfengine/cfengine-2.2.10-r4.ebuild new file mode 100644 index 000000000000..db262cc7b66c --- /dev/null +++ b/net-misc/cfengine/cfengine-2.2.10-r4.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/cfengine/cfengine-2.2.10-r4.ebuild,v 1.1 2011/11/01 18:47:11 robbat2 Exp $ + +EAPI="2" + +inherit eutils + +DESCRIPTION="An automated suite of programs for configuring and maintaining +Unix-like computers" +HOMEPAGE="http://www.cfengine.org/" +SRC_URI="http://cfengine.com/source_code/download?file=${P}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86" +IUSE="vim-syntax" + +DEPEND=">=sys-libs/db-4 + >=dev-libs/openssl-0.9.7 + app-portage/portage-utils" +RDEPEND="${DEPEND}" +PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )" + +src_prepare() { + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520696 + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511666 + # http://bugs.gentoo.org/339808 + epatch "${FILESDIR}/admit-noclass-520696.patch" \ + "${FILESDIR}/511666-segfault.patch" \ + "${FILESDIR}/${P}-snprintf_buffer_overflow.patch" + + # 2048 causes crashes on some 32-bit hardened kernels, and the warning + # messages say to turn it back down. + use x86 && sed -ie "s:CF_IFREQ 2048:CF_IFREQ 1024:g" src/cf.defs.h +} + +src_configure() { + # Enforce /var/cfengine for historical compatibility + econf \ + --with-workdir=/var/cfengine \ + --with-berkeleydb=/usr + + # 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 +} + +src_install() { + newinitd "${FILESDIR}"/cfservd.rc6 cfservd || die + newinitd "${FILESDIR}"/cfenvd.rc6 cfenvd || die + newinitd "${FILESDIR}"/cfexecd.rc6 cfexecd || die + + make DESTDIR="${D}" install || die + + # Remove static library and libtool file as they are not needed + rm "${D}"/usr/$(get_libdir)/*.la + rm "${D}"/usr/$(get_libdir)/*.a + + dodoc AUTHORS ChangeLog README TODO INSTALL + + # Manually install doc and inputs + doman doc/*.8 + docinto examples + doinfo doc/*.info* + 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() { + # 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 -f /usr/sbin/cf{agent,servd,execd} "${ROOT}"/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 + + elog "You MUST generate the keys for cfengine by running:" + elog "emerge --config ${CATEGORY}/${PN}" +} + +pkg_config() { + if [ "${ROOT}" == "/" ]; then + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then + einfo "Generating keys for localhost." + /usr/sbin/cfkey + fi + else + die "cfengine cfkey does not support any value of ROOT other than /." + fi +} |