diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/cfengine | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/cfengine')
20 files changed, 998 insertions, 0 deletions
diff --git a/net-misc/cfengine/Manifest b/net-misc/cfengine/Manifest new file mode 100644 index 000000000000..1f35884a626e --- /dev/null +++ b/net-misc/cfengine/Manifest @@ -0,0 +1,5 @@ +DIST cfengine-2.2.10.tar.gz 2690333 SHA256 f34697cc52e1342c5ec4b45a4adf9fbffdfa05a68bdc7c53382f72d03e106783 SHA512 861af25f32248e115512790357cb4739b16bee9d19db33cc1b93ab2091d020991770970fc916796a5894c978ee6a5956100d2f714efb6e97e9e9a9ea88f64dea WHIRLPOOL 11ab19f4ce898a3409f88b27f429103d624ae4b0412c8129566462ec7182df33d82d6c65154b7cf8dbc60a60f1d5cea6eb8a1f6f9d709e6a0916491a40179b0c +DIST cfengine-3.3.9.tar.gz 1256138 SHA256 54b44dd1c7a77a7ec4e4dea9542ac4d79cb689a7aaefda88ef227e571a462a61 SHA512 9d64667d001daa2db506abf97ecde43e6b6ac672d3ca6dba4c5e68b742b72f2c7cee65c2f5ab82a12cf0f9b385f48fb0d2bb9eae7fe2ff57b187c725238faf1f WHIRLPOOL d57204c63835c75a4bd4b23390a7013149920c856a19fd76f960d72bbc051c3ef2f220361afb225d41e51d5f0eb6cf817d6605d290c7452dcf112e7f54ee0528 +DIST cfengine-3.4.5.tar.gz 4671628 SHA256 542808b9f532e77d66dca19e83bdc1f995d7d0066b940a39bdd5db9a71680011 SHA512 3de95b511c03b4e4f83b13b605d4cc8185419fb7ee6b42e34faf300e5af2a755713b2f8f61305a1cd3dea02f89c09076b164469549cfc96fec09a813c7069f0f WHIRLPOOL 9e7516bfeffc1fae87eeb67f51207f056b0644a6d51e7b1da8d4f1eb27e581781af3f5f56bb98ed405909b2497eea3668df5bb78ece447dac528d7b18fdcd90f +DIST cfengine-3.5.3.tar.gz 1542468 SHA256 0e2d13ba1d75f826bf15411912ce21075734796a35e8fb8ecf545d70d60f41e1 SHA512 20ead13d5290905dc51567887807a0c2c5d9d753cb48ffe2859041b75239698ad0f4bee1ad0eac4eee96122b3a5a475d516566c1571c4fcbc460be757583da18 WHIRLPOOL 2434abd1b6228e87fb848ea013dafca7d1e62dfeaa3ddafd534d663f69eb8b84221f452f8d288571352b641efbde0d1e65f6377d74f7cfa7678267f548036c7b +DIST cfengine-3.6.2.tar.gz 1966966 SHA256 0e0195c1998fc261d4ef2e47e9cc50b273d204bc8b221d469bb83071933c4a09 SHA512 b1bf6010d4309980846524ca94bb39f624f4ed0df3af220df91f7210b4441456840dfeeee4d62d6d6260b417ea7cf959509ca96c1a26c6da67bda7b3c1e5dbbc WHIRLPOOL 989a7853b74848a69d4323f0e10ab05a7522132b6b52362b02d40e95a361ef85b74bef3e3263942376c3f6f4a29c3174967a3ca00fc5acef774537af14ce6352 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..25b79622f293 --- /dev/null +++ b/net-misc/cfengine/cfengine-2.2.10-r4.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils multilib + +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 ppc64 ~s390 sparc x86" +IUSE="vim-syntax" + +RDEPEND=">=sys-libs/db-4 + >=dev-libs/openssl-0.9.7 + app-portage/portage-utils" +DEPEND="${RDEPEND} + virtual/yacc + sys-devel/flex" +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 +} diff --git a/net-misc/cfengine/cfengine-3.3.9.ebuild b/net-misc/cfengine/cfengine-3.3.9.ebuild new file mode 100644 index 000000000000..93aceccd2058 --- /dev/null +++ b/net-misc/cfengine/cfengine-3.3.9.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +MY_PV="${PV//_beta/b}" +MY_PV="${MY_PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +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=${MY_P}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="3" +KEYWORDS="amd64 ~arm ~ppc ~s390 ~sparc x86" + +IUSE="examples html libvirt mysql postgres +qdbm selinux tests tokyocabinet vim-syntax" + +DEPEND=">=sys-libs/db-4 + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + selinux? ( sys-libs/libselinux ) + tokyocabinet? ( dev-db/tokyocabinet ) + qdbm? ( dev-db/qdbm ) + libvirt? ( app-emulation/libvirt ) + >=dev-libs/openssl-0.9.7 + dev-libs/libpcre" +RDEPEND="${DEPEND}" +PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )" + +REQUIRED_USE="qdbm? ( !tokyocabinet ) + tokyocabinet? ( !qdbm ) + !tokyocabinet? ( qdbm ) + !qdbm? ( tokyocabinet )" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + # Enforce /var/cfengine for historical compatibility + econf \ + --enable-fhs \ + --docdir=/usr/share/doc/${PF} \ + --with-workdir=/var/cfengine \ + --with-pcre \ + $(use_with qdbm) \ + $(use_with tokyocabinet) \ + $(use_with postgres postgresql) \ + $(use_with mysql) \ + $(use_with libvirt) \ + $(use_enable selinux) + + # Fix Makefile to skip inputs, see below "examples" + #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die + + # We install the documentation through portage + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die +} + +src_install() { + newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die + newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die + newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die + + emake DESTDIR="${D}" install || die + + # Evil workaround for now.. + mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF} + + dodoc AUTHORS + + if ! use examples; then + rm -rf "${D}"/usr/share/doc/${PF}/example* + fi + + # Create cfengine working directory + dodir /var/cfengine/bin + fperms 700 /var/cfengine + + # 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. + for bin in know promises agent monitord serverd execd runagent key report; do + dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die + done + + if use html; then + docinto html + dohtml -r docs/ || die + fi +} + +pkg_postinst() { + echo + elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0" + echo + einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cf-execd -F" + echo + + elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:" + elog "emerge --config ${CATEGORY}/${PN}" + + # Fix old cf-servd, remove it after some releases. + local found=0 + for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do + found=1 + rm $fname + ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:') + done + + if [ "${found}" -eq 1 ]; then + echo + elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd" + fi +} + +pkg_config() { + if [ "${ROOT}" == "/" ]; then + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then + einfo "Generating keys for localhost." + /usr/sbin/cf-key + fi + else + die "cfengine cfkey does not support any value of ROOT other than /." + fi +} diff --git a/net-misc/cfengine/cfengine-3.4.5.ebuild b/net-misc/cfengine/cfengine-3.4.5.ebuild new file mode 100644 index 000000000000..bf6f1bd184e3 --- /dev/null +++ b/net-misc/cfengine/cfengine-3.4.5.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils autotools + +MY_PV="${PV//_beta/b}" +MY_PV="${MY_PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +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=${MY_P}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="3" +KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86" + +IUSE="acl examples html libvirt mysql postgres +qdbm selinux tests tokyocabinet +vim-syntax xml" + +DEPEND=">=sys-libs/db-4 + acl? ( virtual/acl ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + selinux? ( sys-libs/libselinux ) + tokyocabinet? ( dev-db/tokyocabinet ) + qdbm? ( dev-db/qdbm ) + libvirt? ( app-emulation/libvirt ) + xml? ( dev-libs/libxml2:2 ) \ + dev-libs/openssl + dev-libs/libpcre" +RDEPEND="${DEPEND}" +PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )" + +REQUIRED_USE="qdbm? ( !tokyocabinet ) + tokyocabinet? ( !qdbm ) + !tokyocabinet? ( qdbm ) + !qdbm? ( tokyocabinet )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + + epatch "${FILESDIR}/${P}-acl.patch" + epatch "${FILESDIR}/${P}-ifconfig.patch" + + eautoreconf +} + +src_configure() { + # Enforce /var/cfengine for historical compatibility + econf \ + --enable-fhs \ + --docdir=/usr/share/doc/${PF} \ + --with-workdir=/var/cfengine \ + --with-pcre \ + $(use_with acl libacl) \ + $(use_with qdbm) \ + $(use_with tokyocabinet) \ + $(use_with postgres postgresql) \ + $(use_with mysql) \ + $(use_with libvirt) \ + $(use_enable selinux) + + # Fix Makefile to skip inputs, see below "examples" + #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die + + # We install the documentation through portage + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die +} + +src_install() { + newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die + newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die + newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die + + emake DESTDIR="${D}" install || die + + # Evil workaround for now.. + mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF} + + dodoc AUTHORS + + if ! use examples; then + rm -rf "${D}"/usr/share/doc/${PF}/example* + fi + + # Create cfengine working directory + dodir /var/cfengine/bin + fperms 700 /var/cfengine + + # 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. + for bin in promises agent monitord serverd execd runagent key report; do + dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die + done + + if use html; then + docinto html + dohtml -r docs/ || die + fi +} + +pkg_postinst() { + echo + elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0" + echo + einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cf-execd -F" + echo + + elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:" + elog "emerge --config ${CATEGORY}/${PN}" + + # Fix old cf-servd, remove it after some releases. + local found=0 + for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do + found=1 + rm $fname + ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:') + done + + if [ "${found}" -eq 1 ]; then + echo + elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd" + fi +} + +pkg_config() { + if [ "${ROOT}" == "/" ]; then + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then + einfo "Generating keys for localhost." + /usr/sbin/cf-key + fi + else + die "cfengine cfkey does not support any value of ROOT other than /." + fi +} diff --git a/net-misc/cfengine/cfengine-3.5.3.ebuild b/net-misc/cfengine/cfengine-3.5.3.ebuild new file mode 100644 index 000000000000..022cb98fc804 --- /dev/null +++ b/net-misc/cfengine/cfengine-3.5.3.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils autotools flag-o-matic + +MY_PV="${PV//_beta/b}" +MY_PV="${MY_PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +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=${MY_P}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="3" +KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86" + +IUSE="acl examples libvirt mysql postgres +qdbm selinux tokyocabinet vim-syntax xml" + +DEPEND="acl? ( virtual/acl ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + selinux? ( sys-libs/libselinux ) + tokyocabinet? ( dev-db/tokyocabinet ) + qdbm? ( dev-db/qdbm ) + libvirt? ( app-emulation/libvirt ) + xml? ( dev-libs/libxml2:2 ) \ + dev-libs/openssl + dev-libs/libpcre" +RDEPEND="${DEPEND}" +PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )" + +REQUIRED_USE="qdbm? ( !tokyocabinet ) + tokyocabinet? ( !qdbm ) + !tokyocabinet? ( qdbm ) + !qdbm? ( tokyocabinet )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + + epatch "${FILESDIR}/${PN}-3.4.5-acl.patch" + epatch "${FILESDIR}/${P}-ifconfig.patch" + + eautoreconf +} + +src_configure() { + # Enforce /var/cfengine for historical compatibility + + econf \ + --enable-fhs \ + --docdir=/usr/share/doc/${PF} \ + --with-workdir=/var/cfengine \ + --with-pcre \ + $(use_with acl libacl) \ + $(use_with qdbm) \ + $(use_with tokyocabinet) \ + $(use_with postgres postgresql) \ + $(use_with mysql mysql check) \ + $(use_with libvirt) \ + $(use_enable selinux) + + # Fix Makefile to skip inputs, see below "examples" + #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die + + # We install the documentation through portage + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die +} + +src_install() { + newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die + newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die + newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die + + emake DESTDIR="${D}" install || die + + # fix ifconfig path in provided promises + find "${D}"/usr/share -name "*.cf" | xargs sed -i "s,/sbin/ifconfig,$(which ifconfig),g" + + # Evil workaround for now.. + mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF} + + dodoc AUTHORS + + if ! use examples; then + rm -rf "${D}"/usr/share/doc/${PF}/example* + fi + + # Create cfengine working directory + dodir /var/cfengine/bin + fperms 700 /var/cfengine + + # 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. + for bin in promises agent monitord serverd execd runagent key; do + dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die + done +} + +pkg_postinst() { + echo + elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0" + echo + einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cf-execd -F" + echo + + elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:" + elog "emerge --config ${CATEGORY}/${PN}" + + # Fix old cf-servd, remove it after some releases. + local found=0 + for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do + found=1 + rm $fname + ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:') + done + + if [ "${found}" -eq 1 ]; then + echo + elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd" + fi +} + +pkg_config() { + if [ "${ROOT}" == "/" ]; then + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then + einfo "Generating keys for localhost." + /usr/sbin/cf-key + fi + else + die "cfengine cfkey does not support any value of ROOT other than /." + fi +} diff --git a/net-misc/cfengine/cfengine-3.6.2.ebuild b/net-misc/cfengine/cfengine-3.6.2.ebuild new file mode 100644 index 000000000000..2d94088ab452 --- /dev/null +++ b/net-misc/cfengine/cfengine-3.6.2.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils autotools flag-o-matic + +MY_PV="${PV//_beta/b}" +MY_PV="${MY_PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="An automated suite of programs for configuring and maintaining +Unix-like computers" +HOMEPAGE="http://www.cfengine.org/" +SRC_URI="http://cfengine.package-repos.s3.amazonaws.com/tarballs/${MY_P}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="3" +KEYWORDS="~amd64 ~x86" + +IUSE="acl examples libvirt mysql postgres +qdbm selinux tokyocabinet vim-syntax xml" + +DEPEND="acl? ( virtual/acl ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + selinux? ( sys-libs/libselinux ) + tokyocabinet? ( dev-db/tokyocabinet ) + qdbm? ( dev-db/qdbm ) + libvirt? ( app-emulation/libvirt ) + xml? ( dev-libs/libxml2:2 ) \ + dev-libs/openssl + dev-libs/libpcre" +RDEPEND="${DEPEND}" +PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )" + +REQUIRED_USE="qdbm? ( !tokyocabinet ) + tokyocabinet? ( !qdbm ) + !tokyocabinet? ( qdbm ) + !qdbm? ( tokyocabinet )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + epatch "${FILESDIR}/${P}-ifconfig.patch" + eautoreconf +} + +src_configure() { + # Enforce /var/cfengine for historical compatibility + + econf \ + --enable-fhs \ + --docdir=/usr/share/doc/${PF} \ + --with-workdir=/var/cfengine \ + --with-pcre \ + $(use_with acl libacl) \ + $(use_with qdbm) \ + $(use_with tokyocabinet) \ + $(use_with postgres postgresql) \ + $(use_with mysql mysql check) \ + $(use_with libvirt) \ + $(use_enable selinux) + + # Fix Makefile to skip inputs, see below "examples" + #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die + + # We install the documentation through portage + sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die +} + +src_install() { + newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die + newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die + newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die + + emake DESTDIR="${D}" install || die + + # fix ifconfig path in provided promises + find "${D}"/usr/share -name "*.cf" | xargs sed -i "s,/sbin/ifconfig,$(which ifconfig),g" + + # Evil workaround for now.. + mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF} + + dodoc AUTHORS + + if ! use examples; then + rm -rf "${D}"/usr/share/doc/${PF}/example* + fi + + # Create cfengine working directory + dodir /var/cfengine/bin + fperms 700 /var/cfengine + + # 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. + for bin in promises agent monitord serverd execd runagent key; do + dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die + done +} + +pkg_postinst() { + echo + elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0" + echo + einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided." + einfo + einfo "To run cfengine out of cron every half hour modify your crontab:" + einfo "0,30 * * * * /usr/sbin/cf-execd -F" + echo + + elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:" + elog "emerge --config ${CATEGORY}/${PN}" + + # Fix old cf-servd, remove it after some releases. + local found=0 + for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do + found=1 + rm $fname + ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:') + done + + if [ "${found}" -eq 1 ]; then + echo + elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd" + fi +} + +pkg_config() { + if [ "${ROOT}" == "/" ]; then + if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then + einfo "Generating keys for localhost." + /usr/sbin/cf-key + fi + else + die "cfengine cfkey does not support any value of ROOT other than /." + fi +} diff --git a/net-misc/cfengine/files/511666-segfault.patch b/net-misc/cfengine/files/511666-segfault.patch new file mode 100644 index 000000000000..ea3ae9686254 --- /dev/null +++ b/net-misc/cfengine/files/511666-segfault.patch @@ -0,0 +1,20 @@ +Fix a bug involving CheckFriendReliability (see bug #482439) + +Index: cfengine2-2.2.9/src/instrument.c +=================================================================== +--- cfengine2-2.2.9.orig/src/instrument.c 2009-03-06 21:25:59.000000000 +0000 ++++ cfengine2-2.2.9/src/instrument.c 2009-03-06 21:26:31.000000000 +0000 +@@ -716,11 +716,11 @@ + key.data = timekey; + key.size = strlen(timekey)+1; + +- if ((errno = dbp->get(dbp,NULL,&key,&value,0)) != 0) ++ if ((errno = dbpent->get(dbpent,NULL,&key,&value,0)) != 0) + { + if (errno != DB_NOTFOUND) + { +- dbp->err(dbp,errno,NULL); ++ dbpent->err(dbpent,errno,NULL); + exit(1); + } + } diff --git a/net-misc/cfengine/files/admit-noclass-520696.patch b/net-misc/cfengine/files/admit-noclass-520696.patch new file mode 100644 index 000000000000..1e5d8594aaed --- /dev/null +++ b/net-misc/cfengine/files/admit-noclass-520696.patch @@ -0,0 +1,15 @@ +Fix a bug with admit/grant that let cfengine2 fails when the class +of a cfengine fragment does not exist and more than a host or IP +ranges are specified for a path (see #520696) + +--- a/src/install.c ++++ b/src/install.c +@@ -6561,7 +6561,7 @@ + if (!IsDefinedClass(classes)) + { + Debug1("Not installing Auth path, no match\n"); +- InitializeAction(); ++// InitializeAction(); + return; + } + diff --git a/net-misc/cfengine/files/cf-execd.rc6 b/net-misc/cfengine/files/cf-execd.rc6 new file mode 100755 index 000000000000..38aa1811d019 --- /dev/null +++ b/net-misc/cfengine/files/cf-execd.rc6 @@ -0,0 +1,18 @@ +#!/sbin/runscript + +depend() { + need net + after cf-serverd +} + +start() { + ebegin "Starting cf-execd" + start-stop-daemon --start --exec /usr/sbin/cf-execd -- ${EXTRA_OPTS} + eend $? +} + +stop() { + ebegin "Stopping cf-execd" + start-stop-daemon --stop --pidfile /var/cfengine/cf-execd.pid --exec /usr/sbin/cf-execd + eend $? +} diff --git a/net-misc/cfengine/files/cf-monitord.rc6 b/net-misc/cfengine/files/cf-monitord.rc6 new file mode 100755 index 000000000000..27ef2c26fc82 --- /dev/null +++ b/net-misc/cfengine/files/cf-monitord.rc6 @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting cf-monitord" + start-stop-daemon --start --exec /usr/sbin/cf-monitord -- ${EXTRA_OPTS} + eend $? +} + +stop() { + ebegin "Stopping cf-monitord" + start-stop-daemon --stop --pidfile /var/cfengine/cf-monitord.pid --exec /usr/sbin/cf-monitord + eend $? +} diff --git a/net-misc/cfengine/files/cf-serverd.rc6 b/net-misc/cfengine/files/cf-serverd.rc6 new file mode 100755 index 000000000000..ca805d69716c --- /dev/null +++ b/net-misc/cfengine/files/cf-serverd.rc6 @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting cf-serverd" + start-stop-daemon --start --exec /usr/sbin/cf-serverd -- ${EXTRA_OPTS} + eend $? +} + +stop() { + ebegin "Stopping cf-serverd" + start-stop-daemon --stop --pidfile /var/cfengine/cf-serverd.pid --exec /usr/sbin/cf-serverd + eend $? +} diff --git a/net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch b/net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch new file mode 100644 index 000000000000..dee9b797f6ac --- /dev/null +++ b/net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch @@ -0,0 +1,11 @@ +--- src/instrument.c.old 2010-10-15 22:20:58.014091858 +0200 ++++ src/instrument.c 2010-10-15 22:21:34.132271440 +0200 +@@ -542,7 +542,7 @@ while (dbcp->c_get(dbcp, &key, &value, D + + 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); diff --git a/net-misc/cfengine/files/cfengine-3.4.5-acl.patch b/net-misc/cfengine/files/cfengine-3.4.5-acl.patch new file mode 100644 index 000000000000..815f257c36fa --- /dev/null +++ b/net-misc/cfengine/files/cfengine-3.4.5-acl.patch @@ -0,0 +1,30 @@ +From a12b5b3b8cd4397545104923d1de3297fd971f9e Mon Sep 17 00:00:00 2001 +From: Christian Ruppert <idl0r@gentoo.org> +Date: Fri, 29 Mar 2013 00:23:21 +0100 +Subject: [PATCH] Fix acl header detection + + +Signed-off-by: Christian Ruppert <idl0r@gentoo.org> +--- + configure.ac | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 542d115..f3f0c04 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -335,7 +335,10 @@ AC_ARG_WITH([libacl], + if test "x$with_libacl" != xno; then + CF3_WITH_LIBRARY(libacl, [ + AC_CHECK_LIB(acl, acl_init, [], [if test "x$with_libacl" != xcheck; then AC_MSG_ERROR(Cannot find libacl library); fi]) +- AC_CHECK_HEADERS([acl.h sys/acl.h acl/libacl.h], [], [if test "x$with_libacl" != xcheck; then AC_MSG_ERROR(Cannot find libacl library headers); fi]) ++ AC_CHECK_HEADERS([acl.h sys/acl.h acl/libacl.h], [found_acl_h=yes], []) ++ if test "x$found_acl_h" != xyes; then ++ AC_MSG_ERROR(Cannot find libacl library headers) ++ fi + ]) + fi + +-- +1.8.1.5 + diff --git a/net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch b/net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch new file mode 100644 index 000000000000..47107784ce0f --- /dev/null +++ b/net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch @@ -0,0 +1,42 @@ +Patch by clabbe.montjoie@gmail.com +https://bugs.gentoo.org/444532 + +--- src/conf.h.in.old 2012-12-28 16:18:23.000000000 +0100 ++++ src/conf.h.in 2012-12-28 16:19:08.000000000 +0100 +@@ -773,3 +773,6 @@ + + /* Define to rpl_vsnprintf if the replacement function should be used. */ + #undef vsnprintf ++ ++/* Define to the path for running ifconfig -a */ ++#undef IFCONFIG_RUN +--- src/unix.c.old 2012-12-28 16:05:28.000000000 +0100 ++++ src/unix.c 2012-12-28 16:13:15.000000000 +0100 +@@ -900,7 +900,7 @@ + + default: + +- if ((pp = cf_popen("/sbin/ifconfig -a", "r")) == NULL) ++ if ((pp = cf_popen(IFCONFIG_RUN, "r")) == NULL) + { + CfOut(cf_verbose, "", "Could not find interface info\n"); + return; +--- configure.ac.old 2012-12-29 11:38:20.000000000 +0100 ++++ configure.ac 2012-12-29 11:49:11.000000000 +0100 +@@ -882,6 +882,16 @@ + + + dnl ###################################################################### ++dnl Find the path to ifconfig ++dnl ###################################################################### ++ ++AC_PATH_PROG(IFCONFIG_PATH,ifconfig) ++if test x"$IFCONFIG_PATH" = x"" ; then ++ AC_MSG_ERROR([Cannot found the ifconfig binary.]) ++fi ++AC_DEFINE_UNQUOTED(IFCONFIG_RUN, "$IFCONFIG_PATH -a", [the path to run ifconfig -a]) ++ ++dnl ###################################################################### + dnl Summarize + dnl ###################################################################### + diff --git a/net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch b/net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch new file mode 100644 index 000000000000..dc982c6801f7 --- /dev/null +++ b/net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch @@ -0,0 +1,42 @@ +diff -ur cfengine-3.5.3.orig/configure.ac cfengine-3.5.3/configure.ac +--- cfengine-3.5.3.orig/configure.ac 2013-12-09 13:13:14.000000000 +0100 ++++ cfengine-3.5.3/configure.ac 2014-02-27 12:36:55.179893570 +0100 +@@ -1047,6 +1047,16 @@ + AM_SUBST_NOTMAKE(post_macros) + + dnl ###################################################################### ++dnl Find the path to ifconfig ++dnl ###################################################################### ++ ++AC_PATH_PROG(IFCONFIG_PATH,ifconfig) ++if test x"$IFCONFIG_PATH" = x"" ; then ++ AC_MSG_ERROR([Cannot found the ifconfig binary.]) ++fi ++AC_DEFINE_UNQUOTED(IFCONFIG_RUN, "$IFCONFIG_PATH -a", [the path to run ifconfig -a]) ++ ++dnl ###################################################################### + dnl Summarize + dnl ###################################################################### + +diff -ur cfengine-3.5.3.orig/libpromises/unix.c cfengine-3.5.3/libpromises/unix.c +--- cfengine-3.5.3.orig/libpromises/unix.c 2013-12-09 13:13:14.000000000 +0100 ++++ cfengine-3.5.3/libpromises/unix.c 2014-02-27 12:38:35.036608105 +0100 +@@ -767,7 +767,7 @@ + return; + } + #else +- if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL) ++ if ((pp = cf_popen(IFCONFIG_RUN, "r", true)) == NULL) + { + Log(LOG_LEVEL_VERBOSE, "Could not find interface info"); + return; +diff -ur cfengine-3.5.3.orig/libutils/config.h.in cfengine-3.5.3/libutils/config.h.in +--- cfengine-3.5.3.orig/libutils/config.h.in 2013-12-09 13:55:25.000000000 +0100 ++++ cfengine-3.5.3/libutils/config.h.in 2014-02-27 12:39:41.537416111 +0100 +@@ -914,3 +914,6 @@ + + /* Define to rpl_vsnprintf if the replacement function should be used. */ + #undef vsnprintf ++ ++/* Define to the path for running ifconfig -a */ ++#undef IFCONFIG_RUN diff --git a/net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch b/net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch new file mode 100644 index 000000000000..ae0f491347f9 --- /dev/null +++ b/net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch @@ -0,0 +1,11 @@ +--- cfengine-3.6.2.orig/libenv/unix_iface.c 2014-09-25 07:53:31.000000000 -0400 ++++ cfengine-3.6.2/libenv/unix_iface.c 2014-11-26 23:55:20.151351070 -0500 +@@ -625,7 +625,7 @@ + return; + } + #else +- if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL) ++ if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL || (pp = cf_popen("/bin/ifconfig -a", "r", true)) == NULL) + { + Log(LOG_LEVEL_VERBOSE, "Could not find interface info"); + return; 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 $? +} diff --git a/net-misc/cfengine/files/cfservd.rc6 b/net-misc/cfengine/files/cfservd.rc6 new file mode 100755 index 000000000000..a7ec9ad81a73 --- /dev/null +++ b/net-misc/cfengine/files/cfservd.rc6 @@ -0,0 +1,17 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting cfservd" + start-stop-daemon --start --quiet --exec /usr/sbin/cfservd + eend $? +} + +stop() { + ebegin "Stopping cfservd" + start-stop-daemon --stop --quiet --exec /usr/sbin/cfservd + eend $? +} diff --git a/net-misc/cfengine/metadata.xml b/net-misc/cfengine/metadata.xml new file mode 100644 index 000000000000..b0f5eef831f1 --- /dev/null +++ b/net-misc/cfengine/metadata.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sysadmin</herd> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + <description>cfengine 2.x only</description> + </maintainer> + <maintainer> + <email>mschiff@gentoo.org</email> + <name>Marc Schiffbauer</name> + <description>cfengine >2.x only</description> + </maintainer> + <use> + <flag name="html">Install HTML documentation</flag> + <flag name="libvirt">Enable support for virtual machine management through <pkg>app-emulation/libvirt</pkg></flag> + <flag name="qdbm">Use <pkg>dev-db/qdbm</pkg> as database backend</flag> + <flag name="tests">Install test files</flag> + <flag name="tokyocabinet">Use <pkg>dev-db/tokyocabinet</pkg> as database backend</flag> + </use> + <longdescription> + 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. Cfengine is + designed to be a part of a computer immune system, and can be thought of as + a gaming agent. It is ideal for cluster management and has been adopted for + use all over the world in small and huge organizations alike. + </longdescription> + <longdescription lang="ja"> + Cfengine 、つまり the configuration engine (設定エンジン)は大規模 + コンピュータ・ネットワークの管理と設定を行うエキスパート・システム + を構築するためのハイレベルなポリシ言語の自律型エージェントとその + ミドルを指します。莫大な設定を軽減するため、Cfengineはクラス概念と + プリミティブ・インテリジェンスの導入及びシステム状態の設定と保守を + 自動化します。Cfengine は免疫型システムの一部としてデザインされ、 + ゲーム・エージェントにもなります。クラスタ制御には最適で、世界中 + の小さな組織および大きな組織で採用されています。 + </longdescription> +</pkgmetadata> |