3 %bcond_without jumbo # Build community-enhanced version with lots of contributed
4 # patches adding support for over 30
5 # of additional hash types, and more.
6 %bcond_with avx # use x86 AVX instructions
7 %bcond_with xop # use x86 XOP instructions
8 %bcond_with altivec # use PPC Altivec instructions
11 %ifarch i586 i686 athlon pentium2 pentium3 pentium4
16 %ifarch i686 athlon pentium4
23 %define optmmxfb -DCPU_FALLBACK=1
30 %define optssefb -DCPU_FALLBACK=1
33 %define optssefb %{nil}
37 Summary: Password cracker
38 Summary(pl.UTF-8): Łamacz haseł
43 Group: Applications/System
44 Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
45 # Source0-md5: a4086df68f51778782777e60407f1869
46 Source1: http://www.openwall.com/john/j/%{name}-%{version}-jumbo-1.tar.xz
47 # Source1-md5: 1d6b22ec41a12cdcd62ad6eae3e77345
48 Source2: http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
49 # Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
50 Patch0: %{name}-mailer.patch
51 Patch1: optflags.patch
52 Patch2: jumbo-optflags.patch
53 Patch3: jumbo-x32.patch
54 URL: http://www.openwall.com/john/
55 %{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7}
56 BuildRequires: rpmbuild(macros) >= 1.213
57 BuildRequires: tar >= 1:1.22
60 %ifarch %{ix86} %{x8664}
62 Requires: cpuinfo(xop)
64 %if %{with xop} || %{with avx}
65 Requires: cpuinfo(avx)
68 %if %{do_sse2} && !%{do_ssefb}
69 Requires: cpuinfo(sse2)
73 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 John the Ripper is a fast password cracker, currently available for
77 many flavors of Unix (11 are officially supported, not counting
78 different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
79 requires a contributed patch). Its primary purpose is to detect weak
80 Unix passwords. Besides several crypt(3) password hash types most
81 commonly found on various Unix flavors, supported out of the box are
82 Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
85 %description -l pl.UTF-8
86 John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
87 rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
88 architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
89 łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
90 Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
91 na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
92 Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
95 %setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
97 %{!?with_jumbo:%patch1 -p1}
98 %{?with_jumbo:%patch2 -p1}
99 %{?with_jumbo:%patch3 -p1}
101 mv john-extra-*/*.chr run
116 #define JOHN_SYSTEMWIDE 1
117 #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
121 %{__make} linux-x86-any \
123 OPTFLAGS="%{rpmcflags} -include defs.h"
124 mv ../run/john ../run/john-non-mmx
129 %{__make} linux-x86-mmx \
131 OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
132 mv ../run/john ../run/john-non-sse
138 TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
141 %if %{with xop} || %{with avx}
142 TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
156 TARG=linux-ppc32%{?with_altivec:-altivec}
159 TARG=linux-ppc64%{?with_altivec:-altivec}
167 %ifarch sparc sparcv9
173 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
179 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
180 install -p run/john $RPM_BUILD_ROOT%{_bindir}
184 install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
187 install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
191 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
192 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
193 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
196 rm -rf $RPM_BUILD_ROOT
199 %defattr(644,root,root,755)
200 %doc doc/* run/mailer
201 %attr(755,root,root) %{_bindir}/john
202 %attr(755,root,root) %{_bindir}/unafs
203 %attr(755,root,root) %{_bindir}/unique
204 %attr(755,root,root) %{_bindir}/unshadow
206 %if %{do_mmxfb} || %{do_ssefb}
209 %attr(755,root,root) %{_libdir}/john/john-non-mmx
212 %attr(755,root,root) %{_libdir}/john/john-non-sse