Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2015 13:15:47 +0000 (UTC)
From:      Michael Moll <mmoll@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r397822 - in head/sysutils: . puppet puppet37 puppet4 puppet4/files
Message-ID:  <201509251315.t8PDFlvQ042976@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmoll
Date: Fri Sep 25 13:15:46 2015
New Revision: 397822
URL: https://svnweb.freebsd.org/changeset/ports/397822

Log:
  new port: sysutils/puppet4
  
  This is version 4.x of sysutils/puppet, which is in some large parts
  incompatible with previous versions. As the C++ rewrite of facter is
  not resolving some required facts on FreeBSD yet, default to the old
  version written in Ruby for now.

Added:
  head/sysutils/puppet4/
  head/sysutils/puppet4/Makefile   (contents, props changed)
  head/sysutils/puppet4/distinfo   (contents, props changed)
  head/sysutils/puppet4/files/
  head/sysutils/puppet4/files/patch-ext__rack__config.ru   (contents, props changed)
  head/sysutils/puppet4/files/pkg-message.in   (contents, props changed)
  head/sysutils/puppet4/files/puppet.in   (contents, props changed)
  head/sysutils/puppet4/files/puppetmaster.in   (contents, props changed)
  head/sysutils/puppet4/pkg-descr   (contents, props changed)
  head/sysutils/puppet4/pkg-plist   (contents, props changed)
Modified:
  head/sysutils/Makefile
  head/sysutils/puppet/Makefile
  head/sysutils/puppet37/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Fri Sep 25 12:55:10 2015	(r397821)
+++ head/sysutils/Makefile	Fri Sep 25 13:15:46 2015	(r397822)
@@ -750,6 +750,7 @@
     SUBDIR += pstree
     SUBDIR += ptools
     SUBDIR += puppet37
+    SUBDIR += puppet4
     SUBDIR += puppet
     SUBDIR += puppet-lint
     SUBDIR += puppet-mode.el

Modified: head/sysutils/puppet/Makefile
==============================================================================
--- head/sysutils/puppet/Makefile	Fri Sep 25 12:55:10 2015	(r397821)
+++ head/sysutils/puppet/Makefile	Fri Sep 25 13:15:46 2015	(r397822)
@@ -20,7 +20,7 @@ RUN_DEPENDS=	rubygem-facter>=0:${PORTSDI
 
 USES=		cpe
 CPE_VENDOR=	puppetlabs
-CONFLICTS_INSTALL=	puppet37-*
+CONFLICTS_INSTALL=	puppet37-* puppet4-*
 NO_BUILD=	yes
 USE_RUBY=	yes
 USE_RUBY_FEATURES=	iconv

Modified: head/sysutils/puppet37/Makefile
==============================================================================
--- head/sysutils/puppet37/Makefile	Fri Sep 25 12:55:10 2015	(r397821)
+++ head/sysutils/puppet37/Makefile	Fri Sep 25 13:15:46 2015	(r397822)
@@ -21,7 +21,7 @@ RUN_DEPENDS=	rubygem-facter>=0:${PORTSDI
 
 USES=		cpe
 CPE_VENDOR=	puppetlabs
-CONFLICTS_INSTALL=	puppet-*
+CONFLICTS_INSTALL=	puppet-* puppet4-*
 NO_BUILD=	yes
 USE_RUBY=	yes
 USE_RUBY_FEATURES=	iconv

Added: head/sysutils/puppet4/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/Makefile	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,111 @@
+# $FreeBSD$
+
+PORTNAME=	puppet
+PORTVERSION=	4.2.2
+CATEGORIES=	sysutils
+MASTER_SITES=	http://downloads.puppetlabs.com/puppet/
+PKGNAMESUFFIX=	4
+
+MAINTAINER=	mmoll@FreeBSD.org
+COMMENT=	Configuration management framework written in Ruby
+
+LICENSE=	APACHE20
+
+BUILD_DEPENDS=	rubygem-hiera>=2.0:${PORTSDIR}/sysutils/rubygem-hiera \
+		rubygem-json_pure>=0:${PORTSDIR}/devel/rubygem-json_pure
+RUN_DEPENDS=	rubygem-hiera>=2.0:${PORTSDIR}/sysutils/rubygem-hiera \
+		rubygem-json_pure>=0:${PORTSDIR}/devel/rubygem-json_pure \
+		rubygem-ruby-augeas>=0:${PORTSDIR}/textproc/rubygem-ruby-augeas
+
+USES=		cpe
+CPE_VENDOR=	puppetlabs
+CONFLICTS_INSTALL=	puppet-* puppet37-*
+NO_BUILD=	yes
+USE_RUBY=	yes
+USE_RUBY_FEATURES=	iconv
+USE_RC_SUBR=	puppet puppetmaster
+PORTDOCS=	LICENSE README.md
+PORTEXAMPLES=	*
+USERS=		puppet
+GROUPS=		puppet
+SUB_FILES+=	pkg-message
+SUB_LIST=	RUBY=${RUBY}
+
+OPTIONS_DEFINE=		DOCS EXAMPLES
+OPTIONS_DEFAULT=	RFACTER
+OPTIONS_RADIO=		FACTER
+OPTIONS_RADIO_FACTER=	CFACTER RFACTER
+
+RFACTER_DESC=	Use facter 2.x (written in Ruby)
+CFACTER_DESC=	Use facter 3.x (experimental rewrite in C++)
+
+RFACTER_BUILD_DEPENDS=	rubygem-facter>=2.0:${PORTSDIR}/sysutils/rubygem-facter
+RFACTER_RUN_DEPENDS=	rubygem-facter>=2.0:${PORTSDIR}/sysutils/rubygem-facter
+
+CFACTER_BUILD_DEPENDS=	facter>=3.0:${PORTSDIR}/sysutils/facter
+CFACTER_RUN_DEPENDS=	facter>=3.0:${PORTSDIR}/sysutils/facter
+
+.include <bsd.port.options.mk>
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+	@${REINPLACE_CMD} -e "s|/etc/puppetlabs/puppet|${ETCDIR}|" \
+		${WRKSRC}/install.rb \
+		${WRKSRC}/lib/puppet/reference/configuration.rb \
+		${WRKSRC}/lib/puppet/util/run_mode.rb
+	@${REINPLACE_CMD} -e "s|/etc/puppetlabs/code|${ETCDIR}|" \
+		${WRKSRC}/install.rb \
+		${WRKSRC}/lib/puppet/reference/configuration.rb \
+		${WRKSRC}/lib/puppet/util/run_mode.rb
+	@${REINPLACE_CMD} -e "s|/opt/puppetlabs/puppet/cache|/var/puppet|" \
+		${WRKSRC}/install.rb \
+		${WRKSRC}/lib/puppet/reference/configuration.rb \
+		${WRKSRC}/lib/puppet/util/run_mode.rb
+	@${REINPLACE_CMD} -e "s|/var/run/puppetlabs|/var/run/puppet|" \
+		${WRKSRC}/install.rb \
+		${WRKSRC}/lib/puppet/util/run_mode.rb
+	@${REINPLACE_CMD} -e "s|/var/log/puppetlabs/puppet|/var/log/puppet|" \
+		${WRKSRC}/install.rb \
+		${WRKSRC}/lib/puppet/util/run_mode.rb
+	@${REINPLACE_CMD} -e "s|/opt/puppetlabs/puppet/modules|${ETCDIR}/modules|" \
+		${WRKSRC}/lib/puppet/defaults.rb
+	@${REINPLACE_CMD} -e "s|/opt/puppetlabs/puppet/bin/gem|${LOCALBASE}/bin/gem|" \
+		${WRKSRC}/lib/puppet/provider/package/puppet_gem.rb
+	@${REINPLACE_CMD} -e "s|\$$confdir/ssl|/var/puppet/ssl|" \
+		${WRKSRC}/lib/puppet/defaults.rb
+	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \
+		${WRKSRC}/ext/rack/config.ru
+
+do-install:
+	@cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb --no-configs --destdir=${STAGEDIR}
+
+post-install:
+	${MKDIR} ${STAGEDIR}${ETCDIR}/manifests
+	${MKDIR} ${STAGEDIR}${ETCDIR}/modules
+	${MKDIR} ${STAGEDIR}/var/puppet
+	${INSTALL_DATA} ${WRKSRC}/conf/auth.conf ${STAGEDIR}${ETCDIR}/auth.conf-dist
+	${RUBY} -I ${STAGEDIR}/${RUBY_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/puppet agent --genconfig \
+		--confdir=${ETCDIR} \
+		--rundir=/var/run/puppet \
+		--vardir=/var/puppet \
+		--logdir=/var/log/puppet \
+		--codedir=${ETCDIR} \
+		> ${STAGEDIR}${ETCDIR}/puppet.conf-dist
+	@${ECHO} ${STAGEDIR}${RUBY_SITELIBDIR}/puppet.rb | \
+		${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
+	@${ECHO} ${STAGEDIR}${RUBY_SITELIBDIR}/semver.rb | \
+		${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
+	@${FIND} ${STAGEDIR}${RUBY_SITELIBDIR}/${PORTNAME} -type f | \
+		${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
+	@${FIND} ${STAGEDIR}${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
+		${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+	@${MKDIR} ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKSRC}/ext/rack/config.ru ${STAGEDIR}${WWWDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/ext/rack/example-passenger-vhost.conf ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.post.mk>

Added: head/sysutils/puppet4/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/distinfo	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,2 @@
+SHA256 (puppet-4.2.2.tar.gz) = 2d34cda2c65c885ba16e6644edd7733d55e6a0e1011a1f0f7fe80b411affc348
+SIZE (puppet-4.2.2.tar.gz) = 2550591

Added: head/sysutils/puppet4/files/patch-ext__rack__config.ru
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/files/patch-ext__rack__config.ru	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,19 @@
+--- ext/rack/config.ru.orig	2015-08-09 23:14:59 UTC
++++ ext/rack/config.ru
+@@ -14,11 +14,11 @@ ARGV << "--rack"
+ # Rack applications typically don't start as root.  Set --confdir, --vardir,
+ # --logdir, --rundir to prevent reading configuration from
+ # ~/ based pathing.
+-ARGV << "--confdir" << "/etc/puppetlabs/puppet"
+-ARGV << "--vardir"  << "/opt/puppetlabs/server/data/puppetmaster"
+-ARGV << "--logdir"  << "/var/log/puppetlabs/puppetmaster"
+-ARGV << "--rundir"  << "/var/run/puppetlabs/puppetmaster"
+-ARGV << "--codedir"  << "/etc/puppetlabs/code"
++ARGV << "--confdir" << "%%PREFIX%%/etc/puppet"
++ARGV << "--vardir"  << "/var/puppet"
++ARGV << "--logdir"  << "/var/log/puppet"
++ARGV << "--rundir"  << "/var/run/puppet"
++ARGV << "--codedir" << "%%PREFIX%%/etc/puppet"
+ 
+ # always_cache_features is a performance improvement and safe for a master to
+ # apply. This is intended to allow agents to recognize new features that may be

Added: head/sysutils/puppet4/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/files/pkg-message.in	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,14 @@
+
+To enable the puppet agent, add the following to /etc/rc.conf:
+
+	puppet_enable="YES"
+
+To enable the puppetmaster, add the following to /etc/rc.conf:
+
+	puppetmaster_enable="YES"
+
+Individual config files such as %%PREFIX%%/etc/puppetmasterd.conf are
+deprecated. Use a single file, %%ETCDIR%%/puppet.conf.
+
+The default PID directory is /var/run/puppet
+

Added: head/sysutils/puppet4/files/puppet.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/files/puppet.in	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: puppet
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable the puppet agent:
+#
+# puppet_enable="YES"
+
+. /etc/rc.subr
+
+name="puppet"
+rcvar=puppet_enable
+
+load_rc_config "$name"
+
+: ${puppet_enable="NO"}
+: ${puppet_rundir="/var/run/puppet"}
+
+command="%%PREFIX%%/bin/puppet"
+command_args="agent ${puppet_flags} --rundir=${puppet_rundir}"
+command_interpreter=%%RUBY%%
+unset puppet_flags
+
+pidfile="${puppet_rundir}/agent.pid"
+start_precmd="install -d -o puppet -g puppet ${pidfile%/*}"
+
+run_rc_command "$1"

Added: head/sysutils/puppet4/files/puppetmaster.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/files/puppetmaster.in	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: puppetmaster
+# REQUIRE: LOGIN
+
+# Add the following lines to /etc/rc.conf to enable the puppetmaster:
+#
+# puppetmaster_enable="YES"
+#
+
+. /etc/rc.subr
+
+name="puppetmaster"
+rcvar=puppetmaster_enable
+
+load_rc_config "${name}"
+
+: ${puppetmaster_enable="NO"}
+: ${puppetmaster_rundir="/var/run/puppet"}
+: ${puppetmaster_flags="--rundir=${puppetmaster_rundir}"}
+
+command_interpreter=%%RUBY%%
+command="%%PREFIX%%/bin/puppet"
+command_args="master ${puppetmaster_flags}"
+unset puppetmaster_flags
+
+pidfile="${puppetmaster_rundir}/master.pid"
+puppet_manifest="$($command config print manifest)"
+
+start_precmd="puppetmaster_checkconfig"
+restart_precmd="puppetmaster_checkconfig"
+puppetmaster_checkconfig() {
+	echo -n "Performing sanity check of ${name} configuration: "
+	if ! ${command} parser validate "${puppet_manifest}"
+	then
+		echo "FAILED"
+		return 1
+	else
+		echo "OK"
+		return 0
+	fi
+}
+
+if [ -z "${puppetmaster_mongrel_ports}" ]; then
+	run_rc_command "$1"
+else
+	for port in ${puppetmaster_mongrel_ports}; do
+		pidfile="${puppetmaster_rundir}/mongrel.${port}.pid"
+		command_args="master --pidfile=${pidfile} --servertype=mongrel --masterport=${port}"
+		run_rc_command "$1"
+		_rc_restart_done="false"
+	done
+fi

Added: head/sysutils/puppet4/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/pkg-descr	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,7 @@
+Puppet lets you centrally manage every important aspect of your system using
+a cross-platform specification language that manages all the separate
+elements normally aggregated in different files, like users, cron jobs, and
+hosts, along with obviously discrete elements like packages, services, and
+files.
+
+WWW: https://puppetlabs.com/puppet/puppet-open-source

Added: head/sysutils/puppet4/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/puppet4/pkg-plist	Fri Sep 25 13:15:46 2015	(r397822)
@@ -0,0 +1,46 @@
+bin/extlookup2hiera
+bin/puppet
+%%ETCDIR%%/auth.conf-dist
+%%ETCDIR%%/puppet.conf-dist
+%%RUBY_SITELIBDIR%%/hiera/puppet_function.rb
+%%RUBY_SITELIBDIR%%/hiera/scope.rb
+%%RUBY_SITELIBDIR%%/hiera_puppet.rb
+%%RUBY_SITELIBDIR%%/puppet_x.rb
+man/man5/puppet.conf.5.gz
+man/man8/extlookup2hiera.8.gz
+man/man8/puppet-agent.8.gz
+man/man8/puppet-apply.8.gz
+man/man8/puppet-ca.8.gz
+man/man8/puppet-catalog.8.gz
+man/man8/puppet-cert.8.gz
+man/man8/puppet-certificate.8.gz
+man/man8/puppet-certificate_request.8.gz
+man/man8/puppet-certificate_revocation_list.8.gz
+man/man8/puppet-config.8.gz
+man/man8/puppet-describe.8.gz
+man/man8/puppet-device.8.gz
+man/man8/puppet-doc.8.gz
+man/man8/puppet-epp.8.gz
+man/man8/puppet-facts.8.gz
+man/man8/puppet-file.8.gz
+man/man8/puppet-filebucket.8.gz
+man/man8/puppet-help.8.gz
+man/man8/puppet-inspect.8.gz
+man/man8/puppet-key.8.gz
+man/man8/puppet-man.8.gz
+man/man8/puppet-master.8.gz
+man/man8/puppet-module.8.gz
+man/man8/puppet-node.8.gz
+man/man8/puppet-parser.8.gz
+man/man8/puppet-plugin.8.gz
+man/man8/puppet-report.8.gz
+man/man8/puppet-resource.8.gz
+man/man8/puppet-resource_type.8.gz
+man/man8/puppet-status.8.gz
+man/man8/puppet.8.gz
+@(puppet,puppet,) %%WWWDIR%%/config.ru
+@dir(puppet,puppet,) %%ETCDIR%%/manifests
+@dir(puppet,puppet,) %%ETCDIR%%/modules
+@dir(puppet,puppet,) /var/puppet
+@dir(puppet,puppet,) /var/log/puppet
+@dir /var/run/puppet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509251315.t8PDFlvQ042976>