From d32b74fa2180e2684d0843866818de3e4830e32e Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Wed, 13 Mar 2024 14:26:32 +0100 Subject: [PATCH] fix(pkg/driverbuilder): fixed debian_kernel template. Signed-off-by: Federico Di Pierro --- pkg/driverbuilder/builder/templates/debian_kernel.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/driverbuilder/builder/templates/debian_kernel.sh b/pkg/driverbuilder/builder/templates/debian_kernel.sh index bc3b35f1..ae500de0 100644 --- a/pkg/driverbuilder/builder/templates/debian_kernel.sh +++ b/pkg/driverbuilder/builder/templates/debian_kernel.sh @@ -30,8 +30,12 @@ curl --silent -o kernel.deb -SL {{ $url }} ar x kernel.deb tar -xf data.tar.xz {{ end }} + cd usr/src/ sourcedir=$(find . -type d -name "{{ .KernelHeadersPattern }}" | head -n 1 | xargs readlink -f) +# Patch makefile to avoid using absolute `/usr/src` path; instead use `..` relative one. +sed -i 's/\/usr\/src/../g' $sourcedir/Makefile + # exit value echo $sourcedir