diff options
author | Rick Farina <zerochaos@gentoo.org> | 2018-12-18 16:32:27 -0500 |
---|---|---|
committer | Rick Farina <zerochaos@gentoo.org> | 2018-12-18 16:40:25 -0500 |
commit | 1abd827624bea952700371febd5442ce2c8ebdd1 (patch) | |
tree | 6f88677c9e6ebd084f6deeb2f5f48dd43a95daf8 /app-crypt/johntheripper-jumbo | |
parent | app-crypt/johntheripper: 1.8.0 (diff) | |
download | gentoo-1abd827624bea952700371febd5442ce2c8ebdd1.tar.gz gentoo-1abd827624bea952700371febd5442ce2c8ebdd1.tar.bz2 gentoo-1abd827624bea952700371febd5442ce2c8ebdd1.zip |
app-crypt/johntheripper-jumbo: split jtr and jumbo
jumbo "patch" has taken on a life of it's own and is now vastly too
different than jtr to keep a sane unified ebuild
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'app-crypt/johntheripper-jumbo')
-rw-r--r-- | app-crypt/johntheripper-jumbo/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch | 63 | ||||
-rw-r--r-- | app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild | 126 | ||||
-rw-r--r-- | app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild | 123 | ||||
-rw-r--r-- | app-crypt/johntheripper-jumbo/metadata.xml | 19 |
5 files changed, 332 insertions, 0 deletions
diff --git a/app-crypt/johntheripper-jumbo/Manifest b/app-crypt/johntheripper-jumbo/Manifest new file mode 100644 index 000000000000..1cbbf2f69a98 --- /dev/null +++ b/app-crypt/johntheripper-jumbo/Manifest @@ -0,0 +1 @@ +DIST JohnTheRipper-1.8.0-jumbo-1.tar.gz 32533148 BLAKE2B 15929fa25314438619899582b209bee6902b1e53dc2df39ed6a686820665fd4d8e56d26b3f0082d05dc6be2f54add3526570d936c0a929641e33e6dcfb7a13b5 SHA512 8b7fad7a6330b5ff1afc306218ba698aaa27776b566f82c2e76102d5ceb10aeafa69d71fa6fff67c81996ea2c6a04384bab4696ed192306c6d074873562e7089 diff --git a/app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch b/app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch new file mode 100644 index 000000000000..f2a7984955ab --- /dev/null +++ b/app-crypt/johntheripper-jumbo/files/1.8.0-gcc5.patch @@ -0,0 +1,63 @@ +From e2e868db3e153b3f959e119a51703d4afb99c624 Mon Sep 17 00:00:00 2001 +From: magnum <john.magnum@hushmail.com> +Date: Wed, 13 May 2015 12:05:00 +0200 +Subject: [PATCH] Add another solution to #1093. This make it possible to build + using gcc 5 without --std=gnu89 (although I kept the latter for now). See + also #1250. + +--- + src/DES_bs_b.c | 3 +++ + src/MD5_std.c | 12 ++++++++++++ + 2 files changed, 15 insertions(+) + +diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c +index 306b4e4..18c9235 100644 +--- a/src/DES_bs_b.c ++++ b/src/DES_bs_b.c +@@ -1272,6 +1272,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void) + #endif + + #if DES_bs_mt ++#if __GNUC__ >= 5 ++extern ++#endif + MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt) + #else + void DES_bs_set_salt(ARCH_WORD salt) +diff --git a/src/MD5_std.c b/src/MD5_std.c +index 6bdcd35..1eec9b4 100644 +--- a/src/MD5_std.c ++++ b/src/MD5_std.c +@@ -496,9 +496,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]); + #if MD5_std_mt + #define MD5_body(x, out) \ + MD5_body_for_thread(t, x, out) ++#if __GNUC__ >= 5 ++extern ++#endif + MAYBE_INLINE_BODY void MD5_body_for_thread(int t, + MD5_word x[15], MD5_word out[4]) + #else ++#if __GNUC__ >= 5 ++extern ++#endif + MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4]) + #endif + { +@@ -595,10 +601,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4]) + #if MD5_std_mt + #define MD5_body(x0, x1, out0, out1) \ + MD5_body_for_thread(t, x0, x1, out0, out1) ++#if __GNUC__ >= 5 ++extern ++#endif + MAYBE_INLINE_BODY void MD5_body_for_thread(int t, + MD5_word x0[15], MD5_word x1[15], + MD5_word out0[4], MD5_word out1[4]) + #else ++#if __GNUC__ >= 5 ++extern ++#endif + MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15], + MD5_word out0[4], MD5_word out1[4]) + #endif diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild new file mode 100644 index 000000000000..6e8d04dc6d4f --- /dev/null +++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.8.0.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs pax-utils + +DESCRIPTION="fast password cracker" +HOMEPAGE="http://www.openwall.com/john/" + +MY_PN="JohnTheRipper" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" +else + JUMBO="jumbo-1" + MY_PV="${PV}-${JUMBO}" + MY_P="${MY_PN}-${MY_PV}" + SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" + S="${WORKDIR}/${MY_P}" +fi + +LICENSE="GPL-2" +SLOT="0" +#removed rexgen and commoncrypto +IUSE="custom-cflags kerberos mpi opencl openmp pcap" + +DEPEND=">=dev-libs/openssl-1.0.1:0 + mpi? ( virtual/mpi ) + opencl? ( virtual/opencl ) + kerberos? ( virtual/krb5 ) + pcap? ( net-libs/libpcap ) + dev-libs/gmp:* + sys-libs/zlib + app-arch/bzip2" + +RDEPEND="${DEPEND} + !app-crypt/johntheripper" + +pkg_setup() { + if use openmp && [[ ${MERGE_TYPE} != binary ]]; then + tc-has-openmp || die "Please switch to an openmp compatible compiler" + fi +} + +src_prepare() { + eapply "${FILESDIR}/${PV}-gcc5.patch" + sed -i 's#/usr/share/john#/etc/john#' src/params.h || die + default +} + +src_configure() { + cd src || die + + use custom-cflags || strip-flags + + # John ignores CPPFLAGS, use CFLAGS instead + append-cflags -DJOHN_SYSTEMWIDE=1 + + econf \ + --disable-native-macro \ + --disable-native-tests \ + --without-commoncrypto \ + --disable-rexgen \ + --with-openssl \ + $(use_enable mpi) \ + $(use_enable opencl) \ + $(use_enable openmp) \ + $(use_enable pcap) +} + +src_compile() { + emake -C src +} + +src_test() { + pax-mark -mr run/john + #if use opencl; then + #gpu tests fail in portage, so run cpu only tests + # ./run/john --device=cpu --test=0 --verbosity=2 || die + #else + #weak tests + # ./run/john --test=0 --verbosity=2 || die + #strong tests + #./run/john --test=1 --verbosity=2 || die + #fi + ewarn "When built systemwide, john can't run tests without reading files in /etc." + ewarn "Don't bother opening a bug for this unless you include a patch to fix it" +} + +src_install() { + # executables + dosbin run/john + newsbin run/mailer john-mailer + + pax-mark -mr "${ED}usr/sbin/john" + + # grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3 + for s in \ + unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \ + zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \ + hccap2john base64conv truecrypt_volume2john keystore2john + do + dosym john /usr/sbin/$s + done + + insinto /usr/share/john + doins run/*.py + + if use opencl; then + insinto /usr/share/john/kernels + doins run/kernels/* + fi + + # config files + insinto /etc/john + doins run/*.chr run/password.lst + doins run/*.conf + doins -r run/kernels + + # documentation + dodoc doc/* +} diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild new file mode 100644 index 000000000000..1e72fa5104cb --- /dev/null +++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-9999.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs pax-utils + +DESCRIPTION="fast password cracker" +HOMEPAGE="http://www.openwall.com/john/" + +MY_PN="JohnTheRipper" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git" + inherit git-r3 + KEYWORDS="" +else + JUMBO="jumbo-1" + MY_PV="${PV}-${JUMBO}" + MY_P="${MY_PN}-${MY_PV}" + SRC_URI="https://github.com/magnumripper/${MY_PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" + S="${WORKDIR}/${MY_P}" +fi + +LICENSE="GPL-2" +SLOT="0" +#removed rexgen and commoncrypto +IUSE="custom-cflags kerberos mpi opencl openmp pcap" + +DEPEND=">=dev-libs/openssl-1.0.1:0 + mpi? ( virtual/mpi ) + opencl? ( virtual/opencl ) + kerberos? ( virtual/krb5 ) + pcap? ( net-libs/libpcap ) + dev-libs/gmp:* + sys-libs/zlib + app-arch/bzip2" + +RDEPEND="${DEPEND} + !app-crypt/johntheripper" + +pkg_setup() { + if use openmp && [[ ${MERGE_TYPE} != binary ]]; then + tc-has-openmp || die "Please switch to an openmp compatible compiler" + fi +} + +src_prepare() { + sed -i 's#$prefix/share/john#/etc/john#' src/configure || die + default +} + +src_configure() { + cd src || die + + use custom-cflags || strip-flags + + econf \ + --disable-native-march \ + --disable-native-tests \ + --without-commoncrypto \ + --disable-rexgen \ + --with-openssl \ + --with-systemwide \ + $(use_enable mpi) \ + $(use_enable opencl) \ + $(use_enable openmp) \ + $(use_enable pcap) +} + +src_compile() { + emake -C src +} + +src_test() { + pax-mark -mr run/john + #if use opencl; then + #gpu tests fail in portage, so run cpu only tests + # ./run/john --device=cpu --test=0 --verbosity=2 || die + #else + #weak tests + # ./run/john --test=0 --verbosity=2 || die + #strong tests + #./run/john --test=1 --verbosity=2 || die + #fi + ewarn "When built systemwide, john can't run tests without reading files in /etc." + ewarn "Don't bother opening a bug for this unless you include a patch to fix it" +} + +src_install() { + # executables + dosbin run/john + newsbin run/mailer john-mailer + + pax-mark -mr "${ED}usr/sbin/john" + + # grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3 + for s in \ + unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \ + zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \ + hccap2john base64conv truecrypt_volume2john keystore2john + do + dosym john /usr/sbin/$s + done + + insinto /usr/share/john + doins run/*.py + + if use opencl; then + insinto /usr/share/john/kernels + doins run/kernels/* + fi + + # config files + insinto /etc/john + doins run/*.chr run/password.lst + doins run/*.conf + doins -r run/rules run/kernels run/ztex + + # documentation + dodoc doc/* +} diff --git a/app-crypt/johntheripper-jumbo/metadata.xml b/app-crypt/johntheripper-jumbo/metadata.xml new file mode 100644 index 000000000000..6eefb4340ea5 --- /dev/null +++ b/app-crypt/johntheripper-jumbo/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <maintainer type="project"> + <email>crypto@gentoo.org</email> + <name>Crypto</name> + </maintainer> + <upstream> + <remote-id type="github">magnumripper/JohnTheRipper</remote-id> + </upstream> + <use> + <flag name="opencl">Build with opencl/GPU cracking support</flag> + <flag name="pcap">Build with pcap support</flag> + </use> +</pkgmetadata> |