diff -Nru facter-1.6.5/debian/changelog facter-1.6.5/debian/changelog --- facter-1.6.5/debian/changelog 2012-02-13 01:40:28.000000000 +0000 +++ facter-1.6.5/debian/changelog 2013-05-20 10:59:16.000000000 +0000 @@ -1,3 +1,11 @@ +facter (1.6.5-1ubuntu1.1) precise; urgency=low + + * d/p/kvm-cpuinfo: detect "Common KVM processor" in /proc/cpuinfo as virtual + (LP: #1170325). + * Add dep8 smoke test. + + -- Robie Basak Mon, 20 May 2013 10:59:11 +0000 + facter (1.6.5-1ubuntu1) precise; urgency=low * Merge from Debian testing. Remaining changes: diff -Nru facter-1.6.5/debian/control facter-1.6.5/debian/control --- facter-1.6.5/debian/control 2012-02-06 05:14:06.000000000 +0000 +++ facter-1.6.5/debian/control 2013-05-20 10:58:14.000000000 +0000 @@ -10,6 +10,7 @@ Vcs-Browser: http://git.debian.org/?p=pkg-puppet/facter.git Homepage: http://projects.puppetlabs.com/projects/facter XS-Ruby-Versions: all +XS-Testsuite: autopkgtest Package: facter Architecture: all diff -Nru facter-1.6.5/debian/patches/kvm-cpuinfo facter-1.6.5/debian/patches/kvm-cpuinfo --- facter-1.6.5/debian/patches/kvm-cpuinfo 1970-01-01 00:00:00.000000000 +0000 +++ facter-1.6.5/debian/patches/kvm-cpuinfo 2013-05-20 10:58:03.000000000 +0000 @@ -0,0 +1,25 @@ +Author: rustx +Bug: https://github.com/puppetlabs/facter/pull/419 +Bug-Ubuntu: https://launchpad.net/bugs/1170325 +Description: detect "Common KVM processor" in /proc/cpuinfo as virtual +Forwarded: not-needed +Last-Update: 2013-05-02 + +It looks like this was originally implemented upstream in a buggy way to me, +then merged, reverted and merged again upstream, with a correction along the +way. The patch is so trivial that I think that taking rustx's patch as-is is +the easiest way to fix this for now, rather than trying to cherry-pick all the +appropriate upstream commits. The issue is already fixed upstream, so this can +be dropped when we update to the latest upstream release anyway. --rbasak + +--- a/lib/facter/util/virtual.rb ++++ b/lib/facter/util/virtual.rb +@@ -58,7 +58,7 @@ + elsif ["FreeBSD", "OpenBSD"].include? Facter.value(:kernel) + Facter::Util::Resolution.exec("/sbin/sysctl -n hw.model") + end +- (txt =~ /QEMU Virtual CPU/) ? true : false ++ (txt =~ /QEMU Virtual CPU|Common KVM processor/) ? true : false + end + + def self.kvm_type diff -Nru facter-1.6.5/debian/patches/series facter-1.6.5/debian/patches/series --- facter-1.6.5/debian/patches/series 2012-02-06 05:14:06.000000000 +0000 +++ facter-1.6.5/debian/patches/series 2013-05-20 10:58:38.000000000 +0000 @@ -1 +1,2 @@ no-require-rubygems +kvm-cpuinfo diff -Nru facter-1.6.5/debian/tests/control facter-1.6.5/debian/tests/control --- facter-1.6.5/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ facter-1.6.5/debian/tests/control 2013-05-20 10:58:03.000000000 +0000 @@ -0,0 +1 @@ +Tests: smoke diff -Nru facter-1.6.5/debian/tests/smoke facter-1.6.5/debian/tests/smoke --- facter-1.6.5/debian/tests/smoke 1970-01-01 00:00:00.000000000 +0000 +++ facter-1.6.5/debian/tests/smoke 2013-05-20 10:58:03.000000000 +0000 @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +result=`facter osfamily` +if [ "$result" != Debian ]; then + echo "\"facter osfamily\" returned \"$result\" instead of \"Debian\"" >&2 + exit 1 +fi