]>
Commit | Line | Data |
---|---|---|
94f3ed69 | 1 | # |
d502d3d5 | 2 | # Conditional build: |
2489275f | 3 | %bcond_without jumbo # Build community-enhanced version with lots of contributed |
20299915 JB |
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 | |
3dbf4b73 | 9 | |
532ea34a JB |
10 | %ifarch i586 i686 athlon pentium2 pentium3 pentium4 |
11 | %define do_mmx 1 | |
12 | %else | |
3dbf4b73 | 13 | %define do_mmx 0 |
532ea34a | 14 | %endif |
3dbf4b73 ER |
15 | %ifarch i686 athlon pentium4 |
16 | %define do_sse2 1 | |
20299915 | 17 | %else |
3dbf4b73 | 18 | %define do_sse2 0 |
20299915 | 19 | %endif |
532ea34a JB |
20 | %ifarch i586 i686 |
21 | %define do_mmxfb 1 | |
3dbf4b73 | 22 | %define optmmxfb -DCPU_FALLBACK=1 |
532ea34a JB |
23 | %else |
24 | %define do_mmxfb 0 | |
25 | %undefine optmmxfb | |
d940cdff | 26 | %endif |
20299915 | 27 | %ifarch i686 athlon |
3dbf4b73 ER |
28 | %define do_ssefb 1 |
29 | %define optssefb -DCPU_FALLBACK=1 | |
20299915 | 30 | %else |
3dbf4b73 ER |
31 | %define do_ssefb 0 |
32 | %define optssefb %{nil} | |
20299915 | 33 | %endif |
3dbf4b73 | 34 | |
00a4c442 | 35 | Summary: Password cracker |
25772a4c | 36 | Summary(pl.UTF-8): Łamacz haseł |
00a4c442 | 37 | Name: john |
3dbf4b73 | 38 | Version: 1.8.0 |
2489275f | 39 | Release: 1 |
20299915 | 40 | License: GPL v2 |
94f3ed69 | 41 | Group: Applications/System |
3dbf4b73 ER |
42 | Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz |
43 | # Source0-md5: a4086df68f51778782777e60407f1869 | |
2489275f JR |
44 | Source1: http://www.openwall.com/john/j/%{name}-%{version}-jumbo-1.tar.xz |
45 | # Source1-md5: 1d6b22ec41a12cdcd62ad6eae3e77345 | |
46 | Source2: http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz | |
07bb9115 | 47 | # Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4 |
18fb1460 | 48 | Patch0: %{name}-mailer.patch |
3443e32b | 49 | Patch1: optflags.patch |
ad326883 | 50 | URL: http://www.openwall.com/john/ |
2489275f | 51 | %{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7} |
4380352b | 52 | BuildRequires: rpmbuild(macros) >= 1.213 |
3dbf4b73 ER |
53 | BuildRequires: tar >= 1:1.22 |
54 | BuildRequires: xz | |
53d2a984 | 55 | Requires: words |
6ba1637d JB |
56 | %ifarch %{ix86} %{x8664} |
57 | %if %{with xop} | |
58 | Requires: cpuinfo(xop) | |
59 | %endif | |
60 | %if %{with xop} || %{with avx} | |
61 | Requires: cpuinfo(avx) | |
62 | %endif | |
63 | %if %{do_sse2} && !%{do_ssefb} | |
64 | Requires: cpuinfo(sse2) | |
65 | %endif | |
66 | %endif | |
fbb20392 | 67 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
00a4c442 | 68 | |
69 | %description | |
8e3a118d JB |
70 | John the Ripper is a fast password cracker, currently available for |
71 | many flavors of Unix (11 are officially supported, not counting | |
72 | different architectures), DOS, Win32, BeOS, and OpenVMS (the latter | |
73 | requires a contributed patch). Its primary purpose is to detect weak | |
74 | Unix passwords. Besides several crypt(3) password hash types most | |
75 | commonly found on various Unix flavors, supported out of the box are | |
76 | Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with | |
77 | contributed patches. | |
e73a58f8 | 78 | |
15ea9c6b JR |
79 | %description -l pl.UTF-8 |
80 | John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu | |
81 | rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych | |
8e3a118d | 82 | architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga |
15ea9c6b JR |
83 | łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych. |
84 | Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych | |
85 | na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz | |
86 | Windows NT/2000/XP LM, a także kilka innych przy użyciu łat. | |
e73a58f8 | 87 | |
00a4c442 | 88 | %prep |
2489275f | 89 | %setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2 |
00a4c442 | 90 | %patch0 -p1 |
2489275f | 91 | %{!?with_jumbo:%patch1 -p1} |
18fb1460 | 92 | |
3dbf4b73 ER |
93 | mv john-extra-*/*.chr run |
94 | ||
20299915 | 95 | %{__rm} doc/INSTALL |
3443e32b | 96 | |
00a4c442 | 97 | %build |
98 | cd src | |
94f3ed69 | 99 | |
2489275f JR |
100 | %if %{with jumbo} |
101 | %configure | |
102 | %{__make} | |
103 | %else | |
582fa295 ER |
104 | cat > defs.h <<'EOF' |
105 | #define JOHN_SYSTEMWIDE 1 | |
106 | #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john" | |
107 | EOF | |
108 | ||
532ea34a JB |
109 | %if %{do_mmxfb} |
110 | %{__make} linux-x86-any \ | |
3443e32b | 111 | CC="%{__cc}" \ |
582fa295 | 112 | OPTFLAGS="%{rpmcflags} -include defs.h" |
532ea34a JB |
113 | mv ../run/john ../run/john-non-mmx |
114 | %{__make} clean | |
115 | %endif | |
116 | ||
20299915 JB |
117 | %if %{do_ssefb} |
118 | %{__make} linux-x86-mmx \ | |
119 | CC="%{__cc}" \ | |
120 | OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}" | |
121 | mv ../run/john ../run/john-non-sse | |
5951e27b | 122 | %{__make} clean |
20299915 JB |
123 | %endif |
124 | ||
3443e32b | 125 | TARG=generic |
20299915 JB |
126 | %ifarch %{x8664} |
127 | TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
128 | %endif | |
129 | %ifarch %{ix86} | |
130 | %if %{with xop} || %{with avx} | |
131 | TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
94f3ed69 | 132 | %else |
20299915 JB |
133 | %if %{do_sse2} |
134 | TARG=linux-x86-sse2 | |
135 | %else | |
136 | %if %{do_mmx} | |
137 | TARG=linux-x86-mmx | |
138 | %else | |
139 | TARG=linux-x86-any | |
140 | %endif | |
141 | %endif | |
94f3ed69 | 142 | %endif |
3443e32b | 143 | %endif |
20299915 JB |
144 | %ifarch ppc |
145 | TARG=linux-ppc32%{?with_altivec:-altivec} | |
146 | %endif | |
147 | %ifarch ppc64 | |
148 | TARG=linux-ppc64%{?with_altivec:-altivec} | |
149 | %endif | |
3443e32b ER |
150 | %ifarch alpha |
151 | TARG=linux-alpha | |
152 | %endif | |
20299915 JB |
153 | %ifarch ia64 |
154 | TARG=linux-ia64 | |
155 | %endif | |
3443e32b ER |
156 | %ifarch sparc sparcv9 |
157 | TARG=linux-sparc | |
158 | %endif | |
94f3ed69 | 159 | |
c4418ed8 | 160 | %{__make} $TARG \ |
3443e32b | 161 | CC="%{__cc}" \ |
582fa295 | 162 | OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}' |
2489275f | 163 | %endif |
94f3ed69 | 164 | |
00a4c442 | 165 | %install |
166 | rm -rf $RPM_BUILD_ROOT | |
18fb1460 | 167 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john} |
3443e32b ER |
168 | cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john |
169 | install -p run/john $RPM_BUILD_ROOT%{_bindir} | |
532ea34a | 170 | %if %{do_mmxfb} |
20299915 JB |
171 | install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx |
172 | %endif | |
173 | %if %{do_ssefb} | |
174 | install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse | |
532ea34a | 175 | %endif |
d940cdff | 176 | |
3443e32b ER |
177 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs |
178 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique | |
179 | ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow | |
00a4c442 | 180 | |
181 | %clean | |
182 | rm -rf $RPM_BUILD_ROOT | |
183 | ||
184 | %files | |
185 | %defattr(644,root,root,755) | |
1f693868 | 186 | %doc doc/* run/mailer |
3443e32b ER |
187 | %attr(755,root,root) %{_bindir}/john |
188 | %attr(755,root,root) %{_bindir}/unafs | |
189 | %attr(755,root,root) %{_bindir}/unique | |
190 | %attr(755,root,root) %{_bindir}/unshadow | |
20299915 | 191 | %if %{do_mmxfb} || %{do_ssefb} |
532ea34a | 192 | %dir %{_libdir}/john |
20299915 | 193 | %if %{do_mmxfb} |
532ea34a JB |
194 | %attr(755,root,root) %{_libdir}/john/john-non-mmx |
195 | %endif | |
20299915 JB |
196 | %if %{do_ssefb} |
197 | %attr(755,root,root) %{_libdir}/john/john-non-sse | |
198 | %endif | |
d0c69092 | 199 | %endif |
18fb1460 | 200 | %{_datadir}/john |