From 427c17061813e9e3e5203ea14104be21cde3426b Mon Sep 17 00:00:00 2001 From: Till Maas Date: Jan 10 2007 14:14:31 +0000 Subject: new version, some cleanup and compiling now with mmx and fallback for non-mmx machines --- diff --git a/.cvsignore b/.cvsignore index 47621e4..182b48f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -john-1.6.tar.gz +john-1.7.0.2.tar.bz2 diff --git a/john-1.6-rh.patch b/john-1.6-rh.patch deleted file mode 100644 index 6b2b7e2..0000000 --- a/john-1.6-rh.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- BUILD/john-1.6/src/params.h.orig 1998-12-03 01:29:50.000000000 +0100 -+++ BUILD/john-1.6/src/params.h 2003-04-25 20:29:54.000000000 +0200 -@@ -53,9 +53,9 @@ - * File names. - */ - #define LOG_NAME "~/john.pot" --#define CFG_NAME "~/john.ini" -+#define CFG_NAME "/etc/john.ini" - #define RECOVERY_NAME "~/restore" --#define WORDLIST_NAME "~/password.lst" -+#define WORDLIST_NAME "/usr/share/john/password.lst" - - /* - * Configuration file section names. ---- BUILD/john-1.6/src/Makefile.orig 2003-04-25 20:31:35.000000000 +0200 -+++ BUILD/john-1.6/src/Makefile 2003-04-25 20:32:03.000000000 +0200 -@@ -13,7 +13,7 @@ - SED = sed - NULL = /dev/null - CPPFLAGS = -E --CFLAGS = -c -Wall -O2 -fomit-frame-pointer -+CFLAGS = -c -Wall $(RPM_OPT_FLAGS) - ASFLAGS = -c - LDFLAGS = -s - OPT_NORMAL = -funroll-loops -@@ -115,14 +115,12 @@ - linux-x86-any-elf: - $(LN) x86-any.h arch.h - $(MAKE) $(PROJ) \ -- JOHN_OBJS="$(JOHN_OBJS) x86.o" \ -- CFLAGS="$(CFLAGS) -m486" -+ JOHN_OBJS="$(JOHN_OBJS) x86.o" - - linux-x86-mmx-elf: - $(LN) x86-mmx.h arch.h - $(MAKE) $(PROJ) \ -- JOHN_OBJS="$(JOHN_OBJS) x86.o" \ -- CFLAGS="$(CFLAGS) -m486" -+ JOHN_OBJS="$(JOHN_OBJS) x86.o" - - linux-x86-k6-elf: - $(LN) x86-k6.h arch.h ---- BUILD/john-1.6/run/john.ini.orig 1998-12-03 01:29:50.000000000 +0100 -+++ BUILD/john-1.6/run/john.ini 2003-04-25 20:29:54.000000000 +0200 -@@ -5,7 +5,7 @@ - - [Options] - # Wordlist file name, to be used in batch mode --Wordfile = ~/password.lst -+Wordfile = /usr/share/john/password.lst - # Use idle cycles only - Idle = N - # Crash recovery file saving delay in seconds -@@ -314,25 +314,25 @@ - - # Incremental modes - [Incremental:All] --File = ~/all.chr -+File = /usr/share/john/all.chr - MinLen = 0 - MaxLen = 8 - CharCount = 95 - - [Incremental:Alpha] --File = ~/alpha.chr -+File = /usr/share/john/alpha.chr - MinLen = 1 - MaxLen = 8 - CharCount = 26 - - [Incremental:Digits] --File = ~/digits.chr -+File = /usr/share/john/digits.chr - MinLen = 1 - MaxLen = 8 - CharCount = 10 - - [Incremental:LanMan] --File = ~/lanman.chr -+File = /usr/share/john/lanman.chr - MinLen = 0 - MaxLen = 7 - CharCount = 69 diff --git a/john.spec b/john.spec index 8d8577c..cbd68c1 100644 --- a/john.spec +++ b/john.spec @@ -1,13 +1,14 @@ Summary: John the Ripper password cracker Name: john -Version: 1.6 -Release: 5%{?dist} +Version: 1.7.0.2 +Release: 1%{?dist} URL: http://www.openwall.com/john License: GPL Group: Applications/System -Source0: http://www.openwall.com/john/dl/john-1.6.tar.gz -Patch0: john-1.6-rh.patch +Source0: http://www.openwall.com/john/f/john-%{version}.tar.bz2 +#Patch1: http://www.openwall.com/john/contrib/john-1.7-all-4.diff.gz +#Patch2: http://www.openwall.com/john/contrib/john-1.7.2-all-2.diff.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description @@ -17,27 +18,54 @@ supported as well. %prep %setup -q -%patch0 -p2 -b .orig -chmod 644 doc/* +#%patch2 -p0 -b .jumbo +chmod 0644 doc/* +rm doc/INSTALL +sed -i 's#\$JOHN/john.conf#%{_sysconfdir}/john.conf#' src/params.h +cp -a src src-mmx %build + +%define target_non_mmx generic +%define target_mmx "%{nil}" + %ifarch %{ix86} -make -C src linux-x86-any-elf -# TODO: Find a nice way to determine if these are better choices. -#make -C src linux-x86-mmx-elf -#make -C src linux-x86-k6-elf -%else -make -C src generic +%define target_non_mmx linux-x86-any +%define target_mmx linux-x86-mmx +%endif +%ifarch x86_64 +%define target_non_mmx linux-x86-64 +%define target_mmx linux-x86-64-mmx +%endif +%ifarch ppc +%define target_non_mmx linux-ppc32 +%endif + +export CFLAGS="-c ${RPM_OPT_FLAGS} -DJOHN_SYSTEMWIDE=1" + +make -C src %{target_non_mmx} CFLAGS="${CFLAGS}" LDFLAGS="" + +%if "%{target_mmx}" != "%{nil}" +mv run/john run/john-non-mmx + +CFLAGS="${CFLAGS} -DCPU_FALLBACK=1" +LDFLAGS="${CFLAGS}" + +make -C src-mmx %{target_mmx} CFLAGS="${CFLAGS}" LDFLAGS="" %endif %install rm -rf %{buildroot} install -d 755 %{buildroot}%{_sysconfdir} install -d 755 %{buildroot}%{_bindir} -install -d 755 %{buildroot}%{_datadir}/%{name} +install -d 755 %{buildroot}%{_datadir}/john install -m 755 run/{john,mailer} %{buildroot}%{_bindir} -install -m 644 run/{*.chr,password.lst} %{buildroot}%{_datadir}/%{name} -install -m 644 run/john.ini %{buildroot}%{_sysconfdir} +install -m 644 run/{*.chr,password.lst} %{buildroot}%{_datadir}/john +install -m 644 run/john.conf %{buildroot}%{_sysconfdir} +%if "⅜{target_mmx}" != "%{nil}" +install -d 755 %{buildroot}%{_libexecdir}/john +install -m 755 run/john-non-mmx %{buildroot}%{_libexecdir}/john/ +%endif pushd %{buildroot}%{_bindir} ln -s john unafs ln -s john unique @@ -48,13 +76,21 @@ popd rm -rf %{buildroot} %files -%defattr(-, root, root, -) +%defattr(-,root,root,-) %doc doc/* -%config(noreplace) %{_sysconfdir}/john.ini +%config(noreplace) %{_sysconfdir}/john.conf %{_bindir}/* -%{_datadir}/%{name} +%{_datadir}/john +%if "⅜{target_mmx}" != "%{nil}" +%{_libexecdir}/john/ +%endif %changelog +* Tue Jan 01 2007 Till Maas - 1.7.0.2-1 +- prevent stripping in Makefile to get non-empty debuginfo +- version bump +- build mmx and fallback version + * Mon Oct 09 2006 Jeremy Katz - 1.6-5 - FC6 Rebuild @@ -66,7 +102,7 @@ rm -rf %{buildroot} * Fri Apr 25 2003 Marius Johndal 0:1.6-0.fdr.2 - Added epoch. -- Modified makefile patch to honour %optflags. +- Modified makefile patch to honour %%optflags. - setup -q. - Added full URL of source. diff --git a/sources b/sources index c3b8d13..884a256 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -aae782f160041b2bdc624b0a84054e32 john-1.6.tar.gz +0a87dca1f149493fc087ea8a8b6ae5d5 john-1.7.0.2.tar.bz2