Skip to content

[Bug]: TFA Build Can Fail When Applying Git Patches #1221

@makubacki

Description

@makubacki

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

The TFA build run in post-build runs git am to apply git patches in the repo. This can fail as follows:

INFO - ------------------------------------------------
INFO - --------------Cmd Output Starting---------------
INFO - ------------------------------------------------
INFO - warning: quoted CRLF detected
INFO - /workspaces/mu_tiano_platforms/.git/modules/Silicon/Arm/TFA/rebase-apply/patch:16: trailing whitespace.
INFO - /*
INFO - /workspaces/mu_tiano_platforms/.git/modules/Silicon/Arm/TFA/rebase-apply/patch:17: trailing whitespace.
INFO -  * Copyright (c) 2022, Arm Limited. All rights reserved.
INFO - /workspaces/mu_tiano_platforms/.git/modules/Silicon/Arm/TFA/rebase-apply/patch:18: trailing whitespace.
INFO -  *
INFO - /workspaces/mu_tiano_platforms/.git/modules/Silicon/Arm/TFA/rebase-apply/patch:19: trailing whitespace.
INFO -  * SPDX-License-Identifier: BSD-3-Clause
INFO - /workspaces/mu_tiano_platforms/.git/modules/Silicon/Arm/TFA/rebase-apply/patch:20: trailing whitespace.
INFO -  */
INFO - error: corrupt patch at line 195
INFO - hint: Use 'git am --show-current-patch=diff' to see the failed patch
INFO - Applying: Changes needed to hack through QEMU SBSA usage
INFO - Patch failed at 0001 Changes needed to hack through QEMU SBSA usage
INFO - When you have resolved this problem, run "git am --continue".
INFO - If you prefer to skip this patch, run "git am --skip" instead.
INFO - To restore the original branch and stop patching, run "git am --abort".

Expected Behavior

The build is not brittle and runs without depending on git am success.

Steps To Reproduce

  1. Open the repo in the .devcontainer docker container
  2. Build QemuSbsaPkg

Build Environment

- OS(s): Ubuntu 24.04 (Mu DevOps docker container)
- Tool Chain(s): GCC5

Version Information

Commit: 10b114b5548c4353808f76cd2dba0d68861cfebd (current main tip)

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

Labels

state:backlogIn the backlogstate:needs-triageNeeds to triaged to determine next stepstype:bugSomething isn't workingurgency:mediumImportant with a moderate impact

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions