Subject: [alpine-aports] [PATCH] testing/virtualbox-guest-additions: Upgrade to 5.1.12 and update init script

From: Ben Allen <[email-masked]>
Date: Thu, 29 Dec 2016 15:55:28 +0000

- Upgrade to 5.1.12
- Init script on start loads vboxsf, which mounts any shared directories
- Init script on stop umounts any vboxsf filesystems and unloads vboxsf
---
 testing/virtualbox-guest-additions/APKBUILD                | 14 +++++++-------
 .../virtualbox-guest-additions.initd                       | 12 ++++++++++--
 2 files changed, 17 insertions(+), 9 deletions(-)
 mode change 100644 => 100755 testing/virtualbox-guest-additions/virtualbox-guest-additions.initd

diff --git a/testing/virtualbox-guest-additions/APKBUILD b/testing/virtualbox-guest-additions/APKBUILD
index feaff00785..436cb09b3d 100644
--- a/testing/virtualbox-guest-additions/APKBUILD
+++ b/testing/virtualbox-guest-additions/APKBUILD
@@ -4,7 +4,7 @@
 _flavor=${FLAVOR:-grsec}
 
 pkgname=virtualbox-guest-additions
-pkgver=5.1.6
+pkgver=5.1.12
 
 pkgrel=0
 pkgdesc="VirtualBox Addtions userland components"
@@ -63,7 +63,7 @@ package() {
         install -v -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
 }
 
-md5sums="8c2331a718cfc038963c1214c2ba9811  VirtualBox-5.1.6.tar.bz2
+md5sums="58fd51b90358ac42811e044988d53438  VirtualBox-5.1.12.tar.bz2
 10f65154d3ff17d88fad5ed384e20276  futimens.patch
 81a2ebe27e166219a03858f87eb57518  musl-fix-headers.patch
 2d8119cc2bb88a1dc8e1bcd2a6abf36e  musl-no-glibc.patch
@@ -72,8 +72,8 @@ md5sums="8c2331a718cfc038963c1214c2ba9811  VirtualBox-5.1.6.tar.bz2
 072ee2114b3771e7bdbff5211f342755  uclibc-gnu_linux.patch
 b5e6069e20db86cb2e00f1431b202ca4  vboxguestlib-makefile-nox11.patch
 8a6525395f4791b8261f245be1eec552  virtualbox-guest-additions-localconfig
-867c31d95544f25deb3dfbac038d4cb0  virtualbox-guest-additions.initd"
-sha256sums="2e0112b0d85841587b8f212e6ba8f6c35b31e1cce6b6999497dc917cd37e6911  VirtualBox-5.1.6.tar.bz2
+c4fea5734564528cd7f9cc5d73c71aa2  virtualbox-guest-additions.initd"
+sha256sums="e6f10b1b6f3eb1be2c5223f60569f8ce35468a4354ed53db12f4c9b419393d0d  VirtualBox-5.1.12.tar.bz2
 deaa739129ec23a05d5aa43ad8af3e93086ca340696fde3e5d1539e1c7347adb  futimens.patch
 d5085e8921b5fa7dca26d2a8da6d1174f7971491c356b6bea5126e6dda0d863c  musl-fix-headers.patch
 d0bc2e84675741a54b42b59c9746f255799264512b11a565ce3d435f1398a874  musl-no-glibc.patch
@@ -82,8 +82,8 @@ aab58b5dd854551c52063876e8b4186892ba0b3cf9d907c3abe9cff93b8be7fc  musl-fix-stat-
 1bf547f849bf325e443f74ce7fbfb3657d9b2918b4c888efac304eac929a0fae  uclibc-gnu_linux.patch
 19d156225f205245abeca94aac72b90d6dec2d830b4fb30b6c6ce790011e97ac  vboxguestlib-makefile-nox11.patch
 555a92cc4741419f7ffd6b9698600b85dc14ddfc6fed6df792d13caf7116e2af  virtualbox-guest-additions-localconfig
-f1c39ecf58e6dc8162066adbda6d5cec5a5fe4f5f1f6003b6201269b3f52f456  virtualbox-guest-additions.initd"
-sha512sums="7b10c203692a091b3de8dda147b386e17fa7d2bdb56031163e0551e54c1ff6a8e953361d51cc6f7bb6978544a6517e843b446e866aa1fa6f96b4677dda27daa4  VirtualBox-5.1.6.tar.bz2
+9f163a04d5e829a314c084ba00e01038fba697a360c21e0c6c611918ce869273  virtualbox-guest-additions.initd"
+sha512sums="0e63f778595aada4389a0d4f390aaa56fc1fb0ed0c4ce999f060787ce6d29462329d6543f34572111d2538cf49a54b799263fe04ebd115c2426506c28c809516  VirtualBox-5.1.12.tar.bz2
 1da850bc30399ecde501eba5403ef1add1ae108d38394b01cd7f5cdf0462b855793d564d3adc1f770983b36529d77f3f7b0269fb65152468084a0a44c38e1638  futimens.patch
 0169a620d62aa3de8124e0084f4b747b602fbdcab7892fe075606459e0200d412321c86da4c5d98309f4d7479ae1b5267ed28bea6c6e64fd8be88cab74f8e94c  musl-fix-headers.patch
 b1c47cb910ac751df7bd4bc10c5501e91d88a9b3e4fe181b02755d433df8e89a160a38422912266f0cc51ba0c09854dad513ba6f2634fc76c59cee7989b259eb  musl-no-glibc.patch
@@ -92,4 +92,4 @@ ddeca1cf8dd7d749e3c649b7861d3b12d246882dc0fbd2a980efc2c5a33dac94c5b40b07a49d26cd
 d2bba9de80c40bc258b025a8e3395a4b0b7781d70d5528993f0fff57e9fc015306b483d4da14e22aed3f188ffda8685aa51e13943f48c17ae18a2a66d15d7bbb  uclibc-gnu_linux.patch
 0ced8df03a354e211fd0631d3971246d75de3a60c2347b5fe33236405d55911422d53eb7c679ae6fc18dc8f57c245d5701fa02ae740d1f0bd1e1cbb0b715bf2f  vboxguestlib-makefile-nox11.patch
 1b14e0239e91d2d1515250272eb485b442d785dac98bdd7b1cca2fad123f853fe138b6cfad2566c8cb35cab3b77151a49a9422fbad3c13489fa12f3f43d550b9  virtualbox-guest-additions-localconfig
-fba476784d6660333c97b443eadb3d426ffc6fa39cdf0df79a82f3039c6a45b7c3203a4870c09f44aa5c4cf3e32eb495281a7b14e325fdea077a2268b59af827  virtualbox-guest-additions.initd"
+a2325a3bdc2655a0d245c674400bbb44ecbce159044176fc2faa7b959986d39a327d4dfcbf1d1b815459c157087fb75650b525344f561cd44edb071c29263f2d  virtualbox-guest-additions.initd"
diff --git a/testing/virtualbox-guest-additions/virtualbox-guest-additions.initd b/testing/virtualbox-guest-additions/virtualbox-guest-additions.initd
old mode 100644
new mode 100755
index 5f990ecdff..c8663c1c6e
--- a/testing/virtualbox-guest-additions/virtualbox-guest-additions.initd
+++ b/testing/virtualbox-guest-additions/virtualbox-guest-additions.initd
@@ -14,12 +14,20 @@ depend() {
 
 start_pre() {
 	einfo "Loading kernel modules"
-	/sbin/modprobe vboxguest 2>&1
+	/sbin/modprobe vboxguest 2>&1 && \
 	/sbin/modprobe vboxsf 2>&1
+	eend $?
+}
+
+stop_pre() {
+	einfo "Unmounting shared folders"
+	/bin/grep vboxsf /proc/mounts | /usr/bin/cut -f2 -d' ' | /usr/bin/xargs -n1 -r /bin/umount
+	eend $?
 }
 
 stop_post() {
 	einfo "Removing kernel modules"
-	/sbin/modprobe -r vboxsf 2>&1
+	/sbin/modprobe -r vboxsf 2>&1 && \
 	/sbin/modprobe -r vboxguest 2>&1
+	eend $?
 }
-- 
2.11.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---