libnids: moved from contrib
This commit is contained in:
@@ -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/*")
|
||||
@@ -0,0 +1,40 @@
|
||||
Patch by Robert Scheck <robert@fedoraproject.org> 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 <jorge@laser.satlink.net>, 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))
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "https://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>libnids</Name>
|
||||
<Homepage>http://libnids.sourceforge.net/</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<PartOf>network.monitor</PartOf>
|
||||
<License>GPLv2</License>
|
||||
<IsA>library</IsA>
|
||||
<Summary>Network intrusion detection library</Summary>
|
||||
<Description>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.</Description>
|
||||
<Archive sha1sum="9a421df05cefdc4f5f7db95efc001b3c2b5249ce" type="targz">https://sourceforge.net/projects/libnids/files/libnids/1.24/libnids-1.24.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>glib2-devel</Dependency>
|
||||
<Dependency>libnet-devel</Dependency>
|
||||
<Dependency>libpcap-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">libnids-1.24-inline.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>libnids</Name>
|
||||
<Summary>Network intrusion detection library</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>libnet</Dependency>
|
||||
<Dependency>libpcap</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc/libnids</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>libnids-devel</Name>
|
||||
<Summary>Development files for libnids</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency release="current">libnids</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
<Path fileType="header">/usr/include</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2020-06-08</Date>
|
||||
<Version>1.24</Version>
|
||||
<Comment>Moved from contrib.</Comment>
|
||||
<Name>Blue DeviL</Name>
|
||||
<Email>bluedevil@sctzine.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>libnids</Name>
|
||||
<Summary xml:lang="tr">Ağ saldırıları yakalama kitaplığı</Summary>
|
||||
<Description xml:lang="tr">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.</Description>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>libnids-devel</Name>
|
||||
<Summary xml:lang="tr">libnids için geliştirme dosyaları</Summary>
|
||||
<Description xml:lang="tr">libnids-devel, libnids için geliştirme dosyalarını içerir.</Description>
|
||||
</Package>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user