diff --git a/facter-1.5.5-facts-hanging-on-_proc_xen_capabilities.patch b/facter-1.5.5-facts-hanging-on-_proc_xen_capabilities.patch new file mode 100644 index 0000000..3db5986 --- /dev/null +++ b/facter-1.5.5-facts-hanging-on-_proc_xen_capabilities.patch @@ -0,0 +1,32 @@ +From 43da65cd2af00d8e7162461835b039bc5ee7d5c8 Mon Sep 17 00:00:00 2001 +From: Bernhard Furtmueller +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 + +--- + 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 + diff --git a/facter.spec b/facter.spec index 8a0a99f..53872c4 100644 --- a/facter.spec +++ b/facter.spec @@ -6,11 +6,15 @@ Summary: Ruby module for collecting simple facts about a host operating system Name: facter Version: 1.5.5 -Release: 2%{?dist} +Release: 3%{?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 + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %has_ruby_noarch BuildArch: noarch @@ -30,6 +34,7 @@ operating system. Additional facts can be added through simple Ruby scripts %prep %setup -q +%patch0 -p1 %build @@ -50,6 +55,9 @@ rm -rf %{buildroot} %changelog +* Wed Aug 12 2009 Jeroen van Meeuwen - 1.5.5-3 +- Fix #508037 or upstream #2355 + * Fri Jul 24 2009 Fedora Release Engineering - 1.5.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/import.log b/import.log new file mode 100644 index 0000000..18bdf78 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +facter-1_5_5-3_fc11:HEAD:facter-1.5.5-3.fc11.src.rpm:1250117897