New version, the patchset (for sse2, etc) still needs forward ported, however I have implemented the mmx runtime fallback from the spec (http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/john/john.spec?rev=1.83;content-type=text%2Fplain;only_with_tag=HEAD).
Created attachment 81907 [details] johntheripper-1.7.0.1.ebuild
Comment on attachment 81907 [details] johntheripper-1.7.0.1.ebuild # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-crypt/johntheripper/johntheripper-1.7.0.1.ebuild,v 1.3 2006/01/14 11:18:00 Metalshark Exp $ inherit eutils flag-o-matic toolchain-funcs MY_PBASE=${P/theripper/} S=${WORKDIR}/${MY_PBASE} DESCRIPTION="fast password cracker" HOMEPAGE="http://www.openwall.com/john/" SRC_URI="http://www.openwall.com/john/e/${MY_PBASE}.tar.gz" RESTRICT="primaryuri" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc-macos ~ppc64 ~sparc ~x86" IUSE="mmx altivec" RDEPEND="virtual/libc" DEPEND="${RDEPEND}" src_unpack() { unpack ${A} sed -i -e "s|^CFLAGS.*|CFLAGS= -c -Wall ${CFLAGS}|" \ -e 's|^LDFLAGS =\(.*\)|LDFLAGS =\1 -lm|' "${MY_PBASE}"/src/Makefile } src_compile() { cd src # Note this program uses AS and LD incorrectly OPTIONS="CPP=$(tc-getCXX) CC=$(tc-getCC) AS=$(tc-getCC) LD=$(tc-getCC) \ OPT_NORMAL= OPT_INLINE= JOHN_SYSTEMWIDE=1" if use x86 ; then emake ${OPTIONS} linux-x86-any || die "Make failed" if use mmx ; then mv ../run/john ../run/john-non-mmx emake clean emake "${OPTIONS} -DCPU_FALLBACK=1" linux-x86-mmx || die "Make failed" fi elif use alpha ; then emake ${OPTIONS} linux-alpha || die "Make failed" elif use sparc; then emake ${OPTIONS} linux-sparc || die "Make failed" elif use amd64; then if use mmx; then emake ${OPTIONS} linux-x86-64-mmx || die "Make failed" else emake ${OPTIONS} linux-x86-64 || die "Make failed" fi elif use ppc-macos; then if use altivec; then emake ${OPTIONS} macosx-ppc32-altivec || die "Make failed" else emake ${OPTIONS} macosx-ppc32 || die "Make failed" fi # for Tiger this can be macosx-ppc64 elif use ppc64; then if use altivec; then emake ${OPTIONS} linux-ppc32-altivec || die "Make failed" else emake ${OPTIONS} linux-ppc64 || die "Make failed" 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 emake ${OPTIONS} linux-ppc32-altivec: || die "Make failed" else emake ${OPTIONS} linux-ppc32 || die "Make failed" fi else emake ${OPTIONS} generic || die "Make failed" fi # currently broken #emake bench || die "make failed" } src_test() { cd run if [[ -f /etc/john/john.conf || -f /etc/john/john.ini ]] then ./john --test || die 'self test failed' else ewarn "selftest requires /etc/john/john.conf or /etc/john/john.ini" fi ewarn "WPA PSK failes on MMX and SSE2 - see" ewarn "http://www.banquise.net/misc/patch-john.html" } src_install() { # config files insinto /etc/john doins run/john.conf # executables dosbin run/john newsbin run/mailer john-mailer # fallbacks insinto /usr/libexec/john if use mmx ; then doins run/john-non-mmx fi dosym john /usr/sbin/unafs dosym john /usr/sbin/unique dosym john /usr/sbin/unshadow # for EGG only dosym john /usr/sbin/undrop #newsbin src/bench john-bench # share insinto /usr/share/john/ doins run/*.chr run/password.lst # documentation dodoc doc/* }
From an email Solar sent me (the upstream developer) over a only a simple version bump to the ebuild (to justify changes): Thanks. This mostly looks fine. > install: cannot stat `run/*.chr': No such file or directory That's because it's not a real John release. > if use x86 ; then > if use sse2 ; then > emake ${OPTIONS} linux-x86-sse2 || die "Make failed" > elif use mmx ; then > emake ${OPTIONS} linux-x86-mmx || die "Make failed" > else > emake ${OPTIONS} linux-x86-any || die "Make failed" > fi You could use the runtime fallback feature here - please see the "notes to packagers" in params.h. For a usage example, see: http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/john/john.spec?rev=HEAD SSE2 is not officially supported (it's added by a patch which you're apparently using), so there's no fallback for it... but you can use the fallback feature in the x86/MMX build. > if [[ -f /etc/john/john.conf || -f /etc/john/john.ini ]] > then > ./john --test || die 'self test failed' > else > ewarn "selftest requires /etc/john/john.conf or /etc/john/john.ini" > fi You should be able to run a test without those files available system-wide. Simply create a file in the build user's home directory, if that's acceptable: mkdir ~/.john touch ~/.john/john.conf after the test: rm ~/.john/john.conf rmdir ~/.john > sed -i -e 's:$JOHN:/usr/share/john:g' "${D}/etc/john/john.conf" Please don't do that. See the "notes".
I could not stat a ~ directory for my sandbox account and didn't think it correct to do a usermod -d /var/tmp/portage portage just for one test.
*** This bug has been marked as a duplicate of 122435 ***