Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop sysroot-wrappers and *-config script wrappers #2207

Merged
merged 8 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build_library/catalyst_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -e
source /tmp/chroot-functions.sh
source /tmp/toolchain_util.sh

ln -vsfT "$(portageq get_repo_path / coreos-overlay)/coreos/user-patches" \
/etc/portage/patches

echo "Double checking everything is fresh and happy."
run_merge -uDN --with-bdeps=y world

Expand Down
1 change: 0 additions & 1 deletion build_library/toolchain_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ install_cross_toolchain() {
# Setup environment and wrappers for our shiny new toolchain
binutils_set_latest_profile "${cross_chost}"
gcc_set_latest_profile "${cross_chost}"
"${sudo[@]}" CC_QUIET=1 sysroot-config --install-links "${cross_chost}"
}

# Build/install toolchain dependencies into the cross sysroot for a
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 <[email protected]>
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

Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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/gdk-pixbuf-xlib
x11-libs/gtk+:3
x11-libs/libSM
x11-libs/libXcomposite
x11-libs/libXext
multimon? ( x11-libs/libXinerama )
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXtst
x11-libs/libSM
x11-libs/libXcomposite
x11-libs/gdk-pixbuf-xlib
x11-libs/gtk+:3
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
}
Expand All @@ -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)
Expand All @@ -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[@]}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ RDEPEND="${RDEPEND}
dev-embedded/u-boot-tools
!arm64? ( sys-boot/syslinux )
sys-devel/crossdev
sys-devel/sysroot-wrappers
sys-fs/dosfstools
"

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The ESYSROOT patch is pending inclusion into Gentoo's gcc patch set. Once
merged, this will most likely be applied from 14.1 or 14.2 onwards. Check the
[GitHub pull request](https://github.com/gentoo/gcc-patches/pull/3) for the
current situation.
chewi marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff -Naur a/gcc/gcc.cc b/gcc/gcc.cc
--- a/gcc/gcc.cc 2024-08-01 23:34:33.525082176 +0100
+++ b/gcc/gcc.cc 2024-08-01 23:43:31.557156041 +0100
@@ -5527,6 +5527,16 @@
"BINUTILS", PREFIX_PRIORITY_LAST, 0, 1);
free (tooldir_prefix);

+ if (*cross_compile == '1' && !target_system_root_changed)
+ {
+ const char *esysroot = env.get("ESYSROOT");
+ if (esysroot && esysroot[0] != '\0' && strcmp(esysroot, "/") != 0 && (!target_system_root || strcmp(esysroot, target_system_root) != 0))
+ {
+ target_system_root = esysroot;
+ target_system_root_changed = 1;
+ }
+ }
+
#if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
/* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix,
then consider it to relocate with the rest of the GCC installation
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ cros_post_src_install_set_up_var_lib_selinux() {
# Source hooks for SLSA build provenance report generation
source "${BASH_SOURCE[0]}.slsa-provenance"

# Insert our sysroot wrappers into the path
SYSROOT_WRAPPERS_BIN="/usr/lib64/sysroot-wrappers/bin"
if [[ "$PATH" != *"$SYSROOT_WRAPPERS_BIN"* ]]; then
export PATH="$SYSROOT_WRAPPERS_BIN:$PATH"
fi

# Improve the chance that ccache is valid across versions by making all
# paths under $S relative to $S, avoiding encoding the package version
# contained in the path into __FILE__ expansions and debug info.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ src_configure() {
--with-distro=defaults
--disable-doc
--disable-nls
KRB5_CONFIG="${ESYSROOT}"/usr/bin/krb5-config
)
econf "${myconf[@]}"
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading