From 2d39a06105c717cc742ee37700441975ddd5f81e Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Mon, 28 Oct 2019 08:33:36 -0400 Subject: meta-openembedded: subtree update:64224b92e5..18506b797b MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alistair Francis (3): python3-pako: Initial commit of version 0.2.3 python3-msm: Initial commit of version 0.8.3 mycroft: Fixup remaining issues Andreas Müller (11): gtkmm3: upgrade 3.24.1 -> 3.24.2 geany: upgrade 1.34.1 -> 1.36 geany-plugins: upgrade 1.34 -> 1.36 libstemmer: initial add 2.0.0 appstream-glib: initial add 0.7.16 yelp-xsl: initial add 3.34.0 yelp-tools: initial add 3.32.2 yelp: initial add 3.34.0 glibmm: upgrade 2.60.0 -> 2.62.0 libsigc++-3: initial add 3.0.0 libgusb: initial add 0.3.0+ Ankit Navik (1): glfw: Initial recipe for glfw Armin Kuster (1): renderdoc: package need opengl Christophe PRIOUZEAU (91): spawn-fcgi: Clarify BSD license variant webmin: Clarify BSD license variant cyrus-sasl: Clarify BSD license variant libnet: Clarify BSD license variant openhpi: Clarify BSD license variant ptpd: Clarify BSD license variant pure-ftpd: Clarify BSD license variant corosync: Clarify BSD license variant netkit-ftp: Clarify BSD license variant netkit-rusers: Clarify BSD license variant netkit-rwho: Clarify BSD license variant netkit-telnet: Clarify BSD license variant freediameter: Clarify BSD license variant radiusclient: Clarify BSD license variant celt051: Clarify BSD license variant libmemcached: Clarify BSD license variant spice-protocol: Clarify BSD license variant tcpdump: Clarify BSD license variant libnet: Clarify BSD license variant iperf3: Clarify BSD license variant rfkill: Clarify BSD license variant postgresql: Clarify BSD license variant cscope: Clarify BSD license variant mcpp: Clarify BSD license variant yasm: Clarify BSD license variant cmpi binding: Clarify BSD license variant hwloc: Clarify BSD license variant liblogging: Clarify BSD license variant pmdk: Clarify BSD license variant openwsman: Clarify BSD license variant redis: Clarify BSD license variant scsirastools: Clarify BSD license variant libopus: Clarify BSD license variant opus-tools: Clarify BSD license variant wavpack: Clarify BSD license variant libvpx: Clarify BSD license variant passwdqc: Clarify BSD license variant testfloat: Clarify BSD license variant Python: flask-sqlalchemy: Clarify BSD license variant Python: meld3: Clarify BSD license variant Python: ply: Clarify BSD license variant Python: prompt toolkit: Clarify BSD license variant Python: pocket sphinx: Clarify BSD license variant Python: pysmi: Clarify BSD license variant Python: speaklater: Clarify BSD license variant Python: wrapt: Clarify BSD license variant Python: h5py: Clarify BSD license variant Python: xlrd: Clarify BSD license variant Python: alembic: Clarify BSD license variant Python: feed formatter: Clarify BSD license variant Python: decorator: Clarify BSD license variant Python: flask babel: Clarify BSD license variant Python: falsk mail: Clarify BSD license variant Python: isodate: Clarify BSD license variant Python: passlib: Clarify BSD license variant Python: pynetlinux: Clarify BSD license variant Python: webcolors: Clarify BSD license variant Python: werkzeug: Clarify BSD license variant Python: evdev: Clarify BSD license variant Python: netaddr: Clarify BSD license variant Python: pretend: Clarify BSD license variant Python: prettytable: Clarify BSD license variant Python: pysocks: Clarify BSD license variant Python: rdflib: Clarify BSD license variant Python: wtforms: Clarify BSD license variant Python: supervisor: Clarify BSD license variant Python: pysnmp: Clarify BSD license variant Python: flask pymongo: Clarify BSD license variant Python: flask xstatic: Clarify BSD license variant Python: lazy object proxy: Clarify BSD license variant Python: whoosh: Clarify BSD license variant Python: pyserial: Clarify BSD license variant Python: pika: Clarify BSD license variant Python: flask: Clarify BSD license variant Python: flask wtf: Clarify BSD license variant Python: click: Clarify BSD license variant Python: babel: Clarify BSD license variant Python: flask user: Clarify BSD license variant Python: jsonpointer: Clarify BSD license variant Python: xxhash: Clarify BSD license variant Python: markdown: Clarify BSD license variant Python: dnspython: Clarify BSD license variant Python: flask bcrypt: Clarify BSD license variant Python: jsonpatch: Clarify BSD license variant Python: ndg httpsclient: Clarify BSD license variant Python: flask scrypt: Clarify BSD license variant Python: oauthlib: Clarify BSD license variant Python: psutil: Clarify BSD license variant Python: pyhamcrest: Clarify BSD license variant Python: pyusb: Clarify BSD license variant Python: ujson: Clarify BSD license variant David Roman (1): nlohmann-json: upgrade 3.3.0 -> 3.7.0 Diego Rondini (1): ttf-roboto: add recipe Hongxu Jia (2): postfix: split /etc from ${PN} to ${PN}-cfg for ostree postfix.inc: make deterministic build Kai Kang (1): blueman: fix fail to enable bluetooth issue Khem Raj (8): open-vm-tools: Upgrade to 11.0.1 libftdi: Add target deps for python bindings mraa: Define PYTHON_LIBRARY and PYTHON_INCLUDE_DIR upm: Define PYTHON_INCLUDE_DIR and PYTHON_LIBRARY for cmake python3-astor: Upgrade to 0.8 python3-astor: Fix build with setuptools>=41.4 libiio: Inherit distutils3-base for packaging python files open-vm-tools: Fix build by removing deprecated G_INLINE_FUNC Michal Lower (1): update python setuptools-scm from 2.1.0 to 3.3.3 Paolo Valente (1): s-suite: push SRCREV to version 3.6 Richard Purdie (1): dconf: Fix build with meson 0.52 Tanu Kaskinen (1): pavucontrol: polish the recipe Trevor Gamblin (1): freeradius: fix PIDFile path in radiusd.service file Zang Ruochen (18): ltrace:Bug fix for data type length judgment python-ipaddress: upgrade 1.0.22 -> 1.0.23 python-cryptography: upgrade 2.7 -> 2.8 python-cryptography-vectors: upgrade 2.7 -> 2.8 python-automat: upgrade 0.7.0 -> 0.8.0 python-asn1crypto: upgrade 1.0.1 -> 1.2.0 python-attrs: upgrade 19.2.0 -> 19.3.0 python-cffi: upgrade 1.13.0 -> 1.13.1 python-cmd2: upgrade 0.9.18 -> 0.9.19 python-pip: upgrade 19.3 -> 19.3.1 python-pyro4: upgrade 4.73 -> 4.77 python-pytun: upgrade 2.2.1 -> 2.3.0 python-astroid: upgrade 1.6.5 -> 2.3.2 python-aws-iot-device-sdk-python: upgrade 1.4.0 -> 1.4.7 python-backports-ssl: upgrade 3.5.0.1 -> 3.7.0.1 python-bcrypt: upgrade 3.1.4 -> 3.1.7 snort: upgrade 2.9.14.1 -> 2.9.15 wolfssl: upgrade 4.1.0 -> 4.2.0 Zheng Ruoqin (9): byacc: upgrade 20180510 -> 20190617 drbd-utils: upgrade 9.10.0 -> 9.11.0 hwdata: upgrade 327 -> 328 multipath-tools: upgrade 0.8.2 -> 0.8.3 owfs: upgrade 3.2p2 -> 3.2p3 simple-mtpfs: upgrade to 0.3.0. fuse3: upgrade 3.6.2 -> 3.7.0 f2fs-tools: upgrade 1.11.0 -> 1.13.0 xorriso: upgrade 1.4.0 -> 1.5.0 nick83ola (2): python3-pyconnman: fix import issues with python3 python3-dbus-next: first commit of dbus-next 0.1.2 Change-Id: I6d500f726de3c5369b19c73e6ca7dc92aaf192d8 Signed-off-by: Brad Bishop --- .../meta-oe/recipes-support/hwdata/hwdata_git.bb | 4 +- .../meta-oe/recipes-support/libftdi/libftdi_1.4.bb | 12 +- .../meta-oe/recipes-support/libgusb/libgusb_git.bb | 12 + .../meta-oe/recipes-support/libiio/libiio_git.bb | 2 +- .../multipath-tools/multipath-tools_0.8.2.bb | 112 -- .../multipath-tools/multipath-tools_0.8.3.bb | 112 ++ ...e-367.-Remove-references-to-deprecated-G_.patch | 94 ++ .../0001-configure.ac-don-t-use-dnet-config.patch | 8 +- .../0009-Rename-poll.h-to-vm_poll.h.patch | 699 ++++++++++- ...3-misc-Do-not-print-NULL-string-into-logs.patch | 10 +- .../0014-Fix-new-warnings-from-gcc9.patch | 1281 -------------------- .../open-vm-tools/open-vm-tools_10.3.5.bb | 108 -- .../open-vm-tools/open-vm-tools_11.0.1.bb | 107 ++ 13 files changed, 1006 insertions(+), 1555 deletions(-) create mode 100644 meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_git.bb delete mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.2.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.3.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0014-Fix-new-warnings-from-gcc9.patch delete mode 100644 meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.3.5.bb create mode 100644 meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb (limited to 'meta-openembedded/meta-oe/recipes-support') diff --git a/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb b/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb index e66102064d..cd21950ff5 100644 --- a/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb +++ b/meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_git.bb @@ -5,8 +5,8 @@ SECTION = "System/Base" LICENSE = "GPL-2.0+" LIC_FILES_CHKSUM = "file://LICENSE;md5=1556547711e8246992b999edd9445a57" -PV = "0.327" -SRCREV = "874f7831c64de7ea2203cfcd1b3fc336bc27e468" +PV = "0.328" +SRCREV = "9f3125deb78a2e275b1285f935235d34ceda641d" SRC_URI = "git://github.com/vcrhonek/${BPN}.git" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.4.bb b/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.4.bb index 4fc6eb0907..c33c791110 100644 --- a/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.4.bb +++ b/meta-openembedded/meta-oe/recipes-support/libftdi/libftdi_1.4.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM= "\ file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ " -DEPENDS = "libusb1" +DEPENDS = "libusb1 python3" SRC_URI = "http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2" SRC_URI[md5sum] = "0c09fb2bb19a57c839fa6845c6c780a2" @@ -17,11 +17,17 @@ SRC_URI[sha256sum] = "ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681c S = "${WORKDIR}/${BPN}1-${PV}" -inherit cmake binconfig pkgconfig +inherit cmake binconfig pkgconfig python3native PACKAGECONFIG ??= "" PACKAGECONFIG[cpp-wrapper] = "-DFTDI_BUILD_CPP=on -DFTDIPP=on,-DFTDI_BUILD_CPP=off -DFTDIPP=off,boost" -EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" +EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ + -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ + -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}" BBCLASSEXTEND = "native nativesdk" + +PACKAGES += "${PN}-python" + +FILES_${PN}-python = "${libdir}/${PYTHON_DIR}/site-packages/" diff --git a/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_git.bb b/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_git.bb new file mode 100644 index 0000000000..e3c0bdd15e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/libgusb/libgusb_git.bb @@ -0,0 +1,12 @@ +SUMMARY = "GUsb is a GObject wrapper for libusb1" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = "glib-2.0 libusb" + +inherit meson gobject-introspection gtk-doc gettext vala + +SRC_URI = "git://github.com/hughsie/libgusb.git" +SRCREV = "636efc0624aa2a88174220fcabc9764c13d7febf" +PV = "0.3.0+git${SRCPV}" +S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb index 4e57d5b77b..e6e0eaef8b 100644 --- a/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb +++ b/meta-openembedded/meta-oe/recipes-support/libiio/libiio_git.bb @@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https" S = "${WORKDIR}/git" -inherit cmake python3native systemd +inherit cmake python3native systemd distutils3-base DEPENDS = " \ flex-native bison-native libaio \ diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.2.bb b/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.2.bb deleted file mode 100644 index 06e78c78cb..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.2.bb +++ /dev/null @@ -1,112 +0,0 @@ -SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" - -DESCRIPTION = "It provides tools to manage multipath devices \ -by instructing the device-mapper kernel module what to do. These \ -tools include: \ -1. multipath - Scan the system for multipath devices and assemble them.\ -2. multipathd - Detects when paths fail and execs multipath to update \ -things.\ -3. mpathpersist - Persistent reservation management feature allows \ -cluster management software to manage persistent reservation through \ -mpath device. It processes management requests from callers and hides \ -the management task details. It also handles persistent reservation \ -management of data path life cycle and state changes.\ -4. kpartx - This tool, derived from util-linux's partx, reads partition \ -tables on specified device and create device maps over partitions \ -segments detected. It is called from hotplug upon device maps creation \ -and deletion" - -HOMEPAGE = "http://christophe.varoqui.free.fr/" - -DEPENDS = "libdevmapper \ - lvm2 \ - libaio \ - liburcu \ - readline \ - udev \ - json-c \ - " - -LICENSE = "GPLv2" - -SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \ - file://multipathd.oe \ - file://multipath.conf.example \ - file://0021-RH-fixup-udev-rules-for-redhat.patch \ - file://0022-RH-Remove-the-property-blacklist-exception-builtin.patch \ - file://0023-RH-don-t-start-without-a-config-file.patch \ - file://0024-RH-use-rpm-optflags-if-present.patch \ - file://0025-RH-add-mpathconf.patch \ - file://0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \ - file://0027-RH-warn-on-invalid-regex-instead-of-failing.patch \ - file://0028-RH-reset-default-find_mutipaths-value-to-off.patch \ - file://0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch \ - file://0030-Always-use-devmapper.patch \ - file://0031-Always-use-devmapper-for-kpartx.patch \ - " - -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -SRCREV = "8a7e9b6648898f2c2d2bbd2d22871f79612e716e" - -S = "${WORKDIR}/git" - -inherit systemd pkgconfig - -SYSTEMD_SERVICE_${PN} = "multipathd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -TARGET_CC_ARCH += "${LDFLAGS}" - -# multipath-tools includes a copy of the valgrind.h header -# file and uses the macros to suppress some false positives. However, -# that only works on ARM when thumb is disabled. Otherwise one gets: -# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' -# ../Makefile.inc:66: recipe for target 'debug.o' failed -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -# The exact version of SYSTEMD does not matter but should be greater than 209. -# -EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ - OPTFLAGS="${CFLAGS}" \ - bindir=${base_sbindir} \ - LIB=${base_libdir} libdir=${base_libdir}/multipath \ - unitdir=${systemd_system_unitdir} \ - ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ - ' - -do_install() { - oe_runmake install - - # We copy an initscript, but do not start multipathd at init time. - # - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then - install -d ${D}${sysconfdir}/init.d - cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd - fi - - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/multipath.conf.example \ - ${D}${sysconfdir}/multipath.conf.example -} - -FILES_${PN}-dbg += "${base_libdir}/multipath/.debug" - -PACKAGES =+ "${PN}-libs" -FILES_${PN}-libs = "${base_libdir}/lib*.so.* \ - ${base_libdir}/multipath/lib*.so*" -RDEPENDS_${PN} += "${PN}-libs bash" - -PROVIDES += "device-mapper-multipath" -RPROVIDES_${PN} += "device-mapper-multipath" -RPROVIDES_${PN}-libs += "device-mapper-multipath-libs" - -FILES_${PN}-dev += "${base_libdir}/pkgconfig" - -PACKAGES =+ "kpartx" -FILES_kpartx = "${base_sbindir}/kpartx \ - ${nonarch_libdir}/udev/kpartx_id \ - " - -RDEPENDS_${PN} += "kpartx" diff --git a/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.3.bb b/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.3.bb new file mode 100644 index 0000000000..358f0cb60b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.3.bb @@ -0,0 +1,112 @@ +SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" + +DESCRIPTION = "It provides tools to manage multipath devices \ +by instructing the device-mapper kernel module what to do. These \ +tools include: \ +1. multipath - Scan the system for multipath devices and assemble them.\ +2. multipathd - Detects when paths fail and execs multipath to update \ +things.\ +3. mpathpersist - Persistent reservation management feature allows \ +cluster management software to manage persistent reservation through \ +mpath device. It processes management requests from callers and hides \ +the management task details. It also handles persistent reservation \ +management of data path life cycle and state changes.\ +4. kpartx - This tool, derived from util-linux's partx, reads partition \ +tables on specified device and create device maps over partitions \ +segments detected. It is called from hotplug upon device maps creation \ +and deletion" + +HOMEPAGE = "http://christophe.varoqui.free.fr/" + +DEPENDS = "libdevmapper \ + lvm2 \ + libaio \ + liburcu \ + readline \ + udev \ + json-c \ + " + +LICENSE = "GPLv2" + +SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \ + file://multipathd.oe \ + file://multipath.conf.example \ + file://0021-RH-fixup-udev-rules-for-redhat.patch \ + file://0022-RH-Remove-the-property-blacklist-exception-builtin.patch \ + file://0023-RH-don-t-start-without-a-config-file.patch \ + file://0024-RH-use-rpm-optflags-if-present.patch \ + file://0025-RH-add-mpathconf.patch \ + file://0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \ + file://0027-RH-warn-on-invalid-regex-instead-of-failing.patch \ + file://0028-RH-reset-default-find_mutipaths-value-to-off.patch \ + file://0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch \ + file://0030-Always-use-devmapper.patch \ + file://0031-Always-use-devmapper-for-kpartx.patch \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +SRCREV = "6c3bd369b23e959700527e0e2e6d5b2a1bd36294" + +S = "${WORKDIR}/git" + +inherit systemd pkgconfig + +SYSTEMD_SERVICE_${PN} = "multipathd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +TARGET_CC_ARCH += "${LDFLAGS}" + +# multipath-tools includes a copy of the valgrind.h header +# file and uses the macros to suppress some false positives. However, +# that only works on ARM when thumb is disabled. Otherwise one gets: +# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' +# ../Makefile.inc:66: recipe for target 'debug.o' failed +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +# The exact version of SYSTEMD does not matter but should be greater than 209. +# +EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ + OPTFLAGS="${CFLAGS}" \ + bindir=${base_sbindir} \ + LIB=${base_libdir} libdir=${base_libdir}/multipath \ + unitdir=${systemd_system_unitdir} \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ + ' + +do_install() { + oe_runmake install + + # We copy an initscript, but do not start multipathd at init time. + # + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then + install -d ${D}${sysconfdir}/init.d + cp ${WORKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd + fi + + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/multipath.conf.example \ + ${D}${sysconfdir}/multipath.conf.example +} + +FILES_${PN}-dbg += "${base_libdir}/multipath/.debug" + +PACKAGES =+ "${PN}-libs" +FILES_${PN}-libs = "${base_libdir}/lib*.so.* \ + ${base_libdir}/multipath/lib*.so*" +RDEPENDS_${PN} += "${PN}-libs bash" + +PROVIDES += "device-mapper-multipath" +RPROVIDES_${PN} += "device-mapper-multipath" +RPROVIDES_${PN}-libs += "device-mapper-multipath-libs" + +FILES_${PN}-dev += "${base_libdir}/pkgconfig" + +PACKAGES =+ "kpartx" +FILES_kpartx = "${base_sbindir}/kpartx \ + ${nonarch_libdir}/udev/kpartx_id \ + " + +RDEPENDS_${PN} += "kpartx" diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch new file mode 100644 index 0000000000..6cb5dfcccb --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch @@ -0,0 +1,94 @@ +From 6fb28085e867d7c3ef46577d9ff193a185693bcb Mon Sep 17 00:00:00 2001 +From: Oliver Kurth +Date: Mon, 30 Sep 2019 16:24:27 -0700 +Subject: [PATCH] GitHub Issue #367. Remove references to deprecated G_INLINE_FUNC. + +G_INLINE_FUNC was a work-around for compilers that didn't support +static inline. Change uses of it to static inline. + +Upstream-Status: Backport +[https://github.com/vmware/open-vm-tools/commit/89c0d444567eb525e8d083fb564c46d68e96660c] + +Signed-off-by: Khem Raj +--- + open-vm-tools/lib/include/vmware/tools/plugin.h | 2 +- + open-vm-tools/lib/include/vmware/tools/threadPool.h | 8 ++++---- + open-vm-tools/lib/include/vmware/tools/utils.h | 9 --------- + 3 files changed, 5 insertions(+), 14 deletions(-) + +diff --git a/open-vm-tools/lib/include/vmware/tools/plugin.h b/open-vm-tools/lib/include/vmware/tools/plugin.h +index f9acc6a2..deefd1f3 100644 +--- a/open-vm-tools/lib/include/vmware/tools/plugin.h ++++ b/open-vm-tools/lib/include/vmware/tools/plugin.h +@@ -290,7 +290,7 @@ typedef struct ToolsAppCtx { + * + * @return TRUE if COM is initialized when the function returns. + */ +-G_INLINE_FUNC gboolean ++static inline gboolean + ToolsCore_InitializeCOM(ToolsAppCtx *ctx) + { + if (!ctx->comInitialized) { +diff --git a/open-vm-tools/lib/include/vmware/tools/threadPool.h b/open-vm-tools/lib/include/vmware/tools/threadPool.h +index 3f2082b3..5880fbcf 100644 +--- a/open-vm-tools/lib/include/vmware/tools/threadPool.h ++++ b/open-vm-tools/lib/include/vmware/tools/threadPool.h +@@ -91,7 +91,7 @@ typedef struct ToolsCorePool { + ******************************************************************************* + */ + +-G_INLINE_FUNC ToolsCorePool * ++static inline ToolsCorePool * + ToolsCorePool_GetPool(ToolsAppCtx *ctx) + { + ToolsCorePool *pool = NULL; +@@ -123,7 +123,7 @@ ToolsCorePool_GetPool(ToolsAppCtx *ctx) + ******************************************************************************* + */ + +-G_INLINE_FUNC guint ++static inline guint + ToolsCorePool_SubmitTask(ToolsAppCtx *ctx, + ToolsCorePoolCb cb, + gpointer data, +@@ -153,7 +153,7 @@ ToolsCorePool_SubmitTask(ToolsAppCtx *ctx, + ******************************************************************************* + */ + +-G_INLINE_FUNC void ++static inline void + ToolsCorePool_CancelTask(ToolsAppCtx *ctx, + guint taskId) + { +@@ -197,7 +197,7 @@ ToolsCorePool_CancelTask(ToolsAppCtx *ctx, + ******************************************************************************* + */ + +-G_INLINE_FUNC gboolean ++static inline gboolean + ToolsCorePool_StartThread(ToolsAppCtx *ctx, + const gchar *threadName, + ToolsCorePoolCb cb, +diff --git a/open-vm-tools/lib/include/vmware/tools/utils.h b/open-vm-tools/lib/include/vmware/tools/utils.h +index f6574590..a3292d5c 100644 +--- a/open-vm-tools/lib/include/vmware/tools/utils.h ++++ b/open-vm-tools/lib/include/vmware/tools/utils.h +@@ -51,15 +51,6 @@ + # include + #endif + +- +-/* Work around a glib limitation: it doesn't set G_INLINE_FUNC on Win32. */ +-#if defined(G_PLATFORM_WIN32) +-# if defined(G_INLINE_FUNC) +-# undef G_INLINE_FUNC +-# endif +-# define G_INLINE_FUNC static __inline +-#endif +- + #ifndef ABS + # define ABS(x) (((x) >= 0) ? (x) : -(x)) + #endif +-- +2.23.0 + diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch index 0736572b3e..a711f5e5d2 100644 --- a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch +++ b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch @@ -14,11 +14,9 @@ Signed-off-by: Martin Kelly open-vm-tools/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac -index 325a39f5..713ea683 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac -@@ -949,7 +949,7 @@ if test "$with_dnet" = "yes"; then +@@ -937,7 +937,7 @@ if test "$with_dnet" = "yes"; then AC_VMW_CHECK_LIB([dnet], [DNET], [], @@ -27,11 +25,11 @@ index 325a39f5..713ea683 100644 [], [dnet.h], [intf_open], -@@ -959,7 +959,7 @@ if test "$with_dnet" = "yes"; then +@@ -947,7 +947,7 @@ if test "$with_dnet" = "yes"; then if test $have_dnet = "no"; then AC_MSG_ERROR( -- [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net]) +- [dnet-config was not found on your PATH. Please configure without dnet or install dnet - http://libdnet.sourceforge.net]) + [dnet was not found. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net]) fi fi diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch index 5c1aa7c40f..9cf54f6f44 100644 --- a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch +++ b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch @@ -19,8 +19,6 @@ Signed-off-by: Khem Raj 7 files changed, 7 insertions(+), 7 deletions(-) rename open-vm-tools/lib/include/{poll.h => vm_poll.h} (99%) -diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c -index b41aa29d..8691309d 100644 --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c @@ -86,7 +86,7 @@ @@ -32,8 +30,6 @@ index b41aa29d..8691309d 100644 #include "log.h" #include "err.h" #include "hostinfo.h" -diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c -index 7ea3b7f4..740c4fed 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c @@ -48,7 +48,7 @@ @@ -45,8 +41,6 @@ index 7ea3b7f4..740c4fed 100644 #include "mutexRankLib.h" #include "vm_basic_asm.h" #include "unicodeOperations.h" -diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h -index ec9b45aa..dc91e738 100644 --- a/open-vm-tools/lib/include/asyncsocket.h +++ b/open-vm-tools/lib/include/asyncsocket.h @@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket; @@ -58,8 +52,6 @@ index ec9b45aa..dc91e738 100644 struct IVmdbPoll; typedef struct AsyncSocketPollParams { int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */ -diff --git a/open-vm-tools/lib/include/pollImpl.h b/open-vm-tools/lib/include/pollImpl.h -index 46442e55..8bc66997 100644 --- a/open-vm-tools/lib/include/pollImpl.h +++ b/open-vm-tools/lib/include/pollImpl.h @@ -44,7 +44,7 @@ @@ -71,24 +63,672 @@ index 46442e55..8bc66997 100644 #include "vm_basic_asm.h" #if defined(__cplusplus) -diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/vm_poll.h -similarity index 99% -rename from open-vm-tools/lib/include/poll.h -rename to open-vm-tools/lib/include/vm_poll.h -index 6acd4f35..fbc88494 100644 --- a/open-vm-tools/lib/include/poll.h -+++ b/open-vm-tools/lib/include/vm_poll.h -@@ -60,7 +60,7 @@ extern "C" { - #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 - #include - #endif ++++ /dev/null +@@ -1,330 +0,0 @@ +-/********************************************************* +- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU Lesser General Public License as published +- * by the Free Software Foundation version 2.1 and no later version. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +- * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public +- * License for more details. +- * +- * You should have received a copy of the GNU Lesser General Public License +- * along with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- *********************************************************/ +- +-/********************************************************* +- * The contents of this file are subject to the terms of the Common +- * Development and Distribution License (the "License") version 1.0 +- * and no later version. You may not use this file except in +- * compliance with the License. +- * +- * You can obtain a copy of the License at +- * http://www.opensource.org/licenses/cddl1.php +- * +- * See the License for the specific language governing permissions +- * and limitations under the License. +- * +- *********************************************************/ +- +- +-#ifndef _POLL_H_ +-#define _POLL_H_ +- +-#define INCLUDE_ALLOW_USERLEVEL +-#define INCLUDE_ALLOW_VMCORE +-#include "includeCheck.h" +- +-#include "vm_basic_types.h" +-#include "vm_basic_defs.h" +-#include "vmware.h" +-#include "userlock.h" +- +-#if defined(__cplusplus) +-extern "C" { +-#endif +- +-#ifdef _WIN32 +-#define HZ 100 +-#elif defined linux +-#include +-#elif __APPLE__ +-#include +-/* +- * Old SDKs don't define TARGET_OS_IPHONE at all. +- * New ones define it to 0 on Mac OS X, 1 on iOS. +- */ +-#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 +-#include +-#endif -#include +-#define HZ 100 +-#endif +-#ifdef __ANDROID__ +-/* +- * of android should be included, but its name is same +- * with this file. So its content is put here to avoid conflict. +- */ +-#include +-#define HZ 100 +-typedef unsigned int nfds_t; +-int poll(struct pollfd *, nfds_t, long); +-#endif +- +- +-/* +- * Poll event types: each type has a different reason for firing, +- * or condition that must be met before firing. +- */ +- +-typedef enum { +- /* +- * Actual Poll queue types against which you can register callbacks. +- */ +- POLL_VIRTUALREALTIME = -1, /* Negative because it doesn't have its own Q */ +- POLL_VTIME = 0, +- POLL_REALTIME, +- POLL_DEVICE, +- POLL_MAIN_LOOP, +- POLL_NUM_QUEUES +-} PollEventType; +- +- +-/* +- * Classes of events +- * +- * These are the predefined classes. More can be declared +- * with Poll_AllocClass(). +- */ +- +-typedef enum PollClass { +- POLL_CLASS_MAIN, +- POLL_CLASS_PAUSE, +- POLL_CLASS_IPC, +- POLL_CLASS_CPT, +- POLL_CLASS_MKS, +- POLL_FIXED_CLASSES, +- POLL_DEFAULT_FIXED_CLASSES, +- /* Size enum to maximum */ +- POLL_MAX_CLASSES = 31, +-} PollClass; +- +-/* +- * Do not use; Special pseudo private poll class supported by +- * PollDefault only +- */ +-#define POLL_DEFAULT_CLASS_NET POLL_FIXED_CLASSES +-#define POLL_DEFAULT_CS_NET PollClassSet_Singleton(POLL_DEFAULT_CLASS_NET) +- +-/* +- * Each callback is registered in a set of classes +- */ +- +-typedef struct PollClassSet { +- uintptr_t bits; +-} PollClassSet; +- +-/* An empty PollClassSet. */ +-static INLINE PollClassSet +-PollClassSet_Empty(void) +-{ +- PollClassSet set = { 0 }; +- return set; +-} +- +-/* A PollClassSet with the single member. */ +-static INLINE PollClassSet +-PollClassSet_Singleton(PollClass c) +-{ +- PollClassSet s = PollClassSet_Empty(); +- +- ASSERT_ON_COMPILE(POLL_MAX_CLASSES < sizeof s.bits * 8); +- ASSERT(c < POLL_MAX_CLASSES); +- +- s.bits = CONST3264U(1) << c; +- return s; +-} +- +-/* Combine two PollClassSets. */ +-static INLINE PollClassSet +-PollClassSet_Union(PollClassSet lhs, PollClassSet rhs) +-{ +- PollClassSet set; +- set.bits = lhs.bits | rhs.bits; +- return set; +-} +- +-/* Add single class to PollClassSet. */ +-static INLINE PollClassSet +-PollClassSet_Include(PollClassSet set, PollClass c) +-{ +- return PollClassSet_Union(set, PollClassSet_Singleton(c)); +-} +- +- +-#define POLL_CS_MAIN PollClassSet_Singleton(POLL_CLASS_MAIN) +-#define POLL_CS_PAUSE PollClassSet_Union(POLL_CS_MAIN, \ +- PollClassSet_Singleton(POLL_CLASS_PAUSE)) +-#define POLL_CS_CPT PollClassSet_Union(POLL_CS_PAUSE, \ +- PollClassSet_Singleton(POLL_CLASS_CPT)) +-#define POLL_CS_IPC PollClassSet_Union(POLL_CS_CPT, \ +- PollClassSet_Singleton(POLL_CLASS_IPC)) +-#define POLL_CS_VMDB POLL_CS_PAUSE /* POLL_CLASS_VMDB is retired */ +-#define POLL_CS_MKS PollClassSet_Singleton(POLL_CLASS_MKS) +-/* +- * DANGER. You don't need POLL_CS_ALWAYS. Really. So don't use it. +- */ +-#define POLL_CS_ALWAYS PollClassSet_Union(POLL_CS_CPT, POLL_CS_IPC) +- +-/* +- * Poll class-set taxonomy: +- * POLL_CS_MAIN +- * - Unless you NEED another class, use POLL_CS_MAIN. +- * POLL_CS_PAUSE +- * - For callbacks that must occur even if the guest is paused. +- * Most VMDB or Foundry commands are in this category. +- * POLL_CS_CPT +- * - Only for callbacks which can trigger intermediate Checkpoint +- * transitions. +- * The ONLY such callback is Migrate. +- * POLL_CS_IPC +- * - Only for callbacks which can contain Msg_(Post|Hint|Question) +- * responses, and for signal handlers (why)? +- * Vigor, VMDB, and Foundry can contain Msg_* responses. +- * POLL_CS_MKS +- * - Callback runs in MKS thread. +- * POLL_CS_ALWAYS +- * - Only for events that must be processed immediately. +- * The ONLY such callback is OvhdMemVmxSizeCheck. +- */ +- +- +-/* +- * Poll_Callback flags +- */ +- +-#define POLL_FLAG_PERIODIC 0x01 // keep after firing +-#define POLL_FLAG_REMOVE_AT_POWEROFF 0x02 // self-explanatory +-#define POLL_FLAG_READ 0x04 // device is ready for reading +-#define POLL_FLAG_WRITE 0x08 // device is ready for writing +-#define POLL_FLAG_SOCKET 0x10 // device is a Windows socket +-#define POLL_FLAG_NO_BULL 0x20 // callback does its own locking +-#define POLL_FLAG_WINSOCK 0x40 // Winsock style write events +-#define POLL_FLAG_FD 0x80 // device is a Windows file descriptor. +-#define POLL_FLAG_ACCEPT_INVALID_FDS 0x100 // For broken 3rd party libs, e.g. curl +-#define POLL_FLAG_THUNK_TO_WND 0x200 // thunk callback to window message loop +- +- +-typedef void (*PollerFunction)(void *clientData); +-typedef void (*PollerFireWrapper)(PollerFunction func, +- void *funcData, +- void *wrapperData); +-typedef Bool (*PollerErrorFn)(const char *errorStr); +- +-/* +- * Initialisers: +- * +- * For the sake of convenience, we declare the initialisers +- * for custom implmentations here, even though the actual +- * implementations are distinct from the core poll code. +- */ +- +-typedef struct PollOptions { +- Bool locked; // Use internal MXUser for locking +- Bool allowFullQueue; // Don't assert when device event queue is full. +- VThreadID windowsMsgThread; // thread that processes Windows messages +- PollerFireWrapper fireWrapperFn; // optional; may be useful for stats +- void *fireWrapperData; // optional +- PollerErrorFn errorFn; // optional; called upon unrecoverable error +-} PollOptions; +- +- +-void Poll_InitDefault(void); +-void Poll_InitDefaultEx(const PollOptions *opts); +-void Poll_InitGtk(void); // On top of glib for Linux +-void Poll_InitCF(void); // On top of CoreFoundation for OSX +- +- +-/* +- * Functions +- */ +-int Poll_SocketPair(Bool vmci, Bool stream, int fds[2]); +-void Poll_Loop(Bool loop, Bool *exit, PollClass c); +-void Poll_LoopTimeout(Bool loop, Bool *exit, PollClass c, int timeout); +-Bool Poll_LockingEnabled(void); +-void Poll_Exit(void); +- +- +-/* +- * Poll_Callback adds a callback regardless of whether an identical one exists. +- * The exception to this rule is POLL_DEVICE callbacks: there is a maximum of +- * one read and one write callback per fd. +- * +- * Poll_CallbackRemove removes one callback. If there are multiple identical +- * callbacks, which one is removed is an implementation detail. Note that in +- * the case of POLL_DEVICE and POLL_REALTIME callbacks, the fd/delay used to +- * create the callback is not specified when removing, so all callbacks +- * of those types with the same flags, function, and clientData are considered +- * "identical" even if their fd/delay differed. +- */ +- +-VMwareStatus Poll_Callback(PollClassSet classSet, +- int flags, +- PollerFunction f, +- void *clientData, +- PollEventType type, +- PollDevHandle info, // fd/microsec delay +- MXUserRecLock *lck); +-Bool Poll_CallbackRemove(PollClassSet classSet, +- int flags, +- PollerFunction f, +- void *clientData, +- PollEventType type); +-Bool Poll_CallbackRemoveOneByCB(PollClassSet classSet, +- int flags, +- PollerFunction f, +- PollEventType type, +- void **clientData); +- +-void Poll_NotifyChange(PollClassSet classSet); +- +-/* +- * Wrappers for Poll_Callback and Poll_CallbackRemove that present +- * simpler subsets of those interfaces. +- */ +- +-VMwareStatus Poll_CB_Device(PollerFunction f, +- void *clientData, +- PollDevHandle device, +- Bool periodic); +- +-Bool Poll_CB_DeviceRemove(PollerFunction f, +- void *clientData, +- Bool periodic); +- +- +-VMwareStatus Poll_CB_RTime(PollerFunction f, +- void *clientData, +- int64 delay, // microseconds +- Bool periodic, +- MXUserRecLock *lock); +- +-Bool Poll_CB_RTimeRemove(PollerFunction f, +- void *clientData, +- Bool periodic); +- +- +-#ifdef _WIN32 +-void Poll_SetPumpsWindowsMessages(Bool pumps); +-void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk); +-Bool Poll_FireWndCallback(void *lparam); +-#endif +- +-#if defined(__cplusplus) +-} // extern "C" +-#endif +- +-#endif // _POLL_H_ +--- /dev/null ++++ b/open-vm-tools/lib/include/vm_poll.h +@@ -0,0 +1,330 @@ ++/********************************************************* ++ * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU Lesser General Public License as published ++ * by the Free Software Foundation version 2.1 and no later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public ++ * License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ *********************************************************/ ++ ++/********************************************************* ++ * The contents of this file are subject to the terms of the Common ++ * Development and Distribution License (the "License") version 1.0 ++ * and no later version. You may not use this file except in ++ * compliance with the License. ++ * ++ * You can obtain a copy of the License at ++ * http://www.opensource.org/licenses/cddl1.php ++ * ++ * See the License for the specific language governing permissions ++ * and limitations under the License. ++ * ++ *********************************************************/ ++ ++ ++#ifndef _POLL_H_ ++#define _POLL_H_ ++ ++#define INCLUDE_ALLOW_USERLEVEL ++#define INCLUDE_ALLOW_VMCORE ++#include "includeCheck.h" ++ ++#include "vm_basic_types.h" ++#include "vm_basic_defs.h" ++#include "vmware.h" ++#include "userlock.h" ++ ++#if defined(__cplusplus) ++extern "C" { ++#endif ++ ++#ifdef _WIN32 ++#define HZ 100 ++#elif defined linux ++#include ++#elif __APPLE__ ++#include ++/* ++ * Old SDKs don't define TARGET_OS_IPHONE at all. ++ * New ones define it to 0 on Mac OS X, 1 on iOS. ++ */ ++#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 ++#include ++#endif +#include - #define HZ 100 - #endif - #ifdef __ANDROID__ -diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c -index 8eea7d86..c48f5be2 100644 ++#define HZ 100 ++#endif ++#ifdef __ANDROID__ ++/* ++ * of android should be included, but its name is same ++ * with this file. So its content is put here to avoid conflict. ++ */ ++#include ++#define HZ 100 ++typedef unsigned int nfds_t; ++int poll(struct pollfd *, nfds_t, long); ++#endif ++ ++ ++/* ++ * Poll event types: each type has a different reason for firing, ++ * or condition that must be met before firing. ++ */ ++ ++typedef enum { ++ /* ++ * Actual Poll queue types against which you can register callbacks. ++ */ ++ POLL_VIRTUALREALTIME = -1, /* Negative because it doesn't have its own Q */ ++ POLL_VTIME = 0, ++ POLL_REALTIME, ++ POLL_DEVICE, ++ POLL_MAIN_LOOP, ++ POLL_NUM_QUEUES ++} PollEventType; ++ ++ ++/* ++ * Classes of events ++ * ++ * These are the predefined classes. More can be declared ++ * with Poll_AllocClass(). ++ */ ++ ++typedef enum PollClass { ++ POLL_CLASS_MAIN, ++ POLL_CLASS_PAUSE, ++ POLL_CLASS_IPC, ++ POLL_CLASS_CPT, ++ POLL_CLASS_MKS, ++ POLL_FIXED_CLASSES, ++ POLL_DEFAULT_FIXED_CLASSES, ++ /* Size enum to maximum */ ++ POLL_MAX_CLASSES = 31, ++} PollClass; ++ ++/* ++ * Do not use; Special pseudo private poll class supported by ++ * PollDefault only ++ */ ++#define POLL_DEFAULT_CLASS_NET POLL_FIXED_CLASSES ++#define POLL_DEFAULT_CS_NET PollClassSet_Singleton(POLL_DEFAULT_CLASS_NET) ++ ++/* ++ * Each callback is registered in a set of classes ++ */ ++ ++typedef struct PollClassSet { ++ uintptr_t bits; ++} PollClassSet; ++ ++/* An empty PollClassSet. */ ++static INLINE PollClassSet ++PollClassSet_Empty(void) ++{ ++ PollClassSet set = { 0 }; ++ return set; ++} ++ ++/* A PollClassSet with the single member. */ ++static INLINE PollClassSet ++PollClassSet_Singleton(PollClass c) ++{ ++ PollClassSet s = PollClassSet_Empty(); ++ ++ ASSERT_ON_COMPILE(POLL_MAX_CLASSES < sizeof s.bits * 8); ++ ASSERT(c < POLL_MAX_CLASSES); ++ ++ s.bits = CONST3264U(1) << c; ++ return s; ++} ++ ++/* Combine two PollClassSets. */ ++static INLINE PollClassSet ++PollClassSet_Union(PollClassSet lhs, PollClassSet rhs) ++{ ++ PollClassSet set; ++ set.bits = lhs.bits | rhs.bits; ++ return set; ++} ++ ++/* Add single class to PollClassSet. */ ++static INLINE PollClassSet ++PollClassSet_Include(PollClassSet set, PollClass c) ++{ ++ return PollClassSet_Union(set, PollClassSet_Singleton(c)); ++} ++ ++ ++#define POLL_CS_MAIN PollClassSet_Singleton(POLL_CLASS_MAIN) ++#define POLL_CS_PAUSE PollClassSet_Union(POLL_CS_MAIN, \ ++ PollClassSet_Singleton(POLL_CLASS_PAUSE)) ++#define POLL_CS_CPT PollClassSet_Union(POLL_CS_PAUSE, \ ++ PollClassSet_Singleton(POLL_CLASS_CPT)) ++#define POLL_CS_IPC PollClassSet_Union(POLL_CS_CPT, \ ++ PollClassSet_Singleton(POLL_CLASS_IPC)) ++#define POLL_CS_VMDB POLL_CS_PAUSE /* POLL_CLASS_VMDB is retired */ ++#define POLL_CS_MKS PollClassSet_Singleton(POLL_CLASS_MKS) ++/* ++ * DANGER. You don't need POLL_CS_ALWAYS. Really. So don't use it. ++ */ ++#define POLL_CS_ALWAYS PollClassSet_Union(POLL_CS_CPT, POLL_CS_IPC) ++ ++/* ++ * Poll class-set taxonomy: ++ * POLL_CS_MAIN ++ * - Unless you NEED another class, use POLL_CS_MAIN. ++ * POLL_CS_PAUSE ++ * - For callbacks that must occur even if the guest is paused. ++ * Most VMDB or Foundry commands are in this category. ++ * POLL_CS_CPT ++ * - Only for callbacks which can trigger intermediate Checkpoint ++ * transitions. ++ * The ONLY such callback is Migrate. ++ * POLL_CS_IPC ++ * - Only for callbacks which can contain Msg_(Post|Hint|Question) ++ * responses, and for signal handlers (why)? ++ * Vigor, VMDB, and Foundry can contain Msg_* responses. ++ * POLL_CS_MKS ++ * - Callback runs in MKS thread. ++ * POLL_CS_ALWAYS ++ * - Only for events that must be processed immediately. ++ * The ONLY such callback is OvhdMemVmxSizeCheck. ++ */ ++ ++ ++/* ++ * Poll_Callback flags ++ */ ++ ++#define POLL_FLAG_PERIODIC 0x01 // keep after firing ++#define POLL_FLAG_REMOVE_AT_POWEROFF 0x02 // self-explanatory ++#define POLL_FLAG_READ 0x04 // device is ready for reading ++#define POLL_FLAG_WRITE 0x08 // device is ready for writing ++#define POLL_FLAG_SOCKET 0x10 // device is a Windows socket ++#define POLL_FLAG_NO_BULL 0x20 // callback does its own locking ++#define POLL_FLAG_WINSOCK 0x40 // Winsock style write events ++#define POLL_FLAG_FD 0x80 // device is a Windows file descriptor. ++#define POLL_FLAG_ACCEPT_INVALID_FDS 0x100 // For broken 3rd party libs, e.g. curl ++#define POLL_FLAG_THUNK_TO_WND 0x200 // thunk callback to window message loop ++ ++ ++typedef void (*PollerFunction)(void *clientData); ++typedef void (*PollerFireWrapper)(PollerFunction func, ++ void *funcData, ++ void *wrapperData); ++typedef Bool (*PollerErrorFn)(const char *errorStr); ++ ++/* ++ * Initialisers: ++ * ++ * For the sake of convenience, we declare the initialisers ++ * for custom implmentations here, even though the actual ++ * implementations are distinct from the core poll code. ++ */ ++ ++typedef struct PollOptions { ++ Bool locked; // Use internal MXUser for locking ++ Bool allowFullQueue; // Don't assert when device event queue is full. ++ VThreadID windowsMsgThread; // thread that processes Windows messages ++ PollerFireWrapper fireWrapperFn; // optional; may be useful for stats ++ void *fireWrapperData; // optional ++ PollerErrorFn errorFn; // optional; called upon unrecoverable error ++} PollOptions; ++ ++ ++void Poll_InitDefault(void); ++void Poll_InitDefaultEx(const PollOptions *opts); ++void Poll_InitGtk(void); // On top of glib for Linux ++void Poll_InitCF(void); // On top of CoreFoundation for OSX ++ ++ ++/* ++ * Functions ++ */ ++int Poll_SocketPair(Bool vmci, Bool stream, int fds[2]); ++void Poll_Loop(Bool loop, Bool *exit, PollClass c); ++void Poll_LoopTimeout(Bool loop, Bool *exit, PollClass c, int timeout); ++Bool Poll_LockingEnabled(void); ++void Poll_Exit(void); ++ ++ ++/* ++ * Poll_Callback adds a callback regardless of whether an identical one exists. ++ * The exception to this rule is POLL_DEVICE callbacks: there is a maximum of ++ * one read and one write callback per fd. ++ * ++ * Poll_CallbackRemove removes one callback. If there are multiple identical ++ * callbacks, which one is removed is an implementation detail. Note that in ++ * the case of POLL_DEVICE and POLL_REALTIME callbacks, the fd/delay used to ++ * create the callback is not specified when removing, so all callbacks ++ * of those types with the same flags, function, and clientData are considered ++ * "identical" even if their fd/delay differed. ++ */ ++ ++VMwareStatus Poll_Callback(PollClassSet classSet, ++ int flags, ++ PollerFunction f, ++ void *clientData, ++ PollEventType type, ++ PollDevHandle info, // fd/microsec delay ++ MXUserRecLock *lck); ++Bool Poll_CallbackRemove(PollClassSet classSet, ++ int flags, ++ PollerFunction f, ++ void *clientData, ++ PollEventType type); ++Bool Poll_CallbackRemoveOneByCB(PollClassSet classSet, ++ int flags, ++ PollerFunction f, ++ PollEventType type, ++ void **clientData); ++ ++void Poll_NotifyChange(PollClassSet classSet); ++ ++/* ++ * Wrappers for Poll_Callback and Poll_CallbackRemove that present ++ * simpler subsets of those interfaces. ++ */ ++ ++VMwareStatus Poll_CB_Device(PollerFunction f, ++ void *clientData, ++ PollDevHandle device, ++ Bool periodic); ++ ++Bool Poll_CB_DeviceRemove(PollerFunction f, ++ void *clientData, ++ Bool periodic); ++ ++ ++VMwareStatus Poll_CB_RTime(PollerFunction f, ++ void *clientData, ++ int64 delay, // microseconds ++ Bool periodic, ++ MXUserRecLock *lock); ++ ++Bool Poll_CB_RTimeRemove(PollerFunction f, ++ void *clientData, ++ Bool periodic); ++ ++ ++#ifdef _WIN32 ++void Poll_SetPumpsWindowsMessages(Bool pumps); ++void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk); ++Bool Poll_FireWndCallback(void *lparam); ++#endif ++ ++#if defined(__cplusplus) ++} // extern "C" ++#endif ++ ++#endif // _POLL_H_ --- a/open-vm-tools/lib/rpcIn/rpcin.c +++ b/open-vm-tools/lib/rpcIn/rpcin.c @@ -57,7 +57,7 @@ @@ -100,16 +740,3 @@ index 8eea7d86..c48f5be2 100644 # include "asyncsocket.h" # include "vmci_defs.h" #include "dataMap.h" -diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c -index 03700937..f0b49ad7 100644 ---- a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c -+++ b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c -@@ -48,7 +48,7 @@ - #include "rpcout.h" - #include "rabbitmqProxyConst.h" - #include "vm_basic_types.h" --#include "poll.h" -+#include "vm_poll.h" - #ifdef OPEN_VM_TOOLS - #include "vmci_sockets.h" - #include "sslDirect.h" diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch index 88f4f694c9..3e4753b2a6 100644 --- a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch +++ b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch @@ -14,18 +14,14 @@ Signed-off-by: Khem Raj open-vm-tools/lib/misc/util_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/open-vm-tools/lib/misc/util_misc.c b/open-vm-tools/lib/misc/util_misc.c -index 198c23d2..0ac0a335 100644 --- a/open-vm-tools/lib/misc/util_misc.c +++ b/open-vm-tools/lib/misc/util_misc.c -@@ -719,8 +719,8 @@ Util_ExpandString(const char *fileName) // IN file path to expand +@@ -719,7 +719,7 @@ Util_ExpandString(const char *fileName) ASSERT(!freeChunk[i]); chunks[i] = expand; if (chunks[i] == NULL) { -- Log("%s: Cannot allocate memory to expand \"%s\" in \"%s\".\n", -- __FUNCTION__, expand, fileName); +- Log("%s: Cannot allocate memory to expand $ in \"%s\".\n", + Log("%s: Cannot allocate memory to expand in \"%s\".\n", -+ __FUNCTION__, fileName); + __FUNCTION__, fileName); goto out; } - chunkSize[i] = strlen(expand); diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0014-Fix-new-warnings-from-gcc9.patch b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0014-Fix-new-warnings-from-gcc9.patch deleted file mode 100644 index b5ccffd141..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0014-Fix-new-warnings-from-gcc9.patch +++ /dev/null @@ -1,1281 +0,0 @@ -From af9eca8689c97ea8e792902b458a31608286655e Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Thu, 13 Jun 2019 16:01:03 +0000 -Subject: [PATCH] Fix new warnings from gcc9 - -Imported from Fedora: -https://src.fedoraproject.org/rpms/open-vm-tools/raw/master/f/gcc9-warnings.patch - -Upstream bug: -https://github.com/vmware/open-vm-tools/issues/330 - -Upstream-Status: Pending ---- - open-vm-tools/hgfsmounter/hgfsmounter.c | 14 +- - open-vm-tools/lib/hgfsServer/hgfsServer.c | 24 ++- - open-vm-tools/vmhgfs-fuse/dir.c | 175 ++++++++--------- - open-vm-tools/vmhgfs-fuse/file.c | 217 +++++++++++++--------- - open-vm-tools/vmhgfs-fuse/filesystem.c | 46 ++--- - open-vm-tools/vmhgfs-fuse/fsutil.c | 63 ++++--- - open-vm-tools/vmhgfs-fuse/link.c | 125 +++++++------ - 7 files changed, 367 insertions(+), 297 deletions(-) - -diff --git a/open-vm-tools/hgfsmounter/hgfsmounter.c b/open-vm-tools/hgfsmounter/hgfsmounter.c -index 0921b700..3f6798dc 100644 ---- a/open-vm-tools/hgfsmounter/hgfsmounter.c -+++ b/open-vm-tools/hgfsmounter/hgfsmounter.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 2006-2017 VMware, Inc. All rights reserved. -+ * Copyright (C) 2006-2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -514,11 +514,13 @@ ParseFmask(const char *option, // IN: option string along with value - HgfsMountInfo *mountInfo, // OUT: mount data - int *flags) // OUT: mount flags - { -+ unsigned short fmask = 0; - ASSERT(option); - ASSERT(mountInfo); - -- if (ParseMask(option, &mountInfo->fmask)) { -- LOG("Setting mount fmask to %o\n", mountInfo->fmask); -+ if (ParseMask(option, &fmask)) { -+ LOG("Setting mount fmask to %o\n", fmask); -+ mountInfo->fmask = fmask; - return TRUE; - } - -@@ -548,11 +550,13 @@ ParseDmask(const char *option, // IN: option string along with value - HgfsMountInfo *mountInfo, // OUT: mount data - int *flags) // OUT: mount flags - { -+ unsigned short dmask = 0; - ASSERT(option); - ASSERT(mountInfo); - -- if (ParseMask(option, &mountInfo->dmask)) { -- LOG("Setting mount dmask to %o\n", mountInfo->dmask); -+ if (ParseMask(option, &dmask)) { -+ LOG("Setting mount dmask to %o\n", dmask); -+ mountInfo->dmask = dmask; - return TRUE; - } - -diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c -index 740c4fed..422383cd 100644 ---- a/open-vm-tools/lib/hgfsServer/hgfsServer.c -+++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. -+ * Copyright (C) 1998-2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -159,7 +159,7 @@ struct HgfsTransportSessionInfo { - HgfsServerChannelData channelCapabilities; - }; - --/* The input request paramaters object. */ -+/* The input request parameters object. */ - typedef struct HgfsInputParam { - const void *request; /* Hgfs header followed by operation request */ - size_t requestSize; /* Size of Hgfs header and operation request */ -@@ -2682,8 +2682,8 @@ HgfsSearchHandle2Search(HgfsHandle handle, // IN: handle - * None - * - * Side effects: -- * If there isnt enough memory to accomodate the new names, those file nodes -- * that couldnt be updated are deleted. -+ * If there isn't enough memory to accommodate the new names, those file nodes -+ * that couldn't be updated are deleted. - * - *----------------------------------------------------------------------------- - */ -@@ -3399,7 +3399,7 @@ HgfsServerSessionReceive(HgfsPacket *packet, // IN: Hgfs Packet - - /* Send error if we fail to process the op. */ - if (HGFS_ERROR_SUCCESS != status) { -- LOG(4, ("Error %d occured parsing the packet\n", (uint32)status)); -+ LOG(4, ("Error %d occurred parsing the packet\n", (uint32)status)); - HgfsServerCompleteRequest(status, 0, input); - } - } -@@ -4131,7 +4131,7 @@ HgfsServerSetSessionCapability(HgfsOp op, // IN: operation code - result = TRUE; - } - } -- LOG(4, ("%s: Setting capabilitiy flags %x for op code %d %s\n", -+ LOG(4, ("%s: Setting capability flags %x for op code %d %s\n", - __FUNCTION__, flags, op, result ? "succeeded" : "failed")); - - return result; -@@ -4143,7 +4143,7 @@ HgfsServerSetSessionCapability(HgfsOp op, // IN: operation code - * - * HgfsServerResEnumInit -- - * -- * Initialize an enumeration of all exisitng resources. -+ * Initialize an enumeration of all existing resources. - * - * Results: - * The enumeration state object. -@@ -4239,7 +4239,7 @@ HgfsServerResEnumExit(void *enumState) // IN/OUT: enumeration state - * - * HgfsServerEnumerateSharedFolders -- - * -- * Enumerates all exisitng shared folders and registers shared folders with -+ * Enumerates all existing shared folders and registers shared folders with - * directory notification package. - * - * Results: -@@ -6536,11 +6536,13 @@ HgfsServerRead(HgfsInputParam *input) // IN: Input params - payload = &reply->payload[0]; - } - if (payload) { -+ uint32 actualSize = 0; - status = HgfsPlatformReadFile(readFd, input->session, offset, - requiredSize, payload, -- &reply->actualSize); -+ &actualSize); - if (HGFS_ERROR_SUCCESS == status) { - reply->reserved = 0; -+ reply->actualSize = actualSize; - replyPayloadSize = sizeof *reply; - - if (readUseDataBuffer) { -@@ -6556,11 +6558,13 @@ HgfsServerRead(HgfsInputParam *input) // IN: Input params - break; - } - case HGFS_OP_READ: { -+ uint32 actualSize = 0; - HgfsReplyRead *reply = replyRead; - - status = HgfsPlatformReadFile(readFd, input->session, offset, requiredSize, -- reply->payload, &reply->actualSize); -+ reply->payload, &actualSize); - if (HGFS_ERROR_SUCCESS == status) { -+ reply->actualSize = actualSize; - replyPayloadSize = sizeof *reply + reply->actualSize; - } else { - LOG(4, ("%s: V1 Failed to read-> %d.\n", __FUNCTION__, status)); -diff --git a/open-vm-tools/vmhgfs-fuse/dir.c b/open-vm-tools/vmhgfs-fuse/dir.c -index 6298a4ea..e71b7afd 100644 ---- a/open-vm-tools/vmhgfs-fuse/dir.c -+++ b/open-vm-tools/vmhgfs-fuse/dir.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 2013 VMware, Inc. All rights reserved. -+ * Copyright (C) 2013,2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -54,38 +54,53 @@ HgfsPackDirOpenRequest(const char *path, // IN: Path of the dir to open - HgfsOp opUsed, // IN: Op to be used - HgfsReq *req) // IN/OUT: Packet to write into - { -- char *name; -- unsigned int *nameLength = NULL; - size_t reqSize; -- int result; - - ASSERT(path); - ASSERT(req); - LOG(4, ("Path = %s \n", path)); - switch (opUsed) { - case HGFS_OP_SEARCH_OPEN_V3: { -+ int result; - HgfsRequestSearchOpenV3 *requestV3 = HgfsGetRequestPayload(req); - -- /* We'll use these later. */ -- name = requestV3->dirName.name; -- nameLength = &requestV3->dirName.length; - requestV3->dirName.flags = 0; - requestV3->dirName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; - requestV3->dirName.fid = HGFS_INVALID_HANDLE; - requestV3->reserved = 0; - reqSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ requestV3->dirName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed\n")); -+ return -EINVAL; -+ } -+ LOG(4, ("After conversion = %s\n", requestV3->dirName.name)); -+ requestV3->dirName.length = result; -+ reqSize += result; - break; - } - - case HGFS_OP_SEARCH_OPEN: { -+ int result; - HgfsRequestSearchOpen *request; - - request = (HgfsRequestSearchOpen *)(HGFS_REQ_PAYLOAD(req)); - -- /* We'll use these later. */ -- name = request->dirName.name; -- nameLength = &request->dirName.length; - reqSize = sizeof *request; -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ request->dirName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed\n")); -+ return -EINVAL; -+ } -+ LOG(4, ("After conversion = %s\n", request->dirName.name)); -+ request->dirName.length = result; -+ reqSize += result; - break; - } - -@@ -94,21 +109,7 @@ HgfsPackDirOpenRequest(const char *path, // IN: Path of the dir to open - return -EPROTO; - } - -- /* Convert to CP name. */ -- -- LOG(4, ("After buildPath = %s\n", path)); -- result = CPName_ConvertTo(path, -- HGFS_LARGE_PACKET_MAX - (reqSize - 1), -- name); -- if (result < 0) { -- LOG(4, ("CP conversion failed\n")); -- return -EINVAL; -- } -- -- LOG(4, ("After conversion = %s\n", name)); -- -- *nameLength = (uint32) result; -- req->payloadSize = reqSize + result; -+ req->payloadSize = reqSize; - - /* Fill in header here as payloadSize needs to be there. */ - HgfsPackHeader(req, opUsed); -@@ -149,7 +150,6 @@ HgfsDirOpen(const char* path, // IN: Path of dir to open - int result; - HgfsOp opUsed; - HgfsStatus replyStatus; -- HgfsHandle *replySearch; - - ASSERT(path); - req = HgfsGetNewRequest(); -@@ -161,16 +161,6 @@ HgfsDirOpen(const char* path, // IN: Path of dir to open - - retry: - opUsed = hgfsVersionSearchOpen; -- if (opUsed == HGFS_OP_SEARCH_OPEN_V3) { -- HgfsReplySearchOpenV3 *requestV3 = HgfsGetReplyPayload(req); -- -- replySearch = &requestV3->search; -- -- } else { -- HgfsReplySearchOpen *request = (HgfsReplySearchOpen *)HGFS_REQ_PAYLOAD(req); -- -- replySearch = &request->search; -- } - - result = HgfsPackDirOpenRequest(path, opUsed, req); - if (result != 0) { -@@ -187,8 +177,14 @@ retry: - - switch (result) { - case 0: -- *handle = *replySearch; -- LOG(6, ("Set handle to %u\n", *replySearch)); -+ if (opUsed == HGFS_OP_SEARCH_OPEN_V3) { -+ HgfsReplySearchOpenV3 *requestV3 = HgfsGetReplyPayload(req); -+ *handle = requestV3->search; -+ } else { -+ HgfsReplySearchOpen *request = (HgfsReplySearchOpen *)HGFS_REQ_PAYLOAD(req); -+ *handle = request->search; -+ } -+ LOG(6, ("Set handle to %u\n", *handle)); - break; - case -EPROTO: - /* Retry with older version(s). Set globally. */ -@@ -626,25 +622,30 @@ HgfsPackCreateDirRequest(const char *path, - HgfsOp opUsed, // IN: Op to be used. - HgfsReq *req) // IN/OUT: Packet to write into - { -- char *fileName = NULL; -- uint32 *fileNameLength; - size_t reqSize; -- int result; -+ - - ASSERT(req); - - switch (opUsed) { - case HGFS_OP_CREATE_DIR_V3: { -+ int result; - HgfsRequestCreateDirV3 *requestV3 = HgfsGetRequestPayload(req); - - reqSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); -- /* We'll use these later. */ -- fileName = requestV3->fileName.name; -- fileNameLength = &requestV3->fileName.length; - requestV3->fileName.flags = 0; - requestV3->fileName.fid = HGFS_INVALID_HANDLE; - requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; -- -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ requestV3->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ requestV3->fileName.length = result; -+ reqSize += result; - requestV3->mask = HGFS_CREATE_DIR_MASK; - - /* Set permissions. */ -@@ -656,15 +657,23 @@ HgfsPackCreateDirRequest(const char *path, - break; - } - case HGFS_OP_CREATE_DIR_V2: { -+ int result; - HgfsRequestCreateDirV2 *requestV2; - - requestV2 = (HgfsRequestCreateDirV2 *)(HGFS_REQ_PAYLOAD(req)); - -- /* We'll use these later. */ -- fileName = requestV2->fileName.name; -- fileNameLength = &requestV2->fileName.length; - reqSize = sizeof *requestV2; - -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ requestV2->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ requestV2->fileName.length = result; -+ reqSize += result; - requestV2->mask = HGFS_CREATE_DIR_MASK; - - /* Set permissions. */ -@@ -675,15 +684,22 @@ HgfsPackCreateDirRequest(const char *path, - break; - } - case HGFS_OP_CREATE_DIR: { -+ int result; - HgfsRequestCreateDir *request; - - request = (HgfsRequestCreateDir *)(HGFS_REQ_PAYLOAD(req)); - -- /* We'll use these later. */ -- fileName = request->fileName.name; -- fileNameLength = &request->fileName.length; - reqSize = sizeof *request; -- -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ request->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ request->fileName.length = result; -+ reqSize += result; - /* Set permissions. */ - request->permissions = (permsMode & S_IRWXU) >> 6; - break; -@@ -693,18 +709,7 @@ HgfsPackCreateDirRequest(const char *path, - return -EPROTO; - } - -- -- /* Convert to CP name. */ -- result = CPName_ConvertTo(path, -- HGFS_LARGE_PACKET_MAX - (reqSize - 1), -- fileName); -- if (result < 0) { -- LOG(4, ("CP conversion failed.\n")); -- return -EINVAL; -- } -- -- *fileNameLength = result; -- req->payloadSize = reqSize + result; -+ req->payloadSize = reqSize; - - /* Fill in header here as payloadSize needs to be there. */ - HgfsPackHeader(req, opUsed); -@@ -827,8 +832,6 @@ HgfsDelete(const char* path, // IN: Path to file - HgfsReq *req = NULL; - int result = 0; - HgfsStatus replyStatus; -- char *fileName = NULL; -- uint32 *fileNameLength; - uint32 reqSize; - HgfsOp opUsed; - HgfsAttrInfo newAttr = {0}; -@@ -862,8 +865,17 @@ HgfsDelete(const char* path, // IN: Path to file - - reqSize = sizeof(*request) + HgfsGetRequestHeaderSize(); - request->hints = 0; -- fileName = request->fileName.name; -- fileNameLength = &request->fileName.length; -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize), -+ request->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ request->fileName.length = result; -+ reqSize += result; - request->fileName.fid = HGFS_INVALID_HANDLE; - request->fileName.flags = 0; - request->fileName.caseType = HGFS_FILE_NAME_DEFAULT_CASE; -@@ -874,24 +886,21 @@ HgfsDelete(const char* path, // IN: Path to file - - request = (HgfsRequestDelete *)(HGFS_REQ_PAYLOAD(req)); - /* Fill out the request packet. */ -- fileName = request->fileName.name; -- fileNameLength = &request->fileName.length; - reqSize = sizeof *request; -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize), -+ request->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ request->fileName.length = result; -+ reqSize += result; - } - -- -- /* Convert to CP name. */ -- result = CPName_ConvertTo(path, -- HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize), -- fileName); -- if (result < 0) { -- LOG(4, ("CP conversion failed.\n")); -- result = -EINVAL; -- goto out; -- } -- -- *fileNameLength = result; -- req->payloadSize = reqSize + result; -+ req->payloadSize = reqSize; - - /* Fill in header here as payloadSize needs to be there. */ - HgfsPackHeader(req, opUsed); -diff --git a/open-vm-tools/vmhgfs-fuse/file.c b/open-vm-tools/vmhgfs-fuse/file.c -index 389ebba8..0b6c48bc 100644 ---- a/open-vm-tools/vmhgfs-fuse/file.c -+++ b/open-vm-tools/vmhgfs-fuse/file.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 2013,2017 VMware, Inc. All rights reserved. -+ * Copyright (C) 2013,2018-2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -66,10 +66,7 @@ HgfsPackOpenRequest(const char *path, // IN: Path to file - HgfsOp opUsed, // IN: Op to use - HgfsReq *req) // IN/OUT: Packet to write into - { -- char *name; -- uint32 *nameLength; - size_t reqSize; -- int result; - int openMode, openFlags; - - ASSERT(path); -@@ -88,14 +85,22 @@ HgfsPackOpenRequest(const char *path, // IN: Path to file - - switch (opUsed) { - case HGFS_OP_OPEN_V3: { -+ int result; - HgfsRequestOpenV3 *requestV3 = HgfsGetRequestPayload(req); - - reqSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); - -- /* We'll use these later. */ -- name = requestV3->fileName.name; -- nameLength = &requestV3->fileName.length; -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ requestV3->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } - -+ requestV3->fileName.length = result; -+ reqSize += result; - /* Linux clients need case-sensitive lookups. */ - requestV3->fileName.flags = 0; - requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; -@@ -122,15 +127,24 @@ HgfsPackOpenRequest(const char *path, // IN: Path to file - } - - case HGFS_OP_OPEN_V2: { -+ int result; - HgfsRequestOpenV2 *requestV2; - - requestV2 = (HgfsRequestOpenV2 *)(HGFS_REQ_PAYLOAD(req)); - -- /* We'll use these later. */ -- name = requestV2->fileName.name; -- nameLength = &requestV2->fileName.length; - reqSize = sizeof *requestV2; - -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ requestV2->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ -+ requestV2->fileName.length = result; -+ reqSize += result; - requestV2->mask = mask; - requestV2->mode = openMode; - requestV2->flags = openFlags; -@@ -148,14 +162,23 @@ HgfsPackOpenRequest(const char *path, // IN: Path to file - break; - } - case HGFS_OP_OPEN: { -+ int result; - HgfsRequestOpen *request; - - request = (HgfsRequestOpen *)(HGFS_REQ_PAYLOAD(req)); -- /* We'll use these later. */ -- name = request->fileName.name; -- nameLength = &request->fileName.length; - reqSize = sizeof *request; - -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (reqSize - 1), -+ request->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ -+ request->fileName.length = result; -+ reqSize += result; - request->mode = openMode; - request->flags = openFlags; - -@@ -168,18 +191,7 @@ HgfsPackOpenRequest(const char *path, // IN: Path to file - return -EPROTO; - } - -- -- /* Convert to CP name. */ -- result = CPName_ConvertTo(path, -- HGFS_LARGE_PACKET_MAX - (reqSize - 1), -- name); -- if (result < 0) { -- LOG(4, ("CP conversion failed.\n")); -- return -EINVAL; -- } -- -- *nameLength = (uint32) result; -- req->payloadSize = reqSize + result; -+ req->payloadSize = reqSize; - - /* Fill in header here as payloadSize needs to be there. */ - HgfsPackHeader(req, opUsed); -@@ -915,10 +927,6 @@ int - HgfsRename(const char* from, const char* to) - { - HgfsReq *req = NULL; -- char *oldName; -- char *newName; -- uint32 *oldNameLength; -- uint32 *newNameLength; - int result = 0; - uint32 reqSize; - HgfsOp opUsed; -@@ -942,33 +950,41 @@ retry: - if (opUsed == HGFS_OP_RENAME_V3) { - HgfsRequestRenameV3 *requestV3 = HgfsGetRequestPayload(req); - -- oldName = requestV3->oldName.name; -- oldNameLength = &requestV3->oldName.length; - requestV3->hints = 0; - requestV3->oldName.flags = 0; - requestV3->oldName.fid = HGFS_INVALID_HANDLE; - requestV3->oldName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; - requestV3->reserved = 0; - reqSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); -+ /* Convert old name to CP format. */ -+ result = CPName_ConvertTo(from, -+ HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize), -+ requestV3->oldName.name); -+ if (result < 0) { -+ LOG(4, ("oldName CP conversion failed\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ -+ requestV3->oldName.length = result; -+ reqSize += result; - } else { - HgfsRequestRename *request = (HgfsRequestRename *)HGFS_REQ_PAYLOAD(req); - -- oldName = request->oldName.name; -- oldNameLength = &request->oldName.length; - reqSize = sizeof *request; -- } -- /* Convert old name to CP format. */ -- result = CPName_ConvertTo(from, -- HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize), -- oldName); -- if (result < 0) { -- LOG(4, ("oldName CP conversion failed\n")); -- result = -EINVAL; -- goto out; -- } -+ /* Convert old name to CP format. */ -+ result = CPName_ConvertTo(from, -+ HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize), -+ request->oldName.name); -+ if (result < 0) { -+ LOG(4, ("oldName CP conversion failed\n")); -+ result = -EINVAL; -+ goto out; -+ } - -- *oldNameLength = result; -- reqSize += result; -+ request->oldName.length = result; -+ reqSize += result; -+ } - - /* - * Build full new name to send to server. -@@ -983,8 +999,20 @@ retry: - - newNameP = (HgfsFileNameV3 *)((char *)&requestV3->oldName + - sizeof requestV3->oldName + result); -- newName = newNameP->name; -- newNameLength = &newNameP->length; -+ -+ LOG(6, ("New name: \"%s\"\n", newNameP->name)); -+ -+ /* Convert new name to CP format. */ -+ result = CPName_ConvertTo(to, -+ HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize) - result, -+ newNameP->name); -+ if (result < 0) { -+ LOG(4, ("newName CP conversion failed\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ newNameP->length = result; -+ reqSize += result; - newNameP->flags = 0; - newNameP->fid = HGFS_INVALID_HANDLE; - newNameP->caseType = HGFS_FILE_NAME_CASE_SENSITIVE; -@@ -993,24 +1021,22 @@ retry: - HgfsFileName *newNameP; - newNameP = (HgfsFileName *)((char *)&request->oldName + - sizeof request->oldName + result); -- newName = newNameP->name; -- newNameLength = &newNameP->length; -- } - -- LOG(6, ("New name: \"%s\"\n", newName)); -+ LOG(6, ("New name: \"%s\"\n", newNameP->name)); - -- /* Convert new name to CP format. */ -- result = CPName_ConvertTo(to, -- HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize) - result, -- newName); -- if (result < 0) { -- LOG(4, ("newName CP conversion failed\n")); -- result = -EINVAL; -- goto out; -+ /* Convert new name to CP format. */ -+ result = CPName_ConvertTo(to, -+ HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize) - result, -+ newNameP->name); -+ if (result < 0) { -+ LOG(4, ("newName CP conversion failed\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ newNameP->length = result; -+ reqSize += result; - } - -- *newNameLength = result; -- reqSize += result; - req->payloadSize = reqSize; - - /* Fill in header here as payloadSize needs to be there. */ -@@ -1068,7 +1094,7 @@ retry: - } - break; - default: -- LOG(4, ("failed with result %d\n", result)); -+ LOG(4, ("Server protocol result %d\n", result)); - } - break; - default: -@@ -1109,21 +1135,17 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - { - HgfsAttrV2 *attrV2; - HgfsAttr *attrV1; -- HgfsAttrHint *hints; - HgfsAttrChanges *update; -- char *fileName = NULL; -- uint32 *fileNameLength = NULL; - size_t reqBufferSize; - size_t reqSize; -- int result = 0; - ASSERT(req); - - switch (opUsed) { - case HGFS_OP_SETATTR_V3: { -+ int result; - HgfsRequestSetattrV3 *requestV3 = HgfsGetRequestPayload(req); - - attrV2 = &requestV3->attr; -- hints = &requestV3->hints; - - /* - * Clear attributes, mask, and hints before touching them. -@@ -1131,7 +1153,7 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - * make sure to zero them all here. - */ - memset(attrV2, 0, sizeof *attrV2); -- memset(hints, 0, sizeof *hints); -+ requestV3->hints = 0; - - /* - * When possible, issue a setattr using an existing handle. This will -@@ -1143,14 +1165,21 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - * the times also requires write permissions on Windows, so we require it - * here too. Otherwise, any handle will do. - */ -- fileName = requestV3->fileName.name; -- fileNameLength = &requestV3->fileName.length; - requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; - requestV3->fileName.fid = HGFS_INVALID_HANDLE; - requestV3->fileName.flags = 0; - requestV3->reserved = 0; - reqSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); - reqBufferSize = HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize); -+ result = CPName_ConvertTo(path, -+ reqBufferSize, -+ requestV3->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ requestV3->fileName.length = result; -+ reqSize += result; - - attrV2->mask = attr->mask; - if (attr->mask & (HGFS_ATTR_VALID_SPECIAL_PERMS | -@@ -1173,22 +1202,22 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - } - if (attr->mask & HGFS_ATTR_VALID_ACCESS_TIME) { - attrV2->accessTime = attr->accessTime; -- *hints |= HGFS_ATTR_HINT_SET_ACCESS_TIME; -+ requestV3->hints |= HGFS_ATTR_HINT_SET_ACCESS_TIME; - } - if (attr->mask & HGFS_ATTR_VALID_WRITE_TIME) { - attrV2->writeTime = attr->writeTime; -- *hints |= HGFS_ATTR_HINT_SET_WRITE_TIME; -+ requestV3->hints |= HGFS_ATTR_HINT_SET_WRITE_TIME; - } - - break; - } - case HGFS_OP_SETATTR_V2: { -+ int result; - HgfsRequestSetattrV2 *requestV2; - - requestV2 = (HgfsRequestSetattrV2 *)(HGFS_REQ_PAYLOAD(req)); - - attrV2 = &requestV2->attr; -- hints = &requestV2->hints; - - /* - * Clear attributes, mask, and hints before touching them. -@@ -1196,13 +1225,19 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - * make sure to zero them all here. - */ - memset(attrV2, 0, sizeof *attrV2); -- memset(hints, 0, sizeof *hints); -- -- fileName = requestV2->fileName.name; -- fileNameLength = &requestV2->fileName.length; -+ requestV2->hints = 0; - - reqSize = sizeof *requestV2; - reqBufferSize = HGFS_NAME_BUFFER_SIZE(HGFS_LARGE_PACKET_MAX, requestV2); -+ result = CPName_ConvertTo(path, -+ reqBufferSize, -+ requestV2->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ requestV2->fileName.length = result; -+ reqSize += result; - - if (attr->mask & (HGFS_ATTR_VALID_SPECIAL_PERMS | - HGFS_ATTR_VALID_OWNER_PERMS | -@@ -1224,16 +1259,17 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - } - if (attr->mask & HGFS_ATTR_VALID_ACCESS_TIME) { - attrV2->accessTime = attr->accessTime; -- *hints |= HGFS_ATTR_HINT_SET_ACCESS_TIME; -+ requestV2->hints |= HGFS_ATTR_HINT_SET_ACCESS_TIME; - } - if (attr->mask & HGFS_ATTR_VALID_WRITE_TIME) { - attrV2->writeTime = attr->writeTime; -- *hints |= HGFS_ATTR_HINT_SET_WRITE_TIME; -+ requestV2->hints |= HGFS_ATTR_HINT_SET_WRITE_TIME; - } - - break; - } - case HGFS_OP_SETATTR: { -+ int result; - HgfsRequestSetattr *request; - - request = (HgfsRequestSetattr *)(HGFS_REQ_PAYLOAD(req)); -@@ -1241,11 +1277,17 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - attrV1 = &request->attr; - update = &request->update; - -- /* We'll use these later. */ -- fileName = request->fileName.name; -- fileNameLength = &request->fileName.length; - reqSize = sizeof *request; - reqBufferSize = HGFS_NAME_BUFFER_SIZE(HGFS_LARGE_PACKET_MAX, request); -+ result = CPName_ConvertTo(path, -+ reqBufferSize, -+ request->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ request->fileName.length = result; -+ reqSize += result; - - /* - * Clear attributes before touching them. -@@ -1284,16 +1326,7 @@ HgfsPackSetattrRequest(const char *path, // IN: path to file - return -EPROTO; - } - -- result = CPName_ConvertTo(path, -- reqBufferSize, -- fileName); -- if (result < 0) { -- LOG(4, ("CP conversion failed.\n")); -- return -EINVAL; -- } -- -- *fileNameLength = result; -- req->payloadSize = reqSize + result; -+ req->payloadSize = reqSize; - - /* Fill in header here as payloadSize needs to be there. */ - HgfsPackHeader(req, opUsed); -diff --git a/open-vm-tools/vmhgfs-fuse/filesystem.c b/open-vm-tools/vmhgfs-fuse/filesystem.c -index fb9d547d..1931a5d2 100644 ---- a/open-vm-tools/vmhgfs-fuse/filesystem.c -+++ b/open-vm-tools/vmhgfs-fuse/filesystem.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 2013 VMware, Inc. All rights reserved. -+ * Copyright (C) 2013,2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -123,36 +123,50 @@ HgfsPackQueryVolumeRequest(const char *path, // IN: File pointer for this - HgfsOp opUsed, // IN: Op to be used. - HgfsReq *req) // IN/OUT: Packet to write into - { -- char *name; -- uint32 *nameLength; - size_t requestSize; -- int result; -+ - - ASSERT(req); - - switch (opUsed) { - case HGFS_OP_QUERY_VOLUME_INFO_V3: { -+ int result; - HgfsRequestQueryVolumeV3 *requestV3 = HgfsGetRequestPayload(req); - -- /* We'll use these later. */ -- name = requestV3->fileName.name; -- nameLength = &requestV3->fileName.length; - requestV3->fileName.flags = 0; - requestV3->fileName.fid = HGFS_INVALID_HANDLE; - requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; - requestV3->reserved = 0; - requestSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (requestSize - 1), -+ requestV3->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ requestV3->fileName.length = result; -+ requestSize += result; - break; - } - case HGFS_OP_QUERY_VOLUME_INFO: { -+ int result; - HgfsRequestQueryVolume *request; - - request = (HgfsRequestQueryVolume *)(HGFS_REQ_PAYLOAD(req)); - -- /* We'll use these later. */ -- name = request->fileName.name; -- nameLength = &request->fileName.length; - requestSize = sizeof *request; -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ HGFS_LARGE_PACKET_MAX - (requestSize - 1), -+ request->fileName.name); -+ if (result < 0) { -+ LOG(4, ("CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ request->fileName.length = result; -+ requestSize += result; - break; - } - default: -@@ -160,17 +174,7 @@ HgfsPackQueryVolumeRequest(const char *path, // IN: File pointer for this - return -EPROTO; - } - -- /* Convert to CP name. */ -- result = CPName_ConvertTo(path, -- HGFS_LARGE_PACKET_MAX - (requestSize - 1), -- name); -- if (result < 0) { -- LOG(4, ("CP conversion failed.\n")); -- return -EINVAL; -- } -- -- *nameLength = (uint32) result; -- req->payloadSize = requestSize + result; -+ req->payloadSize = requestSize; - - /* Fill in header here as payloadSize needs to be there. */ - HgfsPackHeader(req, opUsed); -diff --git a/open-vm-tools/vmhgfs-fuse/fsutil.c b/open-vm-tools/vmhgfs-fuse/fsutil.c -index 042c223c..af85c405 100644 ---- a/open-vm-tools/vmhgfs-fuse/fsutil.c -+++ b/open-vm-tools/vmhgfs-fuse/fsutil.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 2013 VMware, Inc. All rights reserved. -+ * Copyright (C) 2013,2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -189,8 +189,6 @@ HgfsPackGetattrRequest(HgfsReq *req, // IN/OUT: Request buffer - size_t reqBufferSize; - size_t reqSize; - int result = 0; -- char *fileName = NULL; -- uint32 *fileNameLength = NULL; - ASSERT(attr); - ASSERT(req); - ASSERT(path); -@@ -204,8 +202,6 @@ HgfsPackGetattrRequest(HgfsReq *req, // IN/OUT: Request buffer - - /* Fill out the request packet. */ - requestV3->hints = 0; -- fileName = requestV3->fileName.name; -- fileNameLength = &requestV3->fileName.length; - requestV3->fileName.flags = 0; - requestV3->fileName.fid = HGFS_INVALID_HANDLE; - requestV3->fileName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; -@@ -213,6 +209,19 @@ HgfsPackGetattrRequest(HgfsReq *req, // IN/OUT: Request buffer - requestV3->reserved = 0; - reqSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); - reqBufferSize = HGFS_NAME_BUFFER_SIZET(HGFS_LARGE_PACKET_MAX, reqSize); -+ if (requestV3->fileName.name != NULL) { -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ reqBufferSize, -+ requestV3->fileName.name); -+ LOG(8, ("Converted path %s\n", requestV3->fileName.name)); -+ if (result < 0) { -+ LOG(8, ("CP conversion failed.\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ requestV3->fileName.length = result; -+ } - break; - } - -@@ -223,20 +232,42 @@ HgfsPackGetattrRequest(HgfsReq *req, // IN/OUT: Request buffer - - requestV2 = (HgfsRequestGetattrV2 *)(HGFS_REQ_PAYLOAD(req)); - requestV2->hints = 0; -- fileName = requestV2->fileName.name; -- fileNameLength = &requestV2->fileName.length; - reqSize = sizeof *requestV2; - reqBufferSize = HGFS_NAME_BUFFER_SIZE(HGFS_LARGE_PACKET_MAX, requestV2); -+ if (requestV2->fileName.name != NULL) { -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ reqBufferSize, -+ requestV2->fileName.name); -+ LOG(8, ("Converted path %s\n", requestV2->fileName.name)); -+ if (result < 0) { -+ LOG(8, ("CP conversion failed.\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ requestV2->fileName.length = result; -+ } - break; - } - - case HGFS_OP_GETATTR: { - HgfsRequestGetattr *requestV1; - requestV1 = (HgfsRequestGetattr *)(HGFS_REQ_PAYLOAD(req)); -- fileName = requestV1->fileName.name; -- fileNameLength = &requestV1->fileName.length; - reqSize = sizeof *requestV1; - reqBufferSize = HGFS_NAME_BUFFER_SIZE(HGFS_LARGE_PACKET_MAX, requestV1); -+ if (requestV1->fileName.name != NULL) { -+ /* Convert to CP name. */ -+ result = CPName_ConvertTo(path, -+ reqBufferSize, -+ requestV1->fileName.name); -+ LOG(8, ("Converted path %s\n", requestV1->fileName.name)); -+ if (result < 0) { -+ LOG(8, ("CP conversion failed.\n")); -+ result = -EINVAL; -+ goto out; -+ } -+ requestV1->fileName.length = result; -+ } - break; - } - -@@ -246,20 +277,6 @@ HgfsPackGetattrRequest(HgfsReq *req, // IN/OUT: Request buffer - goto out; - } - -- if (fileName != NULL) { -- /* Convert to CP name. */ -- result = CPName_ConvertTo(path, -- reqBufferSize, -- fileName); -- LOG(8, ("Converted path %s\n", fileName)); -- if (result < 0) { -- LOG(8, ("CP conversion failed.\n")); -- result = -EINVAL; -- goto out; -- } -- *fileNameLength = result; -- } -- - req->payloadSize = reqSize + result; - - /* Fill in header here as payloadSize needs to be there. */ -diff --git a/open-vm-tools/vmhgfs-fuse/link.c b/open-vm-tools/vmhgfs-fuse/link.c -index a00e8446..777eb76e 100644 ---- a/open-vm-tools/vmhgfs-fuse/link.c -+++ b/open-vm-tools/vmhgfs-fuse/link.c -@@ -1,5 +1,5 @@ - /********************************************************* -- * Copyright (C) 2013 VMware, Inc. All rights reserved. -+ * Copyright (C) 2013,2019 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published -@@ -51,36 +51,81 @@ HgfsPackSymlinkCreateRequest(const char* symlink, // IN: path of the link - { - HgfsRequestSymlinkCreateV3 *requestV3 = NULL; - HgfsRequestSymlinkCreate *request = NULL; -- char *symlinkName; -- uint32 *symlinkNameLength; -- char *targetName; -- uint32 *targetNameLength; - size_t targetNameBytes; -- - size_t requestSize; -- int result; -+ -+ targetNameBytes = strlen(symname) + 1; - - switch (opUsed) { - case HGFS_OP_CREATE_SYMLINK_V3: { -+ int result; -+ HgfsFileNameV3 *fileNameP; - requestV3 = HgfsGetRequestPayload(req); - -- /* We'll use these later. */ -- symlinkName = requestV3->symlinkName.name; -- symlinkNameLength = &requestV3->symlinkName.length; - requestV3->symlinkName.flags = 0; - requestV3->symlinkName.fid = HGFS_INVALID_HANDLE; - requestV3->symlinkName.caseType = HGFS_FILE_NAME_CASE_SENSITIVE; - requestV3->reserved = 0; - requestSize = sizeof(*requestV3) + HgfsGetRequestHeaderSize(); -+ /* Convert symlink name to CP format. */ -+ result = CPName_ConvertTo(symlink, -+ HGFS_LARGE_PACKET_MAX - (requestSize - 1), -+ requestV3->symlinkName.name); -+ if (result < 0) { -+ LOG(4, ("SymlinkName CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ requestV3->symlinkName.length = result; -+ requestSize += result; -+ -+ /* Copy target name into request packet. */ -+ if (targetNameBytes > HGFS_LARGE_PACKET_MAX - (requestSize - 1)) { -+ LOG(4, ("Target name is too long.\n")); -+ return -EINVAL; -+ } -+ -+ fileNameP = (HgfsFileNameV3 *)((char *)&requestV3->symlinkName + -+ sizeof requestV3->symlinkName + result); -+ memcpy(fileNameP->name, symname, targetNameBytes); -+ LOG(6, ("Target name: \"%s\"\n", fileNameP->name)); -+ /* Convert target name to CPName-lite format. */ -+ CPNameLite_ConvertTo(fileNameP->name, targetNameBytes - 1, '/'); -+ fileNameP->length = targetNameBytes - 1; -+ fileNameP->flags = 0; -+ fileNameP->fid = HGFS_INVALID_HANDLE; -+ fileNameP->caseType = HGFS_FILE_NAME_CASE_SENSITIVE; - break; - } - case HGFS_OP_CREATE_SYMLINK: { -+ int result; -+ HgfsFileName *fileNameP; - request = (HgfsRequestSymlinkCreate *)(HGFS_REQ_PAYLOAD(req)); - -- /* We'll use these later. */ -- symlinkName = request->symlinkName.name; -- symlinkNameLength = &request->symlinkName.length; - requestSize = sizeof *request; -+ /* Convert symlink name to CP format. */ -+ result = CPName_ConvertTo(symlink, -+ HGFS_LARGE_PACKET_MAX - (requestSize - 1), -+ request->symlinkName.name); -+ if (result < 0) { -+ LOG(4, ("SymlinkName CP conversion failed.\n")); -+ return -EINVAL; -+ } -+ request->symlinkName.length = result; -+ requestSize += result; -+ -+ /* Copy target name into request packet. */ -+ if (targetNameBytes > HGFS_LARGE_PACKET_MAX - (requestSize - 1)) { -+ LOG(4, ("Target name is too long.\n")); -+ return -EINVAL; -+ } -+ -+ fileNameP = (HgfsFileName *)((char *)&request->symlinkName + -+ sizeof request->symlinkName + result); -+ memcpy(fileNameP->name, symname, targetNameBytes); -+ LOG(6, ("Target name: \"%s\"\n", fileNameP->name)); -+ /* Convert target name to CPName-lite format. */ -+ CPNameLite_ConvertTo(fileNameP->name, targetNameBytes - 1, '/'); -+ fileNameP->length = targetNameBytes - 1; - break; - } - default: -@@ -88,59 +133,13 @@ HgfsPackSymlinkCreateRequest(const char* symlink, // IN: path of the link - return -EPROTO; - } - -- -- /* Convert symlink name to CP format. */ -- result = CPName_ConvertTo(symlink, -- HGFS_LARGE_PACKET_MAX - (requestSize - 1), -- symlinkName); -- if (result < 0) { -- LOG(4, ("SymlinkName CP conversion failed.\n")); -- return -EINVAL; -- } -- -- *symlinkNameLength = result; -- req->payloadSize = requestSize + result; -+ req->payloadSize = requestSize; - - /* -- * Note the different buffer length. This is because HgfsRequestSymlink -- * contains two filenames, and once we place the first into the packet we -- * must account for it when determining the amount of buffer available for -- * the second. -- * -- * Also note that targetNameBytes accounts for the NUL character. Once -- * we've converted it to CP name, it won't be NUL-terminated and the length -- * of the string in the packet itself won't account for it. -+ * targetNameBytes accounts for the NUL character. Once we've converted -+ * it to CP name, it won't be NUL-terminated and the length of the string -+ * in the packet itself won't account for it. - */ -- if (opUsed == HGFS_OP_CREATE_SYMLINK_V3) { -- HgfsFileNameV3 *fileNameP; -- fileNameP = (HgfsFileNameV3 *)((char *)&requestV3->symlinkName + -- sizeof requestV3->symlinkName + result); -- targetName = fileNameP->name; -- targetNameLength = &fileNameP->length; -- fileNameP->flags = 0; -- fileNameP->fid = HGFS_INVALID_HANDLE; -- fileNameP->caseType = HGFS_FILE_NAME_CASE_SENSITIVE; -- } else { -- HgfsFileName *fileNameP; -- fileNameP = (HgfsFileName *)((char *)&request->symlinkName + -- sizeof request->symlinkName + result); -- targetName = fileNameP->name; -- targetNameLength = &fileNameP->length; -- } -- targetNameBytes = strlen(symname) + 1; -- -- /* Copy target name into request packet. */ -- if (targetNameBytes > HGFS_LARGE_PACKET_MAX - (requestSize - 1)) { -- LOG(4, ("Target name is too long.\n")); -- return -EINVAL; -- } -- memcpy(targetName, symname, targetNameBytes); -- LOG(6, ("Target name: \"%s\"\n", targetName)); -- -- /* Convert target name to CPName-lite format. */ -- CPNameLite_ConvertTo(targetName, targetNameBytes - 1, '/'); -- -- *targetNameLength = targetNameBytes - 1; - req->payloadSize += targetNameBytes - 1; - - /* Fill in header here as payloadSize needs to be there. */ diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.3.5.bb b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.3.5.bb deleted file mode 100644 index 63a64fc712..0000000000 --- a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.3.5.bb +++ /dev/null @@ -1,108 +0,0 @@ -# This recipe is modified from the recipe originally found in the Open-Switch -# repository: -# -# https://github.com/open-switch/ops-build -# yocto/openswitch/meta-foss-openswitch/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.0.5.bb -# Commit 9008de2d8e100f3f868c66765742bca9fa98f3f9 -# -# The recipe packaging has been relicensed under the MIT license for inclusion -# in meta-openembedded by agreement of the author (Diego Dompe). -# - -SUMMARY = "Tools to enhance VMWare guest integration and performance" -HOMEPAGE = "https://github.com/vmware/open-vm-tools" -SECTION = "vmware-tools" - -LICENSE = "LGPL-2.0 & GPL-2.0 & BSD & CDDL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=559317809c5444fb39ceaf6ac45c43ac" -LICENSE_modules/freebsd/vmblock = "BSD" -LICENSE_modules/freebsd/vmmemctl = "GPL-2.0" -LICENSE_modules/freebsd/vmxnet = "GPL-2.0" -LICENSE_modules/linux = "GPL-2.0" -LICENSE_modules/solaris = "CDDL-1.0" - -SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ - file://tools.conf \ - file://vmtoolsd.service \ - file://vmtoolsd.init \ - file://0001-configure.ac-don-t-use-dnet-config.patch;patchdir=.. \ - file://0002-add-include-sys-sysmacros.h.patch;patchdir=.. \ - file://0003-Use-configure-test-for-struct-timespec.patch;patchdir=.. \ - file://0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch;patchdir=.. \ - file://0005-Use-configure-to-test-for-feature-instead-of-platfor.patch;patchdir=.. \ - file://0006-Use-configure-test-for-sys-stat.h-include.patch;patchdir=.. \ - file://0007-Fix-subdir-objects-configure-error.patch;patchdir=.. \ - file://0008-include-poll.h-instead-of-sys-poll.h.patch;patchdir=.. \ - file://0009-Rename-poll.h-to-vm_poll.h.patch;patchdir=.. \ - file://0010-use-posix-strerror_r-unless-on-gnu-libc-system.patch;patchdir=.. \ - file://0011-Use-uintmax_t-for-handling-rlim_t.patch;patchdir=.. \ - file://0012-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ - file://0013-misc-Do-not-print-NULL-string-into-logs.patch;patchdir=.. \ - file://0014-Fix-new-warnings-from-gcc9.patch;patchdir=.. \ -" -# stable-10.3.5 -SRCREV = "f2ff192717375b95a6b7e278fb47dbb3d3bc56d1" - -S = "${WORKDIR}/git/open-vm-tools" - -DEPENDS = "glib-2.0 glib-2.0-native util-linux libdnet procps libtirpc" - -# open-vm-tools is supported only on x86. -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' - -inherit autotools pkgconfig systemd update-rc.d - -SYSTEMD_SERVICE_${PN} = "vmtoolsd.service" - -EXTRA_OECONF = "--without-icu --disable-multimon --disable-docs \ - --disable-tests --without-gtkmm --without-xerces --without-pam \ - --disable-grabbitmqproxy --disable-vgauth --disable-deploypkg \ - --without-root-privileges --without-kernel-modules" - -NO_X11_FLAGS = "--without-x --without-gtk2 --without-gtk3" -X11_DEPENDS = "libxext libxi libxrender libxrandr libxtst gtk+ gdk-pixbuf" -PACKAGECONFIG[x11] = ",${NO_X11_FLAGS},${X11_DEPENDS}" - -# fuse gets implicitly detected; there is no --without-fuse option. -PACKAGECONFIG[fuse] = ",,fuse" - -CFLAGS_append_toolchain-clang = " -Wno-address-of-packed-member" -FILES_${PN} += "\ - ${libdir}/open-vm-tools/plugins/vmsvc/lib*.so \ - ${libdir}/open-vm-tools/plugins/common/lib*.so \ - ${sysconfdir}/vmware-tools/tools.conf \ -" -FILES_${PN}-locale += "${datadir}/open-vm-tools/messages" -FILES_${PN}-dev += "${libdir}/open-vm-tools/plugins/common/lib*.la" - -CONFFILES_${PN} += "${sysconfdir}/vmware-tools/tools.conf" - -RDEPENDS_${PN} = "util-linux libdnet fuse" - -do_install_append() { - ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs - install -d ${D}${sysconfdir}/vmware-tools - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system - else - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/vmtoolsd.init ${D}${sysconfdir}/init.d/vmtoolsd - fi - install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf -} - -do_configure_prepend() { - export CUSTOM_DNET_NAME=dnet - export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so -} - -INITSCRIPT_PACKAGES = "${PN}" -INITSCRIPT_NAME_${PN} = "vmtoolsd" -INITSCRIPT_PARAMS_${PN} = "start 90 2 3 4 5 . stop 60 0 1 6 ." - -python() { - if 'networking-layer' not in d.getVar('BBFILE_COLLECTIONS').split() or \ - 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): - raise bb.parse.SkipRecipe('Requires meta-networking and meta-filesystems to be present.') -} diff --git a/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb new file mode 100644 index 0000000000..e43a39b613 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb @@ -0,0 +1,107 @@ +# This recipe is modified from the recipe originally found in the Open-Switch +# repository: +# +# https://github.com/open-switch/ops-build +# yocto/openswitch/meta-foss-openswitch/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.0.5.bb +# Commit 9008de2d8e100f3f868c66765742bca9fa98f3f9 +# +# The recipe packaging has been relicensed under the MIT license for inclusion +# in meta-openembedded by agreement of the author (Diego Dompe). +# + +SUMMARY = "Tools to enhance VMWare guest integration and performance" +HOMEPAGE = "https://github.com/vmware/open-vm-tools" +SECTION = "vmware-tools" + +LICENSE = "LGPL-2.0 & GPL-2.0 & BSD & CDDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=559317809c5444fb39ceaf6ac45c43ac" +LICENSE_modules/freebsd/vmblock = "BSD" +LICENSE_modules/freebsd/vmmemctl = "GPL-2.0" +LICENSE_modules/freebsd/vmxnet = "GPL-2.0" +LICENSE_modules/linux = "GPL-2.0" +LICENSE_modules/solaris = "CDDL-1.0" + +SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ + file://tools.conf \ + file://vmtoolsd.service \ + file://vmtoolsd.init \ + file://0001-configure.ac-don-t-use-dnet-config.patch;patchdir=.. \ + file://0002-add-include-sys-sysmacros.h.patch;patchdir=.. \ + file://0003-Use-configure-test-for-struct-timespec.patch;patchdir=.. \ + file://0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch;patchdir=.. \ + file://0005-Use-configure-to-test-for-feature-instead-of-platfor.patch;patchdir=.. \ + file://0006-Use-configure-test-for-sys-stat.h-include.patch;patchdir=.. \ + file://0007-Fix-subdir-objects-configure-error.patch;patchdir=.. \ + file://0008-include-poll.h-instead-of-sys-poll.h.patch;patchdir=.. \ + file://0009-Rename-poll.h-to-vm_poll.h.patch;patchdir=.. \ + file://0010-use-posix-strerror_r-unless-on-gnu-libc-system.patch;patchdir=.. \ + file://0011-Use-uintmax_t-for-handling-rlim_t.patch;patchdir=.. \ + file://0012-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ + file://0013-misc-Do-not-print-NULL-string-into-logs.patch;patchdir=.. \ + file://0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch;patchdir=.. \ +" +SRCREV = "d3edfd142a81096f9f58aff17d84219b457f4987" + +S = "${WORKDIR}/git/open-vm-tools" + +DEPENDS = "glib-2.0 glib-2.0-native util-linux libdnet procps libtirpc" + +# open-vm-tools is supported only on x86. +COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux' + +inherit autotools pkgconfig systemd update-rc.d + +SYSTEMD_SERVICE_${PN} = "vmtoolsd.service" + +EXTRA_OECONF = "--without-icu --disable-multimon --disable-docs \ + --disable-tests --without-gtkmm --without-xerces --without-pam \ + --disable-vgauth --disable-deploypkg \ + --without-root-privileges --without-kernel-modules" + +NO_X11_FLAGS = "--without-x --without-gtk2 --without-gtk3" +X11_DEPENDS = "libxext libxi libxrender libxrandr libxtst gtk+ gdk-pixbuf" +PACKAGECONFIG[x11] = ",${NO_X11_FLAGS},${X11_DEPENDS}" + +# fuse gets implicitly detected; there is no --without-fuse option. +PACKAGECONFIG[fuse] = ",,fuse" + +CFLAGS_append_toolchain-clang = " -Wno-address-of-packed-member" +FILES_${PN} += "\ + ${libdir}/open-vm-tools/plugins/vmsvc/lib*.so \ + ${libdir}/open-vm-tools/plugins/common/lib*.so \ + ${sysconfdir}/vmware-tools/tools.conf \ +" +FILES_${PN}-locale += "${datadir}/open-vm-tools/messages" +FILES_${PN}-dev += "${libdir}/open-vm-tools/plugins/common/lib*.la" + +CONFFILES_${PN} += "${sysconfdir}/vmware-tools/tools.conf" + +RDEPENDS_${PN} = "util-linux libdnet fuse" + +do_install_append() { + ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs + install -d ${D}${sysconfdir}/vmware-tools + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system + else + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/vmtoolsd.init ${D}${sysconfdir}/init.d/vmtoolsd + fi + install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf +} + +do_configure_prepend() { + export CUSTOM_DNET_NAME=dnet + export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so +} + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "vmtoolsd" +INITSCRIPT_PARAMS_${PN} = "start 90 2 3 4 5 . stop 60 0 1 6 ." + +python() { + if 'networking-layer' not in d.getVar('BBFILE_COLLECTIONS').split() or \ + 'filesystems-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-networking and meta-filesystems to be present.') +} -- cgit v1.2.3