1 |
graaff 13/03/04 21:13:13 |
2 |
|
3 |
Added: facter-1.6.17-ifconfig-path.patch |
4 |
Log: |
5 |
Version bump. Depend on specific mocha version that does not blow up. Drop requirement on old-output for net-tools. Fixes bug 456140. |
6 |
|
7 |
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/facter/files/facter-1.6.17-ifconfig-path.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: facter-1.6.17-ifconfig-path.patch |
16 |
=================================================================== |
17 |
diff -ru ruby19/facter-1.6.16/lib/facter/ipaddress6.rb all/facter-1.6.16/lib/facter/ipaddress6.rb |
18 |
--- ruby19/facter-1.6.16/lib/facter/ipaddress6.rb 2012-12-02 20:01:43.841753654 +0100 |
19 |
+++ all/facter-1.6.16/lib/facter/ipaddress6.rb 2012-12-02 20:07:19.076607117 +0100 |
20 |
@@ -38,7 +38,7 @@ |
21 |
Facter.add(:ipaddress6) do |
22 |
confine :kernel => :linux |
23 |
setcode do |
24 |
- output = Facter::Util::Resolution.exec('/sbin/ifconfig 2>/dev/null') |
25 |
+ output = Facter::Util::Resolution.exec('/bin/ifconfig 2>/dev/null') |
26 |
|
27 |
get_address_after_token(output, 'inet6 addr:') |
28 |
end |
29 |
diff -ru ruby19/facter-1.6.16/lib/facter/macaddress.rb all/facter-1.6.16/lib/facter/macaddress.rb |
30 |
--- ruby19/facter-1.6.16/lib/facter/macaddress.rb 2012-12-02 20:01:43.845753542 +0100 |
31 |
+++ all/facter-1.6.16/lib/facter/macaddress.rb 2012-12-02 20:06:44.049562697 +0100 |
32 |
@@ -26,7 +26,7 @@ |
33 |
confine :kernel => 'Linux' |
34 |
setcode do |
35 |
ether = [] |
36 |
- output = Facter::Util::Resolution.exec("/sbin/ifconfig -a 2>/dev/null") |
37 |
+ output = Facter::Util::Resolution.exec("/bin/ifconfig -a 2>/dev/null") |
38 |
output.each_line do |s| |
39 |
ether.push($1) if s =~ /(?:ether|HWaddr) ((\w{1,2}:){5,}\w{1,2})/ |
40 |
end |
41 |
diff -ru ruby19/facter-1.6.16/lib/facter/util/ip.rb all/facter-1.6.16/lib/facter/util/ip.rb |
42 |
--- ruby19/facter-1.6.16/lib/facter/util/ip.rb 2012-12-02 20:01:43.845753542 +0100 |
43 |
+++ all/facter-1.6.16/lib/facter/util/ip.rb 2012-12-02 20:05:58.594802786 +0100 |
44 |
@@ -76,7 +76,9 @@ |
45 |
|
46 |
def self.get_all_interface_output |
47 |
case Facter.value(:kernel) |
48 |
- when 'Linux', 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 'DragonFly' |
49 |
+ when 'Linux' |
50 |
+ output = %x{/bin/ifconfig -a 2>/dev/null} |
51 |
+ when 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 'DragonFly' |
52 |
output = %x{/sbin/ifconfig -a 2>/dev/null} |
53 |
when 'SunOS' |
54 |
output = %x{/usr/sbin/ifconfig -a} |
55 |
@@ -103,7 +103,7 @@ |
56 |
# |
57 |
# @return [String] the output of `/sbin/ifconfig 2>/dev/null` or nil |
58 |
def self.get_ifconfig |
59 |
- Facter::Util::Resolution.exec("/sbin/ifconfig 2>/dev/null") |
60 |
+ Facter::Util::Resolution.exec("/bin/ifconfig 2>/dev/null") |
61 |
end |
62 |
|
63 |
## |
64 |
@@ -127,7 +127,7 @@ |
65 |
end |
66 |
|
67 |
def self.ifconfig_interface(interface) |
68 |
- %x{/sbin/ifconfig #{interface} 2>/dev/null} |
69 |
+ %x{/bin/ifconfig #{interface} 2>/dev/null} |
70 |
end |
71 |
|
72 |
def self.get_single_interface_output(interface) |
73 |
diff -ru ruby19/facter-1.6.16/lib/facter/util/netmask.rb all/facter-1.6.16/lib/facter/util/netmask.rb |
74 |
--- ruby19/facter-1.6.16/lib/facter/util/netmask.rb 2012-12-02 20:01:43.845753542 +0100 |
75 |
+++ all/facter-1.6.16/lib/facter/util/netmask.rb 2012-12-02 20:04:39.664956233 +0100 |
76 |
@@ -7,7 +7,7 @@ |
77 |
case Facter.value(:kernel) |
78 |
when 'Linux' |
79 |
ops = { |
80 |
- :ifconfig => '/sbin/ifconfig 2>/dev/null', |
81 |
+ :ifconfig => '/bin/ifconfig 2>/dev/null', |
82 |
:regex => %r{\s+ inet\saddr: #{Facter.ipaddress} .*? Mask: (#{ipregex})}x, |
83 |
:munge => nil, |
84 |
} |
85 |
diff -ru ruby19/facter-1.6.16/spec/unit/ipaddress6_spec.rb all/facter-1.6.16/spec/unit/ipaddress6_spec.rb |
86 |
--- ruby19/facter-1.6.16/spec/unit/ipaddress6_spec.rb 2012-12-02 20:01:43.857753215 +0100 |
87 |
+++ all/facter-1.6.16/spec/unit/ipaddress6_spec.rb 2012-12-02 20:10:38.379170335 +0100 |
88 |
@@ -25,7 +25,7 @@ |
89 |
|
90 |
it "should return ipaddress6 information for Linux" do |
91 |
Facter::Util::Resolution.stubs(:exec).with('uname -s').returns('Linux') |
92 |
- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig 2>/dev/null'). |
93 |
+ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig 2>/dev/null'). |
94 |
returns(ifconfig_fixture('linux_ifconfig_all_with_multiple_interfaces')) |
95 |
|
96 |
Facter.value(:ipaddress6).should == "2610:10:20:209:212:3fff:febe:2201" |
97 |
diff -ru ruby19/facter-1.6.16/spec/unit/macaddress_spec.rb all/facter-1.6.16/spec/unit/macaddress_spec.rb |
98 |
--- ruby19/facter-1.6.16/spec/unit/macaddress_spec.rb 2012-12-02 20:01:43.857753215 +0100 |
99 |
+++ all/facter-1.6.16/spec/unit/macaddress_spec.rb 2012-12-02 20:10:01.604173469 +0100 |
100 |
@@ -22,14 +22,14 @@ |
101 |
end |
102 |
|
103 |
it "should return the macaddress of the first interface" do |
104 |
- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig -a 2>/dev/null'). |
105 |
+ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig -a 2>/dev/null'). |
106 |
returns(ifconfig_fixture('linux_ifconfig_all_with_multiple_interfaces')) |
107 |
|
108 |
Facter.value(:macaddress).should == "00:12:3f:be:22:01" |
109 |
end |
110 |
|
111 |
it "should return nil when no macaddress can be found" do |
112 |
- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig -a 2>/dev/null'). |
113 |
+ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig -a 2>/dev/null'). |
114 |
returns(ifconfig_fixture('linux_ifconfig_no_mac')) |
115 |
|
116 |
proc { Facter.value(:macaddress) }.should_not raise_error |
117 |
@@ -38,7 +38,7 @@ |
118 |
|
119 |
# some interfaces dont have a real mac addresses (like venet inside a container) |
120 |
it "should return nil when no interface has a real macaddress" do |
121 |
- Facter::Util::Resolution.stubs(:exec).with('/sbin/ifconfig -a 2>/dev/null'). |
122 |
+ Facter::Util::Resolution.stubs(:exec).with('/bin/ifconfig -a 2>/dev/null'). |
123 |
returns(ifconfig_fixture('linux_ifconfig_venet')) |
124 |
|
125 |
proc { Facter.value(:macaddress) }.should_not raise_error |