--- facter-1.5.6.orig/debian/changelog +++ facter-1.5.6/debian/changelog @@ -0,0 +1,118 @@ +facter (1.5.6-2ubuntu2.1) lucid-proposed; urgency=low + + * Cherry-picked KVM detection for 'virtual' fact from upstream commit + 62b6773a63bb96273fbc. (LP: #708080). + + -- Oliver Brakmann Wed, 26 Jan 2011 21:36:23 +0100 + +facter (1.5.6-2ubuntu2) lucid; urgency=low + + * Dropped ruby-pkg-tools, and libsetup-ruby1.8, and cdbs, use what + we had in karmic. Since we dont want ruby-pkg-tools in main. + (LP: #408402) + + -- Chuck Short Fri, 26 Mar 2010 08:34:25 -0400 + +facter (1.5.6-2ubuntu1) lucid; urgency=low + + * Merge from debian testing, remaining changes: + - Use bind9-host9 only. + + -- Chuck Short Fri, 06 Nov 2009 00:52:19 +0000 + +facter (1.5.6-2) unstable; urgency=low + + * Added depends possibility on libopenssl-ruby1.9 + * Switch from install.rb to using the standardized Debian ruby CDBS + classes to use setup.rb. This stops the munging of the shebang + to a specific ruby version, as facter works with both 1.8 and 1.9 + * Install facter library dependencies in ruby version neutral + directory: /usr/lib/ruby/vendor_ruby + * Add depends on libsetup-ruby1.8, ruby-pkg-tools and cdbs + + -- Micah Anderson Tue, 30 Jun 2009 00:21:23 -0400 + +facter (1.5.6-1) unstable; urgency=low + + * New upsream release + * Add myself to uploaders + * Bumped Standards-Version (no changes) + * Added versioned build-depends on debhelper 5 + + -- Micah Anderson Mon, 29 Jun 2009 22:53:18 -0400 + +facter (1.5.4-1ubuntu1) karmic; urgency=low + + * Use bind9-host9 only. + + -- Chuck Short Mon, 03 Aug 2009 09:51:59 -0400 + +facter (1.5.4-1) unstable; urgency=low + + [ Nigel Kersten ] + * New upstream release + * Switch maintainer to pkg-puppet-devel list + * Modify uploaders + * Update watch file regexp to exclude release canditate tarballs + * Use upstream install.rb script to build rather than copying manually + + [ Andrew Pollock ] + * debian/control: add libopenssl-ruby to build dependencies + * debian/control: bump Standards-Version (no changes) + * debian/compat: increase to 5 + * debian/control: add pciutils and ${misc:Depends} to dependencies + + -- Andrew Pollock Mon, 13 Apr 2009 15:20:21 -0700 + +facter (1.5.1-0.1) unstable; urgency=low + + * Non-maintainer upload + * New upstream release to fix zombie problem (Closes: #497363) + + -- Micah Anderson Wed, 03 Sep 2008 09:06:56 -0400 + +facter (1.5-0.1) unstable; urgency=low + + * Non-maintainer upload. + * New upstream release (Closes: #492430) + * Upgraded standards version to 3.8.0 (no changes) + + -- Micah Anderson Sat, 26 Jul 2008 07:46:56 -0400 + +facter (1.3.8-1) unstable; urgency=low + + * New upstream release. + * Add 4.0/etch as a new entry in the debianversion fact. + * Unfutz the debianversion fact so it doesn't annoy us with it's + "constant already defined" whining. + + -- Matthew Palmer Tue, 25 Sep 2007 07:58:22 +1000 + +facter (1.3.7-1) unstable; urgency=low + + * New upstream release. Closes: #418967. + * Add dependency on net-tools (for ifconfig). Closes: #415899. + * Add a new 'debianversion' fact. Closes: #378895. Thanks to David + Schmitt for the patch. + * Add a dependency on host | bind9-host (for host). Closes: #403109. + + -- Matthew Palmer Fri, 20 Apr 2007 14:09:59 +1000 + +facter (1.3.5-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer Tue, 31 Oct 2006 06:24:59 +1100 + +facter (1.3.3-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer Fri, 30 Jun 2006 12:43:50 +1000 + +facter (1.3.1-1) unstable; urgency=low + + * Initial release. (Closes: #364976) + + -- Matthew Palmer Wed, 24 May 2006 09:40:54 +1000 + --- facter-1.5.6.orig/debian/compat +++ facter-1.5.6/debian/compat @@ -0,0 +1 @@ +5 --- facter-1.5.6.orig/debian/docs +++ facter-1.5.6/debian/docs @@ -0,0 +1,2 @@ +README +TODO --- facter-1.5.6.orig/debian/control +++ facter-1.5.6/debian/control @@ -0,0 +1,21 @@ +Source: facter +Section: admin +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Puppet Package Maintainers +Uploaders: Andrew Pollock , Nigel Kersten , Micah Anderson +Build-Depends: debhelper (>= 5.0.0), ruby (>= 1.8), libopenssl-ruby +Standards-Version: 3.8.2 + +Package: facter +Architecture: all +Depends: ruby (>= 1.8), net-tools, bind9-host, pciutils, libopenssl-ruby1.8 | libopenssl-ruby1.9, ${misc:Depends} +Description: a library for retrieving facts from operating systems + A cross-platform Ruby library for retrieving facts from operating systems. + Supports multiple resolution mechanisms, any of which can be restricted to + working only on certain operating systems or environments. Facter is + especially useful for retrieving things like operating system names, IP + addresses, MAC addresses, and SSH keys. + . + It is easy to extend Facter to include your own custom facts or to include + additional mechanisms for retrieving facts. --- facter-1.5.6.orig/debian/copyright +++ facter-1.5.6/debian/copyright @@ -0,0 +1,61 @@ +This package was debianized by jaq on +Thu, 27 Apr 2006 10:27:59 +1000. + +It was downloaded from http://reductivelabs.com/projects/facter + +Copyright Holder: Luke Kanies + +Copyright terms: + +The main Facter library is LGPL. From lib/facter.rb: + +# Copyright 2006 Luke Kanies +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL'. + +The memory.rb and processor.rb fact files are made available under the GPL +version 2. From lib/facter/memory.rb: + +# Copyright (C) 2006 Mooter Media Ltd +# Author: Matthew Palmer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation (version 2 of the License) +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +The installation script is available under the terms of the GPL. From +install.rb: + +# Copyright 2004 Austin Ziegler +# +# This program is free software. It may be redistributed and/or modified under +# the terms of the GPL version 2 (or later) or the Ruby licence. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- facter-1.5.6.orig/debian/watch +++ facter-1.5.6/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://reductivelabs.com/downloads/facter/facter-([0-9]+\.[0-9]+\.[0-9]+)\.tgz --- facter-1.5.6.orig/debian/rules +++ facter-1.5.6/debian/rules @@ -0,0 +1,71 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(CURDIR)/install.rb --destdir=$(CURDIR)/debian/facter/ \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --sitelibdir=/usr/lib/ruby/1.8 + +# Build architecture-dependent files here. +binary-arch: build install + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- facter-1.5.6.orig/lib/facter/virtual.rb +++ facter-1.5.6/lib/facter/virtual.rb @@ -46,7 +46,14 @@ result = "xen0" end end - + + if FileTest.exists?("/proc/cpuinfo") + txt = File.read("/proc/cpuinfo") + if txt =~ /QEMU Virtual CPU/ + result = "kvm" + end + end + if result == "physical" output = Facter::Util::Resolution.exec('lspci') if not output.nil? @@ -86,7 +93,7 @@ setcode do case Facter.value(:virtual) - when "xenu", "openvzve", "vmware" + when "xenu", "openvzve", "vmware", "kvm" true else false