2 # - MPI support (if with jumbo)
3 # - CUDA support on bcond (if with jumbo)
6 %bcond_without jumbo # Build community-enhanced version with lots of contributed
7 # patches adding support for over 30
8 # of additional hash types, and more.
9 %bcond_without gomp # OpenMP support (in jumbo version)
10 %bcond_without opencl # OpenCL support (in jumbo version)
11 %bcond_with avx # use x86 AVX instructions
12 %bcond_with xop # use x86 XOP instructions
13 %bcond_with altivec # use PPC Altivec instructions
16 %ifarch i586 i686 athlon pentium2 pentium3 pentium4
21 %ifarch i686 athlon pentium4
28 %define optmmxfb -DCPU_FALLBACK=1
35 %define optssefb -DCPU_FALLBACK=1
38 %define optssefb %{nil}
42 Summary: Password cracker
43 Summary(pl.UTF-8): Łamacz haseł
48 Group: Applications/System
49 Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
50 # Source0-md5: a4086df68f51778782777e60407f1869
51 Source1: http://www.openwall.com/john/j/%{name}-%{version}-jumbo-1.tar.xz
52 # Source1-md5: 1d6b22ec41a12cdcd62ad6eae3e77345
53 Source2: http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
54 # Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
55 Patch0: %{name}-mailer.patch
56 Patch1: optflags.patch
57 Patch2: jumbo-optflags.patch
58 Patch3: jumbo-x32.patch
59 URL: http://www.openwall.com/john/
60 BuildRequires: rpmbuild(macros) >= 1.213
61 BuildRequires: tar >= 1:1.22
64 %{?with_opencl:BuildRequires: OpenCL-devel}
65 BuildRequires: bzip2-devel
66 %{?with_gomp:BuildRequires: gcc >= 6:4.2}
67 BuildRequires: gmp-devel
68 %{?with_gomp:BuildRequires: libgomp-devel}
69 # for SIPdump and vncpcap2john binaries, which are not packaged
70 #BuildRequires: libpcap-devel
71 BuildRequires: openssl-devel >= 0.9.7
72 BuildRequires: pkgconfig
73 %ifarch %{ix86} %{x8664} x32
76 BuildRequires: zlib-devel
79 %ifarch %{ix86} %{x8664}
81 Requires: cpuinfo(xop)
83 %if %{with xop} || %{with avx}
84 Requires: cpuinfo(avx)
87 %if %{do_sse2} && !%{do_ssefb}
88 Requires: cpuinfo(sse2)
92 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
95 John the Ripper is a fast password cracker, currently available for
96 many flavors of Unix (11 are officially supported, not counting
97 different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
98 requires a contributed patch). Its primary purpose is to detect weak
99 Unix passwords. Besides several crypt(3) password hash types most
100 commonly found on various Unix flavors, supported out of the box are
101 Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
104 %description -l pl.UTF-8
105 John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
106 rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
107 architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
108 łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
109 Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
110 na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
111 Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
114 %setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
116 %{!?with_jumbo:%patch1 -p1}
117 %{?with_jumbo:%patch2 -p1}
118 %{?with_jumbo:%patch3 -p1}
120 mv john-extra-*/*.chr run
132 %{!?with_opencl:--disable-opencl} \
133 %{!?with_gomp:--disable-openmp}
137 #define JOHN_SYSTEMWIDE 1
138 #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
142 %{__make} linux-x86-any \
144 OPTFLAGS="%{rpmcflags} -include defs.h"
145 mv ../run/john ../run/john-non-mmx
150 %{__make} linux-x86-mmx \
152 OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
153 mv ../run/john ../run/john-non-sse
159 TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
162 %if %{with xop} || %{with avx}
163 TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
177 TARG=linux-ppc32%{?with_altivec:-altivec}
180 TARG=linux-ppc64%{?with_altivec:-altivec}
188 %ifarch sparc sparcv9
194 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
198 rm -rf $RPM_BUILD_ROOT
199 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
200 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
201 install -p run/john $RPM_BUILD_ROOT%{_bindir}
205 install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
208 install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
212 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
213 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
214 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
217 rm -rf $RPM_BUILD_ROOT
220 %defattr(644,root,root,755)
221 %doc doc/* run/mailer
222 %attr(755,root,root) %{_bindir}/john
223 %attr(755,root,root) %{_bindir}/unafs
224 %attr(755,root,root) %{_bindir}/unique
225 %attr(755,root,root) %{_bindir}/unshadow
227 %if %{do_mmxfb} || %{do_ssefb}
230 %attr(755,root,root) %{_libdir}/john/john-non-mmx
233 %attr(755,root,root) %{_libdir}/john/john-non-sse