]> git.pld-linux.org Git - packages/john.git/blobdiff - john.spec
- updated to latest snap, rel 2
[packages/john.git] / john.spec
index bf1b368ce1425d51e8a5c38d2984ef0cdc2c1ed4..5073e62ccd4cb2b6969784fcfd3423f65a6d81b7 100644 (file)
--- a/john.spec
+++ b/john.spec
@@ -1,71 +1,43 @@
 #
+# TODO:
+# - investigate build-time vs runtime CPU features detection
+#
 # Conditional build:
-%bcond_without jumbo           # Build community-enhanced version with lots of contributed
-                               # patches adding support for over 30
-                               # of additional hash types, and more.
-%bcond_with    avx             # use x86 AVX instructions
-%bcond_with    xop             # use x86 XOP instructions
-%bcond_with    altivec         # use PPC Altivec instructions
+%bcond_without opencl          # OpenCL support
+%bcond_without openmp          # OpenMP support
 
-%if %{without jumbo}
-%ifarch i586 i686 athlon pentium2 pentium3 pentium4
-%define do_mmx 1
-%else
-%define do_mmx 0
-%endif
-%ifarch i686 athlon pentium4
-%define do_sse2 1
-%else
-%define do_sse2 0
-%endif
-%ifarch i586 i686
-%define do_mmxfb 1
-%define optmmxfb -DCPU_FALLBACK=1
-%else
-%define do_mmxfb 0
-%undefine optmmxfb
-%endif
-%ifarch i686 athlon
-%define do_ssefb 1
-%define optssefb -DCPU_FALLBACK=1
-%else
-%define do_ssefb 0
-%define optssefb %{nil}
-%endif
-%endif
+%define                snap            20211017
+%define                githash         9298dec7259141f15729fa289411c5033a2fe3aa
+%define                rel             2
 
 Summary:       Password cracker
 Summary(pl.UTF-8):     Łamacz haseł
 Name:          john
-Version:       1.8.0
-Release:       1
+Version:       1.9.0
+Release:       1.%{snap}.%{rel}
 License:       GPL v2
 Group:         Applications/System
-Source0:       http://www.openwall.com/john/j/%{name}-%{version}.tar.xz
-# Source0-md5: a4086df68f51778782777e60407f1869
-Source1:       http://www.openwall.com/john/j/%{name}-%{version}-jumbo-1.tar.xz
-# Source1-md5: 1d6b22ec41a12cdcd62ad6eae3e77345
-Source2:       http://www.openwall.com/john/j/%{name}-extra-20130529.tar.xz
-# Source2-md5: bb191828e8cbfd5fe0779dff5d87d5f4
+Source0:       https://github.com/magnumripper/JohnTheRipper/archive/%{githash}/%{name}-%{snap}.tar.gz
+# Source0-md5: 50e53c990a5083d0ccb4d1175c1a7d3d
 Patch0:                %{name}-mailer.patch
-Patch1:                optflags.patch
+Patch1:                jumbo-optflags.patch
+Patch2:                %{name}-x32.patch
 URL:           http://www.openwall.com/john/
-%{?with_jumbo:BuildRequires: openssl-devel >= 0.9.7}
+%{?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: tar >= 1:1.22
-BuildRequires: xz
+# 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
-%ifarch %{ix86} %{x8664}
-%if %{with xop}
-Requires:      cpuinfo(xop)
-%endif
-%if %{with xop} || %{with avx}
-Requires:      cpuinfo(avx)
-%endif
-%if %{do_sse2} && !%{do_ssefb}
-Requires:      cpuinfo(sse2)
-%endif
-%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -88,81 +60,25 @@ 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 -T %{?with_jumbo:-b1 -n %{name}-%{version}-jumbo-1} %{!?with_jumbo:-b0} -a2
+%setup -q -n john-%{githash}
 %patch0 -p1
-%{!?with_jumbo:%patch1 -p1}
-
-mv john-extra-*/*.chr run
-
-%{__rm} doc/INSTALL
+%patch1 -p1
+%ifarch x32
+%patch2 -p1
+%endif
 
 %build
 cd src
+%{__autoconf}
 
-%if %{with jumbo}
-%configure
-%{__make}
-%else
-cat > defs.h <<'EOF'
-#define        JOHN_SYSTEMWIDE 1
-#define        JOHN_SYSTEMWIDE_EXEC "%{_libdir}/john"
-EOF
-
-%if %{do_mmxfb}
-%{__make} linux-x86-any \
-       CC="%{__cc}" \
-       OPTFLAGS="%{rpmcflags} -include defs.h"
-mv ../run/john ../run/john-non-mmx
-%{__make} clean
-%endif
-
-%if %{do_ssefb}
-%{__make} linux-x86-mmx \
-       CC="%{__cc}" \
-       OPTFLAGS="%{rpmcflags} -include defs.h %{?optmmxfb}"
-mv ../run/john ../run/john-non-sse
-%{__make} clean
+%ifarch x32
+ax_intel_x32=yes \
 %endif
+%configure \
+       %{!?with_opencl:--disable-opencl} \
+       %{!?with_openmp:--disable-openmp}
 
-TARG=generic
-%ifarch %{x8664}
-       TARG=linux-x86-64%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
-%endif
-%ifarch        %{ix86}
-       %if %{with xop} || %{with avx}
-               TARG=linux-x86%{?with_xop:-xop}%{!?with_xop:%{?with_avx:-avx}}
-       %else
-               %if %{do_sse2}
-                       TARG=linux-x86-sse2
-               %else
-                       %if %{do_mmx}
-                               TARG=linux-x86-mmx
-                       %else
-                               TARG=linux-x86-any
-                       %endif
-               %endif
-       %endif
-%endif
-%ifarch ppc
-       TARG=linux-ppc32%{?with_altivec:-altivec}
-%endif
-%ifarch ppc64
-       TARG=linux-ppc64%{?with_altivec:-altivec}
-%endif
-%ifarch alpha
-       TARG=linux-alpha
-%endif
-%ifarch ia64
-       TARG=linux-ia64
-%endif
-%ifarch sparc sparcv9
-       TARG=linux-sparc
-%endif
-
-%{__make} $TARG \
-       CC="%{__cc}" \
-       OPTFLAGS='%{rpmcflags} -include defs.h %{?optmmxfb}'
-%endif
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -170,13 +86,6 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
 cp -a run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
 install -p run/john $RPM_BUILD_ROOT%{_bindir}
 
-%if %{do_mmxfb}
-install -D -p run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john/john-non-mmx
-%endif
-%if %{do_ssefb}
-install -D -p run/john-non-sse $RPM_BUILD_ROOT%{_libdir}/john/john-non-sse
-%endif
-
 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unafs
 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unique
 ln -sf john $RPM_BUILD_ROOT%{_bindir}/unshadow
@@ -191,13 +100,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/unafs
 %attr(755,root,root) %{_bindir}/unique
 %attr(755,root,root) %{_bindir}/unshadow
-%if %{do_mmxfb} || %{do_ssefb}
-%dir %{_libdir}/john
-%if %{do_mmxfb}
-%attr(755,root,root) %{_libdir}/john/john-non-mmx
-%endif
-%if %{do_ssefb}
-%attr(755,root,root) %{_libdir}/john/john-non-sse
-%endif
-%endif
 %{_datadir}/john
This page took 0.107967 seconds and 4 git commands to generate.