diff options
author | Stephanie J. Lockwood-Childs <wormo@gentoo.org> | 2006-08-15 22:48:37 +0000 |
---|---|---|
committer | Stephanie J. Lockwood-Childs <wormo@gentoo.org> | 2006-08-15 22:48:37 +0000 |
commit | 8f4919f922875a915cf09e54fb9493e17aaf2946 (patch) | |
tree | 96e17792ac048b381c86e3735d0d88a267e3db8c /net-misc | |
parent | mark ~ppc (diff) | |
download | gentoo-2-8f4919f922875a915cf09e54fb9493e17aaf2946.tar.gz gentoo-2-8f4919f922875a915cf09e54fb9493e17aaf2946.tar.bz2 gentoo-2-8f4919f922875a915cf09e54fb9493e17aaf2946.zip |
mark ~ppc
add patch from Timo Weingartner to support the use of /etc/ethers
(suggested by Christian Gnägi in Bug #142760)
(Portage version: 2.1-r1)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/wakeonlan/ChangeLog | 12 | ||||
-rw-r--r-- | net-misc/wakeonlan/files/digest-wakeonlan-0.41 | 2 | ||||
-rw-r--r-- | net-misc/wakeonlan/files/digest-wakeonlan-0.41-r1 | 3 | ||||
-rw-r--r-- | net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch | 90 | ||||
-rw-r--r-- | net-misc/wakeonlan/metadata.xml | 8 | ||||
-rw-r--r-- | net-misc/wakeonlan/wakeonlan-0.40.ebuild | 4 | ||||
-rw-r--r-- | net-misc/wakeonlan/wakeonlan-0.41-r1.ebuild | 21 | ||||
-rw-r--r-- | net-misc/wakeonlan/wakeonlan-0.41.ebuild | 4 |
8 files changed, 138 insertions, 6 deletions
diff --git a/net-misc/wakeonlan/ChangeLog b/net-misc/wakeonlan/ChangeLog index 948eb07ae1fe..0a1be68c0b5d 100644 --- a/net-misc/wakeonlan/ChangeLog +++ b/net-misc/wakeonlan/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/wakeonlan -# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/ChangeLog,v 1.10 2005/11/28 13:14:46 mcummings Exp $ +# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/ChangeLog,v 1.11 2006/08/15 22:48:37 wormo Exp $ + +*wakeonlan-0.41-r1 (17 Aug 2006) + + 15 Aug 2006; Stephanie Lockwood-Childs <wormo@gentoo.org> +metadata.xml, + +files/wakeonlan-0.41-ethers-lookup.patch, +wakeonlan-0.41-r1.ebuild: + mark ~ppc + add patch from Timo Weingartner to support the use of /etc/ethers + (suggested by Christian Gnägi in Bug #142760) 28 Nov 2005; <mcumming@gentoo.org> wakeonlan-0.40.ebuild, wakeonlan-0.41.ebuild: diff --git a/net-misc/wakeonlan/files/digest-wakeonlan-0.41 b/net-misc/wakeonlan/files/digest-wakeonlan-0.41 index 54afe0ffe4ef..25540b495a09 100644 --- a/net-misc/wakeonlan/files/digest-wakeonlan-0.41 +++ b/net-misc/wakeonlan/files/digest-wakeonlan-0.41 @@ -1 +1,3 @@ MD5 d3143c5fe92d16196ac853b55dd421b5 wakeonlan-0.41.tar.gz 6028 +RMD160 ddbc2af097bb46bd8afd2c37007c5ed5291ee0e7 wakeonlan-0.41.tar.gz 6028 +SHA256 581b1b27a7e810ab72668cce4bd9aa9b3e0cea34b2db24dd1a44c09d63ddda98 wakeonlan-0.41.tar.gz 6028 diff --git a/net-misc/wakeonlan/files/digest-wakeonlan-0.41-r1 b/net-misc/wakeonlan/files/digest-wakeonlan-0.41-r1 new file mode 100644 index 000000000000..25540b495a09 --- /dev/null +++ b/net-misc/wakeonlan/files/digest-wakeonlan-0.41-r1 @@ -0,0 +1,3 @@ +MD5 d3143c5fe92d16196ac853b55dd421b5 wakeonlan-0.41.tar.gz 6028 +RMD160 ddbc2af097bb46bd8afd2c37007c5ed5291ee0e7 wakeonlan-0.41.tar.gz 6028 +SHA256 581b1b27a7e810ab72668cce4bd9aa9b3e0cea34b2db24dd1a44c09d63ddda98 wakeonlan-0.41.tar.gz 6028 diff --git a/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch b/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch new file mode 100644 index 000000000000..6cbc355e2854 --- /dev/null +++ b/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch @@ -0,0 +1,90 @@ +--- wakeonlan-0.41.orig/wakeonlan ++++ wakeonlan-0.41/wakeonlan +@@ -5,6 +5,7 @@ + ######################################################################### + + use strict; ++use Net::hostent; + use Socket; + use Getopt::Std; + use vars qw($VERSION $opt_v $opt_h $opt_i $opt_p $opt_f); +@@ -44,19 +45,64 @@ + + sub wake + { +- my $hwaddr = shift; ++ my $host = shift; + my $ipaddr = shift || $DEFAULT_IP; + my $port = shift || $DEFAULT_PORT; + + my ($raddr, $them, $proto); +- my ($hwaddr_re, $pkt); ++ my ($hwaddr, $hwaddr_re, $pkt); + +- # Validate hardware address (ethernet address) ++ # get the hardware address (ethernet address) + + $hwaddr_re = join(':', ('[0-9A-Fa-f]{1,2}') x 6); +- if ($hwaddr !~ m/^$hwaddr_re$/) { +- warn "Invalid hardware address: $hwaddr\n"; +- return undef; ++ if ($host =~ m/^$hwaddr_re$/) { ++ $hwaddr = $host; ++ } else { ++ # $host is not a hardware address, try to resolve it ++ my $ip_re = join('\.', ('([0-9]|[1-9][0-9]|1[0-9]{2}|2([0-4][0-9]|5[0-5]))') x 4); ++ my $ip_addr; ++ if ($host =~ m/^$ip_re$/) { ++ $ip_addr = $host; ++ } else { ++ my $h; ++ unless ($h = gethost($host)) { ++ warn "$host is not a hardware address and I could not resolve it as to an IP address.\n"; ++ return undef; ++ } ++ $ip_addr = inet_ntoa($h->addr); ++ } ++ # look up ip in /etc/ethers ++ unless (open (ETHERS, '<', '/etc/ethers')) { ++ warn "$host is not a hardware address and I could not open /etc/ethers.\n"; ++ return undef; ++ } ++ while (<ETHERS>) { ++ if (($_ !~ m/^$/) && ($_ !~ m/^#/)) { # ignore comments ++ my ($mac, $ip); ++ ($mac, $ip) = split(' ', $_, 3); ++ if ($ip =~ m/^$ip$/) { ++ if ($ip eq $ip_addr) { ++ $hwaddr = $mac; ++ last; ++ } ++ next; ++ } else { ++ my $h2; ++ unless ($h2 = gethost($ip)) { ++ next; ++ } ++ if (inet_ntoa($h2->addr) eq $ip_addr) { ++ $hwaddr = $mac; ++ last; ++ } ++ } ++ } ++ } ++ close (ETHERS); ++ unless (defined($hwaddr)) { ++ warn "Could not find $host in /etc/ethers\n"; ++ return undef; ++ } + } + + # Generate magic sequence +@@ -68,7 +114,7 @@ + + # Allocate socket and send packet + +- $raddr = gethostbyname($ipaddr); ++ $raddr = gethostbyname($ipaddr)->addr; + $them = pack_sockaddr_in($port, $raddr); + $proto = getprotobyname('udp'); + diff --git a/net-misc/wakeonlan/metadata.xml b/net-misc/wakeonlan/metadata.xml new file mode 100644 index 000000000000..73420b6cf0f0 --- /dev/null +++ b/net-misc/wakeonlan/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</maintainer> +</pkgmetadata> diff --git a/net-misc/wakeonlan/wakeonlan-0.40.ebuild b/net-misc/wakeonlan/wakeonlan-0.40.ebuild index 400716dade87..d84ecfab32d1 100644 --- a/net-misc/wakeonlan/wakeonlan-0.40.ebuild +++ b/net-misc/wakeonlan/wakeonlan-0.40.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/wakeonlan-0.40.ebuild,v 1.9 2005/11/28 13:14:46 mcummings Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/wakeonlan-0.40.ebuild,v 1.10 2006/08/15 22:48:37 wormo Exp $ inherit perl-app diff --git a/net-misc/wakeonlan/wakeonlan-0.41-r1.ebuild b/net-misc/wakeonlan/wakeonlan-0.41-r1.ebuild new file mode 100644 index 000000000000..6f35e36bd698 --- /dev/null +++ b/net-misc/wakeonlan/wakeonlan-0.41-r1.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/wakeonlan-0.41-r1.ebuild,v 1.1 2006/08/15 22:48:37 wormo Exp $ + +inherit eutils +inherit perl-app + +DESCRIPTION="Client for Wake-On-LAN" +HOMEPAGE="http://gsd.di.uminho.pt/jpo/software/wakeonlan/" +SRC_URI="http://gsd.di.uminho.pt/jpo/software/wakeonlan/downloads/${P}.tar.gz" + +LICENSE="Artistic GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-ethers-lookup.patch +} diff --git a/net-misc/wakeonlan/wakeonlan-0.41.ebuild b/net-misc/wakeonlan/wakeonlan-0.41.ebuild index e785deea0ea5..0803c65a05ca 100644 --- a/net-misc/wakeonlan/wakeonlan-0.41.ebuild +++ b/net-misc/wakeonlan/wakeonlan-0.41.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/wakeonlan-0.41.ebuild,v 1.2 2005/11/28 13:14:46 mcummings Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/wakeonlan/wakeonlan-0.41.ebuild,v 1.3 2006/08/15 22:48:37 wormo Exp $ inherit perl-app |