summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2012-12-02 19:24:11 +0000
committerHans de Graaff <graaff@gentoo.org>2012-12-02 19:24:11 +0000
commit4c01fc092069aa71c22070c241ca1a8a2f84cb92 (patch)
tree1124e1cdbe218e4c6a35206c785e6f0f12f734e1 /dev-ruby
parentRemove redundant use of PYTHON_DEPS. (diff)
downloadgentoo-2-4c01fc092069aa71c22070c241ca1a8a2f84cb92.tar.gz
gentoo-2-4c01fc092069aa71c22070c241ca1a8a2f84cb92.tar.bz2
gentoo-2-4c01fc092069aa71c22070c241ca1a8a2f84cb92.zip
Version bump. Depend on latest net-tools and patch location of ifconfig. Fixes bug 432452.
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/facter/ChangeLog9
-rw-r--r--dev-ruby/facter/facter-1.6.16.ebuild34
-rw-r--r--dev-ruby/facter/files/facter-1.6.16-ifconfig-path.patch103
3 files changed, 145 insertions, 1 deletions
diff --git a/dev-ruby/facter/ChangeLog b/dev-ruby/facter/ChangeLog
index 7733feb58956..1798c84d6a9f 100644
--- a/dev-ruby/facter/ChangeLog
+++ b/dev-ruby/facter/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-ruby/facter
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.61 2012/12/02 18:58:29 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.62 2012/12/02 19:24:11 graaff Exp $
+
+*facter-1.6.16 (02 Dec 2012)
+
+ 02 Dec 2012; Hans de Graaff <graaff@gentoo.org> +facter-1.6.16.ebuild,
+ +files/facter-1.6.16-ifconfig-path.patch:
+ Version bump. Depend on latest net-tools and patch location of ifconfig.
+ Fixes bug 432452.
02 Dec 2012; Hans de Graaff <graaff@gentoo.org> facter-1.6.0.ebuild,
facter-1.6.3.ebuild, facter-1.6.14.ebuild:
diff --git a/dev-ruby/facter/facter-1.6.16.ebuild b/dev-ruby/facter/facter-1.6.16.ebuild
new file mode 100644
index 000000000000..76f239a491f7
--- /dev/null
+++ b/dev-ruby/facter/facter-1.6.16.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/facter-1.6.16.ebuild,v 1.1 2012/12/02 19:24:11 graaff Exp $
+
+EAPI=5
+
+USE_RUBY="ruby18 ruby19 ree18 jruby"
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_RECIPE_TEST="rspec"
+RUBY_FAKEGEM_EXTRADOC="README.md"
+RUBY_FAKEGEM_BINWRAP="facter"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A cross-platform Ruby library for retrieving facts from operating systems"
+HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+CDEPEND="
+ >=sys-apps/net-tools-1.60_p20120127084908[old-output]
+ sys-apps/dmidecode
+ sys-apps/lsb-release
+ sys-apps/pciutils"
+
+RDEPEND+=" ${CDEPEND}"
+DEPEND+=" test? ( ${CDEPEND} )"
+
+RUBY_PATCHES=( ${P}-ifconfig-path.patch )
+
+ruby_add_bdepend "test? ( dev-ruby/mocha )"
diff --git a/dev-ruby/facter/files/facter-1.6.16-ifconfig-path.patch b/dev-ruby/facter/files/facter-1.6.16-ifconfig-path.patch
new file mode 100644
index 000000000000..347eefca8a26
--- /dev/null
+++ b/dev-ruby/facter/files/facter-1.6.16-ifconfig-path.patch
@@ -0,0 +1,103 @@
+diff -ru ruby19/facter-1.6.16/lib/facter/ipaddress6.rb all/facter-1.6.16/lib/facter/ipaddress6.rb
+--- ruby19/facter-1.6.16/lib/facter/ipaddress6.rb 2012-12-02 20:01:43.841753654 +0100
++++ all/facter-1.6.16/lib/facter/ipaddress6.rb 2012-12-02 20:07:19.076607117 +0100
+@@ -38,7 +38,7 @@
+ Facter.add(:ipaddress6) do
+ confine :kernel => :linux
+ setcode do
+- output = Facter::Util::Resolution.exec('/sbin/ifconfig 2>/dev/null')
++ output = Facter::Util::Resolution.exec('/bin/ifconfig 2>/dev/null')
+
+ get_address_after_token(output, 'inet6 addr:')
+ end
+diff -ru ruby19/facter-1.6.16/lib/facter/ipaddress.rb all/facter-1.6.16/lib/facter/ipaddress.rb
+--- ruby19/facter-1.6.16/lib/facter/ipaddress.rb 2012-12-02 20:01:43.841753654 +0100
++++ all/facter-1.6.16/lib/facter/ipaddress.rb 2012-12-02 20:07:28.368353632 +0100
+@@ -26,7 +26,7 @@
+ confine :kernel => :linux
+ setcode do
+ ip = nil
+- output = %x{/sbin/ifconfig 2>/dev/null}
++ output = %x{/bin/ifconfig 2>/dev/null}
+
+ output.split(/^\S/).each { |str|
+ if str =~ /inet addr:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
+diff -ru ruby19/facter-1.6.16/lib/facter/macaddress.rb all/facter-1.6.16/lib/facter/macaddress.rb
+--- ruby19/facter-1.6.16/lib/facter/macaddress.rb 2012-12-02 20:01:43.845753542 +0100
++++ all/facter-1.6.16/lib/facter/macaddress.rb 2012-12-02 20:06:44.049562697 +0100
+@@ -26,7 +26,7 @@
+ confine :kernel => 'Linux'
+ setcode do
+ ether = []
+- output = Facter::Util::Resolution.exec("/sbin/ifconfig -a 2>/dev/null")
++ output = Facter::Util::Resolution.exec("/bin/ifconfig -a 2>/dev/null")
+ output.each_line do |s|
+ ether.push($1) if s =~ /(?:ether|HWaddr) ((\w{1,2}:){5,}\w{1,2})/
+ end
+diff -ru ruby19/facter-1.6.16/lib/facter/util/ip.rb all/facter-1.6.16/lib/facter/util/ip.rb
+--- ruby19/facter-1.6.16/lib/facter/util/ip.rb 2012-12-02 20:01:43.845753542 +0100
++++ all/facter-1.6.16/lib/facter/util/ip.rb 2012-12-02 20:05:58.594802786 +0100
+@@ -76,7 +76,9 @@
+
+ def self.get_all_interface_output
+ case Facter.value(:kernel)
+- when 'Linux', 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 'DragonFly'
++ when 'Linux'
++ output = %x{/bin/ifconfig -a 2>/dev/null}
++ when 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 'DragonFly'
+ output = %x{/sbin/ifconfig -a 2>/dev/null}
+ when 'SunOS'
+ output = %x{/usr/sbin/ifconfig -a}
+diff -ru ruby19/facter-1.6.16/lib/facter/util/netmask.rb all/facter-1.6.16/lib/facter/util/netmask.rb
+--- ruby19/facter-1.6.16/lib/facter/util/netmask.rb 2012-12-02 20:01:43.845753542 +0100
++++ all/facter-1.6.16/lib/facter/util/netmask.rb 2012-12-02 20:04:39.664956233 +0100
+@@ -7,7 +7,7 @@
+ case Facter.value(:kernel)
+ when 'Linux'
+ ops = {
+- :ifconfig => '/sbin/ifconfig 2>/dev/null',
++ :ifconfig => '/bin/ifconfig 2>/dev/null',
+ :regex => %r{\s+ inet\saddr: #{Facter.ipaddress} .*? Mask: (#{ipregex})}x,
+ :munge => nil,
+ }
+diff -ru ruby19/facter-1.6.16/spec/unit/ipaddress6_spec.rb all/facter-1.6.16/spec/unit/ipaddress6_spec.rb
+--- ruby19/facter-1.6.16/spec/unit/ipaddress6_spec.rb 2012-12-02 20:01:43.857753215 +0100
++++ all/facter-1.6.16/spec/unit/ipaddress6_spec.rb 2012-12-02 20:10:38.379170335 +0100
+@@ -25,7 +25,7 @@
+
+ it "should return ipaddress6 information for Linux" do
+ Facter::Util::Resolution.stubs(:exec).with('uname -s').returns('Linux')
+- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig 2>/dev/null').
++ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig 2>/dev/null').
+ returns(ifconfig_fixture('linux_ifconfig_all_with_multiple_interfaces'))
+
+ Facter.value(:ipaddress6).should == "2610:10:20:209:212:3fff:febe:2201"
+diff -ru ruby19/facter-1.6.16/spec/unit/macaddress_spec.rb all/facter-1.6.16/spec/unit/macaddress_spec.rb
+--- ruby19/facter-1.6.16/spec/unit/macaddress_spec.rb 2012-12-02 20:01:43.857753215 +0100
++++ all/facter-1.6.16/spec/unit/macaddress_spec.rb 2012-12-02 20:10:01.604173469 +0100
+@@ -22,14 +22,14 @@
+ end
+
+ it "should return the macaddress of the first interface" do
+- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig -a 2>/dev/null').
++ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig -a 2>/dev/null').
+ returns(ifconfig_fixture('linux_ifconfig_all_with_multiple_interfaces'))
+
+ Facter.value(:macaddress).should == "00:12:3f:be:22:01"
+ end
+
+ it "should return nil when no macaddress can be found" do
+- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig -a 2>/dev/null').
++ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig -a 2>/dev/null').
+ returns(ifconfig_fixture('linux_ifconfig_no_mac'))
+
+ proc { Facter.value(:macaddress) }.should_not raise_error
+@@ -38,7 +38,7 @@
+
+ # some interfaces dont have a real mac addresses (like venet inside a container)
+ it "should return nil when no interface has a real macaddress" do
+- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig -a 2>/dev/null').
++ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig -a 2>/dev/null').
+ returns(ifconfig_fixture('linux_ifconfig_venet'))
+
+ proc { Facter.value(:macaddress) }.should_not raise_error