Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/
Date: Wed, 27 Oct 2021 13:58:28
Message-Id: 1635343101.42bb4f2cfed2088ff12f0761a0ed06894dd664dc.graaff@gentoo
1 commit: 42bb4f2cfed2088ff12f0761a0ed06894dd664dc
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 27 13:58:14 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 27 13:58:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42bb4f2c
7
8 app-admin/puppet: add missing sync dependency
9
10 dev-ruby/sync is not available by default with ruby27.
11
12 Package-Manager: Portage-3.0.20, Repoman-3.0.3
13 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
14
15 app-admin/puppet/puppet-5.5.22-r2.ebuild | 141 +++++++++++++++++++++++++++++++
16 1 file changed, 141 insertions(+)
17
18 diff --git a/app-admin/puppet/puppet-5.5.22-r2.ebuild b/app-admin/puppet/puppet-5.5.22-r2.ebuild
19 new file mode 100644
20 index 00000000000..fcce8074963
21 --- /dev/null
22 +++ b/app-admin/puppet/puppet-5.5.22-r2.ebuild
23 @@ -0,0 +1,141 @@
24 +# Copyright 1999-2021 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +USE_RUBY="ruby26 ruby27"
30 +
31 +RUBY_FAKEGEM_RECIPE_TEST="rspec3"
32 +
33 +RUBY_FAKEGEM_TASK_DOC="doc:all"
34 +
35 +RUBY_FAKEGEM_EXTRAINSTALL="locales"
36 +
37 +inherit ruby-fakegem systemd tmpfiles
38 +
39 +DESCRIPTION="A system automation and configuration management software."
40 +HOMEPAGE="https://puppet.com/"
41 +SRC_URI="https://downloads.puppetlabs.com/puppet/${P}.tar.gz"
42 +
43 +LICENSE="Apache-2.0 GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
46 +IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax"
47 +RESTRICT="test"
48 +
49 +ruby_add_rdepend "
50 + >=dev-ruby/hiera-3.2.1:0
51 + =dev-ruby/facter-3*
52 + >=dev-ruby/fast_gettext-1.1.2:0
53 + >=dev-ruby/locale-2.1:0
54 + >=dev-ruby/multi_json-1.10:0
55 + dev-ruby/sync
56 + augeas? ( dev-ruby/ruby-augeas )
57 + diff? ( dev-ruby/diff-lcs )
58 + doc? ( dev-ruby/rdoc )
59 + ldap? ( dev-ruby/ruby-ldap )
60 + shadow? ( dev-ruby/ruby-shadow )
61 + sqlite? ( dev-ruby/sqlite3 )
62 + virtual/ruby-ssl
63 + dev-ruby/hocon"
64 +
65 +ruby_add_bdepend "
66 + doc? ( dev-ruby/yard )
67 + test? (
68 + dev-ruby/mocha
69 + dev-ruby/rack
70 + dev-ruby/rspec-its
71 + )"
72 +# this should go in the above lists, but isn't because of test deps not being keyworded
73 +# dev-ruby/rspec-collection_matchers
74 +
75 +RDEPEND+=" ${RDEPEND}
76 + rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
77 + selinux? (
78 + sys-libs/libselinux[ruby]
79 + sec-policy/selinux-puppet
80 + )
81 + vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
82 + >=app-portage/eix-0.18.0
83 + acct-user/puppet
84 + acct-group/puppet"
85 +PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
86 +
87 +all_ruby_prepare() {
88 + # Avoid spec that require unpackaged json-schema.
89 + rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
90 +
91 + # fix systemd path
92 + eapply -p0 "${FILESDIR}/puppet-systemd.patch"
93 +
94 + # Avoid specs that can only run in the puppet.git repository. This
95 + # should be narrowed down to the specific specs.
96 + rm spec/integration/parser/compiler_spec.rb || die
97 +
98 + # Avoid failing spec that need further investigation.
99 + rm spec/unit/module_tool/metadata_spec.rb || die
100 +}
101 +
102 +each_ruby_install() {
103 + each_fakegem_install
104 +# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
105 +}
106 +
107 +all_ruby_install() {
108 + all_fakegem_install
109 +
110 + # systemd stuffs
111 + systemd_dounit "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
112 +
113 + # tmpfiles stuff
114 + newtmpfiles "${FILESDIR}/tmpfiles.d" "puppet.conf"
115 +
116 + # openrc init stuff
117 + newinitd "${FILESDIR}"/puppet.init-4.x puppet
118 + newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
119 + newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
120 +
121 + keepdir /etc/puppetlabs/puppet/ssl
122 +
123 + keepdir /var/lib/puppet/facts
124 + keepdir /var/lib/puppet/files
125 + fowners -R puppet:puppet /var/lib/puppet
126 +
127 + fperms 0750 /var/lib/puppet
128 +
129 + fperms 0750 /etc/puppetlabs
130 + fperms 0750 /etc/puppetlabs/puppet
131 + fperms 0750 /etc/puppetlabs/puppet/ssl
132 + fowners -R :puppet /etc/puppetlabs
133 + fowners -R :puppet /var/lib/puppet
134 +
135 + if use ldap ; then
136 + insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
137 + fi
138 +
139 + # ext and examples files
140 + for f in $(find ext examples -type f) ; do
141 + docinto "$(dirname ${f})"; dodoc "${f}"
142 + done
143 +}
144 +
145 +pkg_postinst() {
146 + tmpfiles_process puppet.conf
147 +
148 + elog
149 + elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
150 + elog "cause puppet to hang while installing packages."
151 + elog
152 + elog "Portage Puppet module with Gentoo-specific resources:"
153 + elog "http://forge.puppetlabs.com/gentoo/portage"
154 + elog
155 +
156 + for v in ${REPLACING_VERSIONS}; do
157 + if [ "$(ver_cut 1 "$v")" -eq "4" ]; then
158 + elog
159 + elog "Please see the following url for the release notes for puppet-5"
160 + elog "https://docs.puppet.com/puppet/5.0/release_notes.html#if-youre-upgrading-from-puppet-4x"
161 + elog
162 + fi
163 + done
164 +}