[oe-commits] [openembedded-core] 11/16: gnupg: Read GNUPG_BINDIR from environment variables for nativesdk

git at git.openembedded.org git at git.openembedded.org
Sat Feb 15 22:42:44 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit c6b00b5594adec0a7d7a7f3617fb99b65ea8d9f1
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Mon Jan 6 18:30:32 2020 +0800

    gnupg: Read GNUPG_BINDIR from environment variables for nativesdk
    
    There is already a relocate.patch for native which is used for reading
    GNUPG_BINDIR from environment variables, now also enable it for nativesdk.
    Otherwise, command like the following one doesn't work for nativesdk:
    
    $ gpg-connect-agent --homedir ../keys/ reloadagent /bye
    gpg-connect-agent: no running gpg-agent - starting '/opt/path/to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/gpg-agent'
    gpg-connect-agent: failed to start agent '/opt/path/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/gpg-agent': No such file or directory
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-support/gnupg/gnupg_2.2.19.bb | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-support/gnupg/gnupg_2.2.19.bb b/meta/recipes-support/gnupg/gnupg_2.2.19.bb
index 76c09ff..c07bff1 100644
--- a/meta/recipes-support/gnupg/gnupg_2.2.19.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.2.19.bb
@@ -18,6 +18,7 @@ SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            "
 SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
                                 file://relocate.patch"
+SRC_URI_append_class-nativesdk = " file://relocate.patch"
 
 SRC_URI[md5sum] = "cb3b373d08ba078c325299945a7f2818"
 SRC_URI[sha256sum] = "242554c0e06f3a83c420b052f750b65ead711cc3fddddb5e7274fcdbb4e9dec0"
@@ -60,10 +61,17 @@ do_install_append() {
 }
 
 do_install_append_class-native() {
-	create_wrapper ${D}${bindir}/gpg2 GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
-	create_wrapper ${D}${bindir}/gpgconf GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
-	create_wrapper ${D}${bindir}/gpg-agent GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
-	create_wrapper ${D}${bindir}/gpg-connect-agent GNUPG_BINDIR=${STAGING_BINDIR_NATIVE}
+	create_wrappers ${STAGING_BINDIR_NATIVE}
+}
+
+do_install_append_class-nativesdk() {
+	create_wrappers ${SDKPATHNATIVE}${bindir_nativesdk}
+}
+
+create_wrappers() {
+	for i in gpg2 gpgconf gpg-agent gpg-connect-agent; do
+		create_wrapper ${D}${bindir}/$i GNUPG_BINDIR=$1
+	done
 }
 
 PACKAGECONFIG ??= "gnutls"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list