diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2013-12-05 09:37:35 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-31 12:58:13 -0400 |
commit | 573994d38b1c10e72cfa55fe6b02d8217a6166ff (patch) | |
tree | b0256a9b9cdfb17e3614d76925e9a8cc834004be /scripts | |
parent | 32f139873e89672cbd5b28f5da944201e86fdb92 (diff) |
deb-pkg: Fix cross-building linux-headers package
commit f8ce239dfc7ba9add41d9ecdc5e7810738f839fa upstream.
builddeb generates a control file that says the linux-headers package
can only be built for the build system primary architecture. This
breaks cross-building configurations. We should use $debarch for this
instead.
Since $debarch is not yet set when generating the control file, set
Architecture: any and use control file variables to fill in the
description.
Fixes: cd8d60a20a45 ('kbuild: create linux-headers package in deb-pkg')
Reported-and-tested-by: "Niew, Sh." <shniew@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/package/builddeb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index acb86507828a..3001ec5ae07d 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -62,7 +62,7 @@ create_package() { | |||
62 | fi | 62 | fi |
63 | 63 | ||
64 | # Create the package | 64 | # Create the package |
65 | dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" | 65 | dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" |
66 | dpkg --build "$pdir" .. | 66 | dpkg --build "$pdir" .. |
67 | } | 67 | } |
68 | 68 | ||
@@ -252,15 +252,14 @@ mkdir -p "$destdir" | |||
252 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) | 252 | (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) |
253 | ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" | 253 | ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" |
254 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" | 254 | rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" |
255 | arch=$(dpkg --print-architecture) | ||
256 | 255 | ||
257 | cat <<EOF >> debian/control | 256 | cat <<EOF >> debian/control |
258 | 257 | ||
259 | Package: $kernel_headers_packagename | 258 | Package: $kernel_headers_packagename |
260 | Provides: linux-headers, linux-headers-2.6 | 259 | Provides: linux-headers, linux-headers-2.6 |
261 | Architecture: $arch | 260 | Architecture: any |
262 | Description: Linux kernel headers for $KERNELRELEASE on $arch | 261 | Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} |
263 | This package provides kernel header files for $KERNELRELEASE on $arch | 262 | This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} |
264 | . | 263 | . |
265 | This is useful for people who need to build external modules | 264 | This is useful for people who need to build external modules |
266 | EOF | 265 | EOF |