diff options
author | Henrik Riomar <henrik.riomar@gmail.com> | 2018-01-10 10:34:55 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-21 11:50:42 +0000 |
commit | 9165ed7246c6bc2d38d13b39640a12ed9fa3b155 (patch) | |
tree | 4a31c2695e208bb77faa5f7bce6a5f6982b9c901 | |
parent | 631275b3feda496b60f58ad579f8a09e2ca1c297 (diff) | |
download | aports-9165ed7246c6bc2d38d13b39640a12ed9fa3b155.tar.bz2 aports-9165ed7246c6bc2d38d13b39640a12ed9fa3b155.tar.xz |
testing/virt-what: add upstream fixes
Set Maintainer
-rw-r--r-- | testing/virt-what/0001-Missing-have_cpuinfo-check.patch | 25 | ||||
-rw-r--r-- | testing/virt-what/0002-Remove-bashisms.patch (renamed from testing/virt-what/Remove-bashisms.patch) | 29 | ||||
-rw-r--r-- | testing/virt-what/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch | 35 | ||||
-rw-r--r-- | testing/virt-what/APKBUILD | 13 |
4 files changed, 86 insertions, 16 deletions
diff --git a/testing/virt-what/0001-Missing-have_cpuinfo-check.patch b/testing/virt-what/0001-Missing-have_cpuinfo-check.patch new file mode 100644 index 0000000000..9f56566eff --- /dev/null +++ b/testing/virt-what/0001-Missing-have_cpuinfo-check.patch @@ -0,0 +1,25 @@ +From eefc1e7e3dd8fb422baf0f13aec1df9880541b83 Mon Sep 17 00:00:00 2001 +From: Jasper Lievisse Adriaanse <bug@jasper.la> +Date: Thu, 10 Aug 2017 08:44:01 +0100 +Subject: [PATCH] Missing have_cpuinfo check. + +--- + virt-what.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/virt-what.in b/virt-what.in +index 8c27b11..9050035 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -308,7 +308,7 @@ if ! "$skip_qemu_kvm"; then + # option, since /proc/cpuinfo will not contain the QEMU + # string. QEMU 2.10 added a new CPUID leaf, so this + # problem only triggered for older QEMU +- if grep -q 'QEMU' "${root}/proc/cpuinfo"; then ++ if have_cpuinfo && grep -q 'QEMU' "${root}/proc/cpuinfo"; then + echo qemu + fi + fi +-- +2.15.0 + diff --git a/testing/virt-what/Remove-bashisms.patch b/testing/virt-what/0002-Remove-bashisms.patch index ec0baf6bcd..02fe382e2a 100644 --- a/testing/virt-what/Remove-bashisms.patch +++ b/testing/virt-what/0002-Remove-bashisms.patch @@ -1,17 +1,19 @@ -From: =?utf-8?q?Guido_G=C3=BCnther_agx=40sigxcpu=2Eorg?= -Date: =?utf-8?q?Wed=2C_2_Aug_2017_14=3A16=3A07_-0300?= -Subject: =?utf-8?q?Remove_bashisms?= +From 9d90704a05dee7704470eff818a1c44aeef6c880 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> +Date: Fri, 4 Aug 2017 12:02:08 -0300 +Subject: [PATCH] Remove bashisms -Use [ instead of [[ and -a instead of && so we fall back to test if -necessary: +Use [ instead of [[ so we fall back to test if necessary: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html + +Gbp-Pq: Name Remove-bashisms.patch --- virt-what.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/virt-what.in b/virt-what.in -index 8c27b11..56af1ad 100644 +index 9050035..a05e0db 100644 --- a/virt-what.in +++ b/virt-what.in @@ -360,20 +360,20 @@ if [ "$cpuid" = "OpenBSDVMM58" ]; then @@ -19,12 +21,12 @@ index 8c27b11..56af1ad 100644 # Check for LDoms -if [[ "$arch" == sparc* && -e ${root}/dev/mdesc ]]; then -+if [ ${arch#sparc} != "$arch" -a -e ${root}/dev/mdesc ]; then ++if [ "${arch#sparc}" != "$arch" ] && [ -e "${root}/dev/mdesc" ]; then echo ldoms - if [[ -d ${root}/sys/class/vlds/ctrl && \ - -d ${root}/sys/class/vlds/sp ]]; then -+ if [ -d ${root}/sys/class/vlds/ctrl -a \ -+ -d ${root}/sys/class/vlds/sp ]; then ++ if [ -d "${root}/sys/class/vlds/ctrl" ] && \ ++ [ -d "${root}/sys/class/vlds/sp" ]; then echo ldoms-control else echo ldoms-guest @@ -32,12 +34,15 @@ index 8c27b11..56af1ad 100644 MDPROP="${root}/usr/lib/ldoms/mdprop.py" - if [[ -x ${MDPROP} ]]; then - if [[ -n $($MDPROP -v iodevice device-type=pciex) ]]; then -+ if [ -x ${MDPROP} ]; then -+ if [ -n $($MDPROP -v iodevice device-type=pciex) ]; then ++ if [ -x "${MDPROP}" ]; then ++ if [ -n "$($MDPROP -v iodevice device-type=pciex)" ]; then echo ldoms-root echo ldoms-io - elif [[ -n $($MDPROP -v iov-device vf-id=0) ]]; then -+ elif [ -n $($MDPROP -v iov-device vf-id=0) ]; then ++ elif [ -n "$($MDPROP -v iov-device vf-id=0)" ]; then echo ldoms-io fi fi +-- +2.15.0 + diff --git a/testing/virt-what/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch b/testing/virt-what/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch new file mode 100644 index 0000000000..f2f634c076 --- /dev/null +++ b/testing/virt-what/0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch @@ -0,0 +1,35 @@ +From a821dc9961d457c086fffcc16a911cb6f9f8659a Mon Sep 17 00:00:00 2001 +From: xiliang <xiliang@redhat.com> +Date: Sun, 18 Jun 2017 00:33:28 +0800 +Subject: [PATCH] As xen pv guest can access cpuid from Intel CPUs started + IvyBridge onwards have CPUID Faulting, added one more check in virt-what. + +--- + virt-what.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/virt-what.in b/virt-what.in +index a05e0db..247348e 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -1,6 +1,6 @@ + #!/bin/sh - + # @configure_input@ +-# Copyright (C) 2008-2015 Red Hat Inc. ++# Copyright (C) 2008-2017 Red Hat Inc. + # + # 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 +@@ -223,7 +223,8 @@ fi + + # Check for Xen. + +-if [ "$cpuid" = "XenVMMXenVMM" ]; then ++if [ "$cpuid" = "XenVMMXenVMM" ] && ++ ! echo "$dmi" | grep -q 'No SMBIOS nor DMI entry point found, sorry'; then + echo xen; echo xen-hvm + # Check for AWS + if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then +-- +2.15.0 + diff --git a/testing/virt-what/APKBUILD b/testing/virt-what/APKBUILD index 3e0c247685..77e53f30f4 100644 --- a/testing/virt-what/APKBUILD +++ b/testing/virt-what/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Henrik Riomar <henrik.riomar@gmail.com> -# Maintainer: +# Maintainer: Henrik Riomar <henrik.riomar@gmail.com> pkgname=virt-what pkgver=1.18 -pkgrel=1 +pkgrel=2 pkgdesc="Detect if we are running in a virtual machine" url="https://people.redhat.com/~rjones/virt-what/" arch="x86 x86_64 ppc64le" @@ -11,7 +11,10 @@ checkdepends="checkbashisms" makedepends="automake autoconf perl-dev" subpackages="$pkgname-doc" source="http://people.redhat.com/~rjones/$pkgname/files/$pkgname-$pkgver.tar.gz - Remove-bashisms.patch" + 0001-Missing-have_cpuinfo-check.patch + 0002-Remove-bashisms.patch + 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch + " builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -44,4 +47,6 @@ package() { } sha512sums="8085a38111d5664f411f5bb9d2ee221bc22e5b0f2d993e8d518718b3f63b16ba73e052b1623c090493cf8fef52fd237ba823377503a32b4b7d03cc5380d5c613 virt-what-1.18.tar.gz -1a01dc546f3e358d9c9800f0dd7a46152eef8aeb8f3dd4976922442c0a41b100419678debe26f0231849b412a63072fdbabc42354591925a2ee8b6d848d7fe6f Remove-bashisms.patch" +e910d197b172f7d9bf730238e0ea4cabd9db732051040233e2d25b44e07ed160c875ff9dd76048f0534ee269a77be14d01b2e8e66a51c8e9325109d25fb03d9b 0001-Missing-have_cpuinfo-check.patch +b57686e6f7af4d1c388b26d0a3e3a4964b5f74133aba47f4ed1f6771c8f22337f92f4519f01dd240a82e00e6fdbf0adaa7dd6040c4b9ec4924ce973b1fca9b33 0002-Remove-bashisms.patch +979c91b4f65ec95d85f2ad873e4148cd46e399534109ebeee03f8815c05327b590cf72a68a46f5ad655513591fb0c4a75cd08908446583d44213b87a75741c50 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch" |