diff options
Diffstat (limited to 'app-admin/puppet')
-rw-r--r-- | app-admin/puppet/Manifest | 3 | ||||
-rw-r--r-- | app-admin/puppet/files/puppet-4-webrick-ruby.patch | 53 | ||||
-rw-r--r-- | app-admin/puppet/puppet-4.10.9-r1.ebuild | 199 | ||||
-rw-r--r-- | app-admin/puppet/puppet-5.3.3-r1.ebuild | 147 |
4 files changed, 402 insertions, 0 deletions
diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest index e2904700b9f7..08eee8a9faf2 100644 --- a/app-admin/puppet/Manifest +++ b/app-admin/puppet/Manifest @@ -1,5 +1,6 @@ AUX 43e2c935252b995134ce353e5e6312cf77aea480.patch 13618 BLAKE2B 91727c30b968b41dc8f6bb2ca217d5b9ccc2b5d08872be5a65a45b7f8bc37130255df139a17b7ca09b39b5b1a0b9ddcd6c54d2448148495cf493e7a085d2f0f5 SHA512 65b303c957a29bb5782a2b849944fba029dea3a533c25d4c17830391b5e4963fef304c0be876f5e7892b1a0eb4da16390d4ab1e39f459c05ecbb7100c9c0a9ca AUX 50puppet-mode-gentoo.el 217 BLAKE2B 632d02667437b04642b7d3510d5010a3a7952ccd6aaa301a463c629c5dd6320c847e9f05425bd5882681a471761d0fe501ccf6860faa33b9e5458a761dad40a1 SHA512 3fbe7045df9ac9d30520020d4df454a03f02989bbcaa4bae0c632f86f6e6d3fd2eeb3bed84d864077c2b85b65586406525fa621a262ec363f53d714a093f6d1a +AUX puppet-4-webrick-ruby.patch 2062 BLAKE2B 49cecd9d0ff077dd8d9e435bfaa1f51cfd45ad6baa2fcc8198d0c2cd53e2b0e04cbc49c8488ddbe23d3187f423c03a0e14b77f242d3fda6a019770be927a78da SHA512 045fec755dea2ef258d76962fee795b4e7b01f596cb6b622434226f978d4756e059bbdf8c140c88c32d145e99f3aa627ae15349430588d00a0ed90f2371bd934 AUX puppet-fix-tests-4.7.0.patch 1102 BLAKE2B e5c98627620f9f76f1421a13969dba3b1d279a63cdb65fc28713a9a2849c8e8cd0e42a30c9058e341d5bbabd3d24ae17c050fa551566e6c61301b83396a0b80a SHA512 81485af1a218b5616195ed80b3fc963c42d56265477be9a636c0e915a18771ff93e12cdbded45ce90da17ce72be4ea4881b5ad8e9d5a997be271df3cd2e8a2c8 AUX puppet-systemd.patch 481 BLAKE2B 8ca58755e5c3a235c60eed11c98e20bbd3cb27c81531709b27981ee61f6f5dea63d2487d49761ff84e7590b608c170bcd369fe7ef3700a5df1bd03b29c66ec71 SHA512 08bb997cedea378efa4614e4b2ff04acdd68cdc376fde422677b64dc56b8256ecf7221210c20529bb5a9a49fa8c92f67667c7acd6ac64b665e79639318a3df97 AUX puppet.init 917 BLAKE2B 0ebbcdd8c9d4154984130ba3f597969f5f070f65f246770583663df4f192052a0ed666d09d4d417864457814d6a680ac4f327dc2a83b774da3a3c0d4efea1c8d SHA512 6bd2e1c21abaa5149b853f1732a6bb84335a8b4ae4129db52da463597691fd983d347bc04aad69724034d37f953f50c6aa5316d517b9efed2414db8e3d94d7bf @@ -13,8 +14,10 @@ DIST puppet-4.10.9.tar.gz 2981668 BLAKE2B 315c39953c2ba70b547fd7a393c7be0bd3c387 DIST puppet-5.1.0.tar.gz 2734018 BLAKE2B d4169fee328710b7685de2606196de68e21ca31f9a9945bdd84255f5185fd2d95c6543a7b88b5130f1f01e60e04294664de71a8ccd1319c2e0bebf4d031e6225 SHA512 07019f40c5b7f18243f13abb899c2ff2ea4b135895ab98c13da3df50f8e720e2759f8eb39e349ff04286da7de504cffea3df8acf9711e8591b25001a2a3f9c15 DIST puppet-5.3.3.tar.gz 2843386 BLAKE2B dc96282ff2d6bb6719362cd9b2e856537019bd888af8ba897e37fc97584cd76c1d4179b3b629d2bb20d1dade0f84ec88ab41dd0d66cccd2c850a87f96ccf4b65 SHA512 b5bb9ac4059855c7cac624ea0fdc2c3366cea82bf07bee195a179a0a709fa53e7fffe883e581c1e07a64705a638b156288301227f7334226ddc401a9bf770afe EBUILD puppet-4.10.8.ebuild 5564 BLAKE2B 51164a6bd2fb31c08d9a1f0f08fa67861f11c1b6de316322f9596defbc3df05b980d897bad8b13f0c7fc3d3344eae0fdf81574555f6736969f797d6d91306424 SHA512 c9a64796ff31f9416606ee37e019d400294a1bbcbbfe1603577e47bf64ee95d0afd307711c06cde3a6bbc01fecae7c2b755ab16700ff697aa01f6cff5e510c74 +EBUILD puppet-4.10.9-r1.ebuild 5737 BLAKE2B a88a8d8fbdfa65751d4cad48af0234e7c1891eb35855cbb2ee9b4a62d75538af9d6c1445ec056505046d753a40eb93cc5bc65e9e2fb719c1f377ca1188941d81 SHA512 7592ae092281c6212bd958dce00d622252271db2f8d38fa447f3f53f756f0cad0f43c518aa0c652b6452b0856165b0db64fff48d3f797b65cbe9058a441b75b0 EBUILD puppet-4.10.9.ebuild 5635 BLAKE2B 42c4009603b09985df1574ca66ea4821a337e2859b31c3d923e4784003c486fb648e27cfbc42e638477913659720883cb5ed09fc51f5e895f03eff867738a9a9 SHA512 6f2d6b3ae4a7bcd053eca8dc599cba96b8043797c0ebf7689f660207d777514a01caa98985d426cbb05811dc7ad2d45f9927e098927a5cb34292ecdae376cb02 EBUILD puppet-5.1.0-r1.ebuild 3823 BLAKE2B 19a08621366ab57b447b76c1209b288736b40861eb6703d84166581bdb19c22c212b9d4247d33bcd39134748b186b13a8bfafede5a57d73c64b49045cd7cf43d SHA512 8ec7cdf210c22563867716154a316b07b96ec36bd3a7bd8bd0aa15f6a5b0dd8f61fb5855a94465049709d9e1e3db1b4e33dbdbe3ce4fc0650d9b51fcebbd631c EBUILD puppet-5.1.0.ebuild 3865 BLAKE2B 10999d7fe76eb19c04fc54cdb995843091a8157fbbb90acac504baacc5cf9c411d351462497cfdac9594b40326b9d914f219be8ab3f1e31734211fd79262750e SHA512 6a62c22b405fe4b5ef9df3d8878a8ef401e97e4f62d00a681d95c16502805b8e505be0beb9362c7dff361f722de6bcf322fbcde5d45bef5fe4b0f23212bb99ec +EBUILD puppet-5.3.3-r1.ebuild 3928 BLAKE2B 86cb095bbca6b665ac749539b97865fffa6192fc9a6ce6b9599e29d51221043075db5120bbf80c4e297030f3dac4011dff9fca116d0736d740c81fe3c8bab92f SHA512 ed742128919ea071b7cabb2cf1cdaa45710a09aa9e4e49306e1cd9c601b0a6955700afbdb8013d500a04ae10cf3cbc2d83e88f225157fb1d617701e2112facf4 EBUILD puppet-5.3.3.ebuild 3823 BLAKE2B 19a08621366ab57b447b76c1209b288736b40861eb6703d84166581bdb19c22c212b9d4247d33bcd39134748b186b13a8bfafede5a57d73c64b49045cd7cf43d SHA512 8ec7cdf210c22563867716154a316b07b96ec36bd3a7bd8bd0aa15f6a5b0dd8f61fb5855a94465049709d9e1e3db1b4e33dbdbe3ce4fc0650d9b51fcebbd631c MISC metadata.xml 1514 BLAKE2B 54902aeb644661563205d2200b71fdb6c0191839643968ae3249b1438996bc6b2846fbc4f9487dd83c28e9501407153fcc21255ad7ed6356aca3fb9121ab6abb SHA512 3ae8d47ac2a12085ec4adcb43d0428dc0b85fb561bbda39afd01ba7466417a24f9630d37c8461f99ec1aa3eb4f118cab0cb31703f486ab6d3a65798119277c64 diff --git a/app-admin/puppet/files/puppet-4-webrick-ruby.patch b/app-admin/puppet/files/puppet-4-webrick-ruby.patch new file mode 100644 index 000000000000..ce4b055644f6 --- /dev/null +++ b/app-admin/puppet/files/puppet-4-webrick-ruby.patch @@ -0,0 +1,53 @@ +From a358d5ec01c6f87b39e5bfbab7a35582624fdbf7 Mon Sep 17 00:00:00 2001 +From: Josh Cooper <josh@puppet.com> +Date: Fri, 12 Jan 2018 15:30:38 -0800 +Subject: [PATCH] (PUP-8297) Don't accept already connected socket + +Webrick's start method yields an already connected socket, so it is not +necessary to call accept on the socket. In ruby versions prior to 2.3.6 and +2.4.3, the accept call was a noop. + +In 2.3.6 and 2.4.3, it is an error, because ruby those versions use a +non-blocking accept to handle clients that make an TCP connection, but +are slow to negotiate the TLS handshake[1,2]. On these versions, puppet +master would report: + + SSL_accept returned=1 errno=0 state=unknown state: unexpected record + +Remove the call to Socket#accept. + +[1] https://bugs.ruby-lang.org/issues/14005 +[2] https://github.com/ruby/ruby/commit/2e728d51e70ed3756ad760c687a08b8487b0112f +--- + lib/puppet/network/http/webrick.rb | 1 - + spec/unit/network/http/webrick_spec.rb | 5 +++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/puppet/network/http/webrick.rb b/lib/puppet/network/http/webrick.rb +index 9ebf1763be5..3ac2ff40650 100644 +--- a/lib/puppet/network/http/webrick.rb ++++ b/lib/puppet/network/http/webrick.rb +@@ -29,7 +29,6 @@ def listen(address, port) + if ! IO.select([sock],nil,nil,timeout) + raise "Client did not send data within %.1f seconds of connecting" % timeout + end +- sock.accept + @server.run(sock) + end + end +diff --git a/spec/unit/network/http/webrick_spec.rb b/spec/unit/network/http/webrick_spec.rb +index a90fc3f3378..843b0d54c8a 100644 +--- a/spec/unit/network/http/webrick_spec.rb ++++ b/spec/unit/network/http/webrick_spec.rb +@@ -92,6 +92,11 @@ + expect(server).to be_listening + end + ++ it "is passed an already connected socket" do ++ socket.expects(:accept).never ++ server.listen(address, port) ++ end ++ + describe "when the REST protocol is requested" do + it "should register the REST handler at /" do + # We don't care about the options here. diff --git a/app-admin/puppet/puppet-4.10.9-r1.ebuild b/app-admin/puppet/puppet-4.10.9-r1.ebuild new file mode 100644 index 000000000000..c404e787afc1 --- /dev/null +++ b/app-admin/puppet/puppet-4.10.9-r1.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +USE_RUBY="ruby22 ruby23 ruby24" + +#RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_EXTRAINSTALL="locales" + +inherit xemacs-elisp-common eutils user ruby-fakegem versionator + +DESCRIPTION="A system automation and configuration management software." +HOMEPAGE="http://puppetlabs.com/" +SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz" + +LICENSE="Apache-2.0 GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" +IUSE="augeas diff doc emacs experimental ldap rrdtool selinux shadow sqlite vim-syntax xemacs" +RESTRICT="test" + +ruby_add_rdepend " + >=dev-ruby/gettext-setup-0.10:0 + >=dev-ruby/hiera-2.0 + >=dev-ruby/locale-2.1 + >=dev-ruby/rgen-0.6.5 + dev-ruby/json:= + >=dev-ruby/facter-3.0.0 + augeas? ( dev-ruby/ruby-augeas ) + diff? ( dev-ruby/diff-lcs ) + doc? ( dev-ruby/rdoc ) + ldap? ( dev-ruby/ruby-ldap ) + shadow? ( dev-ruby/ruby-shadow ) + sqlite? ( dev-ruby/sqlite3 ) + virtual/ruby-ssl" + +# ruby_add_bdepend " +# test? ( +# dev-ruby/mocha:0.14 +# =dev-ruby/rack-1* +# dev-ruby/rspec-its +# dev-ruby/rspec-collection_matchers +# >=dev-ruby/vcr-2.9:2 +# >=dev-ruby/webmock-1.24:0 +# )" + +DEPEND+=" ${DEPEND} + xemacs? ( app-editors/xemacs )" +RDEPEND+=" ${RDEPEND} + rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] ) + selinux? ( + sys-libs/libselinux[ruby] + sec-policy/selinux-puppet + ) + vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 ) + >=app-portage/eix-0.18.0" +PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )" + +SITEFILE="50${PN}-mode-gentoo.el" + +pkg_setup() { + enewgroup puppet + enewuser puppet -1 -1 /var/lib/puppet puppet +} + +all_ruby_prepare() { + # Avoid spec that require unpackaged json-schema. + rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die + + # can't be run within portage. + epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch" + + # fix systemd path + epatch "${FILESDIR}/puppet-systemd.patch" + + if use experimental; then + epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch" + fi + + # fix compatibility with ruby 2.3.6/2.4.3 webrick + epatch "${FILESDIR}/puppet-4-webrick-ruby.patch" + + # Use working version of mocha + sed -i -e '1igem "mocha", "~>0.14.0"; gem "rack", "~>1.0"' spec/spec_helper.rb || die + + # Avoid specs that can only run in the puppet.git repository. This + # should be narrowed down to the specific specs. + rm spec/integration/parser/compiler_spec.rb || die + + # Avoid failing specs that need further investigation. + sed -i -e '/should resolve external facts/,/^ end/ s:^:#:' \ + spec/integration/indirector/facts/facter_spec.rb || die + sed -i -e "/describe 'cfacter'/,/^ end/ s:^:#:" spec/unit/defaults_spec.rb || die + rm -f spec/unit/indirector/ldap_spec.rb \ + spec/unit/parser/functions/create_resources_spec.rb || die + + # Avoid specs that rely on tools from other OSs + rm -f spec/unit/provider/package/{dnf,tdnf,yum}_spec.rb \ + spec/unit/provider/user/directoryservice_spec.rb || die + + # Avoid specs that depend on hiera-eyaml to avoid circular + # dependencies + rm -f spec/unit/functions/lookup_spec.rb || die + + # Avoid specs that fail due to an unpackaged file + sed -i -e '/when loading pp resource types using auto loading/,/^ end/ s:^:#:' spec/unit/pops/loaders/loaders_spec.rb || die +} + +all_ruby_compile() { + if use xemacs ; then + # Create a separate version for xemacs to be able to install + # emacs and xemacs in parallel. + mkdir ext/xemacs + cp ext/emacs/* ext/xemacs/ + xemacs-elisp-compile ext/xemacs/puppet-mode.el + fi +} + +each_ruby_install() { + each_fakegem_install +# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}" +} + +all_ruby_install() { + all_fakegem_install + + # systemd stuffs + insinto /usr/lib/systemd/system + doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service" + + # tmpfiles stuff + insinto /usr/lib/tmpfiles.d + newins "${FILESDIR}/tmpfiles.d" "puppet.conf" + + # openrc init stuff + newinitd "${FILESDIR}"/puppet.init-4.x puppet + newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster + newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster + + keepdir /etc/puppetlabs/puppet/ssl + + keepdir /var/lib/puppet/facts + keepdir /var/lib/puppet/files + fowners -R puppet:puppet /var/lib/puppet + + fperms 0750 /var/lib/puppet + + fperms 0750 /etc/puppetlabs + fperms 0750 /etc/puppetlabs/puppet + fperms 0750 /etc/puppetlabs/puppet/ssl + fowners -R :puppet /etc/puppetlabs + fowners -R :puppet /var/lib/puppet + + if use xemacs ; then + xemacs-elisp-install ${PN} ext/xemacs/puppet-mode.el* + xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + if use ldap ; then + insinto /etc/openldap/schema; doins ext/ldap/puppet.schema + fi + + # ext and examples files + for f in $(find ext examples -type f) ; do + docinto "$(dirname ${f})"; dodoc "${f}" + done +} + +pkg_postinst() { + elog + elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could" + elog "cause puppet to hang while installing packages." + elog + elog "Portage Puppet module with Gentoo-specific resources:" + elog "http://forge.puppetlabs.com/gentoo/portage" + elog + + local v + for v in ${REPLACING_VERSIONS}; do + if [ "$(get_major_version $v)" = "3" ]; then + elog + elog "If you're upgrading from 3.x then please move everything in /etc/puppet to" + elog "/etc/puppetlabs/puppet" + elog "Also, puppet now uses config directories for modules and manifests." + elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html" + elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html" + elog "for more information." + elog + fi + done + + use xemacs && xemacs-elisp-site-regen +} + +pkg_postrm() { + use xemacs && xemacs-elisp-site-regen +} diff --git a/app-admin/puppet/puppet-5.3.3-r1.ebuild b/app-admin/puppet/puppet-5.3.3-r1.ebuild new file mode 100644 index 000000000000..1f8461b191db --- /dev/null +++ b/app-admin/puppet/puppet-5.3.3-r1.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +USE_RUBY="ruby22 ruby23 ruby24" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_TASK_DOC="doc:all" + +RUBY_FAKEGEM_EXTRAINSTALL="locales" + +inherit eutils user ruby-fakegem versionator + +DESCRIPTION="A system automation and configuration management software." +HOMEPAGE="http://puppetlabs.com/" +SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz" + +LICENSE="Apache-2.0 GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~x86" +IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax" +RESTRICT="test" + +ruby_add_rdepend " + dev-ruby/hiera + dev-ruby/json:= + >=dev-ruby/facter-3.0.0 + augeas? ( dev-ruby/ruby-augeas ) + diff? ( dev-ruby/diff-lcs ) + doc? ( dev-ruby/rdoc ) + ldap? ( dev-ruby/ruby-ldap ) + shadow? ( dev-ruby/ruby-shadow ) + sqlite? ( dev-ruby/sqlite3 ) + virtual/ruby-ssl + dev-ruby/hocon" + +ruby_add_bdepend " + doc? ( dev-ruby/yard ) + test? ( + dev-ruby/mocha + dev-ruby/rack + dev-ruby/rspec-its + )" +# this should go in the above lists, but isn't because of test deps not being keyworded +# dev-ruby/rspec-collection_matchers + +RDEPEND+=" ${RDEPEND} + rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] ) + selinux? ( + sys-libs/libselinux[ruby] + sec-policy/selinux-puppet + ) + vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 ) + >=app-portage/eix-0.18.0" +PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )" + +pkg_setup() { + enewgroup puppet + enewuser puppet -1 -1 /var/lib/puppet puppet +} + +all_ruby_prepare() { + # Avoid spec that require unpackaged json-schema. + rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die + + # can't be run within portage. + epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch" + + # fix systemd path + epatch "${FILESDIR}/puppet-systemd.patch" + + # backport upstream fix for ruby 2.3.6 compatibility + epatch "${FILESDIR}/puppet-4-webrick-ruby.patch" + + # Avoid specs that can only run in the puppet.git repository. This + # should be narrowed down to the specific specs. + rm spec/integration/parser/compiler_spec.rb || die + + # Avoid failing spec that need further investigation. + rm spec/unit/module_tool/metadata_spec.rb || die +} + +each_ruby_install() { + each_fakegem_install +# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}" +} + +all_ruby_install() { + all_fakegem_install + + # systemd stuffs + insinto /usr/lib/systemd/system + doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service" + + # tmpfiles stuff + insinto /usr/lib/tmpfiles.d + newins "${FILESDIR}/tmpfiles.d" "puppet.conf" + + # openrc init stuff + newinitd "${FILESDIR}"/puppet.init-4.x puppet + newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster + newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster + + keepdir /etc/puppetlabs/puppet/ssl + + keepdir /var/lib/puppet/facts + keepdir /var/lib/puppet/files + fowners -R puppet:puppet /var/lib/puppet + + fperms 0750 /var/lib/puppet + + fperms 0750 /etc/puppetlabs + fperms 0750 /etc/puppetlabs/puppet + fperms 0750 /etc/puppetlabs/puppet/ssl + fowners -R :puppet /etc/puppetlabs + fowners -R :puppet /var/lib/puppet + + if use ldap ; then + insinto /etc/openldap/schema; doins ext/ldap/puppet.schema + fi + + # ext and examples files + for f in $(find ext examples -type f) ; do + docinto "$(dirname ${f})"; dodoc "${f}" + done +} + +pkg_postinst() { + elog + elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could" + elog "cause puppet to hang while installing packages." + elog + elog "Portage Puppet module with Gentoo-specific resources:" + elog "http://forge.puppetlabs.com/gentoo/portage" + elog + + for v in ${REPLACING_VERSIONS}; do + if [ "$(get_major_version $v)" = "4" ]; then + elog + elog "Please see the following url for the release notes for puppet-5" + elog "https://docs.puppet.com/puppet/5.0/release_notes.html#if-youre-upgrading-from-puppet-4x" + elog + fi + done +} |