Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-crypt/johntheripper: johntheripper-1.7.9-r6.ebuild ChangeLog
Date: Sat, 24 Nov 2012 23:17:56
Message-Id: 20121124231746.A0EA320C65@flycatcher.gentoo.org
1 robbat2 12/11/24 23:17:46
2
3 Modified: ChangeLog
4 Added: johntheripper-1.7.9-r6.ebuild
5 Log:
6 Include all of the other john symlinks for the hash extraction modes.
7
8 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.147 app-crypt/johntheripper/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.147&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?rev=1.147&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/ChangeLog?r1=1.146&r2=1.147
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v
20 retrieving revision 1.146
21 retrieving revision 1.147
22 diff -p -w -b -B -u -u -r1.146 -r1.147
23 --- ChangeLog 8 Oct 2012 23:17:21 -0000 1.146
24 +++ ChangeLog 24 Nov 2012 23:17:46 -0000 1.147
25 @@ -1,6 +1,12 @@
26 # ChangeLog for app-crypt/johntheripper
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.146 2012/10/08 23:17:21 zerochaos Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.147 2012/11/24 23:17:46 robbat2 Exp $
30 +
31 +*johntheripper-1.7.9-r6 (24 Nov 2012)
32 +
33 + 24 Nov 2012; Robin H. Johnson <robbat2@g.o>
34 + +johntheripper-1.7.9-r6.ebuild:
35 + Include all of the other john symlinks for the hash extraction modes.
36
37 08 Oct 2012; Rick Farina <zerochaos@g.o> johntheripper-1.7.9-r5.ebuild:
38 restore test functionality when possible, stub out for later opencl fixes
39
40
41
42 1.1 app-crypt/johntheripper/johntheripper-1.7.9-r6.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9-r6.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9-r6.ebuild?rev=1.1&content-type=text/plain
46
47 Index: johntheripper-1.7.9-r6.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.9-r6.ebuild,v 1.1 2012/11/24 23:17:46 robbat2 Exp $
52
53 EAPI="4"
54
55 inherit eutils flag-o-matic toolchain-funcs pax-utils multilib
56
57 MY_PN="john"
58 MY_P="${MY_PN}-${PV}"
59
60 JUMBO="jumbo-7"
61
62 DESCRIPTION="fast password cracker"
63 HOMEPAGE="http://www.openwall.com/john/"
64
65 SRC_URI="http://www.openwall.com/john/g/${MY_P}.tar.bz2
66 !minimal? ( http://www.openwall.com/john/g/${MY_P}-${JUMBO}.diff.gz )"
67
68 LICENSE="GPL-2"
69 SLOT="0"
70 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
71 #Remove AltiVec USE flag. Appears to be an upstream issue.
72 IUSE="cuda custom-cflags -minimal mmx mpi opencl openmp sse2"
73 REQUIRED_USE="openmp? ( !minimal )
74 mpi? ( !minimal )
75 cuda? ( !minimal )
76 opencl? ( !minimal )"
77
78 RDEPEND="!minimal? ( >=dev-libs/openssl-0.9.7:0 )
79 mpi? ( virtual/mpi )
80 cuda? ( x11-drivers/nvidia-drivers dev-util/nvidia-cuda-toolkit )
81 opencl? ( virtual/opencl )"
82 DEPEND="${RDEPEND}"
83
84 S="${WORKDIR}/${MY_P}"
85
86 has_xop() {
87 echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep -q "#define __XOP__ 1"
88 }
89
90 has_avx() {
91 echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep -q "#define __AVX__ 1"
92 }
93
94 get_target() {
95 if use alpha; then
96 echo "linux-alpha"
97 elif use amd64; then
98 if has_xop; then
99 echo "linux-x86-64-xop"
100 elif has_avx; then
101 echo "linux-x86-64-avx"
102 else
103 echo "linux-x86-64"
104 fi
105 elif use ppc; then
106 #if use altivec; then
107 # echo "linux-ppc32-altivec"
108 #else
109 echo "linux-ppc32"
110 #fi
111 elif use ppc64; then
112 #if use altivec; then
113 # echo "linux-ppc32-altivec"
114 #else
115 echo "linux-ppc64"
116 #fi
117 # linux-ppc64-altivec is slightly slower than linux-ppc32-altivec for most hash types.
118 # as per the Makefile comments
119 elif use sparc; then
120 echo "linux-sparc"
121 elif use x86; then
122 if has_xop; then
123 echo "linux-x86-xop"
124 elif has_avx; then
125 echo "linux-x86-avx"
126 elif use sse2; then
127 echo "linux-x86-sse2"
128 elif use mmx; then
129 echo "linux-x86-mmx"
130 else
131 echo "linux-x86-any"
132 fi
133 elif use ppc-macos; then
134 # force AltiVec, the non-altivec profile contains ancient compiler cruft
135 # if use altivec; then
136 echo "macosx-ppc32-altivec"
137 # else
138 # echo "macosx-ppc32"
139 # fi
140 # for Tiger this can be macosx-ppc64
141 elif use x86-macos; then
142 if use sse2; then
143 echo "macosx-x86-sse2"
144 else
145 echo "macosx-x86"
146 fi
147 elif use x86-solaris; then
148 echo "solaris-x86-any"
149 elif use x86-fbsd; then
150 if use sse2; then
151 echo "freebsd-x86-sse2"
152 elif use mmx; then
153 echo "freebsd-x86-mmx"
154 else
155 echo "freebsd-x86-any"
156 fi
157 elif use amd64-fbsd; then
158 echo "freebsd-x86-64"
159 else
160 echo "generic"
161 fi
162 }
163
164 get_john_objs() {
165 echo -n '${JOHN_COMMON_OBJS} '
166 if use opencl; then
167 echo -n '${OCL_OBJS} '
168 fi
169 if use cuda; then
170 echo -n '${CUDA_OBJS}'
171 fi
172 }
173
174 pkg_setup() {
175 if use openmp ; then
176 tc-has-openmp || die "Please switch to an openmp compatible compiler"
177 fi
178 }
179
180 src_prepare() {
181 if ! use minimal; then
182 epatch "${WORKDIR}/${MY_P}-${JUMBO}.diff"
183
184 if use mpi ; then
185 sed -e "s/^#CC = mpicc/CC = mpicc/" \
186 -e "s/^#MPIOBJ =/MPIOBJ =/" \
187 -i src/Makefile || die
188 fi
189
190 # fix typo in jumbo patch
191 sed -i 's:All15:All5:' run/john.conf || die
192 fi
193
194 cd src
195 epatch "${FILESDIR}/${PN}-1.7.6-cflags.patch"
196 epatch "${FILESDIR}/${PN}-1.7.3.1-mkdir-sandbox.patch"
197
198 if ! use minimal; then
199 sed -e "s/LDFLAGS *= */override LDFLAGS += /" -e "/LDFLAGS/s/-s//" \
200 -e "/LDFLAGS/s/-L[^ ]*//g" -e "/CFLAGS/s/-[IL][^ ]*//g" \
201 -i Makefile || die "sed Makefile failed"
202 sed -i 's#/usr/local#/opt#g' Makefile || die
203 fi
204 sed -i 's#JOHN_OBJS = \\#JOHN_COMMON_OBJS = \\#g' Makefile || die
205 }
206
207 src_compile() {
208 local OMP
209
210 use custom-cflags || strip-flags
211 echo "#define JOHN_SYSTEMWIDE 1" >> config.gentoo
212 echo "#define JOHN_SYSTEMWIDE_HOME \"${EPREFIX}/etc/john\"" >> config.gentoo
213 echo "#define JOHN_SYSTEMWIDE_EXEC \"${EPREFIX}/usr/libexec/john\"" >> config.gentoo
214 append-flags -fPIC -fPIE
215 gcc-specs-pie && append-ldflags -nopie
216 use openmp && OMP="-fopenmp"
217
218 CPP="$(tc-getCXX)" CC="$(tc-getCC)" AS="$(tc-getCC)" LD="$(tc-getCC)"
219 use mpi && CPP=mpicxx CC=mpicc AS=mpicc LD=mpicc
220
221 #this stuff was all stolen from the Makefile, if build breaks, check this first
222 if use opencl; then
223 GPUCFLAGS="${GPUCFLAGS} -DCL_VERSION_1_0"
224 GPULDFLAGS="${GPULDFLAGS} -lOpenCL"
225 fi
226 if use cuda; then
227 GPUCFLAGS="${GPUCFLAGS} -DHAVE_CUDA"
228 GPULDFLAGS="${GPULDFLAGS} -L/opt/cuda/$(get_libdir) -lcudart"
229 fi
230
231 emake -C src/ \
232 CPP="${CPP}" CC="${CC}" AS="${AS}" LD="${LD}" \
233 CFLAGS="-c -Wall -include \\\"${S}\\\"/config.gentoo ${CFLAGS} ${OMP} ${GPUCFLAGS}" \
234 LDFLAGS="${LDFLAGS} ${GPULDFLAGS}" \
235 OPT_NORMAL="" \
236 OMPFLAGS="${OMP}" \
237 JOHN_OBJS="$(get_john_objs)" \
238 $(get_target)
239 }
240
241 src_test() {
242 if use opencl; then
243 cp src/opencl/*.cl run/
244 cp src/opencl_*.h run/
245 fi
246 pax-mark -mr run/john
247 if use opencl || use cuda; then
248 ewarn "GPU tests fail, skipping all tests..."
249 else
250 make -C src/ check
251 fi
252 }
253
254 src_install() {
255 # executables
256 dosbin run/john
257 newsbin run/mailer john-mailer
258
259 pax-mark -mr "${ED}usr/sbin/john" || die
260
261 dosym john /usr/sbin/unafs
262 dosym john /usr/sbin/unique
263 dosym john /usr/sbin/unshadow
264
265 # jumbo-patch additions
266 if ! use minimal; then
267 for s in \
268 keychain2john keepass2john pwsafe2john hccap2john \
269 racf2john zip2john rar2john pdf2john ssh2john undrop \
270 ; do
271 dosym john /usr/sbin/$s
272 done
273 dosbin run/calc_stat
274 dosbin run/genmkvpwd
275 dosbin run/mkvcalcproba
276 dosbin run/raw2dyna
277 dosbin run/tgtsnarf
278 insinto /etc/john
279 doins run/genincstats.rb run/stats
280 doins run/netscreen.py run/sap2john.pl
281 if use opencl; then
282 doins src/opencl/*.cl
283 doins src/opencl_*.h
284 fi
285 fi
286
287 # config files
288 insinto /etc/john
289 doins run/*.chr run/password.lst
290 doins run/*.conf
291
292 # documentation
293 dodoc doc/*
294 }