Skip to content

Commit

Permalink
Merge pull request #1146 from flatcar/krnowak/vmware-sysext
Browse files Browse the repository at this point in the history
Sysext image for VMware OEM
  • Loading branch information
krnowak authored Sep 25, 2023
2 parents 315d72e + ffe2d0e commit c593d76
Show file tree
Hide file tree
Showing 76 changed files with 1,806 additions and 343 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ dev-libs/jsoncpp
dev-libs/libaio
dev-libs/libassuan
dev-libs/libbsd
dev-libs/libdnet
dev-libs/libgcrypt
dev-libs/libgpg-error
dev-libs/libksba
dev-libs/libltdl
dev-libs/libmspack
dev-libs/libnl
dev-libs/libpcre
dev-libs/libpcre2
Expand All @@ -170,6 +172,7 @@ dev-libs/oniguruma
dev-libs/popt
dev-libs/protobuf
dev-libs/userspace-rcu
dev-libs/xmlsec

dev-perl/File-Slurp
dev-perl/Locale-gettext
Expand Down Expand Up @@ -340,6 +343,7 @@ net-libs/libnsl
net-libs/libpcap
net-libs/libslirp
net-libs/nghttp2
net-libs/rpcsvc-proto

net-misc/bridge-utils
net-misc/curl
Expand Down Expand Up @@ -450,6 +454,8 @@ sys-firmware/sgabios
sys-fs/cryptsetup
sys-fs/dosfstools
sys-fs/e2fsprogs
sys-fs/fuse
sys-fs/fuse-common
sys-fs/lsscsi
sys-fs/mtools
sys-fs/multipath-tools
Expand Down
12 changes: 9 additions & 3 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,23 @@ IMG_vagrant_parallels_OEM_PACKAGE=oem-vagrant
IMG_vmware_DISK_FORMAT=vmdk_scsi
IMG_vmware_DISK_LAYOUT=vm
IMG_vmware_CONF_FORMAT=vmx
IMG_vmware_OEM_PACKAGE=oem-vmware
IMG_vmware_OEM_USE=vmware
IMG_vmware_OEM_PACKAGE=common-oem-files
IMG_vmware_OEM_SYSEXT=oem-vmware

## vmware_ova
IMG_vmware_ova_DISK_FORMAT=vmdk_stream
IMG_vmware_ova_DISK_LAYOUT=vm
IMG_vmware_ova_OEM_PACKAGE=oem-vmware
IMG_vmware_ova_CONF_FORMAT=ovf_vmware
IMG_vmware_ova_BUNDLE_FORMAT=ova
IMG_vmware_ova_OEM_USE=vmware
IMG_vmware_ova_OEM_PACKAGE=common-oem-files
IMG_vmware_ova_OEM_SYSEXT=oem-vmware

## vmware_raw
IMG_vmware_raw_OEM_PACKAGE=oem-vmware
IMG_vmware_raw_OEM_USE=vmware
IMG_vmware_raw_OEM_PACKAGE=common-oem-files
IMG_vmware_raw_OEM_SYSEXT=oem-vmware

## vmware_insecure
IMG_vmware_insecure_DISK_FORMAT=vmdk_scsi
Expand Down
2 changes: 2 additions & 0 deletions changelog/changes/2023-09-20-vmware-sysext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Reworked the VMware OEM software to be shipped as A/B updated systemd-sysext image
- The open-vm-tools package in VMware OEM now comes with vmhgfs-fuse, udev rules, pam and vgauth
2 changes: 2 additions & 0 deletions changelog/updates/2023-09-20-vmware-sysext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- rpcsvc-proto ([1.4.4](https://github.com/thkukuk/rpcsvc-proto/releases/tag/v1.4.4))
- VMWARE: libdnet ([1.16.2](https://github.com/ofalk/libdnet/releases/tag/libdnet-1.16.2) (includes [1.16](https://github.com/ofalk/libdnet/releases/tag/libdnet-1.16))

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From fdf599994d58ef47b73dc94d21d3556a2ec5d9da Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sat, 26 Nov 2016 11:54:33 -0500
Subject: [PATCH] build: drop -Werror

---
open-vm-tools/configure.ac | 1 -
1 file changed, 1 deletion(-)

diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
index 8d4604e8..4d925f22 100644
--- a/open-vm-tools/configure.ac
+++ b/open-vm-tools/configure.ac
@@ -1137,7 +1137,6 @@ AC_C_VOLATILE

### General flags / actions
CFLAGS="$CFLAGS -Wall"
-CFLAGS="$CFLAGS -Werror"

# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
# in Xlib.h on OpenSolaris.
--
2.11.0.rc2

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 08caf83eaa0e66cee8f3e49479cd201a10bb3919 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sat, 25 Sep 2021 21:14:25 -0400
Subject: [PATCH] lib/unicode: add ICU_LIBS to LDADD

---
open-vm-tools/lib/unicode/Makefile.am | 2 ++
1 file changed, 2 insertions(+)

diff --git a/open-vm-tools/lib/unicode/Makefile.am b/open-vm-tools/lib/unicode/Makefile.am
index 4284c51c..40261fba 100644
--- a/open-vm-tools/lib/unicode/Makefile.am
+++ b/open-vm-tools/lib/unicode/Makefile.am
@@ -25,7 +25,9 @@ libUnicode_la_SOURCES += unicodeSimpleTypes.c
libUnicode_la_SOURCES += unicodeSimpleOperations.c
libUnicode_la_SOURCES += unicodeSimpleTransforms.c
libUnicode_la_SOURCES += unicodeStatic.c
+libUnicode_la_LIBADD =

if HAVE_ICU
libUnicode_la_SOURCES += unicodeICU.c
+libUnicode_la_LIBADD += @ICU_LIBS@
endif
--
2.33.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
hgfsmounter "$@" >/dev/null 2>&1 || vmhgfs-fuse "$@"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set this to no to disable drag and drop (and vmblock) loading.
VM_DRAG_AND_DROP="yes"
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

pidfile="/run/vmtoolsd.pid"
command="/usr/bin/vmtoolsd"
command_args="-b ${pidfile}"

vmblockmntpt="/proc/fs/vmblock/mountPoint"
vmblockfusemntpt="/run/vmblock-fuse"

depend() {
before checkfs fsck net X
}

start_vmblock() {
checkpath -d -m 1777 /tmp/VMwareDnD
if command -v vmware-vmblock-fuse > /dev/null; then
modprobe fuse > /dev/null 2>&1
checkpath -d "${vmblockfusemntpt}"
ebegin "Mounting vmblock-fuse"
vmware-vmblock-fuse \
-o subtype=vmware-vmblock,default_permissions,allow_other \
"${vmblockfusemntpt}"
eend $?
else
modprobe vmblock > /dev/null 2>&1
checkpath -d "${vmblockmntpt}"
ebegin "Mounting vmblock"
mount -t vmblock vmblock "${vmblockmntpt}"
eend $?
fi
}

stop_vmblock() {
if [ -d "${vmblockfusemntpt}" ]; then
ebegin "Unmounting vmblock-fuse"
umount "${vmblockfusemntpt}"
eend $?
else
ebegin "Unmounting vmblock"
umount "${vmblockmntpt}"
eend $?
fi
}

start_pre() {
if [ x"${VM_DRAG_AND_DROP}" = xyes ]; then
start_vmblock
fi
return 0
}

stop_post() {
if [ x"${VM_DRAG_AND_DROP}" = xyes ]; then
stop_vmblock
fi
return 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=VGAuth Service for open-vm-tools
Documentation=https://github.com/vmware/open-vm-tools
ConditionVirtualization=vmware
PartOf=vmtoolsd.service

[Service]
# For dev-libs/xerces-c[iconv,-icu]
EnvironmentFile=-/etc/env.d/50xerces-c
ExecStart=/usr/bin/VGAuthService -s
TimeoutStopSec=5

[Install]
RequiredBy=vmtoolsd.service
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[Unit]
Description=VMware Tools Agent
Description=Service for virtual machines hosted on VMware
Documentation=https://github.com/vmware/open-vm-tools
ConditionVirtualization=vmware

[Service]
ExecStartPre=/usr/bin/ln -sfT /oem/vmware-tools /etc/vmware-tools
ExecStart=/oem/bin/vmtoolsd
ExecStart=/usr/bin/vmtoolsd
TimeoutStopSec=5
PrivateTmp=true

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Service for virtual machines hosted on VMware
Documentation=https://github.com/vmware/open-vm-tools
ConditionVirtualization=vmware
Requires=vgauthd.service
After=vgauthd.service

[Service]
ExecStart=/usr/bin/vmtoolsd
TimeoutStopSec=5

[Install]
WantedBy=multi-user.target
Also=vgauthd.service
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>floppym@gentoo.org</email>
<name>Mike Gilbert</name>
</maintainer>
<maintainer type="project">
<email>vmware@gentoo.org</email>
<name>Gentoo VMware Project</name>
</maintainer>
<!-- maintainer-needed -->
<longdescription>
The Open Virtual Machine Tools (open-vm-tools) are the open source
implementation of VMware Tools. They are a set of guest operating system
virtualization components that enhance performance and user experience
of virtual machines.
</longdescription>
<use>
<flag name="caf">Build Common Agent Framework</flag>
<flag name="deploypkg">Build deploypkg plugin</flag>
<flag name="dnet">Enable support for nicinfo</flag>
<flag name="doc">Generate API documentation</flag>
<flag name="fuse">Enable vmblock-fuse/vmhgfs-fuse</flag>
<flag name="grabbitmqproxy">Build grabbitmqproxy plugin</flag>
<flag name="gtkmm">Compile with Gtkmm and sigc++ (Recommended)</flag>
<flag name="multimon">Enable multimon (Requires X)</flag>
<flag name="pic">Force shared libraries to be built as PIC</flag>
<flag name="resolutionkms">Build the linux/unix resolutionkms module</flag>
<flag name="vgauth">Build vgauth</flag>
<flag name="xml-security-c">Build vgauth with xml-security-c instead of xmlsec1</flag>
<flag name="xmlsec">Build vgauth with xmlsec1 instead of xml-security-c</flag>
</use>
<upstream>
<remote-id type="github">vmware/open-vm-tools</remote-id>
<remote-id type="cpe">cpe:/a:vmware:tools</remote-id>
</upstream>
</pkgmetadata>
Loading

0 comments on commit c593d76

Please sign in to comment.