From dc87e7ad298138d7fdfe96652a5a12221122b6a5 Mon Sep 17 00:00:00 2001 From: Antoine Brodin Date: Tue, 14 May 2019 19:41:52 +0000 Subject: [PATCH] Switch from pycryptodome to pycryptodomex to allow concurrent installation with ports requiring pycrypto --- security/py-rekall-core/Makefile | 10 +++++++++- security/py-rekall-core/files/patch-setup.py | 2 +- security/py-rekall_lib/Makefile | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/security/py-rekall-core/Makefile b/security/py-rekall-core/Makefile index 0cd80ed41411..2fde0ebf5bc7 100644 --- a/security/py-rekall-core/Makefile +++ b/security/py-rekall-core/Makefile @@ -4,6 +4,7 @@ PORTNAME= rekall-core DISTVERSION= 1.7.2rc1-52 DISTVERSIONSUFFIX= -g0cba831 +PORTREVISION= 1 CATEGORIES= security python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -23,7 +24,7 @@ RUN_DEPENDS= cabextract:archivers/cabextract \ ${PYTHON_PKGNAMEPREFIX}parsedatetime>=2.4:devel/py-parsedatetime@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>=5.0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyaff4>=0.25:security/py-pyaff4@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.4.7:security/py-pycryptodome@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycryptodomex>=3.4.7:security/py-pycryptodomex@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyelftools>=0.24:devel/py-pyelftools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyparsing>=2.1.5:devel/py-pyparsing@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dateutil>=2.6.1:devel/py-dateutil@${PY_FLAVOR} \ @@ -48,4 +49,11 @@ WRKSRC_SUBDIR= rekall-core PYDISTUTILS_INSTALLARGS+= --install-data=${PYTHON_SITELIBDIR} +post-patch: + ${REINPLACE_CMD} "s|from Crypto|from Cryptodome|" \ + ${WRKSRC}/rekall/compatibility.py \ + ${WRKSRC}/rekall/plugins/windows/mimikatz.py \ + ${WRKSRC}/rekall/plugins/windows/registry/hashdump.py \ + ${WRKSRC}/rekall/plugins/windows/registry/lsasecrets.py + .include diff --git a/security/py-rekall-core/files/patch-setup.py b/security/py-rekall-core/files/patch-setup.py index 572414fd60b1..719da78fa8e1 100644 --- a/security/py-rekall-core/files/patch-setup.py +++ b/security/py-rekall-core/files/patch-setup.py @@ -26,7 +26,7 @@ - 'pytsk3==20170802', - 'pytz==2017.3', - 'rekall-capstone==3.0.5.post2', -+ 'pycryptodome>=3.4.7', ++ 'pycryptodomex>=3.4.7', + 'pyelftools>=0.24', + 'pyparsing>=2.1.5', + 'python-dateutil>=2.6.1', diff --git a/security/py-rekall_lib/Makefile b/security/py-rekall_lib/Makefile index 0e43881fd5da..e6cf5bdaa91d 100644 --- a/security/py-rekall_lib/Makefile +++ b/security/py-rekall_lib/Makefile @@ -4,6 +4,7 @@ PORTNAME= rekall_lib DISTVERSION= 1.7.2rc1-52 DISTVERSIONSUFFIX= -g0cba831 +PORTREVISION= 1 CATEGORIES= security python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -16,7 +17,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}arrow>=0.10.0:devel/py-arrow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}future>=0:devel/py-future@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sortedcontainers>=1.5.7:devel/py-sortedcontainers@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pycryptodome>=0:security/py-pycryptodome@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}pycryptodomex>=0:security/py-pycryptodomex@${PY_FLAVOR} USE_GITHUB= yes GH_PROJECT= rekall @@ -28,4 +29,7 @@ USE_PYTHON= distutils autoplist NO_ARCH= yes WRKSRC_SUBDIR= rekall-lib +post-patch: + ${REINPLACE_CMD} "s|from Crypto|from Cryptodome|" ${WRKSRC}/rekall_lib/crypto.py + .include