public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Net-RawIP/files/, dev-perl/Net-RawIP/
@ 2017-12-16 10:53 Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2017-12-16 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2e9b65230055b26cd1e718a2c19c210c50302159
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 07:48:21 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 10:53:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e9b6523

dev-perl/Net-RawIP: EAPI6 + Tests

- EAPI6ify
- Enable tests
- Disable network tests
- Add USE=examples

Package-Manager: Portage-2.3.18, Repoman-2.3.6

 dev-perl/Net-RawIP/Net-RawIP-0.250.0-r2.ebuild     | 20 +++++++++++++++++
 .../files/Net-RawIP-0.25-no-network-tests.patch    | 25 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/dev-perl/Net-RawIP/Net-RawIP-0.250.0-r2.ebuild b/dev-perl/Net-RawIP/Net-RawIP-0.250.0-r2.ebuild
new file mode 100644
index 00000000000..7705fe8901e
--- /dev/null
+++ b/dev-perl/Net-RawIP/Net-RawIP-0.250.0-r2.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DIST_AUTHOR=SAPER
+DIST_VERSION=0.25
+DIST_EXAMPLES=("examples/*")
+inherit perl-module
+
+DESCRIPTION="Raw IP packets manipulation Module"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+PERL_RM_FILES=( "t/90-pod.t" "t/91-pod-coverage.t" "t/99-critic.t" )
+PATCHES=("${FILESDIR}/${PN}-0.25-no-network-tests.patch")

diff --git a/dev-perl/Net-RawIP/files/Net-RawIP-0.25-no-network-tests.patch b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-no-network-tests.patch
new file mode 100644
index 00000000000..8eddbdd9a1d
--- /dev/null
+++ b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-no-network-tests.patch
@@ -0,0 +1,25 @@
+From ba688d50d538e571f124ebbfd8b8a8402c50fdfb Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Fri, 15 Dec 2017 20:36:58 +1300
+Subject: Disable world-wide DNS lookups when NO_NETWORK_TESTING
+
+---
+ t/iflist.t | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/t/iflist.t b/t/iflist.t
+index 0982c77..d8026cd 100644
+--- a/t/iflist.t
++++ b/t/iflist.t
+@@ -32,6 +32,8 @@ BEGIN { $tests += 4 } SKIP: {
+     like( $@, qr{host_to_ip: failed}, "rdev('ab cd') => undef" );
+ 
+     # this test will fail if there is not network connection
++    skip "NO_NETWORK_TESTING=1", 1
++        if 1 eq  ( $ENV{NO_NETWORK_TESTING} || '0' );
+     $r = rdev('cisco.com');
+     ok( $r, "rdev('cisco.com') => $r" );
+ }
+-- 
+2.15.1
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Net-RawIP/files/, dev-perl/Net-RawIP/
@ 2024-03-17  3:54 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-03-17  3:54 UTC (permalink / raw
  To: gentoo-commits

commit:     045f53b876e965362d806a2400afa5e18f14bcf7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 17 03:48:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 17 03:48:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=045f53b8

dev-perl/Net-RawIP: fix modern C issues

Closes: https://bugs.gentoo.org/871597
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-perl/Net-RawIP/Net-RawIP-0.250.0-r4.ebuild     | 27 +++++++
 .../Net-RawIP-0.25-Declare-used-function.patch     | 57 +++++++++++++
 .../Net-RawIP-0.25-Silent-compiler-warnings.patch  | 94 ++++++++++++++++++++++
 ...se-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch | 31 +++++++
 4 files changed, 209 insertions(+)

diff --git a/dev-perl/Net-RawIP/Net-RawIP-0.250.0-r4.ebuild b/dev-perl/Net-RawIP/Net-RawIP-0.250.0-r4.ebuild
new file mode 100644
index 000000000000..3c9b746fde28
--- /dev/null
+++ b/dev-perl/Net-RawIP/Net-RawIP-0.250.0-r4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=SAPER
+DIST_VERSION=0.25
+DIST_EXAMPLES=("examples/*")
+inherit perl-module
+
+DESCRIPTION="Raw IP packets manipulation Module"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}"
+
+PERL_RM_FILES=( "t/90-pod.t" "t/91-pod-coverage.t" "t/99-critic.t" )
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.25-no-network-tests.patch"
+	"${FILESDIR}/${PN}-0.25-Declare-used-function.patch"
+	"${FILESDIR}/${PN}-0.25-Silent-compiler-warnings.patch"
+	"${FILESDIR}/${PN}-0.25-Use-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch"
+)

diff --git a/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Declare-used-function.patch b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Declare-used-function.patch
new file mode 100644
index 000000000000..29ba94b9a884
--- /dev/null
+++ b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Declare-used-function.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/871597
+https://rt.cpan.org/Public/Bug/Display.html?id=124134
+
+From ebb883cb2e2f0031fd947bf36c0f089e5a5352ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 19 Jan 2018 15:47:40 +0100
+Subject: [PATCH] Decalare used function
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC warns about implicit declarations of functions used in RawIP.xs
+but defined in eth.c. This patch adds their declarations into eth.h.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ MANIFEST | 1 +
+ RawIP.xs | 1 +
+ eth.h    | 3 +++
+ 3 files changed, 5 insertions(+)
+ create mode 100644 eth.h
+
+diff --git a/MANIFEST b/MANIFEST
+index 9bfa0ee..1211b02 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -18,6 +18,7 @@ lib/Net/RawIP/udphdr.pm
+ RawIP.xs
+ RawIP/libpcap.pod
+ eth.c
++eth.h
+ ifaddrlist.c
+ ifaddrlist.h
+ ip.h
+diff --git a/RawIP.xs b/RawIP.xs
+index cddc523..234ea5d 100644
+--- a/RawIP.xs
++++ b/RawIP.xs
+@@ -31,6 +31,7 @@ extern "C" {
+ #include <sys/cdefs.h>
+ #endif
+ #include "ifaddrlist.h"
++#include "eth.h"
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <pcap.h>
+diff --git a/eth.h b/eth.h
+new file mode 100644
+index 0000000..ab28b45
+--- /dev/null
++++ b/eth.h
+@@ -0,0 +1,3 @@
++int tap(char *dev,unsigned int *my_eth_ip,unsigned char *my_eth_mac);
++int mac_disc(unsigned int addr,unsigned char * eth_mac);
++void send_eth_packet(int fd, char* eth_device, u_char *pkt, int len, int flag);
+-- 
+2.13.6

diff --git a/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Silent-compiler-warnings.patch b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Silent-compiler-warnings.patch
new file mode 100644
index 000000000000..564914b821c7
--- /dev/null
+++ b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Silent-compiler-warnings.patch
@@ -0,0 +1,94 @@
+https://bugs.gentoo.org/871597
+https://rt.cpan.org/Public/Bug/Display.html?id=124134
+
+From ee4e010724ea0106f0ebdf572c6b55573122f12b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 19 Jan 2018 15:56:05 +0100
+Subject: [PATCH] Silent compiler warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ RawIP.xs     | 12 +++---------
+ eth.c        |  5 ++++-
+ ifaddrlist.c |  3 +--
+ 3 files changed, 8 insertions(+), 12 deletions(-)
+
+diff --git a/RawIP.xs b/RawIP.xs
+index 234ea5d..143c65f 100644
+--- a/RawIP.xs
++++ b/RawIP.xs
+@@ -166,14 +166,6 @@ u_long host_to_ip (char *host_name);
+ void pkt_send(int fd, unsigned char *sock, u_char *pkt, int size);
+ int linkoffset(int);
+  
+-static int
+-not_here(s)
+-    char *s;
+-{
+-    croak("%s not implemented on this architecture", s);
+-    return -1;
+-}
+-
+ static double
+ constant(name, arg)
+     char *name;
+@@ -592,6 +584,8 @@ CODE:
+     memset(dev,0,16);
+     len = ip_rt_dev(addr,dev);
+     RETVAL = newSVpv(dev,len); 
++#else
++    PERL_UNUSED_ARG(addr);
+ #endif
+ #if !defined(_LINUX_) && !defined(_BPF_)
+     croak("rdev() is not implemented on this system");
+@@ -689,7 +683,7 @@ send_eth_packet(fd,eth_device,pkt,flag)
+     SV* pkt
+     int flag
+ CODE:
+-    send_eth_packet(fd, eth_device, (char*)SvPV(pkt,PL_na), SvCUR(pkt),flag);
++    send_eth_packet(fd, eth_device, (unsigned char*)SvPV(pkt,PL_na), SvCUR(pkt),flag);
+ 
+ AV * 
+ eth_parse(pkt)
+diff --git a/eth.c b/eth.c
+index 48aeed2..a36a9ab 100644
+--- a/eth.c
++++ b/eth.c
+@@ -235,7 +235,10 @@ int
+ tap(char *dev,unsigned int *my_eth_ip,unsigned char *my_eth_mac)
+ {
+  
+-    int fd,v,s;
++    int fd;
++#ifdef _BPF_
++    int v,s;
++#endif
+     struct ifreq ifr;
+     (void)strcpy(ifr.ifr_name, dev);
+ #ifndef _BPF_
+diff --git a/ifaddrlist.c b/ifaddrlist.c
+index 0729b2b..b60ef3c 100644
+--- a/ifaddrlist.c
++++ b/ifaddrlist.c
+@@ -41,7 +41,7 @@ ifaddrlist(register struct ifaddrlist **ipaddrp, register char *errbuf)
+ #ifdef HAVE_SOCKADDR_SA_LEN
+     register int n;
+ #endif
+-    register struct ifreq *ifrp, *ifend, *ifnext, *mp;
++    register struct ifreq *ifrp, *ifend, *ifnext;
+     register struct sockaddr_in *sin;
+     register struct ifaddrlist *al;
+     struct ifconf ifc;
+@@ -71,7 +71,6 @@ ifaddrlist(register struct ifaddrlist **ipaddrp, register char *errbuf)
+     ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len);
+ 
+     al = ifaddrlist;
+-    mp = NULL;
+     nipaddr = 0;
+     for (; ifrp < ifend; ifrp = ifnext)
+     {
+-- 
+2.13.6

diff --git a/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Use-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Use-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch
new file mode 100644
index 000000000000..362a126f552e
--- /dev/null
+++ b/dev-perl/Net-RawIP/files/Net-RawIP-0.25-Use-_DEFAULT_SOURCE-instead-of-_BSD_SOURCE.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/871597
+https://rt.cpan.org/Public/Bug/Display.html?id=124134
+
+From 32cfda724ce867d1b4a3e581b4b305b300ddfed2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 19 Jan 2018 15:39:16 +0100
+Subject: [PATCH] Use _DEFAULT_SOURCE instead of _BSD_SOURCE
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+_BSD_SOURCE is deprecated in glibc since 2.20 version.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ ifaddrlist.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ifaddrlist.c b/ifaddrlist.c
+index 41183d3..0729b2b 100644
+--- a/ifaddrlist.c
++++ b/ifaddrlist.c
+@@ -1,5 +1,5 @@
+ #ifdef   _LINUX_
+-#define  _BSD_SOURCE 1
++#define  _DEFAULT_SOURCE 1
+ #define  __FAVOR_BSD 1
+ #endif
+ 
+-- 
+2.13.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-17  3:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-16 10:53 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Net-RawIP/files/, dev-perl/Net-RawIP/ Kent Fredric
  -- strict thread matches above, loose matches on Subject: below --
2024-03-17  3:54 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox