]> git.pld-linux.org Git - packages/john.git/commitdiff
- updated to 20181101 git snap (combined "core" and "jumbo") auto/th/john-1.8.0-2.20181101.1
authorAdam Gołębiowski <adamg@pld-linux.org>
Sun, 4 Nov 2018 12:50:23 +0000 (13:50 +0100)
committerAdam Gołębiowski <adamg@pld-linux.org>
Sun, 4 Nov 2018 12:50:23 +0000 (13:50 +0100)
- massively simplify spec file - drop all non-jumbo chunks in spec file,
  or settings for unsupported archs

john-x32.patch [new file with mode: 0644]
john.spec
jumbo-optflags.patch

diff --git a/john-x32.patch b/john-x32.patch
new file mode 100644 (file)
index 0000000..2e2ae75
--- /dev/null
@@ -0,0 +1,96 @@
+--- JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0/src/m4/jtr_utility_macros.m4~       2018-10-31 14:46:02.000000000 +0100
++++ JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0/src/m4/jtr_utility_macros.m4        2018-11-04 13:18:54.692843591 +0100
+@@ -150,6 +150,30 @@
+ JTR_LIST_ADD_RESULT
+ ])
++dnl @synopsis SET_X32_INCLUDES
++dnl @summary check and set some x32 bit includes
++dnl This might be a Bad Idea[tm] if cross compiling.
++AC_DEFUN([JTR_SET_X32_INCLUDES],
++[
++  AC_MSG_CHECKING([additional paths (x32)])
++  ADD_LDFLAGS=""
++  ADD_CFLAGS=""
++if test -d /usr/local/libx32; then
++   ADD_LDFLAGS="$ADD_LDFLAGS -L/usr/local/libx32"
++fi
++if test -d /usr/libx32; then
++   ADD_LDFLAGS="$ADD_LDFLAGS -L/usr/libx32"
++fi
++if test -d /libx32; then
++   ADD_LDFLAGS="$ADD_LDFLAGS -L/libx32"
++fi
++JTR_LIST_ADD(CPPFLAGS, [$ADD_CFLAGS]) # no typo here
++jtr_list_add_result=""
++JTR_LIST_ADD(LDFLAGS, [$ADD_LDFLAGS])
++JTR_LIST_ADD(CFLAGS, [$ADD_CFLAGS])
++JTR_LIST_ADD_RESULT
++])
++
+ dnl @synopsis SET_NORMAL_SSL_INCLUDES(base path)
+ dnl @summary check and set include/library paths for OpenSSL
+--- JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0.orig/src/configure.ac       2018-10-31 14:46:02.000000000 +0100
++++ JohnTheRipper-d73288b91d92f3bd670c18d3853ddaf0e02159f0/src/configure.ac    2018-11-04 13:18:54.656175005 +0100
+@@ -269,11 +269,11 @@
+ case "$host_cpu" in
+   ia64|mips64|mips64eb|mipseb64|mips64el|mipsel64|mips64*|powerpc64*|sparc64|x86_64)
+     CFLAGS_EX=""
+-    JTR_FLAG_CHECK_LINK([-m64], 1)
++    JTR_FLAG_CHECK_LINK([-mx32], 1)
+     if test "x${CFLAGS_EX}" != x ; then
+-      LDFLAGS="-m64 $LDFLAGS"
+-      CFLAGS="-m64 $CFLAGS"
+-      ASFLAGS="-m64 $ASFLAGS"
++      LDFLAGS="-mx32 $LDFLAGS"
++      CFLAGS="-mx32 $CFLAGS"
++      ASFLAGS="-mx32 $ASFLAGS"
+     fi
+     ;;
+   *)
+@@ -307,10 +307,33 @@
+    [AC_MSG_RESULT([32-bit])]
+ )
++dnl Check for x32 environment
++AC_MSG_CHECKING([for x32 environment])
++AC_LINK_IFELSE(
++   [AC_LANG_SOURCE(
++      [extern void exit(int);
++      int main() {
++      #if defined(__ILP32__) && defined(__x86_64__)
++          exit(0);}
++      #else
++          BORK!
++      #endif
++      ]
++   )]
++  ,[CPU_BITS="-mx32"]
++   [CPU_BIT_STR="32"]
++   [AC_MSG_RESULT([yes])]
++   ,
++)
++
+ if test "x${CPU_BITS}" = x-m64 ; then
+   JTR_SET_64_INCLUDES
+ fi
++if test "x${CPU_BITS}" = x-mx32 ; then
++      JTR_SET_X32_INCLUDES
++fi
++
+ dnl Checks for programs.
+ AC_PROG_LN_S
+ AC_PROG_GREP
+--- john-1.8.0-jumbo-1/src/aes/aesni/iaes_asm_interface.h~     2014-05-16 15:40:40.000000000 +0200
++++ john-1.8.0-jumbo-1/src/aes/aesni/iaes_asm_interface.h      2015-08-09 21:00:28.357476188 +0200
+@@ -56,7 +56,7 @@
+ #endif
+ #ifdef __linux__
+-#ifndef __LP64__
++#if !(defined(__LP64__) || defined(__ILP32__))
+ #define iEncExpandKey256 _iEncExpandKey256
+ #define iEncExpandKey192 _iEncExpandKey192
+ #define iEncExpandKey128 _iEncExpandKey128
index 7971211290dc5e8c800e37de0c46c59b5bdaf82b..14faef01a7b49d0e58ba886c4da58c3f17b1688c 100644 (file)
--- a/john.spec
+++ b/john.spec
@@ -1,66 +1,26 @@
-# TODO:
-# - MPI support (if with jumbo)
-# - CUDA support on bcond (if with jumbo)
-#
 # Conditional build:
-%bcond_without jumbo           # Build community-enhanced version with lots of contributed
-                               # patches adding support for over 30
-                               # of additional hash types, and more.
 %bcond_without opencl          # OpenCL support (in jumbo version)
 %bcond_without openmp          # OpenMP support (in jumbo version)
-%bcond_with    avx             # use x86 AVX instructions
-%bcond_with    xop             # use x86 XOP instructions
-%bcond_with    altivec         # use PPC Altivec instructions
 
-%if %{without jumbo}
-%ifarch i586 i686 athlon pentium2 pentium3 pentium4
-%define do_mmx 1
-%else
-%define do_mmx 0
-%endif
-%ifarch i686 athlon pentium4
-%define do_sse2 1
-%else
-%define do_sse2 0
-%endif
-%ifarch i586 i686
-%define do_mmxfb 1
-%define optmmxfb -DCPU_FALLBACK=1
-%else
-%define do_mmxfb 0
-%undefine optmmxfb
-%endif
-%ifarch i686 athlon
-%define do_ssefb 1
-%define optssefb -DCPU_FALLBACK=1
-%else
-%define do_ssefb 0
-%define optssefb %{nil}
-%endif
-%endif
+%define                snap            20181101
+%define                githash         d73288b91d92f3bd670c18d3853ddaf0e02159f0
 
 Summary:       Password cracker
 Summary(pl.UTF-8):     Łamacz haseł
 Name:          john
 Version:       1.8.0
-Release:       2
+Release:       2.%{snap}.1
 License:       GPL v2
 Group:         Applications/System
-Source0:       http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
-# Source0-md5: a4086df68f51778782777e60407f1869
-Source1:       http://www.openwall.com/john/j/%{name}-%{version}-jumbo-1.tar.xz
-# Source1-md5: 1d6b22ec41a12cdcd62ad6eae3e77345
-Source2:       http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
-# Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
+Source0:       https://github.com/magnumripper/JohnTheRipper/archive/%{githash}/john-%{snap}.tar.gz
+# Source0-md5: a75c1108111c5181b471a9f4a9dab898
 Patch0:                %{name}-mailer.patch
-Patch1:                optflags.patch
-Patch2:                jumbo-optflags.patch
-Patch3:                jumbo-x32.patch
+Patch1:                jumbo-optflags.patch
+Patch4:                %{name}-x32.patch
 URL:           http://www.openwall.com/john/
 BuildRequires: rpmbuild(macros) >= 1.213
+BuildRequires: autoconf >= 2.69
 BuildRequires: tar >= 1:1.22
-BuildRequires: xz
-%if %{with jumbo}
 %{?with_opencl:BuildRequires:  OpenCL-devel}
 BuildRequires: bzip2-devel
 %{?with_openmp:BuildRequires:  gcc >= 6:4.2}
@@ -70,25 +30,9 @@ BuildRequires:       gmp-devel
 #BuildRequires:        libpcap-devel
 BuildRequires: openssl-devel >= 0.9.7
 BuildRequires: pkgconfig
-%ifarch %{ix86} %{x8664} x32
 BuildRequires: yasm
-%endif
 BuildRequires: zlib-devel
-%endif
 Requires:      words
-%ifarch %{ix86} %{x8664}
-%if %{with xop}
-Requires:      cpuinfo(xop)
-%endif
-%if %{with xop} || %{with avx}
-Requires:      cpuinfo(avx)
-%endif
-%if %{without jumbo}
-%if %{do_sse2} && !%{do_ssefb}
-Requires:      cpuinfo(sse2)
-%endif
-%endif
-%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -111,88 +55,25 @@ na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
 Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
 
 %prep
-%setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
+%setup -q -n JohnTheRipper-%{githash}
 %patch0 -p1
-%{!?with_jumbo:%patch1 -p1}
-%{?with_jumbo:%patch2 -p1}
-%{?with_jumbo:%patch3 -p1}
-
-mv john-extra-*/*.chr run
-
-%{__rm} doc/INSTALL
+%patch1 -p1
+%ifarch x32
+%patch4 -p1
+%endif
 
 %build
 cd src
+%{__autoconf}
 
-%if %{with jumbo}
 %ifarch x32
 ax_intel_x32=yes \
 %endif
 %configure \
        %{!?with_opencl:--disable-opencl} \
        %{!?with_openmp:--disable-openmp}
-%{__make}
-%else
-cat > defs.h <<'EOF'
-#define        JOHN_SYSTEMWIDE 1
-#define        JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
-EOF
 
-%if %{do_mmxfb}
-%{__make} linux-x86-any \
-       CC="%{__cc}" \
-       OPTFLAGS="%{rpmcflags} -include defs.h"
-mv ../run/john ../run/john-non-mmx
-%{__make} clean
-%endif
-
-%if %{do_ssefb}
-%{__make} linux-x86-mmx \
-       CC="%{__cc}" \
-       OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
-mv ../run/john ../run/john-non-sse
-%{__make} clean
-%endif
-
-TARG=generic
-%ifarch %{x8664}
-       TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
-%endif
-%ifarch        %{ix86}
-       %if %{with xop} || %{with avx}
-               TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
-       %else
-               %if %{do_sse2}
-                       TARG=linux-x86-sse2
-               %else
-                       %if %{do_mmx}
-                               TARG=linux-x86-mmx
-                       %else
-                               TARG=linux-x86-any
-                       %endif
-               %endif
-       %endif
-%endif
-%ifarch ppc
-       TARG=linux-ppc32%{?with_altivec:-altivec}
-%endif
-%ifarch ppc64
-       TARG=linux-ppc64%{?with_altivec:-altivec}
-%endif
-%ifarch alpha
-       TARG=linux-alpha
-%endif
-%ifarch ia64
-       TARG=linux-ia64
-%endif
-%ifarch sparc sparcv9
-       TARG=linux-sparc
-%endif
-
-%{__make} $TARG \
-       CC="%{__cc}" \
-       OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
-%endif
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -200,15 +81,6 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
 install -p run/john $RPM_BUILD_ROOT%{_bindir}
 
-%if %{without jumbo}
-%if %{do_mmxfb}
-install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
-%endif
-%if %{do_ssefb}
-install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
-%endif
-%endif
-
 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
@@ -223,15 +95,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/unafs
 %attr(755,root,root) %{_bindir}/unique
 %attr(755,root,root) %{_bindir}/unshadow
-%if %{without jumbo}
-%if %{do_mmxfb} || %{do_ssefb}
-%dir %{_libdir}/john
-%if %{do_mmxfb}
-%attr(755,root,root) %{_libdir}/john/john-non-mmx
-%endif
-%if %{do_ssefb}
-%attr(755,root,root) %{_libdir}/john/john-non-sse
-%endif
-%endif
-%endif
 %{_datadir}/john
index 7a1bb1eab02adad098035a935735063d94770fe6..0de983cd5695b68ed415efc0673893db50ea348c 100644 (file)
@@ -1,14 +1,3 @@
---- john-1.8.0-jumbo-1/src/Makefile.in~        2014-12-18 14:53:53.000000000 +0100
-+++ john-1.8.0-jumbo-1/src/Makefile.in 2015-08-09 20:51:57.280926480 +0200
-@@ -151,7 +151,7 @@
- NVCC = @NVCC@
- CCBIN = @NVCC_GCC@
- ifdef CCBIN
--NVCC_FLAGS += @CPU_BITS@ -ccbin=$(CCBIN)
-+NVCC_FLAGS += -ccbin=$(CCBIN)
- endif
- JOHN_OBJS += $(CUDA_OBJS)
- endif
 --- john-1.8.0-jumbo-1/src/aes/aesni/Makefile.in~      2014-11-11 15:41:25.000000000 +0100
 +++ john-1.8.0-jumbo-1/src/aes/aesni/Makefile.in       2015-08-09 20:53:39.198899789 +0200
 @@ -11,7 +11,7 @@
This page took 0.167919 seconds and 4 git commands to generate.