X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=john.spec;h=5073e62ccd4cb2b6969784fcfd3423f65a6d81b7;hb=15da8312f829ce56b1f77d38f1b01e7fdb814d31;hp=c4101f01488a37d1a1bc19e3ee8a0bb7d5156bbe;hpb=cd6757095ce26f5280b220b532bca0cde95600cd;p=packages%2Fjohn.git diff --git a/john.spec b/john.spec index c4101f0..5073e62 100644 --- a/john.spec +++ b/john.spec @@ -1,91 +1,94 @@ # -# Conditional build: -%bcond_with mmx # MMX optimization -# Optimization must be chosen at compile time :( -# Maybe some patch...? But not yet. +# TODO: +# - investigate build-time vs runtime CPU features detection # -%ifarch athlon -%define with_mmx 1 -%endif +# Conditional build: +%bcond_without opencl # OpenCL support +%bcond_without openmp # OpenMP support + +%define snap 20211017 +%define githash 9298dec7259141f15729fa289411c5033a2fe3aa +%define rel 2 + Summary: Password cracker -Summary(pl): £amacz hase³ +Summary(pl.UTF-8): Łamacz haseł Name: john -Version: 1.7 -Release: 0.2 -License: GPL +Version: 1.9.0 +Release: 1.%{snap}.%{rel} +License: GPL v2 Group: Applications/System -Source0: http://www.openwall.com/john/d/%{name}-%{version}.tar.bz2 -# Source0-md5: 615b912caa677eec790e28745a12b2ae +Source0: https://github.com/magnumripper/JohnTheRipper/archive/%{githash}/%{name}-%{snap}.tar.gz +# Source0-md5: 50e53c990a5083d0ccb4d1175c1a7d3d Patch0: %{name}-mailer.patch +Patch1: jumbo-optflags.patch +Patch2: %{name}-x32.patch URL: http://www.openwall.com/john/ +%{?with_opencl:BuildRequires: OpenCL-devel} +BuildRequires: autoconf >= 2.69 +BuildRequires: bzip2-devel +%{?with_openmp:BuildRequires: gcc >= 6:4.2} +BuildRequires: gmp-devel +%{?with_openmp:BuildRequires: libgomp-devel} BuildRequires: rpmbuild(macros) >= 1.213 -BuildRequires: sed >= 4.0 +BuildRequires: tar >= 1:1.22 +# for SIPdump and vncpcap2john binaries, which are not packaged +#BuildRequires: libpcap-devel +BuildRequires: openssl-devel >= 0.9.7 +BuildRequires: pkgconfig +BuildRequires: yasm +BuildRequires: zlib-devel Requires: words BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -John the Ripper is a password cracker, currently available for UNIX, -DOS, WinNT/Win95. Its primary purpose is to detect weak UNIX -passwords. It has been tested with Linux x86/Alpha/SPARC, FreeBSD x86, -OpenBSD x86, Solaris 2.x SPARC and x86, Digital UNIX, AIX, HP-UX, and -IRIX. +John the Ripper is a fast password cracker, currently available for +many flavors of Unix (11 are officially supported, not counting +different architectures), DOS, Win32, BeOS, and OpenVMS (the latter +requires a contributed patch). Its primary purpose is to detect weak +Unix passwords. Besides several crypt(3) password hash types most +commonly found on various Unix flavors, supported out of the box are +Kerberos/AFS and Windows NT/2000/XP LM hashes, plus several more with +contributed patches. -%description -l pl -John The Ripper jest "³amaczem" hase³ dostêpnym dla systemów UNIX, -DOS, WinNT/Win95. G³ównym jego zadaniem jest wykrywanie "s³abych" -hase³. By³ testowany z Linux x86/Alpha/SPARC, FreeBSD x86, OpenBSD x86, -Solaris 2.x SPARC i x86, Digital UNIX, AIX, HP-UX oraz IRIX. +%description -l pl.UTF-8 +John The Ripper jest szybkim "łamaczem" haseł dostępnym dla wielu +rodzajów uniksów (oficjalnie obsługiwanych jest 11, nie licząc różnych +architektur), DOS-a, Win32, BeOS-a i OpenVMS-a (ten ostatni wymaga +łaty). Głównym zastosowaniem jest wykrywanie słabych haseł uniksowych. +Oprócz różnych rodzajów skrótów haseł crypt(3) najczęściej używanych +na różnych uniksach, obsługiwane są także skróty Kerberos/AFS oraz +Windows NT/2000/XP LM, a także kilka innych przy użyciu łat. %prep -%setup -q +%setup -q -n john-%{githash} %patch0 -p1 - -sed -i -e 's/CLK_TCK/CLOCKS_PER_SEC/g' src/*.c +%patch1 -p1 +%ifarch x32 +%patch2 -p1 +%endif %build cd src +%{__autoconf} -# bleh... MMX code must be chosen at compile time :( -# cannot use MMX for generic i586 nor i686 (Pentium/Pentium Pro have no MMX) -%ifarch %{ix86} - %if %{with mmx} - TARG=linux-x86-mmx - %else - TARG=linux-x86-any - %endif -%else - %ifarch alpha - TARG=linux-alpha - %else - %ifarch sparc sparcv9 - TARG=linux-sparc - %else - %ifarch %{x8664} - TARG=linux-x86-64 - %else - TARG=generic - %endif - %endif - %endif +%ifarch x32 +ax_intel_x32=yes \ %endif +%configure \ + %{!?with_opencl:--disable-opencl} \ + %{!?with_openmp:--disable-openmp} -%{__make} $TARG \ - CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1" \ - CC="%{__cc}" +%{__make} %install rm -rf $RPM_BUILD_ROOT - install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john} -install run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john -install run/john $RPM_BUILD_ROOT%{_bindir} - -rm -f doc/INSTALL +cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john +install -p run/john $RPM_BUILD_ROOT%{_bindir} -cd $RPM_BUILD_ROOT%{_bindir} -ln -sf john unafs -ln -sf john unique -ln -sf john unshadow +ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs +ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique +ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow %clean rm -rf $RPM_BUILD_ROOT @@ -93,5 +96,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc doc/* run/mailer -%attr(755,root,root) %{_bindir}/* +%attr(755,root,root) %{_bindir}/john +%attr(755,root,root) %{_bindir}/unafs +%attr(755,root,root) %{_bindir}/unique +%attr(755,root,root) %{_bindir}/unshadow %{_datadir}/john