[Pkg-libvirt-commits] [virt-what] 01/05: Imported Upstream version 1.14

Laurent Léonard trash-guest at moszumanska.debian.org
Sun Apr 27 01:08:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

trash-guest pushed a commit to branch master
in repository virt-what.

commit 423b78cfccad204db37f8b6497c0a2281cd09b9a
Author: Laurent Léonard <laurent at open-minds.org>
Date:   Sun Apr 27 02:02:37 2014 +0200

    Imported Upstream version 1.14
---
 configure                   | 20 ++++++++++----------
 configure.ac                |  2 +-
 tests/test-linux-vserver.sh |  3 ++-
 virt-what.in                | 15 ++++++++++-----
 virt-what.pod               | 12 ++++++++++++
 5 files changed, 35 insertions(+), 17 deletions(-)

diff --git a/configure b/configure
index 4411aaf..96266dd 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for virt-what 1.13.
+# Generated by GNU Autoconf 2.69 for virt-what 1.14.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,8 +576,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='virt-what'
 PACKAGE_TARNAME='virt-what'
-PACKAGE_VERSION='1.13'
-PACKAGE_STRING='virt-what 1.13'
+PACKAGE_VERSION='1.14'
+PACKAGE_STRING='virt-what 1.14'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1236,7 +1236,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures virt-what 1.13 to adapt to many kinds of systems.
+\`configure' configures virt-what 1.14 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1306,7 +1306,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of virt-what 1.13:";;
+     short | recursive ) echo "Configuration of virt-what 1.14:";;
    esac
   cat <<\_ACEOF
 
@@ -1397,7 +1397,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-virt-what configure 1.13
+virt-what configure 1.14
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1489,7 +1489,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by virt-what $as_me 1.13, which was
+It was created by virt-what $as_me 1.14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2352,7 +2352,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='virt-what'
- VERSION='1.13'
+ VERSION='1.14'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4636,7 +4636,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by virt-what $as_me 1.13, which was
+This file was extended by virt-what $as_me 1.14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -4702,7 +4702,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-virt-what config.status 1.13
+virt-what config.status 1.14
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 4008571..da2ebb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-AC_INIT([virt-what],[1.13])
+AC_INIT([virt-what],[1.14])
 AM_INIT_AUTOMAKE([foreign])
 
 dnl Check for basic C environment.
diff --git a/tests/test-linux-vserver.sh b/tests/test-linux-vserver.sh
index 40d75a5..7988f81 100755
--- a/tests/test-linux-vserver.sh
+++ b/tests/test-linux-vserver.sh
@@ -19,7 +19,8 @@
 root=tests/linux-vserver
 
 output="$(./virt-what --test-root=$root 2>&1)"
-expected="linux_vserver"
+expected="linux_vserver
+linux_vserver-guest"
 
 if [ "$output" != "$expected" ]; then
     echo "$0: test failed because output did not match expected"
diff --git a/virt-what.in b/virt-what.in
index f12c95b..fb399be 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -18,13 +18,13 @@
 
 # 'virt-what' tries to detect the type of virtualization being
 # used (or none at all if we're running on bare-metal).  It prints
-# out one of more lines each being a 'fact' about the virtualization.
+# out one or more lines each being a 'fact' about the virtualization.
 #
 # Please see also the manual page virt-what(1).
 # This script should be run as root.
 #
 # The following resources were useful in writing this script:
-# . http://www.dmo.ca/blog/20080530151107
+# . http://dmo.ca/blog/detecting-virtualization-on-linux/
 
 # Do not allow unset variables, and set defaults.
 set -u
@@ -67,7 +67,7 @@ while true; do
 done
 
 # Add /sbin and /usr/sbin to the path so we can find system
-# binaries like dmicode.
+# binaries like dmidecode.
 # Add /usr/libexec to the path so we can find the helper binary.
 prefix=@prefix@
 exec_prefix=@exec_prefix@
@@ -147,6 +147,11 @@ fi
 # Check for Linux-VServer
 if cat "${root}/proc/self/status" | grep -q "VxID: [0-9]*"; then
     echo linux_vserver
+    if grep -q "VxID: 0$" "${root}/proc/self/status"; then
+        echo linux_vserver-host
+    else
+        echo linux_vserver-guest
+    fi
 fi
 
 # Check for UML.
@@ -192,9 +197,9 @@ fi
 if [ "$cpuid" = "XenVMMXenVMM" ]; then
     echo xen; echo xen-hvm
     skip_qemu_kvm=true
-elif [ -f "${root}/proc/xen/capabilities" ]; then
+elif [ -d "${root}/proc/xen" ]; then
     echo xen
-    if grep -q "control_d" "${root}/proc/xen/capabilities"; then
+    if grep -q "control_d" "${root}/proc/xen/capabilities" 2>/dev/null; then
         echo xen-dom0
     else
         echo xen-domU
diff --git a/virt-what.pod b/virt-what.pod
index 98cd4af..bff2998 100644
--- a/virt-what.pod
+++ b/virt-what.pod
@@ -62,10 +62,22 @@ Status: confirmed by RWMJ using a Fedora guest running in z/VM
 
 =item B<linux_vserver>
 
+This is printed for backwards compatibility with older virt-what which
+could not distinguish between a Linux VServer container guest and
+host.
+
+=item B<linux_vserver-guest>
+
 This process is running in a Linux VServer container.
 
 Status: contributed by Barış Metin
 
+=item B<linux_vserver-host>
+
+This process is running as the Linux VServer host (VxID 0).
+
+Status: contributed by Barış Metin and Elan Ruusamäe
+
 =item B<lxc>
 
 This process is running in a Linux LXC container.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/virt-what.git



More information about the Pkg-libvirt-commits mailing list