diff options
author | Henrik Riomar <henrik.riomar@gmail.com> | 2017-09-08 10:05:10 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-09-19 14:45:04 +0000 |
commit | ef0c973ce651944cb71939a35f8ee9856213bcdd (patch) | |
tree | c6d647563c9147ce760881cbe5439fd4ac4bc74a /testing/virt-what | |
parent | 8b768022ca5f5080c2c08d5e1e3b98054dc95b08 (diff) | |
download | aports-ef0c973ce651944cb71939a35f8ee9856213bcdd.tar.bz2 aports-ef0c973ce651944cb71939a35f8ee9856213bcdd.tar.xz |
testing/virt-what: fix bashisms
Add Remove-bashisms.patch from Debian
Drop: skip-ldoms-test-if-not-sparc64.patch not needed after bashisms fix
Diffstat (limited to 'testing/virt-what')
-rw-r--r-- | testing/virt-what/APKBUILD | 6 | ||||
-rw-r--r-- | testing/virt-what/Remove-bashisms.patch | 43 | ||||
-rw-r--r-- | testing/virt-what/skip-ldoms-test-if-not-sparc64.patch | 14 |
3 files changed, 46 insertions, 17 deletions
diff --git a/testing/virt-what/APKBUILD b/testing/virt-what/APKBUILD index 408bdfa216..400a90b595 100644 --- a/testing/virt-what/APKBUILD +++ b/testing/virt-what/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=virt-what pkgver=1.18 -pkgrel=0 +pkgrel=1 pkgdesc="Detect if we are running in a virtual machine" url="https://people.redhat.com/~rjones/virt-what/" arch="x86 x86_64 ppc64le" @@ -10,7 +10,7 @@ license="GPL2+" makedepends="automake autoconf perl-dev" subpackages="$pkgname-doc" source="http://people.redhat.com/~rjones/$pkgname/files/$pkgname-$pkgver.tar.gz - skip-ldoms-test-if-not-sparc64.patch" + Remove-bashisms.patch" builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -41,4 +41,4 @@ package() { } sha512sums="8085a38111d5664f411f5bb9d2ee221bc22e5b0f2d993e8d518718b3f63b16ba73e052b1623c090493cf8fef52fd237ba823377503a32b4b7d03cc5380d5c613 virt-what-1.18.tar.gz -d47d5cfaf3c79eb7d7e1fd5d24cb620628d8038cc724e738fca55dad7fdf312616e13d4149114ad8913f691c0b2e2548ad5fe12d789eeca9a50e500911b3c731 skip-ldoms-test-if-not-sparc64.patch" +1a01dc546f3e358d9c9800f0dd7a46152eef8aeb8f3dd4976922442c0a41b100419678debe26f0231849b412a63072fdbabc42354591925a2ee8b6d848d7fe6f Remove-bashisms.patch" diff --git a/testing/virt-what/Remove-bashisms.patch b/testing/virt-what/Remove-bashisms.patch new file mode 100644 index 0000000000..ec0baf6bcd --- /dev/null +++ b/testing/virt-what/Remove-bashisms.patch @@ -0,0 +1,43 @@ +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?= + +Use [ instead of [[ and -a instead of && so we fall back to test if +necessary: + + http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html +--- + 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 +--- a/virt-what.in ++++ b/virt-what.in +@@ -360,20 +360,20 @@ if [ "$cpuid" = "OpenBSDVMM58" ]; then + fi + + # Check for LDoms +-if [[ "$arch" == sparc* && -e ${root}/dev/mdesc ]]; then ++if [ ${arch#sparc} != "$arch" -a -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 + echo ldoms-control + else + echo ldoms-guest + fi + 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 + 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 + echo ldoms-io + fi + fi diff --git a/testing/virt-what/skip-ldoms-test-if-not-sparc64.patch b/testing/virt-what/skip-ldoms-test-if-not-sparc64.patch deleted file mode 100644 index 9b85d9ed00..0000000000 --- a/testing/virt-what/skip-ldoms-test-if-not-sparc64.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN virt-what-1.18/tests/test-ldoms.sh virt-what-1.18-ldoms-unknown/tests/test-ldoms.sh ---- virt-what-1.18/tests/test-ldoms.sh 2017-07-31 15:57:56.000000000 +0200 -+++ virt-what-1.18-ldoms-unknown/tests/test-ldoms.sh 2017-07-31 19:51:37.542994885 +0200 -@@ -17,6 +17,10 @@ - - root=tests/ldoms - -+cpu=$(arch -p) -+# test only for sparc64 -+[ x"$cpu" = x"sparc64" ] || exit 77 -+ - output="$(./virt-what --test-root=$root 2>&1)" - expected="ldoms - ldoms-guest" |