Update to 1.5.7

- Update #508037 patch from upstream ticket
epel9
Todd Zullinger 16 years ago
parent b1847063b1
commit 9a060649ec

@ -1 +1 @@
facter-1.5.5.tar.gz
facter-1.5.7.tar.gz

@ -1,32 +0,0 @@
From 43da65cd2af00d8e7162461835b039bc5ee7d5c8 Mon Sep 17 00:00:00 2001
From: Bernhard Furtmueller <furti@1012surf.net>
Date: Tue, 23 Jun 2009 23:18:01 +0200
Subject: [PATCH] Fixed #2355 read hang on /proc/xen/capabilties on RHEL 4.7
Signed-off-by: Bernhard Furtmueller <furti@1012surf.net>
---
lib/facter/virtual.rb | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 72bfe51..8c11b40 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -41,9 +41,11 @@ Facter.add("virtual") do
end
if FileTest.exists?("/proc/xen/capabilities")
- txt = File.read("/proc/xen/capabilities")
- if txt =~ /control_d/i
- result = "xen0"
+ Thread::exclusive do
+ txt = File.read("/proc/xen/capabilities")
+ if txt =~ /control_d/i
+ result = "xen0"
+ end
end
end
--
1.6.0.4

@ -0,0 +1,28 @@
From 4056c6474460535793f5d0c38521306d973571ca Mon Sep 17 00:00:00 2001
From: Bernhard Furtmueller <furti@1012surf.net>
Date: Fri, 11 Sep 2009 01:09:22 -0400
Subject: [PATCH/facter] Fixed #2355 read hang on /proc/xen/capabilties on RHEL 4.7
---
lib/facter/virtual.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 78413a9..6f3f5a2 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -25,9 +25,9 @@ Facter.add("virtual") do
if FileTest.exists?("/sys/bus/xen")
result = "xenu"
end
-
+
if FileTest.exists?("/proc/xen/capabilities")
- txt = File.read("/proc/xen/capabilities")
+ txt = Facter::Util::Resolution.exec("cat /proc/xen/capabilities")
if txt =~ /control_d/i
result = "xen0"
end
--
1.6.4.2

@ -5,15 +5,15 @@
Summary: Ruby module for collecting simple facts about a host operating system
Name: facter
Version: 1.5.5
Release: 3%{?dist}
Version: 1.5.7
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Base
URL: http://reductivelabs.com/projects/facter
Source0: http://reductivelabs.com/downloads/facter/%{name}-%{version}.tar.gz
# Bugzilla 508037, or upstream ticket 2355 (drop in 1.6.0)
Patch0: facter-1.5.5-facts-hanging-on-_proc_xen_capabilities.patch
Patch0: facter-1.5.7-facts-hanging-on-_proc_xen_capabilities.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %has_ruby_noarch
@ -55,6 +55,10 @@ rm -rf %{buildroot}
%changelog
* Fri Sep 25 2009 Todd Zullinger <tmz@pobox.com> - 1.5.7-1
- Update to 1.5.7
- Update #508037 patch from upstream ticket
* Wed Aug 12 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 1.5.5-3
- Fix #508037 or upstream #2355

@ -1 +1 @@
7a783f99f8651095a0b2a8d0b75c48b4 facter-1.5.5.tar.gz
21db7b613fe14a54e72ef062f3d5e190 facter-1.5.7.tar.gz

Loading…
Cancel
Save