aboutsummaryrefslogtreecommitdiff
path: root/security/john
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2005-12-31 04:28:08 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2005-12-31 04:28:08 +0000
commit92eaeee9b4825e756cad08a3219d67a291d5a1f4 (patch)
tree574f22f99f9e1e655e1f2fbbf02d5628ca59a3bf /security/john
parent577db63a2d3faad282bd410e9334128427ce6987 (diff)
downloadports-92eaeee9b4825e756cad08a3219d67a291d5a1f4.tar.gz
ports-92eaeee9b4825e756cad08a3219d67a291d5a1f4.zip
Notes
Diffstat (limited to 'security/john')
-rw-r--r--security/john/Makefile62
-rw-r--r--security/john/distinfo9
-rw-r--r--security/john/files/patch-Makefile10
-rw-r--r--security/john/files/patch-john.conf41
-rw-r--r--security/john/files/patch-params.h25
-rw-r--r--security/john/pkg-plist7
6 files changed, 60 insertions, 94 deletions
diff --git a/security/john/Makefile b/security/john/Makefile
index 17ad4913b614..1d4c5cd34375 100644
--- a/security/john/Makefile
+++ b/security/john/Makefile
@@ -1,4 +1,3 @@
-# ex:ts=8
# Ports collection makefile for: john
# Date created: Sun Mar 09, 1997
# Whom: David O'Brien (obrien@FreeBSD.org)
@@ -7,18 +6,20 @@
#
PORTNAME= john
-PORTVERSION= 1.6.39
+PORTVERSION= 1.6.40
CATEGORIES= security
MASTER_SITES= http://www.openwall.com/john/a/ \
ftp://ftp.ru.openwall.com/pub/projects/john/
-DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz \
- ${PORTNAME}-1.6.tar.gz
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= Featureful Unix password cracker
USE_REINPLACE= yes
-PORTDOCS= *
+
+DATAFILES= all.chr alnum.chr alpha.chr digits.chr lanman.chr password.lst
+PORTDOCS= CHANGES CONFIG EXAMPLES EXTERNAL FAQ MODES OPTIONS README RULES
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
.include <bsd.port.pre.mk>
@@ -27,42 +28,45 @@ OSNAME= ${OPSYS:S/F/f/:S/N/n/:S/O/o/:S/B/b/:S/S/s/:S/D/d/}
ALL_TARGET= generic
.if ${ARCH} == "i386"
. if ${MACHINE_CPU:Mmmx}
-ALL_TARGET= ${OSNAME}-x86-mmx-elf
+ALL_TARGET= ${OSNAME}-x86-mmx
. else
-ALL_TARGET= ${OSNAME}-x86-any-elf
+ALL_TARGET= ${OSNAME}-x86-any
. endif
.elif ${ARCH} == "alpha"
ALL_TARGET= ${OSNAME}-alpha
.endif
-WRKSRC= ${WRKDIR}/${DISTNAME}/src
-OLDSRC= ${WRKDIR}/${PORTNAME}-1.6/run
+post-patch:
+ @${REINPLACE_CMD} -e 's|$$JOHN|${DATADIR}|g' \
+ ${WRKDIR}/${DISTNAME}/run/john.conf
+ @${REINPLACE_CMD} -e \
+ 's|%%PREFIX%%|${PREFIX}|g; s|%%DATADIR%%|${DATADIR}|g'\
+ ${WRKSRC}/params.h
pre-build:
@${ECHO} "Building for ${ALL_TARGET}"
-do-configure:
- @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
- ${WRKDIR}/${DISTNAME}/src/params.h \
- ${WRKDIR}/${DISTNAME}/run/john.conf
-
do-install:
- @${MKDIR} ${DATADIR}
- @${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/run/john ${PREFIX}/bin
- @cd ${PREFIX}/bin ; ${LN} -sf john xtract
- @cd ${PREFIX}/bin ; ${LN} -sf john unshadow
- @${INSTALL_DATA} \
- ${OLDSRC}/all.chr \
- ${OLDSRC}/alpha.chr \
- ${OLDSRC}/digits.chr \
- ${OLDSRC}/lanman.chr \
- ${WRKDIR}/${DISTNAME}/run/password.lst \
- ${WRKDIR}/${DISTNAME}/run/john.conf \
- ${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/run/john ${PREFIX}/bin
+.for l in xtract unshadow
+ ${LN} -sf ${PREFIX}/bin/john ${PREFIX}/bin/${l}
+.endfor
+ ${MKDIR} ${DATADIR}
+.for f in ${DATAFILES}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/run/${f} ${DATADIR}
+.endfor
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/run/john.conf \
+ ${PREFIX}/etc/john.conf.default
+.if !exists(${PREFIX}/etc/john.conf)
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/run/john.conf \
+ ${PREFIX}/etc/john.conf
+.endif
+
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${OLDSRC}/../doc/* ${DOCSDIR}
- @${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/* ${DOCSDIR}
+ ${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/${f} ${DOCSDIR}
+.endfor
.endif
.include <bsd.port.post.mk>
diff --git a/security/john/distinfo b/security/john/distinfo
index 19642da1b54a..1ff201b1e3d8 100644
--- a/security/john/distinfo
+++ b/security/john/distinfo
@@ -1,6 +1,3 @@
-MD5 (john-1.6.39.tar.gz) = 823ee78095db8568aa68fb0721b1efea
-SHA256 (john-1.6.39.tar.gz) = 2ac8a65113a50138700f6c57ff650923705f735b7900bcb664b5897fffa91e5a
-SIZE (john-1.6.39.tar.gz) = 167425
-MD5 (john-1.6.tar.gz) = aae782f160041b2bdc624b0a84054e32
-SHA256 (john-1.6.tar.gz) = 134a45c749190fd0a139edb151cb7b6096c7a3c1a42b89f3bcc2f9187d17a4f5
-SIZE (john-1.6.tar.gz) = 497341
+MD5 (john-1.6.40.tar.gz) = 507916220812c5834136d378a13e48a0
+SHA256 (john-1.6.40.tar.gz) = 087fc7b4651dab0d57d6a6f8c0715b1f65646ccaeaf5a9698cb0b635ac219b6d
+SIZE (john-1.6.40.tar.gz) = 797220
diff --git a/security/john/files/patch-Makefile b/security/john/files/patch-Makefile
index 83fbb0612775..804c0d651486 100644
--- a/security/john/files/patch-Makefile
+++ b/security/john/files/patch-Makefile
@@ -1,7 +1,7 @@
---- Makefile Sun Nov 30 02:02:25 2003
-+++ Makefile Wed Apr 14 15:34:42 2004
+--- Makefile.orig Mon Dec 12 19:53:36 2005
++++ Makefile Sat Dec 31 01:30:01 2005
@@ -3,10 +3,10 @@
- # Copyright (c) 1996-2003 by Solar Designer
+ # Copyright (c) 1996-2005 by Solar Designer
#
-CPP = gcc
@@ -15,8 +15,8 @@
CP = cp
LN = ln -sf
RM = rm -f
-@@ -14,7 +14,8 @@
- SED = sed
+@@ -15,7 +15,8 @@
+ PERL = perl
NULL = /dev/null
CPPFLAGS = -E
-CFLAGS = -c -Wall -O2 -fomit-frame-pointer
diff --git a/security/john/files/patch-john.conf b/security/john/files/patch-john.conf
deleted file mode 100644
index 4eb2646241ca..000000000000
--- a/security/john/files/patch-john.conf
+++ /dev/null
@@ -1,41 +0,0 @@
---- ../run/john.conf Wed Aug 20 22:56:16 2003
-+++ ../run/john.conf Wed Apr 14 15:28:33 2004
-@@ -5,7 +5,7 @@
-
- [Options]
- # Wordlist file name, to be used in batch mode
--Wordlist = $JOHN/password.lst
-+Wordlist = %%PREFIX%%/share/john/password.lst
- # Use idle cycles only
- Idle = N
- # Crash recovery file saving delay in seconds
-@@ -316,25 +316,25 @@
-
- # Incremental modes
- [Incremental:All]
--File = $JOHN/all.chr
-+File = %%PREFIX%%/share/john/all.chr
- MinLen = 0
- MaxLen = 8
- CharCount = 95
-
- [Incremental:Alpha]
--File = $JOHN/alpha.chr
-+File = %%PREFIX%%/share/john/alpha.chr
- MinLen = 1
- MaxLen = 8
- CharCount = 26
-
- [Incremental:Digits]
--File = $JOHN/digits.chr
-+File = %%PREFIX%%/share/john/digits.chr
- MinLen = 1
- MaxLen = 8
- CharCount = 10
-
- [Incremental:LanMan]
--File = $JOHN/lanman.chr
-+File = %%PREFIX%%/share/john/lanman.chr
- MinLen = 0
- MaxLen = 7
- CharCount = 69
diff --git a/security/john/files/patch-params.h b/security/john/files/patch-params.h
index 4e72616bd4c4..9b2fdab964ee 100644
--- a/security/john/files/patch-params.h
+++ b/security/john/files/patch-params.h
@@ -1,6 +1,6 @@
---- params.h.orig Mon Feb 23 17:07:38 2004
-+++ params.h Sun Apr 18 19:16:14 2004
-@@ -22,12 +22,12 @@
+--- params.h.orig Sat Dec 31 04:21:22 2005
++++ params.h Sat Dec 31 04:25:13 2005
+@@ -22,15 +22,15 @@
* will probably want to set this to 1 for their builds of John.
*/
#ifndef JOHN_SYSTEMWIDE
@@ -9,30 +9,33 @@
#endif
#if JOHN_SYSTEMWIDE
+ #ifndef JOHN_SYSTEMWIDE_EXEC
-#define JOHN_SYSTEMWIDE_EXEC "/usr/libexec/john"
--#define JOHN_SYSTEMWIDE_HOME "/usr/share/john"
+#define JOHN_SYSTEMWIDE_EXEC "%%PREFIX%%/bin/john"
-+#define JOHN_SYSTEMWIDE_HOME "%%PREFIX%%/share/john"
+ #endif
+ #ifndef JOHN_SYSTEMWIDE_HOME
+-#define JOHN_SYSTEMWIDE_HOME "/usr/share/john"
++#define JOHN_SYSTEMWIDE_HOME "%%DATADIR%%"
+ #endif
#define JOHN_PRIVATE_HOME "~/.john"
#endif
-
-@@ -67,8 +67,8 @@
+@@ -74,8 +74,8 @@
/*
* File names.
*/
-#define CFG_FULL_NAME "$JOHN/john.conf"
-#define CFG_ALT_NAME "$JOHN/john.ini"
-+#define CFG_FULL_NAME "%%PREFIX%%/share/john/john.conf"
-+#define CFG_ALT_NAME "%%PREFIX%%/share/john/john.ini"
++#define CFG_FULL_NAME "%%PREFIX%%/etc/john.conf"
++#define CFG_ALT_NAME "%%PREFIX%%/etc/john.ini"
#if JOHN_SYSTEMWIDE
#define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.conf"
#define CFG_PRIVATE_ALT_NAME JOHN_PRIVATE_HOME "/john.ini"
-@@ -82,7 +82,7 @@
+@@ -89,7 +89,7 @@
#endif
#define LOG_SUFFIX ".log"
#define RECOVERY_SUFFIX ".rec"
-#define WORDLIST_NAME "$JOHN/password.lst"
-+#define WORDLIST_NAME "%%PREFIX%%/share/john/password.lst"
++#define WORDLIST_NAME "%%DATADIR%%/password.lst"
/*
* Configuration file section names.
diff --git a/security/john/pkg-plist b/security/john/pkg-plist
index b7788922c357..874e09ed9a7b 100644
--- a/security/john/pkg-plist
+++ b/security/john/pkg-plist
@@ -1,10 +1,13 @@
bin/john
bin/unshadow
bin/xtract
+@unexec if cmp -s %D/etc/john.conf %D/etc/john.conf.default; then rm -f %D/etc/john.conf; fi
+etc/john.conf.default
+@exec [ -f %B/john.conf ] || cp %B/%f %B/john.conf
%%DATADIR%%/all.chr
+%%DATADIR%%/alnum.chr
%%DATADIR%%/alpha.chr
%%DATADIR%%/digits.chr
%%DATADIR%%/lanman.chr
-%%DATADIR%%/john.conf
%%DATADIR%%/password.lst
-@dirrm share/john
+@dirrm %%DATADIR%%