forked from pool/perl-Net-Pcap
Compare commits
13 Commits
54d95bb9f9
...
main
Author | SHA256 | Date | |
---|---|---|---|
f489526cc1 | |||
840dd0e49b | |||
007c856efa | |||
22828019de | |||
fd8feae081 | |||
bdfcbfe890 | |||
0e4c905d48 | |||
d62bcdf0b8 | |||
b617243e0e | |||
e2084bb494 | |||
1ef14915f2 | |||
|
6ff28b80da | ||
|
4bb44896b8 |
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:cb9bd44948c23544bb9d4e28261dbd0dbb3e7564709487a7855576e0d9b68307
|
|
||||||
size 94207
|
|
3
Net-Pcap-0.21.tar.gz
Normal file
3
Net-Pcap-0.21.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:962ffdc1c5470bf9e43413297724308e938cb9c9c02a9041d7cbd485b1ddfb13
|
||||||
|
size 97984
|
12
README.md
Normal file
12
README.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
## Build Results
|
||||||
|
|
||||||
|
Current state of perl in openSUSE:Factory is
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The current state of perl in the devel project build (devel:languages:perl)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
62
cpanspec.yml
Normal file
62
cpanspec.yml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
#description_paragraphs: 3
|
||||||
|
#description: |-
|
||||||
|
# override description from CPAN
|
||||||
|
#summary: override summary from CPAN
|
||||||
|
#no_testing: broken upstream
|
||||||
|
#sources:
|
||||||
|
# - source1
|
||||||
|
# - source2
|
||||||
|
#patches:
|
||||||
|
# foo.patch: -p1
|
||||||
|
# bar.patch:
|
||||||
|
# baz.patch: PATCH-FIX-OPENSUSE
|
||||||
|
preamble: |-
|
||||||
|
BuildRequires: libpcap-devel
|
||||||
|
Requires: perl(Data::Hexdumper)
|
||||||
|
Requires: perl(NetPacket)
|
||||||
|
#post_prep: |-
|
||||||
|
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||||
|
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||||
|
#post_build: |-
|
||||||
|
# rm unused.files
|
||||||
|
post_install: |-
|
||||||
|
install -D -m0755 eg/pcapdump "%{buildroot}%{_bindir}/pcapdump"
|
||||||
|
#license: SUSE-NonFree
|
||||||
|
#skip_noarch: 1
|
||||||
|
#custom_build: |-
|
||||||
|
#./Build build flags=%{?_smp_mflags} --myflag
|
||||||
|
#custom_test: |-
|
||||||
|
#startserver && make test
|
||||||
|
#ignore_requires: Bizarre::Module
|
||||||
|
skip_doc: stubs.inc
|
||||||
|
#add_doc: files to add to docs
|
||||||
|
misc: |-
|
||||||
|
%exclude %{_bindir}/pcapinfo
|
||||||
|
%exclude %{_bindir}/pcapdump
|
||||||
|
%exclude %{_mandir}/man1/pcapinfo.1%{?ext_man}
|
||||||
|
|
||||||
|
%package -n pcapdump
|
||||||
|
Summary: Dump packets from the network
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description -n pcapdump
|
||||||
|
Command line tool to dump packets from the network.
|
||||||
|
|
||||||
|
pcapdump mimics the very basic features of tcpdump(1) and provides a good
|
||||||
|
example of how to use Net::Pcap.
|
||||||
|
|
||||||
|
%package -n pcapinfo
|
||||||
|
Summary: Prints detailed information about the network devices
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description -n pcapinfo
|
||||||
|
pcapinfo prints detailed information about the network devices and Pcap library
|
||||||
|
available on the current host.
|
||||||
|
|
||||||
|
%files -n pcapdump
|
||||||
|
%{_bindir}/pcapdump
|
||||||
|
|
||||||
|
%files -n pcapinfo
|
||||||
|
%{_bindir}/pcapinfo
|
||||||
|
%{_mandir}/man1/pcapinfo.1%{?ext_man}
|
@@ -1,41 +0,0 @@
|
|||||||
--- ./Makefile.PL 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);
|
|
||||||
--- ./stubs.inc 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
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
@@ -1,3 +1,51 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 31 14:11:40 UTC 2023 - Dirk Stoecker <opensuse@dstoecker.de>
|
||||||
|
|
||||||
|
- updated to 0.21
|
||||||
|
see /usr/share/doc/packages/perl-Net-Pcap/Changes
|
||||||
|
|
||||||
|
0.21 - 2023-01-19 - Max Maischein (CORION)
|
||||||
|
[Configure]
|
||||||
|
- Avoid implicit ints during feature probing
|
||||||
|
This is required for compatibility with future compilers as (for example)
|
||||||
|
Fedora is moving to stricter C compiler versions.
|
||||||
|
This is merely a cleanup of the C code probing for Pcap functionality,
|
||||||
|
no need to upgrade.
|
||||||
|
[Code]
|
||||||
|
- use "our" for global variable declaration
|
||||||
|
- Don't inherit from Exporter anymore
|
||||||
|
This might break modules that rely on Net::Pcap isa Exporter, but that
|
||||||
|
was never documented.
|
||||||
|
0.20 - 2021-12-17 - Max Maischein (CORION)
|
||||||
|
[Bugfixes]
|
||||||
|
- CPAN RT #118727 Spelling fixes
|
||||||
|
Reported by Gregor Herrmann
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 22 19:57:04 UTC 2022 - Pedro Monreal <pmonreal@suse.com>
|
||||||
|
|
||||||
|
- Add missing dependencies for pcapdump [bsc#1201615]
|
||||||
|
- Remove patch not applied and not mentioned in the changelog.
|
||||||
|
* perl-Net-Pcap-avoid-pcap_rmtauth-redefinition.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 24 09:12:32 UTC 2022 - Dirk Stoecker <opensuse@dstoecker.de>
|
||||||
|
|
||||||
|
- updated to 0.20
|
||||||
|
see /usr/share/doc/packages/perl-Net-Pcap/Changes
|
||||||
|
|
||||||
|
0.19 - 2021-11-27 - Max Maischein (CORION)
|
||||||
|
[Bugfixes]
|
||||||
|
- CPAN RT #127685 Restore compilation with libpcap 1.9+
|
||||||
|
This incorporates the RedHat patch from
|
||||||
|
|
||||||
|
https://www.cpan.org/authors/id/S/SR/SREZIC/patches/Net-Pcap-0.18-RT127685-RH1485429.patch
|
||||||
|
|
||||||
|
and guards it with the newly introduced version #define
|
||||||
|
- GH #9, CPAN RT #117831 , CPAN RT #125352 Too strict test for
|
||||||
|
error message from libpcap
|
||||||
|
Fix contributed by KENTNL
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 13 14:43:31 UTC 2018 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
|
Tue Nov 13 14:43:31 UTC 2018 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
|
||||||
|
|
||||||
@@ -78,4 +126,3 @@ Fri Dec 16 06:11:09 UTC 2011 - pascal.bleser@opensuse.org
|
|||||||
Wed Mar 23 09:31:14 CET 2011 - pascal.bleser@opensuse.org
|
Wed Mar 23 09:31:14 CET 2011 - pascal.bleser@opensuse.org
|
||||||
|
|
||||||
- initial version (0.16)
|
- initial version (0.16)
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-Net-Pcap
|
# spec file for package perl-Net-Pcap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,46 +16,62 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define cpan_name Net-Pcap
|
||||||
Name: perl-Net-Pcap
|
Name: perl-Net-Pcap
|
||||||
Version: 0.18
|
Version: 0.21
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Interface to pcap LBL packet capture library
|
|
||||||
License: Artistic-1.0 OR GPL-1.0-or-later
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||||
Group: Development/Libraries/Perl
|
Summary: Interface to the pcap(3) LBL packet capture library
|
||||||
URL: https://metacpan.org/release/Net-Pcap
|
URL: https://metacpan.org/release/%{cpan_name}
|
||||||
Source: https://cpan.metacpan.org/authors/id/S/SA/SAPER/Net-Pcap-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/authors/id/C/CO/CORION/%{cpan_name}-%{version}.tar.gz
|
||||||
Patch1: perl-Net-Pcap-avoid-pcap_rmtauth-redefinition.patch
|
Source1: cpanspec.yml
|
||||||
BuildRequires: gcc
|
Source100: README.md
|
||||||
BuildRequires: make
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(Carp)
|
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
||||||
BuildRequires: perl(Socket)
|
|
||||||
BuildRequires: perl(Sys::Hostname)
|
|
||||||
BuildRequires: perl(Test::More) >= 0.45
|
|
||||||
BuildRequires: perl(XSLoader)
|
|
||||||
Requires: perl(Carp)
|
|
||||||
Requires: perl(Socket)
|
|
||||||
Requires: perl(Sys::Hostname)
|
|
||||||
Requires: perl(Test::More) >= 0.45
|
|
||||||
Requires: perl(XSLoader)
|
|
||||||
%{perl_requires}
|
%{perl_requires}
|
||||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1030
|
# MANUAL BEGIN
|
||||||
BuildRequires: libpcap-devel
|
BuildRequires: libpcap-devel
|
||||||
%else
|
Requires: perl(Data::Hexdumper)
|
||||||
BuildRequires: libpcap
|
Requires: perl(NetPacket)
|
||||||
%endif
|
# MANUAL END
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Net::Pcap is a Perl binding to the LBL pcap(3) library. The README for libpcap
|
'Net::Pcap' is a Perl binding to the LBL pcap(3) library and its Win32
|
||||||
describes itself as: "a system-independent interface for user-level packet
|
counterpart, the WinPcap library. Pcap (packet capture) is a portable API
|
||||||
capture. libpcap provides a portable framework for low-level network
|
to capture network packet: it allows applications to capture packets at
|
||||||
monitoring. Applications include network statistics collection, security
|
link-layer, bypassing the normal protocol stack. It also provides features
|
||||||
monitoring, network debugging, etc."
|
like kernel-level packet filtering and access to internal statistics.
|
||||||
|
|
||||||
|
Common applications include network statistics collection, security
|
||||||
|
monitoring, network debugging, etc.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{cpan_name}-%{version}
|
||||||
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
|
%build
|
||||||
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
|
%install
|
||||||
|
%perl_make_install
|
||||||
|
%perl_process_packlist
|
||||||
|
# MANUAL BEGIN
|
||||||
|
install -D -m0755 eg/pcapdump "%{buildroot}%{_bindir}/pcapdump"
|
||||||
|
# MANUAL END
|
||||||
|
%perl_gen_filelist
|
||||||
|
|
||||||
|
%files -f %{name}.files
|
||||||
|
%doc Changes README
|
||||||
|
%exclude %{_bindir}/pcapinfo
|
||||||
|
%exclude %{_bindir}/pcapdump
|
||||||
|
%exclude %{_mandir}/man1/pcapinfo.1%{?ext_man}
|
||||||
|
|
||||||
%package -n pcapdump
|
%package -n pcapdump
|
||||||
Summary: Dump packets from the network
|
Summary: Dump packets from the network
|
||||||
Group: Productivity/Networking/Diagnostic
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
%description -n pcapdump
|
%description -n pcapdump
|
||||||
@@ -66,42 +82,12 @@ example of how to use Net::Pcap.
|
|||||||
|
|
||||||
%package -n pcapinfo
|
%package -n pcapinfo
|
||||||
Summary: Prints detailed information about the network devices
|
Summary: Prints detailed information about the network devices
|
||||||
Group: Productivity/Networking/Diagnostic
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
%description -n pcapinfo
|
%description -n pcapinfo
|
||||||
pcapinfo prints detailed information about the network devices and Pcap library
|
pcapinfo prints detailed information about the network devices and Pcap library
|
||||||
available on the current host.
|
available on the current host.
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q -n "Net-Pcap-%{version}"
|
|
||||||
%if 0%{?suse_version} >= 01550
|
|
||||||
%patch1 -p1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
sed -i '/^auto_install/d' Makefile.PL
|
|
||||||
|
|
||||||
%build
|
|
||||||
perl Makefile.PL PREFIX="%{_prefix}"
|
|
||||||
make %{?_smp_mflags} \
|
|
||||||
CCFLAGS="-Wall -Wextra -I/usr/include/pcap" \
|
|
||||||
CC="gcc"
|
|
||||||
|
|
||||||
%install
|
|
||||||
%perl_make_install
|
|
||||||
install -D -m0755 eg/pcapdump "%{buildroot}%{_bindir}/pcapdump"
|
|
||||||
%perl_process_packlist
|
|
||||||
|
|
||||||
# make test is just borked when not running as root
|
|
||||||
|
|
||||||
%files
|
|
||||||
%doc Changes README
|
|
||||||
%dir %{perl_vendorarch}/Net
|
|
||||||
%{perl_vendorarch}/Net/Pcap.pm
|
|
||||||
%dir %{perl_vendorarch}/auto/Net
|
|
||||||
%{perl_vendorarch}/auto/Net/Pcap
|
|
||||||
%doc %{perl_man3dir}/Net::Pcap.%{perl_man3ext}%{ext_man}
|
|
||||||
|
|
||||||
%files -n pcapdump
|
%files -n pcapdump
|
||||||
%{_bindir}/pcapdump
|
%{_bindir}/pcapdump
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user