diff options
author | Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | 2016-08-03 15:59:53 +0800 |
---|---|---|
committer | Tom Zanussi <tom.zanussi@linux.intel.com> | 2016-08-04 11:31:27 -0500 |
commit | 3fdd6fdae1df3223d4d748dbcf609c27a79b8f9d (patch) | |
tree | 2275b1b352d57560b9434ac89a7b6d8dbaf31ab7 /meta-isg/common | |
parent | 9098afe1485b24a151cbd6e16b897b7c4204aeba (diff) | |
download | meta-intel-3fdd6fdae1df3223d4d748dbcf609c27a79b8f9d.tar.gz |
meta-isg: openssl-qat: fix for patch error
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@intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Diffstat (limited to 'meta-isg/common')
-rw-r--r-- | meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc | 37 |
1 files 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 8f6be090..1b3e0c17 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}" | |||
44 | 44 | ||
45 | S = "${WORKDIR}/git" | 45 | S = "${WORKDIR}/git" |
46 | 46 | ||
47 | do_unpack2() { | 47 | opensslqat_do_patch() { |
48 | cd ${WORKDIR}/openssl_qat-${PV} | 48 | cd ${WORKDIR}/openssl_qat-${PV} |
49 | cd libcrypto_shim_${PV}_* | 49 | cd libcrypto_shim_${PV}_* |
50 | tar -zxof libCrypto_Shim_${PV}.tar.gz | 50 | tar -zxof libCrypto_Shim_${PV}.tar.gz |
51 | tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz | 51 | tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz |
52 | mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR} | 52 | mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR} |
53 | } | ||
54 | |||
55 | addtask unpack2 after do_unpack before do_patch_prepend | ||
56 | 53 | ||
57 | do_prepatch() { | ||
58 | cd ${S} | 54 | cd ${S} |
59 | patch -p1 < ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch | 55 | if [ ! -d ${S}/debian/patches ]; then |
56 | mkdir -p ${S}/debian/patches | ||
57 | cp -f ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch ${S}/debian/patches | ||
58 | echo "openssl-${OPENSSL_VERSION}-qat.patch -p1" > ${S}/debian/patches/series | ||
59 | fi | ||
60 | quilt pop -a || true | ||
61 | if [ -d ${S}/.pc-opensslqat ]; then | ||
62 | rm -rf ${S}/.pc | ||
63 | mv ${S}/.pc-opensslqat ${S}/.pc | ||
64 | QUILT_PATCHES=${S}/debian/patches quilt pop -a | ||
65 | rm -rf ${S}/.pc | ||
66 | fi | ||
67 | QUILT_PATCHES=${S}/debian/patches quilt push -a | ||
68 | mv ${S}/.pc ${S}/.pc-opensslqat | ||
60 | } | 69 | } |
61 | 70 | ||
62 | addtask prepatch after do_unpack2 before do_patch | 71 | # We invoke base do_patch at end, to incorporate any local patch |
72 | python do_patch() { | ||
73 | bb.build.exec_func('opensslqat_do_patch', d) | ||
74 | bb.build.exec_func('patch_do_patch', d) | ||
75 | } | ||
63 | 76 | ||
64 | do_configure () { | 77 | do_configure () { |
65 | os=linux | 78 | os=linux |