|
|
Message-ID: <20160803125214.GA4396@fantomas.sk>
Date: Wed, 3 Aug 2016 14:52:14 +0200
From: Matus UHLAR - fantomas <uhlar@...tomas.sk>
To: john-users@...ts.openwall.com
Subject: Re: specify home ($JOHN) at compiletime
>On Thu, Jul 28, 2016 at 05:35:20PM +0200, Matus UHLAR - fantomas wrote:
>> instead of expected ~/.john/john.pot
On 29.07.16 04:39, Solar Designer wrote:
>This pathname is only used by system-wide builds, such as if you
>installed a package of John provided by your distro.
>
>You can make a system-wide build by setting -DJOHN_SYSTEMWIDE=1 in
>CFLAGS at build time, but this is normally only done by package(r)s of
>John, not by end-users, and such packages are expected to provide at
>least the JOHN_SYSTEMWIDE_HOME directory (normally /usr/share/john) as
>well. If you're merely building John for your own use, don't bother
>with this.
to explain:
I have started with packaged john 1.7.9, then backported 1.8.0 because of
fork option. they both used ~/.john/john.pot
then i went to jumbo because of extra formats, and bleeding-jumbo because of
faster algorithms...
I want to make them all use the same john.conf and john.pot files...
>If you're in fact trying to create a package of John, then you may use
>this as an example:
>
>http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/john/john.spec?rev=HEAD
I use debian, but yes, I was trying to create packages, so I could easily
distribute them to different systems.
unfortunately files from debian 1.8.0 package don't work with jumbo:
make[2]: *** No rule to make target 'linux-x86-64'. Stop.
make[2]: Leaving directory '/home/uhlar/src/debian/john/bleeding-jumbo/src'
I have no problem to build it manually, but the process seems to have
problems:
env CFLAGS='-DJOHN_SYSTEMWIDE=1 -DCFG_FULL_NAME="/etc/john/john.conf"' ./configure
1. configure warning:
configure: WARNING: No recognized optimization option present in CFLAGS
maybe I should add "-O2" or "-O3" to CFLAGS? (debian adds -funroll-loops
which makes -O3 from -O2)
2. compile warnings:
params.h:152:0: warning: "CFG_FULL_NAME" redefined
#define CFG_FULL_NAME "$JOHN/john.conf"
^
<command-line>:0:0: note: this is the location of the previous definition
apparently the #define should to #ifndef CFG_FULL_NAME block
(debian patch adds that).
Otherwise, seems that the latter is being used.
3. after patching, error appears:
gcc -DAC_BUILT -march=native -mavx -DJOHN_AVX -c -DJOHN_SYSTEMWIDE=1 -DCFG_FULL_NAME="/etc/john/john.conf" -I/usr/local/include -DARCH_LITTLE_ENDIAN=1 -Wall -Wdeclaration-after-statement -fomit-frame-pointer --param allow-store-data-races=0 -Wno-deprecated-declarations -Wunused-but-set-variable -std=gnu89 -Wdate-time -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -fopenmp -pthread -DHAVE_HT -I/usr/local/include -funroll-loops dynamic_utils.c -o dynamic_utils.o
dynamic_utils.c: In function ‘dynamic_DISPLAY_ALL_FORMATS’:
<command-line>:0:15: error: expected expression before ‘/’ token
dynamic_utils.c:75:11: note: in expansion of macro ‘CFG_FULL_NAME’
cfg_init(CFG_FULL_NAME, 1);
^
dynamic_utils.c:75:2: error: too few arguments to function ‘cfg_init’
cfg_init(CFG_FULL_NAME, 1);
^
In file included from dynamic_utils.c:44:0:
config.h:65:13: note: declared here
extern void cfg_init(char *name, int allow_missing);
^
Makefile:1577: recipe for target 'dynamic_utils.o' failed
...I'm out of ideas. Debian uses backslash escaping:
CFLAGS='-DJOHN_SYSTEMWIDE=1 -DCFG_FULL_NAME=\"/etc/john/john.conf\"' ./configure
but that causes configure errors:
configure: creating ./fmt_externs.h
<command-line>:0:16: warning: missing terminating " character
any idea how to continue?
> I agree this is tricky. To better support packagers, we should probably
> have a configure option in jumbo, now that it's autoconf'ed anyway, to
> enable system-wide build and a "make install". magnum? It might remain
> tricky to also support the runtime fallbacks in such builds, though.
yes, that would help much.
--
Matus UHLAR - fantomas, uhlar@...tomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
You have the right to remain silent. Anything you say will be misquoted,
then used against you.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.