summaryrefslogtreecommitdiff
path: root/net-misc/cfengine
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/cfengine
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/cfengine')
-rw-r--r--net-misc/cfengine/Manifest26
-rw-r--r--net-misc/cfengine/cfengine-2.2.10-r4.ebuild112
-rw-r--r--net-misc/cfengine/cfengine-3.3.9.ebuild128
-rw-r--r--net-misc/cfengine/cfengine-3.4.5.ebuild143
-rw-r--r--net-misc/cfengine/cfengine-3.5.3.ebuild140
-rw-r--r--net-misc/cfengine/cfengine-3.6.2.ebuild137
-rw-r--r--net-misc/cfengine/files/511666-segfault.patch20
-rw-r--r--net-misc/cfengine/files/admit-noclass-520696.patch15
-rw-r--r--net-misc/cfengine/files/cf-execd.rc618
-rw-r--r--net-misc/cfengine/files/cf-monitord.rc617
-rw-r--r--net-misc/cfengine/files/cf-serverd.rc617
-rw-r--r--net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch11
-rw-r--r--net-misc/cfengine/files/cfengine-3.4.5-acl.patch30
-rw-r--r--net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch42
-rw-r--r--net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch42
-rw-r--r--net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch11
-rw-r--r--net-misc/cfengine/files/cfenvd.rc617
-rw-r--r--net-misc/cfengine/files/cfexecd.rc617
-rw-r--r--net-misc/cfengine/files/cfservd.rc617
-rw-r--r--net-misc/cfengine/metadata.xml40
20 files changed, 1000 insertions, 0 deletions
diff --git a/net-misc/cfengine/Manifest b/net-misc/cfengine/Manifest
new file mode 100644
index 000000000000..51b00b542bc3
--- /dev/null
+++ b/net-misc/cfengine/Manifest
@@ -0,0 +1,26 @@
+AUX 511666-segfault.patch 731 SHA256 cb38c886bf92c1ae48000a65a93a2cf610a9b9d991c44fb1b7df00c3bd9af54d SHA512 3a4e971e7cd60a1cef9644b075f45787d3ef8159d9d18c3aea4847391f246b5c96c658ab98f8b7184e9d315acca3d0d2961826a2785d029b2b4b009686fe7133 WHIRLPOOL 5a4ec189d798d5efdab1c800d7370c534ee1c8d5f96264f289faf0ab3ecbf4e1935ffb9253a1e2e793d3bb5729b971502a2c2f7d1d4ccf0b960640b4326ccda3
+AUX admit-noclass-520696.patch 400 SHA256 d882a327a3788640f96ef7fa5a38953365f358722883ce105c8be973fbb6c5d2 SHA512 1263459a8a91962ddd5290374f4066f38d09eb021bedc86c15683d5b0b9ad3969672cb490ccf386a7816f8401ee1665aef60a10735e539357112f785ce7407ad WHIRLPOOL 5c4ce5d0bd9fb2bcb8dd5f2f3053f0a6254d6fee7ac29bbf087c5c4269e3c538f76205fa73df81c167be4020c2c12f26c65b0543f3f39f3c590a9e8ada1b98b2
+AUX cf-execd.rc6 319 SHA256 eef3f8470a52231a71a906e5518fa802e7e6c8ba4929f17e8d76d55fa5845d0b SHA512 cac7ac5126d8d2f3c3acf61a694e89f6a2cddbf0748442e4ce82064a520c077adf2bf6cdcd8dda398b684699c03031e9b48178bd21c97badaa84a2776a04998d WHIRLPOOL d01df35e426fbe500ae5ae0505671166e3e60d224009c126f6880d47d53f3bc79645213db4b8936e4a5c229a8c9c2fb3fb4ce4bbee59938e2a494f43508393fc
+AUX cf-monitord.rc6 316 SHA256 c2bb8ca8aa397e050ff0d339e519b0908f75e26dda6131f75afb8eb62a3a83cc SHA512 d141891e6cac6ddc4dad6c7caa623e5fb43846a91c23ae99fcc27e9fad5aeed6c5ee2ddc4bf88363523bd04c977241d649b818833e13a58319c4b8a48efadb1a WHIRLPOOL 276c96977aaa766deb010b7fa4896b2925ac07cd1c77d54baa5c7fc20697783d3882bf46f8ad3f0c06c7c5c5c1ab849e89af3933b6ef4830d4a7d6cda2840bf8
+AUX cf-serverd.rc6 311 SHA256 a066067d1a0f3a5017a76d46967eb0c4943ea4d356918a2c2d84842e29a52838 SHA512 ef22d159ab71c311e5105709956cfca11dbe1569de4278a87bfbe82a496ac9b0e715b35f65b66a36dc84b7f4254d00172f16ab72240348282f9702b084a7b8bf WHIRLPOOL 173a8fc7bd7c11573da147215713dd1504a0dc099052b17be05b7a6883a0c0fe1f61db74b6d134222cf236ead7052a976d31b57a21491728d2d16ca90c28036e
+AUX cfengine-2.2.10-snprintf_buffer_overflow.patch 456 SHA256 25a37e3d23163459844789b3817814768a7126f564fd473ec0a6d1136897ebff SHA512 6e38707d638ad9570ba88d07c13ba0c0a5f13e8642b040b10a2cc25cbb27599c4108692ca44cc98a79b390a471e082cf68496e980d787be2f74fa11288ca817c WHIRLPOOL 0f992e1bc9b1ecb7e0eaf43a81726023248c223c7188b617d345fbc00da534da12fc7f6ed8a03730596c996ceee1a42dbe1210e91bb43dd677ffe411256cc0b1
+AUX cfengine-3.4.5-acl.patch 1024 SHA256 f2d20259aeb1e9cfe42cc3781a870ea57a8d6b5ee6e8aceda875f749e9919cf3 SHA512 f8e7987cf26c8791d3b0c816a61fdd8b877114729c804d096270f9e98c69f0cdcfe4d72a4120d9d8fa8fd260fae340ef75f9897b4a421da7648d05c10a4bc02b WHIRLPOOL 9b2f5063eda082987a19979059b3a99c445c21a951336090029f733d3c602b545673f80bb4ec2813e87e4765404d913fefe71df4d4b30b8c0120fe421bdecc28
+AUX cfengine-3.4.5-ifconfig.patch 1447 SHA256 fe38644ff8befa5b6e760fc0773b174d2ab0bf872d40c8909cb5529f8069a1e3 SHA512 e2e3f362777951c9778fe9f98f95fb934fd76a3a0af39612ab3a6aeec320d181834d4531382ab70c0ebc3162180dd9e9508f082ee99fd80fb5144eb1815ebc55 WHIRLPOOL 3848016a9b96c4d37a09794f933bbdff7804e64d1a1e4637062c554d43d74bad240c97fcd466836c99fd31b829404e50f4532ac1dc21588ac6513f5bdde0a82d
+AUX cfengine-3.5.3-ifconfig.patch 1776 SHA256 ab42f79688799fc76bfd0825f6ce2ccee8c86ebe948b757949353c235b625eb0 SHA512 33c7ce6a3f064e8d9fbb393dcf56816be3ed4e679864dd2163681686b15c458b7694a05731607971acadd643c763c8d94d3fd14d19e5fb1814e4898cfedf9ef9 WHIRLPOOL 4d2fe1611ef7af8b560bc7e8c5c08fc88d8ace62f211d2033d65043c8aa4dcc89c0a34135ac690157eab08194b4d194bdc50a55e394f6c67b175950ea35ef8b1
+AUX cfengine-3.6.2-ifconfig.patch 486 SHA256 e0e891429b3e56150840c7e5d1c6b9033e8be7403c302a3a1122ac638b08f28a SHA512 e0c308dcb1ac1d865b6410e5e4a5afb4619dc56e77ddb247a4c3314e9b2e9ffcab7dd09682ead3acd259dfdc76403c5c7312d3306e53285da7812912f59d8582 WHIRLPOOL 19f924480dcb34640d727d3cf0decc31033a78cf3d5eebf815c39d17b2efc74435b90e4a88f828e4a78ac2237cd2c44c390e5dc1e363b16b19448a8a2c89b55a
+AUX cfenvd.rc6 255 SHA256 39e563ab9ac318cccc52deeb8ff790e3be983d337038c9402a4a46ff0300156b SHA512 3b6356bd75d2986d4482a6d603cb1b07697d5314a748f440b8f11e7275670c072ed96fddd5a41d4066e19ebbf1d126f93d70428324e37bbb40185dc414e10994 WHIRLPOOL 120c0ee00039faf7b7b2ab507687c8ce83fba747ad7ef244067f2d795e8440a33f7e0c35debcffe441f5726d6f847306dd5dc27015c7880cb9bd82594dcf2688
+AUX cfexecd.rc6 260 SHA256 17fc807054ebc954ccf3c40bf2a03cd5744c96a5f0c1d6a93645a3828885f641 SHA512 735a34204b6c9d555b454f264edeaf371e1ee7cf80a2c23fcc83d604ed87d3a19dcd9008f6c815a024535b1d9e9a32aac008ce7b4e440f9b688b642050ec7ff1 WHIRLPOOL 0347075d9ca7bd490beba22f1566dcd088382658c235bea1de76ec60495b41de5edec7ebd19963d2ab7637e806745b09c4563b7de4a96afdc0f49ad454daf6d2
+AUX cfservd.rc6 260 SHA256 f6c1120671d398c45347c842fbbd68ea9843ea55100a4e0f240e316aee39a62d SHA512 c69b2bcc509b0dbcf93a7131a85bcbb57ea2a648b90fb1a886a4fa6bcb787593dc49d03857b0ef8f552e10db46c3002799c67bc57655e43927e02ce1d13c393d WHIRLPOOL 49d8825465d024c8678b011124505bb2da8691cb40797ac54c4bcf0272ac34dbf9a93f5055e070044ea023d88158ff3c94a87508b1a92a448b35036bddc81cb3
+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
+EBUILD cfengine-2.2.10-r4.ebuild 3245 SHA256 622ccf067b4775fbc49ea15ec4e7fe0524084fb2f55b903f66cad2c77e942884 SHA512 c6879fd4efd6fa430e730fe80db44da0a19543c14a3a5dbe366343ed3ddc7067ebe6f1e33418109a2f31026540d0d6ad1bff1f11ffe27136940a9beea12943d6 WHIRLPOOL 6bd4a4efafdf838352e3367487b58f5bd961d6d13a74975a663544bdceb0e38280ca71eb43a4de3a96d54c19239c7ee19058c99930bc0bb609109973ce0e0d1b
+EBUILD cfengine-3.3.9.ebuild 3519 SHA256 23ba6bdcc30a8287c3e32b28931d639039bef659fbee105c97d8d77bbc22ae0f SHA512 34b5cfedcde9f47894146e4f528e928cb31777ca36c9951f69fc937de19d80a9c950493d8351e13406e99a1c4eeb060527d6f17597fa5f6598a7908becd0a2ed WHIRLPOOL b964d1b1a0c08434ce19fa1d5548c0eb72fcf11fa3aa6770e7094d683044c292d6f0ea8e878548dfad68aa891c3a15464b6bfab6b8d57dd0e3d470f75ec6e74c
+EBUILD cfengine-3.4.5.ebuild 3745 SHA256 49562914e05f8dd8db09794e1cd920caa2e84611a51c022c59e38c95fd757425 SHA512 285447ad8239f57f076ebf10224e5582414be174b4f1f35644dff2f170e2032a65fa76aa2877c22fdb6681abe855492a1cd7da13409563a1d83ef21b45871e89 WHIRLPOOL 8805136855177bc15a6d868d6c96ed7747cf4de8051dd373c189dc69292b56a87c4ef5a4b226e130061baa6cf71da64a1f8369d1c9962d247dbe56f6a5063bd9
+EBUILD cfengine-3.5.3.ebuild 3812 SHA256 dd2e40852ec04aa248933b3b8d1c47df2c9649f5942d7476a118112a6b600e6a SHA512 d0bec07edd75d17705894a9d771feb112f7fb892cbdae8c341bac6290a82eeef5e90187fc6dc7d7f1b911c5f020d30de9b8f043d196f663805eae628701656b4 WHIRLPOOL c04fb48cb7cb5d08d9e64727166d45db781ea8460d4d8ed8efb6ff49f5d1f3ad7315bebbd929d24334b2739c935cd011215e3734f1a6ced2c4d0fee0be7d031c
+EBUILD cfengine-3.6.2.ebuild 3753 SHA256 fa4220abb1521f89e1fc8832e96720725b1c0bec384aefd23462512d464477e8 SHA512 4d0670fa4fdb02cc5e3c3643154af2c5c25e8046f4c6d6118d6d26d9753642fe5d3a09f66210a426dc08dda373020661fdc6c05fdadd5d082200d9ef59388115 WHIRLPOOL 36d56a5dfbe702ff4957e860e96a4488c4958d2992610503133945ff91e6ced3890dafe1bff53b80ccce67ca42420c42a4feae08e253d57fbe58196ab2cc04fc
+MISC ChangeLog 4147 SHA256 b11e88777236b6e69372c41248350095081db6c579433b984de3577d86a5619b SHA512 0d1c2f0df59ddfd6d4cd5c9a0a256dbb79e203d6c92adf158bccdb70e377dbf11b8e69a4a8267373f602b5f8b699bacc36db6a844780b7ce741266d68cc2aea1 WHIRLPOOL fcd28b50f9ccf806e3e5d60d9be2a49f7f429e7315cbece0c13be0b9b4e80f5b7809466dfd506431e234971bd53b4c1151c168a077949cc3980697feb1fbdd59
+MISC ChangeLog-2015 28780 SHA256 db23ee741ac594def34e8ddfc2793691f0b737cf423e0b8b70a8bb94be059d5e SHA512 b6f7a4206d359aeab1c9e70e4c8ef3995dacc2a4f8385fe8b863fcf5a7b81b44b230f5c8684ab37dd7b551ded8a2b8af4fb173a04d9035cb3046b8d8f5329d35 WHIRLPOOL 58a19cbe5250a90c97759ec2693c38bb3857662b68d736cacf399e3f81bc8bc3f6e8a73cdac34f4a512ae39d8f1692f3bf589a7de02de88909fab94b346d7172
+MISC metadata.xml 2241 SHA256 2ae9dc21e9974c95b3d2cbdf9e8b382a853c3c3bbb22102ea53c0a473a84c2ec SHA512 7dfd5dc90230ed92b1b44bbf06d6bbe386511339e9510db728b48a2a19c48b6e2371be245905f8254b488980235e9e0c66906f0f01d36a29d79116017f220739 WHIRLPOOL 25f4cf792097dc52de3e82c7b07c2f3eecdb985a8ab629151bc2d1be3afd9665176fd148ac39e6593a48ebdcfee0c57cbeb285e05417edfbd9056e2e44818587
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..a2f6f9d7afc1
--- /dev/null
+++ b/net-misc/cfengine/cfengine-2.2.10-r4.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+ # https://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..907365bda35c
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.3.9.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 )"
+
+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..c377a81c5a5f
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.4.5.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 )"
+
+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..8f39bfb0f9b0
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.5.3.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 )"
+
+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..a4e5ae6c7db9
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.6.2.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 )"
+
+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 100644
index 000000000000..8c3936d8a718
--- /dev/null
+++ b/net-misc/cfengine/files/cf-execd.rc6
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+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 100644
index 000000000000..6f985a62b020
--- /dev/null
+++ b/net-misc/cfengine/files/cf-monitord.rc6
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+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 100644
index 000000000000..d73e2bc2c729
--- /dev/null
+++ b/net-misc/cfengine/files/cf-serverd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+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 100644
index 000000000000..638ae993dcf5
--- /dev/null
+++ b/net-misc/cfengine/files/cfenvd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+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 100644
index 000000000000..032a9c469b50
--- /dev/null
+++ b/net-misc/cfengine/files/cfexecd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+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 100644
index 000000000000..034b25c72000
--- /dev/null
+++ b/net-misc/cfengine/files/cfservd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+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..fb9078d2d2d0
--- /dev/null
+++ b/net-misc/cfengine/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ <description>cfengine 2.x only</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>sysadmin@gentoo.org</email>
+ <name>Gentoo Sysadmin Project</name>
+ </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>