[arch-commits] Commit in john/repos (7 files)

Levente Polyak anthraxx at archlinux.org
Thu Dec 21 10:08:35 UTC 2017


    Date: Thursday, December 21, 2017 @ 10:08:34
  Author: anthraxx
Revision: 275158

archrelease: copy trunk to community-staging-x86_64

Added:
  john/repos/community-staging-x86_64/
  john/repos/community-staging-x86_64/PKGBUILD
    (from rev 275157, john/trunk/PKGBUILD)
  john/repos/community-staging-x86_64/fix-32bit.patch
    (from rev 275157, john/trunk/fix-32bit.patch)
  john/repos/community-staging-x86_64/fix-i686-openmp.patch
    (from rev 275157, john/trunk/fix-i686-openmp.patch)
  john/repos/community-staging-x86_64/gcc5.patch
    (from rev 275157, john/trunk/gcc5.patch)
  john/repos/community-staging-x86_64/john.install
    (from rev 275157, john/trunk/john.install)
  john/repos/community-staging-x86_64/params.h.patch
    (from rev 275157, john/trunk/params.h.patch)

-----------------------+
 PKGBUILD              |  138 ++++++++++++++++++++++++++++++++++++++++++++++++
 fix-32bit.patch       |   24 ++++++++
 fix-i686-openmp.patch |   69 ++++++++++++++++++++++++
 gcc5.patch            |   63 +++++++++++++++++++++
 john.install          |    9 +++
 params.h.patch        |   17 +++++
 6 files changed, 320 insertions(+)

Copied: john/repos/community-staging-x86_64/PKGBUILD (from rev 275157, john/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2017-12-21 10:08:34 UTC (rev 275158)
@@ -0,0 +1,138 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Thorsten Töpper <atsutane-tu at freethoughts.de>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Dale Blount <dale at archlinux.org>
+# Contributor: Tom Newsom <Jeepster at gmx.co.uk>
+# Contributor: Michal Krenek <mikos at sg1.cz>
+
+pkgname=john
+_jumbover=1
+_johnver=1.8.0
+pkgver=${_johnver}.jumbo${_jumbover}
+pkgrel=10
+pkgdesc='John the Ripper password cracker'
+url='http://www.openwall.com/john'
+arch=('x86_64')
+license=('GPL2' 'custom')
+depends=('openssl-1.0' 'gmp' 'libpcap' 'openmpi' 'gcc-libs' 'opencl-icd-loader')
+optdepends=(
+  'bash-completion: completion for bash'
+  'perl: perl based john scripts'
+  'ruby: ruby based john scripts'
+  'python2: python based john scripts')
+makedepends=('pkg-config' 'opencl-headers')
+backup=('etc/john/john.conf')
+install=john.install
+source=(http://www.openwall.com/john/j/john-${_johnver}-jumbo-${_jumbover}.tar.xz
+        params.h.patch
+        gcc5.patch
+        fix-32bit.patch
+        fix-i686-openmp.patch)
+sha512sums=('163cd71f634c2d1e9d0fa760984cc05001bfeef8300098d6b9cc8bf7e1719fec1d37142c39d7fd65ef37ee96c95681f01d7f0b1941058b7f9926442e2df5cd8e'
+            '4e7c530bf75d0c56409018097a2fee4a991c8332b25f985b16d91ffb631079d46870fa0c54eb519c8d60c7425c62c616e24617e0ebbad4193ccef8d001c08893'
+            '941a8fbe435d24287be158648d3083062806de639ce822645d949a171b2e662249bb13d9f5903017792cc979c7ff89615681adaed2afbf0d9c6ca5fe825e135a'
+            '824497e6fa67b1ff17a4b87544dedf5361e5ba07617ffb9e7718f2e90152b0bc2f39cd80a1badd84de0ef1e3442783bda3df1332d990b722a29d04b8b7449590'
+            '7eddd3c7360f459fba02b6c398b530baa7151f127384a1a8551a74658acbfb11a7d206a0482ab357496074be4ca20192c192962938e9bcdf1976cb4421d9af2c')
+
+prepare() {
+  cd ${pkgname}-${_johnver}-jumbo-${_jumbover}
+  patch -p0 < "${srcdir}/params.h.patch"
+  patch -p1 < "${srcdir}/gcc5.patch"
+  patch -p1 < "${srcdir}/fix-32bit.patch"
+  patch -Rp1 < "${srcdir}/fix-i686-openmp.patch"
+  sed 's|env python|env python2|' -i run/*.py
+  sed 's|/usr/bin/python|/usr/bin/python2|' -i run/*.py
+  sed 's|"x$enable_native_tests" = xyes -a "x$PKG_CONFIG"|"x$PKG_CONFIG"|' -i src/configure
+}
+
+build() {
+  cd ${pkgname}-${_johnver}-jumbo-${_jumbover}/src
+
+  export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig
+
+  local JOHN_CFG_FULL_NAME="-DCFG_FULL_NAME='\"/etc/john/john.conf\"'"
+  local JOHN_SYSTEMWIDE_FLAGS="-DJOHN_SYSTEMWIDE_EXEC='\"/usr/lib/john\"' -DJOHN_SYSTEMWIDE_HOME='\"/usr/share/john\"'"
+  local JOHN_FLAGS="-DJOHN_SYSTEMWIDE=1 ${JOHN_SYSTEMWIDE_FLAGS} -DCPU_FALLBACK ${JOHN_CFG_FULL_NAME}"
+  local CFLAGS="${CFLAGS} ${JOHN_FLAGS}"
+  local CONFIGURE_FLAGS="--prefix=/usr --disable-native-tests --enable-openmp --enable-mpi"
+  CONFIGURE_FLAGS+=" --enable-opencl --enable-pkg-config --enable-pcap"
+
+  if [[ "${CARCH}" == "x86_64" ]]; then
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS}"
+    make clean; make
+    mv ../run/john{,-non-avx}
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS} -mavx"
+    make clean; make
+    mv ../run/john{,-non-xop}
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS} -mxop"
+    make clean; make
+  elif [[ "${CARCH}" == "i686" ]]; then
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS}"
+    make clean; make
+    mv ../run/john{,-non-mmx}
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS} -mmmx"
+    make clean; make
+    mv ../run/john{,-non-sse}
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS} -msse2"
+    make clean; make
+    mv ../run/john{,-non-avx}
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS} -mavx"
+    make clean; make
+    mv ../run/john{,-non-xop}
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS} -mxop"
+    make clean; make
+  else
+    ./configure ${CONFIGURE_FLAGS} CFLAGS="${CFLAGS}"
+    make clean; make
+  fi
+}
+
+package() {
+  cd ${pkgname}-${_johnver}-jumbo-${_jumbover}
+
+  # config
+  sed 's|$JOHN/john.local.conf|/etc/john/john.local.conf|g' -i run/john.conf
+  install -Dm 644 run/john.conf -t "${pkgdir}/etc/john"
+  install -Dm 644 run/*.conf -t "${pkgdir}/usr/share/john"
+  rm "${pkgdir}/usr/share/john/"{john.conf,john.local.conf}
+
+  # opencl
+  install -Dm 644 run/kernels/* -t "${pkgdir}/usr/share/john/kernels"
+
+  # docs
+  install -Dm 644 doc/* -t "${pkgdir}/usr/share/doc/john"
+  install -Dm 644 doc/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+
+  # completion
+  install -Dm 644 run/john.bash_completion "${pkgdir}/usr/share/bash-completion/completions/john"
+  install -Dm 644 run/john.zsh_completion "${pkgdir}/usr/share/zsh/site-functions/_john"
+
+  # binaries
+  install -Dm 755 run/john -t "${pkgdir}/usr/bin"
+  install -Dm 755 run/john-non-* -t "${pkgdir}/usr/lib/john"||true
+  local john_bins=(calc_stat cprepair  genmkvpwd  luks2john    mkvcalcproba raw2dyna \
+                   relbench  tgtsnarf  uaf2john   wpapcap2john vncpcap2john SIPdump)
+  for bin in "${john_bins[@]}"; do
+    install -Dm 755 run/${bin} -t "${pkgdir}/usr/bin"
+  done
+
+  # scripts
+  install -Dm 755 run/*.py run/*.pl run/*.rb run/{mailer,benchmark-unify} -t "${pkgdir}/usr/lib/john"
+
+  # data
+  install -Dm 644 run/*.chr run/*.lst run/dictionary* run/stats -t "${pkgdir}/usr/share/john"
+
+  # syminks
+  cd "${pkgdir}/usr/bin"
+  local john_links=(base64conv    dmg2john       gpg2john      hccap2john    \
+                    keepass2john  keychain2john  keyring2john  keystore2john \
+                    kwallet2john  pfx2john       putty2john    pwsafe2john   \
+                    racf2john     rar2john       ssh2john      unique        \
+                    unshadow      zip2john       unafs         undrop        \
+                    truecrypt_volume2john)
+  for link in "${john_links[@]}"; do
+    ln -s john ${link}
+  done
+}
+
+# vim: ts=2 sw=2 et:

Copied: john/repos/community-staging-x86_64/fix-32bit.patch (from rev 275157, john/trunk/fix-32bit.patch)
===================================================================
--- community-staging-x86_64/fix-32bit.patch	                        (rev 0)
+++ community-staging-x86_64/fix-32bit.patch	2017-12-21 10:08:34 UTC (rev 275158)
@@ -0,0 +1,24 @@
+From 480e95b0e449863be3e1a5b0bc634a67df28b618 Mon Sep 17 00:00:00 2001
+From: Solar <solar at openwall.com>
+Date: Thu, 18 Dec 2014 21:24:01 +0100
+Subject: [PATCH] Fix a bug in truecrypt for non-x86 archs. Closes #912.
+
+---
+ src/truecrypt_fmt_plug.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/truecrypt_fmt_plug.c b/src/truecrypt_fmt_plug.c
+index 1c95c39..8cef85e 100644
+--- a/src/truecrypt_fmt_plug.c
++++ b/src/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);

Copied: john/repos/community-staging-x86_64/fix-i686-openmp.patch (from rev 275157, john/trunk/fix-i686-openmp.patch)
===================================================================
--- community-staging-x86_64/fix-i686-openmp.patch	                        (rev 0)
+++ community-staging-x86_64/fix-i686-openmp.patch	2017-12-21 10:08:34 UTC (rev 275158)
@@ -0,0 +1,69 @@
+From 70d2140adda533680aec3c0cb0e828a868fafa68 Mon Sep 17 00:00:00 2001
+From: jfoug <jfoug at cox.net>
+Date: Fri, 28 Nov 2014 06:43:27 -0600
+Subject: [PATCH] crypt: problems with #defines and strdup
+
+---
+ src/c3_fmt.c | 35 ++++++++++++++++++++++-------------
+ 1 file changed, 22 insertions(+), 13 deletions(-)
+
+diff --git a/src/c3_fmt.c b/src/c3_fmt.c
+index d1c694e..0fe867f 100644
+--- a/src/c3_fmt.c
++++ b/src/c3_fmt.c
+@@ -17,6 +17,28 @@
+ 
+ #if HAVE_CRYPT
+ 
++/* if this comes after the #define crap below, there are often
++ * problems with strdup or other things not being defined. We
++ * move this block of includes to above the _XOPEN_* defines
++ */
++#if STRING_WITH_STRINGS
++#include <string.h>
++#include <strings.h>
++#elif HAVE_STRING_H
++#include <string.h>
++#elif HAVE_STRINGS_H
++#include <strings.h>
++#endif
++#if !AC_BUILT
++#include <string.h>
++#ifndef _MSC_VER
++#include <strings.h>
++#endif
++#undef _XOPEN_VERSION
++#undef _XOPEN_SOURCE
++#undef _XOPEN_SOURCE_EXTENDED
++#undef _GNU_SOURCE
++
+ #define _XOPEN_SOURCE 4 /* for crypt(3) */
+ #define _XOPEN_SOURCE_EXTENDED 1 /* for OpenBSD */
+ #define _XOPEN_VERSION 4
+@@ -24,11 +46,6 @@
+ #define _GNU_SOURCE 1 /* for crypt_r(3) */
+ #include <stdio.h>
+ 
+-#if !AC_BUILT
+-#include <string.h>
+-#ifndef _MSC_VER
+-#include <strings.h>
+-#endif
+ #ifdef __CYGWIN__
+ #include <crypt.h>
+ #endif
+@@ -41,14 +58,6 @@
+ #endif
+ #endif
+ 
+-#if STRING_WITH_STRINGS
+-#include <string.h>
+-#include <strings.h>
+-#elif HAVE_STRING_H
+-#include <string.h>
+-#elif HAVE_STRINGS_H
+-#include <strings.h>
+-#endif
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif

Copied: john/repos/community-staging-x86_64/gcc5.patch (from rev 275157, john/trunk/gcc5.patch)
===================================================================
--- community-staging-x86_64/gcc5.patch	                        (rev 0)
+++ community-staging-x86_64/gcc5.patch	2017-12-21 10:08:34 UTC (rev 275158)
@@ -0,0 +1,63 @@
+From e2e868db3e153b3f959e119a51703d4afb99c624 Mon Sep 17 00:00:00 2001
+From: magnum <john.magnum at hushmail.com>
+Date: Wed, 13 May 2015 12:05:00 +0200
+Subject: [PATCH] Add another solution to #1093. This make it possible to build
+ using gcc 5 without --std=gnu89 (although I kept the latter for now). See
+ also #1250.
+
+---
+ src/DES_bs_b.c |  3 +++
+ src/MD5_std.c  | 12 ++++++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c
+index 306b4e4..18c9235 100644
+--- a/src/DES_bs_b.c
++++ b/src/DES_bs_b.c
+@@ -1272,6 +1272,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void)
+ #endif
+ 
+ #if DES_bs_mt
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt)
+ #else
+ void DES_bs_set_salt(ARCH_WORD salt)
+diff --git a/src/MD5_std.c b/src/MD5_std.c
+index 6bdcd35..1eec9b4 100644
+--- a/src/MD5_std.c
++++ b/src/MD5_std.c
+@@ -496,9 +496,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]);
+ #if MD5_std_mt
+ #define MD5_body(x, out) \
+ 	MD5_body_for_thread(t, x, out)
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
+ 	MD5_word x[15], MD5_word out[4])
+ #else
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
+ #endif
+ {
+@@ -595,10 +601,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
+ #if MD5_std_mt
+ #define MD5_body(x0, x1, out0, out1) \
+ 	MD5_body_for_thread(t, x0, x1, out0, out1)
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
+ 	MD5_word x0[15], MD5_word x1[15],
+ 	MD5_word out0[4], MD5_word out1[4])
+ #else
++#if __GNUC__ >= 5
++extern
++#endif
+ MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15],
+ 	MD5_word out0[4], MD5_word out1[4])
+ #endif

Copied: john/repos/community-staging-x86_64/john.install (from rev 275157, john/trunk/john.install)
===================================================================
--- community-staging-x86_64/john.install	                        (rev 0)
+++ community-staging-x86_64/john.install	2017-12-21 10:08:34 UTC (rev 275158)
@@ -0,0 +1,9 @@
+post_install() {
+  touch /etc/john/john.local.conf 2> /dev/null
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+# vim: ts=2 sw=2 et:

Copied: john/repos/community-staging-x86_64/params.h.patch (from rev 275157, john/trunk/params.h.patch)
===================================================================
--- community-staging-x86_64/params.h.patch	                        (rev 0)
+++ community-staging-x86_64/params.h.patch	2017-12-21 10:08:34 UTC (rev 275158)
@@ -0,0 +1,17 @@
+--- src/params.h	2014-12-18 15:14:33.000000000 +0000
++++ src/params.h	2015-01-03 13:49:57.994775328 +0000
+@@ -135,8 +135,12 @@
+ /*
+  * File names.
+  */
+-#define CFG_FULL_NAME			"$JOHN/john.conf"
+-#define CFG_ALT_NAME			"$JOHN/john.ini"
++#ifndef CFG_FULL_NAME
++#define CFG_FULL_NAME			"$JOHN/john.conf"
++#endif
++#ifndef CFG_ALT_NAME
++#define CFG_ALT_NAME			"$JOHN/john.ini"
++#endif
+ #if JOHN_SYSTEMWIDE
+ #define CFG_PRIVATE_FULL_NAME		JOHN_PRIVATE_HOME "/john.conf"
+ #define CFG_PRIVATE_ALT_NAME		JOHN_PRIVATE_HOME "/john.ini"



More information about the arch-commits mailing list