From 78c059881064b89f9351fd46e5e30067fe869a56 Mon Sep 17 00:00:00 2001 From: blue-devil Date: Wed, 10 Jun 2020 01:27:52 +0300 Subject: [PATCH] libnids: moved from contrib --- network/monitor/libnids/actions.py | 32 ++++++++++ .../libnids/files/libnids-1.24-inline.patch | 40 ++++++++++++ network/monitor/libnids/pspec.xml | 61 +++++++++++++++++++ network/monitor/libnids/translations.xml | 14 +++++ 4 files changed, 147 insertions(+) create mode 100644 network/monitor/libnids/actions.py create mode 100644 network/monitor/libnids/files/libnids-1.24-inline.patch create mode 100644 network/monitor/libnids/pspec.xml create mode 100644 network/monitor/libnids/translations.xml diff --git a/network/monitor/libnids/actions.py b/network/monitor/libnids/actions.py new file mode 100644 index 0000000000..08385be1dc --- /dev/null +++ b/network/monitor/libnids/actions.py @@ -0,0 +1,32 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/copyleft/gpl.txt. + +from pisi.actionsapi import get +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools + + +def setup(): + # suppress compiler warnings + pisitools.cflags.add("-Wno-unused-result -Wno-deprecated-declarations") + #shelltools.export("CFLAGS", "-Wno-unused-result -Wno-deprecated-declarations") + # Fix soname + pisitools.dosed("src/Makefile.in", "^LIBSHARED.*", "LIBSHARED = libnids.so.%s" % get.srcVERSION().split(".", 1)[0]) + + # disable static + pisitools.dosed("src/Makefile.in", "\$\(INSTALL.*libnids.a.*") + + autotools.autoreconf("-vfi") + autotools.configure("--enable-shared \ + --disable-static") + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("install_prefix=%s" % get.installDIR()) + + pisitools.dodoc("COPYING", "MISC", "README", "doc/*") \ No newline at end of file diff --git a/network/monitor/libnids/files/libnids-1.24-inline.patch b/network/monitor/libnids/files/libnids-1.24-inline.patch new file mode 100644 index 0000000000..e3a6cce570 --- /dev/null +++ b/network/monitor/libnids/files/libnids-1.24-inline.patch @@ -0,0 +1,40 @@ +Patch by Robert Scheck for libnids <= 1.24 which +avoids making the functions ip_fast_csum, ip_compute_csum, my_tcp_check and +my_udp_check inline, see https://github.com/aol/moloch/issues/440 as well. + +--- libnids-1.24/src/checksum.c 2010-02-26 11:58:41.000000000 +0100 ++++ libnids-1.24/src/checksum.c.inline 2016-02-09 14:08:38.000000000 +0100 +@@ -120,7 +120,7 @@ + By Jorge Cwik , adapted for linux by Arnt + Gulbrandsen. + */ +-inline u_short ip_fast_csum(u_char * iph, u_int ihl) ++u_short ip_fast_csum(u_char * iph, u_int ihl) + { + u_int sum; + if (dontchksum(((struct ip*)iph)->ip_src.s_addr)) +@@ -191,13 +191,13 @@ + this routine is used for miscellaneous IP-like checksums, mainly in + icmp.c + */ +-inline u_short ++u_short + ip_compute_csum(u_char * buff, int len) + { + return (csum_fold(csum_partial(buff, len, 0))); + } + +-inline u_short ++u_short + my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr) + { + if (dontchksum(saddr)) +@@ -205,7 +205,7 @@ + return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP, + csum_partial((u_char *)th, len, 0)); + } +-inline u_short ++u_short + my_udp_check(void *u, int len, u_int saddr, u_int daddr) + { + if (dontchksum(saddr)) diff --git a/network/monitor/libnids/pspec.xml b/network/monitor/libnids/pspec.xml new file mode 100644 index 0000000000..0c15636694 --- /dev/null +++ b/network/monitor/libnids/pspec.xml @@ -0,0 +1,61 @@ + + + + + libnids + http://libnids.sourceforge.net/ + + PisiLinux Community + admins@pisilinux.org + + network.monitor + GPLv2 + library + Network intrusion detection library + Libnids is an implementation of an E-component of Network Intrusion Detection System. It emulates the IP stack of Linux 2.0.x. Libnids offers IP defragmentation, TCP stream assembly and TCP port scan detection. + https://sourceforge.net/projects/libnids/files/libnids/1.24/libnids-1.24.tar.gz + + glib2-devel + libnet-devel + libpcap-devel + + + libnids-1.24-inline.patch + + + + + libnids + Network intrusion detection library + + libnet + libpcap + + + /usr/lib + /usr/share/doc/libnids + + + + + libnids-devel + Development files for libnids + + libnids + + + /usr/share/man + /usr/include + + + + + + 2020-06-08 + 1.24 + Moved from contrib. + Blue DeviL + bluedevil@sctzine.com + + + \ No newline at end of file diff --git a/network/monitor/libnids/translations.xml b/network/monitor/libnids/translations.xml new file mode 100644 index 0000000000..de24f765f7 --- /dev/null +++ b/network/monitor/libnids/translations.xml @@ -0,0 +1,14 @@ + + + + libnids + Ağ saldırıları yakalama kitaplığı + Libnids bir ağ saldırısı yakalama kitaplığıdır. Linux 2 serisi için IP yapısını taklit ederek IP bilgisi birleştirme, TCP yayını inceleme ve port taraması gibi işlemler için altyapı sunar. + + + + libnids-devel + libnids için geliştirme dosyaları + libnids-devel, libnids için geliştirme dosyalarını içerir. + + \ No newline at end of file