Date: Wed, 12 May 2021 18:45:41 GMT From: Mateusz Piotrowski <0mp@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: d8d1a628f6ad - main - sysutils/py-ansible-core: Add new port Message-ID: <202105121845.14CIjfwh064619@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/ports/commit/?id=d8d1a628f6adcdf106e06d0a8e9fcd55a59b5ec4 commit d8d1a628f6adcdf106e06d0a8e9fcd55a59b5ec4 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-05-12 18:44:54 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-05-12 18:45:51 +0000 sysutils/py-ansible-core: Add new port Ansible is a radically simple configuration-management, deployment, task-execution, and multinode orchestration framework. ansible-core contains the core engine, modules and plugins. It does not contain community and partner supported Ansible Collections of modules and plugins. --- sysutils/Makefile | 1 + sysutils/py-ansible-core/Makefile | 98 ++++++++++++++++++++++++++++++++++++++ sysutils/py-ansible-core/distinfo | 3 ++ sysutils/py-ansible-core/pkg-descr | 7 +++ 4 files changed, 109 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 9b053f573539..d586c47450fb 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -992,6 +992,7 @@ SUBDIR += pwol SUBDIR += pwsafe SUBDIR += pxattr + SUBDIR += py-ansible-core SUBDIR += py-ansible-lint SUBDIR += py-ansible-runner SUBDIR += py-azure-cli diff --git a/sysutils/py-ansible-core/Makefile b/sysutils/py-ansible-core/Makefile new file mode 100644 index 000000000000..12b893cbbb97 --- /dev/null +++ b/sysutils/py-ansible-core/Makefile @@ -0,0 +1,98 @@ +PORTNAME= ansible-core +DISTVERSION= 2.11.0 +CATEGORIES= sysutils python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Radically simple IT automation + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/COPYING + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}resolvelib>0:devel/py-resolvelib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=0:security/py-bcrypt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycrypto>=0:security/py-pycrypto@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-xdist>0:devel/py-pytest-xdist@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} + +USES= cpe gmake python:3.6+ shebangfix +CPE_VENDOR= ansibleworks +USE_PYTHON= autoplist concurrent distutils + +SHEBANG_REGEX= [.]/test/.*[.]py + +TEST_ARGS= VERSION=${DISTVERSION} \ + PYTHON=${PYTHON_CMD} \ + DATE= +TEST_ENV= PYTHON_VERSION=${PYTHON_VER} +TEST_TARGET= tests + +NO_ARCH= yes + +PLIST_FILES= share/man/man1/ansible-config.1.gz \ + share/man/man1/ansible-console.1.gz \ + share/man/man1/ansible-doc.1.gz \ + share/man/man1/ansible-galaxy.1.gz \ + share/man/man1/ansible-inventory.1.gz \ + share/man/man1/ansible-playbook.1.gz \ + share/man/man1/ansible-pull.1.gz \ + share/man/man1/ansible-vault.1.gz \ + share/man/man1/ansible.1.gz +PORTEXAMPLES= ansible.cfg hosts + +OPTIONS_DEFINE= DOCS EXAMPLES + +post-patch: +# Preserve the original paths in +# test/units/cli/galaxy/test_execute_list_collection.py. +# Replacing /usr/share/ansible breaks tests. + ${FIND} ${WRKSRC} -not -regex '${WRKSRC}/test/units/cli/galaxy/test_execute_list_collection.py' -type f -print0 | \ + ${XARGS} -0 ${REINPLACE_CMD} \ + -e 's|/etc/ansible|${ETCDIR}|g' \ + -e 's|/usr/share/ansible|${DATADIR}|g' + ${FIND} ${WRKSRC} -type f -name "*.bak" -delete + +post-install: + @${MKDIR} ${STAGEDIR}${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/docs/man/man1/*.1 \ + ${STAGEDIR}${MAN1PREFIX}/share/man/man1 + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/ansible.cfg ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/hosts ${STAGEDIR}${EXAMPLESDIR} + +post-stage: + ${FIND} ${STAGEDIR}${PREFIX}/bin -type l -name ansible-\* -lname ansible \ + -execdir ${RLN} ansible-${PYTHON_VER} {} \; +# USE_PYTHON=autoplist doesn't add this file to pkg-plist. + ${RM} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ansible_test/_data/injector/ansible-inventory + +pre-test: +# This one file does not get its paths replaced correctly in post-patch. + ${REINPLACE_CMD} 's|"/etc"|"${ETCDIR:H}"|g' \ + ${WRKSRC}/test/units/playbook/test_helpers.py +# This test constructs a Python script inline and uses an invalid path to it. + ${REINPLACE_CMD} 's|/usr/bin/python|${PYTHON_CMD}|' \ + ${WRKSRC}/test/units/modules/test_async_wrapper.py +# Skip the SELinux tests, it's not present on FreeBSD. + ${RM} ${WRKSRC}/test/units/module_utils/basic/test_selinux.py +# Disable some failing tests. They fail to detect that emoji are of width 2 istead of 1. + ${RM} ${WRKSRC}/test/units/utils/test_display.py + +.include <bsd.port.mk> + +# Make sure that we override the unique ETCDIR name set +# by the implicit USES=uniquefiles. +ETCDIR= ${PREFIX}/etc/ansible diff --git a/sysutils/py-ansible-core/distinfo b/sysutils/py-ansible-core/distinfo new file mode 100644 index 000000000000..95c2164723d4 --- /dev/null +++ b/sysutils/py-ansible-core/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1620308126 +SHA256 (ansible-core-2.11.0.tar.gz) = 9470ceb710711eacd75f1bcae802af036ab2a6c2cd5a13bfcb50b2d89667c9c5 +SIZE (ansible-core-2.11.0.tar.gz) = 5828675 diff --git a/sysutils/py-ansible-core/pkg-descr b/sysutils/py-ansible-core/pkg-descr new file mode 100644 index 000000000000..85bd98c0077f --- /dev/null +++ b/sysutils/py-ansible-core/pkg-descr @@ -0,0 +1,7 @@ +Ansible is a radically simple configuration-management, deployment, +task-execution, and multinode orchestration framework. + +ansible-core contains the core engine, modules and plugins. It does not contain +community and partner supported Ansible Collections of modules and plugins. + +WWW: https://www.ansible.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105121845.14CIjfwh064619>