diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-09-03 12:36:47 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-09-03 12:36:47 +0000 |
commit | e38e1019a87a5cc8577679155ba362fd778af48d (patch) | |
tree | 2135d0e517924913ef718b8533263663ca8010c6 /app-crypt/johntheripper | |
parent | Bump to 1.9.1. Small patch by Lorenz Quack. Fixes #280445 (diff) | |
download | gentoo-2-e38e1019a87a5cc8577679155ba362fd778af48d.tar.gz gentoo-2-e38e1019a87a5cc8577679155ba362fd778af48d.tar.bz2 gentoo-2-e38e1019a87a5cc8577679155ba362fd778af48d.zip |
Small set of fixes, thanks to RB. Closes #277811
(Portage version: 2.2_rc40/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/johntheripper')
5 files changed, 283 insertions, 39 deletions
diff --git a/app-crypt/johntheripper/ChangeLog b/app-crypt/johntheripper/ChangeLog index 3b715bd1c03d..38c08f57cf5a 100644 --- a/app-crypt/johntheripper/ChangeLog +++ b/app-crypt/johntheripper/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-crypt/johntheripper # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.97 2009/06/23 00:03:52 rich0 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/ChangeLog,v 1.98 2009/09/03 12:36:47 patrick Exp $ + +*johntheripper-1.7.3.1-r1 (03 Sep 2009) + + 03 Sep 2009; Patrick Lauer <patrick@gentoo.org> + +johntheripper-1.7.3.1-r1.ebuild, + +files/johntheripper-1.7.3.1-all-5-stackdef.S.patch, + +files/johntheripper-1.7.3.1-cflags.patch, + files/johntheripper-1.7.3.1-stackdef.S.patch: + Small set of fixes, thanks to RB. Closes #277811 23 Jun 2009; Richard Freeman <rich0@gentoo.org> johntheripper-1.7.3.1.ebuild: diff --git a/app-crypt/johntheripper/files/johntheripper-1.7.3.1-all-5-stackdef.S.patch b/app-crypt/johntheripper/files/johntheripper-1.7.3.1-all-5-stackdef.S.patch new file mode 100644 index 000000000000..1baced819820 --- /dev/null +++ b/app-crypt/johntheripper/files/johntheripper-1.7.3.1-all-5-stackdef.S.patch @@ -0,0 +1,21 @@ +diff -urpN john-1.7.3.1.orig/src/md5-mmx.S john-1.7.3.1/src/md5-mmx.S +--- john-1.7.3.1.orig/src/md5-mmx.S 2009-06-26 14:03:21.073960144 -0600 ++++ john-1.7.3.1/src/md5-mmx.S 2009-06-26 14:01:28.889959256 -0600 +@@ -306,3 +306,6 @@ mdfivemmx_noinit: + + ret + ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif +diff -urpN john-1.7.3.1.orig/src/sha1-mmx.S john-1.7.3.1/src/sha1-mmx.S +--- john-1.7.3.1.orig/src/sha1-mmx.S 2009-06-26 14:03:21.093949076 -0600 ++++ john-1.7.3.1/src/sha1-mmx.S 2009-06-26 14:01:36.706958726 -0600 +@@ -558,3 +558,7 @@ endianity: + por tmp2, ctxd + por tmp4, ctxe + */ ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits ++#endif diff --git a/app-crypt/johntheripper/files/johntheripper-1.7.3.1-cflags.patch b/app-crypt/johntheripper/files/johntheripper-1.7.3.1-cflags.patch new file mode 100644 index 000000000000..8c3bc0f49128 --- /dev/null +++ b/app-crypt/johntheripper/files/johntheripper-1.7.3.1-cflags.patch @@ -0,0 +1,68 @@ +* this is an incomplete patch, adding CFLAGS to some targets that we use + without this patch, one can't configure john via defines + +--- src/Makefile ++++ src/Makefile +@@ -597,7 +597,7 @@ + $(LN) ppc32.h arch.h + $(MAKE) $(PROJ) \ + CC=cc \ +- CFLAGS="-c -qunroll=2 -qarch=ppc -qchars=signed" \ ++ CFLAGS="$(CFLAGS) -c -qunroll=2 -qarch=ppc -qchars=signed" \ + LDFLAGS="-s -lbsd" \ + OPT_NORMAL="-O2" \ + OPT_INLINE="-O3 -Q=99 -w" +@@ -626,7 +626,7 @@ + $(LN) ppc32alt.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) ppc-alti-macosx.o" \ +- CFLAGS="-c -Wall -fomit-frame-pointer" \ ++ CFLAGS="$(CFLAGS) -c -Wall -fomit-frame-pointer" \ + OPT_NORMAL="-fast -mcpu=7450" \ + OPT_INLINE="-fast -mcpu=7450 -finline-limit=4000" + +@@ -637,7 +637,7 @@ + $(LN) ppc32.h arch.h + $(MAKE) $(PROJ) \ + CC=cc \ +- CFLAGS="-c -traditional-cpp" \ ++ CFLAGS="$(CFLAGS) -c -traditional-cpp" \ + OPT_NORMAL="-O2" \ + OPT_INLINE="-O3" + +@@ -646,7 +646,7 @@ + $(LN) ppc32.h arch.h + $(MAKE) $(PROJ) \ + ASFLAGS="$(ASFLAGS) -arch ppc" \ +- CFLAGS="-c -Wall -arch ppc -fomit-frame-pointer" \ ++ CFLAGS="$(CFLAGS) -c -Wall -arch ppc -fomit-frame-pointer" \ + LDFLAGS="$(LDFLAGS) -arch ppc" \ + OPT_NORMAL="-O2" \ + OPT_INLINE="-O3 -finline-limit=4000" +@@ -656,7 +656,7 @@ + $(LN) ppc64alt.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) ppc-alti-macosx.o" \ +- CFLAGS="-c -m64 -Wall -fomit-frame-pointer" \ ++ CFLAGS="$(CFLAGS) -c -m64 -Wall -fomit-frame-pointer" \ + LDFLAGS="$(LDFLAGS) -m64" \ + OPT_NORMAL="-fast" \ + OPT_INLINE="-fast -finline-limit=4000" +@@ -664,7 +664,7 @@ + macosx-ppc64: + $(LN) ppc64.h arch.h + $(MAKE) $(PROJ) \ +- CFLAGS="-c -Wall -fomit-frame-pointer -m64" \ ++ CFLAGS="$(CFLAGS) -c -Wall -fomit-frame-pointer -m64" \ + LDFLAGS="$(LDFLAGS) -m64" \ + OPT_NORMAL="-fast" \ + OPT_INLINE="-fast -finline-limit=4000" +@@ -698,7 +698,7 @@ + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) ppc-alti-macosx.o" \ + ASFLAGS="$(ASFLAGS) -arch ppc" \ +- CFLAGS="-c -Wall -arch ppc -fomit-frame-pointer" \ ++ CFLAGS="$(CFLAGS) -c -Wall -arch ppc -fomit-frame-pointer" \ + LDFLAGS="$(LDFLAGS) -arch ppc" \ + OPT_NORMAL="-fast -mcpu=7450" \ + OPT_INLINE="-fast -mcpu=7450 -finline-limit=4000" diff --git a/app-crypt/johntheripper/files/johntheripper-1.7.3.1-stackdef.S.patch b/app-crypt/johntheripper/files/johntheripper-1.7.3.1-stackdef.S.patch index 225e248e5764..8600b7d20e69 100644 --- a/app-crypt/johntheripper/files/johntheripper-1.7.3.1-stackdef.S.patch +++ b/app-crypt/johntheripper/files/johntheripper-1.7.3.1-stackdef.S.patch @@ -1,18 +1,17 @@ -Index: john-1.7.3.1/src/sha1-mmx.S -=================================================================== ---- john-1.7.3.1.orig/src/sha1-mmx.S -+++ john-1.7.3.1/src/sha1-mmx.S -@@ -558,3 +558,6 @@ endianity: - por tmp2, ctxd - por tmp4, ctxe - */ -+#if defined(__linux__) && defined(__ELF__) -+.section .note.GNU-stack,"",%progbits +diff -urpN john-1.7.3.1.orig/src/alpha.S john-1.7.3.1/src/alpha.S +--- john-1.7.3.1.orig/src/alpha.S 2002-04-10 08:13:25.000000000 -0600 ++++ john-1.7.3.1/src/alpha.S 2009-06-26 13:56:10.635952569 -0600 +@@ -318,3 +318,7 @@ DES_KS_current: + .space 128 + + .comm DES_KS_table, (8 * 128 * 16 * 8), 128 ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",@progbits +#endif -Index: john-1.7.3.1/src/sparc.S -=================================================================== ---- john-1.7.3.1.orig/src/sparc.S -+++ john-1.7.3.1/src/sparc.S +diff -urpN john-1.7.3.1.orig/src/sparc.S john-1.7.3.1/src/sparc.S +--- john-1.7.3.1.orig/src/sparc.S 2002-04-10 08:13:25.000000000 -0600 ++++ john-1.7.3.1/src/sparc.S 2009-06-26 13:54:31.388950767 -0600 @@ -410,3 +410,7 @@ DES_count: .common DES_KS_table, (8 * 128 * 16 * 8), 32 @@ -21,11 +20,10 @@ Index: john-1.7.3.1/src/sparc.S +#ifdef __ELF__ +.section .note.GNU-stack,"",@progbits +#endif -Index: john-1.7.3.1/src/x86-64.S -=================================================================== ---- john-1.7.3.1.orig/src/x86-64.S -+++ john-1.7.3.1/src/x86-64.S -@@ -1040,3 +1040,7 @@ DES_bs_crypt_LM_loop: +diff -urpN john-1.7.3.1.orig/src/x86-64.S john-1.7.3.1/src/x86-64.S +--- john-1.7.3.1.orig/src/x86-64.S 2008-07-13 15:35:12.000000000 -0600 ++++ john-1.7.3.1/src/x86-64.S 2009-06-26 13:54:31.392950649 -0600 +@@ -1052,3 +1052,7 @@ DES_bs_crypt_LM_loop: subl $1,rounds jnz DES_bs_crypt_LM_loop ret @@ -33,11 +31,10 @@ Index: john-1.7.3.1/src/x86-64.S +#ifdef __ELF__ +.section .note.GNU-stack,"",@progbits +#endif -Index: john-1.7.3.1/src/x86-mmx.S -=================================================================== ---- john-1.7.3.1.orig/src/x86-mmx.S -+++ john-1.7.3.1/src/x86-mmx.S -@@ -1302,3 +1302,7 @@ DES_bs_crypt_LM_loop: +diff -urpN john-1.7.3.1.orig/src/x86-mmx.S john-1.7.3.1/src/x86-mmx.S +--- john-1.7.3.1.orig/src/x86-mmx.S 2008-07-13 15:45:55.000000000 -0600 ++++ john-1.7.3.1/src/x86-mmx.S 2009-06-26 13:54:31.396971552 -0600 +@@ -1314,3 +1314,7 @@ DES_bs_crypt_LM_loop: emms #endif ret @@ -45,25 +42,23 @@ Index: john-1.7.3.1/src/x86-mmx.S +#ifdef __ELF__ +.section .note.GNU-stack,"",@progbits +#endif -Index: john-1.7.3.1/src/x86-sse.S -=================================================================== ---- john-1.7.3.1.orig/src/x86-sse.S -+++ john-1.7.3.1/src/x86-sse.S -@@ -1289,3 +1289,7 @@ DES_bs_crypt_LM_loop: - jnz DES_bs_crypt_LM_loop - popl %esi +diff -urpN john-1.7.3.1.orig/src/x86.S john-1.7.3.1/src/x86.S +--- john-1.7.3.1.orig/src/x86.S 2008-07-07 12:30:36.000000000 -0600 ++++ john-1.7.3.1/src/x86.S 2009-06-26 13:54:31.404961468 -0600 +@@ -1366,3 +1366,7 @@ CPU_detect_ret: + movzbl %al,%eax + popl %ebx ret + +#ifdef __ELF__ +.section .note.GNU-stack,"",@progbits +#endif -Index: john-1.7.3.1/src/x86.S -=================================================================== ---- john-1.7.3.1.orig/src/x86.S -+++ john-1.7.3.1/src/x86.S -@@ -1362,3 +1362,7 @@ CPU_detect_ret: - movzbl %al,%eax - popl %ebx +diff -urpN john-1.7.3.1.orig/src/x86-sse.S john-1.7.3.1/src/x86-sse.S +--- john-1.7.3.1.orig/src/x86-sse.S 2008-07-13 15:44:58.000000000 -0600 ++++ john-1.7.3.1/src/x86-sse.S 2009-06-26 13:54:31.399949655 -0600 +@@ -1301,3 +1301,7 @@ DES_bs_crypt_LM_loop: + jnz DES_bs_crypt_LM_loop + popl %esi ret + +#ifdef __ELF__ diff --git a/app-crypt/johntheripper/johntheripper-1.7.3.1-r1.ebuild b/app-crypt/johntheripper/johntheripper-1.7.3.1-r1.ebuild new file mode 100644 index 000000000000..e40b10e531f8 --- /dev/null +++ b/app-crypt/johntheripper/johntheripper-1.7.3.1-r1.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.3.1-r1.ebuild,v 1.1 2009/09/03 12:36:47 patrick Exp $ + +EAPI=1 +inherit eutils flag-o-matic toolchain-funcs pax-utils + +JUMBO='all-5' +MPI='mpi10' + +MY_PN="${PN/theripper/}" +MY_P="${MY_PN/theripper/}-${PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="fast password cracker" +HOMEPAGE="http://www.openwall.com/john/" + +SRC_URI="http://www.openwall.com/john/g/${MY_P}.tar.gz + !minimal? ( ftp://ftp.openwall.com/john/contrib/${MY_P}-${JUMBO}.diff.gz ) + mpi? ( ftp://ftp.openwall.com/john/contrib/mpi/2009-bindshell/${MY_P}-${MPI}.patch.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="mmx altivec sse2 custom-cflags -minimal -mpi" + +# Seems a bit fussy with other MPI implementations. +RDEPEND="!minimal? ( >=dev-libs/openssl-0.9.7 ) + mpi? ( sys-cluster/openmpi )" +DEPEND="${RDEPEND}" + +get_target() { + if use x86 ; then + if use sse2 ; then + echo "linux-x86-sse2" + elif use mmx ; then + echo "linux-x86-mmx" + else + echo "linux-x86-any" + fi + elif use alpha ; then + echo "linux-alpha" + elif use sparc; then + echo "linux-sparc" + elif use amd64; then + echo "linux-x86-64" + elif use ppc64; then + if use altivec; then + echo "linux-ppc32-altivec" + else + echo "linux-ppc64" + fi + # linux-ppc64-altivec is slightly slower than linux-ppc32-altivec for most hash types. + # as per the Makefile comments + elif use ppc; then + if use altivec; then + echo "linux-ppc32-altivec" + else + echo "linux-ppc32" + fi + else + echo "generic" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + PATCHLIST="stackdef.S" + if use mpi ; then + epatch "${WORKDIR}"/${MY_P}-${MPI}.patch + fi + if ! use minimal ; then + epatch "${WORKDIR}"/${MY_P}-${JUMBO}.diff + PATCHLIST="${PATCHLIST} ${JUMBO}-stackdef.S" + fi + PATCHLIST="${PATCHLIST} cflags mkdir-sandbox" + + cd "${S}/src" + for p in ${PATCHLIST}; do + epatch "${FILESDIR}/${P}-${p}.patch" + done + + if ! use minimal ; then + sed -e "s/LDFLAGS *= */override LDFLAGS += /" -e "/LDFLAGS/s/-s//" \ + -e "/LDFLAGS/s/-L[^ ]*//g" -e "/CFLAGS/s/-[IL][^ ]*//g" \ + -i Makefile || die "sed Makefile failed" + fi +} + +src_compile() { + use custom-cflags || strip-flags + append-flags -fPIC -fPIE + append-ldflags -nopie + + CPP=$(tc-getCXX) CC=$(tc-getCC) AS=$(tc-getCC) LD=$(tc-getCC) + use mpi && CPP=mpicxx CC=mpicc AS=mpicc LD=mpicc + emake -C src/\ + CPP=${CPP} CC=${CC} AS=${AS} LD=${LD} \ + CFLAGS="-c -Wall ${CFLAGS} -DJOHN_SYSTEMWIDE -DJOHN_SYSTEMWIDE_HOME=\"\\\"${ROOT}/etc/john\\\"\" -DJOHN_SYSTEMWIDE_EXEC=\"\\\"${ROOT}/usr/libexec/john\\\"\"" \ + LDFLAGS="${LDFLAGS}" \ + OPT_NORMAL="" \ + $(get_target) \ + || die "emake failed" +} + +src_test() { + cd "${S}/run" + if [ -f /etc/john/john.conf -o -f /etc/john/john.ini ]; then + # This requires that MPI is actually 100% online on your system, which might not + # be the case, depending on which MPI implementation you are using. + #if use mpi ; then + # mpirun -np 2 ./john --test || die 'self test failed' + #else + + ./john --test || die 'self test failed' + else + ewarn "selftest requires /etc/john/john.conf or /etc/john/john.ini" + fi +} + +src_install() { + # executables + dosbin run/john + newsbin run/mailer john-mailer + + pax-mark -m "${D}"/usr/sbin/john + + dosym john /usr/sbin/unafs + dosym john /usr/sbin/unique + dosym john /usr/sbin/unshadow + + # jumbo-patch additions + if ! use minimal ; then + dosym john /usr/sbin/undrop + dosbin run/calc_stat + dosbin run/genmkvpwd + dosbin run/mkvcalcproba + insinto /etc/john + doins run/genincstats.rb run/stats + doins run/netscreen.py run/sap_prepare.pl + fi + + # config files + insinto /etc/john + doins run/john.conf + doins run/*.chr run/password.lst + + # documentation + dodoc doc/* +} |