From 2c3cd8d42cd970e3e32846f6332ddae84953046b Mon Sep 17 00:00:00 2001 From: Daniel Solano Gómez Date: Tue, 4 Oct 2022 19:40:00 -0500 Subject: app-emulation/*: Sync with stefantalpalaru-overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Solano Gómez --- app-emulation/vmware-modules/Manifest | 6 +- app-emulation/vmware-modules/metadata.xml | 3 - .../vmware-modules/vmware-modules-16.2.3-r2.ebuild | 99 ----- .../vmware-modules/vmware-modules-16.2.4-r2.ebuild | 121 ++++++ app-emulation/vmware-workstation/Manifest | 6 +- .../vmware-workstation-16.2.3.19376536.ebuild | 427 --------------------- .../vmware-workstation-16.2.4.20089737.ebuild | 427 +++++++++++++++++++++ 7 files changed, 554 insertions(+), 535 deletions(-) delete mode 100644 app-emulation/vmware-modules/vmware-modules-16.2.3-r2.ebuild create mode 100644 app-emulation/vmware-modules/vmware-modules-16.2.4-r2.ebuild delete mode 100644 app-emulation/vmware-workstation/vmware-workstation-16.2.3.19376536.ebuild create mode 100644 app-emulation/vmware-workstation/vmware-workstation-16.2.4.20089737.ebuild diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest index 8c5c925..6f9ad66 100644 --- a/app-emulation/vmware-modules/Manifest +++ b/app-emulation/vmware-modules/Manifest @@ -1,3 +1,3 @@ -DIST vmware-modules-16.2.3-5.18.zip 618095 BLAKE2B fdae903bd1c5f5ac3d5fa5cca0f7afeba28ed3fa8674701477e355083e995c3f98544051c884c5561f9e9b00faee406b913387bd910776a922835f51e806c420 SHA512 a8e6fd877012cb4fd0a0e00c2a1521cc83617683cbe8bae0cdb5ca45ef1da685bd1bbce5d7313bd4ab57ace95cfd5e29ba92969ff5e03b83812d23e95332e874 -EBUILD vmware-modules-16.2.3-r2.ebuild 2627 BLAKE2B 3cd1e991b73dd47d55c7cc8caf988e7226580042d56b55e19279458d24890b9c5b88dc18131ba6be37a3815b9156a9e1b7cae00cdf8168b786ff9e102ddcd597 SHA512 51f24b27b3d41a316aab5c42d8eb496a5dbfa2d36f85ff25b11608516c25f485e76955e3cec8bdefcc6214d129aee92397770c4286774f3b9920ea0eff7bfcba -MISC metadata.xml 322 BLAKE2B 178d5a7e0f6a26281fdeb655994b728e1b2e831a9bd7e07d6ed7c5ad2edb04d30bb8543ee5a1440f06e3a9eb1af20810a3e93800291f5feda877a644aacad14a SHA512 8ed1935f376c38b57fdcd973dab5a8dd714b2fbb74108228f3aab19cec95340c93f6ecff03b10fcafd261896efa711f47ef8c301f35fa0fc4490a4fb45f2fd55 +DIST vmware-modules-16.2.4-cafa1489600562d26c8393ede8e702154276e0be.tar.gz 476988 BLAKE2B 0c14726c53488a6c010d28f3e67daad739feb64817cd7e5cab928af90fbc0dad1993f8f4cbc8b192ac29b6fc8202953a585b8d27f8c4b494218430f61aa283e1 SHA512 7702a65c8b542824e3a76ba3f86593aef61c29459fa414d5f68fcfb0f93bc1f1491d448edb477d5b7fd914e1e3bed895a88e837a26e72ab8916a09b22061db50 +EBUILD vmware-modules-16.2.4-r2.ebuild 3318 BLAKE2B 622f39d481acc96672974e864d90cb99f73df7c4fa1d2e3876b2c680d4dbf39af214fd22ea60676c5600bffd78faf2bbd515b305667c0f2277a594ecf2ae2001 SHA512 1eb2a65c8b5271c8239f25756059ab90ae42323fe790cb8232859a41d96560896cfc3a2784cf4b24672511e630e6d56e59d7209463749ca9d6759e4b6f634fea +MISC metadata.xml 258 BLAKE2B 32ba82775278c15115ba95e0a7c4072d819e915d97801ab5efcd5a9c9408e1659cb1423f6bc21bb8928cfb29c401c0bad5331b917b44d21bbf279b07c4fefca3 SHA512 1c1b55777f8e757404ad5df42c46e00f344e28a4067129b2dd93b17c13fb2656130e948e1dc6295dbb6e6da81eee5b012f9b3a002a95521e9ee12c2cd6df10db diff --git a/app-emulation/vmware-modules/metadata.xml b/app-emulation/vmware-modules/metadata.xml index 7d9b42f..ad506b9 100644 --- a/app-emulation/vmware-modules/metadata.xml +++ b/app-emulation/vmware-modules/metadata.xml @@ -5,7 +5,4 @@ stefantalpalaru@yahoo.com Ștefan Talpalaru - - VMware kernel modules. - diff --git a/app-emulation/vmware-modules/vmware-modules-16.2.3-r2.ebuild b/app-emulation/vmware-modules/vmware-modules-16.2.3-r2.ebuild deleted file mode 100644 index 27d0929..0000000 --- a/app-emulation/vmware-modules/vmware-modules-16.2.3-r2.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit eutils flag-o-matic linux-info linux-mod user udev - -DESCRIPTION="VMware kernel modules" -HOMEPAGE="https://github.com/mkubecek/vmware-host-modules" - -MY_KERNEL_VERSION="5.18" -SRC_URI="https://github.com/mkubecek/vmware-host-modules/archive/w${PV}-k${MY_KERNEL_VERSION}.zip -> ${P}-${MY_KERNEL_VERSION}.zip" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -RDEPEND="" -DEPEND="" - -RESTRICT="mirror" - -S="${WORKDIR}/vmware-host-modules-w${PV}-k${MY_KERNEL_VERSION}" - -pkg_setup() { - CONFIG_CHECK="~HIGH_RES_TIMERS" - if kernel_is -ge 5 5; then - CONFIG_CHECK="${CONFIG_CHECK} X86_IOPL_IOPERM" - fi - if kernel_is -ge 2 6 37 && kernel_is -lt 2 6 39; then - CONFIG_CHECK="${CONFIG_CHECK} BKL" - fi - CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI VMWARE_VMCI_VSOCKETS" - - linux-info_pkg_setup - linux-mod_pkg_setup - - VMWARE_GROUP=${VMWARE_GROUP:-vmware} - - VMWARE_MODULE_LIST="vmmon vmnet" - - VMWARE_MOD_DIR="${PN}-${PVR}" - - BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}" - - enewgroup "${VMWARE_GROUP}" - - filter-flags -mfpmath=sse -mavx -mpclmul -maes - append-cflags -mno-sse # Found a problem similar to bug #492964 - - for mod in ${VMWARE_MODULE_LIST}; do - MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)" - done -} - -src_prepare() { - # decouple the kernel include dir from the running kernel version: https://github.com/stefantalpalaru/gentoo-overlay/issues/17 - sed -i \ - -e "s%HEADER_DIR = /lib/modules/\$(VM_UNAME)/build/include%HEADER_DIR = ${KERNEL_DIR}/include%" \ - -e "s%VM_UNAME = .*\$%VM_UNAME = ${KV_FULL}%" \ - */Makefile || die "sed failed" - - # Allow user patches so they can support RC kernels and whatever else - default -} - -src_install() { - linux-mod_src_install - local udevrules="${T}/60-vmware.rules" - cat > "${udevrules}" <<-EOF - KERNEL=="vmci", GROUP="vmware", MODE="660" - KERNEL=="vmw_vmci", GROUP="vmware", MODE="660" - KERNEL=="vmmon", GROUP="vmware", MODE="660" - KERNEL=="vsock", GROUP="vmware", MODE="660" - EOF - udev_dorules "${udevrules}" - - dodir /etc/modprobe.d/ - - cat > "${D}"/etc/modprobe.d/vmware.conf <<-EOF - # Support for vmware vmci in kernel module - alias vmci vmw_vmci - EOF - - export installed_modprobe_conf=1 - dodir /etc/modprobe.d/ - cat >> "${D}"/etc/modprobe.d/vmware.conf <<-EOF - # Support for vmware vsock in kernel module - alias vsock vmw_vsock_vmci_transport - EOF - - export installed_modprobe_conf=1 -} - -pkg_postinst() { - linux-mod_pkg_postinst - ewarn "Don't forget to run '/etc/init.d/vmware restart' to use the new kernel modules." -} diff --git a/app-emulation/vmware-modules/vmware-modules-16.2.4-r2.ebuild b/app-emulation/vmware-modules/vmware-modules-16.2.4-r2.ebuild new file mode 100644 index 0000000..d23a81f --- /dev/null +++ b/app-emulation/vmware-modules/vmware-modules-16.2.4-r2.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic linux-info linux-mod user udev + +DESCRIPTION="VMware kernel modules" +HOMEPAGE="https://github.com/mkubecek/vmware-host-modules" + +# Highest kernel version known to work: +MY_KERNEL_VERSION="6.0" + +# Upstream doesn't want to tag versions or anything that looks like properly +# releasing the software, so we need to just pick a commit from +# https://github.com/mkubecek/vmware-host-modules/commits/workstation-${PV} +# and test it ourselves. +# +# Details: https://github.com/mkubecek/vmware-host-modules/issues/158#issuecomment-1228341760 +MY_COMMIT="cafa1489600562d26c8393ede8e702154276e0be" + +SRC_URI=" https://github.com/mkubecek/vmware-host-modules/archive/${MY_COMMIT}.tar.gz -> ${P}-${MY_COMMIT}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="" +DEPEND="" + +RESTRICT="mirror" + +S="${WORKDIR}/vmware-host-modules-${MY_COMMIT}" + +pkg_setup() { + CONFIG_CHECK="~HIGH_RES_TIMERS" + if kernel_is -ge 5 5; then + CONFIG_CHECK="${CONFIG_CHECK} X86_IOPL_IOPERM" + fi + if kernel_is -ge 2 6 37 && kernel_is -lt 2 6 39; then + CONFIG_CHECK="${CONFIG_CHECK} BKL" + fi + CONFIG_CHECK="${CONFIG_CHECK} VMWARE_VMCI VMWARE_VMCI_VSOCKETS" + + linux-info_pkg_setup + linux-mod_pkg_setup + + if kernel_is gt ${MY_KERNEL_VERSION//./ }; then + ewarn + ewarn "Warning: this version of the modules is only known to work with kernels up to ${MY_KERNEL_VERSION}, while you are building them for a ${KV_FULL} kernel." + ewarn + fi + + VMWARE_GROUP=${VMWARE_GROUP:-vmware} + + VMWARE_MODULE_LIST="vmmon vmnet" + + VMWARE_MOD_DIR="${PN}-${PVR}" + + BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}" + + enewgroup "${VMWARE_GROUP}" + + filter-flags -mfpmath=sse -mavx -mpclmul -maes + append-cflags -mno-sse # Found a problem similar to bug #492964 + + for mod in ${VMWARE_MODULE_LIST}; do + MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)" + done +} + +src_prepare() { + # decouple the kernel include dir from the running kernel version: https://github.com/stefantalpalaru/gentoo-overlay/issues/17 + sed -i \ + -e "s%HEADER_DIR = /lib/modules/\$(VM_UNAME)/build/include%HEADER_DIR = ${KERNEL_DIR}/include%" \ + -e "s%VM_UNAME = .*\$%VM_UNAME = ${KV_FULL}%" \ + */Makefile || die "sed failed" + + # Allow user patches so they can support RC kernels and whatever else + default +} + +src_install() { + linux-mod_src_install + local udevrules="${T}/60-vmware.rules" + cat > "${udevrules}" <<-EOF + KERNEL=="vmci", GROUP="vmware", MODE="660" + KERNEL=="vmw_vmci", GROUP="vmware", MODE="660" + KERNEL=="vmmon", GROUP="vmware", MODE="660" + KERNEL=="vsock", GROUP="vmware", MODE="660" + EOF + udev_dorules "${udevrules}" + + dodir /etc/modprobe.d/ + + cat > "${D}"/etc/modprobe.d/vmware.conf <<-EOF + # Support for vmware vmci in kernel module + alias vmci vmw_vmci + EOF + + export installed_modprobe_conf=1 + dodir /etc/modprobe.d/ + cat >> "${D}"/etc/modprobe.d/vmware.conf <<-EOF + # Support for vmware vsock in kernel module + alias vsock vmw_vsock_vmci_transport + EOF + + export installed_modprobe_conf=1 +} + +pkg_postinst() { + linux-mod_pkg_postinst + udev_reload + ewarn "Don't forget to run '/etc/init.d/vmware restart' to use the new kernel modules." +} + +pkg_postrm() { + linux-mod_pkg_postrm + udev_reload +} diff --git a/app-emulation/vmware-workstation/Manifest b/app-emulation/vmware-workstation/Manifest index 7cba782..bb8667b 100644 --- a/app-emulation/vmware-workstation/Manifest +++ b/app-emulation/vmware-workstation/Manifest @@ -1,7 +1,7 @@ AUX vmware.rc 2476 BLAKE2B dff25b43c5fa57186be2a5f0ca4606d26cd1c3f3dbeb91d855fc07a9fd576f446983c852c8e0b112c5616bb95dfddc7e2c738b4d0ca341c781d7addcb45068cd SHA512 9bae224387128b2cd221d509e2933042e3925fb041670907d8a47c70a488214206912fe25ab24c0bdeb31591149e62aba374d3fa63fdd08644e09667e195967f -DIST VMware-Workstation-Full-16.2.3-19376536.x86_64.bundle 548382816 BLAKE2B 9060d40a4f338d3ba6d823b6569f8a3de967a8982409353c18e03d9b2e7bd3f60dbf4f223453cc03971357817dc204459649b845edaa9f10aad60dbffd45250e SHA512 dc14e7a438b39ee6796093de0ea94db8b17b09561c4ddd879fc193175d6488ca897fcfbd4a7b931eee430ea193a65dc260d223a6b963eff8df86ccdddfc5c7ee -DIST com.vmware.fusion-16.2.3.19376536.zip.tar 655841280 BLAKE2B 38ab99e88a653146002629b1a034a67808d68512b94a1d9098c28116084911f33e82994eaf295334fd69b6cc46d7569a42f74626c59f8127ab381ff5d1896b1d SHA512 d1155a5c098e1e3ed7e2c3b9d2abc4efd97569397191caa1bce55b764283a40b5574d7e84e98b6172f631b07aeff18642807f0c11e1a2f54c4e0267d9d3a4a68 +DIST VMware-Workstation-Full-16.2.4-20089737.x86_64.bundle 548383111 BLAKE2B 5c128d5dc17220d65f45ea304d374e49a730dd26e658685d3bc5b177858dd13f270272e2fef2bbe69e20e67d63b140e79515382779ed9e7ac6c68ff8ae62d89d SHA512 7680ade3c3915118fcd73fbbcc33ee2aeb44535453137218b92b2b2886e04b885aaed0af7fc877b566a357871fbdfac648d739998997c7a04d07a66f5cf2c415 +DIST com.vmware.fusion-16.2.4.20089737.zip.tar 656742400 BLAKE2B 60eaec6cc6dba426c7f2030b2d3caec02bfce98133b0040d4a33cf24194cf48b65b26146dda9e0ae7a0301b786659a4ddbb60fa2e458965795bf26074b4d474f SHA512 4d40c44d6801c327464106a406e7f5ce069caac675ccfc17376047b200139d92415b479fbb1d2976c9d8c6c2ad46bcc3e3e7ac1280630ac32ad819cc31d5a8ae DIST unlocker-3.0.4.tar.gz 10910 BLAKE2B db4ac74090cc70b138c0f1651c9edb34bf3bb5152408d2055ab6df5f2fc75bbeffe46d0839328d43ee53a8763e25144e3cc6068e3993132bc7e2aee15f1a2f35 SHA512 93802fc19353c0d21ade7a33122a6caa6924d69f8faba004c32b6a65fca390e159cf7e988807541ab2cc150c1325c18a3ee787364ef86f1ec0157d29a36b8105 DIST vmware-systemd-gentoo-02.tgz 14064 BLAKE2B 24ac2c2f295130f4aadad867ec88d652bd292cc60e6b471bb2e01069fe01d84dac3d8b0ca7690ebf218d663adfe0c1dc889d3f4f53cf3178b68291461260748b SHA512 3a382bfd5f1eb2b218d8012588ea55c1f22786dba35a1fc0fdfdb4e40b05e0e735ed09c6961684f6442e863c3ed72024ce01f19113bbd9ca47c32e3f43c55f42 -EBUILD vmware-workstation-16.2.3.19376536.ebuild 14873 BLAKE2B 9df1bfdc50505bb48987d1ea27cfe38f86990b3445fd7e9ebd4d83f319b8151e9f75413ebc650de575729c5170fa9c47c7ed3251d925a4949c2e8cb6d4c535c8 SHA512 51239d61d12351a217c4e4dd7bd0e16f5b693acb68c014f5b0f367bbc5fcaf0472f8e4e1bb9a2542a349165fdce9e8f2f637e3e407ceac56455fe4bcb4bb8e42 +EBUILD vmware-workstation-16.2.4.20089737.ebuild 14862 BLAKE2B 424517ac6e9047ea1817e972110af740e8f3e55f1e087729a65452ad9a50205e6bc5cb2e374d170ff5cc364eada62030a76a6e96e28af88a5efc13241037835d SHA512 d3e622873ada5ac3a658aeaa46279e1ddf1e81e6c09c46374da3682d39ad4d9681be2a4fd433fc68806fa774e3ab7bf5a3997efcae01bdc08d6b8633c2afd7a2 MISC metadata.xml 1852 BLAKE2B 3d3241e2fa53d92bd9ffdf6523ea0cb8dd798520656b1e4c8bc20723657704252c6c94d7231f2d047bcf2f5115ba7e3f9df90db718b4be8b103848dfd624a56f SHA512 0e9ff0f750609178cd5fb2ebb91411287ef49e60ce1577bf263f7d7b61555d69f34e23998a36edfc7887bcb7be066e798eb4b2a7773d790047107a7f07609e15 diff --git a/app-emulation/vmware-workstation/vmware-workstation-16.2.3.19376536.ebuild b/app-emulation/vmware-workstation/vmware-workstation-16.2.3.19376536.ebuild deleted file mode 100644 index e105b11..0000000 --- a/app-emulation/vmware-workstation/vmware-workstation-16.2.3.19376536.ebuild +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) -inherit eutils readme.gentoo-r1 pam python-any-r1 systemd xdg-utils - -MY_PN="VMware-Workstation-Full" -MY_PV=$(ver_cut 1-3) -PV_MODULES="${MY_PV}" -PV_BUILD=$(ver_cut 4) -MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}" -VMWARE_FUSION_VER="12.2.3/19436697" # https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/ -SYSTEMD_UNITS_TAG="gentoo-02" -UNLOCKER_VERSION="3.0.4" - -DESCRIPTION="Emulate a complete PC without the performance overhead of most emulators" -HOMEPAGE="http://www.vmware.com/products/workstation/" -SRC_URI=" - https://download3.vmware.com/software/WKST-${MY_PV//./}-LX-New/${MY_P}.x86_64.bundle - macos-guests? ( - https://github.com/paolo-projects/unlocker/archive/${UNLOCKER_VERSION}.tar.gz -> unlocker-${UNLOCKER_VERSION}.tar.gz - vmware-tools-darwinPre15? ( https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${VMWARE_FUSION_VER}/x86/core/com.vmware.fusion.zip.tar -> com.vmware.fusion-${PV}.zip.tar ) - vmware-tools-darwin? ( https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${VMWARE_FUSION_VER}/x86/core/com.vmware.fusion.zip.tar -> com.vmware.fusion-${PV}.zip.tar ) - ) - systemd? ( https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz ) - " - -LICENSE="GPL-2 GPL-3 MIT-with-advertising vmware" -SLOT="0" -KEYWORDS="~amd64" -# the kernel modules are optional because they're not needed to connect to VMs -# running on remote systems - https://bugs.gentoo.org/604426 -IUSE="cups doc macos-guests +modules ovftool systemd vix" -DARWIN_GUESTS="darwin darwinPre15" -IUSE_VMWARE_GUESTS="${DARWIN_GUESTS} linux linuxPreGlibc25 netware solaris windows winPre2k winPreVista" -for guest in ${IUSE_VMWARE_GUESTS}; do - IUSE+=" vmware-tools-${guest}" -done -REQUIRED_USE=" - vmware-tools-darwin? ( macos-guests ) - vmware-tools-darwinPre15? ( macos-guests ) -" -RESTRICT="mirror preserve-libs strip" - -RDEPEND=" - app-arch/bzip2 - app-arch/unzip - app-shells/bash - dev-db/sqlite:3 - dev-libs/dbus-glib - dev-libs/gmp:0 - dev-libs/icu - dev-libs/json-c - dev-libs/nettle:0 - gnome-base/dconf - gnome-base/gconf - media-gfx/graphite2 - media-libs/alsa-lib - media-libs/libart_lgpl - media-libs/libvorbis - media-libs/mesa - media-plugins/alsa-plugins[speex] - net-dns/libidn - net-libs/gnutls - cups? ( net-print/cups ) - sys-apps/tcp-wrappers - sys-apps/util-linux - sys-auth/polkit - virtual/libcrypt:* - x11-libs/libXinerama - x11-libs/libXxf86vm - x11-libs/libdrm - x11-libs/libxshmfence - x11-libs/startup-notification - x11-libs/xcb-util - x11-themes/hicolor-icon-theme - !app-emulation/vmware-player - !app-emulation/vmware-tools -" -DEPEND=" - ${PYTHON_DEPS} - >=dev-util/patchelf-0.9 - modules? ( ~app-emulation/vmware-modules-${PV_MODULES} ) -" -BDEPEND=" - app-admin/chrpath -" - -S=${WORKDIR}/extracted -VM_INSTALL_DIR="/opt/vmware" - -QA_PREBUILT="/opt/*" - -QA_WX_LOAD="opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 opt/vmware/lib/vmware/bin/vmware-vmx-stats opt/vmware/lib/vmware/bin/vmware-vmx-debug opt/vmware/lib/vmware/bin/vmware-vmx" -# adding "opt/vmware/lib/vmware/lib/libvmware-gksu.so/libvmware-gksu.so" to QA_WX_LOAD doesn't work - -src_unpack() { - if has usersandbox ${FEATURES}; then - ewarn "You are emerging ${P} with 'usersandbox' enabled." \ - "If unpacking fails, try emerging with 'FEATURES=-usersandbox'!" - fi - - for a in ${A}; do - if [ ${a##*.} == 'bundle' ]; then - cp "${DISTDIR}/${a}" "${WORKDIR}" - else - unpack ${a} - fi - done - - export LC_ALL=C # https://communities.vmware.com/thread/618570?start=15&tstart=0 - local bundle="${MY_P}.x86_64.bundle" - chmod 755 "${bundle}" - # this needs a /tmp mounted without "noexec" because it extracts and executes scripts in there - ./${bundle} --console --required --eulas-agreed --extract=extracted || die "unable to extract bundle" - - if ! use vix; then - rm -r extracted/vmware-vix-core extracted/vmware-vix-lib-Workstation* || die "unable to remove dir" - fi - - if use vmware-tools-darwinPre15 || use vmware-tools-darwin; then - unzip -q com.vmware.fusion.zip || die - for guest in ${DARWIN_GUESTS}; do - if use vmware-tools-${guest}; then - mkdir extracted/vmware-tools-${guest} - mv "payload/VMware Fusion.app/Contents/Library/isoimages/${guest}.iso" extracted/vmware-tools-${guest}/ || die - fi - done - rm -rf __MACOSX payload manifest.plist preflight postflight com.vmware.fusion.zip - fi -} - -src_prepare() { - default - - rm -f */bin/vmware-modconfig - rm -rf */lib/modules/binary - # Bug 459566 - mkdir vmware-network-editor/lib/lib - mv vmware-network-editor/lib/libvmware-netcfg.so vmware-network-editor/lib/lib/ - - if use ovftool; then - chrpath -d vmware-ovftool/libcurl.so.4 - fi - - if use macos-guests; then - sed -i -e "s#vmx_path = '/usr#vmx_path = '${ED}${VM_INSTALL_DIR//\//\\/}#" \ - -e "s#os\.path\.isfile('/usr#os.path.isfile('${ED}${VM_INSTALL_DIR//\//\\/}#" \ - -e "s#vmwarebase = '/usr#vmwarebase = '${ED}${VM_INSTALL_DIR//\//\\/}#" \ - "${WORKDIR}"/unlocker-*/unlocker.py - fi - - DOC_CONTENTS=" -/etc/env.d is updated during ${PN} installation. Please run:\n -'env-update && source /etc/profile'\n -Before you can use ${PN}, you must configure a default network setup. -You can do this by running 'emerge --config ${PN}'.\n -To be able to run ${PN} your user must be in the 'vmware' group." -} - -src_install() { - local major_minor=$(ver_cut 1-2 "${PV}") - local vmware_installer_version=$(cat "${S}/vmware-installer/manifest.xml" | grep -oPm1 "(?<=)[^<]+") - - # revdep-rebuild entry - insinto /etc/revdep-rebuild - echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN} - doins "${T}"/10${PN} - - # install the binaries - into "${VM_INSTALL_DIR}" - dobin */bin/* - dosbin */sbin/* - rm "${ED}${VM_INSTALL_DIR}"/bin/configure-initscript.sh || die - mv "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher.bin - cat > "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher <<-EOF - #!/usr/bin/env bash - export LD_LIBRARY_PATH="/opt/vmware/lib/vmware/lib/libssl.so.1.0.2:/opt/vmware/lib/vmware/lib/libcrypto.so.1.0.2" - "${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher.bin "\$@" - EOF - chmod 755 "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher - - # install the libraries - insinto "${VM_INSTALL_DIR}"/lib/vmware - doins -r */lib/* vmware-vmx/roms - rm "${ED}${VM_INSTALL_DIR}"/lib/vmware/*.so || die - - # install the installer - insinto "${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version} - doins -r vmware-installer/{cdsHelper,vmis,vmis-launcher,vmware-cds-helper,vmware-installer,vmware-installer.py,python} - chrpath -k -r '/../lib:$ORIGIN/../lib' "${ED}${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version}/python/lib/lib-dynload/*.so >/dev/null || die - fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version}/{vmis-launcher,cdsHelper,vmware-installer} - dosym "${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version}/vmware-installer "${VM_INSTALL_DIR}"/bin/vmware-installer - insinto /etc/vmware-installer - doins vmware-installer/bootstrap - sed -i \ - -e "s/@@VERSION@@/${vmware_installer_version}/" \ - -e "s,@@VMWARE_INSTALLER@@,${VM_INSTALL_DIR}/lib/vmware-installer/${vmware_installer_version}," \ - "${ED}/etc/vmware-installer/bootstrap" - - # install the ancillaries - insinto /usr - doins -r */share - - if use cups; then - exeinto $(cups-config --serverbin)/filter - doexe */extras/thnucups - - insinto /etc/cups - doins -r */etc/cups/* - fi - - # Hardcoded EULA path. We need to disable the default compression. - insinto /usr/share/doc/vmware-workstation - doins vmware-workstation/doc/EULA - docompress -x /usr/share/doc/vmware-workstation - # always needed - insinto /usr/lib/vmware-ovftool - doins vmware-ovftool/vmware.eula - - if use doc; then - dodoc -r */doc/* - fi - - exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup - doexe */vmware-config - - # pam - pamd_mimic_system vmware-authd auth account - - # fuse - insinto /etc/modprobe.d - newins vmware-vmx/etc/modprobe.d/modprobe-vmware-fuse.conf vmware-fuse.conf - - # install vmware-vix - if use vix; then - # install the binary - into "${VM_INSTALL_DIR}" - dobin "$S"/vmware-vix-*/bin/* - - # install the libraries - insinto "${VM_INSTALL_DIR}"/lib/vmware-vix - doins -r "$S"/vmware-vix-*/lib/* - - dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so - - # install headers - insinto /usr/include/vmware-vix - doins "$S"/vmware-vix-*/include/* - - if use doc; then - dodoc -r "$S"/vmware-vix-*/doc/* - fi - fi - - # install ovftool - if use ovftool; then - cd "${S}"/vmware-ovftool - - insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool - doins -r * - - chmod 0755 "${ED}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin} - sed -i 's/readlink/readlink -f/' "${ED}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool - dosym ../lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool - - cd - >/dev/null - fi - - # create symlinks for the various tools - local tool; - for tool in thnuclnt vmware vmplayer{,-daemon} licenseTool vmamqpd \ - vmware-{app-control,enter-serial,gksu,fuseUI,modconfig{,-console},netcfg,setup-helper,tray,unity-helper,vmblock-fuse,vprobe,zenity}; do - dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}" - done - dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer - dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware "${VM_INSTALL_DIR}"/bin/vmware - dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-fuseUI "${VM_INSTALL_DIR}"/bin/vmware-fuseUI - dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-netcfg "${VM_INSTALL_DIR}"/bin/vmware-netcfg - dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu - - # fix permissions - - # (we can't use "fperms" here, because globbing is done before the "${ED}" - # prefix is added to the path and this will obviously fail the first time - # the package is installed) - chmod 0755 "${ED}${VM_INSTALL_DIR}"/lib/vmware/bin/* - - fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/setup/vmware-config - fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats} - fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/libvmware-gksu.so/gksu-run-helper - fperms 4711 "${VM_INSTALL_DIR}"/sbin/vmware-authd - if use vix; then - fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config - fi - - # create the environment - local envd="${T}/90vmware" - cat > "${envd}" <<-EOF - PATH='${VM_INSTALL_DIR}/bin:${VM_INSTALL_DIR}/sbin' - ROOTPATH='${VM_INSTALL_DIR}/bin' - CONFIG_PROTECT_MASK='/etc/vmware-installer' - VMWARE_USE_SHIPPED_LIBS=1 - EOF - - doenvd "${envd}" - - # create the configuration - dodir /etc/vmware - - cat > "${ED}"/etc/vmware/bootstrap <<-EOF - BINDIR='${VM_INSTALL_DIR}/bin' - LIBDIR='${VM_INSTALL_DIR}/lib' - EOF - - cat > "${ED}"/etc/vmware/config <<-EOF - .encoding = "UTF-8" - bindir = "${VM_INSTALL_DIR}/bin" - libdir = "${VM_INSTALL_DIR}/lib/vmware" - initscriptdir = "/etc/init.d" - authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd" - gksu.rootMethod = "su" - VMCI_CONFED = "no" - VMBLOCK_CONFED = "no" - VSOCK_CONFED = "no" - NETWORKING = "yes" - player.product.version = "${MY_PV}" - product.buildNumber = "${PV_BUILD}" - product.version = "${MY_PV}" - product.name = "VMware Workstation" - workstation.product.version = "${MY_PV}" - vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware" - installerDefaults.componentDownloadEnabled = "no" - installerDefaults.autoSoftwareUpdateEnabled.epoch = "4641104763" - installerDefaults.dataCollectionEnabled.epoch = "7910652514" - installerDefaults.dataCollectionEnabled = "no" - installerDefaults.transferVersion = "1" - installerDefaults.autoSoftwareUpdateEnabled = "no" - acceptEULA = "yes" - acceptOVFEULA = "yes" - EOF - - if use vix; then - cat >> "${ED}"/etc/vmware/config <<-EOF - vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix" - vix.config.version = "1" - EOF - fi - - if use modules; then - # install the init.d script - local initscript="${T}/vmware.rc" - sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \ - "${FILESDIR}/vmware.rc" > "${initscript}" || die - newinitd "${initscript}" vmware - fi - - # fill in variable placeholders - sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \ - -i "${ED}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/gtk-3.0/gdk-pixbuf.loaders || die - sed -e "s:@@BINARY@@:${EPREFIX}${VM_INSTALL_DIR}/bin/vmplayer:g" \ - -e "/^Encoding/d" \ - -i "${ED}/usr/share/applications/vmware-player.desktop" || die - sed -e "s:@@BINARY@@:${EPREFIX}${VM_INSTALL_DIR}/bin/vmware:g" \ - -e "/^Encoding/d" \ - -i "${ED}/usr/share/applications/vmware-workstation.desktop" || die - sed -e "s:@@BINARY@@:${EPREFIX}${VM_INSTALL_DIR}/bin/vmware-netcfg:g" \ - -e "/^Encoding/d" \ - -i "${ED}/usr/share/applications/vmware-netcfg.desktop" || die - - # install systemd unit files - if use systemd; then - systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target} - fi - - # enable macOS guests support - if use macos-guests; then - python3 "${WORKDIR}"/unlocker-*/unlocker.py >/dev/null || die "unlocker.py failed" - fi - - # VMware tools - for guest in ${IUSE_VMWARE_GUESTS}; do - if use vmware-tools-${guest}; then - local dbfile="${ED}/etc/vmware-installer/database" - if ! [ -e "${dbfile}" ]; then - > "${dbfile}" - sqlite3 "${dbfile}" "CREATE TABLE settings(key VARCHAR PRIMARY KEY, value VARCHAR NOT NULL, component_name VARCHAR NOT NULL);" - sqlite3 "${dbfile}" "INSERT INTO settings(key,value,component_name) VALUES('db.schemaVersion','2','vmware-installer');" - sqlite3 "${dbfile}" "CREATE TABLE components(id INTEGER PRIMARY KEY, name VARCHAR NOT NULL, version VARCHAR NOT NULL, buildNumber INTEGER NOT NULL, component_core_id INTEGER NOT NULL, longName VARCHAR NOT NULL, description VARCHAR, type INTEGER NOT NULL);" - fi - local manifest="vmware-tools-${guest}/manifest.xml" - if [ -e "${manifest}" ]; then - local version="$(grep -oPm1 '(?<=)[^<]+' ${manifest})" - sqlite3 "${dbfile}" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES(\"vmware-tools-$guest\",\"$version\",\"${PV_BUILD}\",1,\"$guest\",\"$guest\",1);" - else - sqlite3 "${dbfile}" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES(\"vmware-tools-$guest\",\"${VMWARE_FUSION_VER%/*}\",\"${VMWARE_FUSION_VER#*/}\",1,\"$guest\",\"$guest\",1);" - fi - insinto "${VM_INSTALL_DIR}/lib/vmware/isoimages" - doins vmware-tools-${guest}/${guest}.iso - fi - done - - # metadata - mv "${ED}/usr/share/appdata" "${ED}/usr/share/metainfo" - - # readme - readme.gentoo_create_doc -} - -pkg_config() { - "${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new -} - -pkg_postinst() { - xdg_desktop_database_update - xdg_mimeinfo_database_update - xdg_icon_cache_update - elog "${DOC_CONTENTS}" -} - -pkg_postrm() { - xdg_desktop_database_update - xdg_mimeinfo_database_update - xdg_icon_cache_update -} diff --git a/app-emulation/vmware-workstation/vmware-workstation-16.2.4.20089737.ebuild b/app-emulation/vmware-workstation/vmware-workstation-16.2.4.20089737.ebuild new file mode 100644 index 0000000..aceddef --- /dev/null +++ b/app-emulation/vmware-workstation/vmware-workstation-16.2.4.20089737.ebuild @@ -0,0 +1,427 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..11} ) +inherit readme.gentoo-r1 pam python-any-r1 systemd xdg-utils + +MY_PN="VMware-Workstation-Full" +MY_PV=$(ver_cut 1-3) +PV_MODULES="${MY_PV}" +PV_BUILD=$(ver_cut 4) +MY_P="${MY_PN}-${MY_PV}-${PV_BUILD}" +VMWARE_FUSION_VER="12.2.4/20071091" # https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/ +SYSTEMD_UNITS_TAG="gentoo-02" +UNLOCKER_VERSION="3.0.4" + +DESCRIPTION="Emulate a complete PC without the performance overhead of most emulators" +HOMEPAGE="http://www.vmware.com/products/workstation/" +SRC_URI=" + https://download3.vmware.com/software/WKST-${MY_PV//./}-LX/${MY_P}.x86_64.bundle + macos-guests? ( + https://github.com/paolo-projects/unlocker/archive/${UNLOCKER_VERSION}.tar.gz -> unlocker-${UNLOCKER_VERSION}.tar.gz + vmware-tools-darwinPre15? ( https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${VMWARE_FUSION_VER}/x86/core/com.vmware.fusion.zip.tar -> com.vmware.fusion-${PV}.zip.tar ) + vmware-tools-darwin? ( https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${VMWARE_FUSION_VER}/x86/core/com.vmware.fusion.zip.tar -> com.vmware.fusion-${PV}.zip.tar ) + ) + systemd? ( https://github.com/akhuettel/systemd-vmware/archive/${SYSTEMD_UNITS_TAG}.tar.gz -> vmware-systemd-${SYSTEMD_UNITS_TAG}.tgz ) + " + +LICENSE="GPL-2 GPL-3 MIT-with-advertising vmware" +SLOT="0" +KEYWORDS="~amd64" +# the kernel modules are optional because they're not needed to connect to VMs +# running on remote systems - https://bugs.gentoo.org/604426 +IUSE="cups doc macos-guests +modules ovftool systemd vix" +DARWIN_GUESTS="darwin darwinPre15" +IUSE_VMWARE_GUESTS="${DARWIN_GUESTS} linux linuxPreGlibc25 netware solaris windows winPre2k winPreVista" +for guest in ${IUSE_VMWARE_GUESTS}; do + IUSE+=" vmware-tools-${guest}" +done +REQUIRED_USE=" + vmware-tools-darwin? ( macos-guests ) + vmware-tools-darwinPre15? ( macos-guests ) +" +RESTRICT="mirror preserve-libs strip" + +RDEPEND=" + app-arch/bzip2 + app-arch/unzip + app-shells/bash + dev-db/sqlite:3 + dev-libs/dbus-glib + dev-libs/gmp:0 + dev-libs/icu + dev-libs/json-c + dev-libs/nettle:0 + gnome-base/dconf + gnome-base/gconf + media-gfx/graphite2 + media-libs/alsa-lib + media-libs/libart_lgpl + media-libs/libvorbis + media-libs/mesa + media-plugins/alsa-plugins[speex] + net-dns/libidn + net-libs/gnutls + cups? ( net-print/cups ) + sys-apps/tcp-wrappers + sys-apps/util-linux + sys-auth/polkit + virtual/libcrypt:* + x11-libs/libXinerama + x11-libs/libXxf86vm + x11-libs/libdrm + x11-libs/libxshmfence + x11-libs/startup-notification + x11-libs/xcb-util + x11-themes/hicolor-icon-theme + !app-emulation/vmware-player + !app-emulation/vmware-tools +" +DEPEND=" + ${PYTHON_DEPS} + >=dev-util/patchelf-0.9 + modules? ( ~app-emulation/vmware-modules-${PV_MODULES} ) +" +BDEPEND=" + app-admin/chrpath +" + +S=${WORKDIR}/extracted +VM_INSTALL_DIR="/opt/vmware" + +QA_PREBUILT="/opt/*" + +QA_WX_LOAD="opt/vmware/lib/vmware/tools-upgraders/vmware-tools-upgrader-32 opt/vmware/lib/vmware/bin/vmware-vmx-stats opt/vmware/lib/vmware/bin/vmware-vmx-debug opt/vmware/lib/vmware/bin/vmware-vmx" +# adding "opt/vmware/lib/vmware/lib/libvmware-gksu.so/libvmware-gksu.so" to QA_WX_LOAD doesn't work + +src_unpack() { + if has usersandbox ${FEATURES}; then + ewarn "You are emerging ${P} with 'usersandbox' enabled." \ + "If unpacking fails, try emerging with 'FEATURES=-usersandbox'!" + fi + + for a in ${A}; do + if [ ${a##*.} == 'bundle' ]; then + cp "${DISTDIR}/${a}" "${WORKDIR}" + else + unpack ${a} + fi + done + + export LC_ALL=C # https://communities.vmware.com/thread/618570?start=15&tstart=0 + local bundle="${MY_P}.x86_64.bundle" + chmod 755 "${bundle}" + # this needs a /tmp mounted without "noexec" because it extracts and executes scripts in there + ./${bundle} --console --required --eulas-agreed --extract=extracted || die "unable to extract bundle" + + if ! use vix; then + rm -r extracted/vmware-vix-core extracted/vmware-vix-lib-Workstation* || die "unable to remove dir" + fi + + if use vmware-tools-darwinPre15 || use vmware-tools-darwin; then + unzip -q com.vmware.fusion.zip || die + for guest in ${DARWIN_GUESTS}; do + if use vmware-tools-${guest}; then + mkdir extracted/vmware-tools-${guest} + mv "payload/VMware Fusion.app/Contents/Library/isoimages/${guest}.iso" extracted/vmware-tools-${guest}/ || die + fi + done + rm -rf __MACOSX payload manifest.plist preflight postflight com.vmware.fusion.zip + fi +} + +src_prepare() { + default + + rm -f */bin/vmware-modconfig + rm -rf */lib/modules/binary + # Bug 459566 + mkdir vmware-network-editor/lib/lib + mv vmware-network-editor/lib/libvmware-netcfg.so vmware-network-editor/lib/lib/ + + if use ovftool; then + chrpath -d vmware-ovftool/libcurl.so.4 + fi + + if use macos-guests; then + sed -i -e "s#vmx_path = '/usr#vmx_path = '${ED}${VM_INSTALL_DIR//\//\\/}#" \ + -e "s#os\.path\.isfile('/usr#os.path.isfile('${ED}${VM_INSTALL_DIR//\//\\/}#" \ + -e "s#vmwarebase = '/usr#vmwarebase = '${ED}${VM_INSTALL_DIR//\//\\/}#" \ + "${WORKDIR}"/unlocker-*/unlocker.py + fi + + DOC_CONTENTS=" +/etc/env.d is updated during ${PN} installation. Please run:\n +'env-update && source /etc/profile'\n +Before you can use ${PN}, you must configure a default network setup. +You can do this by running 'emerge --config ${PN}'.\n +To be able to run ${PN} your user must be in the 'vmware' group." +} + +src_install() { + local major_minor=$(ver_cut 1-2 "${PV}") + local vmware_installer_version=$(cat "${S}/vmware-installer/manifest.xml" | grep -oPm1 "(?<=)[^<]+") + + # revdep-rebuild entry + insinto /etc/revdep-rebuild + echo "SEARCH_DIRS_MASK=\"${VM_INSTALL_DIR}\"" >> ${T}/10${PN} + doins "${T}"/10${PN} + + # install the binaries + into "${VM_INSTALL_DIR}" + dobin */bin/* + dosbin */sbin/* + rm "${ED}${VM_INSTALL_DIR}"/bin/configure-initscript.sh || die + mv "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher.bin + cat > "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher <<-EOF + #!/usr/bin/env bash + export LD_LIBRARY_PATH="/opt/vmware/lib/vmware/lib/libssl.so.1.0.2:/opt/vmware/lib/vmware/lib/libcrypto.so.1.0.2" + "${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher.bin "\$@" + EOF + chmod 755 "${ED}${VM_INSTALL_DIR}"/sbin/vmware-authdlauncher + + # install the libraries + insinto "${VM_INSTALL_DIR}"/lib/vmware + doins -r */lib/* vmware-vmx/roms + rm "${ED}${VM_INSTALL_DIR}"/lib/vmware/*.so || die + + # install the installer + insinto "${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version} + doins -r vmware-installer/{cdsHelper,vmis,vmis-launcher,vmware-cds-helper,vmware-installer,vmware-installer.py,python} + chrpath -k -r '/../lib:$ORIGIN/../lib' "${ED}${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version}/python/lib/lib-dynload/*.so >/dev/null || die + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version}/{vmis-launcher,cdsHelper,vmware-installer} + dosym "${VM_INSTALL_DIR}"/lib/vmware-installer/${vmware_installer_version}/vmware-installer "${VM_INSTALL_DIR}"/bin/vmware-installer + insinto /etc/vmware-installer + doins vmware-installer/bootstrap + sed -i \ + -e "s/@@VERSION@@/${vmware_installer_version}/" \ + -e "s,@@VMWARE_INSTALLER@@,${VM_INSTALL_DIR}/lib/vmware-installer/${vmware_installer_version}," \ + "${ED}/etc/vmware-installer/bootstrap" + + # install the ancillaries + insinto /usr + doins -r */share + + if use cups; then + exeinto $(cups-config --serverbin)/filter + doexe */extras/thnucups + + insinto /etc/cups + doins -r */etc/cups/* + fi + + # Hardcoded EULA path. We need to disable the default compression. + insinto /usr/share/doc/vmware-workstation + doins vmware-workstation/doc/EULA + docompress -x /usr/share/doc/vmware-workstation + # always needed + insinto /usr/lib/vmware-ovftool + doins vmware-ovftool/vmware.eula + + if use doc; then + dodoc -r */doc/* + fi + + exeinto "${VM_INSTALL_DIR}"/lib/vmware/setup + doexe */vmware-config + + # pam + pamd_mimic_system vmware-authd auth account + + # fuse + insinto /etc/modprobe.d + newins vmware-vmx/etc/modprobe.d/modprobe-vmware-fuse.conf vmware-fuse.conf + + # install vmware-vix + if use vix; then + # install the binary + into "${VM_INSTALL_DIR}" + dobin "$S"/vmware-vix-*/bin/* + + # install the libraries + insinto "${VM_INSTALL_DIR}"/lib/vmware-vix + doins -r "$S"/vmware-vix-*/lib/* + + dosym vmware-vix/libvixAllProducts.so "${VM_INSTALL_DIR}"/lib/libbvixAllProducts.so + + # install headers + insinto /usr/include/vmware-vix + doins "$S"/vmware-vix-*/include/* + + if use doc; then + dodoc -r "$S"/vmware-vix-*/doc/* + fi + fi + + # install ovftool + if use ovftool; then + cd "${S}"/vmware-ovftool + + insinto "${VM_INSTALL_DIR}"/lib/vmware-ovftool + doins -r * + + chmod 0755 "${ED}${VM_INSTALL_DIR}"/lib/vmware-ovftool/{ovftool,ovftool.bin} + sed -i 's/readlink/readlink -f/' "${ED}${VM_INSTALL_DIR}"/lib/vmware-ovftool/ovftool + dosym ../lib/vmware-ovftool/ovftool "${VM_INSTALL_DIR}"/bin/ovftool + + cd - >/dev/null + fi + + # create symlinks for the various tools + local tool; + for tool in thnuclnt vmware vmplayer{,-daemon} licenseTool vmamqpd \ + vmware-{app-control,enter-serial,gksu,fuseUI,modconfig{,-console},netcfg,setup-helper,tray,unity-helper,vmblock-fuse,vprobe,zenity}; do + dosym appLoader "${VM_INSTALL_DIR}"/lib/vmware/bin/"${tool}" + done + dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmplayer "${VM_INSTALL_DIR}"/bin/vmplayer + dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware "${VM_INSTALL_DIR}"/bin/vmware + dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-fuseUI "${VM_INSTALL_DIR}"/bin/vmware-fuseUI + dosym "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-netcfg "${VM_INSTALL_DIR}"/bin/vmware-netcfg + dosym "${VM_INSTALL_DIR}"/lib/vmware/icu /etc/vmware/icu + + # fix permissions + + # (we can't use "fperms" here, because globbing is done before the "${ED}" + # prefix is added to the path and this will obviously fail the first time + # the package is installed) + chmod 0755 "${ED}${VM_INSTALL_DIR}"/lib/vmware/bin/* + + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/setup/vmware-config + fperms 4711 "${VM_INSTALL_DIR}"/lib/vmware/bin/vmware-vmx{,-debug,-stats} + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware/lib/libvmware-gksu.so/gksu-run-helper + fperms 4711 "${VM_INSTALL_DIR}"/sbin/vmware-authd + if use vix; then + fperms 0755 "${VM_INSTALL_DIR}"/lib/vmware-vix/setup/vmware-config + fi + + # create the environment + local envd="${T}/90vmware" + cat > "${envd}" <<-EOF + PATH='${VM_INSTALL_DIR}/bin:${VM_INSTALL_DIR}/sbin' + ROOTPATH='${VM_INSTALL_DIR}/bin' + CONFIG_PROTECT_MASK='/etc/vmware-installer' + VMWARE_USE_SHIPPED_LIBS=1 + EOF + + doenvd "${envd}" + + # create the configuration + dodir /etc/vmware + + cat > "${ED}"/etc/vmware/bootstrap <<-EOF + BINDIR='${VM_INSTALL_DIR}/bin' + LIBDIR='${VM_INSTALL_DIR}/lib' + EOF + + cat > "${ED}"/etc/vmware/config <<-EOF + .encoding = "UTF-8" + bindir = "${VM_INSTALL_DIR}/bin" + libdir = "${VM_INSTALL_DIR}/lib/vmware" + initscriptdir = "/etc/init.d" + authd.fullpath = "${VM_INSTALL_DIR}/sbin/vmware-authd" + gksu.rootMethod = "su" + VMCI_CONFED = "no" + VMBLOCK_CONFED = "no" + VSOCK_CONFED = "no" + NETWORKING = "yes" + player.product.version = "${MY_PV}" + product.buildNumber = "${PV_BUILD}" + product.version = "${MY_PV}" + product.name = "VMware Workstation" + workstation.product.version = "${MY_PV}" + vmware.fullpath = "${VM_INSTALL_DIR}/bin/vmware" + installerDefaults.componentDownloadEnabled = "no" + installerDefaults.autoSoftwareUpdateEnabled.epoch = "4641104763" + installerDefaults.dataCollectionEnabled.epoch = "7910652514" + installerDefaults.dataCollectionEnabled = "no" + installerDefaults.transferVersion = "1" + installerDefaults.autoSoftwareUpdateEnabled = "no" + acceptEULA = "yes" + acceptOVFEULA = "yes" + EOF + + if use vix; then + cat >> "${ED}"/etc/vmware/config <<-EOF + vix.libdir = "${VM_INSTALL_DIR}/lib/vmware-vix" + vix.config.version = "1" + EOF + fi + + if use modules; then + # install the init.d script + local initscript="${T}/vmware.rc" + sed -e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \ + "${FILESDIR}/vmware.rc" > "${initscript}" || die + newinitd "${initscript}" vmware + fi + + # fill in variable placeholders + sed -e "s:@@LIBCONF_DIR@@:${VM_INSTALL_DIR}/lib/vmware/libconf:g" \ + -i "${ED}${VM_INSTALL_DIR}"/lib/vmware/libconf/etc/gtk-3.0/gdk-pixbuf.loaders || die + sed -e "s:@@BINARY@@:${EPREFIX}${VM_INSTALL_DIR}/bin/vmplayer:g" \ + -e "/^Encoding/d" \ + -i "${ED}/usr/share/applications/vmware-player.desktop" || die + sed -e "s:@@BINARY@@:${EPREFIX}${VM_INSTALL_DIR}/bin/vmware:g" \ + -e "/^Encoding/d" \ + -i "${ED}/usr/share/applications/vmware-workstation.desktop" || die + sed -e "s:@@BINARY@@:${EPREFIX}${VM_INSTALL_DIR}/bin/vmware-netcfg:g" \ + -e "/^Encoding/d" \ + -i "${ED}/usr/share/applications/vmware-netcfg.desktop" || die + + # install systemd unit files + if use systemd; then + systemd_dounit "${WORKDIR}/systemd-vmware-${SYSTEMD_UNITS_TAG}/"*.{service,target} + fi + + # enable macOS guests support + if use macos-guests; then + python3 "${WORKDIR}"/unlocker-*/unlocker.py >/dev/null || die "unlocker.py failed" + fi + + # VMware tools + for guest in ${IUSE_VMWARE_GUESTS}; do + if use vmware-tools-${guest}; then + local dbfile="${ED}/etc/vmware-installer/database" + if ! [ -e "${dbfile}" ]; then + > "${dbfile}" + sqlite3 "${dbfile}" "CREATE TABLE settings(key VARCHAR PRIMARY KEY, value VARCHAR NOT NULL, component_name VARCHAR NOT NULL);" + sqlite3 "${dbfile}" "INSERT INTO settings(key,value,component_name) VALUES('db.schemaVersion','2','vmware-installer');" + sqlite3 "${dbfile}" "CREATE TABLE components(id INTEGER PRIMARY KEY, name VARCHAR NOT NULL, version VARCHAR NOT NULL, buildNumber INTEGER NOT NULL, component_core_id INTEGER NOT NULL, longName VARCHAR NOT NULL, description VARCHAR, type INTEGER NOT NULL);" + fi + local manifest="vmware-tools-${guest}/manifest.xml" + if [ -e "${manifest}" ]; then + local version="$(grep -oPm1 '(?<=)[^<]+' ${manifest})" + sqlite3 "${dbfile}" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES(\"vmware-tools-$guest\",\"$version\",\"${PV_BUILD}\",1,\"$guest\",\"$guest\",1);" + else + sqlite3 "${dbfile}" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES(\"vmware-tools-$guest\",\"${VMWARE_FUSION_VER%/*}\",\"${VMWARE_FUSION_VER#*/}\",1,\"$guest\",\"$guest\",1);" + fi + insinto "${VM_INSTALL_DIR}/lib/vmware/isoimages" + doins vmware-tools-${guest}/${guest}.iso + fi + done + + # metadata + mv "${ED}/usr/share/appdata" "${ED}/usr/share/metainfo" + + # readme + readme.gentoo_create_doc +} + +pkg_config() { + "${VM_INSTALL_DIR}"/bin/vmware-networks --postinstall ${PN},old,new +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_mimeinfo_database_update + xdg_icon_cache_update + elog "${DOC_CONTENTS}" +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_mimeinfo_database_update + xdg_icon_cache_update +} -- cgit v1.2.3-65-gdbad