[packages/python-pynids] - updated to 0.6.2 from pypi (uses libnids 1.25) - added build patch (fixes build in dir other than

qboosh qboosh at pld-linux.org
Sun May 24 12:00:14 CEST 2020


commit 50f5c210e5144d06cbec1e457b3c2ab30da508bb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 24 12:00:51 2020 +0200

    - updated to 0.6.2 from pypi (uses libnids 1.25)
    - added build patch (fixes build in dir other than /tmp)
    - added libnet patch (restore TcpStream.kill() functionality instead of aborting)

 python-pynids-build.patch  | 11 +++++++++++
 python-pynids-libnet.patch | 21 +++++++++++++++++++++
 python-pynids.spec         | 19 ++++++++++++-------
 3 files changed, 44 insertions(+), 7 deletions(-)
---
diff --git a/python-pynids.spec b/python-pynids.spec
index 8d73093..e92476f 100644
--- a/python-pynids.spec
+++ b/python-pynids.spec
@@ -2,16 +2,19 @@
 Summary:	Python wrapper for libnids, a Network Intrusion Detection System library
 Summary(pl.UTF-8):	Pythonowe obudowanie libnids - systemu wykrywania intruzów w sieci
 Name:		python-%{module}
-Version:	0.6.1
-Release:	4
+Version:	0.6.2
+Release:	1
 # module itself is GPL v2+, but libnids is GPL v2 only
 License:	GPL v2
 Group:		Development/Languages/Python
-#Source0Download: https://jon.oberheide.org/pynids/
-Source0:	https://jon.oberheide.org/files/pynids-%{version}.tar.gz
-# Source0-md5:	6ce600d0130b0feec9a3797a27825d15
+##Source0Download: https://jon.oberheide.org/pynids/ (up to 0.6.1
+#Source0:	https://jon.oberheide.org/files/pynids-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/pynids/
+Source0:	https://files.pythonhosted.org/packages/source/p/pynids/pynids-%{version}.tar.gz
+# Source0-md5:	6f2a15ee393beec4c9d6ce65f869a58c
+Patch0:		%{name}-build.patch
+Patch1:		%{name}-libnet.patch
 URL:		https://jon.oberheide.org/pynids/
-BuildRequires:	glib2-devel >= 2.0
 BuildRequires:	libnet-devel >= 1:1.1
 BuildRequires:	libpcap-devel
 BuildRequires:	pkgconfig
@@ -36,6 +39,8 @@ komunikacji w sieci z poziomu Pythona.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %py_build
@@ -52,7 +57,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES README Example
+%doc CHANGES README
 %attr(755,root,root) %{py_sitedir}/nidsmodule.so
 %if "%{py_ver}" > "2.4"
 %{py_sitedir}/pynids-%{version}-py*.egg-info
diff --git a/python-pynids-build.patch b/python-pynids-build.patch
new file mode 100644
index 0000000..a1e6130
--- /dev/null
+++ b/python-pynids-build.patch
@@ -0,0 +1,11 @@
+--- pynids-0.6.2/setup.py.orig	2016-11-29 22:28:39.000000000 +0100
++++ pynids-0.6.2/setup.py	2020-05-24 11:10:24.279172536 +0200
+@@ -14,7 +14,7 @@
+ 
+ PKGNAME  = 'libnids-1.25'
+ PKGTAR   = PKGNAME + '.tar.gz'
+-BUILDDIR = '/tmp/' + PKGNAME
++BUILDDIR = PKGNAME
+ 
+ INCLUDE_DIRS  = ['/usr/local/include', '/opt/local/include']
+ LIBRARY_DIRS  = ['/usr/local/lib', '/opt/local/lib']
diff --git a/python-pynids-libnet.patch b/python-pynids-libnet.patch
new file mode 100644
index 0000000..3f09466
--- /dev/null
+++ b/python-pynids-libnet.patch
@@ -0,0 +1,21 @@
+Restore TcpStream.kill() functionality (it aborts without libnet)
+--- pynids-0.6.2/setup.py.orig	2020-05-24 11:32:49.071887169 +0200
++++ pynids-0.6.2/setup.py	2020-05-24 11:51:30.615811244 +0200
+@@ -37,7 +37,7 @@
+ 
+         spawn(['tar', '-zxf', self.NIDSTAR], search_path = 1)
+         os.chdir(self.NIDSDIR)
+-        spawn([pathjoin('.','configure'), 'CFLAGS=-fPIC', '--disable-libglib', '--disable-libnet'])
++        spawn([pathjoin('.','configure'), 'CFLAGS=-fPIC', '--disable-libglib'])
+         spawn(['make'], search_path = 1)
+         os.chdir('..')
+ 
+@@ -67,7 +67,7 @@
+                             #define_macros = [ ("DEBUG", None), ],
+                             sources=["nidsmodule.c"],
+                             include_dirs = INCLUDE_DIRS,
+-                            libraries = ["pcap"],
++                            libraries = ["pcap", "net"],
+                             library_dirs = LIBRARY_DIRS,
+                             extra_objects = EXTRA_OBJECTS
+                         ) 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pynids.git/commitdiff/50f5c210e5144d06cbec1e457b3c2ab30da508bb



More information about the pld-cvs-commit mailing list