3 %bcond_without jumbopatch # This patch integrates 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
10 %ifarch i586 i686 athlon pentium2 pentium3 pentium4
15 %ifarch i686 athlon pentium4
22 %define optmmxfb -DCPU_FALLBACK=1
29 %define optssefb -DCPU_FALLBACK=1
34 Summary: Password cracker
35 Summary(pl.UTF-8): Łamacz haseł
40 Group: Applications/System
41 Source0: http://www.openwall.com/john/g/%{name}-%{version}.tar.bz2
42 # Source0-md5: 45f54fc59386ecd67daaef9f19781d93
43 Patch0: %{name}-mailer.patch
44 Patch1: optflags.patch
45 Patch2: http://www.openwall.com/john/g/%{name}-1.7.9-jumbo-7.diff.gz
46 # Patch2-md5: b953fcb7f743eeeb5f938a28c352b8ef
47 Patch3: %{name}-jumbo-optflags.patch
48 URL: http://www.openwall.com/john/
49 %{?with_jumbopatch:BuildRequires: openssl-devel >= 0.9.7}
50 BuildRequires: rpmbuild(macros) >= 1.213
52 %ifarch %{ix86} %{x8664}
54 Requires: cpuinfo(xop)
56 %if %{with xop} || %{with avx}
57 Requires: cpuinfo(avx)
59 %if %{do_sse2} && !%{do_ssefb}
60 Requires: cpuinfo(sse2)
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 John the Ripper is a fast password cracker, currently available for
67 many flavors of Unix (11 are officially supported, not counting
68 different architectures), DOS, Win32, BeOS, and OpenVMS (the latter
69 requires a contributed patch). Its primary purpose is to detect weak
70 Unix passwords. Besides several crypt(3) password hash types most
71 commonly found on various Unix flavors, supported out of the box are
72 Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with
75 %description -l pl.UTF-8
76 John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu
77 rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych
78 architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga
79 łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych.
80 Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych
81 na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz
82 Windows NT/2000/XP LM, a także kilka innych przy użyciu łat.
87 %{!?with_jumbopatch:%patch1 -p1}
88 %{?with_jumbopatch:%patch2 -p1}
89 %{?with_jumbopatch:%patch3 -p1}
97 #define JOHN_SYSTEMWIDE 1
98 #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
102 %{__make} linux-x86-any \
104 OPTFLAGS="%{rpmcflags} -include defs.h"
105 mv ../run/john ../run/john-non-mmx
110 %{__make} linux-x86-mmx \
112 OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
113 mv ../run/john ../run/john-non-sse
119 TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
122 %if %{with xop} || %{with avx}
123 TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
137 TARG=linux-ppc32%{?with_altivec:-altivec}
140 TARG=linux-ppc64%{?with_altivec:-altivec}
148 %ifarch sparc sparcv9
154 OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
159 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
160 install -p run/john $RPM_BUILD_ROOT%{_bindir}
162 install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
165 install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
168 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
169 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
170 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
173 rm -rf $RPM_BUILD_ROOT
176 %defattr(644,root,root,755)
177 %doc doc/* run/mailer
178 %attr(755,root,root) %{_bindir}/john
179 %attr(755,root,root) %{_bindir}/unafs
180 %attr(755,root,root) %{_bindir}/unique
181 %attr(755,root,root) %{_bindir}/unshadow
182 %if %{do_mmxfb} || %{do_ssefb}
185 %attr(755,root,root) %{_libdir}/john/john-non-mmx
188 %attr(755,root,root) %{_libdir}/john/john-non-sse