[packages/john] - fix building on x32 - fix jumbo bcond and macros
baggins
baggins at pld-linux.org
Sun Aug 9 21:08:53 CEST 2015
commit 4b4e0bd37997ca9ebbc8d7397ee3f85da102272e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Aug 9 21:08:30 2015 +0200
- fix building on x32
- fix jumbo bcond and macros
john.spec | 11 +++++++++++
jumbo-optflags.patch | 22 ++++++++++++++++++++++
jumbo-x32.patch | 11 +++++++++++
3 files changed, 44 insertions(+)
---
diff --git a/john.spec b/john.spec
index ff2f852..c83c8e0 100644
--- a/john.spec
+++ b/john.spec
@@ -49,6 +49,8 @@ Source2: http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
# Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
Patch0: %{name}-mailer.patch
Patch1: optflags.patch
+Patch2: jumbo-optflags.patch
+Patch3: jumbo-x32.patch
URL: http://www.openwall.com/john/
%{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7}
BuildRequires: rpmbuild(macros) >= 1.213
@@ -93,6 +95,8 @@ Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
%setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
%patch0 -p1
%{!?with_jumbo:%patch1 -p1}
+%{?with_jumbo:%patch2 -p1}
+%{?with_jumbo:%patch3 -p1}
mv john-extra-*/*.chr run
@@ -102,6 +106,9 @@ mv john-extra-*/*.chr run
cd src
%if %{with jumbo}
+%ifarch x32
+ax_intel_x32=yes \
+%endif
%configure
%{__make}
%else
@@ -172,12 +179,14 @@ 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
@@ -193,6 +202,7 @@ 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}
@@ -202,4 +212,5 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/john/john-non-sse
%endif
%endif
+%endif
%{_datadir}/john
diff --git a/jumbo-optflags.patch b/jumbo-optflags.patch
new file mode 100644
index 0000000..7a1bb1e
--- /dev/null
+++ b/jumbo-optflags.patch
@@ -0,0 +1,22 @@
+--- 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 @@
+ $(YASM) -D__ at AESNI_OS@__ @YASM_OPTIONS@ $(RDTSC) -o $@
+
+ aesni.o: iaes_asm_interface.h iaesni.h intel_aes.c
+- $(CC) $(CFLAGS) @CFLAGS_EXTRA@ -m at CPU_BIT_STR@ -c intel_aes.c -o $@
++ $(CC) $(CFLAGS) @CFLAGS_EXTRA@ -c intel_aes.c -o $@
+
+ all: iaesx.o rdtsc.o aesni.o
+
diff --git a/jumbo-x32.patch b/jumbo-x32.patch
new file mode 100644
index 0000000..eaf43d6
--- /dev/null
+++ b/jumbo-x32.patch
@@ -0,0 +1,11 @@
+--- 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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/john.git/commitdiff/4b4e0bd37997ca9ebbc8d7397ee3f85da102272e
More information about the pld-cvs-commit
mailing list