All of lore.kernel.org
 help / color / mirror / Atom feed
From: "akuster" <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [zeus 2/7] pseudo: Ensure we use our own libsqlite
Date: Mon, 27 Apr 2020 19:15:51 -0700	[thread overview]
Message-ID: <2cbb3a663a3d3b2dcf8c12c26843d6087789ded0.1587931177.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1587931177.git.akuster808@gmail.com>

From: Richard Purdie <richard.purdie@linuxfoundation.org>

pseudo-native is special in that bitbake ends up executing it from the
sysroot-components directory before we have any workdirs for the bitbake
fakeroot worker. Since we switched to dynamically linking sqlite, it
means sqlite from the host system may be found, we really want the version
in sysroot-components. Trying to run tasks to create some special environment
for pseudo is hard and error prone. The simplest fix is to add an RPATH to
the binary so that it can correctly find the sqlite we want.

Unfortunately passing $ORIGIN into make doesn't work so well with shell
quoting so we have to fix that during do_install.

[YOCTO #13814]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3937ca9e2dfabb1ce9bce1d536b60b1e2a43739b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/recipes-devtools/pseudo/pseudo.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc
index 7ff8e449e9a..50e30064bde 100644
--- a/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/meta/recipes-devtools/pseudo/pseudo.inc
@@ -16,6 +16,7 @@ INSANE_SKIP_${PN}-dbg += "libdir"
 PROVIDES += "virtual/fakeroot"
 
 MAKEOPTS = ""
+MAKEOPTS_class-native = "'RPATH=-Wl,--rpath=XORIGIN/../../../sqlite3-native/usr/lib/'"
 
 inherit siteinfo pkgconfig
 
@@ -115,6 +116,7 @@ do_install () {
 }
 
 do_install_append_class-native () {
+	chrpath ${D}${bindir}/pseudo -r `chrpath ${D}${bindir}/pseudo | cut -d = -f 2 | sed s/XORIGIN/\\$ORIGIN/`
 	install -d ${D}${sysconfdir}
 	# The fallback files should never be modified
 	install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
-- 
2.17.1


  parent reply	other threads:[~2020-04-28  2:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28  2:15 [zeus 0/7] Merge request akuster
2020-04-28  2:15 ` [zeus 1/7] cve-check: CPE version '-' as all version akuster
2020-04-28  2:15 ` akuster [this message]
2020-04-28  2:15 ` [zeus 3/7] wic: align layer plugin path akuster
2020-04-28  2:15 ` [zeus 4/7] inetutils: Use alternatives to avoid manpage conflict akuster
2020-04-28  2:15 ` [zeus 5/7] openssl: recommend cryptodev-module for corresponding PACKAGECONFIG akuster
2020-04-28  2:15 ` [zeus 6/7] openssl: Upgrade 1.1.1d -> 1.1.1e akuster
2020-04-28  2:15 ` [zeus 7/7] openssl: update to 1.1.1f akuster
2020-04-28 16:13 ` [OE-core] [zeus 0/7] Merge request Jan Luebbe
2020-04-28 17:09   ` akuster
2020-05-04 13:42     ` Jan Luebbe
2020-05-04 14:18       ` Steve Sakoman
2020-04-28 18:07 ` Martin Jansa
2020-04-29  4:35   ` Anuj Mittal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cbb3a663a3d3b2dcf8c12c26843d6087789ded0.1587931177.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.