diff --git a/prelude-correlator-0.9.0-beta6-dshield.patch b/prelude-correlator-0.9.0-beta6-dshield.patch new file mode 100644 index 0000000..7df1c1f --- /dev/null +++ b/prelude-correlator-0.9.0-beta6-dshield.patch @@ -0,0 +1,42 @@ +diff -ur prelude-correlator-0.9.0-beta6.orig/setup.py prelude-correlator-0.9.0-beta6/setup.py +--- prelude-correlator-0.9.0-beta6.orig/setup.py 2009-07-10 11:31:34.000000000 -0400 ++++ prelude-correlator-0.9.0-beta6/setup.py 2009-07-13 10:54:54.000000000 -0400 +@@ -11,31 +11,6 @@ + PRELUDE_CORRELATOR_VERSION = "0.9.0-beta6" + + +-class my_sdist(sdist): +- def __init__(self, *args, **kwargs): +- import httplib +- +- fin = os.popen('git log --summary --stat --no-merges --date=short', 'r') +- fout = open('ChangeLog', 'w') +- fout.write(fin.read()) +- fout.close() +- +- print "Downloading DShield database, this might take a while..." +- +- con = httplib.HTTPConnection("www.dshield.org") +- con.request("GET", "/ipsascii.html?limit=10000") +- r = con.getresponse() +- if r.status != 200: +- raise Exception, "Could not download DShield host list, error %d" % r.status +- +- fd = open("PreludeCorrelator/plugins/dshield.dat", "w") +- fd.write(r.read()) +- fd.close() +- +- sdist.__init__(self, *args) +- +- +- + class my_install(install): + def __install_data(self): + data_files = self.distribution.data_files +@@ -145,5 +120,5 @@ + data_files = data_files, + package_data = package_data, + +- cmdclass = { 'sdist': my_sdist, 'install': my_install } ++ cmdclass = { 'install': my_install } + ) diff --git a/prelude-correlator.spec b/prelude-correlator.spec index 492ab9f..2492263 100644 --- a/prelude-correlator.spec +++ b/prelude-correlator.spec @@ -14,9 +14,10 @@ URL: http://www.prelude-ids.com Source0: http://www.prelude-ids.com/download/releases/prelude-correlator/%{name}-%{version}-%{prelude_rel}.tar.gz Source1: prelude-correlator.init Patch1: prelude-correlator-0.9.0-beta6-setup.patch +Patch2: prelude-correlator-0.9.0-beta6-dshield.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: python-devel +BuildRequires: python-devel python-setuptools Requires(pre) : /usr/sbin/useradd Requires(post) : /sbin/chkconfig Requires(preun) : /sbin/chkconfig @@ -38,6 +39,7 @@ correlation rules. %prep %setup -q -n %{name}-%{version}-%{prelude_rel} %patch1 -p1 +%patch2 -p1 %build