[Buildroot] Unable to apply a patch for the buildroot makedevs tool

Ivan Castell icastell at circontrol.com
Fri Apr 16 06:58:05 UTC 2021


Hello! I did a patch for the makedevs tool that provides a new 'x' option that allows setting permissions for directories recursively without modifiying permissions for regular files. The patch is named 'makedevs-0001-custom-opts-exclude-regular-files.patch' (see below), and is located inside package/makedevs/ directory. When I try to re-build the framework, I get this error:

# make all
>>> host-makedevs  Patching

Applying makedevs-0001-custom-opts-exclude-regular-files.patch using patch:
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -purN makedevs.orig/makedevs.c makedevs/makedevs.c
|--- makedevs.orig/makedevs.c 2021-04-15 14:40:03.439990661 +0000
|+++ makedevs/makedevs.c 2021-04-15 14:40:46.128006533 +0000
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
package/pkg-generic.mk:187: recipe for target '/usr/local/share/buildroot/output/build/host-makedevs/.stamp_patched' failed
make: *** [/usr/local/share/buildroot/output/build/host-makedevs/.stamp_patched] Error 1

I was able to apply other patches properly that run on the target, but this tool is compiled to run on the host, and makedevs.mk rules compiles the makedevs.c source file without deploying it on output/build, and I think that's the main issue, but I am not completely sure.

Can you explain why is this patch not aplying properly and what should be the proper way to apply a patch for this makedevs tool, located inside the buildroot framework?

Thanks!




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210416/ab61fdd1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makedevs-0001-custom-opts-exclude-regular-files.patch
Type: text/x-patch
Size: 2103 bytes
Desc: makedevs-0001-custom-opts-exclude-regular-files.patch
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210416/ab61fdd1/attachment.bin>


More information about the buildroot mailing list