Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/, app-admin/puppet/files/
Date: Tue, 11 Oct 2016 18:42:54
Message-Id: 1476211330.65b41c485a853927a13accae01d0912f2a696f8d.prometheanfire@gentoo
1 commit: 65b41c485a853927a13accae01d0912f2a696f8d
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 11 18:28:17 2016 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 11 18:42:10 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65b41c48
7
8 app-admin/puppet: bup
9
10 Package-Manager: portage-2.3.0
11
12 app-admin/puppet/Manifest | 1 +
13 .../puppet/files/puppet-fix-tests-4.7.0.patch | 18 +++
14 app-admin/puppet/puppet-4.7.0.ebuild | 175 +++++++++++++++++++++
15 3 files changed, 194 insertions(+)
16
17 diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest
18 index d9d418e..d21a742 100644
19 --- a/app-admin/puppet/Manifest
20 +++ b/app-admin/puppet/Manifest
21 @@ -7,3 +7,4 @@ DIST puppet-3.8.4.tar.gz 2639537 SHA256 19e83ebbbf0933a9df6696255d7ff4d65e3daba1
22 DIST puppet-3.8.5.tar.gz 2640987 SHA256 ecba7c70e32c3da6682f9c4706c01cc588a5614759a864446e9fbd2449c6305c SHA512 9c17508032ab4306c0ec1d2e79e1c3548a1da6c875c61155e597642cc901d0639eb99543084a6f88c5826b5faa5af83eaf936672e80a32bf27cf45f545e7d859 WHIRLPOOL 46a227365316c913f16a3b02bc13fd3b47ace497c406a14309d480c49881665d0ca9a0d86fae8a3761d6beb159b222dfdd033e0c1cdb2aaeadd62741c232a50f
23 DIST puppet-3.8.7.tar.gz 2650247 SHA256 50460a3dd8d25118e25eb01178d09743dabc01cd185f6b2cc723bae21ff023c2 SHA512 f86568d4f33c8c18da270e089e1274ce2e3c705c116b078531bb66656f0bbb9a2fc95effbb8bf5355a082d4f32ce5b44e7f6e316937164aa0d71dd47e654c618 WHIRLPOOL 6e3b754f9e6f40c6037652dc7d746e616871a653640e2a91ab7dd3e70b4240c0b377d0f79c543ca95c5d661046c6431e30f263e0f18998cac0ca3089a4634273
24 DIST puppet-4.4.2.tar.gz 2680253 SHA256 90ea74703b415965def15566a6d709fbd781a1e21589688c22d2f1bab4688860 SHA512 38c4e4e94693e8f3131aba44ad8b03437cd6896f8266e6f9d6434e355f044c87173034bbd336c33e5848692de60c5b4612141128a95a3d088947e72f90d13bc1 WHIRLPOOL c7d06954d1a9b46cc7f56e73da88dd3297179f1f7ede646601b6305940e200f29bf7047e494df3be12e76b0640673d616058055bc4887d3e296a5372daeab0fd
25 +DIST puppet-4.7.0.tar.gz 2822807 SHA256 9b5c00da165ba8570607097d5d494ecc8988829d9e066b0bd6103cf1fa903e4d SHA512 667b96c66f63befccc19cdd0e88d5c7b29feb2f3ba29f0faa74ac77b4e4f16e06a34b19114b27b36329a5964b37031e8c1430849c1673760a782d4e80b8df296 WHIRLPOOL 949cecc001179bfc81b589756718deb6a3b298ea314a9fb9eeb7d660ea9baa22f9f2c183b8992f70f95158db80a3a996075e36d365da845aef795b0ab897b9f8
26
27 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
28 new file mode 100644
29 index 00000000..7d62e0c
30 --- /dev/null
31 +++ b/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch
32 @@ -0,0 +1,18 @@
33 +--- spec/unit/network/http/api/indirected_routes_spec.rb 2016-10-11 13:24:09.500955469 -0500
34 ++++ spec/unit/network/http/api/indirected_routes_spec.rb.new 2016-10-11 13:24:00.501700977 -0500
35 +@@ -139,15 +139,6 @@
36 + indirection, _, _, _ = handler.uri2indirection("GET", uri_escaped, params)
37 + end
38 +
39 +- it "should not pass through an environment to check_authorization and fail if the environment is unknown" do
40 +- handler.expects(:check_authorization).with(anything,
41 +- anything,
42 +- Not(has_entry(:environment)))
43 +- expect(lambda { handler.uri2indirection("GET",
44 +- "#{master_url_prefix}/node/bar",
45 +- {:environment => 'bogus'}) }).to raise_error(not_found_error)
46 +- end
47 +-
48 + it "should not URI unescape the indirection key as passed through to a call to check_authorization" do
49 + handler.expects(:check_authorization).with(anything,
50 + anything,
51
52 diff --git a/app-admin/puppet/puppet-4.7.0.ebuild b/app-admin/puppet/puppet-4.7.0.ebuild
53 new file mode 100644
54 index 00000000..794b376
55 --- /dev/null
56 +++ b/app-admin/puppet/puppet-4.7.0.ebuild
57 @@ -0,0 +1,175 @@
58 +# Copyright 1999-2016 Gentoo Foundation
59 +# Distributed under the terms of the GNU General Public License v2
60 +# $Id$
61 +
62 +EAPI="5"
63 +
64 +USE_RUBY="ruby21"
65 +
66 +RUBY_FAKEGEM_RECIPE_TEST="rspec3"
67 +
68 +inherit elisp-common xemacs-elisp-common eutils user ruby-fakegem versionator
69 +
70 +DESCRIPTION="A system automation and configuration management software."
71 +HOMEPAGE="http://puppetlabs.com/"
72 +SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
73 +
74 +LICENSE="Apache-2.0 GPL-2"
75 +SLOT="0"
76 +KEYWORDS="~amd64 ~hppa ~ppc ~x86"
77 +IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax xemacs"
78 +RESTRICT="test"
79 +
80 +ruby_add_rdepend "
81 + dev-ruby/hiera
82 + >=dev-ruby/rgen-0.6.5
83 + dev-ruby/json
84 + >=dev-ruby/facter-3.0.0
85 + augeas? ( dev-ruby/ruby-augeas )
86 + diff? ( dev-ruby/diff-lcs )
87 + doc? ( dev-ruby/rdoc )
88 + ldap? ( dev-ruby/ruby-ldap )
89 + shadow? ( dev-ruby/ruby-shadow )
90 + sqlite? ( dev-ruby/sqlite3 )
91 + virtual/ruby-ssl"
92 +
93 +ruby_add_bdepend "
94 + test? (
95 + dev-ruby/mocha
96 + dev-ruby/rack
97 + dev-ruby/rspec-its
98 + )"
99 +# this should go in the above lists, but isn't because of test deps not being keyworded
100 +# dev-ruby/rspec-collection_matchers
101 +
102 +DEPEND+=" ${DEPEND}
103 + emacs? ( virtual/emacs )
104 + xemacs? ( app-editors/xemacs )"
105 +RDEPEND+=" ${RDEPEND}
106 + rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
107 + selinux? (
108 + sys-libs/libselinux[ruby]
109 + sec-policy/selinux-puppet
110 + )
111 + vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
112 + >=app-portage/eix-0.18.0"
113 +
114 +SITEFILE="50${PN}-mode-gentoo.el"
115 +
116 +pkg_setup() {
117 + enewgroup puppet
118 + enewuser puppet -1 -1 /var/lib/puppet puppet
119 +}
120 +
121 +all_ruby_prepare() {
122 + # Avoid spec that require unpackaged json-schema.
123 + rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
124 +
125 + # can't be run within portage.
126 + epatch "${FILESDIR}/puppet-fix-tests-${PV}.patch"
127 +
128 + # Avoid specs that can only run in the puppet.git repository. This
129 + # should be narrowed down to the specific specs.
130 + rm spec/integration/parser/compiler_spec.rb || die
131 +
132 + # Avoid failing spec that need further investigation.
133 + rm spec/unit/module_tool/metadata_spec.rb || die
134 +}
135 +
136 +all_ruby_compile() {
137 + if use emacs ; then
138 + elisp-compile ext/emacs/puppet-mode.el
139 + fi
140 +
141 + if use xemacs ; then
142 + # Create a separate version for xemacs to be able to install
143 + # emacs and xemacs in parallel.
144 + mkdir ext/xemacs
145 + cp ext/emacs/* ext/xemacs/
146 + xemacs-elisp-compile ext/xemacs/puppet-mode.el
147 + fi
148 +}
149 +
150 +each_ruby_install() {
151 + each_fakegem_install
152 +# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
153 +}
154 +
155 +all_ruby_install() {
156 + all_fakegem_install
157 +
158 + # systemd stuffs
159 + insinto /usr/lib/systemd/system
160 + doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
161 +
162 + # tmpfiles stuff
163 + insinto /usr/lib/tmpfiles.d
164 + newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
165 +
166 + # openrc init stuff
167 + newinitd "${FILESDIR}"/puppet.init-4.x puppet
168 + newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
169 + newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
170 +
171 + keepdir /etc/puppetlabs/puppet/ssl
172 +
173 + keepdir /var/lib/puppet/facts
174 + keepdir /var/lib/puppet/files
175 + fowners -R puppet:puppet /var/lib/puppet
176 +
177 + fperms 0750 /var/lib/puppet
178 +
179 + fperms 0750 /etc/puppetlabs
180 + fperms 0750 /etc/puppetlabs/puppet
181 + fperms 0750 /etc/puppetlabs/puppet/ssl
182 + fowners -R :puppet /etc/puppetlabs
183 + fowners -R :puppet /var/lib/puppet
184 +
185 + if use emacs ; then
186 + elisp-install ${PN} ext/emacs/puppet-mode.el*
187 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
188 + fi
189 +
190 + if use xemacs ; then
191 + xemacs-elisp-install ${PN} ext/xemacs/puppet-mode.el*
192 + xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}"
193 + fi
194 +
195 + if use ldap ; then
196 + insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
197 + fi
198 +
199 + # ext and examples files
200 + for f in $(find ext examples -type f) ; do
201 + docinto "$(dirname ${f})"; dodoc "${f}"
202 + done
203 +}
204 +
205 +pkg_postinst() {
206 + elog
207 + elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
208 + elog "cause puppet to hang while installing packages."
209 + elog
210 + elog "Portage Puppet module with Gentoo-specific resources:"
211 + elog "http://forge.puppetlabs.com/gentoo/portage"
212 + elog
213 +
214 + if [ "$(get_major_version $REPLACING_VERSIONS)" = "3" ]; then
215 + elog
216 + elog "If you're upgrading from 3.x then please move everything in /etc/puppet to"
217 + elog "/etc/puppetlabs/puppet"
218 + elog "Also, puppet now uses config directories for modules and manifests."
219 + elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html"
220 + elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html"
221 + elog "for more information."
222 + elog
223 + fi
224 +
225 + use emacs && elisp-site-regen
226 + use xemacs && xemacs-elisp-site-regen
227 +}
228 +
229 +pkg_postrm() {
230 + use emacs && elisp-site-regen
231 + use xemacs && xemacs-elisp-site-regen
232 +}