Skip to contentSkip to conversation

buildtools-extended-tarball: add recipe with build-essentials

PATCH New Richard Purdie 1 participant 22 messages Sep 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/22 buildtools-extended-tarball: add recipe with build-essentials

From: Tim Orling <[email protected]>

* For some aging distros, such as CentOS 7, the native version of gcc is simply too ancient and is a constant source of headaches for moving forward.

* Add an extended version of buildtools-tarball which adds all of build-essential, so that the host is now modernized and capable of compiling the latest versions of components.

Fixes [YOCTO #13714]

(From OE-Core rev: f0377af2325613b63716b0bb4db1ab253d79f388)

(From OE-Core rev: bb4979f0e8367b475cc9a5274933a61bb0eb64b3)

---
 .../meta/buildtools-extended-tarball.bb       | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 meta/recipes-core/meta/buildtools-extended-tarball.bb
meta/recipes-core/meta/buildtools-extended-tarball.bb new file +32 -0
new file mode 100644
index 00000000000..d756036373e
@@ -0,0 +1,32 @@
+require recipes-core/meta/buildtools-tarball.bb
+
+DESCRIPTION = "SDK type target for building a standalone tarball containing build-essentials, python3, chrpath, \
+               make, git and tar. The tarball can be used to run bitbake builds on systems which don't meet the \
+               usual version requirements and have ancient compilers."
+SUMMARY = "Standalone tarball for running builds on systems with inadequate software and ancient compilers"
+LICENSE = "MIT"
+
+# Add nativesdk equivalent of build-essentials
+TOOLCHAIN_HOST_TASK += "\
+    nativesdk-automake \
+    nativesdk-autoconf \
+    nativesdk-binutils \
+    nativesdk-binutils-symlinks \
+    nativesdk-cpp \
+    nativesdk-cpp-symlinks \
+    nativesdk-gcc \
+    nativesdk-gcc-symlinks \
+    nativesdk-g++ \
+    nativesdk-g++-symlinks \
+    nativesdk-gettext \
+    nativesdk-libatomic \
+    nativesdk-libgcc \
+    nativesdk-libstdc++ \
+    nativesdk-libstdc++-dev \
+    nativesdk-libtool \
+    nativesdk-pkgconfig \
+    "
+
+TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-extended-nativesdk-standalone-${DISTRO_VERSION}"
+
+SDK_TITLE = "Extended Build tools"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/22 buildtools-tarball: Add an ld.so.conf for nativesdk-binutils

We need to search our own libdirs, then fall back to the system ones as our customised dynamic loader will. Have ld.so.conf reflect that.

This ensures that binutils finds libraries here when linking too.

(From OE-Core rev: ab729c362684474a8346e5256d636200826feb47)

---
 meta/recipes-core/meta/buildtools-tarball.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-core/meta/buildtools-tarball.bb +4 -0
index 91df6f1ae9f..eca9f1c0e1f 100644
@@ -73,6 +73,10 @@ create_sdk_files_append () {
 
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
 
+	mkdir -p ${SDK_OUTPUT}/${SDKPATHNATIVE}${sysconfdir}/
+	echo '${SDKPATHNATIVE}${libdir}
+${SDKPATHNATIVE}${base_libdir}
+include /etc/ld.so.conf' > ${SDK_OUTPUT}/${SDKPATHNATIVE}${sysconfdir}/ld.so.conf
 	if [ "${SDKMACHINE}" = "i686" ]; then
 		echo 'export NO32LIBS="0"' >>$script
 		echo 'echo "$BB_ENV_EXTRAWHITE" | grep -q "NO32LIBS"' >>$script
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/22 binutils: Fix relocation of ld.so.conf in nativesdk builds

In reply to Richard Purdie

We need binutils to look at our ld.so.conf file within the SDK to ensure we search the SDK's libdirs as well as those from the host system.

There add a patch which passes in the directory to the code using a define, then add it to a section we relocate in a similar way to the way we relocate the gcc internal paths. This ensures that ld works correctly in our buildtools tarball.

Standard sysroot relocation doesn't work since we're not in a sysroot, we want to use both the host system and SDK libs.

(From OE-Core rev: f6c1089642934ad93056ef19a0888965486ee030)

(From OE-Core rev: 09a2b16ac2bd1e3e415131e46315c851373aa7e0)

---
 .../binutils/nativesdk-relocation.patch       | 80 +++++++++++++++++++
 .../binutils/binutils_2.32.bb                 |  2 +
 2 files changed, 82 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/nativesdk-relocation.patch
meta/recipes-devtools/binutils/binutils/nativesdk-relocation.patch new file +80 -0
new file mode 100644
index 00000000000..408f7d18b76
@@ -0,0 +1,80 @@
+We need binutils to look at our ld.so.conf file within the SDK to ensure 
+we search the SDK's libdirs as well as those from the host system.
+
+We therefore pass in the directory to the code using a define, then add
+it to a section we relocate in a similar way to the way we relocate the
+gcc internal paths. This ensures that ld works correctly in our buildtools
+tarball.
+
+Standard sysroot relocation doesn't work since we're not in a sysroot, 
+we want to use both the host system and SDK libs.
+
+Signed-off-by: Richard Purdie <[email protected]>
+2020/1/17
+Upstream-Status: Inappropriate [OE specific tweak]
+
+Index: git/ld/Makefile.am
+===================================================================
+--- git.orig/ld/Makefile.am
++++ git/ld/Makefile.am
+@@ -36,7 +36,8 @@ am__skipyacc =
+ 
+ ELF_CLFAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
+ 	   -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
+-	   -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
++	   -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
++           -DSYSCONFDIR="\"$(sysconfdir)\""
+ WARN_CFLAGS = @WARN_CFLAGS@
+ NO_WERROR = @NO_WERROR@
+ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+Index: git/ld/Makefile.in
+===================================================================
+--- git.orig/ld/Makefile.in
++++ git/ld/Makefile.in
+@@ -546,7 +546,8 @@ am__skiplex =
+ am__skipyacc = 
+ ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
+ 	   -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
+-	   -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
++	   -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
++           -DSYSCONFDIR="\"$(sysconfdir)\""
+ 
+ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+ @ENABLE_PLUGINS_FALSE@PLUGIN_C = 
+Index: git/ld/emultempl/elf32.em
+===================================================================
+--- git.orig/ld/emultempl/elf32.em
++++ git/ld/emultempl/elf32.em
+@@ -1024,7 +1024,7 @@ gld${EMULATION_NAME}_check_ld_so_conf (c
+ 
+       info.path = NULL;
+       info.len = info.alloc = 0;
+-      tmppath = concat (ld_sysroot, "${prefix}/etc/ld.so.conf",
++      tmppath = concat (ld_sysconfdir, "/ld.so.conf",
+ 			(const char *) NULL);
+       if (!gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath))
+ 	{
+Index: git/ld/ldmain.c
+===================================================================
+--- git.orig/ld/ldmain.c
++++ git/ld/ldmain.c
+@@ -68,6 +68,7 @@ char *program_name;
+ 
+ /* The prefix for system library directories.  */
+ const char *ld_sysroot;
++char ld_sysconfdir[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSCONFDIR;
+ 
+ /* The canonical representation of ld_sysroot.  */
+ char *ld_canon_sysroot;
+Index: git/ld/ldmain.h
+===================================================================
+--- git.orig/ld/ldmain.h
++++ git/ld/ldmain.h
+@@ -23,6 +23,7 @@
+ 
+ extern char *program_name;
+ extern const char *ld_sysroot;
++extern char ld_sysconfdir[4096];
+ extern char *ld_canon_sysroot;
+ extern int ld_canon_sysroot_len;
+ extern FILE *saved_script_handle;
meta/recipes-devtools/binutils/binutils_2.32.bb +2 -0
index 51a9748906a..3dcc837c787 100644
@@ -46,4 +46,6 @@ do_install_class-native () {
 PACKAGE_BEFORE_PN += "libbfd"
 FILES_libbfd = "${libdir}/libbfd-*.so"
 
+SRC_URI_append_class-nativesdk =  "file://nativesdk-relocation.patch"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
#3 lore raw

PATCH 4/22 binutils: Install non-alternatives links for nativesdk

In reply to Richard Purdie

In the SDK we need the plain symlinks and don't use alternative providers. When these are missing the toolchain can work incorrectly so fix this.

(From OE-Core rev: 0c06cfaa016d06cc56d80dc1c244a938f3d38a3c)

(From OE-Core rev: 0d299c5dc04407d2d54574157f4014f50f2d0468)

---
 meta/recipes-devtools/binutils/binutils_2.32.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/binutils/binutils_2.32.bb +3 -0
index 3dcc837c787..625e18c787f 100644
@@ -48,4 +48,7 @@ FILES_libbfd = "${libdir}/libbfd-*.so"
 
 SRC_URI_append_class-nativesdk =  "file://nativesdk-relocation.patch"
 
+USE_ALTERNATIVES_FOR_class-nativesdk = ""
+FILES_${PN}_append_class-nativesdk = " ${bindir}"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
#4 lore raw

PATCH 5/22 files/toolchain-shar-extract.sh: Rework PATH cleaning

In reply to Richard Purdie

Trying to create a clean PATH breaks cases where we install a buildtools tarball on hosts to provide newer versions of gcc. Rework the fix for #8698 to clean up directories in PATH which don't exist isntead. Do it with python as the shell version was too fraught with corner cases.

(From OE-Core rev: 7674b63819aa7ca95ca5ca5477a5cce32e9691eb)

(From OE-Core rev: 9825236deacf6eb311121d233435a46288c02cdb)

---
 meta/files/toolchain-shar-extract.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
meta/files/toolchain-shar-extract.sh +3 -8
index 156085b5003..d9112eab72b 100644
@@ -1,13 +1,8 @@
 #!/bin/sh
 
-[ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 HOME="$HOME" \
-	LC_ALL=en_US.UTF-8 \
-	TERM=$TERM \
-	ICECC_PATH="$ICECC_PATH" \
-	http_proxy="$http_proxy" https_proxy="$https_proxy" ftp_proxy="$ftp_proxy" \
-	no_proxy="$no_proxy" all_proxy="$all_proxy" GIT_PROXY_COMMAND="$GIT_PROXY_COMMAND" "$0" "$@"
-[ -f /etc/environment ] && . /etc/environment
-export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'`
+export LC_ALL=en_US.UTF-8
+# Remove invalid PATH elements first (maybe from a previously setup toolchain now deleted
+PATH=`python3 -c 'import os; print(":".join(e for e in os.environ["PATH"].split(":") if os.path.exists(e)))'`
 
 tweakpath () {
     case ":${PATH}:" in
Signature · 1 line
2.25.1
#5 lore raw

PATCH 6/22 buildtools-extended-tarball: Add locale command

In reply to Richard Purdie

The eSDK installation code checks installed locales with the locale command which is from glibc-utils. Add this so that we find the correct locales from the buildtools.

(From OE-Core rev: 7d35e4bc6ff94a2d03c48827d7d60a6855c9029d)

(From OE-Core rev: d99b6432decec0964ac0e08698abc782c9b114f5)

---
 meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/buildtools-extended-tarball.bb +1 -0
index d756036373e..5a781730ed7 100644
@@ -25,6 +25,7 @@ TOOLCHAIN_HOST_TASK += "\
     nativesdk-libstdc++-dev \
     nativesdk-libtool \
     nativesdk-pkgconfig \
+    nativesdk-glibc-utils \
     "
 
 TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-extended-nativesdk-standalone-${DISTRO_VERSION}"
Signature · 1 line
2.25.1
#6 lore raw

PATCH 7/22 nativesdk-buildtools-perl-dummy: add dependencies for autoconf and automake

In reply to Richard Purdie

From: Tim Orling <[email protected]>

* For buildtools-extended-tarball, where we are adding all of build-essentials to the nativesdk, we need additional perl modules for autoconf and automake.

(From OE-Core rev: f0f766160663407ea7683d31bbf5f011accc9ba2)

(From OE-Core rev: e7ade58a7da52ebb40120020dd86dd3ae9b2148e)

---
 meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb +3 -0
index 6a8748acdfe..ee7d7cd6606 100644
@@ -15,12 +15,15 @@ DUMMYPROVIDES = "\
     nativesdk-perl-module-file-find \
     nativesdk-perl-module-file-glob \
     nativesdk-perl-module-file-path \
+    nativesdk-perl-module-file-spec \
     nativesdk-perl-module-file-stat \
     nativesdk-perl-module-getopt-long \
     nativesdk-perl-module-io-file \
+    nativesdk-perl-module-overloading \
     nativesdk-perl-module-posix \
     nativesdk-perl-module-thread-queue \
     nativesdk-perl-module-threads \
+    nativesdk-perl-module-warnings \
     /usr/bin/perl \
     "
 
Signature · 1 line
2.25.1
#7 lore raw

PATCH 8/22 buildtools-extended-tarball: Add libstc++.a

In reply to Richard Purdie

From: Jeremy Puhlman <[email protected]>

Builds like native-openjdk, really wants a to link some tools against the static version. Since when using the extended tarball, its the only place to get it, add the library.

(From OE-Core rev: 59c4a3fdbbfd5a6aaba7e0a1675dcd5866a7f3a4)

(From OE-Core rev: 152709dec03bbac582ca63b65f2efb835e0b33fb)

---
 meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/buildtools-extended-tarball.bb +1 -0
index 5a781730ed7..37f97056139 100644
@@ -23,6 +23,7 @@ TOOLCHAIN_HOST_TASK += "\
     nativesdk-libgcc \
     nativesdk-libstdc++ \
     nativesdk-libstdc++-dev \
+    nativesdk-libstdc++-staticdev \
     nativesdk-libtool \
     nativesdk-pkgconfig \
     nativesdk-glibc-utils \
Signature · 1 line
2.25.1
#8 lore raw

PATCH 9/22 buildtools-tarball: export OPENSSL_CONF for openssl

In reply to Richard Purdie

From: Liwei Song <[email protected]>

export OPENSSL_CONF to aviod SDK openssl can not find openssl.cnf.

(From OE-Core rev: 0aaf3dd17dcde959e9c0d62543cb91c9b33551b4)

(From OE-Core rev: 63d8569b2c9f66e8123e2672a7f8fb8e7cc1f0b4)

---
 meta/recipes-core/meta/buildtools-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/buildtools-tarball.bb +1 -0
index eca9f1c0e1f..95ebda7fa15 100644
@@ -72,6 +72,7 @@ create_sdk_files_append () {
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+	echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
 
 	mkdir -p ${SDK_OUTPUT}/${SDKPATHNATIVE}${sysconfdir}/
 	echo '${SDKPATHNATIVE}${libdir}
Signature · 1 line
2.25.1
#9 lore raw

PATCH 10/22 buildtools-tarball: export OPENSSL_CONF in environment setup

In reply to Richard Purdie

From: Steve Sakoman <[email protected]>

The autobuilder has been experiencing SSL: CERTIFICATE_VERIFY_FAILED errors during error report uploads when using buildtools due to looking for certs in /opt/poky

(From OE-Core rev: 197f1d5d14b8e57295f5a81c03c86abba5328614)

(From OE-Core rev: 35c6ab2501672083cf8b974d8b9c3daa3202de36)

---
 meta/recipes-core/meta/buildtools-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/buildtools-tarball.bb +1 -0
index 95ebda7fa15..aba10b4cd69 100644
@@ -72,6 +72,7 @@ create_sdk_files_append () {
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+	echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
 	echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script
 
 	mkdir -p ${SDK_OUTPUT}/${SDKPATHNATIVE}${sysconfdir}/
Signature · 1 line
2.25.1
#10 lore raw

PATCH 11/22 buildtools-tarball: add nativesdk-python

In reply to Richard Purdie

From: Jeremy Puhlman <[email protected]>

(From OE-Core rev: 6467eb4461f3cab16cab2ba63154c92fc2adacef)

---
 meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/buildtools-extended-tarball.bb +1 -0
index 37f97056139..32a10198c93 100644
@@ -27,6 +27,7 @@ TOOLCHAIN_HOST_TASK += "\
     nativesdk-libtool \
     nativesdk-pkgconfig \
     nativesdk-glibc-utils \
+    nativesdk-python \
     "
 
 TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-extended-nativesdk-standalone-${DISTRO_VERSION}"
Signature · 1 line
2.25.1
#11 lore raw

PATCH 12/22 glibc: Update nativesdk locale relocation patch

In reply to Richard Purdie

The locale binary reported incorrect locale lists in relocated toolchains as some path references were not relocated by this patch. Fix this missing relocations so the locale binary correctly reports the locales.

(From OE-Core rev: f7a6a72880009380ae81bc7fc863921a26811c8c)

(From OE-Core rev: e4c4337e642f565e9988a4a2c50a995090d1f49e)

---
 ...Make-relocatable-install-for-locales.patch | 34 +++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)
meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Make-relocatable-install-for-locales.patch +32 -2
index 9f9f503a1e2..6e5085b9c90 100644
@@ -65,6 +65,36 @@ index 7c1cc3eecb..53cb8bfc59 100644
  
  /* Load the locale data for CATEGORY from the file specified by *NAME.
     If *NAME is "", use environment variables as specified by POSIX, and
--- 
-2.20.1
+Index: git/locale/programs/locale.c
+===================================================================
+--- git.orig/locale/programs/locale.c
++++ git/locale/programs/locale.c
+@@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b
+ 		  ((const struct nameent *) b)->name);
+ }
+ 
++static char _write_archive_locales_path[4096] attribute_hidden __attribute__ ((section (".gccrelocprefix"))) = ARCHIVE_NAME;
+ 
+ static int
+ write_archive_locales (void **all_datap, char *linebuf)
+@@ -645,7 +646,7 @@ write_archive_locales (void **all_datap,
+   int fd, ret = 0;
+   uint32_t cnt;
+ 
+-  fd = open64 (ARCHIVE_NAME, O_RDONLY);
++  fd = open64 (_write_archive_locales_path, O_RDONLY);
+   if (fd < 0)
+     return 0;
+ 
+@@ -700,8 +701,8 @@ write_archive_locales (void **all_datap,
+ 	  if (cnt)
+ 	    putchar_unlocked ('\n');
+ 
+-	  printf ("locale: %-15.15s archive: " ARCHIVE_NAME "\n%s\n",
+-		  names[cnt].name, linebuf);
++	  printf ("locale: %-15.15s archive: %s\n%s\n",
++		  names[cnt].name, _write_archive_locales_path, linebuf);
+ 
+ 	  locrec = (struct locrecent *) (addr + names[cnt].locrec_offset);
+ 
 
Signature · 1 line
2.25.1
#12 lore raw

PATCH 13/22 buildtools-extended-tarball: add nativesdk-libxcrypt-dev

In reply to Richard Purdie

From: Jeremy Puhlman <[email protected]>

virtual/crypt-native is assume provided in bitbake.conf, so buildtools-extended-tarball shoud provide crypt since it doesn't use the host's headers/libraries.

[YOCTO #13714]

(From OE-Core rev: da948b25d5ef452fb35275d108e18d2a2829f4fb)

(From OE-Core rev: bc42406d83310398bc4d4db4244252411eff117d)

---
 meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/meta/buildtools-extended-tarball.bb +1 -0
index 32a10198c93..94ed57585b7 100644
@@ -28,6 +28,7 @@ TOOLCHAIN_HOST_TASK += "\
     nativesdk-pkgconfig \
     nativesdk-glibc-utils \
     nativesdk-python \
+    nativesdk-libxcrypt-dev \
     "
 
 TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-extended-nativesdk-standalone-${DISTRO_VERSION}"
Signature · 1 line
2.25.1
#13 lore raw

PATCH 14/22 uninative: Upgrade to 2.9

In reply to Richard Purdie

From: Khem Raj <[email protected]>

This supports glibc upto 2.32 which is now rolling into distributions

(From OE-Core rev: 622371678ddb013fc456eaf75def26fc4e142d15)

---
 meta/conf/distro/include/yocto-uninative.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/conf/distro/include/yocto-uninative.inc +5 -5
index 889695eae34..69b6edee5f7 100644
@@ -6,9 +6,9 @@
 # to the distro running on the build machine.
 #
 
-UNINATIVE_MAXGLIBCVERSION = "2.31"
+UNINATIVE_MAXGLIBCVERSION = "2.32"
 
-UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/2.8/"
-UNINATIVE_CHECKSUM[aarch64] ?= "989187344bf9539b464fb7ed9c223e51f4bdb4c7a677d2c314e6fed393176efe"
-UNINATIVE_CHECKSUM[i686] ?= "cc3e45bc8594488b407363e3fa9af5a099279dab2703c64342098719bd674990"
-UNINATIVE_CHECKSUM[x86_64] ?= "a09922172c3a439105e0ae6b943daad2d83505b17da0aba97961ff433b8c21ab"
+UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/2.9/"
+UNINATIVE_CHECKSUM[aarch64] ?= "9f25a667aee225b1dd65c4aea73e01983e825b1cb9b56937932a1ee328b45f81"
+UNINATIVE_CHECKSUM[i686] ?= "cae5d73245d95b07cf133b780ba3f6c8d0adca3ffc4e7e7fab999961d5e24d36"
+UNINATIVE_CHECKSUM[x86_64] ?= "d07916b95c419c81541a19c8ef0ed8cbd78ae18437ff28a4c8a60ef40518e423"
Signature · 1 line
2.25.1
#14 lore raw

PATCH 15/22 oeqa/testsdk: Use original PATH

In reply to Richard Purdie

We want to test the SDK with PATH from the original host, not with our own tools injected via HOSTTOOLS. It even uses some tools which aren't in HOSTTOOLS.

This is necessary after changing the SDK to not reset PATH to the system default which is bad for other reasons and brings the testing into sync with that change.

(From OE-Core rev: 87c9602fd0dedc7bcf75b822aaf5f6ebfc17737c)

(From OE-Core rev: de3f405b6cf96311ced86bccf7202370e4d1481a)

---
 meta/lib/oeqa/sdkext/testsdk.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/lib/oeqa/sdkext/testsdk.py +2 -5
index 785b5dda53a..c5c46df6cda 100644
@@ -25,11 +25,8 @@ class TestSDKExt(TestSDKBase):
 
         subprocesstweak.errors_have_output()
 
-        # extensible sdk can be contaminated if native programs are
-        # in PATH, i.e. use perl-native instead of eSDK one.
-        paths_to_avoid = [d.getVar('STAGING_DIR'),
-                        d.getVar('BASE_WORKDIR')]
-        os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
+        # We need the original PATH for testing the eSDK, not with our manipulations
+        os.environ['PATH'] = d.getVar("BB_ORIGENV", False).getVar("PATH")
 
         tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
         if not os.path.exists(tcname):
Signature · 1 line
2.25.1
#15 lore raw

PATCH 16/22 oeqa/selftest: Ensure buildtools in environment variables isn't replaced

In reply to Richard Purdie

This avoids the seeing broken replacements like:
oe-selftest-centos/build/build-st-926tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt which understandably break builds.

(From OE-Core rev: 04ee0e8b95cd8ed890374e0007f976684206b630)

(Cherry-picked from f930e2cadb9ee69759720b6c49aeeb6dd43a7edd but adjusted for thud) (From OE-Core rev: b51a8c390714357713e91d828708c85cf5f68971)

---
 meta/lib/oeqa/core/utils/concurrencytest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/core/utils/concurrencytest.py +1 -1
index 6bf7718863f..5f10267f70e 100644
@@ -199,7 +199,7 @@ def fork_for_tests(concurrency_num, suite):
                     oe.path.copytree(selftestdir, newselftestdir)
 
                     for e in os.environ:
-                        if builddir in os.environ[e]:
+                        if builddir + "/" in os.environ[e] or os.environ[e].endswith(builddir):
                             os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
 
                     subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True)
Signature · 1 line
2.25.1
#16 lore raw

PATCH 17/22 attr: Disable parallel make install

In reply to Richard Purdie

do_install fails on newer versions of make with interesting and hard to debug errors. Disablle parallle make install as a workaround. Later verisons of attr in newer releases don't have the issue.

(From OE-Core rev: 6043b9a2ea879f8960897b11eb947801508a94da)

---
 meta/recipes-support/attr/attr_2.4.47.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-support/attr/attr_2.4.47.bb +3 -0
index fc88bef830b..c3da66a0c72 100644
@@ -12,4 +12,7 @@ SRC_URI += "file://attr-Missing-configure.ac.patch \
 SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
 SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
 
+# Has issues with newer versions of make
+PARALLEL_MAKEINST = ""
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
#17 lore raw

PATCH 18/22 python3-testtools: Avoid traceback2 module requirement

In reply to Richard Purdie

traceback2 adds traceback for python2. Rather than depend on traceback2, we're python3 only so just use traceback.

This caused breakage in oe-selftest -j which uses testtools on the autobuilder using buildtools-tarball.

[YOCTO #13652]

(From OE-Core rev: ee80a06c107375e3cf0d246ea17c09dda4536dab)

(From OE-Core rev: ee82e3c24fe5727ce81e972cadedca431d6086c5)

---
 .../python3-testtools/no_traceback2.patch     | 23 +++++++++++++++++++
 .../python/python3-testtools_2.3.0.bb         |  2 ++
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-testtools/no_traceback2.patch
meta/recipes-devtools/python/python3-testtools/no_traceback2.patch new file +23 -0
new file mode 100644
index 00000000000..594510342b9
@@ -0,0 +1,23 @@
+traceback2 adds traceback for python2. Rather than depend on traceback2, we're
+python3 only so just use traceback.
+This caused breakage in oe-selftest -j which uses testtools on the autobuilder
+using buildtools-tarball.
+
+Upstream-Status: Inappropriate [Our recipe is python3 specific]
+(Once py2 is EOL upstream probably could/should take this)
+Signed-off-by: Richard Purdie <[email protected]>
+
+Index: testtools-2.3.0/testtools/content.py
+===================================================================
+--- testtools-2.3.0.orig/testtools/content.py
++++ testtools-2.3.0/testtools/content.py
+@@ -19,8 +19,7 @@ import os
+ import sys
+ 
+ from extras import try_import
+-# To let setup.py work, make this a conditional import.
+-traceback = try_import('traceback2')
++import traceback
+ 
+ from testtools.compat import (
+     _b,
meta/recipes-devtools/python/python3-testtools_2.3.0.bb +2 -0
index 896ecee65c5..a254b90a758 100644
@@ -1,2 +1,4 @@
 inherit setuptools3
 require python-testtools.inc
+
+SRC_URI += "file://no_traceback2.patch"
Signature · 1 line
2.25.1
#18 lore raw

PATCH 19/22 maintainers: Add entry for buildtools-extended-tarball

In reply to Richard Purdie

(From OE-Core rev: 4281342a04078990bb0a110760ff2dc053eccc93)

(cherry picked from commit 61d4d3d5a9f27e0fbf1d7ed6db818a779643b8f3)
---
 meta/conf/distro/include/maintainers.inc | 1 +
 1 file changed, 1 insertion(+)
meta/conf/distro/include/maintainers.inc +1 -0
index 660a52ad870..4cb8c5c55a9 100644
@@ -81,6 +81,7 @@ RECIPE_MAINTAINER_pn-build-appliance-image = "Richard Purdie <richard.purdie@lin
 RECIPE_MAINTAINER_pn-build-compare = "Paul Eggleton <[email protected]>"
 RECIPE_MAINTAINER_pn-build-sysroots = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-builder = "Richard Purdie <[email protected]>"
+RECIPE_MAINTAINER_pn-buildtools-extended-tarball = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-buildtools-tarball = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-busybox = "Andrej Valek <[email protected]>"
 RECIPE_MAINTAINER_pn-busybox-inittab = "Denys Dmytriyenko <[email protected]>"
Signature · 1 line
2.25.1
#19 lore raw

PATCH 20/22 selftest/signing: Ensure build path relocation is safe

In reply to Richard Purdie

Similarly to 04ee0e8b95cd8ed890374e0007f976684206b630, ensure only full build paths are replaced in the environment to avoid breaking buildtools.

---
 meta/lib/oeqa/selftest/cases/signing.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/signing.py +3 -1
index b390f37d8e6..41627ff8585 100644
@@ -44,7 +44,9 @@ class Signing(OESelftestTestCase):
         origenv = os.environ.copy()
 
         for e in os.environ:
-            if builddir in os.environ[e]:
+            if builddir + "/" in os.environ[e]:
+                os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/")
+            if os.environ[e].endswith(builddir):
                 os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
 
         os.chdir(newbuilddir)
Signature · 1 line
2.25.1
#20 lore raw

PATCH 21/22 cve-update: handle baseMetricV2 as optional

In reply to Richard Purdie

From: Konrad Weihmann <[email protected]>

Currently in NVD DB an item popped up, which hasn't set baseMetricV2. Let the parser handle it as an optional item.
In case use baseMetricV2 before baseMetricV3

---
 meta/recipes-core/meta/cve-update-db-native.bb | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
meta/recipes-core/meta/cve-update-db-native.bb +9 -4
index 1b4f31692ba..c64dd768c85 100644
@@ -160,15 +160,20 @@ def update_db(c, jsondata):
         if not elt['impact']:
             continue
 
+        accessVector = None
         cveId = elt['cve']['CVE_data_meta']['ID']
         cveDesc = elt['cve']['description']['description_data'][0]['value']
         date = elt['lastModifiedDate']
-        accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
-        cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
-
         try:
+            accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
+            cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
+        except KeyError:
+            cvssv2 = 0.0
+        try:
+            accessVector = accessVector or elt['impact']['baseMetricV3']['cvssV3']['attackVector']
             cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
-        except:
+        except KeyError:
+            accessVector = accessVector or "UNKNOWN"
             cvssv3 = 0.0
 
         c.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)",
Signature · 1 line
2.25.1
#21 lore raw

PATCH 22/22 oeqa/runtime_test: Disable test_testimage_virgl_gtk

In reply to Richard Purdie

This test keeps failing on the autobuilder and is proving extremely annoying. It works much better in later releases but for zeus and earlier, lets just stop running it as it doesn't really tell us anything useful at this point, nobody has any plans to improve the distro exclusions or otherwise fix it in the older releases.

---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +1 -1
index d817b755fed..5149583bd49 100644
@@ -168,7 +168,7 @@ class TestImage(OESelftestTestCase):
         # remove the oeqa-feed-sign temporal directory
         shutil.rmtree(self.gpg_home, ignore_errors=True)
 
-    def test_testimage_virgl_gtk(self):
+    def disabled_test_testimage_virgl_gtk(self):
         """
         Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk frontend
         Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled
Signature · 1 line
2.25.1