Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/johntheripper-jumbo/, app-crypt/johntheripper-jumbo/files/
Date: Wed, 22 Sep 2021 22:25:03
Message-Id: 1632349452.3f0a0993461657039f3a44f37f6e67490e09d4c6.sam@gentoo
1 commit: 3f0a0993461657039f3a44f37f6e67490e09d4c6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 22 22:22:32 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 22 22:24:12 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f0a0993
7
8 app-crypt/johntheripper-jumbo: add 1.9.0_p20210920-r1
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 app-crypt/johntheripper-jumbo/Manifest | 1 +
13 .../johntheripper-jumbo-1.9.0-fix-bashism.patch | 24 ++++
14 .../johntheripper-jumbo-1.9.0_p20210920.ebuild | 143 +++++++++++++++++++++
15 3 files changed, 168 insertions(+)
16
17 diff --git a/app-crypt/johntheripper-jumbo/Manifest b/app-crypt/johntheripper-jumbo/Manifest
18 index cf2f85e511b..40c0211c679 100644
19 --- a/app-crypt/johntheripper-jumbo/Manifest
20 +++ b/app-crypt/johntheripper-jumbo/Manifest
21 @@ -1 +1,2 @@
22 DIST john-1.9.0-jumbo-1.tar.xz 33638768 BLAKE2B 2fd6813e234308408d42581705ee8b25f9217a3dfb43f05483156f7bb67d0ce0d6de9c3ce8c2e4a17bb99bb377119dae2897bc08c800e7bc80bc6cf245400df6 SHA512 c5cb5dc739ee4c666f8479cdf10511fddc391b590c59f90c060d3ccd8449b794ac7b831a6d1f7553883892499e709a66578cfa4d62caef9b7e0a831eb827e808
23 +DIST johntheripper-jumbo-1.9.0_p20210920.tar.gz 47758128 BLAKE2B e85255dc218c43e6358f76eac1e79af01d437a7a1fcddd608a390734fdc4070cbf949b8abc080b82decf4a1f5e32d2baa6d2a09d385a31913d8e988c8732e85e SHA512 5121434ad275921fe6288c51fd9dfd36ed3162387e70e8089bbc266d4a17ea461b72ce26b2004acfb62d95a9ee2d570ef3b3f00c1d031abd8cff2f20c3ab480a
24
25 diff --git a/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0-fix-bashism.patch b/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0-fix-bashism.patch
26 new file mode 100644
27 index 00000000000..a0a18158ce7
28 --- /dev/null
29 +++ b/app-crypt/johntheripper-jumbo/files/johntheripper-jumbo-1.9.0-fix-bashism.patch
30 @@ -0,0 +1,24 @@
31 +https://patch-diff.githubusercontent.com/raw/openwall/john/pull/4822.patch
32 +
33 +From dd9501341808fe19b9c5cd4f8f04edfc5f377077 Mon Sep 17 00:00:00 2001
34 +From: Sam James <sam@g.o>
35 +Date: Wed, 22 Sep 2021 19:34:38 +0100
36 +Subject: [PATCH] configure.ac: avoid bashism in pkg-config check
37 +
38 +== is a Bashism and configure scripts need to work
39 +with a POSIX shell, so let's change to = (like in
40 +the other condition).
41 +
42 +Signed-off-by: Sam James <sam@g.o>
43 +--- a/src/configure.ac
44 ++++ b/src/configure.ac
45 +@@ -347,7 +347,7 @@ AS_IF([test -z "$STRIP"], [AC_CHECK_TOOL([STRIP], [strip])])
46 + dnl Check if we have this at all
47 + PKG_PROG_PKG_CONFIG
48 + AC_MSG_CHECKING([if pkg-config will be used])
49 +-if test "x$PKG_CONFIG" = x || test "x$enable_pkg_config" == xno ; then
50 ++if test "x$PKG_CONFIG" = x || test "x$enable_pkg_config" = xno ; then
51 + JTR_MSG_RESULT_FAILIF_FORCED([xno], [x$enable_pkg_config], [pkg-config is NOT available])
52 + PKG_CONFIG=no
53 + else
54 +
55
56 diff --git a/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20210920.ebuild b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20210920.ebuild
57 new file mode 100644
58 index 00000000000..df228200cfd
59 --- /dev/null
60 +++ b/app-crypt/johntheripper-jumbo/johntheripper-jumbo-1.9.0_p20210920.ebuild
61 @@ -0,0 +1,143 @@
62 +# Copyright 1999-2021 Gentoo Authors
63 +# Distributed under the terms of the GNU General Public License v2
64 +
65 +EAPI=7
66 +
67 +inherit autotools flag-o-matic toolchain-funcs pax-utils
68 +
69 +DESCRIPTION="Fast password cracker"
70 +HOMEPAGE="http://www.openwall.com/john/"
71 +
72 +MY_PN="JohnTheRipper"
73 +
74 +if [[ ${PV} == "9999" ]] ; then
75 + EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
76 + inherit git-r3
77 +else
78 + JUMBO="jumbo-1.1"
79 + MY_PV="${PV}-${JUMBO}"
80 + MY_P="john-${MY_PV}"
81 + HASH_COMMIT="43c7f8850736d4ec68bf0a022ae9fb34c274a01d"
82 +
83 + SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
84 + S="${WORKDIR}/john-${HASH_COMMIT}"
85 +
86 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
87 +fi
88 +
89 +LICENSE="GPL-2"
90 +SLOT="0"
91 +IUSE="custom-cflags kerberos mpi opencl openmp pcap"
92 +
93 +DEPEND=">=dev-libs/openssl-1.0.1:=
94 + virtual/libcrypt:=
95 + mpi? ( virtual/mpi )
96 + opencl? ( virtual/opencl )
97 + kerberos? ( virtual/krb5 )
98 + pcap? ( net-libs/libpcap )
99 + dev-libs/gmp:=
100 + sys-libs/zlib
101 + app-arch/bzip2"
102 +RDEPEND="${DEPEND}
103 + !app-crypt/johntheripper"
104 +
105 +PATCHES=(
106 + "${FILESDIR}"/${PN}-1.9.0-fix-bashism.patch
107 +)
108 +
109 +pkg_setup() {
110 + if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
111 + tc-has-openmp || die "Please switch to an OpenMP compatible compiler"
112 + fi
113 +}
114 +
115 +src_prepare() {
116 + default
117 +
118 + cd src || die
119 + eautoreconf
120 +
121 + sed -i 's#$prefix/share/john#/etc/john#' configure || die
122 +}
123 +
124 +src_configure() {
125 + cd src || die
126 +
127 + use custom-cflags || strip-flags
128 +
129 + econf \
130 + --enable-pkg-config \
131 + --disable-native-march \
132 + --disable-native-tests \
133 + --disable-rexgen \
134 + --with-openssl \
135 + --with-systemwide \
136 + $(use_enable mpi) \
137 + $(use_enable opencl) \
138 + $(use_enable openmp) \
139 + $(use_enable pcap)
140 +}
141 +
142 +src_compile() {
143 + emake -C src
144 +}
145 +
146 +src_test() {
147 + pax-mark -mr run/john
148 + #if use opencl; then
149 + #gpu tests fail in portage, so run cpu only tests
150 + # ./run/john --device=cpu --test=0 --verbosity=2 || die
151 + #else
152 + #weak tests
153 + # ./run/john --test=0 --verbosity=2 || die
154 + #strong tests
155 + #./run/john --test=1 --verbosity=2 || die
156 + #fi
157 + ewarn "When built systemwide, john can't run tests without reading files in /etc."
158 + ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
159 +}
160 +
161 +src_install() {
162 + # Executables
163 + dosbin run/john
164 + newsbin run/mailer john-mailer
165 +
166 + pax-mark -mr "${ED}/usr/sbin/john"
167 +
168 + # grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
169 + local s
170 + for s in \
171 + unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \
172 + zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \
173 + hccap2john base64conv truecrypt_volume2john keystore2john
174 + do
175 + dosym john /usr/sbin/${s}
176 + done
177 +
178 + # Scripts
179 + exeinto /usr/share/john
180 + doexe run/*.pl
181 + doexe run/*.py
182 + cd run || die
183 +
184 + local s
185 + for s in *.pl *.py; do
186 + dosym ../share/john/${s} /usr/bin/${s}
187 + done
188 + cd .. || die
189 +
190 + if use opencl; then
191 + insinto /etc/john
192 + doins -r run/opencl
193 + fi
194 +
195 + # Config files
196 + insinto /etc/john
197 + doins run/*.chr run/password.lst
198 + doins run/*.conf
199 + doins -r run/rules run/ztex
200 +
201 + # dDocumentation
202 + rm -f doc/README || die
203 + dodoc -r README.md doc/*
204 +}