Hi, please find attach my diff for my NMU, against version 1.6-40.1, not version 1.6-40.2 (since it makes more sense).
I tested the build on i386 and amd64. I also started the build on mipsel (but didn't wait until its end). The benchmarks were executed successfully though. -- | Lucas Nussbaum | [EMAIL PROTECTED] http://www.lucas-nussbaum.net/ | | jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |
diff -u john-1.6/debian/changelog john-1.6/debian/changelog --- john-1.6/debian/changelog +++ john-1.6/debian/changelog @@ -1,3 +1,22 @@ +john (1.6-40.3) unstable; urgency=low + + * Non-maintainer upload. + * Fixed build failure on !(i386 || alpha). Revert to the state of version + 1.6-40.1, and used Ubuntu's sysconf-based patch instead of Thiemo's + CLOCKS_PER_SEC patch. Closes: #460697. + * Add debian/patches/mips.diff: patch from Thiemo Seufer to fix FTBFS on + mips and mipsel. Closes: #415738. + + -- Lucas Nussbaum <[EMAIL PROTECTED]> Mon, 14 Jan 2008 20:00:36 +0100 + +john (1.6-40.2) unstable; urgency=low + + * Non-maintainer upload. + * Applied patch from Thiemo Seufer to replace CLK_TCK by CLOCKS_PER_SEC. + Fixes FTBFS (Closes: #420980). + + -- Lucas Nussbaum <[EMAIL PROTECTED]> Sat, 12 Jan 2008 22:11:08 +0100 + john (1.6-40.1) unstable; urgency=high * Non-maintainer upload. only in patch2: unchanged: --- john-1.6.orig/debian/patches/sysconf_clk_tck.diff +++ john-1.6/debian/patches/sysconf_clk_tck.diff @@ -0,0 +1,100 @@ +diff -Nur john-1.6/src/bench.c john-1.6.new/src/bench.c +--- john-1.6/src/bench.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/bench.c 2006-10-13 09:36:47.906521852 -0700 +@@ -9,6 +9,7 @@ + #include <time.h> + #include <sys/time.h> + #include <sys/times.h> ++#include <unistd.h> + + #include "times.h" + +@@ -103,7 +104,7 @@ + it.it_value.tv_sec = BENCHMARK_TIME; + if (setitimer(ITIMER_REAL, &it, NULL)) pexit("setitimer"); + #else +- sig_timer_emu_init(BENCHMARK_TIME * CLK_TCK); ++ sig_timer_emu_init(BENCHMARK_TIME * sysconf(_SC_CLK_TCK)); + #endif + + start_real = times(&buf); +@@ -144,8 +145,8 @@ + { + unsigned long cps_hi, cps_lo; + +- cps_hi = count * CLK_TCK / time; +- cps_lo = count * ((unsigned ARCH_WORD)CLK_TCK * 10) / time % 10; ++ cps_hi = count * sysconf(_SC_CLK_TCK) / time; ++ cps_lo = count * ((unsigned ARCH_WORD)sysconf(_SC_CLK_TCK) * 10) / time % 10; + + sprintf(buffer, cps_hi < 100 ? "%lu.%lu" : "%lu", cps_hi, cps_lo); + } +diff -Nur john-1.6/src/best.c john-1.6.new/src/best.c +--- john-1.6/src/best.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/best.c 2006-10-13 09:37:01.859218512 -0700 +@@ -9,6 +9,7 @@ + + #include <stdio.h> + #include <time.h> ++#include <unistd.h> + + #include "params.h" + #include "common.h" +@@ -56,7 +57,7 @@ + fprintf(stderr, "FAILED\n"); + } else { + virtual = (unsigned long) +- (results.count * CLK_TCK * 10 / results.virtual); ++ (results.count * sysconf(_SC_CLK_TCK) * 10 / results.virtual); + + benchmark_cps(results.count, results.real, s_real); + benchmark_cps(results.count, results.virtual, s_virtual); +diff -Nur john-1.6/src/signals.c john-1.6.new/src/signals.c +--- john-1.6/src/signals.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/signals.c 2006-10-13 09:37:35.480897303 -0700 +@@ -9,6 +9,7 @@ + #include <signal.h> + #include <sys/time.h> + #include <errno.h> ++#include <unistd.h> + + #ifdef __DJGPP__ + #include <dos.h> +@@ -217,7 +218,7 @@ + { + #if !OS_TIMER + signal(SIGALRM, sig_handle_timer); +- sig_timer_emu_init(TIMER_INTERVAL * CLK_TCK); ++ sig_timer_emu_init(TIMER_INTERVAL * sysconf(_SC_CLK_TCK)); + #else + struct sigaction sa; + struct itimerval it; +diff -Nur john-1.6/src/status.c john-1.6.new/src/status.c +--- john-1.6/src/status.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/status.c 2006-10-13 09:38:00.130128134 -0700 +@@ -7,6 +7,7 @@ + #include <string.h> + #include <time.h> + #include <sys/times.h> ++#include <unistd.h> + + #include "times.h" + +@@ -35,7 +36,7 @@ + if (!status_restored_time) + memset(&status, 0, sizeof(status)); + status.start_time = +- get_time() - status_restored_time * CLK_TCK; ++ get_time() - status_restored_time * sysconf(_SC_CLK_TCK); + } + + status_get_progress = get_progress; +@@ -48,7 +49,7 @@ + + unsigned int status_get_time() + { +- return (get_time() - status.start_time) / CLK_TCK; ++ return (get_time() - status.start_time) / sysconf(_SC_CLK_TCK); + } + + static char *status_get_cps(char *buffer) only in patch2: unchanged: --- john-1.6.orig/debian/patches/mipsel.diff +++ john-1.6/debian/patches/mipsel.diff @@ -0,0 +1,123 @@ +diff -burN john-1.6.orig/src/Makefile john-1.6/src/Makefile +--- john-1.6.orig/src/Makefile 2008-01-14 19:55:03.000000000 +0100 ++++ john-1.6/src/Makefile 2008-01-14 19:59:16.000000000 +0100 +@@ -86,6 +86,8 @@ + @echo "linux-x86-any-a.out Linux, x86, a.out binaries" + @echo "linux-alpha Linux, Alpha" + @echo "linux-sparc Linux, SPARC" ++ @echo "linux-mips Linux, MIPS" ++ @echo "linux-mipsel Linux, MIPSel" + @echo "freebsd-x86-any-a.out FreeBSD, x86, a.out binaries" + @echo "freebsd-x86-k6-a.out FreeBSD, AMD K6, a.out binaries" + @echo "freebsd-x86-any-elf FreeBSD, x86, ELF binaries" +@@ -156,6 +158,16 @@ + BENCH_DES_OBJS_DEPEND="$(BENCH_DES_OBJS_ORIG) sparc.o" \ + JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS_ORIG) sparc.o" + ++linux-mips: mips.h ++ $(LN) mips.h arch.h ++ $(MAKE) $(PROJ) \ ++ JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS)" ++ ++linux-mipsel: mipsel.h ++ $(LN) mipsel.h arch.h ++ $(MAKE) $(PROJ) \ ++ JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS)" ++ + freebsd-x86-any-a.out: + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ +diff -burN john-1.6.orig/src/mipsel.h john-1.6/src/mipsel.h +--- john-1.6.orig/src/mipsel.h 1970-01-01 01:00:00.000000000 +0100 ++++ john-1.6/src/mipsel.h 2008-01-14 19:56:44.000000000 +0100 +@@ -0,0 +1,43 @@ ++/* ++ * This file is part of John the Ripper password cracker, ++ * Copyright (c) 1996-98 by Solar Designer ++ */ ++ ++/* ++ * Architecture specific parameters for little-endian MIPS. ++ */ ++ ++#ifndef _JOHN_ARCH_H ++#define _JOHN_ARCH_H ++ ++#define ARCH_GENERIC 1 ++#define ARCH_WORD long ++#define ARCH_SIZE 4 ++#define ARCH_BITS 32 ++#define ARCH_BITS_STR "32" ++#define ARCH_LITTLE_ENDIAN 1 ++#define ARCH_INT_GT_32 0 ++#define ARCH_ALLOWS_UNALIGNED 0 ++#define ARCH_INDEX unsigned int ++ ++#define OS_TIMER 1 ++#define OS_FLOCK 1 ++ ++#define CPU_DETECT 0 ++ ++#define DES_ASM 0 ++#define DES_128K 0 ++#define DES_X2 0 ++#define DES_MASK 0 ++#define DES_SCALE 1 ++#define DES_EXTB 0 ++#define DES_COPY 1 ++#define DES_BS 0 ++ ++#define MD5_ASM 0 ++#define MD5_IMM 0 ++ ++#define BF_ASM 0 ++#define BF_SCALE 0 ++ ++#endif +diff -burN john-1.6.orig/src/mips.h john-1.6/src/mips.h +--- john-1.6.orig/src/mips.h 1970-01-01 01:00:00.000000000 +0100 ++++ john-1.6/src/mips.h 2008-01-14 19:56:44.000000000 +0100 +@@ -0,0 +1,43 @@ ++/* ++ * This file is part of John the Ripper password cracker, ++ * Copyright (c) 1996-98 by Solar Designer ++ */ ++ ++/* ++ * Architecture specific parameters for big-endian MIPS. ++ */ ++ ++#ifndef _JOHN_ARCH_H ++#define _JOHN_ARCH_H ++ ++#define ARCH_GENERIC 1 ++#define ARCH_WORD long ++#define ARCH_SIZE 4 ++#define ARCH_BITS 32 ++#define ARCH_BITS_STR "32" ++#define ARCH_LITTLE_ENDIAN 0 ++#define ARCH_INT_GT_32 0 ++#define ARCH_ALLOWS_UNALIGNED 0 ++#define ARCH_INDEX unsigned int ++ ++#define OS_TIMER 1 ++#define OS_FLOCK 1 ++ ++#define CPU_DETECT 0 ++ ++#define DES_ASM 0 ++#define DES_128K 0 ++#define DES_X2 0 ++#define DES_MASK 0 ++#define DES_SCALE 1 ++#define DES_EXTB 0 ++#define DES_COPY 1 ++#define DES_BS 0 ++ ++#define MD5_ASM 0 ++#define MD5_IMM 0 ++ ++#define BF_ASM 0 ++#define BF_SCALE 0 ++ ++#endif