coreos/user-patches: Add a patch for app-emulation/open-vm-tools

This commit is contained in:
Krzesimir Nowak 2023-09-14 15:05:30 +02:00
parent 0336d57627
commit 67a2aa9e73
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 115fca8a25d3705b494f41e59248c2cad17a16cb Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Thu, 14 Sep 2023 14:26:33 +0200
Subject: [PATCH] configure: Use portageq to query the kernel version, rather
than uname
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0b683b86..5985ca0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ AC_ARG_WITH([kernel-release],
[AS_HELP_STRING([--with-kernel-release],
[specifies the kernel release you want to build against])],
[KERNEL_RELEASE="$withval"],
- [KERNEL_RELEASE=`uname -r`])
+ [KERNEL_RELEASE=$(portageq best-version sys-kernel/coreos-kernel | sed -e 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')])
AC_ARG_WITH([linuxdir],
[AS_HELP_STRING([--with-linuxdir],
--
2.25.1

View File

@ -0,0 +1,26 @@
From 115fca8a25d3705b494f41e59248c2cad17a16cb Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Thu, 14 Sep 2023 14:26:33 +0200
Subject: [PATCH] configure: Use portageq to query the kernel version, rather
than uname
---
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 0b683b86..5985ca0a 100644
--- a/open-vm-tools/configure.ac
+++ b/open-vm-tools/configure.ac
@@ -100,7 +100,7 @@ AC_ARG_WITH([kernel-release],
[AS_HELP_STRING([--with-kernel-release],
[specifies the kernel release you want to build against])],
[KERNEL_RELEASE="$withval"],
- [KERNEL_RELEASE=`uname -r`])
+ [KERNEL_RELEASE=$(portageq best-version sys-kernel/coreos-kernel | sed -e 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')])
AC_ARG_WITH([linuxdir],
[AS_HELP_STRING([--with-linuxdir],
--
2.25.1

View File

@ -0,0 +1,11 @@
The patch for configure.ac is not upstreamable at all, we either need
to modify the ebuild or the build system. We went with the latter, so
the ebuild could eventually be moved to portage-stable.
Git repo of open-vm-tools has a different layout of files than the
tarball. The files that are in toplevel directory in tarball (like
`configure.ac`) are inside the `open-vm-tools` directory in the git
repo. Which means that regenerating the user patches made in the git
repo also entails dropping the `open-vm-tools/` prefix from the paths
in the patch. The `.patch.git-orig` files are original patches from
git repo and can be useful for regenerating against a new tag.