From 65b41c485a853927a13accae01d0912f2a696f8d Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Tue, 11 Oct 2016 13:28:17 -0500 Subject: app-admin/puppet: bup Package-Manager: portage-2.3.0 --- app-admin/puppet/Manifest | 1 + .../puppet/files/puppet-fix-tests-4.7.0.patch | 18 +++ app-admin/puppet/puppet-4.7.0.ebuild | 175 +++++++++++++++++++++ 3 files changed, 194 insertions(+) create mode 100644 app-admin/puppet/files/puppet-fix-tests-4.7.0.patch create mode 100644 app-admin/puppet/puppet-4.7.0.ebuild (limited to 'app-admin/puppet') diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest index d9d418e310bd..d21a742749a4 100644 --- a/app-admin/puppet/Manifest +++ b/app-admin/puppet/Manifest @@ -7,3 +7,4 @@ DIST puppet-3.8.4.tar.gz 2639537 SHA256 19e83ebbbf0933a9df6696255d7ff4d65e3daba1 DIST puppet-3.8.5.tar.gz 2640987 SHA256 ecba7c70e32c3da6682f9c4706c01cc588a5614759a864446e9fbd2449c6305c SHA512 9c17508032ab4306c0ec1d2e79e1c3548a1da6c875c61155e597642cc901d0639eb99543084a6f88c5826b5faa5af83eaf936672e80a32bf27cf45f545e7d859 WHIRLPOOL 46a227365316c913f16a3b02bc13fd3b47ace497c406a14309d480c49881665d0ca9a0d86fae8a3761d6beb159b222dfdd033e0c1cdb2aaeadd62741c232a50f DIST puppet-3.8.7.tar.gz 2650247 SHA256 50460a3dd8d25118e25eb01178d09743dabc01cd185f6b2cc723bae21ff023c2 SHA512 f86568d4f33c8c18da270e089e1274ce2e3c705c116b078531bb66656f0bbb9a2fc95effbb8bf5355a082d4f32ce5b44e7f6e316937164aa0d71dd47e654c618 WHIRLPOOL 6e3b754f9e6f40c6037652dc7d746e616871a653640e2a91ab7dd3e70b4240c0b377d0f79c543ca95c5d661046c6431e30f263e0f18998cac0ca3089a4634273 DIST puppet-4.4.2.tar.gz 2680253 SHA256 90ea74703b415965def15566a6d709fbd781a1e21589688c22d2f1bab4688860 SHA512 38c4e4e94693e8f3131aba44ad8b03437cd6896f8266e6f9d6434e355f044c87173034bbd336c33e5848692de60c5b4612141128a95a3d088947e72f90d13bc1 WHIRLPOOL c7d06954d1a9b46cc7f56e73da88dd3297179f1f7ede646601b6305940e200f29bf7047e494df3be12e76b0640673d616058055bc4887d3e296a5372daeab0fd +DIST puppet-4.7.0.tar.gz 2822807 SHA256 9b5c00da165ba8570607097d5d494ecc8988829d9e066b0bd6103cf1fa903e4d SHA512 667b96c66f63befccc19cdd0e88d5c7b29feb2f3ba29f0faa74ac77b4e4f16e06a34b19114b27b36329a5964b37031e8c1430849c1673760a782d4e80b8df296 WHIRLPOOL 949cecc001179bfc81b589756718deb6a3b298ea314a9fb9eeb7d660ea9baa22f9f2c183b8992f70f95158db80a3a996075e36d365da845aef795b0ab897b9f8 diff --git a/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch b/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch new file mode 100644 index 000000000000..7d62e0c1f786 --- /dev/null +++ b/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch @@ -0,0 +1,18 @@ +--- spec/unit/network/http/api/indirected_routes_spec.rb 2016-10-11 13:24:09.500955469 -0500 ++++ spec/unit/network/http/api/indirected_routes_spec.rb.new 2016-10-11 13:24:00.501700977 -0500 +@@ -139,15 +139,6 @@ + indirection, _, _, _ = handler.uri2indirection("GET", uri_escaped, params) + end + +- it "should not pass through an environment to check_authorization and fail if the environment is unknown" do +- handler.expects(:check_authorization).with(anything, +- anything, +- Not(has_entry(:environment))) +- expect(lambda { handler.uri2indirection("GET", +- "#{master_url_prefix}/node/bar", +- {:environment => 'bogus'}) }).to raise_error(not_found_error) +- end +- + it "should not URI unescape the indirection key as passed through to a call to check_authorization" do + handler.expects(:check_authorization).with(anything, + anything, diff --git a/app-admin/puppet/puppet-4.7.0.ebuild b/app-admin/puppet/puppet-4.7.0.ebuild new file mode 100644 index 000000000000..794b37638b76 --- /dev/null +++ b/app-admin/puppet/puppet-4.7.0.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +USE_RUBY="ruby21" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +inherit elisp-common 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 ~hppa ~ppc ~x86" +IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax xemacs" +RESTRICT="test" + +ruby_add_rdepend " + dev-ruby/hiera + >=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 + 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 + +DEPEND+=" ${DEPEND} + emacs? ( virtual/emacs ) + 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" + +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-${PV}.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 +} + +all_ruby_compile() { + if use emacs ; then + elisp-compile ext/emacs/puppet-mode.el + fi + + 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 emacs ; then + elisp-install ${PN} ext/emacs/puppet-mode.el* + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + + 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 + + if [ "$(get_major_version $REPLACING_VERSIONS)" = "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 + + use emacs && elisp-site-regen + use xemacs && xemacs-elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen + use xemacs && xemacs-elisp-site-regen +} -- cgit v1.2.3-65-gdbad