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

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

View File

@ -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 $?
}

View File

@ -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

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>

View File

@ -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
}

View File

@ -0,0 +1,3 @@
AUX pk2cmd-add-share-dir-for-dev-file-9999.patch 661 BLAKE2B 4f7457a65402021067cad2307e7caec28d4550c2596b96e75329aad4cf8cf4c0d8831e149ec1d229a8f4d3427ac68ac87f3441a7f3ae40fe8128758b1b5b46bf SHA512 2951a0bba1762c3c97a6a1c708902876f7e26428f2513be66bb0f0eb62c4409073d5a2901055781e1e9b7c073265c37986cd94e7db834ce6e44ad6c7150c7909
EBUILD pk2cmd-9999.ebuild 1490 BLAKE2B d415e2452abee07f6ed5e346e531b525a00d1d6d0fe8f4abc6a6749b80b36fc94f9542b299caf2234387c2af48e5c4d933ed088a23b5a5a1c06dbbdc4ac86fb2 SHA512 33909f2aaee7b7efe21b9956221ef89541005bd5d8db7638928d68630afad9b4180bc638605e97d4bf503d2cfe2513b1fecd1c7553b624d88f6ced0b189258ad
MISC metadata.xml 250 BLAKE2B 8a43cac0f4db66fbc1320598dc1a764f7abebcf37513543da007eb2bd61064dbb068f78eb913b4ec16214beccbcc1229ebfa17beaae09eabef985852fb8a5b11 SHA512 95796c4e480c6e6a7db492b41b97c8676fe00580079637184b03bc4105b362d6ceac8d692fc6c426d7388e08892d080cf64c8c0143b3e9fd0e7a52a8d1295c78

View File

@ -0,0 +1,19 @@
diff -urN pk2cmd.orig/cmd_app.cpp pk2cmd/cmd_app.cpp
--- pk2cmd.orig/cmd_app.cpp 2023-11-24 10:19:23.781309788 +0100
+++ pk2cmd/cmd_app.cpp 2023-11-24 10:20:27.795077953 +0100
@@ -88,7 +88,14 @@
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
if (_tcslen(tempString) < 17)
{
- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
+ // Try /usr/share/pk2 first
+ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
+
+ if(access(tempString, 0))
+ {
+ // Well, that didn't work, default to the current directory
+ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
+ }
}
}
if (!PicFuncs.ReadDeviceFile(tempString))

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>embedded@gentoo.org</email>
<name>Embedded Gentoo</name>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,59 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="An application for working with the Microchip PicKit2/3 PIC programmers - updated version"
HOMEPAGE="http://www.microchip.com/pickit2 https://github.com/martonmiklos/pk2cmd"
LICENSE="MicroChip-PK2"
SLOT="0"
if [[ "${PV}" == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/martonmiklos/${PN}.git"
EGIT_BRANCH="master"
inherit git-r3
S="${WORKDIR}/${P}/${PN}"
else
SRC_URI="https://bitbucket.org/jpcgt/flatcam/downloads/FlatCAM-${PV}.zip -> ${P}.zip"
KEYWORDS="~amd64 ppc ppc64 ~x86"
S="${WORKDIR}/${PN}v${PV}LinuxMacSource"
fi
DEPEND="virtual/libusb:0"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-add-share-dir-for-dev-file-${PV}.patch
)
src_prepare() {
default
# Fix up the Makefile
sed \
-e 's:#TARGET=linux:TARGET=linux:' \
-e 's:DBG=-O2:DBG=:' \
-e 's:^CFLAGS=:CFLAGS+=:' \
-e 's:^LDFLAGS=:LDFLAGS+=:' \
-e 's:^LIBUSB=/usr/local:LIBUSB=/usr:' \
-e 's:/lib -lusb:/'"$(get_libdir)"' -lusb:' \
-e "s:^CC=g++::" \
-i Makefile || die
}
src_compile() {
emake CC="$(tc-getCXX)"
}
src_install() {
# Copy the device files and PicKit2 OS
insinto /usr/share/pk2
doins PK2DeviceFile.dat PK2V023200.hex PK3BLV011405.hex PK3OSV020005.hex
# Install the program
dobin pk2cmd
# Install the documentation
dodoc Readme-libusb.txt ReadmeForPK2CMDLinux2-6.txt usbhotplug.txt
}