* [PATCH v2] kbuild: Fix link to headers in 'make deb-pkg'
@ 2012-02-13 14:48 Joerg Roedel
2012-02-14 2:49 ` Ben Hutchings
0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2012-02-13 14:48 UTC (permalink / raw)
To: linux-kernel
Cc: Joerg Roedel, Michal Marek, maximilian attems, Ben Hutchings,
debian-kernel, linux-kbuild
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: Michal Marek <mmarek@suse.cz>
Cc: maximilian attems <max@stro.at>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: debian-kernel@lists.debian.org
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
scripts/package/builddeb | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f6cbc3d..fc3f76a 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,12 @@ destdir=$kernel_headers_dir/usr/src/linux-headers-$version
mkdir -p "$destdir"
(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -)
(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
+ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
+if [ "$ARCH" = "um" ] ; then
+ mkdir -p "$kernel_headers_dir/usr/lib/uml/modules/$version/"
+ mv "$kernel_headers_dir/lib/modules/$version"/* "$kernel_headers_dir/usr/lib/uml/modules/$version/"
+ rmdir "$kernel_headers_dir/lib/modules/$version"
+fi
rm -f /tmp/files$$ /tmp/objfiles$$
arch=$(dpkg --print-architecture)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: Fix link to headers in 'make deb-pkg'
2012-02-13 14:48 [PATCH v2] kbuild: Fix link to headers in 'make deb-pkg' Joerg Roedel
@ 2012-02-14 2:49 ` Ben Hutchings
2012-02-15 11:20 ` Joerg Roedel
0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2012-02-14 2:49 UTC (permalink / raw)
To: Joerg Roedel
Cc: linux-kernel, Michal Marek, maximilian attems, debian-kernel,
linux-kbuild
[-- Attachment #1: Type: text/plain, Size: 2964 bytes --]
On Mon, 2012-02-13 at 15:48 +0100, Joerg Roedel wrote:
> 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: Michal Marek <mmarek@suse.cz>
> Cc: maximilian attems <max@stro.at>
> Cc: Ben Hutchings <ben@decadent.org.uk>
> Cc: debian-kernel@lists.debian.org
> Cc: linux-kbuild@vger.kernel.org
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This looks good for !UML.
I wonder about the UML case though. Did you test it? In 3.3-rc3,
'make headers_install' is broken. But if I suppress the header check,
the resulting packages have links in the right places.
I'm also unconvinced that anyone will be interested in building an OOT
module for UML; and if they do their build script or makefile will use
'make -C /lib/modules/<version>/build' which won't work. Maybe for UML
we should only build the 'image' package?
Ben.
> ---
> scripts/package/builddeb | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index f6cbc3d..fc3f76a 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,12 @@ destdir=$kernel_headers_dir/usr/src/linux-headers-$version
> mkdir -p "$destdir"
> (cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -)
> (cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
> +ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
> +if [ "$ARCH" = "um" ] ; then
> + mkdir -p "$kernel_headers_dir/usr/lib/uml/modules/$version/"
> + mv "$kernel_headers_dir/lib/modules/$version"/* "$kernel_headers_dir/usr/lib/uml/modules/$version/"
> + rmdir "$kernel_headers_dir/lib/modules/$version"
> +fi
> rm -f /tmp/files$$ /tmp/objfiles$$
> arch=$(dpkg --print-architecture)
>
--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: Fix link to headers in 'make deb-pkg'
2012-02-14 2:49 ` Ben Hutchings
@ 2012-02-15 11:20 ` Joerg Roedel
2012-02-15 13:47 ` Ben Hutchings
0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2012-02-15 11:20 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-kernel, Michal Marek, maximilian attems, debian-kernel,
linux-kbuild
On Tue, Feb 14, 2012 at 02:49:13AM +0000, Ben Hutchings wrote:
> On Mon, 2012-02-13 at 15:48 +0100, Joerg Roedel wrote:
> > 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: Michal Marek <mmarek@suse.cz>
> > Cc: maximilian attems <max@stro.at>
> > Cc: Ben Hutchings <ben@decadent.org.uk>
> > Cc: debian-kernel@lists.debian.org
> > Cc: linux-kbuild@vger.kernel.org
> > Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
>
> This looks good for !UML.
>
> I wonder about the UML case though. Did you test it? In 3.3-rc3,
> 'make headers_install' is broken. But if I suppress the header check,
> the resulting packages have links in the right places.
I havn't tested UML, I am not really familiar with using it. You are
probably right that for UML only the linux-image package is needed. I
can remove the UML check from this patch and post another one which
changes the script to only build linux-image for UML, how does that
sound?
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kbuild: Fix link to headers in 'make deb-pkg'
2012-02-15 11:20 ` Joerg Roedel
@ 2012-02-15 13:47 ` Ben Hutchings
0 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2012-02-15 13:47 UTC (permalink / raw)
To: Joerg Roedel
Cc: linux-kernel, Michal Marek, maximilian attems, debian-kernel,
linux-kbuild
[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]
On Wed, 2012-02-15 at 12:20 +0100, Joerg Roedel wrote:
> On Tue, Feb 14, 2012 at 02:49:13AM +0000, Ben Hutchings wrote:
> > On Mon, 2012-02-13 at 15:48 +0100, Joerg Roedel wrote:
> > > 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: Michal Marek <mmarek@suse.cz>
> > > Cc: maximilian attems <max@stro.at>
> > > Cc: Ben Hutchings <ben@decadent.org.uk>
> > > Cc: debian-kernel@lists.debian.org
> > > Cc: linux-kbuild@vger.kernel.org
> > > Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> >
> > This looks good for !UML.
> >
> > I wonder about the UML case though. Did you test it? In 3.3-rc3,
> > 'make headers_install' is broken. But if I suppress the header check,
> > the resulting packages have links in the right places.
>
> I havn't tested UML, I am not really familiar with using it. You are
> probably right that for UML only the linux-image package is needed. I
> can remove the UML check from this patch and post another one which
> changes the script to only build linux-image for UML, how does that
> sound?
Sounds good to me.
Ben.
--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-15 13:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 14:48 [PATCH v2] kbuild: Fix link to headers in 'make deb-pkg' Joerg Roedel
2012-02-14 2:49 ` Ben Hutchings
2012-02-15 11:20 ` Joerg Roedel
2012-02-15 13:47 ` Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).