diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-12-15 17:25:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-12-15 17:25:28 +0000 |
commit | 6b933047f46efec1aa747570f945344254227457 (patch) | |
tree | a12a4b87b38f954c4de435272cf4b90d721df5e8 /dev-perl/Net-ARP | |
parent | f45955e60d4da9b7f4a1088c98042f9c06669039 (diff) |
gentoo resync : 15.12.2017
Diffstat (limited to 'dev-perl/Net-ARP')
-rw-r--r-- | dev-perl/Net-ARP/Manifest | 3 | ||||
-rw-r--r-- | dev-perl/Net-ARP/Net-ARP-1.0.9-r1.ebuild | 40 | ||||
-rw-r--r-- | dev-perl/Net-ARP/files/Net-ARP-1.0.9-perl-5.26.patch | 26 | ||||
-rw-r--r-- | dev-perl/Net-ARP/files/Net-ARP-1.0.9-tests.patch | 117 |
4 files changed, 186 insertions, 0 deletions
diff --git a/dev-perl/Net-ARP/Manifest b/dev-perl/Net-ARP/Manifest index 49cd91b0ac9e..480dc28fa00e 100644 --- a/dev-perl/Net-ARP/Manifest +++ b/dev-perl/Net-ARP/Manifest @@ -1,4 +1,7 @@ AUX 1.0.9-header.diff 210 BLAKE2B 08a4283859b9c59dc0293f59ac5e2b748397db5be77ffe27d1ffa41badf39f451ae231012567ab271bcb60922b1fb36e8750eae264db66e48b8f3ade92ceda93 SHA512 7039ba119eccf1915a86a0b544242c5b384c6fef8e65e9d6b04fe87985e16acd861f02cdf6ae6ff05a8df7f5c77afb4e0146f6b791e35c4451e6dfc64f2905ca +AUX Net-ARP-1.0.9-perl-5.26.patch 589 BLAKE2B 72f751d5be3c6e6c181788d91bf816ffe9b73f9eb87579d060bf97649453b836c621967f656a36b0f70d97149cdf8385fc1ae8a4d973d024f7bd23bd72cc9c69 SHA512 ad29464f0322abdacd3ea88fec4acfeac5435f2198c017285d996b047bf94c8bcfbdb92be1580e223df550bce4db5fcc1a2b9313b93466d8c9ccd82695548626 +AUX Net-ARP-1.0.9-tests.patch 3059 BLAKE2B d63a1e4bcd0386107f27d3496322189965451290b8972dbdcad12144296bc939d3012c1e20e18a093f13e515fb1c514b1840a3aff8f83066b6b7f456c3cd5f98 SHA512 1e5fec8e97179aa1035a343106d453bfb90c46613bbcd72a6ceaa54c226a179812b432b980c17c272b017077542f0841339e0fc0133d98b67dd2531b53969f6e DIST Net-ARP-1.0.9.tgz 71377 BLAKE2B 32fb8c31546e708273a6cf8251edc97dd5300fde872ac2c3ee4d54114354abac33959c01705f160f46c4833a72bcc6e4f0b4067722fe2d04995828f6de019dd3 SHA512 c2dc333ab4675709a4b2d9e53cbcc2f7cb226b89c366a841240d9b8a72802f2ad68c8acc40b27878c720198b63df34cd26091cd5f3ae528b597d4b214a316a91 +EBUILD Net-ARP-1.0.9-r1.ebuild 849 BLAKE2B 414cc504ad73a43e103d2a7c7a13f023167fb94bde7e79727a8b4a218073ee4e25dc1ef259293b38e0aa7e8243c6632c479649be73fe562e1bc34b7c6d9a6488 SHA512 257816fe1ff7111cc27d881c67cf76f6f54a63fee50308b12f753bdbff158779dafb1b57532ed5ab0e8b385f485b388c48f558226ae380c6a0f61de7cd66593d EBUILD Net-ARP-1.0.9.ebuild 501 BLAKE2B 30fd6489aa78073ab92ba588cc8682d7535bbf67c7db6672a196bedb3a37d27e8145aa159c86ecffecfb895176641e90fb545651d37295e235ae3d1863b5eeb2 SHA512 845a133ef01b650acc3561566bd0b07b294c2d04eeafed04173d86f60f652b757c537046f9098def00d9425258f2f826c5471539e562e643fa1fe4f5906ebd08 MISC metadata.xml 386 BLAKE2B 729b9fd9de59ae0a25475d3765d1cf161a29550e4ec5d412d5b6d1caffb49d4dc14fe72a1bb5ff4d88f7dccf871cac668b169632574e9e0f24100174b6d22968 SHA512 a19e8fbddc2ab3d4e517a4dd405a8ddf974c68b4c6c104d8994d51b2cdb2d44b5a02c1791a12611f48a3c4ab11873f09be07d61b55f78e6c042b4d6d034a2bb7 diff --git a/dev-perl/Net-ARP/Net-ARP-1.0.9-r1.ebuild b/dev-perl/Net-ARP/Net-ARP-1.0.9-r1.ebuild new file mode 100644 index 000000000000..30628f62959b --- /dev/null +++ b/dev-perl/Net-ARP/Net-ARP-1.0.9-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DIST_AUTHOR=CRAZYDJ +DIST_VERSION=1.0.9 +DIST_A_EXT=tgz +inherit perl-module + +DESCRIPTION="Perl extension for creating ARP packets" + +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="dev-perl/Net-Pcap" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${FILESDIR}/1.0.9-header.diff" + "${FILESDIR}/${PN}-1.0.9-perl-5.26.patch" + "${FILESDIR}/${PN}-1.0.9-tests.patch" +) + +src_prepare() { + perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile();' + perl-module_src_prepare +} + +src_test() { + if [[ $EUID != 0 || -z $TEST_ARP_IF ]]; then + elog "Comprehensive testing needs additional configuration (and root)." + elog "For details, see:" + elog "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}" + fi + perl-module_src_test +} diff --git a/dev-perl/Net-ARP/files/Net-ARP-1.0.9-perl-5.26.patch b/dev-perl/Net-ARP/files/Net-ARP-1.0.9-perl-5.26.patch new file mode 100644 index 000000000000..c15f1d06630c --- /dev/null +++ b/dev-perl/Net-ARP/files/Net-ARP-1.0.9-perl-5.26.patch @@ -0,0 +1,26 @@ +From 56f7021306fe1dbd3b83981062acf2db7e296447 Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentnl@gentoo.org> +Date: Wed, 13 Dec 2017 21:38:52 +1300 +Subject: Fix loading ARP.pm on Perl 5.26 + +This is now broken without '.' in @INC +--- + t/ARP.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/ARP.t b/t/ARP.t +index 9b3ef08..bab58aa 100755 +--- a/t/ARP.t ++++ b/t/ARP.t +@@ -6,7 +6,7 @@ + # change 'tests => 1' to 'tests => last_test_to_print'; + + use Test::More tests => 1; +-BEGIN { use_ok('ARP') }; ++BEGIN { use_ok('Net::ARP') }; + + ######################### + +-- +2.14.3 + diff --git a/dev-perl/Net-ARP/files/Net-ARP-1.0.9-tests.patch b/dev-perl/Net-ARP/files/Net-ARP-1.0.9-tests.patch new file mode 100644 index 000000000000..3cd799a629b7 --- /dev/null +++ b/dev-perl/Net-ARP/files/Net-ARP-1.0.9-tests.patch @@ -0,0 +1,117 @@ +From 38c823ef25d78205e24314233ae7a503967b53e9 Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentnl@gentoo.org> +Date: Wed, 13 Dec 2017 22:22:20 +1300 +Subject: Guard tests that require network device names and root via ENV + +--- + Makefile.PL | 9 --------- + t/arp_lookup.t | 10 ++++++++-- + t/send_packet.t | 13 +++++++++++-- + test.pl | 23 ++++++++--------------- + 4 files changed, 27 insertions(+), 28 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index e1a4ee7..fbfe0b0 100755 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -18,15 +18,6 @@ + use ExtUtils::MakeMaker; + use Config; + +-BEGIN { +- eval { require Net::Pcap }; +- +- if($@) +- { +- print "Module Net::Pcap is required for make test!\n"; +- } +-} +- + if($Config{'osname'} =~ /linux/i) + { + $flags = "-DLINUX"; +diff --git a/t/arp_lookup.t b/t/arp_lookup.t +index 4cf9626..df68c90 100644 +--- a/t/arp_lookup.t ++++ b/t/arp_lookup.t +@@ -13,8 +13,14 @@ ok( $mac eq "unknown", "unkown mac on strange dev value -> $mac" ); + $mac = Net::ARP::arp_lookup("$fu","127.0.0.1"); + ok( $mac eq "unknown", "unkown mac on strange dev value 2 -> $mac" ); + +-$mac = Net::ARP::arp_lookup("eth0","this_is_not_an_ip_address"); +-ok( $mac eq "unknown", "unkown mac on strange ip value -> $mac" ); ++SKIP: { ++ ++ skip "TEST_ARP_IF unset", 1 unless exists $ENV{TEST_ARP_IF}; ++ ++ $mac = Net::ARP::arp_lookup($ENV{TEST_ARP_IF},"this_is_not_an_ip_address"); ++ ok( $mac eq "unknown", "unkown mac on strange ip value -> $mac" ); ++ ++} + + #Net::ARP::arp_lookup("eth0","192.168.1.1","fu"); + #ok( $mac eq "unknown", "unkown mac on strange mac value" ); +diff --git a/t/send_packet.t b/t/send_packet.t +index 1f95f4f..3b4b998 100644 +--- a/t/send_packet.t ++++ b/t/send_packet.t +@@ -5,9 +5,18 @@ + # Last update: 22.06.2013 + + use Net::ARP; +-use Test::More qw( no_plan ); ++use Test::More; ++BEGIN { ++ if ( $> != 0 ) { ++ plan skip_all => "This test must be run as root"; ++ } ++ if ( not exists $ENV{TEST_ARP_IF} ) { ++ plan skip_all => "TEST_ARP_IF not specified"; ++ } ++ $dev = $ENV{TEST_ARP_IF}; ++ plan qw/no_plan/; ++} + +-$dev="lo"; + print "Using device $dev to test send_packet()\n"; + + $ret = Net::ARP::send_packet("strange_dev", # network interface +diff --git a/test.pl b/test.pl +index 27af515..c2e4cc2 100755 +--- a/test.pl ++++ b/test.pl +@@ -19,23 +19,16 @@ + use ExtUtils::testlib; + use Net::ARP; + +-BEGIN +-{ +- eval{ require Net::Pcap; }; +- +- if($@ =~ /^Can\'t\slocate/) +- { +- $dev = "eth0"; +- } +- else +- { +- import Net::Pcap; +- $dev = Net::Pcap::lookupdev(\$errbuf); +- } ++if ( $> != 0 ) { ++ print "SKIPPED: test must be run as root\n"; ++ exit 0; + } +- ++if ( not exists $ENV{TEST_ARP_IF} ) { ++ print "SKIPPED: TEST_ARP_IF unset\n"; ++ exit 0; ++} ++$dev = $ENV{TEST_ARP_IF}; + print "Sending ARP reply packet via dev $dev... "; +- + $ret = Net::ARP::send_packet($dev, # network interface + '127.0.0.1', # source ip + '127.0.0.1', # destination ip +-- +2.14.3 + |