Date: Sat, 19 May 2018 16:35:49 +0000 (UTC) From: Martin Wilke <miwi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470421 - in head/net-mgmt/crmsh: . files Message-ID: <201805191635.w4JGZnj8006924@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: miwi Date: Sat May 19 16:35:48 2018 New Revision: 470421 URL: https://svnweb.freebsd.org/changeset/ports/470421 Log: - Update to 3.0.1 PR: 228186 Submitted by: maintainer Sponsored by: iXsystems Inc. Added: head/net-mgmt/crmsh/files/patch-crmsh_corosync.py (contents, props changed) head/net-mgmt/crmsh/files/patch-crmsh_utils.py (contents, props changed) head/net-mgmt/crmsh/files/patch-hb__report_hb__report.in (contents, props changed) head/net-mgmt/crmsh/files/patch-hb__report_openais__conf__support.sh (contents, props changed) head/net-mgmt/crmsh/files/patch-hb__report_utillib.sh (contents, props changed) head/net-mgmt/crmsh/files/patch-scripts_health_collect.py (contents, props changed) head/net-mgmt/crmsh/files/patch-utils_crm__init.py (contents, props changed) Modified: head/net-mgmt/crmsh/Makefile head/net-mgmt/crmsh/distinfo head/net-mgmt/crmsh/pkg-plist Modified: head/net-mgmt/crmsh/Makefile ============================================================================== --- head/net-mgmt/crmsh/Makefile Sat May 19 16:34:16 2018 (r470420) +++ head/net-mgmt/crmsh/Makefile Sat May 19 16:35:48 2018 (r470421) @@ -1,52 +1,62 @@ -# Created by: dpejesh@yahoo.com +# Created by: David Shane Holden <dpejesh@yahoo.com> # $FreeBSD$ -PORTNAME= crmsh -PORTVERSION= 3.0.0 -PORTREVISION= 1 -CATEGORIES= net-mgmt python +PORTNAME= crmsh +PORTVERSION= 3.0.1 +CATEGORIES= net-mgmt python -MAINTAINER= dpejesh@yahoo.com -COMMENT= Command-line interface for High-Availability cluster management +MAINTAINER= dpejesh@yahoo.com +COMMENT= Command-line interface for High-Availability cluster management -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING # Set the build/run depends on setuptools instead of adding distutils to USE_PYTHON # because the crmsh build uses autotools which then calls setup.py. -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dateutil>0:devel/py-dateutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}parallax>0:devel/py-parallax@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} -USE_GITHUB= yes -GH_ACCOUNT= ClusterLabs +USES= autoreconf gmake python:2.7 shebangfix +USE_GITHUB= yes +GH_ACCOUNT= ClusterLabs +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-ocf-root=${PREFIX}/lib/ocf +USE_GITHUB= yes +GH_ACCOUNT= ClusterLabs -USES= autoreconf gmake python:2.7 shebangfix -USE_PYTHON= flavors -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-ocf-root=${PREFIX}/lib/ocf -NO_ARCH= yes +NO_ARCH= yes -SHEBANG_FILES= bin/crm \ - scripts/*/*.py \ - test/cib-tests.sh \ - test/evaltest.sh \ - test/list-undocumented-commands.py \ - utils/crm_clean.py \ - utils/crm_pkg.py \ - utils/crm_rpmcheck.py +SHEBANG_FILES= bin/crm \ + scripts/*/*.py \ + test/cib-tests.sh \ + test/evaltest.sh \ + test/list-undocumented-commands.py \ + utils/crm_clean.py \ + utils/crm_pkg.py \ + utils/crm_rpmcheck.py -OPTIONS_DEFINE= DOCS MANPAGES -OPTIONS_DEFAULT=MANPAGES -OPTIONS_SUB= yes +OPTIONS_DEFINE= DOCS MANPAGES +OPTIONS_DEFAULT= MANPAGES +OPTIONS_SUB= yes DOCS_BUILD_DEPENDS= asciidoc:textproc/asciidoc MANPAGES_BUILD_DEPENDS= ${DOCS_BUILD_DEPENDS} post-patch: - ${REINPLACE_CMD} 's,%%DATADIR%%,${DATADIR},' ${WRKSRC}/setup.py + @${REINPLACE_CMD} 's,%%DATADIR%%,${DATADIR},g' ${WRKSRC}/setup.py + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/crmsh/corosync.py + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/crmsh/utils.py + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/hb_report/hb_report.in + @${REINPLACE_CMD} 's,%%PYTHON_CMD%%,${PYTHON_CMD},g' ${WRKSRC}/hb_report/hb_report.in + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/hb_report/openais_conf_support.sh + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/hb_report/utillib.sh + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/scripts/health/collect.py + @${REINPLACE_CMD} 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/utils/crm_init.py post-install: ${MV} ${STAGEDIR}${PREFIX}/etc/crm/crm.conf \ Modified: head/net-mgmt/crmsh/distinfo ============================================================================== --- head/net-mgmt/crmsh/distinfo Sat May 19 16:34:16 2018 (r470420) +++ head/net-mgmt/crmsh/distinfo Sat May 19 16:35:48 2018 (r470421) @@ -1,3 +1,3 @@ -TIMESTAMP = 1495219830 -SHA256 (ClusterLabs-crmsh-3.0.0_GH0.tar.gz) = eb3d99999b7f1e31fef28de90fa5b038f316a02a35c47a1286d374eb7a569168 -SIZE (ClusterLabs-crmsh-3.0.0_GH0.tar.gz) = 943585 +TIMESTAMP = 1523916691 +SHA256 (ClusterLabs-crmsh-3.0.1_GH0.tar.gz) = de10df384d3a5b5700cce96b9e907c2e5c17bffc376bc65503f50219d9812b15 +SIZE (ClusterLabs-crmsh-3.0.1_GH0.tar.gz) = 947261 Added: head/net-mgmt/crmsh/files/patch-crmsh_corosync.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-crmsh_corosync.py Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,11 @@ +--- crmsh/corosync.py.orig 2018-04-19 03:47:12 UTC ++++ crmsh/corosync.py +@@ -14,7 +14,7 @@ from .msg import err_buf, common_debug + + + def conf(): +- return os.getenv('COROSYNC_MAIN_CONFIG_FILE', '/etc/corosync/corosync.conf') ++ return os.getenv('COROSYNC_MAIN_CONFIG_FILE', '%%PREFIX%%/etc/corosync/corosync.conf') + + + def is_corosync_stack(): Added: head/net-mgmt/crmsh/files/patch-crmsh_utils.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-crmsh_utils.py Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,29 @@ +--- crmsh/utils.py.orig 2018-04-19 03:54:07 UTC ++++ crmsh/utils.py +@@ -989,7 +989,7 @@ def cluster_stack(): + return "heartbeat" + elif is_process("[a]isexec"): + return "openais" +- elif os.path.exists("/etc/corosync/corosync.conf") or is_program('corosync-cfgtool'): ++ elif os.path.exists("%%PREFIX%%/etc/corosync/corosync.conf") or is_program('corosync-cfgtool'): + return "corosync" + return "" + +@@ -1551,7 +1551,7 @@ def list_corosync_node_names(): + in corosync.conf + ''' + try: +- cfg = os.getenv('COROSYNC_MAIN_CONFIG_FILE', '/etc/corosync/corosync.conf') ++ cfg = os.getenv('COROSYNC_MAIN_CONFIG_FILE', '%%PREFIX%%/etc/corosync/corosync.conf') + lines = open(cfg).read().split('\n') + name_re = re.compile(r'\s*name:\s+(.*)') + names = [] +@@ -1570,7 +1570,7 @@ def list_corosync_nodes(): + in corosync.conf + ''' + try: +- cfg = os.getenv('COROSYNC_MAIN_CONFIG_FILE', '/etc/corosync/corosync.conf') ++ cfg = os.getenv('COROSYNC_MAIN_CONFIG_FILE', '%%PREFIX%%/etc/corosync/corosync.conf') + lines = open(cfg).read().split('\n') + addr_re = re.compile(r'\s*ring0_addr:\s+(.*)') + nodes = [] Added: head/net-mgmt/crmsh/files/patch-hb__report_hb__report.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-hb__report_hb__report.in Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,52 @@ +--- hb_report/hb_report.in.orig 2017-07-21 09:17:13 UTC ++++ hb_report/hb_report.in +@@ -203,11 +203,11 @@ time2str() { + } + # try to figure out where pacemaker ... etc + get_pe_state_dir() { +- PE_STATE_DIR=`python -c "import crmsh.config; print crmsh.config.path.pe_state_dir"` ++ PE_STATE_DIR=`%%PYTHON_CMD%% -c "import crmsh.config; print(crmsh.config.path.pe_state_dir)"` + test -d "$PE_STATE_DIR" + } + get_cib_dir() { +- CIB_DIR=`python -c "import crmsh.config; print crmsh.config.path.crm_config"` ++ CIB_DIR=`%%PYTHON_CMD%% -c "import crmsh.config; print(crmsh.config.path.crm_config)"` + test -d "$CIB_DIR" + } + get_pe_state_dir2() { +@@ -357,7 +357,7 @@ is_our_log() { + local cat + cat=`find_decompressor $logf` + local first_time="`$cat $logf | head -10 | find_first_ts`" +- local last_time="`$cat $logf | tail -10 | tac | find_first_ts`" ++ local last_time="`$cat $logf | tail -10 | tail -r | find_first_ts`" + if [ x = "x$first_time" -o x = "x$last_time" ]; then + return 0 # skip (empty log?) + fi +@@ -467,7 +467,7 @@ loginfo() { + local logf=$1 + local fake=$2 + local nextpos +- nextpos=`python -c "f=open('$logf');f.seek(0,2);print f.tell()+1"` ++ nextpos=`%%PYTHON_CMD%% -c "f=open('$logf');f.seek(0,2);print f.tell()+1"` + if [ "$fake" ]; then + echo "synthetic:$logf $nextpos" + else +@@ -1206,7 +1206,7 @@ which which >/dev/null 2>&1 || + fatal "please install the which(1) program" + + WE=`uname -n` # who am i? +-tmpdir=`mktemp -t -d .hb_report.workdir.XXXXXX` || ++tmpdir=`mktemp -d` || + fatal "disk full" + add_tmpfiles $tmpdir + WORKDIR=$tmpdir +@@ -1322,7 +1322,7 @@ glibc + " + case "$CLUSTER_TYPE" in + openais) +- CONF=/etc/corosync/corosync.conf # corosync? ++ CONF=%%PREFIX%%/etc/corosync/corosync.conf # corosync? + if test -f $CONF; then + CORES_DIRS="$CORES_DIRS /var/lib/corosync" + else Added: head/net-mgmt/crmsh/files/patch-hb__report_openais__conf__support.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-hb__report_openais__conf__support.sh Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,13 @@ +--- hb_report/openais_conf_support.sh.orig 2018-04-19 04:02:39 UTC ++++ hb_report/openais_conf_support.sh +@@ -70,8 +70,8 @@ getlogvars() { + } + cluster_info() { + : echo "openais version: how?" +- if [ "$CONF" = /etc/corosync/corosync.conf ]; then +- /usr/sbin/corosync -v ++ if [ "$CONF" = %%PREFIX%%/etc/corosync/corosync.conf ]; then ++ %%PREFIX%%/sbin/corosync -v + fi + } + essential_files() { Added: head/net-mgmt/crmsh/files/patch-hb__report_utillib.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-hb__report_utillib.sh Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,20 @@ +--- hb_report/utillib.sh.orig 2017-07-21 09:17:13 UTC ++++ hb_report/utillib.sh +@@ -8,7 +8,7 @@ + get_cluster_type() { + if ps -ef | egrep -qs '[a]isexec|[c]orosync' || + [ -f /etc/ais/openais.conf -a ! -f "$HA_CF" ] || +- [ -f /etc/corosync/corosync.conf -a ! -f "$HA_CF" ] ++ [ -f %%PREFIX%%/etc/corosync/corosync.conf -a ! -f "$HA_CF" ] + then + debug "this is OpenAIS cluster stack" + echo "openais" +@@ -525,7 +525,7 @@ crmconfig() { + CIB_file=$1/$CIB_F crm configure show >$1/$CIB_TXT_F 2>&1 + } + get_crm_nodes() { +- /usr/sbin/crm node server ++ %%PREFIX%%/bin/crm node server + } + get_live_nodes() { + if [ `id -u` = 0 ] && which fping >/dev/null 2>&1; then Added: head/net-mgmt/crmsh/files/patch-scripts_health_collect.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-scripts_health_collect.py Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,11 @@ +--- scripts/health/collect.py.orig 2018-04-19 04:04:24 UTC ++++ scripts/health/collect.py +@@ -67,7 +67,7 @@ def disk_info(): + FILES = [ + '/etc/csync2/key_hagroup', + '/etc/csync2/csync2.cfg', +- '/etc/corosync/corosync.conf', ++ '%%PREFIX%%/etc/corosync/corosync.conf', + '/etc/sysconfig/sbd', + '/etc/sysconfig/SuSEfirewall2', + '/etc/sysconfig/SuSEfirewall2.d/services/cluster' Added: head/net-mgmt/crmsh/files/patch-utils_crm__init.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/crmsh/files/patch-utils_crm__init.py Sat May 19 16:35:48 2018 (r470421) @@ -0,0 +1,20 @@ +--- utils/crm_init.py.orig 2018-04-19 04:05:44 UTC ++++ utils/crm_init.py +@@ -13,7 +13,7 @@ SERVICES = ['sshd', 'ntp', 'corosync', ' + SSH_KEY = os.path.expanduser('~/.ssh/id_rsa') + CSYNC2_KEY = '/etc/csync2/key_hagroup' + CSYNC2_CFG = '/etc/csync2/csync2.cfg' +-COROSYNC_CONF = '/etc/corosync/corosync.conf' ++COROSYNC_CONF = '%%PREFIX%%/etc/corosync/corosync.conf' + SYSCONFIG_SBD = '/etc/sysconfig/sbd' + SYSCONFIG_FW = '/etc/sysconfig/SuSEfirewall2' + SYSCONFIG_FW_CLUSTER = '/etc/sysconfig/SuSEfirewall2.d/services/cluster' +@@ -107,7 +107,7 @@ def files_info(): + + def logrotate_info(): + rc, _, _ = crm_script.call( +- 'grep -r corosync.conf /etc/logrotate.d', ++ 'grep -r corosync.conf %%PREFIX%%/etc/logrotate.d', + shell=True) + return {'corosync.conf': rc == 0} + Modified: head/net-mgmt/crmsh/pkg-plist ============================================================================== --- head/net-mgmt/crmsh/pkg-plist Sat May 19 16:34:16 2018 (r470420) +++ head/net-mgmt/crmsh/pkg-plist Sat May 19 16:35:48 2018 (r470421) @@ -1,9 +1,9 @@ @sample etc/crm/crm.conf.sample -%%PYTHON_SITELIBDIR%%/crmsh-3.0.0-py%%PYTHON_VER%%.egg-info/PKG-INFO -%%PYTHON_SITELIBDIR%%/crmsh-3.0.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt -%%PYTHON_SITELIBDIR%%/crmsh-3.0.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt -%%PYTHON_SITELIBDIR%%/crmsh-3.0.0-py%%PYTHON_VER%%.egg-info/requires.txt -%%PYTHON_SITELIBDIR%%/crmsh-3.0.0-py%%PYTHON_VER%%.egg-info/top_level.txt +%%PYTHON_SITELIBDIR%%/crmsh-3.0.1-py%%PYTHON_VER%%.egg-info/PKG-INFO +%%PYTHON_SITELIBDIR%%/crmsh-3.0.1-py%%PYTHON_VER%%.egg-info/SOURCES.txt +%%PYTHON_SITELIBDIR%%/crmsh-3.0.1-py%%PYTHON_VER%%.egg-info/dependency_links.txt +%%PYTHON_SITELIBDIR%%/crmsh-3.0.1-py%%PYTHON_VER%%.egg-info/requires.txt +%%PYTHON_SITELIBDIR%%/crmsh-3.0.1-py%%PYTHON_VER%%.egg-info/top_level.txt %%PYTHON_SITELIBDIR%%/crmsh/__init__.py %%PYTHON_SITELIBDIR%%/crmsh/__init__.pyc %%PYTHON_SITELIBDIR%%/crmsh/bootstrap.py
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805191635.w4JGZnj8006924>