From: Joerg Roedel Date: Wed, 15 Feb 2012 16:38:26 +0000 (+0100) Subject: kbuild: Fix link to headers in 'make deb-pkg' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a47b6c61f58ead0396b837c58a91d0681b775b40;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git kbuild: Fix link to headers in 'make deb-pkg' The Link to the kernel header files in the debian packages point to the original build directory. This is a bad choice if the packages were installed on a different machine. Fix this in by manually re-creating the link in the builddeb script. Cc: maximilian attems Cc: debian-kernel@lists.debian.org Cc: linux-kbuild@vger.kernel.org Signed-off-by: Joerg Roedel Reviewed-by: Ben Hutchings Signed-off-by: Michal Marek --- diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 3c6c0b14c807..39e3f30384e7 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -97,6 +97,7 @@ mkdir -m 755 -p "$libc_headers_dir/DEBIAN" mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename" +mkdir -p "$kernel_headers_dir/lib/modules/$version/" if [ "$ARCH" = "um" ] ; then mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" fi @@ -121,6 +122,8 @@ fi if grep -q '^CONFIG_MODULES=y' .config ; then INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install + rm -f "$tmpdir/lib/modules/$version/build" + rm -f "$tmpdir/lib/modules/$version/source" if [ "$ARCH" = "um" ] ; then mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" rmdir "$tmpdir/lib/modules/$version" @@ -245,6 +248,7 @@ destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) +ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" arch=$(dpkg --print-architecture)