[halberd/f12/master] Updated after new review to unblock

Fabian Affolter fab at fedoraproject.org
Tue Aug 17 19:01:31 UTC 2010


commit 693039b87076d1d5d5ee9e4bd74a276d83889a34
Author: Fabian Affolter <fabian at bernewireless.net>
Date:   Tue Aug 17 20:25:25 2010 +0200

    Updated after new review to unblock

 halberd-hashlib.patch |   11 +++++++++++
 halberd.spec          |   48 +++++++++++++++++++++++++++++++++---------------
 2 files changed, 44 insertions(+), 15 deletions(-)
---
diff --git a/halberd-hashlib.patch b/halberd-hashlib.patch
new file mode 100644
index 0000000..3924f02
--- /dev/null
+++ b/halberd-hashlib.patch
@@ -0,0 +1,11 @@
+--- halberd-0.2.3/Halberd/clues/Clue.py.orig	2010-08-14 11:14:19.241044429 +0200
++++ halberd-0.2.3/Halberd/clues/Clue.py	2010-08-14 11:26:54.332784188 +0200
+@@ -30,7 +30,7 @@
+ import rfc822
+ 
+ try:
+-    from sha import new as hashfn
++    from hashlib import sha1 as hashfn
+ except ImportError:
+     from md5 import new as hashfn
+ 
diff --git a/halberd.spec b/halberd.spec
index 05a46c5..e7a058a 100644
--- a/halberd.spec
+++ b/halberd.spec
@@ -1,26 +1,30 @@
-# sitelib for noarch packages, sitearch for others (remove the unneeded one)
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%endif
 
 Name:           halberd
 Version:        0.2.3
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Tool to discover HTTP load balancers
 
 Group:          Applications/Internet
 License:        GPLv2+
 URL:            http://halberd.superadditive.com
 Source0:        http://halberd.superadditive.com/dist/%{name}-%{version}.tar.gz
+Patch0:         halberd-hashlib.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 BuildArch:      noarch
+
 BuildRequires:  python-devel
 
+
 %description
 Halberd discovers HTTP load balancers. It is useful for web application
 security auditing and for load balancer configuration testing.
 
 %prep
 %setup -q
+%patch0 -p1 -b .hashlib
 
 
 %build
@@ -28,26 +32,37 @@ security auditing and for load balancer configuration testing.
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+mkdir -p %{buildroot}%{_mandir}/man1
+mv %{buildroot}/usr/man/man1/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
 
-mkdir -p $RPM_BUILD_ROOT%{_mandir}
-mv $RPM_BUILD_ROOT/usr/man/man1 $RPM_BUILD_ROOT%{_mandir}/
  
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+
+
+%check
+%{__python} setup.py test
 
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog README
-%{_bindir}/*
-%{_mandir}/man?/*
-%{python_sitelib}/*
+%doc AUTHORS ChangeLog LICENSE NEWS README THANKS
+%{_mandir}/man*/*.*
+%{_bindir}/%{name}
+%{python_sitelib}/Halberd/
+%{python_sitelib}/%{name}*.egg-info
+
 
 %changelog
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.3-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+* Sat Aug 14 2010 Fabian Affolter <fabian at bernewireless.net> - 0.2.3-3
+- Added patch to replace deprecated sha module
+
+* Sun Jun 20 2010 Fabian Affolter <fabian at bernewireless.net> - 0.2.3-2
+- Put the man page in the right place
+- Changed from define to global
+- Added files to doc
 
 * Wed Apr 01 2009 Sindre Pedersen Bjørdal <sindrepb at fedoraproject.org> - 0.2.3-1
 - New upstream release
@@ -60,9 +75,12 @@ rm -rf $RPM_BUILD_ROOT
 
 * Thu Jul 31 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 0.2.2-3
 - fix license tag
+
 * Wed May 30 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.2.2-1
 - New upstream release
+
 * Mon May 28 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.2.1-3
 - Bump release for rebuild
+
 * Thu May 03 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.2.1-1
 - Initial build


More information about the scm-commits mailing list