From ae65ea21e27f861ac10cebc006b9b4bbb3b3dbbc Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 23 Feb 2024 10:29:06 +0000 Subject: [PATCH] Fix inclusion of new object files MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Right now, there's a mixup over the xen/ part of the path for new files. + NEW_FILES=./arch/x86/lp-hooks.o + for i in '$NEW_FILES' ++ dirname ./arch/x86/lp-hooks.o + mkdir -p output/./arch/x86 + cp patched/./arch/x86/lp-hooks.o output/./arch/x86/lp-hooks.o cp: cannot stat 'patched/./arch/x86/lp-hooks.o': No such file or directory Alter the `cd` and `find` runes to use paths relative to the root of the different source trees. This now results in: + NEW_FILES=xen/arch/x86/lp-hooks.o + for i in '$NEW_FILES' ++ dirname xen/arch/x86/lp-hooks.o + mkdir -p output/xen/arch/x86 + cp patched/xen/arch/x86/lp-hooks.o output/xen/arch/x86/lp-hooks.o Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Roger Pau Monné --- livepatch-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livepatch-build b/livepatch-build index cdb852c..948b2ac 100755 --- a/livepatch-build +++ b/livepatch-build @@ -227,7 +227,7 @@ function create_patch() fi done - NEW_FILES=$(comm -23 <(cd patched/xen && find . -type f -name '*.o' | sort) <(cd original/xen && find . -type f -name '*.o' | sort)) + NEW_FILES=$(comm -23 <(cd patched && find xen/ -type f -name '*.o' | sort) <(cd original && find xen/ -type f -name '*.o' | sort)) for i in $NEW_FILES; do mkdir -p "output/$(dirname "$i")" cp "patched/$i" "output/$i" -- 2.39.5