Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,9 +1,8 @@
# $NetBSD: Makefile,v 1.27 2015/07/24 10:24:27 jperkin Exp $
# $NetBSD: Makefile,v 1.43 2016/09/26 07:06:11 jperkin Exp $
DISTNAME= salt-2014.7.2
PKGREVISION= 1
DISTNAME= salt-2016.3.3
CATEGORIES= sysutils
MASTER_SITES= https://pypi.python.org/packages/source/s/salt/
MASTER_SITES= ${MASTER_SITE_PYPI:=s/salt/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://saltstack.org/
@@ -19,24 +18,26 @@ DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
DEPENDS+= ${PYPKGPREFIX}-jinja2-[0-9]*:../../textproc/py-jinja2
DEPENDS+= ${PYPKGPREFIX}-apache-libcloud>=0.14.1:../../net/py-apache-libcloud
DEPENDS+= ${PYPKGPREFIX}-requests>=2.5.0:../../devel/py-requests
DEPENDS+= ${PYPKGPREFIX}-tornado>=4.3:../../www/py-tornado
BUILD_DEFS+= VARBASE
PYTHON_VERSIONS_INCOMPATIBLE= 33 34 # py-m2crypto
PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # py-m2crypto
PYSETUPINSTALLARGS+= --salt-root-dir=${PREFIX}
PYSETUPINSTALLARGS+= --salt-config-dir=${PKG_SYSCONFDIR}
PYSETUPINSTALLARGS+= --salt-cache-dir=${VARBASE}/cache/salt
PYSETUPINSTALLARGS+= --salt-sock-dir==${VARBASE}/run/salt
PYSETUPINSTALLARGS+= --salt-sock-dir=${VARBASE}/run/salt
PYSETUPINSTALLARGS+= --salt-base-file-roots-dir=${PKG_SYSCONFDIR}/states
PYSETUPINSTALLARGS+= --salt-base-pillar-roots-dir=${PKG_SYSCONFDIR}/pillar
PYSETUPINSTALLARGS+= --salt-base-master-roots-dir=${PKG_SYSCONFDIR}/salt-master
PYSETUPINSTALLARGS+= --salt-logs-dir=${VARBASE}/log/salt
PYSETUPINSTALLARGS+= --salt-pidfile-dir=${VARBASE}/run
REPLACE_PYTHON= *.py */*.py */*/*.py
REPLACE_PYTHON= *.py */*.py */*/*.py
REPLACE_SH= salt/templates/git/ssh-id-wrapper
RCD_SCRIPTS+= salt_master salt_minion
RCD_SCRIPTS+= salt_master salt_minion salt_syndic
SMF_INSTANCES= master minion
FILES_SUBST+= PYTHON=${PYTHONBIN:Q}
@@ -57,11 +58,14 @@ SUBST_STAGE.fix-paths= pre-configure
SUBST_MESSAGE.fix-paths=Fixing hardcoded paths
SUBST_FILES.fix-paths= conf/*
SUBST_FILES.fix-paths+= doc/man/* salt/modules/munin.py setup.py
SUBST_FILES.fix-paths+= salt/utils/rsax931.py salt/grains/core.py
SUBST_SED.fix-paths= -e 's,/etc/salt,${PKG_SYSCONFDIR},g'
SUBST_SED.fix-paths+= -e 's,/srv/salt,${PKG_SYSCONFDIR}/states,g'
SUBST_SED.fix-paths+= -e 's,/srv/pillar,${PKG_SYSCONFDIR}/pillar,g'
SUBST_SED.fix-paths+= -e 's,/etc/munin,${PKG_SYSCONFBASEDIR}/munin,g'
SUBST_SED.fix-paths+= -e 's,share/man,man,g'
SUBST_SED.fix-paths+= -e 's,share/man,${PKGMANDIR},g'
SUBST_SED.fix-paths+= -e 's,/opt/local/lib,${PREFIX}/lib,g'
SUBST_SED.fix-paths+= -e 's,/opt/local/etc,${PKG_SYSCONFBASEDIR},g'
post-install:
${INSTALL_DATA} ${WRKSRC}/conf/master ${DESTDIR}${EGDIR}/

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,9 @@
$NetBSD: distinfo,v 1.13 2015/02/23 13:58:13 imil Exp $
$NetBSD: distinfo,v 1.22 2016/09/19 13:34:37 jperkin Exp $
SHA1 (salt-2014.7.2.tar.gz) = f6e8af412e973d8791b4a170eb67055ba1da4dc9
RMD160 (salt-2014.7.2.tar.gz) = 68baabc2654654cb92855b213ecf5c8e161b9b71
Size (salt-2014.7.2.tar.gz) = 3570683 bytes
SHA1 (patch-setup.py) = 1f31af196ff806104bbfdf688cd9d9cc48cee307
SHA1 (salt-2016.3.3.tar.gz) = 9c52a7401c0600cc422ccaa2406909bd6ac71db0
RMD160 (salt-2016.3.3.tar.gz) = 66f5b1615d59d200f82184a142a1a0597fe877ff
SHA512 (salt-2016.3.3.tar.gz) = 46a8f8b3213e4cc02eaed95e7fc28ce224fe07fe2aea39b68ff3e97043021951558f04690f7043510c8dfb62d76fe82192d67de6151c7f1076a23c0f8d796c9e
Size (salt-2016.3.3.tar.gz) = 7952361 bytes
SHA1 (patch-salt_modules_status.py) = 4b2bec94a8554c656baa227ad973b71d2a56d48d
SHA1 (patch-salt_utils_____init____.py) = 61f11da63f26af69334f3eca957d596486396ab0
SHA1 (patch-salt_utils_network.py) = 13db1609939b8e8390656904af86ba92408bb44a

View File

@@ -0,0 +1,20 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: salt_syndic.sh,v 1.1 2016/02/16 00:00:08 khorben Exp $
#
# PROVIDE: salt_syndic
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="salt_syndic"
rcvar=$name
command="@PREFIX@/bin/salt-syndic"
command_args="-d"
command_interpreter=@PYTHON@
required_files="@PKG_SYSCONFDIR@/master @PKG_SYSCONFDIR@/minion"
load_rc_config $name
run_rc_command "$1"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="@SMF_NAME@">
<service_bundle type="manifest" name="export">
<service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
@@ -12,6 +12,7 @@
<method_credential user='root' group='root' />
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
<envvar name="PATH" value="@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin" />
</method_environment>
</method_context>
<instance name='master' enabled='false'>
@@ -30,7 +31,7 @@
<loctext xml:lang='C'>Salt Master daemon</loctext>
</common_name>
<documentation>
<manpage title='salt-master' section='1' manpath='man'/>
<manpage title='salt-master' section='1' manpath='@PREFIX@/@PKGMANDIR@'/>
</documentation>
</template>
</instance>
@@ -50,10 +51,9 @@
<loctext xml:lang='C'>Salt Minion daemon</loctext>
</common_name>
<documentation>
<manpage title='salt-minion' section='1' manpath='man'/>
<manpage title='salt-minion' section='1' manpath='@PREFIX@/@PKGMANDIR@'/>
</documentation>
</template>
</instance>
<stability value="Unstable" />
</service>
</service_bundle>

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-salt_modules_status.py,v 1.3 2016/09/19 13:34:37 jperkin Exp $
Avoid a crash in "status.diskusage" when not on Linux or FreeBSD
--- salt/modules/status.py.orig 2016-08-26 18:55:37.000000000 +0000
+++ salt/modules/status.py
@@ -603,6 +603,8 @@ def diskusage(*args):
ifile = __salt__['cmd.run']('mount -p').splitlines()
elif __grains__['kernel'] == 'SunOS':
ifile = __salt__['cmd.run']('mount -p').splitlines()
+ else:
+ ifile = []
for line in ifile:
comps = line.split()

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-salt_utils_____init____.py,v 1.1 2016/02/16 01:52:34 khorben Exp $
Use sockstat(1) on NetBSD
--- salt/utils/__init__.py.orig 2016-02-01 19:40:31.000000000 +0000
+++ salt/utils/__init__.py
@@ -1664,6 +1664,14 @@ def is_freebsd():
@real_memoize
+def is_netbsd():
+ '''
+ Simple function to return if host is NetBSD or not
+ '''
+ return sys.platform.startswith('netbsd')
+
+
+@real_memoize
def is_openbsd():
'''
Simple function to return if host is OpenBSD or not

View File

@@ -0,0 +1,81 @@
$NetBSD: patch-salt_utils_network.py,v 1.3 2016/09/19 13:34:37 jperkin Exp $
Use sockstat(1) on NetBSD
--- salt/utils/network.py.orig 2016-08-26 18:55:37.000000000 +0000
+++ salt/utils/network.py
@@ -1086,6 +1086,8 @@ def _remotes_on(port, which_end):
return _sunos_remotes_on(port, which_end)
if salt.utils.is_freebsd():
return _freebsd_remotes_on(port, which_end)
+ if salt.utils.is_netbsd():
+ return _netbsd_remotes_on(port, which_end)
if salt.utils.is_openbsd():
return _openbsd_remotes_on(port, which_end)
if salt.utils.is_windows():
@@ -1208,6 +1210,65 @@ def _freebsd_remotes_on(port, which_end)
return remotes
+def _netbsd_remotes_on(port, which_end):
+ '''
+ Returns set of ipv4 host addresses of remote established connections
+ on local tcp port port.
+
+ Parses output of shell 'sockstat' (FreeBSD)
+ to get connections
+
+ $ sudo sockstat -4
+ USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
+ root python2.7 1456 29 tcp4 *.4505 *.*
+ root python2.7 1445 17 tcp4 *.4506 *.*
+ root python2.7 1294 14 tcp4 127.0.0.1.11813 127.0.0.1.4505
+ root python2.7 1294 41 tcp4 127.0.0.1.61115 127.0.0.1.4506
+
+ $ sudo sockstat -4 -c -p 4506
+ USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
+ root python2.7 1294 41 tcp4 127.0.0.1.61115 127.0.0.1.4506
+ '''
+
+ port = int(port)
+ remotes = set()
+
+ try:
+ cmd = shlex.split('sockstat -4 -c -p {0}'.format(port))
+ data = subprocess.check_output(cmd) # pylint: disable=minimum-python-version
+ except subprocess.CalledProcessError as ex:
+ log.error('Failed "sockstat" with returncode = {0}'.format(ex.returncode))
+ raise
+
+ lines = salt.utils.to_str(data).split('\n')
+
+ for line in lines:
+ chunks = line.split()
+ if not chunks:
+ continue
+ # ['root', 'python2.7', '1456', '37', 'tcp4',
+ # '127.0.0.1.4505-', '127.0.0.1.55703']
+ #print chunks
+ if 'COMMAND' in chunks[1]:
+ continue # ignore header
+ if len(chunks) < 2:
+ continue
+ local = chunks[5].split('.')
+ lport = local.pop()
+ lhost = '.'.join(local)
+ remote = chunks[6].split('.')
+ rport = remote.pop()
+ rhost = '.'.join(remote)
+ if which_end == 'local' and int(lport) != port: # ignore if local port not port
+ continue
+ if which_end == 'remote' and int(rport) != port: # ignore if remote port not port
+ continue
+
+ remotes.add(rhost)
+
+ return remotes
+
+
def _openbsd_remotes_on(port, which_end):
'''
OpenBSD specific helper function.