1 |
commit: 5b9f3229c4a2cbef014a812d8d5eefb6306e35c6 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 9 17:06:11 2017 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 9 17:06:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b9f3229 |
7 |
|
8 |
app-admin/puppet: fix systemd exec path for bug 612040 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
app-admin/puppet/files/puppet-systemd.patch | 10 ++ |
13 |
app-admin/puppet/puppet-4.9.1-r1.ebuild | 177 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 187 insertions(+) |
15 |
|
16 |
diff --git a/app-admin/puppet/files/puppet-systemd.patch b/app-admin/puppet/files/puppet-systemd.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..72d7d69a2f7 |
19 |
--- /dev/null |
20 |
+++ b/app-admin/puppet/files/puppet-systemd.patch |
21 |
@@ -0,0 +1,10 @@ |
22 |
+--- ext/systemd/puppet.service 2017-02-02 18:28:58.000000000 -0600 |
23 |
++++ ext/systemd/puppet.service 2017-03-09 10:56:59.091489324 -0600 |
24 |
+@@ -17,7 +17,7 @@ |
25 |
+ EnvironmentFile=-/etc/sysconfig/puppetagent |
26 |
+ EnvironmentFile=-/etc/sysconfig/puppet |
27 |
+ EnvironmentFile=-/etc/default/puppet |
28 |
+-ExecStart=/opt/puppetlabs/puppet/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize |
29 |
++ExecStart=/usr/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize |
30 |
+ ExecReload=/bin/kill -HUP $MAINPID |
31 |
+ KillMode=process |
32 |
|
33 |
diff --git a/app-admin/puppet/puppet-4.9.1-r1.ebuild b/app-admin/puppet/puppet-4.9.1-r1.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..506e8ca297f |
36 |
--- /dev/null |
37 |
+++ b/app-admin/puppet/puppet-4.9.1-r1.ebuild |
38 |
@@ -0,0 +1,177 @@ |
39 |
+# Copyright 1999-2017 Gentoo Foundation |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI="5" |
43 |
+ |
44 |
+USE_RUBY="ruby21" |
45 |
+ |
46 |
+RUBY_FAKEGEM_RECIPE_TEST="rspec3" |
47 |
+ |
48 |
+inherit elisp-common xemacs-elisp-common eutils user ruby-fakegem versionator |
49 |
+ |
50 |
+DESCRIPTION="A system automation and configuration management software." |
51 |
+HOMEPAGE="http://puppetlabs.com/" |
52 |
+SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz" |
53 |
+ |
54 |
+LICENSE="Apache-2.0 GPL-2" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~hppa ~ppc ~x86" |
57 |
+IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax xemacs" |
58 |
+RESTRICT="test" |
59 |
+ |
60 |
+ruby_add_rdepend " |
61 |
+ dev-ruby/hiera |
62 |
+ >=dev-ruby/rgen-0.6.5 |
63 |
+ dev-ruby/json:= |
64 |
+ >=dev-ruby/facter-3.0.0 |
65 |
+ augeas? ( dev-ruby/ruby-augeas ) |
66 |
+ diff? ( dev-ruby/diff-lcs ) |
67 |
+ doc? ( dev-ruby/rdoc ) |
68 |
+ ldap? ( dev-ruby/ruby-ldap ) |
69 |
+ shadow? ( dev-ruby/ruby-shadow ) |
70 |
+ sqlite? ( dev-ruby/sqlite3 ) |
71 |
+ virtual/ruby-ssl" |
72 |
+ |
73 |
+ruby_add_bdepend " |
74 |
+ test? ( |
75 |
+ dev-ruby/mocha |
76 |
+ dev-ruby/rack |
77 |
+ dev-ruby/rspec-its |
78 |
+ )" |
79 |
+# this should go in the above lists, but isn't because of test deps not being keyworded |
80 |
+# dev-ruby/rspec-collection_matchers |
81 |
+ |
82 |
+DEPEND+=" ${DEPEND} |
83 |
+ emacs? ( virtual/emacs ) |
84 |
+ xemacs? ( app-editors/xemacs )" |
85 |
+RDEPEND+=" ${RDEPEND} |
86 |
+ rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] ) |
87 |
+ selinux? ( |
88 |
+ sys-libs/libselinux[ruby] |
89 |
+ sec-policy/selinux-puppet |
90 |
+ ) |
91 |
+ vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 ) |
92 |
+ >=app-portage/eix-0.18.0" |
93 |
+ |
94 |
+SITEFILE="50${PN}-mode-gentoo.el" |
95 |
+ |
96 |
+pkg_setup() { |
97 |
+ enewgroup puppet |
98 |
+ enewuser puppet -1 -1 /var/lib/puppet puppet |
99 |
+} |
100 |
+ |
101 |
+all_ruby_prepare() { |
102 |
+ # Avoid spec that require unpackaged json-schema. |
103 |
+ rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die |
104 |
+ |
105 |
+ # can't be run within portage. |
106 |
+ epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch" |
107 |
+ |
108 |
+ # fix systemd path |
109 |
+ epatch "${FILESDIR}/puppet-systemd.patch" |
110 |
+ |
111 |
+ # Avoid specs that can only run in the puppet.git repository. This |
112 |
+ # should be narrowed down to the specific specs. |
113 |
+ rm spec/integration/parser/compiler_spec.rb || die |
114 |
+ |
115 |
+ # Avoid failing spec that need further investigation. |
116 |
+ rm spec/unit/module_tool/metadata_spec.rb || die |
117 |
+} |
118 |
+ |
119 |
+all_ruby_compile() { |
120 |
+ if use emacs ; then |
121 |
+ elisp-compile ext/emacs/puppet-mode.el |
122 |
+ fi |
123 |
+ |
124 |
+ if use xemacs ; then |
125 |
+ # Create a separate version for xemacs to be able to install |
126 |
+ # emacs and xemacs in parallel. |
127 |
+ mkdir ext/xemacs |
128 |
+ cp ext/emacs/* ext/xemacs/ |
129 |
+ xemacs-elisp-compile ext/xemacs/puppet-mode.el |
130 |
+ fi |
131 |
+} |
132 |
+ |
133 |
+each_ruby_install() { |
134 |
+ each_fakegem_install |
135 |
+# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}" |
136 |
+} |
137 |
+ |
138 |
+all_ruby_install() { |
139 |
+ all_fakegem_install |
140 |
+ |
141 |
+ # systemd stuffs |
142 |
+ insinto /usr/lib/systemd/system |
143 |
+ doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service" |
144 |
+ |
145 |
+ # tmpfiles stuff |
146 |
+ insinto /usr/lib/tmpfiles.d |
147 |
+ newins "${FILESDIR}/tmpfiles.d" "puppet.conf" |
148 |
+ |
149 |
+ # openrc init stuff |
150 |
+ newinitd "${FILESDIR}"/puppet.init-4.x puppet |
151 |
+ newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster |
152 |
+ newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster |
153 |
+ |
154 |
+ keepdir /etc/puppetlabs/puppet/ssl |
155 |
+ |
156 |
+ keepdir /var/lib/puppet/facts |
157 |
+ keepdir /var/lib/puppet/files |
158 |
+ fowners -R puppet:puppet /var/lib/puppet |
159 |
+ |
160 |
+ fperms 0750 /var/lib/puppet |
161 |
+ |
162 |
+ fperms 0750 /etc/puppetlabs |
163 |
+ fperms 0750 /etc/puppetlabs/puppet |
164 |
+ fperms 0750 /etc/puppetlabs/puppet/ssl |
165 |
+ fowners -R :puppet /etc/puppetlabs |
166 |
+ fowners -R :puppet /var/lib/puppet |
167 |
+ |
168 |
+ if use emacs ; then |
169 |
+ elisp-install ${PN} ext/emacs/puppet-mode.el* |
170 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" |
171 |
+ fi |
172 |
+ |
173 |
+ if use xemacs ; then |
174 |
+ xemacs-elisp-install ${PN} ext/xemacs/puppet-mode.el* |
175 |
+ xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}" |
176 |
+ fi |
177 |
+ |
178 |
+ if use ldap ; then |
179 |
+ insinto /etc/openldap/schema; doins ext/ldap/puppet.schema |
180 |
+ fi |
181 |
+ |
182 |
+ # ext and examples files |
183 |
+ for f in $(find ext examples -type f) ; do |
184 |
+ docinto "$(dirname ${f})"; dodoc "${f}" |
185 |
+ done |
186 |
+} |
187 |
+ |
188 |
+pkg_postinst() { |
189 |
+ elog |
190 |
+ elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could" |
191 |
+ elog "cause puppet to hang while installing packages." |
192 |
+ elog |
193 |
+ elog "Portage Puppet module with Gentoo-specific resources:" |
194 |
+ elog "http://forge.puppetlabs.com/gentoo/portage" |
195 |
+ elog |
196 |
+ |
197 |
+ if [ "$(get_major_version $REPLACING_VERSIONS)" = "3" ]; then |
198 |
+ elog |
199 |
+ elog "If you're upgrading from 3.x then please move everything in /etc/puppet to" |
200 |
+ elog "/etc/puppetlabs/puppet" |
201 |
+ elog "Also, puppet now uses config directories for modules and manifests." |
202 |
+ elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html" |
203 |
+ elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html" |
204 |
+ elog "for more information." |
205 |
+ elog |
206 |
+ fi |
207 |
+ |
208 |
+ use emacs && elisp-site-regen |
209 |
+ use xemacs && xemacs-elisp-site-regen |
210 |
+} |
211 |
+ |
212 |
+pkg_postrm() { |
213 |
+ use emacs && elisp-site-regen |
214 |
+ use xemacs && xemacs-elisp-site-regen |
215 |
+} |