"No file to patch" when trying to apply patch

22 views
Skip to first unread message

Bjoern Kaufmann

unread,
Mar 7, 2025, 5:14:05 AM3/7/25
to isar-users
Hello,

I am currently trying to apply a patch on one of my components I want to build from sources using the dpkg bbclass:

inherit dpkg

SRC_URI = "git://some-repo.git;branch=master;protocol=ssh"
SRC_URI += "file://TPM-dictionary-attack-lock.patch"

SRCREV = "6fa1dbb543cb7147197c175bccd61e2bd443d36b"


my filetree looks like this:

my-recipe/
  files/
    TPM-dictionary-attack-lock.patch


The workdir after do_fetch, do_unpack etc. looks like the following:

workdir.png

But during do_patch when trying to apply the patch, it always gives me the error "No file to patch.":

stdout: Applying patch TPM-dictionary-attack-lock.patch
can't find file to patch at input line 15
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 76020b69daebb37d74e3d74288b9694274e9b3f5 Mon Sep 17 00:00:00 2001
|From: somename <some...@somemail.com>
|Date: Fri, 7 Mar 2025 10:22:58 +0100
|Subject: [PATCH] feat: add TPM dictionary attack lock
| script
|
|---
| provisioning/tpm_ibm/tpm-provisioning | 2 ++
| 1 file changed, 2 insertions(+)
|
|diff --git a/provisioning/tpm_ibm/tpm-provisioning b/provisioning/tpm_ibm/tpm-provisioning
|index c1c62de..2ed1ce6 100644
|--- a/provisioning/tpm_ibm/tpm-provisioning
|+++ b/provisioning/tpm_ibm/tpm-provisioning
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch TPM-dictionary-attack-lock.patch does not apply (enforce with -f)

stderr: 


I am currently using isar commit 30471bb3f787fb0aa822d15e141ecce2f3b99860.

Best Regards,
Bjoern

Jan Kiszka

unread,
Mar 7, 2025, 5:17:44 AM3/7/25
to Bjoern Kaufmann, isar-users
On 07.03.25 11:14, Bjoern Kaufmann wrote:
> Hello,
>
> I am currently trying to apply a patch on one of my components I want to
> build from sources using the dpkg bbclass:
>
>  my-recipe_1.0.bb
>
> /inherit dpkg
>
> SRC_URI = "git://some-repo.git;branch=master;protocol=ssh"/
> /SRC_URI += "file://TPM-dictionary-attack-lock.patch"/
> /
> SRCREV = "6fa1dbb543cb7147197c175bccd61e2bd443d36b"/
> /

S = "${WORKDIR}/git"

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Bjoern Kaufmann

unread,
Mar 7, 2025, 6:00:50 AM3/7/25
to isar-users
Oh, thank you

Bjoern
Reply all
Reply to author
Forward
0 new messages