Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

5
sysutils/puppet/DESCR Normal file
View File

@@ -0,0 +1,5 @@
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.

116
sysutils/puppet/Makefile Normal file
View File

@@ -0,0 +1,116 @@
# $NetBSD: Makefile,v 1.15 2013/04/25 12:11:21 joerg Exp $
DISTNAME= puppet-3.1.1
CATEGORIES= sysutils
#MASTER_SITES= http://puppetlabs.com/downloads/puppet/
MAINTAINER= tonnerre@NetBSD.org
HOMEPAGE= http://www.puppetlabs.com/
COMMENT= Configuration management framework written in Ruby
LICENSE= gnu-gpl-v2
DEPENDS+= ${RUBY_PKGPREFIX}-facter>=1.6.18:../../sysutils/ruby-facter
DEPENDS+= ${RUBY_PKGPREFIX}-hiera>=1.0.0:../../databases/ruby-hiera
DEPENDS+= ${RUBY_PKGPREFIX}-io-console>=0.3:../../devel/ruby-io-console
DEPENDS+= ${RUBY_PKGPREFIX}-json-pure>=0:../../textproc/ruby-json-pure
DEPENDS+= ${RUBY_PKGPREFIX}-minitest>=2.5.1:../../devel/ruby-minitest
DEPENDS+= ${RUBY_PKGPREFIX}-shadow>=2.0.0:../../security/ruby-shadow
RUBY_VERSION_SUPPORTED= 193
CONFLICTS+= ruby[1-9][0-9]-puppet-[0-9]* puppet-[0-9]*
PKG_SYSCONFSUBDIR= puppet
RCD_SCRIPTS= puppetd puppetmasterd
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= post-patch
SUBST_FILES.prefix= install.rb
SUBST_FILES.prefix+= lib/puppet/face/module/changes.rb
SUBST_FILES.prefix+= lib/puppet/face/module/install.rb
SUBST_FILES.prefix+= lib/puppet/face/module/list.rb
SUBST_FILES.prefix+= lib/puppet/face/module/uninstall.rb
SUBST_FILES.prefix+= lib/puppet/face/module/upgrade.rb
SUBST_FILES.prefix+= lib/puppet/parser/functions/extlookup.rb
SUBST_FILES.prefix+= lib/puppet/reference/configuration.rb
SUBST_FILES.prefix+= lib/puppet/defaults.rb lib/puppet/util/run_mode.rb
SUBST_FILES.prefix+= bin/puppet ext/rack/manifest.pp
SUBST_FILES.prefix+= ext/rack/files/apache2.conf ext/rack/files/config.ru
SUBST_FILES.prefix+= ext/solaris/smf/puppetd.xml
SUBST_FILES.prefix+= ext/solaris/smf/puppetmasterd.xml
SUBST_FILES.prefix+= man/man5/puppet.conf.5
SUBST_FILES.prefix+= man/man8/puppet.8
SUBST_FILES.prefix+= man/man8/puppet-apply.8
SUBST_FILES.prefix+= man/man8/puppet-device.8
SUBST_FILES.prefix+= man/man8/puppet-doc.8
SUBST_FILES.prefix+= man/man8/puppet-module.8
SUBST_FILES.prefix+= man/man8/puppet-parser.8
SUBST_FILES.prefix+= spec/unit/util/run_mode_spec.rb
SUBST_FILES.prefix+= spec/unit/util/selinux_spec.rb
SUBST_FILES.prefix+= spec/unit/indirector/catalog/static_compiler_spec.rb
SUBST_SED.prefix= -e "s|/etc/puppet|${PKG_SYSCONFDIR}|g"
SUBST_SED.prefix+= -e "s|/opt/csw/lib|${PREFIX}/lib|g"
EGDIR= share/examples/${PKGBASE}
CONF_FILES= ${EGDIR}/puppet.conf ${PKG_SYSCONFDIR}/puppet.conf
## Since these users are needed only for puppet server,
## puppet-server package should be created.
#SUBST_CLASSES+= user
#SUBST_STAGE.user= post-patch
#SUBST_FILES.user= lib/puppet/defaults.rb
#SUBST_SED.user= -e "s|@PUPPET_GROUP@|${PUPPET_GROUP}|g"
#SUBST_SED.user+= -e "s|@PUPPET_USER@|${PUPPET_USER}|g"
#
#PKG_GROUPS_VARS= PUPPET_GROUP
#PKG_USERS_VARS= PUPPET_USER
#
#PKG_GROUPS= ${PUPPET_GROUP}
#PKG_USERS= ${PUPPET_USER}:${PUPPET_GROUP}
#PKG_GECOS.${PUPPET_USER}= Puppet configuration management pseudo-user
PLIST_SUBST+= EGDIR=${EGDIR}
PLIST_VARS+= sunos
BUILD_DEFS+= VARBASE
INSTALLATION_DIRS+= ${EGDIR}
.include "../../mk/bsd.prefs.mk"
#PUPPET_GROUP?= puppet
#PUPPET_USER?= puppet
.if ${OPSYS} == "SunOS"
INSTALLATION_DIRS+= lib/svc/method ${EGDIR}/svc
CONF_DIRS+= ${VARBASE}/svc/manifest
CONF_FILES+= ${EGDIR}/svc/puppetd.xml ${VARBASE}/svc/manifest/puppetd.xml
CONF_FILES+= ${EGDIR}/svc/puppetmasterd.xml ${VARBASE}/svc/manifest/puppetmasterd.xml
PLIST.sunos= yes
.endif
pre-build:
cd ${WRKSRC} && ${FIND} . -type f -exec ${CHMOD} g-w {} \;
cd ${WRKSRC} && \
${FIND} lib/puppet spec -type f -exec ${CHMOD} -x {} \;
cd ${WRKSRC} && ${RUBY} -Ilib bin/puppet agent \
--confdir=${PKG_SYSCONFDIR:Q} --rundir=${VARBASE:Q}/run \
--genconfig | \
${SED} -e 's/genconfig = true/# genconfig = false/' \
> examples/puppet.conf
post-install:
${INSTALL_DATA} ${WRKSRC}/examples/puppet.conf \
${DESTDIR}${PREFIX}/${EGDIR}
.if ${OPSYS} == "SunOS"
${INSTALL_DATA} ${WRKSRC}/ext/solaris/smf/puppetd.xml \
${DESTDIR}${PREFIX}/${EGDIR}/svc
${INSTALL_DATA} ${WRKSRC}/ext/solaris/smf/puppetmasterd.xml \
${DESTDIR}${PREFIX}/${EGDIR}/svc
${INSTALL_SCRIPT} ${WRKSRC}/ext/solaris/smf/svc-puppetd \
${DESTDIR}${PREFIX}/lib/svc/method
${INSTALL_SCRIPT} ${WRKSRC}/ext/solaris/smf/svc-puppetmasterd \
${DESTDIR}${PREFIX}/lib/svc/method
.endif
.include "../../lang/ruby/gem.mk"
.include "../../mk/bsd.pkg.mk"

1754
sysutils/puppet/PLIST Normal file

File diff suppressed because it is too large Load Diff

9
sysutils/puppet/distinfo Normal file
View File

@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.8 2013/04/10 21:10:54 tonnerre Exp $
SHA1 (puppet-3.1.1.gem) = 4f6adf79ab3ff5204178102375e79ca9e486042d
RMD160 (puppet-3.1.1.gem) = 59cb6269f5cf0bcb89f643cb9ed211ab1640ff1d
Size (puppet-3.1.1.gem) = 1590272 bytes
SHA1 (patch-aa) = 153dcff431d6c642872d3aa2118bc2505c996e94
SHA1 (patch-ab) = bc90687cd03181211b6fe3d6f056e653334d96a9
SHA1 (patch-ac) = eda614eeee25b18ab36335fc7147fbe7ab770249
SHA1 (patch-ad) = 7feaab50c3c8ce2ed350dac3222fdf1bd2b34191

View File

@@ -0,0 +1,36 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: puppetd.sh,v 1.3 2013/04/10 21:10:55 tonnerre Exp $
#
# PROVIDE: puppetd
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable puppetd:
#
# puppetd="YES"
# puppetd_confdir="@PKG_SYSCONFDIR@"
# puppetd_pid="/var/run/${name}.pid"
# puppetd_flags="agent --confdir $puppetd_confdir --rundir /var/run"
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="puppetd"
rcvar=$name
command="@PREFIX@/bin/puppet"
command_interpreter="@RUBY@"
: ${puppetd_confdir="@PKG_SYSCONFDIR@"}
: ${puppetd_pid="/var/run/${name}.pid"}
: ${puppetd_flags="agent --confdir $puppetd_confdir --rundir /var/run"}
pidfile="$puppetd_pid"
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config $name
elif [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
run_rc_command "$1"

View File

@@ -0,0 +1,51 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: puppetmasterd.sh,v 1.3 2013/04/10 21:10:55 tonnerre Exp $
#
# PROVIDE: puppetmasterd
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable puppetmasterd:
#
# puppetmasterd="YES"
# puppetmasterd_confdir: Set to @PKG_SYSCONFDIR@ by default
# puppetmasterd_flags: Set to master --confdir $puppetmasterd_confdir --rundir /var/run" by default
#
if [ -f /etc/rc.subr ]; then
$_rc_subr_loaded . /etc/rc.subr
fi
name="puppetmasterd"
rcvar=$name
command="@PREFIX@/bin/puppet"
command_interpreter="@RUBY@"
start_precmd="puppetmasterd_checkconfig"
restart_precmd="puppetmasterd_checkconfig"
: ${puppetmasterd_confdir="@PKG_SYSCONFDIR@"}
: ${puppetmasterd_pid="/var/run/${name}.pid"}
: ${puppetmasterd_flags="master --confdir $puppetmasterd_confdir --rundir /var/run"}
pidfile="$puppetmasterd_pid"
puppetmasterd_checkconfig() {
echo -n "Performing sanity check of ${name} configuration: "
${command} --parseonly ${puppetmasterd_flags} >/dev/null 2>&1
rv=$?
if [ $rv != 0 ]; then
echo "FAILED, ${name} exited with status ${rv}"
${command} --parseonly ${puppetmasterd_flags}
return 1
else
echo "OK"
fi
}
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config "$name"
elif [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
run_rc_command "$1"

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-aa,v 1.5 2013/04/10 21:10:55 tonnerre Exp $
Add NetBSD to list of operating systems that the OpenBSD provider is the
default for now. In fact, NetBSD's pkg_add provider can do a lot more
than OpenBSD's, but for now basic support should suffice.
--- lib/puppet/provider/package/openbsd.rb.orig 2013-04-01 00:44:50.000000000 +0000
+++ lib/puppet/provider/package/openbsd.rb
@@ -7,7 +7,7 @@ Puppet::Type.type(:package).provide :ope
commands :pkginfo => "pkg_info", :pkgadd => "pkg_add", :pkgdelete => "pkg_delete"
defaultfor :operatingsystem => :openbsd
- confine :operatingsystem => :openbsd
+ confine :operatingsystem => [:openbsd, :netbsd]
has_feature :versionable

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-ab,v 1.5 2013/04/10 21:10:55 tonnerre Exp $
Make the FreeBSD provider the default for NetBSD as well.
Omit _enabled for init scripts under NetBSD, which doesn't look for them.
--- lib/puppet/provider/service/freebsd.rb.orig 2013-04-01 00:44:50.000000000 +0000
+++ lib/puppet/provider/service/freebsd.rb
@@ -3,7 +3,7 @@ Puppet::Type.type(:service).provide :fre
desc "Provider for FreeBSD and DragonFly BSD. Uses the `rcvar` argument of init scripts and parses/edits rc files."
confine :operatingsystem => [:freebsd, :dragonfly]
- defaultfor :operatingsystem => [:freebsd, :dragonfly]
+ defaultfor :operatingsystem => [:freebsd, :netbsd, :dragonfly]
def rcconf() '/etc/rc.conf' end
def rcconf_local() '/etc/rc.conf.local' end
@@ -86,6 +86,9 @@ Puppet::Type.type(:service).provide :fre
# Add a new setting to the rc files
def rc_add(service, rcvar, yesno)
append = "\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"\n"
+ if Facter.value(:operatingsystem) == "NetBSD"
+ append = "\# Added by Puppet\n#{rcvar}=\"#{yesno}\"\n"
+ end
# First, try the one-file-per-service style
if File.exists?(rcconf_dir)
File.open(rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0644) {

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-ac,v 1.6 2013/04/10 21:10:55 tonnerre Exp $
NetBSD also has its init scripts in /etc/rc.d.
--- lib/puppet/provider/service/init.rb.orig 2013-04-01 00:44:50.000000000 +0000
+++ lib/puppet/provider/service/init.rb
@@ -9,7 +9,7 @@ Puppet::Type.type(:service).provide :ini
["/etc/rc.d", "/usr/local/etc/rc.d"]
when "HP-UX"
"/sbin/init.d"
- when "Archlinux"
+ when "Archlinux", "NetBSD"
"/etc/rc.d"
else
"/etc/init.d"

View File

@@ -0,0 +1,39 @@
$NetBSD: patch-ad,v 1.3 2013/04/10 21:10:55 tonnerre Exp $
Add NetBSD and update support to the pkgin provider.
--- lib/puppet/provider/package/pkgin.rb.orig 2013-04-07 00:25:33.000000000 +0000
+++ lib/puppet/provider/package/pkgin.rb
@@ -5,9 +5,9 @@ Puppet::Type.type(:package).provide :pkg
commands :pkgin => "pkgin"
- defaultfor :operatingsystem => :dragonfly
+ defaultfor :operatingsystem => [:dragonfly, :netbsd]
- has_feature :installable, :uninstallable
+ has_feature :installable, :uninstallable, :versionable, :upgradeable
def self.parse_pkgin_line(package, force_status=nil)
@@ -59,4 +59,20 @@ Puppet::Type.type(:package).provide :pkg
def uninstall
pkgin("-y", :remove, resource[:name])
end
+
+ def update
+ pkgin("-y", :install, resource[:name])
+ end
+
+ def latest
+ output = pkgin("se", @resource[:name])
+ pat = @resource[:name]
+
+ if output =~ /^#{pat}-(\d\S*)\s/
+ return $1
+ else
+ self.err "Could not find latest version of %s" % pat
+ return nil
+ end
+ end
end