diff options
author | Hans de Graaff <graaff@gentoo.org> | 2013-03-04 21:13:13 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2013-03-04 21:13:13 +0000 |
commit | 080630ea91650663fae04ba42d77a8253c4c2461 (patch) | |
tree | 6576ebeefdf7dc7bcac2f1b0b1ab45b4c0ce24c5 /dev-ruby/facter | |
parent | Respect CFLAGS for exec wwwget (diff) | |
download | gentoo-2-080630ea91650663fae04ba42d77a8253c4c2461.tar.gz gentoo-2-080630ea91650663fae04ba42d77a8253c4c2461.tar.bz2 gentoo-2-080630ea91650663fae04ba42d77a8253c4c2461.zip |
Version bump. Depend on specific mocha version that does not blow up. Drop requirement on old-output for net-tools. Fixes bug 456140.
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r-- | dev-ruby/facter/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/facter/facter-1.6.17.ebuild | 40 | ||||
-rw-r--r-- | dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch | 109 |
3 files changed, 157 insertions, 1 deletions
diff --git a/dev-ruby/facter/ChangeLog b/dev-ruby/facter/ChangeLog index 0f696ba435e2..fee7bbc4be25 100644 --- a/dev-ruby/facter/ChangeLog +++ b/dev-ruby/facter/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/facter # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.71 2013/02/08 14:31:31 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.72 2013/03/04 21:13:13 graaff Exp $ + +*facter-1.6.17 (04 Mar 2013) + + 04 Mar 2013; Hans de Graaff <graaff@gentoo.org> +facter-1.6.17.ebuild, + +files/facter-1.6.17-ifconfig-path.patch: + Version bump. Depend on specific mocha version that does not blow up. Drop + requirement on old-output for net-tools. Fixes bug 456140. 08 Feb 2013; Jeroen Roovers <jer@gentoo.org> facter-1.6.16.ebuild: Stable for HPPA (bug #446954). diff --git a/dev-ruby/facter/facter-1.6.17.ebuild b/dev-ruby/facter/facter-1.6.17.ebuild new file mode 100644 index 000000000000..2f00233deb88 --- /dev/null +++ b/dev-ruby/facter/facter-1.6.17.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/facter-1.6.17.ebuild,v 1.1 2013/03/04 21:13:13 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="+dmi" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" + +CDEPEND=" + >=sys-apps/net-tools-1.60_p20120127084908 + dmi? ( 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-0.10.5 )" + +ruby_all_prepare() { + # Provide explicit path since /sbin is not in the default PATH on + # Gentoo. + sed -i -e 's:arp -an:/sbin/arp -an:' lib/facter/util/ec2.rb || die +} diff --git a/dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch b/dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch new file mode 100644 index 000000000000..9ba4db751254 --- /dev/null +++ b/dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch @@ -0,0 +1,109 @@ +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/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} +@@ -103,7 +103,7 @@ + # + # @return [String] the output of `/sbin/ifconfig 2>/dev/null` or nil + def self.get_ifconfig +- Facter::Util::Resolution.exec("/sbin/ifconfig 2>/dev/null") ++ Facter::Util::Resolution.exec("/bin/ifconfig 2>/dev/null") + end + + ## +@@ -127,7 +127,7 @@ + end + + def self.ifconfig_interface(interface) +- %x{/sbin/ifconfig #{interface} 2>/dev/null} ++ %x{/bin/ifconfig #{interface} 2>/dev/null} + end + + def self.get_single_interface_output(interface) +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 |