* [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package
@ 2013-12-05 14:37 Ben Hutchings
2013-12-06 1:35 ` Niew, Sh.
0 siblings, 1 reply; 9+ messages in thread
From: Ben Hutchings @ 2013-12-05 14:37 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kbuild, debian-kernel, Niew, Sh.
[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]
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." <shniew@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
scripts/package/builddeb | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 90e521f..301acdc 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -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
--
Ben Hutchings
Knowledge is power. France is bacon.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-05 14:37 [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package Ben Hutchings @ 2013-12-06 1:35 ` Niew, Sh. 2013-12-06 1:40 ` Ben Hutchings 0 siblings, 1 reply; 9+ messages in thread From: Niew, Sh. @ 2013-12-06 1:35 UTC (permalink / raw) To: Ben Hutchings; +Cc: Michal Marek, linux-kbuild, debian-kernel On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > 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." <shniew@gmail.com> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> > --- > scripts/package/builddeb | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index 90e521f..301acdc 100644 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -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 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 1:35 ` Niew, Sh. @ 2013-12-06 1:40 ` Ben Hutchings 2013-12-06 1:45 ` Niew, Sh. 0 siblings, 1 reply; 9+ messages in thread From: Ben Hutchings @ 2013-12-06 1:40 UTC (permalink / raw) To: Niew, Sh.; +Cc: Michal Marek, linux-kbuild, debian-kernel [-- Attachment #1: Type: text/plain, Size: 1007 bytes --] On Fri, 2013-12-06 at 09:35 +0800, Niew, Sh. wrote: > On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > > 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." <shniew@gmail.com> > > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> [...] > 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. -- Ben Hutchings Knowledge is power. France is bacon. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 1:40 ` Ben Hutchings @ 2013-12-06 1:45 ` Niew, Sh. 2013-12-06 2:07 ` Ben Hutchings 0 siblings, 1 reply; 9+ messages in thread From: Niew, Sh. @ 2013-12-06 1:45 UTC (permalink / raw) To: Ben Hutchings; +Cc: Michal Marek, linux-kbuild, debian-kernel On Fri, Dec 6, 2013 at 9:40 AM, Ben Hutchings <ben@decadent.org.uk> wrote: > On Fri, 2013-12-06 at 09:35 +0800, Niew, Sh. wrote: >> On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: >> > 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." <shniew@gmail.com> >> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> > [...] >> 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? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 1:45 ` Niew, Sh. @ 2013-12-06 2:07 ` Ben Hutchings 2013-12-06 3:29 ` Niew, Sh. 0 siblings, 1 reply; 9+ messages in thread From: Ben Hutchings @ 2013-12-06 2:07 UTC (permalink / raw) To: Niew, Sh.; +Cc: Michal Marek, linux-kbuild, debian-kernel [-- Attachment #1: Type: text/plain, Size: 1279 bytes --] On Fri, 2013-12-06 at 09:45 +0800, Niew, Sh. wrote: > On Fri, Dec 6, 2013 at 9:40 AM, Ben Hutchings <ben@decadent.org.uk> wrote: > > On Fri, 2013-12-06 at 09:35 +0800, Niew, Sh. wrote: > >> On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > >> > 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." <shniew@gmail.com> > >> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> > > [...] > >> 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. -- Ben Hutchings Knowledge is power. France is bacon. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 2:07 ` Ben Hutchings @ 2013-12-06 3:29 ` Niew, Sh. 2013-12-06 4:04 ` Ben Hutchings 0 siblings, 1 reply; 9+ messages in thread From: Niew, Sh. @ 2013-12-06 3:29 UTC (permalink / raw) To: Ben Hutchings; +Cc: Michal Marek, linux-kbuild, debian-kernel On Fri, Dec 6, 2013 at 10:07 AM, Ben Hutchings <ben@decadent.org.uk> wrote: > On Fri, 2013-12-06 at 09:45 +0800, Niew, Sh. wrote: >> On Fri, Dec 6, 2013 at 9:40 AM, Ben Hutchings <ben@decadent.org.uk> wrote: >> > On Fri, 2013-12-06 at 09:35 +0800, Niew, Sh. wrote: >> >> On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: >> >> > 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." <shniew@gmail.com> >> >> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> >> > [...] >> >> 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" .. } >> What if i want to test this to 3.2? > > Then you're on your own, sorry. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 3:29 ` Niew, Sh. @ 2013-12-06 4:04 ` Ben Hutchings 2013-12-06 4:20 ` Niew, Sh. 0 siblings, 1 reply; 9+ messages in thread From: Ben Hutchings @ 2013-12-06 4:04 UTC (permalink / raw) To: Niew, Sh.; +Cc: Michal Marek, linux-kbuild, debian-kernel [-- Attachment #1.1: Type: text/plain, Size: 2063 bytes --] On Fri, 2013-12-06 at 11:29 +0800, Niew, Sh. wrote: > On Fri, Dec 6, 2013 at 10:07 AM, Ben Hutchings <ben@decadent.org.uk> wrote: > > On Fri, 2013-12-06 at 09:45 +0800, Niew, Sh. wrote: > >> On Fri, Dec 6, 2013 at 9:40 AM, Ben Hutchings <ben@decadent.org.uk> wrote: > >> > On Fri, 2013-12-06 at 09:35 +0800, Niew, Sh. wrote: > >> >> On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > >> >> > 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." <shniew@gmail.com> > >> >> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> > >> > [...] > >> >> 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" .. > } I think this has been word-wrapped by your mail program. Here is the patch as an attachment; that should avoid the problem. Ben. > >> What if i want to test this to 3.2? > > > > Then you're on your own, sorry. -- Ben Hutchings Knowledge is power. France is bacon. [-- Attachment #1.2: 0001-deb-pkg-Fix-cross-building-linux-headers-package.patch --] [-- Type: text/x-patch, Size: 2138 bytes --] From ed10ade229438f3f4ce563e609093fa6362ff0f0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings <ben@decadent.org.uk> 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. Fixes: cd8d60a20a45 ('kbuild: create linux-headers package in deb-pkg') Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- scripts/package/builddeb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 90e521f..301acdc 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -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 [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 4:04 ` Ben Hutchings @ 2013-12-06 4:20 ` Niew, Sh. 2014-01-03 16:24 ` Michal Marek 0 siblings, 1 reply; 9+ messages in thread From: Niew, Sh. @ 2013-12-06 4:20 UTC (permalink / raw) To: Ben Hutchings; +Cc: Michal Marek, linux-kbuild, debian-kernel On Fri, Dec 6, 2013 at 12:04 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > On Fri, 2013-12-06 at 11:29 +0800, Niew, Sh. wrote: >> On Fri, Dec 6, 2013 at 10:07 AM, Ben Hutchings <ben@decadent.org.uk> wrote: >> > On Fri, 2013-12-06 at 09:45 +0800, Niew, Sh. wrote: >> >> On Fri, Dec 6, 2013 at 9:40 AM, Ben Hutchings <ben@decadent.org.uk> wrote: >> >> > On Fri, 2013-12-06 at 09:35 +0800, Niew, Sh. wrote: >> >> >> On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: >> >> >> > 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." <shniew@gmail.com> >> >> >> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk> >> >> > [...] >> >> >> 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" .. >> } > > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package 2013-12-06 4:20 ` Niew, Sh. @ 2014-01-03 16:24 ` Michal Marek 0 siblings, 0 replies; 9+ messages in thread From: Michal Marek @ 2014-01-03 16:24 UTC (permalink / raw) To: Niew, Sh., Ben Hutchings; +Cc: linux-kbuild, debian-kernel On 2013-12-06 05:20, Niew, Sh. wrote: >>>>>>> On Thu, Dec 5, 2013 at 10:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: >>>>>>>> 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." <shniew@gmail.com> >>>>>>>> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> [...] > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-03 16:25 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-05 14:37 [PATCH 1/2] deb-pkg: Fix cross-building linux-headers package Ben Hutchings 2013-12-06 1:35 ` Niew, Sh. 2013-12-06 1:40 ` Ben Hutchings 2013-12-06 1:45 ` Niew, Sh. 2013-12-06 2:07 ` Ben Hutchings 2013-12-06 3:29 ` Niew, Sh. 2013-12-06 4:04 ` Ben Hutchings 2013-12-06 4:20 ` Niew, Sh. 2014-01-03 16:24 ` Michal Marek
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.