diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2009-04-18 15:56:45 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2009-04-18 15:56:45 +0000 |
commit | 986293439fafc244f3730681fe5b5c9f33d72edd (patch) | |
tree | 0ebb1d73b704cf9660531c6468480b2d7bc22399 /dev-ruby/facter | |
parent | stable amd64, bug 266562 (diff) | |
download | historical-986293439fafc244f3730681fe5b5c9f33d72edd.tar.gz historical-986293439fafc244f3730681fe5b5c9f33d72edd.tar.bz2 historical-986293439fafc244f3730681fe5b5c9f33d72edd.zip |
fix virtual detection for openvz and vserver
Package-Manager: portage-2.2_rc28/cvs/Linux i686
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r-- | dev-ruby/facter/ChangeLog | 10 | ||||
-rw-r--r-- | dev-ruby/facter/Manifest | 4 | ||||
-rw-r--r-- | dev-ruby/facter/facter-1.5.2-r1.ebuild | 31 | ||||
-rw-r--r-- | dev-ruby/facter/files/facter-1.5.2-virtual.patch | 31 |
4 files changed, 73 insertions, 3 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/Manifest b/dev-ruby/facter/Manifest index 5d0b6cd0245e..f8d726b10f24 100644 --- a/dev-ruby/facter/Manifest +++ b/dev-ruby/facter/Manifest @@ -1,6 +1,8 @@ +AUX facter-1.5.2-virtual.patch 953 RMD160 3dfecee1c84e11679c3787b57d1d8dbf7abf7950 SHA1 6bd4783ac9445bf9f6b78fea0123ddfc7773e1d3 SHA256 ec6d004544ae30cad301e15bb01366872d8b937e6c009743449a005481309c31 DIST facter-1.3.8.tgz 29336 RMD160 12e578271dd44e9eed33465fde4aec94d645d994 SHA1 c59edc74df09599e8c723121c65826c4a6ecbc67 SHA256 d7f9c020e672738658236630ee02cac66fc6c30d9203d01334beb02a35b1034e DIST facter-1.5.2.tgz 48857 RMD160 0574f2cc4a934c0f4cd1a8e2d8a0554002ea1f31 SHA1 2fc1ce89b3fc0041a072b4c7899cd805d9572ffe SHA256 b9d0dda8e35028f0d56bcc8951a86b2143169174545a2fb0818054e7f88085a9 EBUILD facter-1.3.8.ebuild 638 RMD160 4eddd1794abed9b2a64d26c3cedba6c34c86a577 SHA1 b55552c302df6c7aae1d3f1d511d90e0065289bd SHA256 daf23576c3bcbdcddfe7205a9bef328390ee0089bbbd8786792fe2a1dd1cf5b0 +EBUILD facter-1.5.2-r1.ebuild 727 RMD160 75987c5de00bc7eea12a7af6d44baf9a8e5edfc6 SHA1 660ba828aa5debd80518eae3be41453df893ad19 SHA256 7471f252a2bd2cf632c59f644e84e91139f9c8816b934b528a1747c9b54555de EBUILD facter-1.5.2.ebuild 641 RMD160 ba7846935d47b96787ef02fc8145837bf74decc2 SHA1 a24e1ad8eff7118e55b6899a0edc35adc4a26233 SHA256 597e110ae41e3794dd8f846b2981bd9b145fa2036fc80603d01fa4335f8265f2 -MISC ChangeLog 1475 RMD160 81ed38a0a117e7cc0cf89bf1ae029cb858c3f234 SHA1 5b22423287e897a0701ccff71a523c285a2b0850 SHA256 f77cbbc068f31eef893a736dd12b35609adb826337352731ec0d15e894dfb158 +MISC ChangeLog 1667 RMD160 5a43b1078168fd6b48158384e027d5f3eced3357 SHA1 ae9a7fc37f3e0cc7144e706315d1c63c2de534fc SHA256 3f26113caded141f09fa00270332c4a1242ec747ce569c2dbab696bbad148657 MISC metadata.xml 222 RMD160 23efe87c16ebc9fbeb91e894ab372cc3bb66bc49 SHA1 a5d1e2317ae207bbd664aebe986687948fdd984a SHA256 38ef3457fd14e6872985f0e100fde79d0b8a9dbc4fc39ceef780c8c5abc5f337 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') |