Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410947 - app-crypt/johntheripper-1.7.9 uses append-flags incorrectly, results in "fopen: $JOHN/john.ini: No such file or directory"
Summary: app-crypt/johntheripper-1.7.9 uses append-flags incorrectly, results in "fope...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-05 20:47 UTC by Hank Leininger
Modified: 2012-04-07 07:00 UTC (History)
0 users

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


Attachments
Patch to fix passing the JOHN_SYSTEMWIDE arguments to GCC (john-systemwide-appendflags-fix.patch,582 bytes, patch)
2012-04-05 20:49 UTC, Hank Leininger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hank Leininger 2012-04-05 20:47:50 UTC
John the Ripper needs some special #define's for a "systemwide" installation (the normal mode that Gentoo install it in).  The current ebuild builds a file with those and then calls append-flags to add that to the CFLAGS that jtr will be compiled with:

append-flags -fPIC -fPIE -include "${S}"/config.gentoo

append-flags is from flag-o-matic.eclass; my current version is:

$Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.169 2012/02/26 12:09:44 blueness Exp $

I believe that append-flags is filtering out '-include' as an invalid GCC flag.  As a result, john is built without SYSTEMWIDE being defined, so attempting to run the binary results in:

$ john -test
fopen: $JOHN/john.ini: No such file or directory

I suspect that this is a bug in the john ebuild--that append-flags is not meant to be used in this way, but I could be wrong, it could be a bug in the eclass instead.  I'll attach a trivial patch to the john ebuild that makes it work again.

Reproducible: Always

Steps to Reproduce:
1. emerge johntheripper
2. run 'john -test' (or try to crack a password file)

Actual Results:  
John dies with:

fopen: $JOHN/john.ini: No such file or directory


Expected Results:  
John should run its test benchmarks.

I'm running Portage 2.2.0_alpha93 on amd64, tried both gcc 4.5.3 and 4.6.2.
Comment 1 Hank Leininger 2012-04-05 20:49:42 UTC
Created attachment 307939 [details, diff]
Patch to fix passing the JOHN_SYSTEMWIDE arguments to GCC
Comment 2 Tim Harder gentoo-dev 2012-04-07 07:00:01 UTC
Fixed in 1.7.9-r1.