Index: devel/awscli2/Makefile =================================================================== --- /dev/null +++ devel/awscli2/Makefile @@ -0,0 +1,92 @@ +PORTNAME= awscli +DISTVERSION= 2.7.35 +CATEGORIES= devel python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +PKGNAMESUFFIX= 2 + +MAINTAINER= hsw@bitmark.com +COMMENT= Universal Command Line Interface for Amazon Web Services V2 + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +# used by post-build target below +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}colorama>=0.2.5<=0.4.5:devel/py-colorama@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}docutils>=0.10<0.19.1,1:textproc/py-docutils@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cryptography>=3.3.2<3.4.9,1:security/py-cryptography@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.15.0<=0.17.21:devel/py-ruamel.yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wcwidth>=0.1.8<0.2.0:devel/py-wcwidth@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}prompt-toolkit>=3.0.24<3.1.0:devel/py-prompt-toolkit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}distro>=1.5.0<1.9.0:sysutils/py-distro@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}awscrt>=0.12.4<0.17:devel/py-awscrt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dateutil>=2.1<3.0.0:devel/py-dateutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jmespath>=0.7.1<1.1.0:devel/py-jmespath@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}urllib3>=1.25.4<1.27,1:net/py-urllib3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>=3.8.13:databases/py-sqlite3@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}colorama>=0.2.5<=0.4.5:devel/py-colorama@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}docutils>=0.10<0.19.1,1:textproc/py-docutils@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cryptography>=3.3.2<3.4.9,1:security/py-cryptography@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.15.0<=0.17.21:devel/py-ruamel.yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wcwidth>=0.1.8<0.2.0:devel/py-wcwidth@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}prompt-toolkit>=3.0.24<3.1.0:devel/py-prompt-toolkit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}distro>=1.5.0<1.9.0:sysutils/py-distro@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}awscrt>=0.12.4<0.17:devel/py-awscrt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dateutil>=2.1<3.0.0:devel/py-dateutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jmespath>=0.7.1<1.1.0:devel/py-jmespath@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}urllib3>=1.25.4<1.27,1:net/py-urllib3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>=3.8.13:databases/py-sqlite3@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jsonschema>=2.5.1:devel/py-jsonschema@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>=1.3.0:devel/py-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=6.2.5:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}coverage>=5.5:devel/py-coverage@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-cov<=2.12.1:devel/py-pytest-cov@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=2.4.0:devel/py-pytest-xdist@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}awscrt>=0.12.4<0.17:devel/py-awscrt@${PY_FLAVOR} \ + cmake:devel/cmake \ + rustc:lang/rust \ + ${LOCALBASE}/include/sys/sysinfo.h:devel/libsysinfo + +USES= python:3.8+ groff:run +USE_PYTHON= autoplist distutils +CONFLICTS= awscli py*-awscli* +INSTALL_TARGET= install-strip + +USE_GITHUB= yes +GH_ACCOUNT= aws +GH_PROJECT= aws-cli + +OPTIONS_DEFINE= BASH ZSH +OPTIONS_DEFAULT= BASH ZSH + +BASH_PLIST_FILES= share/bash-completion/completions/aws +ZSH_PLIST_FILES= share/zsh/site-functions/_aws + +NO_ARCH= yes + +PLIST_FILES+= ${PYTHON_SITELIBDIR}/awscli/data/ac.index +post-build: + @${ECHO} "building completion index..." + cd "${WRKSRC}" && \ + ${SETENV} PYTHONPATH=build/lib \ + ${PYTHON_VERSION} ./scripts/gen-ac-index --include-builtin-index --index-location=./build/lib/awscli/data/ac.index + +do-install-BASH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions/ + ${INSTALL_DATA} ${STAGEDIR}${PREFIX}/bin/aws_bash_completer \ + ${STAGEDIR}${PREFIX}/share/bash-completion/completions/aws + +do-install-ZSH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${STAGEDIR}${PREFIX}/bin/aws_zsh_completer.sh \ + ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_aws + +# enable after devel/py-awscrt +# - has its s2n submodule is updated to include FreeBSD fixes +# - had '-fatal_warnings' changed to '-fatal-warnings' +# - has '-lexecinfo' added to the linker options +# - see: https://github.com/awslabs/aws-crt-python/pull/376 +do-test: + cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m tox + +.include Index: devel/awscli2/distinfo =================================================================== --- /dev/null +++ devel/awscli2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1675924081 +SHA256 (aws-aws-cli-2.7.35_GH0.tar.gz) = 6f3ac1a652ad21ffe990a03b1b7f8185d2d8179f0acbd28b9ada02a15f804d6c +SIZE (aws-aws-cli-2.7.35_GH0.tar.gz) = 11271561 Index: devel/awscli2/files/patch-setup.cfg =================================================================== --- /dev/null +++ devel/awscli2/files/patch-setup.cfg @@ -0,0 +1,21 @@ +--- setup.cfg.orig 2022-09-14 16:20:08 UTC ++++ setup.cfg +@@ -29,13 +29,13 @@ packages = find: + python_requires = >=3.8 + include_package_data = True + install_requires = +- colorama>=0.2.5,<0.4.4 +- docutils>=0.10,<0.16 ++ colorama>=0.2.5,<0.4.5 ++ docutils>=0.10,<0.19.2 + cryptography>=3.3.2,<37.0.0 + ruamel.yaml>=0.15.0,<=0.17.21 + wcwidth<0.2.0 +- prompt-toolkit>=3.0.24,<3.0.29 +- distro>=1.5.0,<1.6.0 +- awscrt>=0.12.4,<=0.14.0 ++ prompt-toolkit>=3.0.24,<3.1.0 ++ distro>=1.5.0,<1.9.0 ++ awscrt>=0.12.4,<0.17.0 + python-dateutil>=2.1,<3.0.0 + jmespath>=0.7.1,<1.1.0 Index: devel/awscli2/patch-crt_s2n_utils_s2n__fork__detection.c =================================================================== --- /dev/null +++ devel/awscli2/patch-crt_s2n_utils_s2n__fork__detection.c @@ -0,0 +1,16 @@ +# add #elif from main branch +# see: https://github.com/aws/s2n-tls/blob/main/utils/s2n_fork_detection.c#L23 + +--- crt/s2n/utils/s2n_fork_detection.c.orig 2022-06-10 20:56:14 UTC ++++ crt/s2n/utils/s2n_fork_detection.c +@@ -20,6 +20,10 @@ + typedef struct _opaque_pthread_once_t __darwin_pthread_once_t; + typedef __darwin_pthread_once_t pthread_once_t; + #define _DARWIN_C_SOURCE ++#elif defined(__FreeBSD__) ++ /* FreeBSD requires POSIX compatibility off for its syscalls (enables __BSD_VISIBLE) ++ * Without the below line, cannot be imported (it requires __BSD_VISIBLE) */ ++ #undef _POSIX_C_SOURCE + #elif !defined(_GNU_SOURCE) + /* Keep in sync with feature probe tests/features/madvise.c */ + #define _GNU_SOURCE Index: devel/awscli2/patch-tox.ini =================================================================== --- /dev/null +++ devel/awscli2/patch-tox.ini @@ -0,0 +1,51 @@ +--- tox.ini.orig 2022-07-29 16:17:15 UTC ++++ tox.ini +@@ -4,6 +4,9 @@ envlist = py38,py39 + skipsdist = True + + [testenv] ++setenv = ++ CFLAGS = -D__BSD_VISIBLE ++ LDFLAGS = -lexecinfo + commands = + {envpython} {toxinidir}/scripts/ci/install + {envpython} {toxinidir}/scripts/ci/run-tests +@@ -11,6 +14,9 @@ commands = + + [testenv:exe] + basepython = python3.9 ++setenv = ++ CFLAGS = -D__BSD_VISIBLE ++ LDFLAGS = -lexecinfo + install_command = + python -m pip install --no-build-isolation {opts} {packages} + deps = +@@ -21,6 +27,9 @@ commands = + + [testenv:macpkg] + basepython = python3.9 ++setenv = ++ CFLAGS = -D__BSD_VISIBLE ++ LDFLAGS = -lexecinfo + install_command = + python -m pip install --no-build-isolation {opts} {packages} + deps = +@@ -31,6 +40,9 @@ commands = + + [testenv:test-exe] + basepython = python3.9 ++setenv = ++ CFLAGS = -D__BSD_VISIBLE ++ LDFLAGS = -lexecinfo + install_command = + python -m pip install --no-build-isolation {opts} {packages} + deps = +@@ -42,5 +54,8 @@ commands = + + [testenv:sign-exe] + basepython = python3.9 ++setenv = ++ CFLAGS = -D__BSD_VISIBLE ++ LDFLAGS = -lexecinfo + commands = + {envpython} {toxinidir}/scripts/installers/sign-exe {posargs} Index: devel/awscli2/pkg-descr =================================================================== --- /dev/null +++ devel/awscli2/pkg-descr @@ -0,0 +1,17 @@ +This package provides a unified command line interface to many Amazon Web +Services. + +The currently supported services include: + +* Amazon Elastic Compute Cloud (Amazon EC2) +* Elastic Load Balancing +* Auto Scaling +* AWS CloudFormation +* AWS Elastic Beanstalk +* Amazon Simple Notification Service (Amazon SNS) +* Amazon Simple Queue Service (Amazon SQS) +* Amazon Relational Database Service (Amazon RDS) + +... and more. + +WWW: https://aws.amazon.com/cli/ Index: devel/py-awscli/Makefile =================================================================== --- devel/py-awscli/Makefile +++ devel/py-awscli/Makefile @@ -19,7 +19,8 @@ ${PYTHON_PKGNAMEPREFIX}yaml>=3.10:devel/py-yaml@${PY_FLAVOR} USES= python -USE_PYTHON= autoplist distutils +USE_PYTHON= autoplist distutils concurrent noflavors +CONFLICTS= py*-awscli* NO_ARCH= yes SUB_FILES= pkg-message Index: devel/py-awscrt/Makefile =================================================================== --- devel/py-awscrt/Makefile +++ devel/py-awscrt/Makefile @@ -1,5 +1,5 @@ PORTNAME= awscrt -PORTVERSION= 0.16.4 +PORTVERSION= 0.16.10 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,6 +16,8 @@ USES= python:3.7+ USE_PYTHON= autoplist concurrent distutils +#CFLAGS+= -D__BSD_VISIBLE + post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + Index: devel/py-awscrt/distinfo =================================================================== --- devel/py-awscrt/distinfo +++ devel/py-awscrt/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1674589736 -SHA256 (awscrt-0.16.4.tar.gz) = 65f7e7555aa2ede7e49eab5b24561299faddadf899e0b5b7f17e54d34a95188c -SIZE (awscrt-0.16.4.tar.gz) = 21852447 +TIMESTAMP = 1675935759 +SHA256 (awscrt-0.16.10.tar.gz) = 3101499b479b82f0403f615bf520c1f8b9506818d275e3e28ade25cc6bcdb92b +SIZE (awscrt-0.16.10.tar.gz) = 21880170 Index: devel/py-awscrt/files/patch-crt_aws-lc_crypto_fipsmodule_cpucap_cpu__ppc64le.c =================================================================== --- devel/py-awscrt/files/patch-crt_aws-lc_crypto_fipsmodule_cpucap_cpu__ppc64le.c +++ devel/py-awscrt/files/patch-crt_aws-lc_crypto_fipsmodule_cpucap_cpu__ppc64le.c @@ -1,4 +1,4 @@ ---- crt/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c.orig 2022-11-09 18:39:03 UTC +--- crt/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c.orig 2022-09-08 17:32:23 UTC +++ crt/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c @@ -25,7 +25,11 @@ #endif Index: =================================================================== --- /dev/null +++ /dev/null @@ -1,14 +0,0 @@ ---- crt/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c.orig 2022-11-09 18:39:03 UTC -+++ crt/aws-lc/crypto/fipsmodule/cpucap/cpu_ppc64le.c -@@ -25,7 +25,11 @@ - #endif - - void OPENSSL_cpuid_setup(void) { -+#if defined(__linux__) - OPENSSL_ppc64le_hwcap2 = getauxval(AT_HWCAP2); -+#elif defined(__FreeBSD__) -+ elf_aux_info(AT_HWCAP2, &OPENSSL_ppc64le_hwcap2, sizeof(OPENSSL_ppc64le_hwcap2)); -+#endif - } - - int CRYPTO_is_PPC64LE_vcrypto_capable(void) { Index: devel/py-awscrt/files/patch-setup.py =================================================================== --- devel/py-awscrt/files/patch-setup.py +++ devel/py-awscrt/files/patch-setup.py @@ -1,6 +1,14 @@ ---- setup.py.orig 2022-11-09 18:39:08 UTC +--- setup.py.orig 2023-02-08 19:09:46 UTC +++ setup.py -@@ -320,7 +320,7 @@ def awscrt_ext(): +@@ -311,6 +311,7 @@ def awscrt_ext(): + + if distutils.ccompiler.get_default_compiler() != 'msvc': + extra_compile_args += ['-Wno-strict-aliasing', '-std=gnu99'] ++ extra_link_args += ['-lexecinfo'] + + # treat warnings as errors in development mode + if is_development_mode(): +@@ -320,7 +321,7 @@ def awscrt_ext(): # a proper MacOS Universal2 binary. The linker warns us about this, # but WHATEVER. Building everything twice (x86_64 and arm64) takes too long. if not is_macos_universal2(): Index: devel/py-awscrt/patch-crt-aws-c-common-source-posix-system_info.c =================================================================== --- /dev/null +++ devel/py-awscrt/patch-crt-aws-c-common-source-posix-system_info.c @@ -0,0 +1,12 @@ +--- crt/aws-c-common/source/posix/system_info.c.orig 2022-07-12 00:42:37 UTC ++++ crt/aws-c-common/source/posix/system_info.c +@@ -15,7 +15,9 @@ + #endif + + #if defined(__linux__) || defined(__unix__) ++# if !defined(__FreeBSD__) + # include ++# endif + # include + #endif + Index: devel/py-awscrt/patch-setup.py =================================================================== --- /dev/null +++ devel/py-awscrt/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2022-07-12 00:42:43 UTC ++++ setup.py +@@ -315,7 +315,7 @@ def awscrt_ext(): + + if distutils.ccompiler.get_default_compiler() != 'msvc': + extra_compile_args += ['-Wextra', '-Werror', '-Wno-strict-aliasing', '-std=gnu99'] +- extra_link_args += ['-Wl,-fatal_warnings'] ++ extra_link_args += ['-Wl,-fatal-warnings'] + + return setuptools.Extension( + '_awscrt',