diff options
author | Ross Burton <ross.burton@intel.com> | 2018-09-19 14:44:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-20 05:41:25 -0700 |
commit | dfd69ff889ed78bf137116583d8ae351859ee203 (patch) | |
tree | bb726241146b93f952b4d847831bdf7ef27ee8a4 /meta/recipes-support/gnupg/gnupg_2.2.9.bb | |
parent | a6de4b1809e90d02a865c56ec8269bdfa3ceec0a (diff) | |
download | openembedded-core-contrib-dfd69ff889ed78bf137116583d8ae351859ee203.tar.gz |
gnupg: patch gnupg-native to allow path relocation
GnuPG hard-codes $bindir etc and uses them to find the helper binaries, such as
gpg-agent. This breaks if gnupg-native is reused from sstate for a different
build directory and GPG signing of packages is required.
Patch in getenv() checks for gnupg-native when returning the hardcoded paths,
and create a wrapper script which overrides GNUPG_BINDIR. There are more paths
that can be overridden, but this one is sufficient to make GnuPG work.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-support/gnupg/gnupg_2.2.9.bb')
-rw-r--r-- | meta/recipes-support/gnupg/gnupg_2.2.9.bb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-support/gnupg/gnupg_2.2.9.bb b/meta/recipes-support/gnupg/gnupg_2.2.9.bb index 4f815dff20..b7d23b8d39 100644 --- a/meta/recipes-support/gnupg/gnupg_2.2.9.bb +++ b/meta/recipes-support/gnupg/gnupg_2.2.9.bb @@ -15,7 +15,8 @@ SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0003-dirmngr-uses-libgpg-error.patch \ file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \ " -SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch" +SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \ + file://relocate.patch" SRC_URI[md5sum] = "52c895a81f514a65e08923736c38654a" @@ -43,6 +44,10 @@ do_install_append() { ln -sf gpgv2 ${D}${bindir}/gpgv } +do_install_append_class-native() { + create_wrapper ${D}${bindir}/gpg2 GNUPG_BINDIR=${STAGING_BINDIR_NATIVE} +} + PACKAGECONFIG ??= "gnutls" PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls" PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3" |