diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/Manifest b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/Manifest new file mode 100644 index 0000000000..6bf22a2045 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/Manifest @@ -0,0 +1 @@ +DIST open-vm-tools-9.4.6-1770165.tar.gz 2434586 SHA256 54d7a83d8115124e4b809098b08d7017ba50828801c2f105cdadbc85a064a079 SHA512 a16dc51a51a182031c1849776be9ac0e13bef9d9cb85807e03fbb816d4e9109b64e60f1919f6686a471c79042f30ca93f0193985c2150c6254bc72e3fd8ffa49 WHIRLPOOL 4292b046bcf810c2d4970ecf2da98b49b5a865403a70bd9580e90b79e9c996a0e194c26880a6c391aff0d5cb7204d368b4706ea6147458d146ad8fc890eceb95 diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0001-configure-Add-options-for-fuse-and-hgfs.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0001-configure-Add-options-for-fuse-and-hgfs.patch new file mode 100644 index 0000000000..4cf8c02954 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0001-configure-Add-options-for-fuse-and-hgfs.patch @@ -0,0 +1,53 @@ +From aa50490f8dcb3111f49035bd8ed85bf47f304f31 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Sun, 30 Mar 2014 20:28:05 -0700 +Subject: [PATCH 1/3] configure: Add options for fuse and hgfs + +--- + configure.ac | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 549736f..4964364 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -355,6 +355,13 @@ fi + # + # Check for fuse. + # ++AC_ARG_WITH([fuse], ++ [AS_HELP_STRING([--without-fuse], ++ [compiles without fuse support.])], ++ [], ++ [with_fuse=yes]) ++ ++if test "$with_fuse" = "yes"; then + AC_VMW_CHECK_LIB([fuse], + [FUSE], + [fuse], +@@ -365,6 +372,7 @@ AC_VMW_CHECK_LIB([fuse], + [have_fuse=yes], + [have_fuse=no; + AC_MSG_WARN([Fuse is missing, vmblock-fuse will be disabled.])]) ++fi + + # + # Check for PAM. +@@ -1013,6 +1021,14 @@ if test "$os" = "solaris"; then + fi + fi + ++if test "$buildHgfsmounter" = "yes"; then ++ AC_ARG_ENABLE([hgfs-mounter], ++ [AS_HELP_STRING([--disable-hgfs-mounter], ++ [disables mount.vmhgfs])], ++ [buildHgfsmounter="$enableval"], ++ []) ++fi ++ + AM_CONDITIONAL(BUILD_HGFSMOUNTER, test "$buildHgfsmounter" = "yes") + AM_CONDITIONAL(LINUX, test "$os" = "linux") + AM_CONDITIONAL(SOLARIS, test "$os" = "solaris") +-- +2.0.4 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0002-configure-Fix-USE_SLASH_PROC-conditional.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0002-configure-Fix-USE_SLASH_PROC-conditional.patch new file mode 100644 index 0000000000..4aa6b5148a --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0002-configure-Fix-USE_SLASH_PROC-conditional.patch @@ -0,0 +1,25 @@ +From 64566ff351ec73693b6d9ce498fc94529ea0aca8 Mon Sep 17 00:00:00 2001 +From: Alex Crawford +Date: Fri, 19 Sep 2014 14:52:35 -0700 +Subject: [PATCH 2/3] configure: Fix USE_SLASH_PROC conditional + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4964364..8cd990d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1048,7 +1048,7 @@ AM_CONDITIONAL(HAVE_FUSE, test "$have_fuse" = "yes") + AM_CONDITIONAL(HAVE_GNU_LD, test "$with_gnu_ld" = "yes") + AM_CONDITIONAL(HAVE_GTKMM, test "$have_x" = "yes" -a "$with_gtkmm" = "yes") + AM_CONDITIONAL(HAVE_PAM, test "$with_pam" = "yes") +-AM_CONDITIONAL(USE_SLASH_PROC, test "os" = "linux" -a "$have_glib_2_14" = "yes") ++AM_CONDITIONAL(USE_SLASH_PROC, test "$os" = "linux" -a "$have_glib_2_14" = "yes") + AM_CONDITIONAL(USE_PRINTF_WRAPPERS, test "$bsdPrintfWrappers" = "yes") + + if test "$have_xsm" != "yes"; then +-- +2.0.4 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0003-scripts-Remove-ifup.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0003-scripts-Remove-ifup.patch new file mode 100644 index 0000000000..3263e53d14 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-9.4.6-1770165-0003-scripts-Remove-ifup.patch @@ -0,0 +1,51 @@ +From c6b9d4065538849087482cc41c06bb6d2a74959d Mon Sep 17 00:00:00 2001 +From: Yuya Kusakabe +Date: Wed, 10 Sep 2014 09:11:48 +0900 +Subject: [PATCH 3/3] scripts: Remove ifup + +--- + scripts/linux/network | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/scripts/linux/network b/scripts/linux/network +index af3bc9c..9f32e19 100644 +--- a/scripts/linux/network ++++ b/scripts/linux/network +@@ -21,7 +21,7 @@ + # + # network (Linux) + # +-# Using a combination of a system networking script, ifconfig, and ifup, ++# Using a combination of a system networking script, ifconfig, + # attempt to release and renew DHCP leases upon receipt of suspend and resume + # events, respectively. + # +@@ -130,7 +130,7 @@ save_active_NIC_list() { + # rescue_NIC -- + # + # For each NIC recorded in $activeList that is not currently "up", run +-# "ifup $nic". ++# "ifconfig $nic up". + # + # Results: + # All downed NICs should be active. +@@ -144,7 +144,7 @@ rescue_NIC() { + else + echo `date` "[rescue_nic] activating $nic ..." + +- ifup $nic ++ ifconfig $nic up + exitCode=`expr $exitCode \| $?` + fi + done < $activeList +@@ -268,7 +268,6 @@ main() { + + # XXX Are these really necessary? If so, we should have seen customer + # complaints by now. +- which ifup >/dev/null 2>&1 || Panic "ifup not in search path." + which ifconfig >/dev/null 2>&1 || Panic "ifconfig not in search path." + + case "$1" in +-- +2.0.4 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-9.4.6.1770165.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-9.4.6.1770165.ebuild new file mode 100644 index 0000000000..c2084fa625 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-9.4.6.1770165.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 + +inherit autotools-utils versionator toolchain-funcs + +MY_PV="$(replace_version_separator 3 '-')" +MY_P="${PN}-${MY_PV}" +# Downloads are organized into versioned directories +MY_DIR="${PN}/$(version_format_string 'stable-$1.$2.x')" + +DESCRIPTION="VMware tools for distribution via /usr/share/oem" +HOMEPAGE="http://open-vm-tools.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}/${MY_DIR}/${MY_P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="+dnet +pic" # TODO: pam + +# Dependencies provided by CoreOS, not the OEM: +# dev-libs/glib:2 +# sys-apps/ethtool +# sys-process/procps +# pam? ( virtual/pam ) +RDEPEND=" + dnet? ( dev-libs/libdnet ) +" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/${MY_P}-0001-configure-Add-options-for-fuse-and-hgfs.patch" + "${FILESDIR}/${MY_P}-0002-configure-Fix-USE_SLASH_PROC-conditional.patch" + "${FILESDIR}/${MY_P}-0003-scripts-Remove-ifup.patch" +) + +#pkg_setup() { +# enewgroup vmware +#} + +src_prepare() { + autotools-utils_src_prepare +} + +# Override configure's use of pkg-config to ensure ${SYSROOT} is respected. +override_vmw_check_lib() { + local lib="$1" + local var="$2" + local pkgconfig="$(tc-getPKG_CONFIG)" + export "CUSTOM_${var}_CPPFLAGS=$(${pkgconfig} --cflags ${lib})" + export "CUSTOM_${var}_LIBS=$(${pkgconfig} --libs ${lib})" +} + +src_configure() { + # libdnet is installed to /usr/share/oem + export CUSTOM_DNET_CPPFLAGS="-I${SYSROOT}/usr/share/oem/include" + export CUSTOM_DNET_LIBS="-L${SYSROOT}/usr/share/oem/lib64" + + # >=sys-process/procps-3.3.2 not handled by configure + export CUSTOM_PROCPS_NAME=procps + override_vmw_check_lib libprocps PROCPS + + # for everything else configure is still wrong because it calls + # pkg-config directly instead of favoring the ${CHOST}-pkg-config + # wrapper or using the standard autoconf macro. + override_vmw_check_lib glib-2.0 GLIB2 + override_vmw_check_lib gmodule-2.0 GMODULE + override_vmw_check_lib gobject-2.0 GOBJECT + override_vmw_check_lib gthread-2.0 GTHREAD + + local myeconfargs=( + --prefix=/usr/share/oem + --disable-docs + --disable-hgfs-mounter + --disable-multimon + --disable-tests + --with-procps + --without-fuse + --without-icu + --without-kernel-modules + --without-pam + --without-x + $(use_with dnet) + $(use_with pic) + ) + # TODO: $(use_with pam) + + econf "${myeconfargs[@]}" + + # Bugs 260878, 326761 + find ./ -name Makefile | xargs sed -i -e 's/-Werror//g' || die "sed out Werror failed" +} + +src_install() { + # Relocate event scripts, a symlink will be created by cloudinit. + emake DESTDIR="${D}" confdir=/usr/share/oem/vmware-tools install + + rm "${D}"/etc/pam.d/vmtoolsd + # TODO: pamd_mimic_system vmtoolsd auth account + + # We never bother with i10n on CoreOS + rm -rf "${D}"/usr/share/open-vm-tools +}