mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-20 22:11:39 +02:00
Merge pull request #907 from marineam/open-vm-tools
VMware OEM and open-vm-tools
This commit is contained in:
commit
bdb2556467
1
sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/Manifest
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/Manifest
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
DIST open-vm-tools-9.4.6-1770165.tar.gz 2434586 SHA256 54d7a83d8115124e4b809098b08d7017ba50828801c2f105cdadbc85a064a079 SHA512 a16dc51a51a182031c1849776be9ac0e13bef9d9cb85807e03fbb816d4e9109b64e60f1919f6686a471c79042f30ca93f0193985c2150c6254bc72e3fd8ffa49 WHIRLPOOL 4292b046bcf810c2d4970ecf2da98b49b5a865403a70bd9580e90b79e9c996a0e194c26880a6c391aff0d5cb7204d368b4706ea6147458d146ad8fc890eceb95
|
3
sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/README
vendored
Normal file
3
sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/README
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
When updating the version of open-vm-tools the ebuild version of
|
||||||
|
oem-vmware must be updated to match as well. That way the reported "OEM"
|
||||||
|
version directly reflects the installed tools.
|
@ -0,0 +1,53 @@
|
|||||||
|
From aa50490f8dcb3111f49035bd8ed85bf47f304f31 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Marineau <mike@marineau.org>
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
From 64566ff351ec73693b6d9ce498fc94529ea0aca8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alex Crawford <alex.crawford@coreos.com>
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,51 @@
|
|||||||
|
From c6b9d4065538849087482cc41c06bb6d2a74959d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yuya Kusakabe <yuya.kusakabe@gmail.com>
|
||||||
|
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
|
||||||
|
|
@ -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
|
||||||
|
}
|
1
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/README
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/README
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
The OEM version should match the current version of open-vm-tools.
|
21
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/cloud-config.yml
vendored
Normal file
21
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/cloud-config.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#cloud-config
|
||||||
|
|
||||||
|
coreos:
|
||||||
|
units:
|
||||||
|
- name: vmtoolsd.service
|
||||||
|
command: start
|
||||||
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Description=VMware Tools Agent
|
||||||
|
Documentation=http://open-vm-tools.sourceforge.net/
|
||||||
|
ConditionVirtualization=vmware
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStartPre=/usr/bin/ln -sfT /usr/share/oem/vmware-tools /etc/vmware-tools
|
||||||
|
ExecStart=/usr/share/oem/bin/vmtoolsd
|
||||||
|
TimeoutStopSec=5
|
||||||
|
oem:
|
||||||
|
bug-report-url: "https://github.com/coreos/bugs/issues"
|
||||||
|
id: vmware
|
||||||
|
name: VMWare
|
||||||
|
version-id: "@@OEM_VERSION_ID@@"
|
31
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-9.4.6.ebuild
vendored
Normal file
31
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-9.4.6.ebuild
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Copyright (c) 2014 CoreOS, Inc.. All rights reserved.
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
DESCRIPTION="OEM suite for VMware"
|
||||||
|
HOMEPAGE="https://github.com/coreos/coreos-overlay/tree/master/coreos-base"
|
||||||
|
SRC_URI=""
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
app-emulation/open-vm-tools
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
# no source directory
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \
|
||||||
|
"${FILESDIR}"/cloud-config.yml > ${T}/cloud-config.yml || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
insinto "/usr/share/oem"
|
||||||
|
doins "${T}/cloud-config.yml"
|
||||||
|
}
|
@ -15,6 +15,7 @@ IUSE=""
|
|||||||
|
|
||||||
DEPEND=""
|
DEPEND=""
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
|
app-emulation/open-vm-tools
|
||||||
coreos-base/coreos
|
coreos-base/coreos
|
||||||
coreos-base/coreos-dev
|
coreos-base/coreos-dev
|
||||||
dev-lang/python-oem
|
dev-lang/python-oem
|
||||||
|
2
sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/Manifest
vendored
Normal file
2
sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/Manifest
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DIST libdnet-1.12.ipv6-1.patch.gz 5124 SHA256 5e646901ae13d8aa47f0c5c063b86ecccb90780f9e3734cdbabf7a2d472c39ac SHA512 fa2380e41548ecdd978722930ecf90dffabd15cf06cbae0e113285072fe98a066f1e686b6d79e2d8b9f8adcf29783f313d61933b9e1e74e71da8dc7d741f815a WHIRLPOOL 27f356053749e1abdab24bd420f22e380e0970f7a2926474482a2e2532d1d8561f4b48d0eb243b5a62777543b3644adafd3cead4cc09f21d6cb5391a0b7e00f2
|
||||||
|
DIST libdnet-1.12.tgz 970125 SHA256 83b33039787cf99990e977cef7f18a5d5e7aaffc4505548a83d31bd3515eb026 SHA512 b763d2caa77b8d16b531142a5bce3b862ed20198406a00e1fe7f3b45ce308b97d638b0c7f03bd8593fdd206cc1645952839bc340b77537298a3df88599835bf3 WHIRLPOOL 9e5b3a217bfef840ca0ed936dbc3573e51a9283a5a7d3ffd43606b98e8760586196261f34a2508cdcf9f868ccd08c9fd1d499252c9a43bb2f71a5b7b2c00c13e
|
54
sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/libdnet-1.12.ebuild
vendored
Normal file
54
sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/libdnet-1.12.ebuild
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# Copyright 1999-2014 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libdnet/libdnet-1.12.ebuild,v 1.20 2014/02/09 08:22:34 kumba Exp $
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
AT_M4DIR="config"
|
||||||
|
|
||||||
|
inherit autotools eutils
|
||||||
|
|
||||||
|
DESCRIPTION="simplified network library for /usr/share/oem"
|
||||||
|
HOMEPAGE="http://code.google.com/p/libdnet/"
|
||||||
|
SRC_URI="http://libdnet.googlecode.com/files/${P}.tgz
|
||||||
|
ipv6? ( http://fragroute-ipv6.googlecode.com/files/${P}.ipv6-1.patch.gz )"
|
||||||
|
|
||||||
|
LICENSE="LGPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
|
||||||
|
IUSE="ipv6 static-libs test"
|
||||||
|
|
||||||
|
#DEPEND="test? ( dev-libs/check )"
|
||||||
|
DEPEND=""
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
DOCS=( README THANKS TODO )
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Useless copy
|
||||||
|
rm -r trunk/ || die
|
||||||
|
|
||||||
|
sed -i \
|
||||||
|
-e 's/libcheck.a/libcheck.so/g' \
|
||||||
|
-e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
|
||||||
|
configure.in || die
|
||||||
|
sed -i -e 's|-L@libdir@ ||g' dnet-config.in || die
|
||||||
|
use ipv6 && epatch "${WORKDIR}/${P}.ipv6-1.patch"
|
||||||
|
sed -i -e '/^SUBDIRS/s|python||g' Makefile.am || die
|
||||||
|
eautoreconf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# Install into OEM, don't bother with a sbin directory.
|
||||||
|
econf \
|
||||||
|
--prefix=/usr/share/oem \
|
||||||
|
--sbindir=/usr/share/oem/bin \
|
||||||
|
--without-python \
|
||||||
|
$(use_enable static-libs static)
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
default
|
||||||
|
prune_libtool_files
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user