summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r--dev-ruby/facter/ChangeLog10
-rw-r--r--dev-ruby/facter/facter-1.5.2-r1.ebuild31
-rw-r--r--dev-ruby/facter/files/facter-1.5.2-virtual.patch31
3 files changed, 70 insertions, 2 deletions
diff --git a/dev-ruby/facter/ChangeLog b/dev-ruby/facter/ChangeLog
index 65b72f5012fc..e783aa7c629d 100644
--- a/dev-ruby/facter/ChangeLog
+++ b/dev-ruby/facter/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/facter
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.10 2008/09/09 09:33:56 matsuu Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.11 2009/04/18 15:56:44 hollow Exp $
+
+*facter-1.5.2-r1 (18 Apr 2009)
+
+ 18 Apr 2009; Benedikt Böhm <hollow@gentoo.org>
+ +files/facter-1.5.2-virtual.patch, +facter-1.5.2-r1.ebuild:
+ fix virtual detection for openvz and vserver
*facter-1.5.2 (09 Sep 2008)
diff --git a/dev-ruby/facter/facter-1.5.2-r1.ebuild b/dev-ruby/facter/facter-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..f52a2546c8cb
--- /dev/null
+++ b/dev-ruby/facter/facter-1.5.2-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/facter-1.5.2-r1.ebuild,v 1.1 2009/04/18 15:56:44 hollow Exp $
+
+inherit ruby
+
+DESCRIPTION="A cross-platform Ruby library for retrieving facts from operating systems"
+LICENSE="GPL-2"
+HOMEPAGE="http://reductivelabs.com/projects/facter/index.html"
+SRC_URI="http://reductivelabs.com/downloads/${PN}/${P}.tgz"
+
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+USE_RUBY="ruby18"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-virtual.patch
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ DESTDIR="${D}" ruby_einstall || die
+ DESTDIR="${D}" erubydoc
+}
diff --git a/dev-ruby/facter/files/facter-1.5.2-virtual.patch b/dev-ruby/facter/files/facter-1.5.2-virtual.patch
new file mode 100644
index 000000000000..91cb039620fa
--- /dev/null
+++ b/dev-ruby/facter/files/facter-1.5.2-virtual.patch
@@ -0,0 +1,31 @@
+Index: facter-1.5.2/lib/facter/virtual.rb
+===================================================================
+--- facter-1.5.2.orig/lib/facter/virtual.rb
++++ facter-1.5.2/lib/facter/virtual.rb
+@@ -7,7 +7,7 @@ Facter.add("virtual") do
+
+ setcode do
+
+- if FileTest.exists?("/proc/user_beancounters")
++ if FileTest.exists?("/proc/vz/veinfo") && !FileTest.exists?("/proc/vz/version")
+ result = "openvz"
+ end
+
+@@ -45,12 +45,11 @@ Facter.add("virtual") do
+ result = "vmware_server"
+ end
+
+- mountexists = system "which mount > /dev/null 2>&1"
+- if $?.exitstatus == 0
+- output = %x{mount}
+- output.each {|p|
+- result = "vserver" if p =~ /\/dev\/hdv1/
+- }
++ if FileTest.exists?("/proc/self/status")
++ txt = File.read("/proc/self/status")
++ if txt =~ /^(s_context|VxID):[[:blank:]]*[1-9]/
++ result = "vserver"
++ end
+ end
+
+ if FileTest.directory?('/proc/virtual')