Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 228013 - app-crypt/johntheripper-1.7.2-r5 MPI patch is not available
Summary: app-crypt/johntheripper-1.7.2-r5 MPI patch is not available
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
: 238196 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-18 08:48 UTC by Erwin Paternotte
Modified: 2008-11-04 08:06 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
johntheripper-1.7.2-r6.ebuild (johntheripper-1.7.2-r6.ebuild,3.11 KB, text/plain)
2008-06-19 21:37 UTC, Erwin Paternotte
Details
Updated patch (john-1.7.2-mpi8.diff,32.27 KB, text/plain)
2008-06-19 21:41 UTC, Erwin Paternotte
Details
1.7.3.1 ebuild (johntheripper-1.7.3.1.ebuild,3.17 KB, text/plain)
2008-09-03 22:43 UTC, RB
Details
failed to compile without MPI (build.log,20.78 KB, text/plain)
2008-09-21 06:18 UTC, Anton Bolshakov
Details
updated 1.7.3.1 ebuild (johntheripper-1.7.3.1.ebuild,3.57 KB, text/plain)
2008-09-22 20:13 UTC, RB
Details
files/johntheripper-1.7.3.1-mkdir-sandbox.patch (johntheripper-1.7.3.1-mkdir-sandbox.patch,562 bytes, patch)
2008-09-22 20:13 UTC, RB
Details | Diff
files/johntheripper-1.7.3.1-params.h.patch (johntheripper-1.7.3.1-params.h.patch,532 bytes, patch)
2008-09-22 20:14 UTC, RB
Details | Diff
Stackdef fixes for jumbo patch (johntheripper-1.7.3.1-stackdef.S.patch,1.85 KB, patch)
2008-09-22 20:15 UTC, RB
Details | Diff
1.7.3.1 ebuild (johntheripper-1.7.3.1.ebuild,3.54 KB, text/plain)
2008-09-22 20:36 UTC, RB
Details
1.7.3.1 ebuild (johntheripper-1.7.3.1.ebuild,3.55 KB, text/plain)
2008-09-23 01:31 UTC, RB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Paternotte 2008-06-18 08:48:48 UTC
I tried to install the new john the ripper ebuild with MPI support. The patch the ebuild is trying to download does not exist. Even not on the bindshell.net site.

I looked into making an ebuild for john the ripper with MPI support before, and I couldn't find a separate patch for MPI support. Only complete patched john sources. I emailed the author (John Anderson) about this but never got a reply.

The ideal situation would be that the john contrib patch can be applied and additional the MPI patch depending on the USE flags. This way the same ciphers are supported for both the MPI and non-MPI version.

Reproducible: Always

Steps to Reproduce:
1.try to emerge the app-crypt/johntheripper-1.7.2-r5 MPI ebuild with the MPI use flag enabled
2.The ebuild fails because it can't download the MPI patch
3.

Actual Results:  
The ebuild fails because it can't download the MPI patch

Expected Results:  
app-crypt/johntheripper-1.7.2-r5 emerges with MPI support
Comment 1 RB 2008-06-19 04:11:49 UTC
Quote from upstream john-mpi@bindshell.net list (didn't find a mirror immediately):

=====
No, there's never been much demand for diffs, seems a lot of people simply aren't willing or able to apply patches... The download stats showed something like a 90:1 ratio of downloads for the prepatched archives...
It's not too hard to post them again if people want them.
=====

This was almost a month ago; I since just went ahead and made my own patch, stripping it down to remove non-MPI related bits and make it able to apply with the existing jumbo (currently all-12) patch.  I can attach it if you like, but it's not official.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-06-19 05:41:21 UTC
I uploaded the john-1.7.2-bp17-mpi8.patch.gz patch myself now.

aoz.syn: Since you are on the upstream list, please ask them to post as diffs as well in future.
Comment 3 Erwin Paternotte 2008-06-19 11:20:02 UTC
Ok, it worked now, but the patch also contains support for the different ciphers and not only MPI support. In the current ebuild either the big patch or the MPI patch is applied, which could result in different supported ciphers for the non-MPI and MPI version. Is it not possible to strip the MPI patch down to only MPI support and apply the big patch for both the non-MPI and MPI version of john?

Also the latest version of the big patch is not applied, currently 9 is applied and 12 is available. See:
http://www.openwall.com/john/contrib/john-1.7.2-all-12.diff.gz

I can open a separate bug for this if you want.
Comment 4 RB 2008-06-19 12:11:44 UTC
It seems that upstream is now considering putting out a minimal MPI patch after I posted mine; the following is a link to at least an intermediate version (mine) - it's 32k and 470 LOC as opposed to 440/12000.

http://openwall.info/wiki/_media/john/john-1.7.2-mpi8.diff.gz
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-06-19 18:42:18 UTC
aoz.syn: does the new upstream minimal MPI apply cleanly on top of the bigpatch?
Can you test and post up a revised ebuild?
Comment 6 RB 2008-06-19 19:00:24 UTC
That linked patch is mine (upstream hasn't done one yet), and although I'm reasonably pleased with it would rather wait for them to come out with (and support) one of their own.  Once they do that I'd be more than glad to provide an updated ebuild.

Mine is currently tuned to apply cleanly with the current all-12 jumbo/big patch, but as the first one against the vanilla source.  Applying after was going to force adding more code specific to non-canonical functionality instead of just core.  There is room for improvement to reduce the collisions, but I'm sitting on the fence for bit to see if upstream picks up the ball or if I'll need to.  He's reportedly recovering from a failed dev machine, so is a bit hampered ATM.
Comment 7 Erwin Paternotte 2008-06-19 21:37:22 UTC
Created attachment 157677 [details]
johntheripper-1.7.2-r6.ebuild

I've made an updated ebuild, which uses the MPI patch provided by RB. I also updated the ebuild to use the lastest jumbo patch
Comment 8 Erwin Paternotte 2008-06-19 21:41:33 UTC
Created attachment 157679 [details]
Updated patch

In order to get the johntheripper-1.7.2-r6.ebuild working with the stackdef patches which were included, and the RB MPI patch I edited the latter a bit. There were some overlapping stackdefs, which I removed from the RB MPI patch. See attached file for new version.
Comment 9 Anton Bolshakov 2008-06-25 01:52:14 UTC
Bumped in the sectools overlay:
http://gentoo.o0o.nu/portage/app-crypt/johntheripper/
Comment 10 RB 2008-09-03 22:43:46 UTC
Created attachment 164516 [details]
1.7.3.1 ebuild

JtR has updated to 1.7.3.1, and bindshell.net has started maintaining their own copy of the minimized MPI patch.  This ebuild covers both of those, builds & runs just fine on my systems.  Had to stop applying one of the stackdef patches, as sha1-mmx.S no longer exists, but otherwise is just changed from 1.7.2-r5 to reflect version updates.
Comment 11 Anton Bolshakov 2008-09-04 03:16:37 UTC
It has been updated in sectools overlay. Thanks.
Comment 12 Anton Bolshakov 2008-09-21 06:18:40 UTC
Created attachment 165973 [details]
failed to compile without MPI

RB, the 1.7.3.1.ebuild can not be compiled without MPI flag.
I tried to compile it with the new all-4.diff.gz patch but the error is still the same (see attachment). Any ideas?
Comment 13 RB 2008-09-22 20:13:00 UTC
Created attachment 166127 [details]
updated 1.7.3.1 ebuild

There's a host of issues with this package right now; the one that triggered yours is that LDFLAGS handling in src/Makefile is somewhat brittle for the jumbo patch and the 'emake ... LDFLAGS=${LDFLAGS}' bit copied from the mainstream ebuild (1.7.2-r5) causes the breakage, MPI patch or not.

Guess I didn't realize that the mainstream ebuild also does MPI _or_ jumbo, not both.  Fixing that shows there are conflicts between >=all-3 and the mpi8 patch.  The attached ebuild and associated patches make a somewhat reasonable stab at fixing both the issues and allowing any combination of vanilla, MPI, and Jumbo JtR builds.  This will only use the all-2 patch until upstream fixes the src/bench.c conflict.
Comment 14 RB 2008-09-22 20:13:47 UTC
Created attachment 166129 [details, diff]
files/johntheripper-1.7.3.1-mkdir-sandbox.patch
Comment 15 RB 2008-09-22 20:14:10 UTC
Created attachment 166131 [details, diff]
files/johntheripper-1.7.3.1-params.h.patch
Comment 16 RB 2008-09-22 20:15:02 UTC
Created attachment 166133 [details, diff]
Stackdef fixes for jumbo patch
Comment 17 RB 2008-09-22 20:36:47 UTC
Created attachment 166136 [details]
1.7.3.1 ebuild

Note to self: 'emerge -av $foo' for final pre-posting check instead of 'ebuild $foo'.
Comment 18 Anton Bolshakov 2008-09-23 01:08:27 UTC
It seems they have deleted the "all-2" patch from the openwall hosting and the ebuild is broken again...
Comment 19 RB 2008-09-23 01:31:57 UTC
Created attachment 166163 [details]
1.7.3.1 ebuild

Not really; he's just moved it under historical/, which is only available via FTP.  I still had a cached copy in my distfiles, but pointed this ebuild toward FTP.
Comment 20 Anton Bolshakov 2008-09-23 02:02:40 UTC
I managed to compile both with && without MPI patch. Thank you.
Comment 21 Erwin Paternotte 2008-09-23 08:05:44 UTC
So if I enable MPI, the jumbo patch gets still applied? Nice, I was working on that as well and had it almost finished. 

I was also looking into the custom cflags part of the ebuild, which I think doesn't really make any sense. I think the ebuild should use the same cflags as specified in john's own makefile, unless the custom-cflags USE flag is specified. I think the john author knows pretty well how to optimize his code and we should follow that, unless somebody really knows what he is doing.
Comment 22 Stefan Behte (RETIRED) gentoo-dev Security 2008-10-23 07:47:01 UTC
*** Bug 238196 has been marked as a duplicate of this bug. ***
Comment 23 Daniel Black (RETIRED) gentoo-dev 2008-11-04 08:06:50 UTC
thankyou all for your great contributions to get this working.

I've added the version from the sec-tools overlay. I've used the all-3 patch as that seems to work. There is a all-4 patch now however it doesn't patch nicely. Fixes welcome