Bug 11949

Summary: qemu-2.10-rc2 build error (patch failed)
Product: [Yocto Project Subprojects] IoT Reference OS Kit Reporter: Juro Bystricky <juro.bystricky>
Component: intel-iot-refkit-toolsAssignee: Mikko Ylinen <mikko.ylinen>
Status: RESOLVED FIXED QA Contact: yeoh ee peng <ee.peng.yeoh>
Severity: major    
Priority: Medium+ CC: jku, meta.mr.watcher, meta.watcher, mikko.ylinen
Version: 2.4   
Target Milestone: 2.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Juro Bystricky 2017-08-18 16:20:04 UTC
As seen in Autobuilder
https://autobuilder.yocto.io/builders/nightly-refkit/builds/122/steps/BuildImages/logs/stdio

ERROR: qemu-native-2.10.0-rc2-r0 do_patch: Command Error: 'quilt --quiltrc /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-refkit/build/build/tmp-glibc/work/x86_64-linux/qemu-native/2.10.0-rc2-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch
patching file hw/tpm/tpm_passthrough.c
Hunk #1 FAILED at 34.
Hunk #2 succeeded at 47 with fuzz 1 (offset -2 lines).
Hunk #3 FAILED at 80.
Hunk #4 succeeded at 350 with fuzz 1 (offset 43 lines).
Hunk #5 FAILED at 365.
Hunk #6 FAILED at 399.
Hunk #7 FAILED at 471.
Hunk #8 FAILED at 493.
Hunk #9 succeeded at 411 (offset -195 lines).
Hunk #10 FAILED at 666.
Hunk #11 FAILED at 683.
Hunk #12 FAILED at 790.
Hunk #13 FAILED at 826.
10 out of 13 hunks FAILED -- rejects in file hw/tpm/tpm_passthrough.c
patching file hw/tpm/tpm_tis.c
Hunk #1 FAILED at 368.
Hunk #2 succeeded at 403 with fuzz 1 (offset -12 lines).
Hunk #3 succeeded at 1020 (offset -12 lines).
1 out of 3 hunks FAILED -- rejects in file hw/tpm/tpm_tis.c
patching file hw/tpm/tpm_tis.h
patching file hw/tpm/tpm_util.c
patching file hw/tpm/tpm_util.h
patching file include/sysemu/tpm_backend.h
Patch 0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch does not apply (enforce with -f)
ERROR: qemu-native-2.10.0-rc2-r0 do_patch: Function failed: patch_do_patch
Comment 1 Juro Bystricky 2017-08-18 16:24:49 UTC
BTW, observed with refkit
Comment 2 Jussi Kukkonen 2017-08-22 12:15:47 UTC
Could this be an issue with some patch from another layer? The oe-core patching looks kind of unlikely to fail.
Comment 3 Jussi Kukkonen 2017-08-22 12:33:30 UTC
meta-refkit-core has this:


SRC_URI_remove_df-refkit-config = " \
    file://0001-Provide-support-for-the-CUSE-TPM.patch \
    file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
    file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
    file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \
"


That last should probably be
 
    file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS-v2.9.patch \
Comment 4 Juro Bystricky 2017-08-22 14:59:15 UTC
yes, this is exactly the root of the problem.
The patch needed to be modified for QEMU 2.9 +.
Comment 5 Mikko Ylinen 2017-08-24 03:16:48 UTC
I have the fix available in https://github.com/intel/intel-iot-refkit/pull/296