From f274e2573bed285605b0beac53d29ebc0ddd6329 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:58:05 +0200 Subject: Adapt a test to libpcap-1.8.0
--- Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch | 36 +++++++++++++++++++++++ perl-Net-Pcap.spec | 8 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch
diff --git a/Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch b/Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch new file mode 100644 index 0000000..251f542 --- /dev/null +++ b/Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch @@ -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 + diff --git a/perl-Net-Pcap.spec b/perl-Net-Pcap.spec index 2a428eb..eecf9ac 100644 --- a/perl-Net-Pcap.spec +++ b/perl-Net-Pcap.spec @@ -1,12 +1,14 @@ Name: perl-Net-Pcap Version: 0.18 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Interface to pcap(3) LBL packet capture library
Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Net-Pcap/ Source0: http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/Net-Pcap-%%7Bversion%7D.ta... +# Adapt a test to libpcap-1.8.0, bug #1375919, CPAN RT#117831 +Patch0: Net-Pcap-0.18-Adapt-a-test-to-libpcap-1.8.0.patch
BuildRequires: coreutils BuildRequires: findutils @@ -55,6 +57,7 @@ perl-Net-Pcap provides Perl bindings to the LBL pcap(3) library.
%prep %setup -q -n Net-Pcap-%{version} +%patch0 -p1
for f in README Changes ; do iconv -f iso-8859-1 -t utf-8 $f >$f.conv && mv -f $f.conv $f @@ -90,6 +93,9 @@ make test
%changelog +* Wed Oct 05 2016 Petr Pisar ppisar@redhat.com - 0.18-2 +- Adapt a test to libpcap-1.8.0 (bug #1375919) + * Mon May 23 2016 Jitka Plesnikova jplesnik@redhat.com - 0.18-1 - 0.18 bump
perl-devel@lists.fedoraproject.org