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