8
0
forked from pool/perl-Net-Pcap

Compare commits

...

13 Commits

Author SHA256 Message Date
f489526cc1 Add Gitea build results 2025-08-12 18:16:03 +02:00
840dd0e49b Accepting request 1062398 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1062398
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Net-Pcap?expand=0&rev=10
2023-02-01 15:39:39 +00:00
007c856efa Accepting request 1062273 from devel:languages:perl:autoupdate
- 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

OBS-URL: https://build.opensuse.org/request/show/1062273
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=21
2023-02-01 08:18:47 +00:00
22828019de Accepting request 1037713 from devel:languages:perl
- 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

- 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

OBS-URL: https://build.opensuse.org/request/show/1037713
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Net-Pcap?expand=0&rev=9
2022-11-24 11:24:10 +00:00
fd8feae081 Accepting request 1037695 from home:pmonrealgonzalez:branches:devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1037695
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=19
2022-11-23 17:14:00 +00:00
bdfcbfe890 Accepting request 1037409 from home:pmonrealgonzalez:branches:devel:languages:perl
- 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

OBS-URL: https://build.opensuse.org/request/show/1037409
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=18
2022-11-23 17:03:33 +00:00
0e4c905d48 Accepting request 999000 from devel:languages:perl:autoupdate
- updated to 0.20

OBS-URL: https://build.opensuse.org/request/show/999000
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=17
2022-08-24 12:22:33 +00:00
d62bcdf0b8 Prevent auto-submits
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=16
2020-10-25 09:47:25 +00:00
b617243e0e fix interface issue
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=15
2020-10-15 18:05:59 +00:00
e2084bb494 Accepting request 648751 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/648751
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Net-Pcap?expand=0&rev=8
2018-11-14 13:42:55 +00:00
1ef14915f2 Accepting request 648750 from home:pmonrealgonzalez:branches:devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/648750
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-Pcap?expand=0&rev=13
2018-11-13 15:14:36 +00:00
Stephan Kulow
6ff28b80da Accepting request 186017 from devel:languages:perl
- updated to 0.17
   - [BUGFIX] CPAN-RT#43308: Net::Pcap no longer enables immediate
     (unsafe) signals delivery.
   - [BUGFIX] Fix allocated size in pcap_open(), pcap_createsrcstr()
     and pcap_parsesrcstr(). 
   - [API] Now make the C-like API available by default. Added the
     pcap_perl_settings() function and UNSAFE_SIGNALS pseudo-bloc.
   - [CODE] Replaced all occurrences of safemalloc() with Newx().
   - [CODE] Silenced some warnings.
   - [DOC] Added a long note about Net::Pcap and signals delivery.
   - [DOC] Improved README.
   - [DOC] Mention Net::Pcap::Easy.
   - [TESTS] Fixed t/17-lib_version.t to handle two digits versions.
   - [TESTS] CPAN-RT#44448: Fixed t/17-lib_version.t to handle
     versions from the CVS, thanks to Craig Davison.
   - [TESTS] Refactored t/01-api.t and added checks for the new API.

OBS-URL: https://build.opensuse.org/request/show/186017
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Net-Pcap?expand=0&rev=5
2013-08-07 18:50:11 +00:00
Stephan Kulow
4bb44896b8 Accepting request 104642 from devel:languages:perl
patch license to follow spdx.org standard (forwarded request 104449 from coolo)

OBS-URL: https://build.opensuse.org/request/show/104642
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Net-Pcap?expand=0&rev=2
2012-02-14 18:05:11 +00:00
7 changed files with 171 additions and 105 deletions

View File

@@ -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
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:962ffdc1c5470bf9e43413297724308e938cb9c9c02a9041d7cbd485b1ddfb13
size 97984

12
README.md Normal file
View File

@@ -0,0 +1,12 @@
## Build Results
Current state of perl in openSUSE:Factory is
![Factory build results](https://br.opensuse.org/status/openSUSE:Factory/perl-Net-Pcap/standard)
The current state of perl in the devel project build (devel:languages:perl)
![Devel project build results](https://br.opensuse.org/status/devel:languages:perl/perl-Net-Pcap)

62
cpanspec.yml Normal file
View 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}

View File

@@ -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
/*

View File

@@ -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)

View File

@@ -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