[meta-intel] [PATCH 2/2] meta-isg: openssl-qat: fix for patch error
Rahul Kumar Gupta
rahul.kumarxx.gupta at intel.com
Wed Aug 3 00:59:53 PDT 2016
openssl-qat is different from other packages in the way that it
has a patch present in a zip file that is unpacked and applied
on top of openssl. This results in patch errors when doing an
incremental build using bitbake.
To resolve, splitted do_patch into two - one to unpack the qat patch
and apply it on openssl. And, other to apply the patches added in
SRC_URI.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta at intel.com>
---
.../recipes-extended/openssl-qat/openssl-qat.inc | 37 +++++++++++++++-------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc b/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc
index 8f6be09..1b3e0c1 100644
--- a/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc
+++ b/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc
@@ -44,22 +44,35 @@ export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
S = "${WORKDIR}/git"
-do_unpack2() {
- cd ${WORKDIR}/openssl_qat-${PV}
- cd libcrypto_shim_${PV}_*
- tar -zxof libCrypto_Shim_${PV}.tar.gz
- tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz
- mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR}
-}
-
-addtask unpack2 after do_unpack before do_patch_prepend
+opensslqat_do_patch() {
+ cd ${WORKDIR}/openssl_qat-${PV}
+ cd libcrypto_shim_${PV}_*
+ tar -zxof libCrypto_Shim_${PV}.tar.gz
+ tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz
+ mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR}
-do_prepatch() {
cd ${S}
- patch -p1 < ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch
+ if [ ! -d ${S}/debian/patches ]; then
+ mkdir -p ${S}/debian/patches
+ cp -f ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch ${S}/debian/patches
+ echo "openssl-${OPENSSL_VERSION}-qat.patch -p1" > ${S}/debian/patches/series
+ fi
+ quilt pop -a || true
+ if [ -d ${S}/.pc-opensslqat ]; then
+ rm -rf ${S}/.pc
+ mv ${S}/.pc-opensslqat ${S}/.pc
+ QUILT_PATCHES=${S}/debian/patches quilt pop -a
+ rm -rf ${S}/.pc
+ fi
+ QUILT_PATCHES=${S}/debian/patches quilt push -a
+ mv ${S}/.pc ${S}/.pc-opensslqat
}
-addtask prepatch after do_unpack2 before do_patch
+# We invoke base do_patch at end, to incorporate any local patch
+python do_patch() {
+ bb.build.exec_func('opensslqat_do_patch', d)
+ bb.build.exec_func('patch_do_patch', d)
+}
do_configure () {
os=linux
--
1.9.1
More information about the meta-intel
mailing list