summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2021-06-19 11:17:59 +0200
committerJean-Marc Lenoir2021-06-19 11:17:59 +0200
commit46de50fd42f7145ae7ab5a5e2ce3f096cae1c6fb (patch)
tree2d72394245a9b43cfcc5091ad5a59a36093f6176
parent7f9df56101305328980e6e8f20f5c6df2b99697b (diff)
downloadaur-46de50fd42f7145ae7ab5a5e2ce3f096cae1c6fb.tar.gz
Implement .path units to start services only when a VM is started
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD10
-rw-r--r--vmware-networks.path8
-rw-r--r--vmware-usbarbitrator.path8
-rw-r--r--vmware-workstation.install17
5 files changed, 43 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fec1cd38ef62..44b81a0147a0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vmware-workstation
pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC.
pkgver = 16.1.2
- pkgrel = 1
+ pkgrel = 2
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
@@ -36,6 +36,8 @@ pkgbase = vmware-workstation
source = vmware-networks-configuration.service
source = vmware-networks.service
source = vmware-usbarbitrator.service
+ source = vmware-networks.path
+ source = vmware-usbarbitrator.path
source = dkms.conf.in
source = Makefile
source = vmmon.patch
@@ -49,10 +51,11 @@ pkgbase = vmware-workstation
sha256sums = 9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b
sha256sums = c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245
sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d
+ sha256sums = 7772e6860f055bf4fc0f6233a6ae61cdb3ee34817490319de811c1a42505b170
+ sha256sums = 2e2b1780ad08bcac2f3bc216e0c19bb0cd90ec8dd885b57df8fef3cd13aaaf14
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
sha256sums = 1060b5d45caeda5119b220fab4e1ece398af34d75131139a5dc6f74ee06672c3
sha256sums = 7c3b6a7871b19e31fafdcc2631751dd9569196740d8e7c2026653d155c0c8da0
pkgname = vmware-workstation
-
diff --git a/PKGBUILD b/PKGBUILD
index acc40bc47dd5..b98c99c25510 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,7 @@ pkgname=vmware-workstation
pkgver=16.1.2
_buildver=17966106
_pkgver=${pkgver}_${_buildver}
-pkgrel=1
+pkgrel=2
pkgdesc='The industry standard for running multiple operating systems as virtual machines on a single Linux PC.'
arch=(x86_64)
url='https://www.vmware.com/products/workstation-for-linux.html'
@@ -66,6 +66,8 @@ source=(
'vmware-networks-configuration.service'
'vmware-networks.service'
'vmware-usbarbitrator.service'
+ 'vmware-networks.path'
+ 'vmware-usbarbitrator.path'
'dkms.conf.in'
'Makefile'
@@ -84,6 +86,8 @@ sha256sums=(
'9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b'
'c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245'
'd7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d'
+ '7772e6860f055bf4fc0f6233a6ae61cdb3ee34817490319de811c1a42505b170'
+ '2e2b1780ad08bcac2f3bc216e0c19bb0cd90ec8dd885b57df8fef3cd13aaaf14'
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
@@ -283,7 +287,9 @@ fi
for service_file in \
vmware-networks-configuration.service \
vmware-networks.service \
- vmware-usbarbitrator.service
+ vmware-usbarbitrator.service \
+ vmware-networks.path \
+ vmware-usbarbitrator.path
do
install -Dm 644 \
"$srcdir/$service_file" \
diff --git a/vmware-networks.path b/vmware-networks.path
new file mode 100644
index 000000000000..01beca691c87
--- /dev/null
+++ b/vmware-networks.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Monitor to Load-On-Demand the VMware Networks service
+
+[Path]
+PathModified=/run/vmware
+
+[Install]
+WantedBy=paths.target
diff --git a/vmware-usbarbitrator.path b/vmware-usbarbitrator.path
new file mode 100644
index 000000000000..e79fa8e96238
--- /dev/null
+++ b/vmware-usbarbitrator.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Monitor to Load-On-Demand the VMware USB Arbitrator
+
+[Path]
+PathModified=/run/vmware
+
+[Install]
+WantedBy=paths.target
diff --git a/vmware-workstation.install b/vmware-workstation.install
index 87af8548b555..8e58daa8703e 100644
--- a/vmware-workstation.install
+++ b/vmware-workstation.install
@@ -2,13 +2,24 @@ post_install() {
cat << EOF
==> Before using VMware, you need to reboot or load vmw_vmci and vmmon kernel modules (in a terminal on root: modprobe -a vmw_vmci vmmon)
-==> You may also need to enable some of these services:
-- vmware-networks.service: to have network access inside VMs
-- vmware-usbarbitrator.service: to connect USB devices inside VMs
+==> You may also need to enable some of the following services:
+- vmware-networks: to have network access inside VMs
+- vmware-usbarbitrator: to connect USB devices inside VMs
+These services can be activated during boot by enabling .service units or only when a VM is started by enabling .path units.
EOF
}
+post_upgrade() {
+ if (( $(vercmp "$2" "16.1.2-2") < 0 )); then
+ cat << EOF
+
+Now VMware services can be activated only when a VM is started by enabling .path units instead of .service units.
+
+EOF
+ fi
+}
+
post_remove() {
cat << EOF