[facter/f19] Fixed getting interface with net_tools (upstream #18756)

lzap lzap at fedoraproject.org
Mon Oct 20 10:17:18 UTC 2014


commit d16db2ff61434725855ba034043c3749d64dd17c
Author: Lukas Zapletal <lzap+git at redhat.com>
Date:   Mon Oct 20 12:17:12 2014 +0200

    Fixed getting interface with net_tools (upstream #18756)

 0003-ipaddress-parsing-net-tools.patch |   14 ++++++++++++++
 facter.spec                            |    1 +
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/0003-ipaddress-parsing-net-tools.patch b/0003-ipaddress-parsing-net-tools.patch
new file mode 100644
index 0000000..35824c8
--- /dev/null
+++ b/0003-ipaddress-parsing-net-tools.patch
@@ -0,0 +1,14 @@
+diff -rupN facter-1.6.18-orig/lib/facter/util/ip.rb facter-1.6.18/lib/facter/util/ip.rb
+--- facter-1.6.18-orig/lib/facter/util/ip.rb	2014-10-20 12:05:30.307287300 +0200
++++ facter-1.6.18/lib/facter/util/ip.rb	2014-10-20 12:06:05.520780391 +0200
+@@ -5,8 +5,8 @@ module Facter::Util::IP
+   # a given platform or set of platforms.
+   REGEX_MAP = {
+     :linux => {
+-      :ipaddress  => /inet addr:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
+-      :ipaddress6 => /inet6 addr: ((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/,
++      :ipaddress  => /inet (?:addr:)?([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
++      :ipaddress6 => /inet6 (?:addr:)? ?((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/,
+       :macaddress => /(?:ether|HWaddr)\s+((\w{1,2}:){5,}\w{1,2})/,
+       :netmask  => /Mask:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
+       :mtu  => /MTU:(\d+)/
diff --git a/facter.spec b/facter.spec
index 65949cb..728cbea 100644
--- a/facter.spec
+++ b/facter.spec
@@ -29,6 +29,7 @@ Source1:        http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.g
 Patch0:         0001-19989-Filter-virt-what-warnings-from-virtual-fact.patch
 Patch1:         0002-976942-correct-ipaddress-non-loopback.patch
 Patch2:         0001-FACT-480-Remove-current-directory-from-Ruby-load-pat.patch
+Patch3:         0003-ipaddress-parsing-net-tools.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  ruby >= 1.8.1


More information about the scm-commits mailing list