Gentoo Archives: gentoo-commits

From: Rick Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/johntheripper-jumbo/
Date: Sun, 02 Oct 2022 02:24:22
Message-Id: 1664676644.000432917e31a8f0dbbacde06951ac9a70342be7.zerochaos@gentoo
1 commit: 000432917e31a8f0dbbacde06951ac9a70342be7
2 Author: matoro <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
3 AuthorDate: Sun Sep 18 03:29:25 2022 +0000
4 Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 2 02:10:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00043291
7
8 app-crypt/johntheripper-jumbo: install bundled perl deps
9
10 Several perl scripts e.g. pdf2john.pl need these local bundled perl deps
11 installed. They are pretty heavily forked from the original upstream
12 versions, and locally contained to this package.
13
14 Closes: https://bugs.gentoo.org/830660
15 Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
16
17 .../johntheripper-jumbo-1.9.0_p20211129-r1.ebuild | 159 +++++++++++++++++++++
18 1 file changed, 159 insertions(+)
19
20 diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20211129-r1.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20211129-r1.ebuild
21 new file mode 100644
22 index 000000000000..9abb2540073e
23 --- /dev/null
24 +++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20211129-r1.ebuild
25 @@ -0,0 +1,159 @@
26 +# Copyright 1999-2022 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=7
30 +
31 +inherit autotools flag-o-matic toolchain-funcs pax-utils
32 +
33 +DESCRIPTION="Fast password cracker"
34 +HOMEPAGE="http://www.openwall.com/john/"
35 +
36 +MY_PN="JohnTheRipper"
37 +
38 +if [[ ${PV} == "9999" ]] ; then
39 + EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
40 + inherit git-r3
41 +else
42 + JUMBO="jumbo-1.1"
43 + MY_PV="${PV}-${JUMBO}"
44 + MY_P="john-${MY_PV}"
45 + HASH_COMMIT="5d0c85f16f96ca7b6dd06640e95a5801081d6e20"
46 +
47 + SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
48 + S="${WORKDIR}/john-${HASH_COMMIT}"
49 +
50 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
51 +fi
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +IUSE="custom-cflags kerberos mpi opencl openmp pcap"
56 +
57 +DEPEND=">=dev-libs/openssl-1.0.1:=
58 + virtual/libcrypt:=
59 + mpi? ( virtual/mpi )
60 + opencl? ( virtual/opencl )
61 + kerberos? ( virtual/krb5 )
62 + pcap? ( net-libs/libpcap )
63 + dev-libs/gmp:=
64 + sys-libs/zlib
65 + app-arch/bzip2"
66 +# Missing (unpackaged):
67 +# - Digest::Haval256
68 +# - Digest::x
69 +# See bug #777369.
70 +RDEPEND="${DEPEND}
71 + dev-perl/Digest-MD2
72 + virtual/perl-Digest-MD5
73 + dev-perl/Digest-SHA3
74 + dev-perl/Digest-GOST
75 + !app-crypt/johntheripper"
76 +
77 +PATCHES=(
78 + "${FILESDIR}"/${P}-fix-bashism.patch
79 +)
80 +
81 +pkg_pretend() {
82 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
83 +}
84 +
85 +pkg_setup() {
86 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
87 +}
88 +
89 +src_prepare() {
90 + default
91 +
92 + cd src || die
93 + eautoreconf
94 +
95 + sed -i 's#$prefix/share/john#/etc/john#' configure || die
96 +}
97 +
98 +src_configure() {
99 + cd src || die
100 +
101 + use custom-cflags || strip-flags
102 +
103 + econf \
104 + --enable-pkg-config \
105 + --disable-native-march \
106 + --disable-native-tests \
107 + --disable-rexgen \
108 + --with-openssl \
109 + --with-systemwide \
110 + $(use_enable mpi) \
111 + $(use_enable opencl) \
112 + $(use_enable openmp) \
113 + $(use_enable pcap)
114 +}
115 +
116 +src_compile() {
117 + # Uses default LD=$(CC) but if the user's set LD, it'll call it
118 + # bug #729432.
119 + emake LD="$(tc-getCC)" -C src
120 +}
121 +
122 +src_test() {
123 + pax-mark -mr run/john
124 +
125 + #if use opencl; then
126 + # GPU tests fail in portage, so run cpu only tests
127 + # ./run/john --device=cpu --test=0 --verbosity=2 || die
128 + #else
129 + # Weak tests
130 + #./run/john --test=0 --verbosity=2 || die
131 + # Strong tests
132 + #./run/john --test=1 --verbosity=2 || die
133 + #fi
134 +
135 + ewarn "When built systemwide, john can't run tests without reading files in /etc."
136 + ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
137 +}
138 +
139 +src_install() {
140 + # Executables
141 + dosbin run/john
142 + newsbin run/mailer john-mailer
143 +
144 + pax-mark -mr "${ED}/usr/sbin/john"
145 +
146 + # grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
147 + local s
148 + for s in \
149 + unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \
150 + zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \
151 + hccap2john base64conv truecrypt_volume2john keystore2john
152 + do
153 + dosym john /usr/sbin/${s}
154 + done
155 +
156 + # Scripts
157 + exeinto /usr/share/john
158 + doexe run/*.pl
159 + doexe run/*.py
160 + insinto /usr/share/john
161 + doins -r run/lib
162 + cd run || die
163 +
164 + local s
165 + for s in *.pl *.py; do
166 + dosym ../share/john/${s} /usr/bin/${s}
167 + done
168 + cd .. || die
169 +
170 + if use opencl; then
171 + insinto /etc/john
172 + doins -r run/opencl
173 + fi
174 +
175 + # Config files
176 + insinto /etc/john
177 + doins run/*.chr run/password.lst
178 + doins run/*.conf
179 + doins -r run/rules run/ztex
180 +
181 + # Documentation
182 + rm -f doc/README || die
183 + dodoc -r README.md doc/*
184 +}