public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/
@ 2016-04-28 14:10 Matt Thode
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Thode @ 2016-04-28 14:10 UTC (permalink / raw
  To: gentoo-commits

commit:     67dd528c748f33ec564fc50b409361de6bbe4a1c
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 28 14:09:32 2016 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Apr 28 14:10:00 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67dd528c

app-admin/puppet: fix patch for bug 581428

Package-Manager: portage-2.2.26

 app-admin/puppet/files/puppet-fix-tests-4.4.2.patch | 18 ++++++++++++++++++
 app-admin/puppet/puppet-4.4.2.ebuild                |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/app-admin/puppet/files/puppet-fix-tests-4.4.2.patch b/app-admin/puppet/files/puppet-fix-tests-4.4.2.patch
new file mode 100644
index 0000000..b77c1ce
--- /dev/null
+++ b/app-admin/puppet/files/puppet-fix-tests-4.4.2.patch
@@ -0,0 +1,18 @@
+--- spec/unit/network/http/api/indirected_routes_spec.rb  2016-04-22 17:15:56.000000000 -0500
++++ spec/unit/network/http/api/indirected_routes_spec.rb.new  2016-04-28 09:06:38.133311369 -0500
+@@ -140,15 +140,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(ArgumentError)
+-    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.4.2.ebuild b/app-admin/puppet/puppet-4.4.2.ebuild
index dc356cf..67270df 100644
--- a/app-admin/puppet/puppet-4.4.2.ebuild
+++ b/app-admin/puppet/puppet-4.4.2.ebuild
@@ -66,7 +66,7 @@ all_ruby_prepare() {
 	rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
 
 	# can't be run within portage.
-	epatch "${FILESDIR}/puppet-fix-tests-4.x.patch"
+	epatch "${FILESDIR}/puppet-fix-tests-4.4.2.patch"
 
 	# Avoid specs that can only run in the puppet.git repository. This
 	# should be narrowed down to the specific specs.


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/
@ 2017-03-09 17:06 Matt Thode
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Thode @ 2017-03-09 17:06 UTC (permalink / raw
  To: gentoo-commits

commit:     5b9f3229c4a2cbef014a812d8d5eefb6306e35c6
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 17:06:11 2017 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 17:06:11 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b9f3229

app-admin/puppet: fix systemd exec path for bug 612040

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-admin/puppet/files/puppet-systemd.patch |  10 ++
 app-admin/puppet/puppet-4.9.1-r1.ebuild     | 177 ++++++++++++++++++++++++++++
 2 files changed, 187 insertions(+)

diff --git a/app-admin/puppet/files/puppet-systemd.patch b/app-admin/puppet/files/puppet-systemd.patch
new file mode 100644
index 00000000000..72d7d69a2f7
--- /dev/null
+++ b/app-admin/puppet/files/puppet-systemd.patch
@@ -0,0 +1,10 @@
+--- ext/systemd/puppet.service	2017-02-02 18:28:58.000000000 -0600
++++ ext/systemd/puppet.service	2017-03-09 10:56:59.091489324 -0600
+@@ -17,7 +17,7 @@
+ EnvironmentFile=-/etc/sysconfig/puppetagent
+ EnvironmentFile=-/etc/sysconfig/puppet
+ EnvironmentFile=-/etc/default/puppet
+-ExecStart=/opt/puppetlabs/puppet/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize
++ExecStart=/usr/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize
+ ExecReload=/bin/kill -HUP $MAINPID
+ KillMode=process

diff --git a/app-admin/puppet/puppet-4.9.1-r1.ebuild b/app-admin/puppet/puppet-4.9.1-r1.ebuild
new file mode 100644
index 00000000000..506e8ca297f
--- /dev/null
+++ b/app-admin/puppet/puppet-4.9.1-r1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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-4.7.0.patch"
+
+	# fix systemd path
+	epatch "${FILESDIR}/puppet-systemd.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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/
@ 2017-12-03 18:00 Matt Thode
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Thode @ 2017-12-03 18:00 UTC (permalink / raw
  To: gentoo-commits

commit:     08001c72ddb19ef04e825aa57b90b024de8a9b40
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  3 18:00:08 2017 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Dec  3 18:00:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08001c72

app-admin/puppet: remove unused files

thanks mm1ke

Package-Manager: Portage-2.3.14, Repoman-2.3.6

 app-admin/puppet/Manifest                   |  2 +-
 app-admin/puppet/files/puppet.init-r1       | 24 -----------------------
 app-admin/puppet/files/puppetmaster.init-r1 | 30 -----------------------------
 3 files changed, 1 insertion(+), 55 deletions(-)

diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest
index 34c545c90fe..629b3dd0e0c 100644
--- a/app-admin/puppet/Manifest
+++ b/app-admin/puppet/Manifest
@@ -2,4 +2,4 @@ DIST puppet-4.10.1.tar.gz 2954351 BLAKE2B 6cf8ac28d8c09f4b82956b3fc8ebc17c0ec35c
 DIST puppet-4.10.8.tar.gz 2979824 BLAKE2B 802b65d48ff7d8303e3cc847a9f753a5e19c0ada6ee02dc1fc9c748da8d69462c34bdfeddeedf0057179ff1133665439c41e970c41ca1728463292ef26e996ab SHA512 9f3384702dd4938e1e00aeceb0745b760de32000e0dd59d5b846d1120a46026499176a51d0409e3a0ae414efc0872854c204d1941385695a4c57c209fbd1f28d
 DIST puppet-4.10.9.tar.gz 2981668 BLAKE2B 315c39953c2ba70b547fd7a393c7be0bd3c387bd52e3f383a932ebc03f9d96c17d988d53b15bcb8d08bc22ebcaf1c9c5cff00f9c34d730e231417565aad5311f SHA512 0ac70f716a602b15d28504cc594c5a0d4f8005083de6751c682dc9180feca68148d942353a63e16aaa2e783e6ebe90b8f77b0b033c671a5134bcbcdff36a3204
 DIST puppet-5.1.0.tar.gz 2734018 BLAKE2B d4169fee328710b7685de2606196de68e21ca31f9a9945bdd84255f5185fd2d95c6543a7b88b5130f1f01e60e04294664de71a8ccd1319c2e0bebf4d031e6225 SHA512 07019f40c5b7f18243f13abb899c2ff2ea4b135895ab98c13da3df50f8e720e2759f8eb39e349ff04286da7de504cffea3df8acf9711e8591b25001a2a3f9c15
-DIST puppet-5.3.3.tar.gz 2843386 SHA256 45360f64fe0375df617571d58e929515e2094daa1d0dc78e2b6718d7cbeaf18e SHA512 b5bb9ac4059855c7cac624ea0fdc2c3366cea82bf07bee195a179a0a709fa53e7fffe883e581c1e07a64705a638b156288301227f7334226ddc401a9bf770afe WHIRLPOOL 19c8511ba58186692ee0ace02158c16529715cc213f0eb7266bb078a10db6e698081edc4b3e0735f1e79fb568066cc6f1699d0b1a954a29d74d1a91f393130fa
+DIST puppet-5.3.3.tar.gz 2843386 BLAKE2B dc96282ff2d6bb6719362cd9b2e856537019bd888af8ba897e37fc97584cd76c1d4179b3b629d2bb20d1dade0f84ec88ab41dd0d66cccd2c850a87f96ccf4b65 SHA512 b5bb9ac4059855c7cac624ea0fdc2c3366cea82bf07bee195a179a0a709fa53e7fffe883e581c1e07a64705a638b156288301227f7334226ddc401a9bf770afe

diff --git a/app-admin/puppet/files/puppet.init-r1 b/app-admin/puppet/files/puppet.init-r1
deleted file mode 100644
index 36398d26fe2..00000000000
--- a/app-admin/puppet/files/puppet.init-r1
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-PUPPET_PID_DIR="${PUPPET_PID_DIR:-/var/run/puppet}"
-
-pidfile="${PUPPET_PID_DIR}/puppet.pid"
-PUPPET_LOG_DIR="/var/log/puppet"
-
-extra_started_commands="reload"
-
-command="/usr/bin/puppet"
-
-command_args="agent --pidfile ${pidfile} ${PUPPET_EXTRA_OPTS}"
-
-depend() {
-	need localmount
-	use dns logger puppetmaster netmount nfsmount
-}
-
-start_pre() {
-	checkpath --directory --owner puppet:puppet "${PUPPET_PID_DIR}"
-	checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
-}

diff --git a/app-admin/puppet/files/puppetmaster.init-r1 b/app-admin/puppet/files/puppetmaster.init-r1
deleted file mode 100644
index 22479c5e1a6..00000000000
--- a/app-admin/puppet/files/puppetmaster.init-r1
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-if [ "${SVCNAME}" = "puppetmaster" ] ; then
-	PUPPETMASTER_PID="master"
-else
-	PUPPETMASTER_PID="${SVCNAME#*.}"
-fi
-PUPPETMASTER_PID_DIR="${PUPPETMASTER_PID_DIR:-/var/run/puppet}"
-pidfile="${PUPPETMASTER_PID_DIR}/${PUPPETMASTER_PID}.pid"
-PUPPET_LOG_DIR="/var/log/puppet"
-
-command_args="master --pidfile ${pidfile} ${PUPPETMASTER_EXTRA_OPTS}"
-if [ -n "${PUPPETMASTER_PORT}" ] ; then
-	command_args="${command_args} --masterport ${PUPPETMASTER_PORT}"
-fi
-
-command="/usr/bin/puppet"
-
-depend() {
-	need localmount
-	use dns logger slapd netmount nfsmount
-}
-
-start_pre() {
-	checkpath --directory --owner puppet:puppet "${PUPPETMASTER_PID_DIR}"
-	checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
-	checkpath --file --owner puppet:puppet --mode 640 "${PUPPET_LOG_DIR}/masterhttp.log"
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/
@ 2018-01-28  6:55 Hans de Graaff
  0 siblings, 0 replies; 6+ messages in thread
From: Hans de Graaff @ 2018-01-28  6:55 UTC (permalink / raw
  To: gentoo-commits

commit:     319deed791230fa6ad3d6a7443d400e1caa7409b
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 06:55:19 2018 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Jan 28 06:55:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=319deed7

app-admin/puppet: fix puppetmaster with recent ruby

Backport upstream fix to make puppetmaster work on
ruby 2.3.6 and 2.4.3 again.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-admin/puppet/files/puppet-4-webrick-ruby.patch |  53 ++++++
 app-admin/puppet/puppet-4.10.9-r1.ebuild           | 199 +++++++++++++++++++++
 2 files changed, 252 insertions(+)

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 00000000000..ce4b055644f
--- /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 00000000000..c404e787afc
--- /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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/
@ 2019-10-18 16:03 Matthew Thode
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Thode @ 2019-10-18 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     8d613ebaa25d4ee4499e5a28a3322618e1797418
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 15:55:46 2019 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 16:02:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d613eba

app-admin/puppet: fix 6.10.1 patching

Fixes: https://bugs.gentoo.org/697982
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 .../puppet/files/puppet-fix-tests-6.10.1.patch     | 88 ++++++++++++++++++++++
 app-admin/puppet/puppet-6.10.1.ebuild              |  2 +-
 2 files changed, 89 insertions(+), 1 deletion(-)

diff --git a/app-admin/puppet/files/puppet-fix-tests-6.10.1.patch b/app-admin/puppet/files/puppet-fix-tests-6.10.1.patch
new file mode 100644
index 00000000000..adb9e8dd7d4
--- /dev/null
+++ b/app-admin/puppet/files/puppet-fix-tests-6.10.1.patch
@@ -0,0 +1,88 @@
+***** puppet-fix-tests-6.4.1.patch *****
+PWD: /var/tmp/portage/app-admin/puppet-6.10.1/work/all/puppet-6.10.1
+PATCH TOOL: patch -> /usr/bin/patch
+VERSION INFO:
+GNU patch 2.7.6
+Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
+Copyright (C) 1988 Larry Wall
+
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Larry Wall and Paul Eggert
+
+========================================
+
+PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  --dry-run -f < '/var/tmp/portage/app-admin/puppet-6.10.1/files/puppet-fix-tests-6.4.1.patch'
+
+========================================
+checking file spec/unit/network/http/api/indirected_routes_spec.rb
+Hunk #1 FAILED at 144.
+1 out of 1 hunk FAILED
+
+patch program exited with status 1
+========================================
+
+PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  --dry-run -f < '/var/tmp/portage/app-admin/puppet-6.10.1/files/puppet-fix-tests-6.4.1.patch'
+
+========================================
+can't find file to patch at input line 3
+Perhaps you used the wrong -p or --strip option?
+The text leading up to this was:
+--------------------------
+|--- spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-17 19:36:56.000000000 -0500
+|+++ spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-19 10:52:35.841614932 -0500
+--------------------------
+No file to patch.  Skipping patch.
+1 out of 1 hunk ignored
+
+patch program exited with status 1
+========================================
+
+PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  --dry-run -f < '/var/tmp/portage/app-admin/puppet-6.10.1/files/puppet-fix-tests-6.4.1.patch'
+
+========================================
+can't find file to patch at input line 3
+Perhaps you used the wrong -p or --strip option?
+The text leading up to this was:
+--------------------------
+|--- spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-17 19:36:56.000000000 -0500
+|+++ spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-19 10:52:35.841614932 -0500
+--------------------------
+No file to patch.  Skipping patch.
+1 out of 1 hunk ignored
+
+patch program exited with status 1
+========================================
+
+PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  --dry-run -f < '/var/tmp/portage/app-admin/puppet-6.10.1/files/puppet-fix-tests-6.4.1.patch'
+
+========================================
+can't find file to patch at input line 3
+Perhaps you used the wrong -p or --strip option?
+The text leading up to this was:
+--------------------------
+|--- spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-17 19:36:56.000000000 -0500
+|+++ spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-19 10:52:35.841614932 -0500
+--------------------------
+No file to patch.  Skipping patch.
+1 out of 1 hunk ignored
+
+patch program exited with status 1
+========================================
+
+PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  --dry-run -f < '/var/tmp/portage/app-admin/puppet-6.10.1/files/puppet-fix-tests-6.4.1.patch'
+
+========================================
+can't find file to patch at input line 3
+Perhaps you used the wrong -p or --strip option?
+The text leading up to this was:
+--------------------------
+|--- spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-17 19:36:56.000000000 -0500
+|+++ spec/unit/network/http/api/indirected_routes_spec.rb	2018-09-19 10:52:35.841614932 -0500
+--------------------------
+No file to patch.  Skipping patch.
+1 out of 1 hunk ignored
+
+patch program exited with status 1

diff --git a/app-admin/puppet/puppet-6.10.1.ebuild b/app-admin/puppet/puppet-6.10.1.ebuild
index d633c6865a1..2fac345af4a 100644
--- a/app-admin/puppet/puppet-6.10.1.ebuild
+++ b/app-admin/puppet/puppet-6.10.1.ebuild
@@ -68,7 +68,7 @@ all_ruby_prepare() {
 	rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
 
 	# can't be run within portage.
-	epatch "${FILESDIR}/puppet-fix-tests-6.4.1.patch"
+	epatch "${FILESDIR}/puppet-fix-tests-6.10.1.patch"
 
 	# fix systemd path
 	epatch "${FILESDIR}/puppet-systemd.patch"


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/
@ 2022-12-22 19:53 Matthew Thode
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Thode @ 2022-12-22 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     52c8456296aff281cdf964e85e149f3958212c54
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 19:52:51 2022 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 19:53:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52c84562

app-admin/puppet: fix tmpfiles.d

Closes: https://bugs.gentoo.org/887923

Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 app-admin/puppet/files/puppet.init       |  29 +++++++
 app-admin/puppet/files/tmpfiles.d-2      |   1 +
 app-admin/puppet/puppet-7.21.0-r1.ebuild | 127 +++++++++++++++++++++++++++++++
 3 files changed, 157 insertions(+)

diff --git a/app-admin/puppet/files/puppet.init b/app-admin/puppet/files/puppet.init
new file mode 100644
index 000000000000..ad7a638bebb8
--- /dev/null
+++ b/app-admin/puppet/files/puppet.init
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PUPPET_PID_DIR="${PUPPET_PID_DIR:-/run/puppet}"
+
+pidfile="${PUPPET_PID_DIR}/puppet.pid"
+PUPPET_LOG_DIR="/var/log/puppet"
+
+command="/usr/bin/puppet"
+extra_started_commands="reload"
+
+command_args="agent --pidfile ${pidfile} --confdir /etc/puppetlabs/puppet ${PUPPET_EXTRA_OPTS}"
+
+depend() {
+	need localmount
+	use dns logger puppetmaster netmount nfsmount
+}
+
+start_pre() {
+	checkpath --directory --owner puppet:puppet "${PUPPET_PID_DIR}"
+	checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
+}
+
+reload() {
+    ebegin "Reloading $RC_SVCNAME"
+    start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
+    eend $?
+}

diff --git a/app-admin/puppet/files/tmpfiles.d-2 b/app-admin/puppet/files/tmpfiles.d-2
new file mode 100644
index 000000000000..b36eec4dbdfc
--- /dev/null
+++ b/app-admin/puppet/files/tmpfiles.d-2
@@ -0,0 +1 @@
+D /run/puppet 0755 puppet puppet -

diff --git a/app-admin/puppet/puppet-7.21.0-r1.ebuild b/app-admin/puppet/puppet-7.21.0-r1.ebuild
new file mode 100644
index 000000000000..42b2ff4970b6
--- /dev/null
+++ b/app-admin/puppet/puppet-7.21.0-r1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+USE_RUBY="ruby24 ruby25 ruby26 ruby27"
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+RUBY_FAKEGEM_TASK_DOC="doc:all"
+RUBY_FAKEGEM_EXTRAINSTALL="locales"
+
+inherit ruby-fakegem systemd tmpfiles
+
+DESCRIPTION="A system automation and configuration management software"
+HOMEPAGE="https://puppet.com/"
+SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~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/semantic_puppet
+	>=dev-ruby/facter-3.0.0
+	dev-ruby/concurrent-ruby
+	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
+	acct-user/puppet
+	acct-group/puppet"
+PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
+
+all_ruby_prepare() {
+	# Avoid spec that require unpackaged json-schema.
+	rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
+
+	# fix systemd path
+	eapply -p0 "${FILESDIR}/puppet-systemd.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
+	systemd_dounit "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
+
+	# tmpfiles stuff
+	newtmpfiles "${FILESDIR}/tmpfiles.d-2" "puppet.conf"
+
+	# openrc init stuff
+	newinitd "${FILESDIR}"/puppet.init puppet
+
+	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
+
+	# ext and examples files
+	for f in $(find ext examples -type f) ; do
+		docinto "$(dirname ${f})"
+		dodoc "${f}"
+	done
+}
+
+pkg_postinst() {
+	tmpfiles_process puppet.conf
+
+	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
+	elog "If updating from puppet 5 to 6, keep in mind that webrick (server/master)"
+	elog "suppert was removed for >=6.x, please migrate to puppetserver if you have"
+	elog "not already done so."
+	elog
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-22 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-09 17:06 [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/files/, app-admin/puppet/ Matt Thode
  -- strict thread matches above, loose matches on Subject: below --
2022-12-22 19:53 Matthew Thode
2019-10-18 16:03 Matthew Thode
2018-01-28  6:55 Hans de Graaff
2017-12-03 18:00 Matt Thode
2016-04-28 14:10 Matt Thode

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox