summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2017-05-20 14:47:33 +0200
committerJean-Marc Lenoir2017-05-20 14:47:33 +0200
commit0bdab5fa8b0eb5c5d6de0917332d73c131461c4a (patch)
tree2c4bf35a8a4d4260359df9855b269f532243c271
parent46f7cd548e754a72680c37acfe9b47f21a004942 (diff)
downloadaur-0bdab5fa8b0eb5c5d6de0917332d73c131461c4a.tar.gz
Add the ability to control vmware-hostd service on preferences window.
-rw-r--r--PKGBUILD33
-rwxr-xr-xconfigure-initscript.sh95
-rw-r--r--vmware-workstation.install4
3 files changed, 121 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f8bf152e3091..681afaa01d3e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -32,6 +32,7 @@ provides=(
)
depends=(
dkms
+ hicolor-icon-theme
# needed to replace internal libs:
fontconfig
freetype2
@@ -57,6 +58,7 @@ source=(
'bootstrap'
'config'
'pam.d-vmware-authd'
+ 'configure-initscript.sh'
'config.xml'
'datastores.xml'
@@ -83,6 +85,7 @@ sha256sums=(
'12e7b16abf8d7e858532edabb8868919c678063c566a6535855b194aac72d55e'
'55af509a4328fa88518e7008c65ff5598e6007e99ca2b4421a8f9b26126f6ff3'
'd50aa0a3fe94025178965d988e18d41eb60aa1ce2b28ee6e3ca15edeabfa2ca7'
+ '33a090e101b807f9496d2a3c8705301f913f7190c78f6c1e7bc45773f1810305'
'd0806b6cb99af04232585def7b8043df3104b9b17470ea70abbd5bedc1e7ca16'
'434cd4aa440d36b75ee20e0b588aaad874bb0d796173990bc4046667c66f5099'
@@ -181,18 +184,17 @@ package() {
# Make directories and copy files.
mkdir -p \
- "$pkgdir/etc"/{cups,vmware} \
+ "$pkgdir/etc"/{cups,pam.d,modprobe.d,profile.d,vmware} \
"$pkgdir/usr"/{share,bin} \
"$pkgdir/usr/include/vmware-vix" \
- "$pkgdir/usr/lib"/{vmware/setup,vmware-vix,vmware-ovftool,vmware-installer/2.1.0,cups/filter} \
- "$pkgdir/usr/share/licenses/$pkgname" \
+ "$pkgdir/usr/lib"/{vmware/setup,vmware-vix,vmware-ovftool,vmware-installer/2.1.0,cups/filter,modules-load.d} \
+ "$pkgdir/usr/share"/{doc/vmware-vix,licenses/"$pkgname"} \
"$pkgdir/var/lib/vmware/Shared VMs"
cd "$srcdir/extracted"
cp -r \
vmware-workstation/share/* \
- vmware-workstation/doc \
vmware-workstation/man \
vmware-network-editor-ui/share/* \
vmware-player-app/share/* \
@@ -212,7 +214,7 @@ package() {
vmware-workstation/lib/* \
vmware-player-app/lib/* \
vmware-vmx/lib/* \
- vmware-vprobe/lib/bin/* \
+ vmware-vprobe/lib/* \
vmware-workstation-server/{bin,lib,hostd} \
vmware-usbarbitrator/bin \
vmware-network-editor/lib \
@@ -230,8 +232,13 @@ package() {
cp -r \
vmware-vix-lib-Workstation1200/lib/Workstation-12.0.0 \
- vmware-vix-core/vixwrapper-config.txt \
+ vmware-vix-core/{lib/*,vixwrapper-config.txt} \
"$pkgdir/usr/lib/vmware-vix"
+ cp vmware-vix-core/vix-perl.tar.nogz "$pkgdir/usr/lib/vmware-vix/vix-perl.tar.gz"
+
+ cp -r \
+ vmware-vix-core/doc/* \
+ "$pkgdir/usr/share/doc/vmware-vix"
cp -r \
vmware-ovftool/* \
@@ -259,7 +266,15 @@ package() {
install -Dm 644 "vmware-tools-$isoimage/$isoimage.iso.sig" "$pkgdir/usr/lib/vmware/isoimages/$isoimage.iso.sig"
done
- mv "$pkgdir/usr/share/doc"/{EULA,*open_source_licenses.txt} "$pkgdir/usr/share/licenses/$pkgname"
+ install -Dm 644 "vmware-player-app/doc/LearnMore.txt" "$pkgdir/usr/share/licenses/$pkgname/LearnMore.txt"
+ install -Dm 644 "vmware-workstation/doc/EULA" "$pkgdir/usr/share/licenses/$pkgname/VMware Workstation - EULA.txt"
+ install -Dm 644 "vmware-workstation/doc"/*open_source_licenses.txt "$pkgdir/usr/share/licenses/$pkgname"
+ mv "$pkgdir/usr/lib/vmware-ovftool/vmware.eula" "$pkgdir/usr/share/licenses/$pkgname/VMware OVF Tool component for Linux - EULA.txt"
+ rm "$pkgdir/usr/lib/vmware-ovftool"/{vmware-eula.rtf,open_source_licenses.txt,manifest.xml}
+
+ install -Dm 755 "$srcdir/configure-initscript.sh" "$pkgdir/usr/lib/vmware-installer/2.1.0/bin/configure-initscript.sh"
+
+ install -Dm 644 "vmware-vmx/etc/modprobe.d/modprobe-vmware-fuse.conf" "$pkgdir/etc/modprobe.d/vmware-fuse.conf"
install -Dm 644 vmware-player-app/lib/isoimages/tools-key.pub "$pkgdir/usr/lib/vmware/isoimages/tools-key.pub"
@@ -272,7 +287,6 @@ package() {
install -Dm 644 "$srcdir/pam.d-vmware-authd" "$pkgdir/etc/pam.d/vmware-authd"
- install -dm755 "$pkgdir/usr/lib/modules-load.d"
echo -e "vmci\nvmmon" > "$pkgdir/usr/lib/modules-load.d/vmware.conf"
for service_file in \
@@ -378,7 +392,7 @@ package() {
if [ -n "$_enable_macOS_guests" ]; then
msg "Patching VMware for macOS guest support"
- python2 "$srcdir/unlocker.py"
+ python2 "$srcdir/unlocker.py" > /dev/null
for isoimage in ${_fusion_isoimages[@]}
do
@@ -395,7 +409,6 @@ fi
# to solve bugs with incompatibles library versions:
ln -sf /usr/lib/libz.so.1 "$pkgdir/usr/lib/vmware/lib/libz.so.1/"
# if there is not a better solution, define environment variable VMWARE_USE_SHIPPED_LIBS
- install -dm755 "$pkgdir/etc/profile.d"
echo -e "#export VMWARE_USE_SHIPPED_LIBS=yes" > "$pkgdir/etc/profile.d/vmware.sh"
chmod 755 "$pkgdir/etc/profile.d/vmware.sh"
ln -sf /usr/lib/libfontconfig.so.1 "$pkgdir/usr/lib/vmware/lib/libfontconfig.so.1/" # avoid a conflict with fontconfig when VMWARE_USE_SHIPPED_LIBS is defined
diff --git a/configure-initscript.sh b/configure-initscript.sh
new file mode 100755
index 000000000000..450b924d151f
--- /dev/null
+++ b/configure-initscript.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+action="$1" # add, remove, or status
+serviceName="$2"
+startLevel="$3"
+stopLevel="$4"
+
+# Notes:
+# This package does not need a vmware service to make VMware usable, so this script says that vmware service is always started.
+# vmware-workstation-server service is named vmware-hostd in this package.
+
+case "$serviceName" in
+ vmware-workstation-server)
+ serviceName="vmware-hostd"
+ ;;
+esac
+
+#echo $serviceName && exit # DEBUG
+
+addService() {
+ if [ "$serviceName" != "vmware" ]; then
+ systemctl enable --now $serviceName.service
+ fi
+}
+
+removeService() {
+ if [ "$serviceName" != "vmware" ]; then
+ systemctl disable --now $serviceName.service
+ fi
+}
+
+# Check to see whether a program is set to start on boot.
+checkService() {
+ if [ "$serviceName" = "vmware" ]; then
+ retval=0
+ else
+ systemctl is-active $serviceName.service > /dev/null
+ retval=$?
+ fi
+
+ if [ "$retval" = "0" ]; then
+ echo 'on'
+ exit 5
+ else
+ echo 'off'
+ exit 6
+ fi
+}
+
+usage() {
+ echo "Syntax for this script is as follows:"
+ echo ""
+ echo " $0 <action> <serviceName>"
+ echo ""
+ echo " action - add or remove"
+ echo " serviceName - The name of the service"
+ echo ""
+ echo ""
+ echo " $0 status <serviceName>"
+ echo " serviceName - The name of the service"
+ echo ""
+}
+
+
+
+case $action in
+ add)
+ # Don't allow any empty arguments for add
+ if [ "$1" = "" ] || [ "$2" = "" ] || [ "$3" = "" ] || [ "$4" = "" ]; then
+ usage
+ exit 1
+ fi
+ addService
+ ;;
+ remove)
+ # Don't allow any empty arguments for remove
+ if [ "$1" = "" ] || [ "$2" = "" ] || [ "$3" = "" ] || [ "$4" = "" ]; then
+ usage
+ exit 1
+ fi
+ removeService
+ ;;
+ status)
+ # We only need the serviceName to check status
+ if [ "$1" = "" ] || [ "$2" = "" ]; then
+ usage
+ exit 1
+ fi
+ checkService
+ ;;
+ *)
+ usage
+ exit 1
+ ;;
+esac
diff --git a/vmware-workstation.install b/vmware-workstation.install
index 989587210b37..b00241c13f7c 100644
--- a/vmware-workstation.install
+++ b/vmware-workstation.install
@@ -1,7 +1,9 @@
post_install() {
cat << EOF
-==> Before using VMware, you may need to enable some services:
+==> Before using VMware, you will need to load vmci and vmmon kernel modules.
+ In a terminal on root: "modprobe vmci vmmon"
+==> You may also need to enable some services:
- vmware-networks.service: to have network access in VMs
- vmware-usbarbitrator.service: to use USB devices inside VMs
- vmware-hostd.service: to start VMware as a server