aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2018-01-27 15:41:32 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-21 11:50:42 +0000
commitb48236284f7c74dcfd833a5d0a35c8350e9a91d2 (patch)
tree06a9e4fd9d24d0cf408be97cd694a84e07b243c2
parent2e08c6fd45e560d53bbf0c9f004161ea877c7bf8 (diff)
downloadaports-b48236284f7c74dcfd833a5d0a35c8350e9a91d2.tar.bz2
aports-b48236284f7c74dcfd833a5d0a35c8350e9a91d2.tar.xz
community/virt-what: fix arch handling
Add upstream fix for how uname is used to determine the arch.
-rw-r--r--community/virt-what/0004-Determine-architecture-via-uname-m.patch30
-rw-r--r--community/virt-what/APKBUILD6
2 files changed, 34 insertions, 2 deletions
diff --git a/community/virt-what/0004-Determine-architecture-via-uname-m.patch b/community/virt-what/0004-Determine-architecture-via-uname-m.patch
new file mode 100644
index 0000000000..a32e1a2646
--- /dev/null
+++ b/community/virt-what/0004-Determine-architecture-via-uname-m.patch
@@ -0,0 +1,30 @@
+From 52870e8a264653d7921e8a4edff56d4b050614d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Sat, 27 Jan 2018 13:11:36 +0100
+Subject: [PATCH] Determine architecture via 'uname -m'
+
+'uname -p' only gives unknown on x86_64, i386, arm6l (rpi) and aarch64
+(scaleways).
+---
+ virt-what.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/virt-what.in b/virt-what.in
+index 29b7b0d..2011ff4 100644
+--- a/virt-what.in
++++ b/virt-what.in
+@@ -102,9 +102,9 @@ cpuid=$(virt-what-cpuid-helper)
+ dmi=$(LANG=C dmidecode 2>&1)
+
+ # Architecture.
+-# Note for the purpose of testing, we only call uname with -p option.
++# Note for the purpose of testing, we only call uname with -m option.
+
+-arch=$(uname -p | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/')
++arch=$(uname -m | sed -e 's/i.86/i386/' | sed -e 's/arm.*/arm/')
+
+ # Check for VMware.
+ # cpuid check added by Chetan Loke.
+--
+2.16.1
+
diff --git a/community/virt-what/APKBUILD b/community/virt-what/APKBUILD
index 77e53f30f4..4a85ede0d1 100644
--- a/community/virt-what/APKBUILD
+++ b/community/virt-what/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Henrik Riomar <henrik.riomar@gmail.com>
pkgname=virt-what
pkgver=1.18
-pkgrel=2
+pkgrel=3
pkgdesc="Detect if we are running in a virtual machine"
url="https://people.redhat.com/~rjones/virt-what/"
arch="x86 x86_64 ppc64le"
@@ -14,6 +14,7 @@ source="http://people.redhat.com/~rjones/$pkgname/files/$pkgname-$pkgver.tar.gz
0001-Missing-have_cpuinfo-check.patch
0002-Remove-bashisms.patch
0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch
+ 0004-Determine-architecture-via-uname-m.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -49,4 +50,5 @@ package() {
sha512sums="8085a38111d5664f411f5bb9d2ee221bc22e5b0f2d993e8d518718b3f63b16ba73e052b1623c090493cf8fef52fd237ba823377503a32b4b7d03cc5380d5c613 virt-what-1.18.tar.gz
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"
+979c91b4f65ec95d85f2ad873e4148cd46e399534109ebeee03f8815c05327b590cf72a68a46f5ad655513591fb0c4a75cd08908446583d44213b87a75741c50 0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch
+5a37329546b1c6e98cb03f0727f9c2f1cefa0c856bc594389852a51f69f0735777bd8b66ffa353c9c31e6c857a032b0b8f62e9aee61a8901a14328b31aea6395 0004-Determine-architecture-via-uname-m.patch"