From a9bd6807cd16f71cf95c5d74d0719bdbd8b1e446 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 4 Aug 2024 15:41:34 +0100 Subject: [PATCH] app-emulation/open-vm-tools: Partially sync with Gentoo including cross fixes It was previously relying on xmlsec1-config and dnet-config scripts that we were creating wrappers for. Signed-off-by: James Le Cuirot --- .../files/12.4.5-xmlsec1-pc.patch | 57 +++++++++++++++++++ .../open-vm-tools/open-vm-tools-12.4.5.ebuild | 55 +++++++++--------- 2 files changed, 83 insertions(+), 29 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/12.4.5-xmlsec1-pc.patch diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/12.4.5-xmlsec1-pc.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/12.4.5-xmlsec1-pc.patch new file mode 100644 index 0000000000..9dfaad5e20 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/12.4.5-xmlsec1-pc.patch @@ -0,0 +1,57 @@ +https://github.com/vmware/open-vm-tools/pull/732 + +From 9403500c9aac5be8c38b528e9cc0c711ba2f0151 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 4 Aug 2024 14:53:16 +0100 +Subject: [PATCH 1/2] Also try using pkg-config to detect xmlsec + +The xmlsec1-config script does not help when cross-compiling. pkg-config is +subsequently used for a version detection anyway. +--- + open-vm-tools/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +index 26b2e950..d46a51e2 100644 +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -879,7 +879,7 @@ if test "$enable_vgauth" = "yes" ; then + AC_VMW_DEFAULT_FLAGS([XMLSEC1]) + AC_VMW_CHECK_LIB([xmlsec1], + [XMLSEC1], +- [], ++ [xmlsec1], + [xmlsec1-config], + [], + [xmlsec/xmlsec.h], +-- +2.45.2 + + +From b9f0bb3205039d2fa4e8d1f6d2e4d622f3ef97b1 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 4 Aug 2024 14:54:34 +0100 +Subject: [PATCH 2/2] Respect the $PKG_CONFIG variable when checking the xmlsec + version + +This particularly helps when cross-compiling. +--- + open-vm-tools/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +index d46a51e2..39b9fa9c 100644 +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -884,7 +884,7 @@ if test "$enable_vgauth" = "yes" ; then + [], + [xmlsec/xmlsec.h], + [xmlSecCheckVersionExt], +- [XMLSEC1_VER=`pkg-config --modversion xmlsec1` ++ [XMLSEC1_VER=`$PKG_CONFIG --modversion xmlsec1` + xmlsec1_major_version="`echo $XMLSEC1_VER | cut -f1 -d. | cut -f1 -d-`" + xmlsec1_minor_version="`echo $XMLSEC1_VER | cut -f2 -d. | cut -f1 -d-`" + xmlsec1_micro_version="`echo $XMLSEC1_VER | cut -f3 -d. | cut -f1 -d-`" +-- +2.45.2 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.4.5.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.4.5.ebuild index 47cf815f5f..1e9fc68019 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.4.5.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.4.5.ebuild @@ -1,14 +1,16 @@ -# Copyright 2007-2023 Gentoo Authors +# Copyright 2007-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit autotools linux-info pam systemd udev +MY_P="${P}-23787635" + DESCRIPTION="Tools for VMware guests" HOMEPAGE="https://github.com/vmware/open-vm-tools" -MY_P="${P}-23787635" SRC_URI="https://github.com/vmware/open-vm-tools/releases/download/stable-${PV}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" LICENSE="LGPL-2.1" SLOT="0" @@ -31,57 +33,49 @@ RDEPEND=" fuse3? ( sys-fs/fuse:3 ) pam? ( sys-libs/pam ) !pam? ( virtual/libcrypt:= ) - ssl? ( dev-libs/openssl:0= ) + ssl? ( dev-libs/openssl:= ) vgauth? ( dev-libs/libxml2 dev-libs/xmlsec:= ) X? ( - x11-libs/libXext - multimon? ( x11-libs/libXinerama ) - x11-libs/libXi - x11-libs/libXrender - x11-libs/libXrandr - x11-libs/libXtst - x11-libs/libSM - x11-libs/libXcomposite x11-libs/gdk-pixbuf-xlib x11-libs/gtk+:3 + x11-libs/libSM + x11-libs/libXcomposite + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXtst gtkmm? ( dev-cpp/gtkmm:3.0 dev-libs/libsigc++:2 ) + multimon? ( x11-libs/libXinerama ) ) dnet? ( dev-libs/libdnet ) icu? ( dev-libs/icu:= ) resolutionkms? ( x11-libs/libdrm[video_cards_vmware] virtual/libudev - ) -" - + )" DEPEND="${RDEPEND} - net-libs/rpcsvc-proto -" - + net-libs/rpcsvc-proto" BDEPEND=" dev-util/glib-utils virtual/pkgconfig - doc? ( app-doc/doxygen ) -" - -S="${WORKDIR}/${MY_P}" + doc? ( app-text/doxygen )" PATCHES=( - "${FILESDIR}/10.1.0-Werror.patch" - "${FILESDIR}/11.3.5-icu.patch" + "${FILESDIR}"/10.1.0-Werror.patch + "${FILESDIR}"/11.3.5-icu.patch + "${FILESDIR}"/12.4.5-xmlsec1-pc.patch ) pkg_setup() { - local CONFIG_CHECK="~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3" + local CONFIG_CHECK="~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3 ~VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS ~FUSE_FS" use X && CONFIG_CHECK+=" ~DRM_VMWGFX" - kernel_is -lt 3 9 || CONFIG_CHECK+=" ~VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS" - kernel_is -lt 3 || CONFIG_CHECK+=" ~FUSE_FS" kernel_is -lt 5 5 || CONFIG_CHECK+=" ~X86_IOPL_IOPERM" linux-info_pkg_setup } @@ -95,21 +89,20 @@ src_prepare() { src_configure() { local myeconfargs=( --disable-glibc-check + --disable-tests --without-root-privileges $(use_enable multimon) $(use_with X x) $(use_with X gtk3) $(use_with gtkmm gtkmm3) $(use_enable doc docs) - --disable-tests $(use_enable resolutionkms) - --disable-static $(use_enable deploypkg) $(use_with pam) $(use_enable vgauth) $(use_with dnet) $(use_with icu) - --with-udev-rules-dir="$(get_udevdir)/rules.d" + --with-udev-rules-dir="$(get_udevdir)"/rules.d # Flatcar: TO UPSTREAM: explicitly specify fuse version $(use_with fuse fuse 2) $(use_with fuse3 fuse 3) @@ -127,6 +120,10 @@ src_configure() { # Avoid a bug in configure.ac use ssl || myeconfargs+=( --without-ssl ) + # Avoid relying on dnet-config script, which breaks cross-compiling. This + # library has no pkg-config file. + export CUSTOM_DNET_LIBS="-ldnet" + econf "${myeconfargs[@]}" }