From 1b975523b8d0467b2e3a44097825c30cdc9e3944 Mon Sep 17 00:00:00 2001 From: Erkka Kääriä Date: Fri, 29 Apr 2016 09:48:19 +0300 Subject: java-bootstrapping: Do not rely on hardcoded paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Various paths to files are hardcoded in either helper scripts or the resulting binaries (like path to Java class libraries). While this works well when using the files on the build machine, things start breaking down when the sstate gets shared between multiple workers in CI, as the paths between workers can differ. Instead of using these hardcoded paths, form the paths at runtime and pass them as parameters when required. Signed-off-by: Erkka Kääriä Signed-off-by: Maxin B. John --- ...cacao-0.9.8-do-not-rely-on-absolute-paths.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch (limited to 'recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch') diff --git a/recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch b/recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch new file mode 100644 index 0000000..93bcc3e --- /dev/null +++ b/recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch @@ -0,0 +1,33 @@ +java.in: Do not use hardcode paths + +Cacao uses hardcoded paths to various files, if these paths are not +provided. This causes issues when sharing sstate with otherwise +identical workers, if build time paths are not identical. + +Signed-off-by: Erkka Kääriä + +Upstream-Status: Inappropriate [Yocto-specific fixes] + +--- + cacao-0.98/src/scripts/java.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git cacao-0.98/src/scripts/java.in cacao-0.98/src/scripts/java.in +index 8a402e4..1738897 100644 +--- cacao-0.98/src/scripts/java.in ++++ cacao-0.98/src/scripts/java.in +@@ -32,4 +32,10 @@ + ## + ## $Id: java.in 5659 2006-10-04 10:37:09Z twisti $ + +-exec cacao ${1+"$@"} ++SH_DIR=`dirname "$0"` ++CURRENT_DIR=`cd "${SH_DIR}" && pwd` ++PARENT_DIR=`dirname ${CURRENT_DIR}` ++export BOOTCLASSPATH="${PARENT_DIR}/share/cacao-initial/vm.zip:${PARENT_DIR}/share/classpath-initial/glibj.zip" ++ ++LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath-initial" ++exec cacao ${LIBRARY_PATH} ${1+"$@"} ++ +-- +2.7.4 -- cgit v1.2.3-54-g00ecf