Hello community,

here is the log from the commit of package facter for openSUSE:Factory checked 
in at 2014-10-14 07:12:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/facter (Old)
 and      /work/SRC/openSUSE:Factory/.facter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "facter"

Changes:
--------
--- /work/SRC/openSUSE:Factory/facter/facter.changes    2014-06-27 
06:53:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.facter.new/facter.changes       2014-10-14 
07:13:04.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Oct  6 16:18:33 UTC 2014 - [email protected]
+
+- use "ip link" instead of "ifconfig" for retrieving interface names
+  (facter-ip-interface.patch, fixes bnc#878129) 
+
+-------------------------------------------------------------------

New:
----
  facter-ip-interface.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ facter.spec ++++++
--- /var/tmp/diff_new_pack.rfZpV2/_old  2014-10-14 07:13:05.000000000 +0200
+++ /var/tmp/diff_new_pack.rfZpV2/_new  2014-10-14 07:13:05.000000000 +0200
@@ -25,9 +25,12 @@
 Url:            http://puppetlabs.com/puppet/related-projects/facter/
 Source:         
http://downloads.puppetlabs.com/facter/%{name}-%{version}.tar.gz
 Source1:        facter.1
+# PATCH-FIX-UPSTREAM -- bnc#878129 -- use "ip link" instead of "ifconfig" for 
interface names
+Patch0:         facter-ip-interface.patch
 BuildRequires:  ruby
 BuildRequires:  ruby-devel > 1.8.4
 Requires:       ruby
+Requires:       iproute2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -39,6 +42,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 

++++++ facter-ip-interface.patch ++++++
Index: facter-2.0.2/lib/facter/util/ip.rb
===================================================================
--- facter-2.0.2.orig/lib/facter/util/ip.rb
+++ facter-2.0.2/lib/facter/util/ip.rb
@@ -73,7 +73,10 @@ module Facter::Util::IP
 
   def self.get_all_interface_output
     case Facter.value(:kernel)
-    when 'Linux', 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 
'DragonFly'
+    when 'Linux'
+      output = Facter::Util::IP.exec_ip(["link"])
+      output.gsub!(/^\d+:\s*/, "")                             # delete 
leading number
+    when 'OpenBSD', 'NetBSD', 'FreeBSD', 'Darwin', 'GNU/kFreeBSD', 'DragonFly'
       output = Facter::Util::IP.exec_ifconfig(["-a","2>/dev/null"])
     when 'SunOS'
       output = Facter::Util::IP.exec_ifconfig(["-a"])
@@ -92,6 +95,13 @@ module Facter::Util::IP
 
 
   ##
+  # exec_ip uses the Linux ip command
+  #
+  # @return [String] the output of `ip #{arguments} 2>/dev/null` or nil
+  def self.exec_ip(additional_arguments=[])
+    Facter::Core::Execution.exec("/bin/ip #{additional_arguments.join(' ')}")
+  end
+  ##
   # exec_ifconfig uses the ifconfig command
   #
   # @return [String] the output of `ifconfig #{arguments} 2>/dev/null` or nil
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to