deb-pkg: Fix cross-building linux-headers package
PATCH 1/2 deb-pkg: Fix cross-building linux-headers package
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.
--- scripts/package/builddeb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
scripts/package/builddeb +4 -5
@@ -62,7 +62,7 @@ create_package() { fi # Create the package - dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" + dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" dpkg --build "$pdir" .. }
@@ -288,15 +288,14 @@ mkdir -p "$destdir" (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be 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) cat <<EOF >> debian/control Package: $kernel_headers_packagename Provides: linux-headers, linux-headers-2.6 -Architecture: $arch -Description: Linux kernel headers for $KERNELRELEASE on $arch - This package provides kernel header files for $KERNELRELEASE on $arch +Architecture: any +Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} + This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} . This is useful for people who need to build external modules EOF
Signature · 2 lines
Ben Hutchings Knowledge is power. France is bacon.
Quoted 38 lines · Ben Hutchings
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>--- scripts/package/builddeb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)scripts/package/builddeb +1
-2@@ -62,7 +62,7 @@ create_package() { fi # Create the package - dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" + dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" dpkg --build "$pdir" .. }@@ -288,15 +288,14 @@ mkdir -p "$destdir" (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be 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) cat <<EOF >> debian/control Package: $kernel_headers_packagename
scripts/package/builddeb mkdir -p "$destdir" · line 301
Quoted 10 lines
scripts/package/builddeb +3
-3Provides: linux-headers, linux-headers-2.6 -Architecture: $arch -Description: Linux kernel headers for $KERNELRELEASE on $arch - This package provides kernel header files for $KERNELRELEASE on $arch +Architecture: any +Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} + This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} . This is useful for people who need to build external modules EOF
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?
Sh. Niew
Quoted 13 lines · Sh.
Quoted 12 lines · Ben Hutchings
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>
[...]
Quoted 3 lines
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?
This is for mainline; it should apply cleanly to 3.12.
Ben.
Signature · 2 lines
Ben Hutchings Knowledge is power. France is bacon.
Quoted 14 lines · Ben Hutchings
Quoted 6 lines · Sh.
Quoted 5 lines · Ben Hutchings
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.
Quoted 7 lines
Quoted 7 lines
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>
Quoted 6 lines
[...]
Quoted 3 lines
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?This is for mainline; it should apply cleanly to 3.12.
What if i want to test this to 3.2?
Quoted 15 lines · Sh.
Quoted 14 lines · Ben Hutchings
Quoted 13 lines · Sh.
Quoted 12 lines · Ben Hutchings
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>
Quoted 8 lines
Quoted 6 lines
[...]
Quoted 3 lines
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?This is for mainline; it should apply cleanly to 3.12.
What if i want to test this to 3.2?
Then you're on your own, sorry.
Ben.
Signature · 2 lines
Ben Hutchings Knowledge is power. France is bacon.
Quoted 16 lines · Ben Hutchings
Quoted 15 lines · Sh.
Quoted 14 lines · Ben Hutchings
Quoted 13 lines · Sh.
Quoted 12 lines · Ben Hutchings
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
[...]
Quoted 3 lines
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?This is for mainline; it should apply cleanly to 3.12.
What ever i try, is failed. Even with 3.12 tree of debian. I check the failure, the following part can't be patch:
@@ -62,7 +62,7 @@ create_package() {
fi
# Create the package
- dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir"
+ dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$
(dpkg --print-architecture)}" -p$pname -P"$pdir"
dpkg --build "$pdir" ..
}
Quoted 3 lines
Quoted 1 line
What if i want to test this to 3.2?
Then you're on your own, sorry.
Quoted 34 lines · Sh.
Quoted 16 lines · Ben Hutchings
Quoted 15 lines · Sh.
Quoted 14 lines · Ben Hutchings
Quoted 13 lines · Sh.
Quoted 12 lines · Ben Hutchings
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
[...]
Quoted 3 lines
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?This is for mainline; it should apply cleanly to 3.12.
What ever i try, is failed. Even with 3.12 tree of debian. I check the failure, the following part can't be patch:
(quoted diff) +1
-1@@ -62,7 +62,7 @@ create_package() { fi # Create the package - dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" + dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
Quoted 2 lines
dpkg --build "$pdir" ..}
I think this has been word-wrapped by your mail program. Here is the patch as an attachment; that should avoid the problem.
Ben.
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
What if i want to test this to 3.2?
Then you're on your own, sorry.
Signature · 2 lines
Ben Hutchings Knowledge is power. France is bacon.
From ed10ade229438f3f4ce563e609093fa6362ff0f0 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Thu, 5 Dec 2013 04:12:54 +0000
Subject: [PATCH] deb-pkg: Fix cross-building linux-headers package
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.
--- scripts/package/builddeb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
scripts/package/builddeb +4 -5
@@ -62,7 +62,7 @@ create_package() { fi # Create the package - dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" + dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" dpkg --build "$pdir" .. }
@@ -288,15 +288,14 @@ mkdir -p "$destdir" (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be 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) cat <<EOF >> debian/control Package: $kernel_headers_packagename Provides: linux-headers, linux-headers-2.6 -Architecture: $arch -Description: Linux kernel headers for $KERNELRELEASE on $arch - This package provides kernel header files for $KERNELRELEASE on $arch +Architecture: any +Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} + This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} . This is useful for people who need to build external modules EOF
Quoted 31 lines · Ben Hutchings
Quoted 30 lines · Sh.
Quoted 16 lines · Ben Hutchings
Quoted 15 lines · Sh.
Quoted 14 lines · Ben Hutchings
Quoted 13 lines · Sh.
Quoted 12 lines · Ben Hutchings
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
[...]
Quoted 3 lines
I can't patch this to my linux-3.2.y tree which i clone from linux-stable I check that the patches number line are different...
What i missed?This is for mainline; it should apply cleanly to 3.12.
What ever i try, is failed. Even with 3.12 tree of debian. I check the failure, the following part can't be patch:
(quoted diff) +0
-0@@ -62,7 +62,7 @@ create_package() { fi
Quoted 9 lines
Quoted 6 lines
scripts/package/builddeb +1
-1# Create the package - dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" + dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
dpkg --build "$pdir" ..}
I think this has been word-wrapped by your mail program. Here is the patch as an attachment; that should avoid the problem.
Thanks, the attach patch is applied.
And i just make it on linux-3.2.y by hand, and is successfully cross-build. Haven't test in 3.12
Quoted 13 lines · Sh.
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines · Ben Hutchings
Quoted 12 lines
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-by "Niew, Sh." <[email protected]>Signed-off-by Ben Hutchings <[email protected]>
[...]
Quoted 3 lines
Thanks, the attach patch is applied.
And i just make it on linux-3.2.y by hand, and is successfully cross-build. Haven't test in 3.12
Thanks, applied to kbuild.git#misc.
Michal