[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, master, updated. debian/1.6.9-1-1-gc392d55

Micah Anderson micah at riseup.net
Wed May 30 15:45:48 UTC 2012


The following commit has been merged in the master branch:
commit c392d55b43389ef683f9617884fbaec8f7aa9f5e
Author: Micah Anderson <micah at riseup.net>
Date:   Wed May 30 11:27:30 2012 -0400

    add patch to ignore the No LSB modules are available. noise

diff --git a/debian/changelog b/debian/changelog
index 3cda5bf..3f5e9f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+facter (1.6.9-2) unstable; urgency=medium
+
+  * Add patch from upstream (b050eb1) to ignore LSB noise
+
+ -- Micah Anderson <micah at debian.org>  Wed, 30 May 2012 11:26:27 -0400
+
 facter (1.6.9-1) unstable; urgency=low
 
   * New upstream release
diff --git a/debian/patches/ignore-lsb-noise b/debian/patches/ignore-lsb-noise
new file mode 100644
index 0000000..d21bcad
--- /dev/null
+++ b/debian/patches/ignore-lsb-noise
@@ -0,0 +1,175 @@
+commit b050eb1118512488949394803b371a3d02a730ad
+Author: Hailee Kenney <hailee at puppetlabs.com>
+Date:   Fri May 18 12:28:13 2012 -0700
+
+    (#14582) Fix noise in LSB facts
+    
+    Redirect LSB fact's stderr to /dev/null to prevent excess noise.
+
+diff --git a/lib/facter/lsbdistcodename.rb b/lib/facter/lsbdistcodename.rb
+index 00b514a..0c0f5d9 100644
+--- a/lib/facter/lsbdistcodename.rb
++++ b/lib/facter/lsbdistcodename.rb
+@@ -13,6 +13,6 @@
+ Facter.add(:lsbdistcodename) do
+   confine :kernel => [ :linux, :"gnu/kfreebsd" ]
+   setcode do
+-    Facter::Util::Resolution.exec('lsb_release -c -s')
++    Facter::Util::Resolution.exec('lsb_release -c -s 2>/dev/null')
+   end
+ end
+diff --git a/lib/facter/lsbdistdescription.rb b/lib/facter/lsbdistdescription.rb
+index fb3d760..a4275b2 100644
+--- a/lib/facter/lsbdistdescription.rb
++++ b/lib/facter/lsbdistdescription.rb
+@@ -13,7 +13,7 @@
+ Facter.add(:lsbdistdescription) do
+   confine :kernel => [ :linux, :"gnu/kfreebsd" ]
+   setcode do
+-    if output = Facter::Util::Resolution.exec('lsb_release -d -s')
++    if output = Facter::Util::Resolution.exec('lsb_release -d -s 2>/dev/null')
+       # the output may be quoted (at least it is on gentoo)
+       output.sub(/^"(.*)"$/,'\1')
+     end
+diff --git a/lib/facter/lsbdistid.rb b/lib/facter/lsbdistid.rb
+index 61d3ac2..065ef9b 100644
+--- a/lib/facter/lsbdistid.rb
++++ b/lib/facter/lsbdistid.rb
+@@ -13,6 +13,6 @@
+ Facter.add(:lsbdistid) do
+   confine :kernel => [ :linux, :"gnu/kfreebsd" ]
+   setcode do
+-    Facter::Util::Resolution.exec('lsb_release -i -s')
++    Facter::Util::Resolution.exec('lsb_release -i -s 2>/dev/null')
+   end
+ end
+diff --git a/lib/facter/lsbdistrelease.rb b/lib/facter/lsbdistrelease.rb
+index 4c8c736..ae5a9b2 100644
+--- a/lib/facter/lsbdistrelease.rb
++++ b/lib/facter/lsbdistrelease.rb
+@@ -13,6 +13,6 @@
+ Facter.add(:lsbdistrelease) do
+   confine :kernel => [ :linux, :"gnu/kfreebsd" ]
+   setcode do
+-    Facter::Util::Resolution.exec('lsb_release -r -s')
++    Facter::Util::Resolution.exec('lsb_release -r -s 2>/dev/null')
+   end
+ end
+diff --git a/lib/facter/lsbrelease.rb b/lib/facter/lsbrelease.rb
+index 9b1d546..a1728bb 100644
+--- a/lib/facter/lsbrelease.rb
++++ b/lib/facter/lsbrelease.rb
+@@ -13,6 +13,6 @@
+ Facter.add(:lsbrelease) do
+   confine :kernel => [ :linux, :"gnu/kfreebsd" ]
+   setcode do
+-    Facter::Util::Resolution.exec('lsb_release -v -s')
++    Facter::Util::Resolution.exec('lsb_release -v -s 2>/dev/null')
+   end
+ end
+diff --git a/spec/unit/lsbdistcodename_spec.rb b/spec/unit/lsbdistcodename_spec.rb
+index fa012a8..e30aada 100755
+--- a/spec/unit/lsbdistcodename_spec.rb
++++ b/spec/unit/lsbdistcodename_spec.rb
+@@ -10,13 +10,13 @@ describe "lsbdistcodename fact" do
+         Facter.fact(:kernel).stubs(:value).returns kernel
+       end
+ 
+-      it "should return the codename through lsb_release -c -s" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -c -s').returns 'n/a'
++      it "should return the codename through lsb_release -c -s 2>/dev/null" do
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -c -s 2>/dev/null').returns 'n/a'
+         Facter.fact(:lsbdistcodename).value.should == 'n/a'
+       end
+ 
+       it "should return nil if lsb_release is not installed" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -c -s').returns nil
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -c -s 2>/dev/null').returns nil
+         Facter.fact(:lsbdistcodename).value.should be_nil
+       end
+     end
+diff --git a/spec/unit/lsbdistdescription_spec.rb b/spec/unit/lsbdistdescription_spec.rb
+index 5202e88..31f7761 100755
+--- a/spec/unit/lsbdistdescription_spec.rb
++++ b/spec/unit/lsbdistdescription_spec.rb
+@@ -10,13 +10,13 @@ describe "lsbdistdescription fact" do
+         Facter.fact(:kernel).stubs(:value).returns kernel
+       end
+ 
+-      it "should return the description through lsb_release -d -s" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -d -s').returns '"Gentoo Base System release 2.1"'
++      it "should return the description through lsb_release -d -s 2>/dev/null" do
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -d -s 2>/dev/null').returns '"Gentoo Base System release 2.1"'
+         Facter.fact(:lsbdistdescription).value.should == 'Gentoo Base System release 2.1'
+       end
+ 
+       it "should return nil if lsb_release is not installed" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -d -s').returns nil
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -d -s 2>/dev/null').returns nil
+         Facter.fact(:lsbdistdescription).value.should be_nil
+       end
+     end
+diff --git a/spec/unit/lsbdistid_spec.rb b/spec/unit/lsbdistid_spec.rb
+index ae208a1..8ead532 100755
+--- a/spec/unit/lsbdistid_spec.rb
++++ b/spec/unit/lsbdistid_spec.rb
+@@ -10,13 +10,13 @@ describe "lsbdistid fact" do
+         Facter.fact(:kernel).stubs(:value).returns kernel
+       end
+ 
+-      it "should return the id through lsb_release -i -s" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -i -s').returns 'Gentoo'
++      it "should return the id through lsb_release -i -s 2>/dev/null" do
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -i -s 2>/dev/null').returns 'Gentoo'
+         Facter.fact(:lsbdistid).value.should == 'Gentoo'
+       end
+ 
+-      it "should return nil if lsb_release is not installed" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -i -s').returns nil
++      it "should return nil if lsb_release is not installed 2>/dev/null" do
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -i -s 2>/dev/null').returns nil
+         Facter.fact(:lsbdistid).value.should be_nil
+       end
+     end
+diff --git a/spec/unit/lsbdistrelease_spec.rb b/spec/unit/lsbdistrelease_spec.rb
+index 5a9803d..bd21eba 100755
+--- a/spec/unit/lsbdistrelease_spec.rb
++++ b/spec/unit/lsbdistrelease_spec.rb
+@@ -10,13 +10,13 @@ describe "lsbdistrelease fact" do
+         Facter.fact(:kernel).stubs(:value).returns kernel
+       end
+ 
+-      it "should return the release through lsb_release -r -s" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -r -s').returns '2.1'
++      it "should return the release through lsb_release -r -s 2>/dev/null" do
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -r -s 2>/dev/null').returns '2.1'
+         Facter.fact(:lsbdistrelease).value.should == '2.1'
+       end
+ 
+       it "should return nil if lsb_release is not installed" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -r -s').returns nil
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -r -s 2>/dev/null').returns nil
+         Facter.fact(:lsbdistrelease).value.should be_nil
+       end
+     end
+diff --git a/spec/unit/lsbrelease_spec.rb b/spec/unit/lsbrelease_spec.rb
+index 1406da6..f1cd7fc 100755
+--- a/spec/unit/lsbrelease_spec.rb
++++ b/spec/unit/lsbrelease_spec.rb
+@@ -10,13 +10,13 @@ describe "lsbrelease fact" do
+         Facter.fact(:kernel).stubs(:value).returns kernel
+       end
+ 
+-      it "should return the release through lsb_release -v -s" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -v -s').returns 'n/a'
++      it "should return the release through lsb_release -v -s 2>/dev/null" do
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -v -s 2>/dev/null').returns 'n/a'
+         Facter.fact(:lsbrelease).value.should == 'n/a'
+       end
+ 
+       it "should return nil if lsb_release is not installed" do
+-        Facter::Util::Resolution.stubs(:exec).with('lsb_release -v -s').returns nil
++        Facter::Util::Resolution.stubs(:exec).with('lsb_release -v -s 2>/dev/null').returns nil
+         Facter.fact(:lsbrelease).value.should be_nil
+       end
+     end
diff --git a/debian/patches/series b/debian/patches/series
index dd4dba1..438d985 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 no-require-rubygems
+ignore-lsb-noise

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list