diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-01 10:27:11 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-12 22:51:39 -0400 |
commit | 6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch) | |
tree | f12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/meta/recipes-support/gpgme | |
parent | 509842add85b53e13164c1569a1fd43d5b8d91c5 (diff) | |
download | blackbird-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.gz blackbird-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.zip |
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro).
Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/gpgme')
8 files changed, 233 insertions, 64 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch new file mode 100644 index 000000000..42655fbbe --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch @@ -0,0 +1,26 @@ +From 4d714c097e497b63d2e8b22a834c671045e215e9 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 9 Mar 2017 21:34:55 +0200 +Subject: [PATCH] Correctly install python modules + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + lang/python/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am +index e32fd12..5ecf6fb 100644 +--- a/lang/python/Makefile.am ++++ b/lang/python/Makefile.am +@@ -102,6 +102,7 @@ install-exec-local: + for PYTHON in $(PYTHONS); do \ + $$PYTHON setup.py install \ + --prefix $(DESTDIR)$(prefix) \ ++ --install-lib=$(DESTDIR)${pythondir} \ + --record files.txt \ + --verbose ; \ + cat files.txt >> install_files.txt ; \ +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch new file mode 100644 index 000000000..84d55b968 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch @@ -0,0 +1,31 @@ +From 8c317f6186bd3a9a1c80b4d1e872b3db95934bb6 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 13 Apr 2017 16:40:27 +0300 +Subject: [PATCH] gpgme-config: skip all /lib* or /usr/lib* directories in + output + +The logic was not working in multilib setups which use other +directory names than plain /lib or /usr/lib. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + src/gpgme-config.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gpgme-config.in b/src/gpgme-config.in +index a4d152e..8342865 100644 +--- a/src/gpgme-config.in ++++ b/src/gpgme-config.in +@@ -154,7 +154,7 @@ while test $# -gt 0; do + for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do + skip=no + case $i in +- -L/usr/lib|-L/lib) ++ -L/usr/lib*|-L/lib*) + skip=yes + ;; + -L*|-l*) +-- +2.11.0 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc deleted file mode 100644 index 30a4d56d6..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/usr -libdir=${prefix}/lib -includedir=${prefix}/include - -Name: gpgme -Description: GNU Privacy Guard Made Easy -Version: 1.4.3 -Requires: -Libs: -L${libdir} -lgpgme -lassuan -lgpg-error -Cflags: -I${includedir} diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch index e2f1f4ffb..341cabfc5 100644 --- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch @@ -4,37 +4,50 @@ simpler and less error prone when cross compiling. Upstream-Status: Denied [Upstream not interested in pkg-config support] RP 2015/4/17 +Rebase to 1.8.0 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 1 + + src/Makefile.am | 4 +- + src/gpgme-pthread.pc.in | 15 +++++++ + src/gpgme.m4 | 114 ++++-------------------------------------------- + src/gpgme.pc.in | 15 +++++++ + 5 files changed, 42 insertions(+), 107 deletions(-) + create mode 100644 src/gpgme-pthread.pc.in + create mode 100644 src/gpgme.pc.in + diff --git a/configure.ac b/configure.ac -index 298a22b..c778b61 100644 +index 0a67b48..e402dd3 100644 --- a/configure.ac +++ b/configure.ac -@@ -622,6 +622,7 @@ AC_CONFIG_FILES(Makefile src/Makefile +@@ -875,6 +875,7 @@ AC_CONFIG_FILES(Makefile src/Makefile src/versioninfo.rc src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) +AC_CONFIG_FILES(src/gpgme.pc src/gpgme-pthread.pc) - AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd]) - AC_OUTPUT - + AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) + AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) + AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) diff --git a/src/Makefile.am b/src/Makefile.am -index 58922f9..40d0dca 100644 +index ce6f1d4..5f38fee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -20,11 +20,13 @@ +@@ -19,12 +19,14 @@ + ## Process this file with automake to produce Makefile.in - # Note: moc_kdpipeiodevice should actually be a dependecy below. EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \ -- gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp -+ gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp gpgme.pc.in gpgme-pthread.pc.in +- gpgme.h.in versioninfo.rc.in gpgme.def ++ gpgme.h.in versioninfo.rc.in gpgme.def gpgme.pc.in gpgme-pthread.pc.in bin_SCRIPTS = gpgme-config m4datadir = $(datadir)/aclocal m4data_DATA = gpgme.m4 + nodist_include_HEADERS = gpgme.h +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gpgme.pc gpgme-pthread.pc - nodist_include_HEADERS = gpgme.h bin_PROGRAMS = gpgme-tool + diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in new file mode 100644 index 0000000..980a48e @@ -51,9 +64,9 @@ index 0000000..980a48e +host=@GPGME_CONFIG_HOST@ + +Name: gpgme -+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (threaded version) ++Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (deprecated) +Version: @VERSION@ -+Libs: -L${libdir} -lgpgme-pthread -lpthread ++Libs: -L${libdir} -lgpgme -lpthread +Cflags: -I${includedir} +Requires: libassuan gpg-error diff --git a/src/gpgme.m4 b/src/gpgme.m4 @@ -277,3 +290,6 @@ index 0000000..b69539f +Cflags: -I${includedir} +Requires: libassuan gpg-error \ No newline at end of file +-- +2.8.1 + diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/python-import.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/python-import.patch new file mode 100644 index 000000000..61b77a1f7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/python-import.patch @@ -0,0 +1,19 @@ +Don't check for output on stderr to know if an import worked, host inputrc and +sysroot readline can cause warnings on stderr. + +Upstream-Status: Backport (from autoconf-archive 883a2abd) +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 +index b990d5b..318b089 100644 +--- a/m4/ax_python_devel.m4 ++++ b/m4/ax_python_devel.m4 +@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference. + # + AC_MSG_CHECKING([for the distutils Python package]) + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` +- if test -z "$ac_distutils_result"; then ++ if test $? -eq 0; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/python-lang-config.patch b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/python-lang-config.patch new file mode 100644 index 000000000..132e42677 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme/python-lang-config.patch @@ -0,0 +1,52 @@ +gpgme/lang/python: gpg-error-config should not be used. + +gpg-error-config was modified by OE to always return an error. So we want +to find an alternative way to retrieve whatever it is we need. It turns +out that the system is just trying to find the path to the gpg-error.h, which +we can pull in from the STAGING_INC environment. + +Upstream-Status: Inappropriate [changes are specific to OE] + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> + +Index: gpgme-1.8.0/lang/python/setup.py.in +=================================================================== +--- gpgme-1.8.0.orig/lang/python/setup.py.in ++++ gpgme-1.8.0/lang/python/setup.py.in +@@ -24,7 +24,6 @@ import glob + import subprocess + + # Out-of-tree build of the gpg bindings. +-gpg_error_config = ["gpg-error-config"] + gpgme_config_flags = ["--thread=pthread"] + gpgme_config = ["gpgme-config"] + gpgme_config_flags + gpgme_h = "" +@@ -52,13 +51,6 @@ else: + devnull = open(os.devnull, "w") + + try: +- subprocess.check_call(gpg_error_config + ['--version'], +- stdout=devnull) +-except: +- sys.exit("Could not find gpg-error-config. " + +- "Please install the libgpg-error development package.") +- +-try: + subprocess.check_call(gpgme_config + ['--version'], + stdout=devnull) + except: +@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and min + if not gpgme_h: + gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h") + +-gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0] +-gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h") ++gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h") + if not os.path.exists(gpg_error_h): +- gpg_error_h = \ +- glob.glob(os.path.join(gpg_error_prefix, "include", +- "*", "gpg-error.h"))[0] ++ sys.exit("gpg_error_h not found: %s" % gpg_error_h) + + print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h)) + diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb deleted file mode 100644 index a2d05878b..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "High-level GnuPG encryption/signing API" -DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management" -HOMEPAGE = "http://www.gnupg.org/gpgme.html" -BUGTRACKER = "https://bugs.g10code.com/gnupg/index" - -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \ - file://src/gpgme.h.in;endline=23;md5=5027eec93a996272a9a0a6a86cf35775 \ - file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" - -UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" -SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ - file://gpgme.pc \ - file://pkgconfig.patch \ - " - -SRC_URI[md5sum] = "60d730d22e8065fd5de309e8b98e304b" -SRC_URI[sha256sum] = "b09de4197ac280b102080e09eaec6211d081efff1963bf7821cf8f4f9916099d" - -DEPENDS = "libgpg-error libassuan" - -BINCONFIG = "${bindir}/gpgme-config" - -inherit autotools texinfo binconfig-disabled pkgconfig - -PACKAGES =+ "${PN}-pthread" -FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*" -FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*" - -CFLAGS_append_libc-musl = " -D__error_t_defined " -do_configure_prepend () { - # Else these could be used in preference to those in aclocal-copy - rm -f ${S}/m4/gpg-error.m4 - rm -f ${S}/m4/libassuan.m4 -} - -do_install_append () { - install -d ${D}${libdir}/pkgconfig - install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/ -} diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.8.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.8.0.bb new file mode 100644 index 000000000..4ddf6ed99 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.8.0.bb @@ -0,0 +1,76 @@ +SUMMARY = "High-level GnuPG encryption/signing API" +DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management" +HOMEPAGE = "http://www.gnupg.org/gpgme.html" +BUGTRACKER = "https://bugs.g10code.com/gnupg/index" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \ + file://src/gpgme.h.in;endline=23;md5=0f7059665c4b7897f4f4d0cb93aa9f98 \ + file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" + +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ + file://pkgconfig.patch \ + file://python-lang-config.patch \ + file://0001-Correctly-install-python-modules.patch \ + file://python-import.patch \ + file://0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \ + " + +SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b" +SRC_URI[sha256sum] = "596097257c2ce22e747741f8ff3d7e24f6e26231fa198a41b2a072e62d1e5d33" + +DEPENDS = "libgpg-error libassuan" +RDEPENDS_${PN}-cpp += "libstdc++" + +RDEPENDS_python2-gpg += "python-unixadmin" +RDEPENDS_python3-gpg += "python3-unixadmin" + +BINCONFIG = "${bindir}/gpgme-config" + +# Note select python2 or python3, but you can't select both at the same time +PACKAGECONFIG ??= "python3" +PACKAGECONFIG[python2] = ",,python swig-native," +PACKAGECONFIG[python3] = ",,python3 swig-native," + +# Default in configure.ac: "cl cpp python qt" +# Supported: "cl cpp python python2 python3 qt" +# python says 'search and find python2 or python3' + +# Building the C++ bindings for native requires a C++ compiler with C++11 +# support. Since these bindings are currently not needed, we can disable them. +DEFAULT_LANGUAGES = "" +DEFAULT_LANGUAGES_class-target = "cpp" +LANGUAGES ?= "${DEFAULT_LANGUAGES}" +LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" +LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" + +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" + +EXTRA_OECONF += '--enable-languages="${LANGUAGES}"' + +inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} + +export PKG_CONFIG='pkg-config' + +BBCLASSEXTEND = "native nativesdk" + +PACKAGES =+ "${PN}-cpp" +PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}" +PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}" + +FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*" +FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" +FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" +FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \ + ${libdir}/cmake/* \ +" + +CFLAGS_append_libc-musl = " -D__error_t_defined " +do_configure_prepend () { + # Else these could be used in preference to those in aclocal-copy + rm -f ${S}/m4/gpg-error.m4 + rm -f ${S}/m4/libassuan.m4 +} |