Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 3fef5ff

Browse files
Yifan Honglag-google
Yifan Hong
authored andcommitted
FROMLIST: kheaders: dereferences the source tree
When the kernel is built inside a sandbox container, a forest of symlinks to the source files may be created in the container. In this case, the generated kheaders.tar.xz should follow these symlinks to access the source files, instead of packing the symlinks themselves. Test: manual (add kheaders_data.tar.xz to the output, then examine the contents) Bug: 276339429 Fixes: b0acbba ("Revert "Revert "Revert "FROMLIST: kheaders: Follow symlinks to source files."""") Link: https://lore.kernel.org/lkml/[email protected]/ Change-Id: Ie4db22dfa13d05fdccb3ad8f4fae2fe3fead994e Signed-off-by: Yifan Hong <[email protected]>
1 parent fdb881f commit 3fef5ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/gen_kheaders.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ if [ "$building_out_of_srctree" ]; then
7373
cd $srctree
7474
for f in $dir_list
7575
do find "$f" -name "*.h";
76-
done | cpio --quiet -pd $cpio_dir
76+
done | cpio --quiet -L -pd $cpio_dir
7777
)
7878
fi
7979

8080
# The second CPIO can complain if files already exist which can happen with out
8181
# of tree builds having stale headers in srctree. Just silence CPIO for now.
8282
for f in $dir_list;
8383
do find "$f" -name "*.h";
84-
done | cpio --quiet -pdu $cpio_dir >/dev/null 2>&1
84+
done | cpio --quiet -L -pdu $cpio_dir >/dev/null 2>&1
8585

8686
# Remove comments except SDPX lines
8787
find $cpio_dir -type f -print0 |

0 commit comments

Comments
 (0)