From 87df04d5fc3619db725f9bd74c687238a3faf80a Mon Sep 17 00:00:00 2001 From: Guido Kroon Date: Wed, 29 Aug 2018 23:03:17 +0200 Subject: [PATCH 1/3] WIP ebuilds for #248 --- dev-python/tlslite-ng/Manifest | 1 + dev-python/tlslite-ng/tlslite-ng-0.7.5.ebuild | 34 +++++++++++ net-analyzer/cipherscan/Manifest | 1 + .../cipherscan/cipherscan-20180519.ebuild | 61 +++++++++++++++++++ net-analyzer/cipherscan/files/cipherscan | 3 + 5 files changed, 100 insertions(+) create mode 100644 dev-python/tlslite-ng/Manifest create mode 100644 dev-python/tlslite-ng/tlslite-ng-0.7.5.ebuild create mode 100644 net-analyzer/cipherscan/Manifest create mode 100644 net-analyzer/cipherscan/cipherscan-20180519.ebuild create mode 100644 net-analyzer/cipherscan/files/cipherscan diff --git a/dev-python/tlslite-ng/Manifest b/dev-python/tlslite-ng/Manifest new file mode 100644 index 000000000..dd5039e56 --- /dev/null +++ b/dev-python/tlslite-ng/Manifest @@ -0,0 +1 @@ +DIST tlslite-ng-0.7.5.tar.gz 314745 BLAKE2B 273550f1f4d0ce7f6008554bd14f60a59a6c9327352a62a9a4e84f1b9d7f3d616319b618b517dcb0a0ec0156dcf5b8bb9bb745403b12421e9c8c999a6cb85641 SHA512 fef195e1254b7a2a60be279eac22aea748304cade77b29a8204a109c333eadcd062de693418bf72c90ca50fa981ce78406beb3dd41f216f7d3b5206445c5eb14 diff --git a/dev-python/tlslite-ng/tlslite-ng-0.7.5.ebuild b/dev-python/tlslite-ng/tlslite-ng-0.7.5.ebuild new file mode 100644 index 000000000..8947d6ce3 --- /dev/null +++ b/dev-python/tlslite-ng/tlslite-ng-0.7.5.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_6 ) +EGO_PN=github.com/tomato42/${PN} + +inherit distutils-r1 + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/tomato42/tlslite-ng" + KEYWORDS="" +else + KEYWORDS="~amd64 ~x86" + EGIT_COMMIT="v${PV}" + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="New home of the TLS implementation in pure python." +HOMEPAGE="https://github.com/tomato42/tlslite-ng" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-python/coverage + dev-python/enum34 + dev-python/hypothesis + dev-python/pylint + dev-python/unittest2" +DEPEND="${RDEPEND}" diff --git a/net-analyzer/cipherscan/Manifest b/net-analyzer/cipherscan/Manifest new file mode 100644 index 000000000..7498b8538 --- /dev/null +++ b/net-analyzer/cipherscan/Manifest @@ -0,0 +1 @@ +DIST cipherscan-20180519.tar.gz 13388922 BLAKE2B 7319d05dceba26a72ed8b0a8fdf4f5c89bd4ff86062410e5800a0dd24e5254ef34db7e20f9e994385bf6d20fab67c072e61e9376eb2df9cac2607ca7d5b393f8 SHA512 dc957cd46707b18344d0ef7bf85ee70916f8926f5b32b5dbacbf20205e8249155c03441c3781b02854105bfe0e79bbaf650450873dc30fdc58d7ff019d76b1ad diff --git a/net-analyzer/cipherscan/cipherscan-20180519.ebuild b/net-analyzer/cipherscan/cipherscan-20180519.ebuild new file mode 100644 index 000000000..b0643a334 --- /dev/null +++ b/net-analyzer/cipherscan/cipherscan-20180519.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +EGO_PN=github.com/mozilla/${PN} + +inherit python-single-r1 + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mozilla/cipherscan.git" + KEYWORDS="" +else + KEYWORDS="~amd64 ~x86" + EGIT_COMMIT="b0548dff8e5f9a098b7e14211f610ff63e3f63f7" + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="A very simple way to find out which SSL ciphersuites are supported by a target." +HOMEPAGE="https://github.com/mozilla/cipherscan" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-python/tlslite + dev-python/ecdsa" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${PN}-${EGIT_COMMIT}" + +src_prepare() { + # Dirty hack to actually add a shebang to the file, so that we can then fix + # it using python_fix_shebang. Without a shebang, python_fix_shebang won't + # even work. + sed -i '1i#!/usr/bin/env python' cscan.py + python_fix_shebang cscan.py + + # We don't want cipherscan pulling in the latest and greatest + # dev-python/tlslite and dev-python/ecdsa using GitHub. We fixed its + # dependencies using RDEPENDs. + sed -e 's|\$DIRNAMEPATH/cscan.sh|$DIRNAMEPATH/cscan.py|' -i ${PN} || die "sed for ${PN} failed" + default +} + +src_install(){ + dodir /usr/share/${PN} + insinto /usr/share/${PN} + doins -r * + + fperms +x /usr/share/${PN}/${PN} + fperms +x /usr/share/${PN}/cscan.py + + # cipherscan needs to be run from its installation directory. + insinto /usr/bin + doins "${FILESDIR}/${PN}" + fperms +x /usr/bin/${PN} +} diff --git a/net-analyzer/cipherscan/files/cipherscan b/net-analyzer/cipherscan/files/cipherscan new file mode 100644 index 000000000..5b516c8ac --- /dev/null +++ b/net-analyzer/cipherscan/files/cipherscan @@ -0,0 +1,3 @@ +#!/bin/sh +cd /usr/share/cipherscan +exec ./cipherscan $@ From e4fbc5c7caf73ca15c7d34c65b870416a766efa7 Mon Sep 17 00:00:00 2001 From: Guido Kroon Date: Thu, 30 Aug 2018 18:17:13 +0200 Subject: [PATCH 2/3] submitting ebuilds for #248 --- net-analyzer/cipherscan/cipherscan-20180519.ebuild | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net-analyzer/cipherscan/cipherscan-20180519.ebuild b/net-analyzer/cipherscan/cipherscan-20180519.ebuild index b0643a334..c9ca41a13 100644 --- a/net-analyzer/cipherscan/cipherscan-20180519.ebuild +++ b/net-analyzer/cipherscan/cipherscan-20180519.ebuild @@ -26,7 +26,9 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" -RDEPEND="dev-python/tlslite +# cipherscan depends on dev-python/tlslite-ng, not dev-python/tlslite. +RDEPEND="!dev-python/tlslite + dev-python/tlslite-ng dev-python/ecdsa" DEPEND="${RDEPEND}" From b50be3ca72aa29fe06b0dc2faf8c72d755cd543b Mon Sep 17 00:00:00 2001 From: Guido Kroon Date: Thu, 30 Aug 2018 22:32:48 +0200 Subject: [PATCH 3/3] adding to accept_keywords file --- profiles/pentoo/base/package.accept_keywords/net-analyzer | 1 + 1 file changed, 1 insertion(+) diff --git a/profiles/pentoo/base/package.accept_keywords/net-analyzer b/profiles/pentoo/base/package.accept_keywords/net-analyzer index a53bb97c9..219f5bee9 100644 --- a/profiles/pentoo/base/package.accept_keywords/net-analyzer +++ b/profiles/pentoo/base/package.accept_keywords/net-analyzer @@ -113,3 +113,4 @@ net-analyzer/sublist3r net-analyzer/amass ~net-analyzer/gobuster-1.4.2 +~net-analyzer/cipherscan-20180519