238 lines
7.2 KiB
RPMSpec
238 lines
7.2 KiB
RPMSpec
#
|
|
# spec file for package john (Version 1.7.2)
|
|
#
|
|
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# This file and all modifications and additions to the pristine
|
|
# package are under the same license as the package itself.
|
|
#
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
Name: john
|
|
URL: http://www.openwall.com/john/
|
|
License: GPL, Contact author
|
|
Group: Productivity/Security
|
|
Autoreqprov: on
|
|
Version: 1.7.2
|
|
Release: 7
|
|
Summary: Detects Weak Passwords
|
|
Source: %{name}-%{version}.tar.bz2
|
|
Source2: %{name}.8.gz
|
|
Patch: %{name}-BFEgg_fmt.c.diff
|
|
Patch1: %{name}-MD5_apache_fmt.c.diff
|
|
Patch2: %{name}-MD5_fmt.c.diff
|
|
Patch3: %{name}-MD5_std.c.diff
|
|
Patch4: %{name}-MD5_std.h.diff
|
|
Patch5: %{name}-MYSQL_fmt.c.diff
|
|
Patch6: %{name}-Makefile-withoutMYSQL.diff
|
|
Patch7: %{name}-Makefile.diff
|
|
Patch8: %{name}-bf_tab.h.diff
|
|
Patch9: %{name}-blowfish.c.diff
|
|
Patch10: %{name}-blowfish.h.diff
|
|
Patch11: %{name}-john.c-withoutMYSQL.diff
|
|
Patch12: %{name}-john.c.diff
|
|
Patch13: %{name}-john.conf.patch
|
|
Patch14: %{name}-md5.c.diff
|
|
Patch15: %{name}-md5.h.diff
|
|
Patch16: %{name}-options.c-withoutMYSQL.diff
|
|
Patch17: %{name}-options.c.diff
|
|
Patch19: %{name}-rawMD5_fmt.c.diff
|
|
Patch20: %{name}-undrop.c.diff
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%define cflags CFLAGS="-c -Wall $RPM_OPT_FLAGS -DJOHN_SYSTEMWIDE=1 -finline-limit=2000 --param inline-unit-growth=2000" LDFLAGS=
|
|
%define johndir /var/lib/john
|
|
%ifarch x86_64
|
|
%define cflags CFLAGS="-c -Wall $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 -n %{name}-%{version}
|
|
%patch -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%ifarch i386
|
|
%patch5 -p1
|
|
%patch7 -p1
|
|
%patch12 -p1
|
|
%patch17 -p1
|
|
%else
|
|
%patch6
|
|
%patch11
|
|
%patch16
|
|
%endif
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
%patch13 -p1
|
|
%patch14 -p1
|
|
%patch15 -p1
|
|
%patch19 -p1
|
|
%patch20 -p1
|
|
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
|
|
cd src
|
|
%ifarch alpha
|
|
make %{cflags} clean linux-alpha
|
|
%endif
|
|
%ifarch sparc
|
|
make %{cflags} clean linux-sparc
|
|
%endif
|
|
%ifarch sparc64
|
|
make %{cflags} clean solaris-sparc64-gcc
|
|
%endif
|
|
%ifarch ppc
|
|
make %{cflags} clean linux-ppc32
|
|
%endif
|
|
%ifarch ppc64
|
|
make %{cflags} clean linux-ppc64
|
|
%endif
|
|
%ifarch X86_64
|
|
make %{cflags} clean linux-x86-64
|
|
%endif
|
|
%ifarch %ix86
|
|
make %{cflags} clean linux-x86-mmx
|
|
%else
|
|
make %{cflags} clean generic
|
|
%endif
|
|
cd ..
|
|
|
|
%install
|
|
mkdir -p %buildroot{%_bindir,%johndir,%_sysconfdir,%_mandir/man8}
|
|
install -m 700 run/john %buildroot%_bindir/
|
|
cp -a 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 doc/
|
|
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
|
|
%attr(644,root,root) %johndir/password.lst
|
|
%attr(644,root,root) %johndir/*.chr
|
|
%config (noreplace) %_sysconfdir/john.conf
|
|
|
|
%changelog -n john
|
|
* Mon Sep 25 2006 - lrupp@suse.de
|
|
- remove double cflags definition
|
|
* Thu Jun 08 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
|
|
* Mon Mar 13 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
|