Added VMware remote console

This commit is contained in:
Torsten Kurbad
2023-11-28 17:16:48 +01:00
parent f5ee2c36dd
commit 591d02bb6a
9 changed files with 325 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
AUX vmware-usb.initd 348 BLAKE2B 7fe647cdc58f9f5d4282cd63de5f150bc406699dd30b7797c87d048a8a7ba0c3d5863afa695fd07ca435982cd96e5375e50eb80e342a09d5880977205b10d424 SHA512 2abb41a4e4fa0fc65a63457ddffd1c03b797aac1d5af48ba8cb313f8db1c552c709dae8a571ff2eb1d5638958f078b47809fd887c0833cadfcfdb9f18cee92cd
AUX vmware-usb.service 284 BLAKE2B 39426b223f08643714c91dc8dc85d5456fa4bef650d9c5731f488be841e93e3e070d90a3e7b02adfb0f2241be9fe90dfb48531c3c229fb07ce00a8baf5a5a86a SHA512 ec8b9f63dece0a55e79e104bac62b82f1e91e9788b3bbb24a95f724af5fb382c2930632c59f314a9230f26ac2d1c49984d824cadcbea2f05d347d0e483d37653
DIST VMware-Remote-Console-12.0.5-22744838.x86_64.bundle 73068243 BLAKE2B 0c25f034de81802a7646227b2b23d4c73d66634229609819bd04857eceff3d57136d05a38fe18ec5f2961b0aa337dcfed389b11541066139316c7a006c2e2d74 SHA512 c5fef5c8ac1531866ff3707e3f6018977507cb30f01a7bbdde2353d84802c12d30e79826b65486816521a2d7e95270868661cd3c0b1e17bfb847cace6c1ad977
EBUILD vmware-vmrc-12.0.5.22744838.ebuild 6243 BLAKE2B 602e8278621128067c6eec635f0791edca504f8e6dfe5cba8672c6776b071bc80480b455424acdddd62c45e50213991f52428ba32c49c53608f53ba581a78521 SHA512 3173d77632fa239e9d7e6ea58b37c14b12b3363aa090de5c723611b13be7d0e9c73c6194777a6cde43b1f28d77585352304aa47ac3be8c1e162b9577d6a965ba
MISC metadata.xml 786 BLAKE2B 016cf621092071f91b862878e2f66a9b7d19655a33d0c7e33a1de3b16d58813b95cc9b31f687ff8567a9dcb7bd4c26669d28c501943e29371e79fbea09246364 SHA512 a93fc8d5ac3926fd4e74c7a0bb83ad5dca2839a9009f72cfa1de0a14a1e1cebb275289b87f4dd42f32e26d2e0ba46166ee68f210ce88bd90426e20dd279ace37
@@ -0,0 +1,18 @@
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/opt/vmware/bin/vmware-usbarbitrator"
name="VMware USB Arbitrator"
description="VMware USB Arbitrator"
depend() {
need localmount
use net
}
stop() {
ebegin "Stopping ${description}"
"${command}" -k
eend $?
}
@@ -0,0 +1,13 @@
[Unit]
Description=VMware USB Arbitration Service
After=vmware-authentication.service
PartOf=vmware.target
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/opt/vmware/bin/vmware-usbarbitrator
ExecStop=/opt/vmware/bin/vmware-usbarbitrator --kill
[Install]
WantedBy=vmware.target
+21
View File
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>spiderx@spiderx.dp.ua</email>
<name>Vladimir Pavljuchenkov</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="standalone">Don't reuse files from VMware workstation install</flag>
</use>
<longdescription lang="en">
VMware Remote Console provides console access and client device
connection to VMs on a remote host. You will need to download
this installer before you can launch the external VMRC application
directly from a VMware vSphere or vRealize Automation web client.
</longdescription>
</pkgmetadata>
@@ -0,0 +1,179 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop pax-utils systemd xdg
MY_PV="$(ver_rs 3 -)"
MY_PN="VMware-Remote-Console"
MY_P="${MY_PN}-${MY_PV}.x86_64.bundle"
DESCRIPTION="VMware Remote Console"
HOMEPAGE="https://docs.vmware.com/en/VMware-Remote-Console/index.html"
SRC_URI="${MY_P}"
LICENSE="vmware"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE=""
RESTRICT="bindist fetch mirror"
RDEPEND=""
S="${WORKDIR}/src"
pkg_nofetch() {
einfo "Please the client file ${A} from"
einfo "${HOMEPAGE}"
einfo "and place it into your DISTDIR directory"
}
src_unpack() {
# Bundle doesn't allow extraction via symlinks or relative paths
cp "${DISTDIR}"/"${MY_P}" "${WORKDIR}"/ || die "cp failed"
sh "${WORKDIR}"/"${MY_P}" --console --required --eulas-agreed -x "${S}" \
|| die "bundle extract failed"
}
src_prepare() {
default
# Replace placeholder path
sed -i -e "s:@@BINARY@@:${EPREFIX}/opt/vmware/bin/vmrc:g" \
-e "/^Encoding/d" \
vmware-vmrc-app/share/applications/vmware-vmrc.desktop \
|| die "sed for vmware-vmrc.desktop failed"
local vmware_installer_version
vmware_installer_version="$(grep -oPm1 '(?<=<version>)[^<]+' vmware-installer/manifest.xml)"
sed -i -e "s/@@VERSION@@/${vmware_installer_version}/" \
-e "s,@@VMWARE_INSTALLER@@,/opt/vmware-vmrc/lib/vmware-installer/${vmware_installer_version}," \
vmware-installer/bootstrap || die "sed for vmware-installer/bootstrap failed"
}
src_install() {
einstalldocs
into /opt/vmware
dobin vmware-vmrc-app/bin/vmrc
# libvmplayer.so/libvmplayer.so from app-emulation/vmware-workstation
dodir opt/vmware/lib/vmware/lib/libvmrc.so
dosym ../libvmplayer.so/libvmplayer.so \
opt/vmware/lib/vmware/lib//libvmrc.so/libvmrc.so
# appLoader from app-emulation/vmware-workstation
dosym appLoader opt/vmware/lib/vmware/bin/vmrc
domenu vmware-vmrc-app/share/applications/vmware-vmrc.desktop
doicon vmware-vmrc/lib/share/pixmaps/{vmware-vmrc,vmrc_sidebar}.png
for size in 16 24 32 48 ; do
doicon -s "${size}" vmware-vmrc/share/icons/hicolor/"${size}x${size}"/apps/vmware-vmrc.png
done
insinto /usr/share/metainfo
doins vmware-vmrc-app/share/appdata/vmware-vmrc.appdata.xml
pax-mark -m "${ED}"/opt/vmware/lib/vmware/bin/vmrc
local vmware_installer_version
vmware_installer_version="$(grep -oPm1 '(?<=<version>)[^<]+' vmware-installer/manifest.xml)"
# Install revdep-rebuild entry
insinto /etc/revdep-rebuild
echo 'SEARCH_DIRS_MASK="/opt/vmware"' > "${T}"/10vmware-vmrc
doins "${T}"/10vmware-vmrc
# Install the binaries
into /opt/vmware
dobin vmware-usbarbitrator/bin/vmware-usbarbitrator \
vmware-vmrc-app/bin/vmware-gksu
# Install the libraries
insinto /opt/vmware/lib/vmware
doins -r vmware-installer/lib/. \
vmware-vmrc-app/lib/.
insinto /opt/vmware/lib/vmware/share
doins -r vmware-vmrc/lib/share/. \
vmware-player-core/lib/share/.
insinto /opt/vmware/lib/vmware/lib/libvmware-zenity.so
doins vmware-player-core/lib/lib/libvmware-zenity.so/libvmware-zenity.so
# Install the installer
insinto /opt/vmware/lib/vmware-installer/"${vmware_installer_version}"
doins -r vmware-installer/{vmis,vmis-launcher,vmware-installer,vmware-installer.py}
fperms 0755 /opt/vmware/lib/vmware-installer/"${vmware_installer_version}"/{vmis-launcher,vmware-installer}
dosym ../lib/vmware-installer/"${vmware_installer_version}"/vmware-installer /opt/vmware/bin/vmware-installer
insinto /etc/vmware-installer
doins vmware-installer/bootstrap
# Install vmware-vmrc ancillaries
for size in 16 22 24 32 48 ; do
if [ "${size}" == "16" ] || [ "$size" == "32" ] ; then
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-certificate.png
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-x-vmware-{easter-egg,team}.png
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-x-vmware-{vm-clone,vm-legacy,vm}.png
fi
if [ "${size}" == "22" ] || [ "$size" == "24" ] ; then
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-certificate.png
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-x-vmware-{vm-clone,vm}.png
fi
if [ "${size}" == "48" ] ; then
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-x-vmware-{easter-egg,snapshot,team}.png
doicon -s "${size}" -c mimetypes \
vmware-vmrc/share/icons/hicolor/"${size}x${size}"/mimetypes/application-x-vmware-{vm-clone,vmdisk,vmfoundry,vm-legacy,vm}.png
fi
done
doicon -s scalable -c mimetypes \
vmware-vmrc/share/icons/hicolor/scalable/mimetypes/application-certificate.svg
doicon -s scalable -c mimetypes \
vmware-vmrc/share/icons/hicolor/scalable/mimetypes/application-x-vmware-{easter-egg,snapshot,team}.svg
doicon -s scalable -c mimetypes \
vmware-vmrc/share/icons/hicolor/scalable/mimetypes/application-x-vmware-{vm-clone,vmfoundry,vm-legacy,vm}.svg
exeinto /opt/vmware/lib/vmware/setup
doexe vmware-vmrc-setup/vmware-config
# Create symlinks for the various tools
dosym appLoader /opt/vmware/lib/vmware/bin/vmware-gksu
dosym appLoader /opt/vmware/lib/vmware/bin/vmware-setup-helper
# Fix permissions
fperms 0755 /opt/vmware/lib/vmware/bin/appLoader
fperms 0755 /opt/vmware/lib/vmware/bin/vmware-remotemks
fperms 0755 /opt/vmware/lib/vmware/setup/vmware-config
fperms 0755 /opt/vmware/lib/vmware/lib/libvmware-gksu.so/gksu-run-helper
# Create environment
local envd
envd="${T}"/90vmware-vmrc
cat > "${envd}" <<-EOF
PATH="/opt/vmware/bin"
ROOTPATH="/opt/vmware/bin"
CONFIG_PROTECT_MASK="/etc/vmware-installer"
VMWARE_USE_SHIPPED_LIBS=1
EOF
doenvd "${envd}"
# Create the configuration directory
dodir /etc/vmware
# Set bootstrap configuration
cat > "${ED}"/etc/vmware/bootstrap <<-EOF
BINDIR='/opt/vmware/bin'
LIBDIR='/opt/vmware/lib'
EOF
# Install initscript for vmware-usb
newinitd "${FILESDIR}"/vmware-usb.initd vmware-usb
systemd_dounit "${FILESDIR}"/vmware-usb.service
}