From 2436af34dfa160f07762648a1ad7c009e8da1650 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 2 Feb 2015 16:50:25 +0100 Subject: [PATCH] john: update to 1.8.0. --- srcpkgs/john/patches/libressl.patch | 9 +++++ srcpkgs/john/patches/truecrypt.patch | 20 ++++++++++ srcpkgs/john/template | 55 ++++++++++++---------------- 3 files changed, 53 insertions(+), 31 deletions(-) create mode 100644 srcpkgs/john/patches/libressl.patch create mode 100644 srcpkgs/john/patches/truecrypt.patch diff --git a/srcpkgs/john/patches/libressl.patch b/srcpkgs/john/patches/libressl.patch new file mode 100644 index 0000000000..9414aff294 --- /dev/null +++ b/srcpkgs/john/patches/libressl.patch @@ -0,0 +1,9 @@ +--- common.h 2015-02-02 15:49:37.819305586 +0100 ++++ common.h 2015-02-02 15:47:25.449554007 +0100 +@@ -75,4 +75,6 @@ + */ + extern void common_init(void); + ++#define C_Block DES_cblock ++ + #endif diff --git a/srcpkgs/john/patches/truecrypt.patch b/srcpkgs/john/patches/truecrypt.patch new file mode 100644 index 0000000000..c88648472c --- /dev/null +++ b/srcpkgs/john/patches/truecrypt.patch @@ -0,0 +1,20 @@ +Upstream patch: +commit 480e95b0e449863be3e1a5b0bc634a67df28b618 +Author: Solar +Date: Thu Dec 18 21:24:01 2014 +0100 + + Fix a bug in truecrypt for non-x86 archs. Closes #912. + +--- truecrypt_fmt_plug.c ++++ truecrypt_fmt_plug.c +@@ -310,8 +310,8 @@ static int crypt_all(int *pcount, struct db_salt *salt) + pbkdf2_sha512_sse((const unsigned char **)pin, lens, psalt->salt, 64, psalt->num_iterations, &(x.poutc), sizeof(key), 0); + } + #else +- if (is_sha512) +- pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen(key_buffer[i]), psalt->salt, 64, num_iterations, key, sizeof(key), 0); ++ if (psalt->hash_type == IS_SHA512) ++ pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen((char*)key_buffer[i]), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0); + #endif + else if (psalt->hash_type == IS_RIPEMD160) + pbkdf2_ripemd160(key_buffer[i], strlen((char*)(key_buffer[i])), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0); diff --git a/srcpkgs/john/template b/srcpkgs/john/template index 9af06a0b21..0a4dc08a3b 100644 --- a/srcpkgs/john/template +++ b/srcpkgs/john/template @@ -1,38 +1,30 @@ # Template file for 'john' pkgname=john -version=1.7.9 -_jumbover=5 -revision=5 -wrksrc="${pkgname}-${version}-jumbo-${_jumbover}" -hostmakedepends="libgomp-devel" -makedepends="zlib-devel libgomp-devel libressl-devel>=2.1.3" +version=1.8.0 +_jumbover=1 +revision=1 +wrksrc="${pkgname}-${version}-jumbo-${_jumbover}/src" +build_style=gnu-configure +hostmakedepends="libgomp-devel pkg-config" +makedepends="zlib-devel libgomp-devel libressl-devel>=2.1.3 libpcap-devel gmp-devel" conf_files="/etc/john/john.conf" short_desc="John the Ripper password cracker (jumbo-${_jumbover} patch included)" maintainer="Juan RP " license="GPL-2" homepage="http://www.openwall.com/john/" -distfiles="$homepage/g/$pkgname-${version}-jumbo-${_jumbover}.tar.bz2" -checksum=4007aec40d2fedb1ce3287c62f23f8a1a8b8029d22cd3cbc60bb1a42f56c1a7f -nocross=yes +distfiles="$homepage/j/$pkgname-${version}-jumbo-${_jumbover}.tar.xz" +checksum=bac93d025995a051f055adbd7ce2f1975676cac6c74a6c7a3ee4cfdd9c160923 -do_configure() { - sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS += -c -Wall -DJOHN_SYSTEMWIDE=1|' src/Makefile - sed -i 's|^LDFLAGS =\(.*\)|LDFLAGS +=\1 -lm|' src/Makefile - sed -i 's|-m486||g' src/Makefile - sed -i '/OMPFLAGS/s|-msse2||g' src/Makefile - sed -i 's|#OMPFLAGS = -fopenmp|OMPFLAGS = -fopenmp|' src/Makefile - sed -i 's|des_|DES_|g' src/KRB4*.c -} -do_build() { - if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then - make ${makejobs} -C src linux-x86-64 - elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then - make ${makejobs} -C src linux-x86-mmx - else - make ${makejobs} -C src generic - fi +pre_configure() { + sed -i 's|des_|DES_|g' KRB4*.c + export AS= LD= + export OPENSSL_LIBS="-lssl -lcrypto" + CFLAGS+=" -DJOHN_SYSTEMWIDE=1" } + do_install() { + cd .. + # config file sed -i 's|$JOHN|/usr/share/john|g' run/john.conf install -Dm644 run/john.conf ${DESTDIR}/etc/john/john.conf @@ -43,19 +35,20 @@ do_install() { vmkdir usr/share/john mv ${DESTDIR}/usr/share/doc/$pkgname/LICENSE ${DESTDIR}/usr/share/licenses/$pkgname # install password list and charset files - install -m644 run/{{all,alnum,alpha,digits,lanman}.chr,password.lst} \ - ${DESTDIR}/usr/share/john - install -m644 run/{dumb16,dumb32,dynamic}.conf \ - ${DESTDIR}/usr/share/john + install -m644 run/*.chr run/*.lst ${DESTDIR}/usr/share/john + install -m644 run/*.conf ${DESTDIR}/usr/share/john # install binaries - install -Dm755 run/john ${DESTDIR}/usr/bin/john - install -Dm755 run/mailer ${DESTDIR}/usr/bin/john-mailer + vbin run/john + vbin run/mailer john-mailer + vbin run/vncpcap2john + vbin run/luks2john cd ${DESTDIR}/usr/bin ln -s john unafs ln -s john unique ln -s john unshadow ln -s john undrop + ln -s john gpg2john ln -s john pdf2john ln -s john rar2john ln -s john ssh2john