diff options
author | Rick Farina <zerochaos@gentoo.org> | 2024-01-02 13:06:54 -0500 |
---|---|---|
committer | Rick Farina <zerochaos@gentoo.org> | 2024-01-02 13:07:34 -0500 |
commit | 9af4de9760147a6d80fe072e5676ce843e1b1ba8 (patch) | |
tree | bcec030726bb9b18f50b46f74d7a37165c088c36 /app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20240102.ebuild | |
parent | net-analyzer/rrdtool: force graph for tests (diff) | |
download | gentoo-9af4de9760147a6d80fe072e5676ce843e1b1ba8.tar.gz gentoo-9af4de9760147a6d80fe072e5676ce843e1b1ba8.tar.bz2 gentoo-9af4de9760147a6d80fe072e5676ce843e1b1ba8.zip |
app-crypt/johntheripper-jumbo: add 1.9.0_p20240102
sync live
minor cleanup
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20240102.ebuild')
-rw-r--r-- | app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20240102.ebuild | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20240102.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20240102.ebuild new file mode 100644 index 000000000000..6ec25a477ce0 --- /dev/null +++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20240102.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs pax-utils + +DESCRIPTION="Fast password cracker, community enhanced version" +HOMEPAGE="http://www.openwall.com/john/" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/openwall/john.git" + EGIT_BRANCH="bleeding-jumbo" + inherit git-r3 +else + HASH_COMMIT="9daf16b5743b2c521d23c281e13ae8cdbd37b1eb" + SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/john-${HASH_COMMIT}" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="custom-cflags kerberos mpi opencl openmp pcap" + +DEPEND=">=dev-libs/openssl-1.0.1:= + virtual/libcrypt:= + mpi? ( virtual/mpi ) + opencl? ( virtual/opencl ) + kerberos? ( virtual/krb5 ) + pcap? ( net-libs/libpcap ) + dev-libs/gmp:= + sys-libs/zlib + app-arch/bzip2" +# Missing (unpackaged): +# - Digest::Haval256 +# - Digest::x +# See bug #777369. +# Pending keywording https://bugs.gentoo.org/921221 +# dev-perl/Compress-Raw-Lzma +RDEPEND="${DEPEND} + dev-perl/Digest-MD2 + virtual/perl-Digest-MD5 + dev-perl/Digest-SHA3 + dev-perl/Digest-GOST + !app-crypt/johntheripper" +RESTRICT="test" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + default + + cd src || die + eautoreconf + + sed -i 's#$prefix/share/john#/etc/john#' configure || die +} + +src_configure() { + cd src || die + + use custom-cflags || strip-flags + + econf \ + --enable-pkg-config \ + --disable-native-march \ + --disable-native-tests \ + --disable-rexgen \ + --with-openssl \ + --with-systemwide \ + $(use_enable mpi) \ + $(use_enable opencl) \ + $(use_enable openmp) \ + $(use_enable pcap) +} + +src_compile() { + # Uses default LD=$(CC) but if the user's set LD, it'll call it + # bug #729432. + emake LD="$(tc-getCC)" -C src +} + +src_test() { + pax-mark -mr run/john + + # this probably causes the following failure: + # Testing: as400-des, AS/400 DES [DES 32/64]... PASS + # Error, Invalid signature line trying to link to dynamic format. + # Original format=as400-ssha1 + sed '/.include /d' run/john.conf > run/john-test.conf + if use opencl; then + # GPU tests fail in portage, so run cpu only tests + ./run/john --config=run/john-test.conf --device=cpu --test=0 --verbosity=2 || die + else + # Weak tests + ./run/john --config=run/john-test.conf --test=0 --verbosity=2 || die + # Strong tests + #./run/john --test=1 --verbosity=2 || die + fi + + rm john-test.conf || die +} + +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 + local s + 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 + + # Scripts + exeinto /usr/share/john + doexe run/*.pl + doexe run/*.py + insinto /usr/share/john + doins -r run/lib + cd run || die + + local s + for s in *.pl *.py; do + dosym ../share/john/${s} /usr/bin/${s} + done + cd .. || die + + if use opencl; then + insinto /etc/john + doins -r run/opencl + fi + + # Config files + insinto /etc/john + doins run/*.chr run/password.lst + doins run/*.conf + doins -r run/rules run/ztex + + # Documentation + rm -f doc/README || die + dodoc -r README.md doc/* +} |