]>
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 | |
0d881e9e | 10 | %if %{without jumbo} |
532ea34a JB |
11 | %ifarch i586 i686 athlon pentium2 pentium3 pentium4 |
12 | %define do_mmx 1 | |
13 | %else | |
3dbf4b73 | 14 | %define do_mmx 0 |
532ea34a | 15 | %endif |
3dbf4b73 ER |
16 | %ifarch i686 athlon pentium4 |
17 | %define do_sse2 1 | |
20299915 | 18 | %else |
3dbf4b73 | 19 | %define do_sse2 0 |
20299915 | 20 | %endif |
532ea34a JB |
21 | %ifarch i586 i686 |
22 | %define do_mmxfb 1 | |
3dbf4b73 | 23 | %define optmmxfb -DCPU_FALLBACK=1 |
532ea34a JB |
24 | %else |
25 | %define do_mmxfb 0 | |
26 | %undefine optmmxfb | |
d940cdff | 27 | %endif |
20299915 | 28 | %ifarch i686 athlon |
3dbf4b73 ER |
29 | %define do_ssefb 1 |
30 | %define optssefb -DCPU_FALLBACK=1 | |
20299915 | 31 | %else |
3dbf4b73 ER |
32 | %define do_ssefb 0 |
33 | %define optssefb %{nil} | |
20299915 | 34 | %endif |
0d881e9e | 35 | %endif |
3dbf4b73 | 36 | |
00a4c442 | 37 | Summary: Password cracker |
25772a4c | 38 | Summary(pl.UTF-8): Łamacz haseł |
00a4c442 | 39 | Name: john |
3dbf4b73 | 40 | Version: 1.8.0 |
2489275f | 41 | Release: 1 |
20299915 | 42 | License: GPL v2 |
94f3ed69 | 43 | Group: Applications/System |
3dbf4b73 ER |
44 | Source0: http://www.openwall.com/john/j/%{name}-%{version}.tar.xz |
45 | # Source0-md5: a4086df68f51778782777e60407f1869 | |
2489275f JR |
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 | |
07bb9115 | 49 | # Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4 |
18fb1460 | 50 | Patch0: %{name}-mailer.patch |
3443e32b | 51 | Patch1: optflags.patch |
4b4e0bd3 JR |
52 | Patch2: jumbo-optflags.patch |
53 | Patch3: jumbo-x32.patch | |
ad326883 | 54 | URL: http://www.openwall.com/john/ |
2489275f | 55 | %{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7} |
4380352b | 56 | BuildRequires: rpmbuild(macros) >= 1.213 |
3dbf4b73 ER |
57 | BuildRequires: tar >= 1:1.22 |
58 | BuildRequires: xz | |
53d2a984 | 59 | Requires: words |
6ba1637d JB |
60 | %ifarch %{ix86} %{x8664} |
61 | %if %{with xop} | |
62 | Requires: cpuinfo(xop) | |
63 | %endif | |
64 | %if %{with xop} || %{with avx} | |
65 | Requires: cpuinfo(avx) | |
66 | %endif | |
057ac041 | 67 | %if %{without jumbo} |
6ba1637d JB |
68 | %if %{do_sse2} && !%{do_ssefb} |
69 | Requires: cpuinfo(sse2) | |
70 | %endif | |
71 | %endif | |
057ac041 | 72 | %endif |
fbb20392 | 73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
00a4c442 | 74 | |
75 | %description | |
8e3a118d JB |
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 | |
83 | contributed patches. | |
e73a58f8 | 84 | |
15ea9c6b JR |
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 | |
8e3a118d | 88 | architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga |
15ea9c6b JR |
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. | |
e73a58f8 | 93 | |
00a4c442 | 94 | %prep |
2489275f | 95 | %setup -q -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2 |
00a4c442 | 96 | %patch0 -p1 |
2489275f | 97 | %{!?with_jumbo:%patch1 -p1} |
4b4e0bd3 JR |
98 | %{?with_jumbo:%patch2 -p1} |
99 | %{?with_jumbo:%patch3 -p1} | |
18fb1460 | 100 | |
3dbf4b73 ER |
101 | mv john-extra-*/*.chr run |
102 | ||
20299915 | 103 | %{__rm} doc/INSTALL |
3443e32b | 104 | |
00a4c442 | 105 | %build |
106 | cd src | |
94f3ed69 | 107 | |
2489275f | 108 | %if %{with jumbo} |
4b4e0bd3 JR |
109 | %ifarch x32 |
110 | ax_intel_x32=yes \ | |
111 | %endif | |
2489275f JR |
112 | %configure |
113 | %{__make} | |
114 | %else | |
582fa295 ER |
115 | cat > defs.h <<'EOF' |
116 | #define JOHN_SYSTEMWIDE 1 | |
117 | #define JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john" | |
118 | EOF | |
119 | ||
532ea34a JB |
120 | %if %{do_mmxfb} |
121 | %{__make} linux-x86-any \ | |
3443e32b | 122 | CC="%{__cc}" \ |
582fa295 | 123 | OPTFLAGS="%{rpmcflags} -include defs.h" |
532ea34a JB |
124 | mv ../run/john ../run/john-non-mmx |
125 | %{__make} clean | |
126 | %endif | |
127 | ||
20299915 JB |
128 | %if %{do_ssefb} |
129 | %{__make} linux-x86-mmx \ | |
130 | CC="%{__cc}" \ | |
131 | OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}" | |
132 | mv ../run/john ../run/john-non-sse | |
5951e27b | 133 | %{__make} clean |
20299915 JB |
134 | %endif |
135 | ||
3443e32b | 136 | TARG=generic |
20299915 JB |
137 | %ifarch %{x8664} |
138 | TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
139 | %endif | |
140 | %ifarch %{ix86} | |
141 | %if %{with xop} || %{with avx} | |
142 | TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}} | |
94f3ed69 | 143 | %else |
20299915 JB |
144 | %if %{do_sse2} |
145 | TARG=linux-x86-sse2 | |
146 | %else | |
147 | %if %{do_mmx} | |
148 | TARG=linux-x86-mmx | |
149 | %else | |
150 | TARG=linux-x86-any | |
151 | %endif | |
152 | %endif | |
94f3ed69 | 153 | %endif |
3443e32b | 154 | %endif |
20299915 JB |
155 | %ifarch ppc |
156 | TARG=linux-ppc32%{?with_altivec:-altivec} | |
157 | %endif | |
158 | %ifarch ppc64 | |
159 | TARG=linux-ppc64%{?with_altivec:-altivec} | |
160 | %endif | |
3443e32b ER |
161 | %ifarch alpha |
162 | TARG=linux-alpha | |
163 | %endif | |
20299915 JB |
164 | %ifarch ia64 |
165 | TARG=linux-ia64 | |
166 | %endif | |
3443e32b ER |
167 | %ifarch sparc sparcv9 |
168 | TARG=linux-sparc | |
169 | %endif | |
94f3ed69 | 170 | |
c4418ed8 | 171 | %{__make} $TARG \ |
3443e32b | 172 | CC="%{__cc}" \ |
582fa295 | 173 | OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}' |
2489275f | 174 | %endif |
94f3ed69 | 175 | |
00a4c442 | 176 | %install |
177 | rm -rf $RPM_BUILD_ROOT | |
18fb1460 | 178 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john} |
3443e32b ER |
179 | cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john |
180 | install -p run/john $RPM_BUILD_ROOT%{_bindir} | |
0d881e9e | 181 | |
4b4e0bd3 | 182 | %if %{without jumbo} |
532ea34a | 183 | %if %{do_mmxfb} |
20299915 JB |
184 | install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx |
185 | %endif | |
186 | %if %{do_ssefb} | |
187 | install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse | |
532ea34a | 188 | %endif |
4b4e0bd3 | 189 | %endif |
d940cdff | 190 | |
3443e32b ER |
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 | |
00a4c442 | 194 | |
195 | %clean | |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | ||
198 | %files | |
199 | %defattr(644,root,root,755) | |
1f693868 | 200 | %doc doc/* run/mailer |
3443e32b ER |
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 | |
4b4e0bd3 | 205 | %if %{without jumbo} |
20299915 | 206 | %if %{do_mmxfb} || %{do_ssefb} |
532ea34a | 207 | %dir %{_libdir}/john |
20299915 | 208 | %if %{do_mmxfb} |
532ea34a JB |
209 | %attr(755,root,root) %{_libdir}/john/john-non-mmx |
210 | %endif | |
20299915 JB |
211 | %if %{do_ssefb} |
212 | %attr(755,root,root) %{_libdir}/john/john-non-sse | |
213 | %endif | |
d0c69092 | 214 | %endif |
4b4e0bd3 | 215 | %endif |
18fb1460 | 216 | %{_datadir}/john |