2007-01-15 23:19:04 +00:00
|
|
|
#
|
2010-09-09 16:54:17 +00:00
|
|
|
# spec file for package john (Version 1.7.6)
|
2007-01-15 23:19:04 +00:00
|
|
|
#
|
2010-02-11 20:10:18 +00:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:19:04 +00:00
|
|
|
#
|
2008-09-13 01:56:16 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-15 23:19:04 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-09-13 01:56:16 +00:00
|
|
|
|
2007-01-15 23:19:04 +00:00
|
|
|
Name: john
|
2008-09-13 01:56:16 +00:00
|
|
|
Url: http://www.openwall.com/john/
|
2009-12-02 12:10:44 +00:00
|
|
|
License: GPLv2+
|
2007-01-15 23:19:04 +00:00
|
|
|
Group: Productivity/Security
|
2011-07-08 07:23:53 +00:00
|
|
|
Version: 1.7.8
|
2010-02-18 14:12:53 +00:00
|
|
|
Release: 1
|
2007-01-15 23:19:04 +00:00
|
|
|
Summary: Detects Weak Passwords
|
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
Source2: %{name}.8.gz
|
2008-09-13 01:56:16 +00:00
|
|
|
Source3: %{name}-rpmlintrc
|
2011-07-08 09:01:27 +00:00
|
|
|
Source4: %{name}-%{version}-jumbo-2.tar.bz2
|
2010-11-01 18:40:18 +00:00
|
|
|
BuildRequires: openssl-devel
|
2007-01-15 23:19:04 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-09-13 01:56:16 +00:00
|
|
|
%define johndir /var/lib/john
|
2010-11-10 14:57:06 +00:00
|
|
|
%define cflags CFLAGS="-c $RPM_OPT_FLAGS -DJOHN_SYSTEMWIDE=1 -finline-limit=2000 --param inline-unit-growth=2000" LDFLAGS="-lcrypto"
|
2007-01-15 23:19:04 +00:00
|
|
|
%ifarch x86_64
|
2010-11-10 14:57:06 +00:00
|
|
|
%define cflags CFLAGS="-c $RPM_OPT_FLAGS -DJOHN_SYSTEMWIDE=1" LDFLAGS="-lcrypto"
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
John the Ripper is a fast password cracker (password security auditing
|
2008-09-13 01:56:16 +00:00
|
|
|
tool). Its primary purpose is to detect weak Unix passwords, but a
|
2007-01-15 23:19:04 +00:00
|
|
|
number of other hash types are supported as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Solar Designer <solar@false.com>
|
|
|
|
|
|
|
|
%prep
|
2010-02-11 20:10:18 +00:00
|
|
|
%setup -q -n %{name}-%{version}
|
2010-11-01 17:24:53 +00:00
|
|
|
# apply the jumbo patch
|
|
|
|
gzip -dc %{SOURCE4} | patch -p1
|
2008-09-13 01:56:16 +00:00
|
|
|
# adapt the configs
|
2007-01-15 23:19:04 +00:00
|
|
|
perl -pi -e "s#Wordlist = (.*)#Wordlist = %{johndir}/password.lst#g" $RPM_BUILD_DIR/%{name}-%{version}/run/john.conf
|
|
|
|
perl -pi -e 's#^(\#define JOHN_SYSTEMWIDE_EXEC)\s.+$#$1\t\"%{johndir}\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h
|
|
|
|
perl -pi -e 's#^(\#define CFG_FULL_NAME)\s.+$#$1\t\"%_sysconfdir/john.conf\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h
|
|
|
|
perl -pi -e 's#^(\#define CFG_ALT_NAME)\s.+$#$1\t\"%_sysconfdir/john.conf\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h
|
|
|
|
perl -pi -e 's#^(\#define WORDLIST_NAME)\s.+$#$1\t\"%{johndir}/password.lst\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h
|
|
|
|
perl -pi -e 's#^(\#define LOG_NAME)\s.+$#$1\t\"/var/log/john.log\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h
|
|
|
|
perl -pi -e 's#^(\#define JOHN_SYSTEMWIDE_HOME)\s.+$#$1\t\"%{johndir}\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h
|
|
|
|
|
|
|
|
%build
|
|
|
|
%ifarch alpha
|
2010-02-11 20:10:18 +00:00
|
|
|
TARGET=linux-alpha
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
2008-09-13 01:56:16 +00:00
|
|
|
%ifarch ia64
|
|
|
|
TARGET=linux-ia64
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
2008-09-13 01:56:16 +00:00
|
|
|
%ifarch %ix86
|
2010-02-11 20:10:18 +00:00
|
|
|
%ifnarch i386 i486
|
2008-09-13 01:56:16 +00:00
|
|
|
TARGET=linux-x86-mmx
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
2010-02-11 20:10:18 +00:00
|
|
|
%endif
|
2007-01-15 23:19:04 +00:00
|
|
|
%ifarch ppc
|
2008-09-13 01:56:16 +00:00
|
|
|
TARGET=linux-ppc32
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
|
|
|
%ifarch ppc64
|
2008-09-13 01:56:16 +00:00
|
|
|
TARGET=linux-ppc64
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
2010-02-11 20:10:18 +00:00
|
|
|
%ifarch sparc sparcv9
|
2008-09-13 01:56:16 +00:00
|
|
|
TARGET=linux-sparc
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
2008-09-13 01:56:16 +00:00
|
|
|
%ifarch sparc64
|
|
|
|
TARGET=solaris-sparc64-gcc
|
|
|
|
%endif
|
|
|
|
%ifarch x86_64
|
|
|
|
TARGET=linux-x86-64
|
2007-01-15 23:19:04 +00:00
|
|
|
%endif
|
2010-02-11 20:10:18 +00:00
|
|
|
%ifarch %ix86
|
2008-09-13 01:56:16 +00:00
|
|
|
if test -z "$TARGET"; then
|
|
|
|
TARGET=linux-x86-any
|
|
|
|
fi
|
2010-02-11 20:10:18 +00:00
|
|
|
%endif
|
2008-09-13 01:56:16 +00:00
|
|
|
export TARGET
|
|
|
|
pushd src
|
2011-03-15 05:43:44 +00:00
|
|
|
make clean $TARGET %{cflags} LDFLAGS='-lcrypto -lm'
|
2009-12-02 12:10:44 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
%check
|
|
|
|
pushd src
|
|
|
|
make check
|
2008-09-13 01:56:16 +00:00
|
|
|
popd
|
2007-01-15 23:19:04 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %buildroot{%_bindir,%johndir,%_sysconfdir,%_mandir/man8}
|
2008-09-13 01:56:16 +00:00
|
|
|
install -m 755 run/john %buildroot%_bindir/
|
|
|
|
cp -r run/un* %buildroot%_bindir/
|
|
|
|
install -m 644 -p run/{password.lst,*.chr} %buildroot%johndir/
|
|
|
|
install -m 644 -p run/john.conf %buildroot%_sysconfdir/
|
|
|
|
install -m 755 -p run/mailer %buildroot%_bindir/
|
|
|
|
install -m 644 -p %{SOURCE2} %buildroot%_mandir/man8/
|
2007-01-15 23:19:04 +00:00
|
|
|
|
|
|
|
%clean
|
2009-12-02 12:10:44 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2007-01-15 23:19:04 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc doc/*
|
|
|
|
%doc %{_mandir}/man8/john.8.gz
|
|
|
|
%_bindir/un*
|
|
|
|
%dir %{johndir}
|
|
|
|
%attr(750,root,wheel) %_bindir/john
|
2008-09-13 01:56:16 +00:00
|
|
|
%_bindir/mailer
|
2007-01-15 23:19:04 +00:00
|
|
|
%attr(644,root,root) %johndir/password.lst
|
|
|
|
%attr(644,root,root) %johndir/*.chr
|
|
|
|
%config (noreplace) %_sysconfdir/john.conf
|
|
|
|
|
2008-09-13 01:56:16 +00:00
|
|
|
%changelog
|