perl-NetPcap:moved from contrib
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/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 pisitools
|
||||
from pisi.actionsapi import perlmodules
|
||||
|
||||
#WorkDir = "%s-%s" % (get.srcNAME()[5:], get.srcVERSION())
|
||||
|
||||
def setup():
|
||||
# suppress compiler warnings
|
||||
pisitools.dosed("Makefile.PL", "-Wall", "-Wall -Wno-cpp -Wno-pointer-sign -Wno-pointer-to-int-cast -Wno-discarded-qualifiers -Wno-deprecated-declarations")
|
||||
perlmodules.configure()
|
||||
# fix runpath analysis
|
||||
pisitools.dosed("Makefile","LD_RUN_PATH=\"\$\(LD_RUN_PATH\)\"", "")
|
||||
|
||||
def build():
|
||||
perlmodules.make()
|
||||
|
||||
# takes too much time
|
||||
#def check():
|
||||
# perlmodules.make("test")
|
||||
|
||||
def install():
|
||||
perlmodules.install()
|
||||
|
||||
pisitools.dodoc("Changes", "MANIFEST", "README*")
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
From 52607780c02ee90a93bd40e91c5263e55e7a351c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 5 Oct 2016 15:54:02 +0200
|
||||
Subject: [PATCH] Adapt a test to libpcap-1.8.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
libpcap-1.8.0 changed error message on invalid filter expression from
|
||||
"syntax error" to "syntax error in filter expression: syntax error".
|
||||
|
||||
This patch adjust the t/09-error.t for that.
|
||||
|
||||
CPAN RT#117831
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
t/09-error.t | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/t/09-error.t b/t/09-error.t
|
||||
index bcd2a13..ef8f0b2 100644
|
||||
--- a/t/09-error.t
|
||||
+++ b/t/09-error.t
|
||||
@@ -22,7 +22,7 @@ is( $@, '', "compile() with an invalid filter string" );
|
||||
is( $res, -1, " - result must not be null: $res" );
|
||||
eval { $err = Net::Pcap::geterr($pcap) };
|
||||
is( $@, '', "geterr()" );
|
||||
-like( $err, '/^(?:parse|syntax) error$/', " - \$err must not be null: $err" );
|
||||
+like( $err, '/(?:parse|syntax) error$/', " - \$err must not be null: $err" );
|
||||
|
||||
# Testing compile() with a valid filter
|
||||
eval { $res = Net::Pcap::compile($pcap, \$filter, "tcp", 0, $mask) };
|
||||
--
|
||||
2.7.4
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
diff -up ./Makefile.PL.tv ./Makefile.PL
|
||||
--- ./Makefile.PL.tv 2018-09-21 10:32:09.165570705 +0200
|
||||
+++ ./Makefile.PL 2018-09-21 10:45:39.096591301 +0200
|
||||
@@ -106,7 +106,7 @@ REASON
|
||||
# We also store the list of available functions in a file for skipping the
|
||||
# corresponding tests.
|
||||
my @funcs = have_functions(find_functions());
|
||||
-$options{DEFINE} .= cpp_defines(@funcs);
|
||||
+$options{DEFINE} .= cpp_defines(@funcs). "-DHAVE_PCAP_SETSAMPLING";
|
||||
open(FUNCS, '>funcs.txt') or warn "warning: can't write 'funcs.txt': $!\n";
|
||||
print FUNCS join("\n", @funcs), "\n";
|
||||
close(FUNCS);
|
||||
diff -up ./Pcap.xs.tv ./Pcap.xs
|
||||
diff -up ./stubs.inc.tv ./stubs.inc
|
||||
--- ./stubs.inc.tv 2018-09-21 10:30:08.653034412 +0200
|
||||
+++ ./stubs.inc 2018-09-21 10:46:41.339897943 +0200
|
||||
@@ -354,11 +354,6 @@ int pcap_parsesrcstr(const char *source,
|
||||
#ifdef _MSC_VER
|
||||
#pragma message( "Warning: the function pcap_open() is not available" )
|
||||
#endif
|
||||
-struct pcap_rmtauth {
|
||||
- int type;
|
||||
- char *username;
|
||||
- char *password;
|
||||
-};
|
||||
|
||||
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
|
||||
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
|
||||
@@ -511,6 +511,7 @@ HANDLE pcap_getevent(pcap_t *p) {
|
||||
#ifdef _MSC_VER
|
||||
#pragma message( "Warning: the function pcap_setsampling() is not available" )
|
||||
#endif
|
||||
+#if 0
|
||||
struct pcap_samp {
|
||||
int method;
|
||||
int value;
|
||||
@@ -522,6 +523,7 @@ struct pcap_samp *pcap_setsampling(pcap_
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "https://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>perl-Net-Pcap</Name>
|
||||
<Homepage>https://metacpan.org/release/Net-Pcap</Homepage>
|
||||
<Packager>
|
||||
<Name>Blue Devil</Name>
|
||||
<Email>bluedevil@sctzine.com</Email>
|
||||
</Packager>
|
||||
<PartOf>programming.language.perl</PartOf>
|
||||
<License>GPL</License>
|
||||
<IsA>app:console</IsA>
|
||||
<IsA>library</IsA>
|
||||
<Summary>Interface to pcap(3) LBL packet capture library</Summary>
|
||||
<Description>The Net::Pcap module is a Perl binding to the LBL pcap(3) packet capture library.</Description>
|
||||
<Archive sha1sum="9e53643cbe93e497af8c24cebe02bd7934194854" type="targz">https://cpan.metacpan.org/authors/id/S/SA/SAPER/Net-Pcap-0.18.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>perl</Dependency>
|
||||
<Dependency>libpcap-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch</Patch>
|
||||
<Patch level="1">Net-Pcap-0.18-Fix-build-with-libpcap-1.9.0.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>perl-Net-Pcap</Name>
|
||||
<Summary>Interface to pcap(3) LBL packet capture library</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>perl</Dependency>
|
||||
<Dependency>libpcap</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2020-01-08</Date>
|
||||
<Version>0.18</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Blue Devil</Name>
|
||||
<Email>bluedevil@sctzine.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>perl-Net-Pcap</Name>
|
||||
<Summary xml:lang="tr">pcap(3) LBL paket yakalama kitaplığı arayüzü</Summary>
|
||||
<Description xml:lang="tr">Net::Pcap modülü, pcap(3) LBL paket yakalama kitaplığı için bir Perl arayüzüdür.</Description>
|
||||
</Source>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user