Skip to contentSkip to conversation

Rocko backport

PATCH New Otavio Salvador 1 participant 9 messages Jan 23, 2018

lore
Share & tools
lore
#0 lore raw

cover Rocko backport

Those are the commits we think that should be backported to rocko.

Those are fixes or minor improvements which does make sense to backport and has high impact for our customers.

If there is any incompatible change, please let us know.

Mark Hatle (1):
uninative.bbclass: Fix broken symlink issue

Otavio Salvador (5):
image_types_wic.bbclass: Ensure '-c image_wic' works
libarchive: Enable xz and lzo by default
grub-efi: Rework GRUB_BUILTIN variable as it is too long
grub-efi: Add loadenv and test as default built-in
grub: Move grub-editenv packaging to grub2.inc

Richard Purdie (1):
grub-efi: Fix DEPENDS

Tom Hochstein (1):
libepoxy: Fix build break for EGL_CAST dependency

 meta/classes/image_types_wic.bbclass               |  3 ++
 meta/classes/uninative.bbclass                     | 12 ++++++++
 meta/recipes-bsp/grub/grub-efi_2.02.bb             |  5 ++--
 meta/recipes-bsp/grub/grub2.inc                    |  6 ++++
 meta/recipes-bsp/grub/grub_2.02.bb                 |  6 +---
 .../libarchive/libarchive_3.3.2.bb                 |  2 +-
 .../Add-fallback-definition-for-EGL-CAST.patch     | 33 ++++++++++++++++++++++
 meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb   |  3 +-
 8 files changed, 61 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
Signature · 1 line
2.16.1
#1 lore raw

PATCH 1/8 uninative.bbclass: Fix broken symlink issue

From: Mark Hatle <[email protected]>

If two builds are sharing the same DL_DIR, and the uninative file is local to a layer. When the first build gets to uninative it creates the link local to itself, and subsequent users can use the same link. However if that first build then is deleted from the disk, the symlink is no longer valid (broken).

We need to update the system to detect this case, and use the model implemented by the bitbke fetch2 code. Look for a broken link, remove it, then try to create the link and ignore an exception if it already exists (since we just unlinked any bad one).

(cherry picked from commit bfd9664edad7044b5da53fc33b8d0f6508f00950)

---

 meta/classes/uninative.bbclass | 12 ++++++++++++
 1 file changed, 12 insertions(+)
meta/classes/uninative.bbclass +12 -0
index a410647328..670efa9f05 100644
@@ -63,7 +63,19 @@ python uninative_event_fetchloader() {
             fetcher.download()
             localpath = fetcher.localpath(srcuri)
             if localpath != tarballpath and os.path.exists(localpath) and not os.path.exists(tarballpath):
+                # Follow the symlink behavior from the bitbake fetch2.
+                # This will cover the case where an existing symlink is broken
+                # as well as if there are two processes trying to create it
+                # at the same time.
+                if os.path.islink(tarballpath):
+                    # Broken symbolic link
+                    os.unlink(tarballpath)
+
+                # Deal with two processes trying to make symlink at once
+                try:
                     os.symlink(localpath, tarballpath)
+                except FileExistsError:
+                    pass
 
         cmd = d.expand("\
 mkdir -p ${UNINATIVE_STAGING_DIR}-uninative; \
Signature · 1 line
2.16.1
#2 lore raw

PATCH 2/8 image_types_wic.bbclass: Ensure '-c image_wic' works

In reply to Otavio Salvador

The 'wic' image may use files which has been deployed (e.g in do_deploy) for some partitions that may need to be copied in a specific partition or filesystem (e.g a bootloader).

When using 'bitbake <image> -c image_wic', from a clean build, the contents of do_deploy must also be available so we need to ensure all do_deploy of the image dependencies has been complete.

(cherry picked from commit f387c28640cbb209b8a8ed5734b21c754d9f7663)

---

 meta/classes/image_types_wic.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/image_types_wic.bbclass +3 -0
index 222ae00433..dcf620cee0 100644
@@ -41,6 +41,9 @@ WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 do_image_wic[depends] += "${@' '.join('%s-native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk', 'dosfstools', 'mtools'))}"
 
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_deploy"
+
 WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native"
 WKS_FILE_DEPENDS_BOOTLOADERS = ""
 WKS_FILE_DEPENDS_BOOTLOADERS_x86 = "syslinux grub-efi systemd-boot"
Signature · 1 line
2.16.1
#3 lore raw

PATCH 3/8 libepoxy: Fix build break for EGL_CAST dependency

In reply to Otavio Salvador

From: Tom Hochstein <[email protected]>

This is a backport [1] to fix the following build error:

| In file included from /home/r60874/upstream/xwayland/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/gtk+3/3.22.17-r0/recipe-sysroot/usr/include/epoxy/egl.h:46:0,
|                  from ../../../gtk+-3.22.17/gdk/wayland/gdkglcontext-wayland.h:32,
|                  from ../../../gtk+-3.22.17/gdk/wayland/gdkglcontext-wayland.c:24:
| ../../../gtk+-3.22.17/gdk/wayland/gdkglcontext-wayland.c: In function 'gdk_wayland_gl_context_realize':
| ../../../gtk+-3.22.17/gdk/wayland/gdkglcontext-wayland.c:179:43: error: expected expression before 'EGLContext'
|                                          : EGL_NO_CONTEXT,
|                                            ^

[1] https://github.com/anholt/libepoxy/commit/ebe3a53db1c0bb34e1ca963b95d1f222115f93f8

(cherry picked from commit b468e28194be39f6d6a2084bb51773c45253d5f7)

---

 .../Add-fallback-definition-for-EGL-CAST.patch     | 33 ++++++++++++++++++++++
 meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb   |  3 +-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch
meta/recipes-graphics/libepoxy/libepoxy/Add-fallback-definition-for-EGL-CAST.patch new file +33 -0
new file mode 100644
index 0000000000..b9297257dc
@@ -0,0 +1,33 @@
+Add fallback definition for EGL_CAST
+
+The EGL API update from d11104f introduced a dependency on the
+EGL_CAST() macro, provided by an updated eglplatform.h. Given that we
+don't provide eglplatform.h, add a fallback definition for if we're
+building against Mesa 17.0.x or similar.
+
+https://bugs.gentoo.org/show_bug.cgi?id=623926
+
+Upstream-Status: Backport [https://github.com/anholt/libepoxy/commit/ebe3a53db1c0bb34e1ca963b95d1f222115f93f8]
+
+Signed-off-by: Tom Hochstein <[email protected]>
+
+Index: libepoxy-1.4.3/src/gen_dispatch.py
+===================================================================
+--- libepoxy-1.4.3.orig/src/gen_dispatch.py	2017-06-06 04:24:13.000000000 -0500
++++ libepoxy-1.4.3/src/gen_dispatch.py	2017-11-06 12:45:43.594966473 -0600
+@@ -491,6 +491,15 @@
+             self.outln('#include "epoxy/gl.h"')
+             if self.target == "egl":
+                 self.outln('#include "EGL/eglplatform.h"')
++                # Account for older eglplatform.h, which doesn't define
++                # the EGL_CAST macro.
++                self.outln('#ifndef EGL_CAST')
++                self.outln('#if defined(__cplusplus)')
++                self.outln('#define EGL_CAST(type, value) (static_cast<type>(value))')
++                self.outln('#else')
++                self.outln('#define EGL_CAST(type, value) ((type) (value))')
++                self.outln('#endif')
++                self.outln('#endif')
+         else:
+             # Add some ridiculous inttypes.h redefinitions that are
+             # from khrplatform.h and not included in the XML.  We
meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb +2 -1
index c8b398f176..0172322b92 100644
@@ -5,7 +5,8 @@ SECTION = "libs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
 
-SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz"
+SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+           file://Add-fallback-definition-for-EGL-CAST.patch"
 SRC_URI[md5sum] = "af4c3ce0fb1143bdc4e43f85695a9bed"
 SRC_URI[sha256sum] = "0b808a06c9685a62fca34b680abb8bc7fb2fda074478e329b063c1f872b826f6"
 UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
Signature · 1 line
2.16.1
#4 lore raw

PATCH 4/8 libarchive: Enable xz and lzo by default

In reply to Otavio Salvador

The XZ format is widely used and multiple recipes inside OE-Core already use it, so making the XZ enabled by default align the expectation of users. The LZO, on the other side, is commonly used in embedded systems due its performance so it makes sense to be available by default.

(cherry picked from commit 6d24b0bc7ebddd10de5ad8f210b8ed85fc6ae769)

---

 meta/recipes-extended/libarchive/libarchive_3.3.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/libarchive/libarchive_3.3.2.bb +1 -1
index 5eded35c64..5daca2731e 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ed99aca006bc346974bb745a35336425"
 
 DEPENDS = "e2fsprogs-native"
 
-PACKAGECONFIG ?= "zlib bz2"
+PACKAGECONFIG ?= "zlib bz2 xz lzo"
 
 PACKAGECONFIG_append_class-target = "\
 	libxml2 \
Signature · 1 line
2.16.1
#5 lore raw

PATCH 5/8 grub-efi: Fix DEPENDS

In reply to Otavio Salvador

From: Richard Purdie <[email protected]>

We need to append to DEPENDS else the dependencies on bison/flex-native are lost, potentially resulting in build failures.

(cherry picked from commit bead76b50dc60e1b6b39fa5b659a7af44ff91adc)

---

 meta/recipes-bsp/grub/grub-efi_2.02.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/grub/grub-efi_2.02.bb +1 -1
index 44e32a88f1..bcd3776b68 100644
@@ -2,7 +2,7 @@ require grub2.inc
 
 GRUBPLATFORM = "efi"
 
-DEPENDS_class-target = "grub-efi-native"
+DEPENDS_append_class-target = " grub-efi-native"
 RDEPENDS_${PN}_class-target = "diffutils freetype"
 
 SRC_URI += " \
Signature · 1 line
2.16.1
#6 lore raw

PATCH 6/8 grub-efi: Rework GRUB_BUILTIN variable as it is too long

In reply to Otavio Salvador

As we will add new values here, it is better to split it in multiple lines.

(cherry picked from commit 1a491515d58d0d9f03f7a3a84738f53377b0f819)

---

 meta/recipes-bsp/grub/grub-efi_2.02.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-bsp/grub/grub-efi_2.02.bb +2 -1
index bcd3776b68..7ae5596ac7 100644
@@ -51,7 +51,8 @@ do_install_append_class-target() {
         {} +
 }
 
-GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop iso9660 search"
+GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
+                 efi_gop iso9660 search"
 
 do_deploy() {
 	# Search for the grub.cfg on the local boot media by using the
Signature · 1 line
2.16.1
#7 lore raw

PATCH 7/8 grub-efi: Add loadenv and test as default built-in

In reply to Otavio Salvador

To allow scripting and environment changes, the loadenv and test must be enabled. This adds those to the default set.

(cherry picked from commit b7c9a298801c828c06b6e7da47c35f592864ce74)

---

 meta/recipes-bsp/grub/grub-efi_2.02.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/grub/grub-efi_2.02.bb +1 -1
index 7ae5596ac7..128da162d0 100644
@@ -52,7 +52,7 @@ do_install_append_class-target() {
 }
 
 GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
-                 efi_gop iso9660 search"
+                 efi_gop iso9660 search loadenv test"
 
 do_deploy() {
 	# Search for the grub.cfg on the local boot media by using the
Signature · 1 line
2.16.1
#8 lore raw

PATCH 8/8 grub: Move grub-editenv packaging to grub2.inc

In reply to Otavio Salvador

The editenv utility must be available on grub and grub-efi so we better have it inside the grub2.inc file to avoid the duplication of metadata.

(cherry picked from commit ebdd054ad85b19d47dd20eab0ba3f31ef5141140)

---

 meta/recipes-bsp/grub/grub2.inc    | 6 ++++++
 meta/recipes-bsp/grub/grub_2.02.bb | 6 +-----
 2 files changed, 7 insertions(+), 5 deletions(-)
meta/recipes-bsp/grub/grub2.inc +6 -0
index a56fbe7bf8..28f96bb162 100644
@@ -70,3 +70,9 @@ do_configure_prepend() {
 # grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
 # conflicted, remove it since no one uses it.
 SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
+
+PACKAGES =+ "${PN}-editenv"
+
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+RDEPENDS_${PN} += "${PN}-editenv"
+RDEPENDS_${PN}_class-native = ""
meta/recipes-bsp/grub/grub_2.02.bb +1 -5
index b8055e7537..3e61f6a16d 100644
@@ -1,10 +1,6 @@
 require grub2.inc
 
-RDEPENDS_${PN} = "diffutils freetype grub-editenv"
-
-PACKAGES =+ "grub-editenv"
-
-FILES_grub-editenv = "${bindir}/grub-editenv"
+RDEPENDS_${PN} += "diffutils freetype"
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
Signature · 1 line
2.16.1