john/john.spec

225 lines
7.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package john (Version 1.7.3.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: john
Url: http://www.openwall.com/john/
License: GPL v2 or later
Group: Productivity/Security
AutoReqProv: on
Version: 1.7.3.1
Release: 1
Summary: Detects Weak Passwords
Source: %{name}-%{version}.tar.bz2
Source2: %{name}.8.gz
Source3: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define johndir /var/lib/john
%define cflags CFLAGS="-c $RPM_OPT_FLAGS -DJOHN_SYSTEMWIDE=1 -finline-limit=2000 --param inline-unit-growth=2000" LDFLAGS=""
%ifarch x86_64
%define cflags CFLAGS="-c $RPM_OPT_FLAGS -DJOHN_SYSTEMWIDE=1" LDFLAGS=""
%endif
%description
John the Ripper is a fast password cracker (password security auditing
tool). Its primary purpose is to detect weak Unix passwords, but a
number of other hash types are supported as well.
Authors:
--------
Solar Designer <solar@false.com>
%prep
%setup -q -n %{name}-%{version}
# adapt the configs
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
TARGET=linux-alpha
%endif
%ifarch ia64
TARGET=linux-ia64
%endif
%ifarch %ix86
TARGET=linux-x86-mmx
%endif
%ifarch ppc
TARGET=linux-ppc32
%endif
%ifarch ppc64
TARGET=linux-ppc64
%endif
%ifarch sparc
TARGET=linux-sparc
%endif
%ifarch sparc64
TARGET=solaris-sparc64-gcc
%endif
%ifarch x86_64
TARGET=linux-x86-64
%endif
if test -z "$TARGET"; then
TARGET=linux-x86-any
fi
export TARGET
pushd src
make $TARGET %{cflags}
popd
%install
mkdir -p %buildroot{%_bindir,%johndir,%_sysconfdir,%_mandir/man8}
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/
%clean
#rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc doc/*
%doc %{_mandir}/man8/john.8.gz
%_bindir/un*
%dir %{johndir}
%attr(750,root,wheel) %_bindir/john
%_bindir/mailer
%attr(644,root,root) %johndir/password.lst
%attr(644,root,root) %johndir/*.chr
%config (noreplace) %_sysconfdir/john.conf
%changelog
* Tue Sep 09 2008 lrupp@suse.de
- update to 1.7.3.1:
+ Two Blowfish-based crypt(3) hashes may now be computed in
parallel for much better performance on modern multi-issue CPUs
with a sufficient number of registers (e.g., x86_64).
+ New make targets: macosx-universal, macosx-x86-64, solaris-x86-64-cc,
solaris-x86-64-gcc, solaris-x86-sse2-cc, solaris-x86-sse2-gcc,
solaris-x86-mmx-cc, solaris-x86-mmx-gcc, solaris-x86-any-cc,
linux-ia64;
+ Minor bug fixes.
+ "DumbForce" and "KnownForce" external mode samples have been
added to the default john.conf.
- removed the outdated patchset (needs to be re-integrated)
* Mon Sep 25 2006 lrupp@suse.de
- remove double cflags definition
* Fri Jun 09 2006 lrupp@suse.de
- new version 1.7.2
- moved john.conf to /etc
- moved john binary to /usr/bin
- enabled some opt flags (must be tested)
* Wed May 17 2006 schwab@suse.de
- Use RPM_OPT_FLAGS.
- Don't strip binaries.
- Fix last change.
* Mon Mar 27 2006 lrupp@suse.de
- use CFLAGS instead of params.h.patch
* Fri Mar 24 2006 lrupp@suse.de
- charset.tar.bz2 is included upstream
- reduce build requires
- new version 1.7.0.2
* Tue Mar 14 2006 lrupp@suse.de
- new version 1.7.0.1
- adapt patches to new version
- disabled some compiler fixes
- removed RPM_OPT_FLAGS => performance issue atm
* Mon Mar 13 2006 lrupp@suse.de
- split off worlists to an extra package
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Jan 15 2006 schwab@suse.de
- Don't strip binaries.
- Fix ia64 configuration.
* Mon Dec 19 2005 aosthof@suse.de
- Fixed .spec file for all architectures besides x86
- Added targets for ia64 / s390 / s390x
* Fri Nov 11 2005 kukuk@suse.de
- Fix compiling with glibc 2.4 snapshot
* Wed Sep 14 2005 lrupp@suse.de
- new version 1.6.39
- use noreplace for config
* Wed Jun 15 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Mon Jun 06 2005 ro@suse.de
- added directory to filelist
* Fri Jun 03 2005 lrupp@suse.de
- changed manpage
- added patches from ftp.openwall.com again:
+ blowfish (Eggdrop blowfish)
+ md5 (work with md5 hash of apache; faster)
+ rawMD5
+ MySQL (about 75%% faster than mysqlpassword.c)
- enabled global mode in params.g again
* Mon May 30 2005 lrupp@suse.de
- added "all" wordlist from openwall
- enabled arch-support for sparc and ppc
- added old doc-files from 1.6
* Wed May 25 2005 lrupp@suse.de
- new package, version 1.6.38
* Tue Jan 25 2005 lrupp@suse.de
- added some wordlists to get more options ;-)
- added patches from ftp.openwall.com to provide support for
additiional password formats:
+ blowfish
+ md5
+ rawMD5
* Mon Aug 02 2004 lrupp@suse.de
- - fixed BugTraq-ID: 43287
- enabled global-mode in params.h
- fix misspelling in manpage
* Fri Feb 27 2004 lrupp@suse.de
- use devel version: no segfault on x86-64
- included documentation and charsets from old version
- renamed new john.conf in john.ini
- created a short manpage for john
- created symlink /var/lib/john/john
* Mon Nov 10 2003 ro@suse.de
- use defattr
* Fri Nov 07 2003 lrupp@suse.de
- added '# norootforbuild' in the spec-file
* Thu Jun 12 2003 poeml@suse.de
- add /var/lib/john to the filelist
* Fri May 23 2003 coolo@suse.de
- use BuildRoot
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Fri Jul 05 2002 kukuk@suse.de
- use %%ix86
* Thu Mar 29 2001 uli@suse.de
- fixed for gcc >2.95
- replaced config.guess stuff with %%ifarch
* Wed Mar 01 2000 werner@suse.de
- Fix config.guess selection
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Thu Mar 18 1999 uli@suse.de
- new package, version 1.6