diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-02-15 11:38:26 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2012-02-24 17:54:29 -0500 |
commit | a47b6c61f58ead0396b837c58a91d0681b775b40 (patch) | |
tree | 1a278a08fcc05eaa1902abea3f32864a11c3c50c /scripts/package/builddeb | |
parent | f86d546bea349d5535738983544fdf16bcf5e6d8 (diff) |
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 <max@stro.at>
Cc: debian-kernel@lists.debian.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package/builddeb')
-rw-r--r-- | scripts/package/builddeb | 4 |
1 files changed, 4 insertions, 0 deletions
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" | |||
97 | mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" | 97 | mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" |
98 | mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" | 98 | mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" |
99 | mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename" | 99 | mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename" |
100 | mkdir -p "$kernel_headers_dir/lib/modules/$version/" | ||
100 | if [ "$ARCH" = "um" ] ; then | 101 | if [ "$ARCH" = "um" ] ; then |
101 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" | 102 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" |
102 | fi | 103 | fi |
@@ -121,6 +122,8 @@ fi | |||
121 | 122 | ||
122 | if grep -q '^CONFIG_MODULES=y' .config ; then | 123 | if grep -q '^CONFIG_MODULES=y' .config ; then |
123 | INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install | 124 | INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install |
125 | rm -f "$tmpdir/lib/modules/$version/build" | ||
126 | rm -f "$tmpdir/lib/modules/$version/source" | ||
124 | if [ "$ARCH" = "um" ] ; then | 127 | if [ "$ARCH" = "um" ] ; then |
125 | mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" | 128 | mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" |
126 | rmdir "$tmpdir/lib/modules/$version" | 129 | rmdir "$tmpdir/lib/modules/$version" |
@@ -245,6 +248,7 @@ destdir=$kernel_headers_dir/usr/src/linux-headers-$version | |||
245 | mkdir -p "$destdir" | 248 | mkdir -p "$destdir" |
246 | (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) | 249 | (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) |
247 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) | 250 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) |
251 | ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" | ||
248 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" | 252 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" |
249 | arch=$(dpkg --print-architecture) | 253 | arch=$(dpkg --print-architecture) |
250 | 254 | ||