From 1b18b2cd2cad93ade1d2ba3981bcadfba4c96117 Mon Sep 17 00:00:00 2001 From: blshkv Date: Sat, 30 Jun 2018 20:51:05 +0800 Subject: [PATCH] impacket: fix deps, 9999 symlink, cleanup. https://github.com/CoreSecurity/impacket/issues/466 --- dev-python/impacket/impacket-0.9.15-r1.ebuild | 3 +- dev-python/impacket/impacket-0.9.15.ebuild | 42 ---------------- dev-python/impacket/impacket-0.9.17-r1.ebuild | 1 + dev-python/impacket/impacket-0.9.17.ebuild | 48 ------------------- dev-python/impacket/impacket-9999.ebuild | 26 ++++++---- .../base/package.accept_keywords/dev-python | 3 +- 6 files changed, 22 insertions(+), 101 deletions(-) delete mode 100644 dev-python/impacket/impacket-0.9.15.ebuild create mode 120000 dev-python/impacket/impacket-0.9.17-r1.ebuild delete mode 100644 dev-python/impacket/impacket-0.9.17.ebuild diff --git a/dev-python/impacket/impacket-0.9.15-r1.ebuild b/dev-python/impacket/impacket-0.9.15-r1.ebuild index 8046aef68..f0cf17d5b 100644 --- a/dev-python/impacket/impacket-0.9.15-r1.ebuild +++ b/dev-python/impacket/impacket-0.9.15-r1.ebuild @@ -1,6 +1,5 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ EAPI=5 diff --git a/dev-python/impacket/impacket-0.9.15.ebuild b/dev-python/impacket/impacket-0.9.15.ebuild deleted file mode 100644 index 3454812d5..000000000 --- a/dev-python/impacket/impacket-0.9.15.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -PYTHON_COMPAT=( python2_7 ) -inherit distutils-r1 - -DESCRIPTION="A collection of Python classes focused on providing access to network packets" -HOMEPAGE="https://github.com/CoreSecurity/impacket" -SRC_URI="" -if [[ ${PV} == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/CoreSecurity/impacket.git" - KEYWORDS="" -else - SRC_URI="https://github.com/CoreSecurity/impacket/archive/impacket_${PV//./_}.tar.gz -> ${P}.tar.gz" - inherit versionator - S="${WORKDIR}"/${PN}-${PN}_$(replace_all_version_separators _) - KEYWORDS="~amd64 ~x86" -fi -LICENSE="Apache-2.0" -SLOT="0" -IUSE="" - -RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}] - >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND}" - -python_test() { - pushd impacket/testcases/dot11 - for test in $(ls *.py); do - ${PYTHON} ${test} || die "Tests fail with ${EPYTHON}" - done - popd - pushd impacket/testcases/ImpactPacket - for test in $(ls *.py); do - ${PYTHON} ${test} || die "Tests fail with ${EPYTHON}" - done - popd -} diff --git a/dev-python/impacket/impacket-0.9.17-r1.ebuild b/dev-python/impacket/impacket-0.9.17-r1.ebuild new file mode 120000 index 000000000..b9ad4af89 --- /dev/null +++ b/dev-python/impacket/impacket-0.9.17-r1.ebuild @@ -0,0 +1 @@ +impacket-9999.ebuild \ No newline at end of file diff --git a/dev-python/impacket/impacket-0.9.17.ebuild b/dev-python/impacket/impacket-0.9.17.ebuild deleted file mode 100644 index 2e7287147..000000000 --- a/dev-python/impacket/impacket-0.9.17.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -inherit distutils-r1 - -DESCRIPTION="A collection of Python classes focused on providing access to network packets" -HOMEPAGE="https://github.com/CoreSecurity/impacket" -SRC_URI="" -if [[ ${PV} == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/CoreSecurity/impacket.git" - KEYWORDS="" -else - SRC_URI="https://github.com/CoreSecurity/impacket/archive/impacket_${PV//./_}.tar.gz -> ${P}.tar.gz" -# inherit versionator -# S="${WORKDIR}"/${PN}-${PN}_$(replace_all_version_separators _) - S="${WORKDIR}"/${PN}-${PN}_${PV//./_} - KEYWORDS="~amd64 ~x86" -fi - -LICENSE="Apache-2.0" -SLOT="0" -IUSE="" - -RDEPEND=">=dev-python/pyasn1-0.2.3[${PYTHON_USEDEP}] - || ( dev-python/pycryptodome[${PYTHON_USEDEP}] dev-python/pycrypto[${PYTHON_USEDEP}] ) - >=dev-python/pyopenssl-0.13.1[${PYTHON_USEDEP}] - >=dev-python/ldap3-2.5.0[${PYTHON_USEDEP}] - dev-python/ldapdomaindump[${PYTHON_USEDEP}] - dev-python/flask[${PYTHON_USEDEP}] - dev-python/six[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND}" - -python_test() { - pushd impacket/testcases/dot11 - for test in $(ls *.py); do - ${PYTHON} ${test} || die "Tests fail with ${EPYTHON}" - done - popd - pushd impacket/testcases/ImpactPacket - for test in $(ls *.py); do - ${PYTHON} ${test} || die "Tests fail with ${EPYTHON}" - done - popd -} diff --git a/dev-python/impacket/impacket-9999.ebuild b/dev-python/impacket/impacket-9999.ebuild index 622acc987..f2c8881bb 100644 --- a/dev-python/impacket/impacket-9999.ebuild +++ b/dev-python/impacket/impacket-9999.ebuild @@ -1,33 +1,43 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI=5 +EAPI=6 PYTHON_COMPAT=( python2_7 ) inherit distutils-r1 DESCRIPTION="A collection of Python classes focused on providing access to network packets" HOMEPAGE="https://github.com/CoreSecurity/impacket" -SRC_URI="" if [[ ${PV} == "9999" ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/CoreSecurity/impacket.git" KEYWORDS="" else SRC_URI="https://github.com/CoreSecurity/impacket/archive/impacket_${PV//./_}.tar.gz -> ${P}.tar.gz" - inherit versionator - S="${WORKDIR}"/${PN}-${PN}_$(replace_all_version_separators _) + S="${WORKDIR}"/${PN}-${PN}_${PV//./_} KEYWORDS="~amd64 ~x86" fi + LICENSE="Apache-2.0" SLOT="0" IUSE="" -RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}] - >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]" +RDEPEND=">=dev-python/pyasn1-0.2.3[${PYTHON_USEDEP}] + || ( dev-python/pycryptodome[${PYTHON_USEDEP}] dev-python/pycrypto[${PYTHON_USEDEP}] ) + >=dev-python/pyopenssl-0.13.1[${PYTHON_USEDEP}] + >=dev-python/ldap3-2.5[${PYTHON_USEDEP}] + dev-python/ldapdomaindump[${PYTHON_USEDEP}] + dev-python/flask[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}]" DEPEND="${RDEPEND}" +#https://github.com/CoreSecurity/impacket/issues/466 +python_prepare_all() { + # disarm pycryptodome dep to allow || ( pycryptodome pycrypto ) + sed -i -e "s|ldap3>=2.5.0|ldap3>=2.5|" requirements.txt || die + distutils-r1_python_prepare_all +} + python_test() { pushd impacket/testcases/dot11 for test in $(ls *.py); do diff --git a/profiles/pentoo/base/package.accept_keywords/dev-python b/profiles/pentoo/base/package.accept_keywords/dev-python index 0813a6092..bcedad35e 100644 --- a/profiles/pentoo/base/package.accept_keywords/dev-python +++ b/profiles/pentoo/base/package.accept_keywords/dev-python @@ -44,8 +44,9 @@ dev-python/simplesoapy ~dev-python/pybloomfiltermmap-0.2.0 #required by net-analyzer/crackmapexec -=dev-python/impacket-0.9.15* =dev-python/gevent-1.2* +=dev-python/impacket-0.9* +~dev-python/ldapdomaindump-0.8.6 ~dev-python/nltk-2.0.1_rc1 =dev-python/pyqwt-5.2.0