diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile index c36fdbdc6623..f8bbe570d5a2 100644 --- a/sysutils/puppet/Makefile +++ b/sysutils/puppet/Makefile @@ -1,116 +1,116 @@ # Created by: Tomoyuki Sakurai # $FreeBSD$ PORTNAME= puppet PORTVERSION= 3.3.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ MAINTAINER= swills@FreeBSD.org COMMENT= A configuration management framework written in Ruby RUN_DEPENDS= rubygem-facter>=0:${PORTSDIR}/sysutils/rubygem-facter \ rubygem-ruby-augeas>=0:${PORTSDIR}/textproc/rubygem-augeas \ rubygem-hiera>=0:${PORTSDIR}/sysutils/rubygem-hiera CONFLICTS= puppet-2* 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} MANCOMPRESSED= yes MAN5= puppet.conf.5 MAN8= extlookup2hiera.8 puppet-agent.8 puppet-apply.8 puppet-ca.8 \ puppet-catalog.8 puppet-cert.8 puppet-certificate.8 \ puppet-certificate_request.8 puppet-certificate_revocation_list.8 \ puppet-config.8 puppet-describe.8 puppet-device.8 puppet-doc.8 \ puppet-facts.8 puppet-file.8 puppet-filebucket.8 puppet-help.8 \ puppet-inspect.8 puppet-instrumentation_data.8 \ puppet-instrumentation_listener.8 puppet-instrumentation_probe.8 \ puppet-key.8 puppet-kick.8 puppet-man.8 puppet-master.8 \ puppet-module.8 puppet-node.8 puppet-parser.8 puppet-plugin.8 \ puppet-queue.8 puppet-report.8 puppet-resource.8 \ puppet-resource_type.8 puppet-secret_agent.8 puppet-status.8 \ puppet.8 OPTIONS_DEFAULT= PACKAGE_ORIGIN OPTIONS_SINGLE= PATCHES OPTIONS_SINGLE_PATCHES= PACKAGE_ORIGIN PACKAGE_ROOT PACKAGE_ORIGIN_DESC= Use port origin as package name PACKAGE_ROOT_DESC= Use PACKAGEROOT insted of PACKAGESITE PATCHES_DESC= Optional exclusive patches NO_STAGE= yes .include .if ${PORT_OPTIONS:MPACKAGE_ROOT} .if ! ${PORT_OPTIONS:MPACKAGE_ORIGIN} EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_root .else BROKEN= PACKAGE_ROOT option patch is incompatable with PACKAGE_ORIGIN patch. .endif .endif .include .if ${PORT_OPTIONS:MPACKAGE_ORIGIN} EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_origin .if ${RUBY_VER} == 1.8 || ${RUBY_VER} == 1.9 RUN_DEPENDS+= rubygem-bzip2>=0:${PORTSDIR}/archivers/rubygem-bzip2 .endif .endif post-patch: @${REINPLACE_CMD} -e "s|/etc/puppet|${ETCDIR}|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/defaults.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/var/lib/puppet|/var/puppet|" \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|\$$vardir/run|/var/run/puppet|" \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|\$$confdir/ssl|/var/puppet/ssl|" \ ${WRKSRC}/lib/puppet/defaults.rb do-install: @cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb --no-configs post-install: ${INSTALL} -d ${ETCDIR} ${INSTALL} -m 0755 -o puppet -g puppet -d /var/puppet ${INSTALL} -m 0644 ${WRKSRC}/conf/auth.conf ${ETCDIR}/auth.conf-dist ${RUBY} -I ${RUBY_SITELIBDIR} ${PREFIX}/bin/puppet master --genconfig \ --confdir=${ETCDIR} \ --rundir=/var/run/puppet \ --vardir=/var/lib/puppet \ --logdir=/var/log/puppet \ > ${ETCDIR}/puppet.conf-dist ${MKDIR} -p ${ETCDIR}/modules @${ECHO} ${RUBY_SITELIBDIR}/puppet.rb | \ ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} @${ECHO} ${RUBY_SITELIBDIR}/semver.rb | \ ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} @${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \ ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} @${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \ ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} .if ${PORT_OPTIONS:MDOCS} ${INSTALL} -d ${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif .if ${PORT_OPTIONS:MEXAMPLES} cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR} .endif @${CAT} ${PKGMESSAGE} .include diff --git a/sysutils/puppet/files/puppet.in b/sysutils/puppet/files/puppet.in index 412e61f48354..c741d40c14f6 100644 --- a/sysutils/puppet/files/puppet.in +++ b/sysutils/puppet/files/puppet.in @@ -1,33 +1,33 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: puppet # REQUIRE: NETWORK # 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=%%PREFIX%%/bin/ruby +command_interpreter=%%RUBY%% unset puppet_flags pidfile="${puppet_rundir}/agent.pid" start_precmd="install -d -o puppet -g puppet ${pidfile%/*}" run_rc_command "$1" diff --git a/sysutils/puppet/files/puppetmaster.in b/sysutils/puppet/files/puppetmaster.in index 26bcda5a805a..7230bda90df3 100644 --- a/sysutils/puppet/files/puppetmaster.in +++ b/sysutils/puppet/files/puppetmaster.in @@ -1,56 +1,56 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: puppetmaster # REQUIRE: NETWORK # 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=%%PREFIX%%/bin/ruby +command_interpreter=%%RUBY%% command="%%PREFIX%%/bin/puppet" command_args="master ${puppetmaster_flags}" unset puppetmaster_flags pidfile="${puppetmaster_rundir}/master.pid" puppet_manifestdir="$($command config print manifestdir)" start_precmd="puppetmaster_checkconfig" restart_precmd="puppetmaster_checkconfig" puppetmaster_checkconfig() { echo -n "Performing sanity check of ${name} configuration: " if ! ${command} parser validate "${puppet_manifestdir}/site.pp" 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