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