linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg'
@ 2012-02-15 16:38 Joerg Roedel
  2012-02-15 16:38 ` [PATCH 2/2] kbuild: Only build linux-image package for UML Joerg Roedel
  2012-02-16  4:45 ` [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Ben Hutchings
  0 siblings, 2 replies; 7+ messages in thread
From: Joerg Roedel @ 2012-02-15 16:38 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 |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 3c6c0b1..39e3f30 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,7 @@ destdir=$kernel_headers_dir/usr/src/linux-headers-$version
 mkdir -p "$destdir"
 (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
 (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
+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)
 
-- 
1.7.5.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] kbuild: Only build linux-image package for UML
  2012-02-15 16:38 [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Joerg Roedel
@ 2012-02-15 16:38 ` Joerg Roedel
  2012-02-16  4:49   ` Ben Hutchings
  2012-02-16  4:45 ` [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Ben Hutchings
  1 sibling, 1 reply; 7+ messages in thread
From: Joerg Roedel @ 2012-02-15 16:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Joerg Roedel, Michal Marek, maximilian attems, Ben Hutchings,
	debian-kernel, linux-kbuild

For user-mode Linux the other packages are not required. So
only build the package with the linux-image in it.

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 |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 39e3f30..0db889f 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -130,8 +130,10 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
 	fi
 fi
 
-make headers_check
-make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
+if [ "$ARCH" != "um" ]; then
+	make headers_check
+	make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
+fi
 
 # Install the maintainer scripts
 # Note: hook scripts under /etc/kernel are also executed by official Debian
@@ -263,8 +265,6 @@ Description: Linux kernel headers for $KERNELRELEASE on $arch
  This is useful for people who need to build external modules
 EOF
 
-create_package "$kernel_headers_packagename" "$kernel_headers_dir"
-
 # Do we have firmware? Move it out of the way and build it into a package.
 if [ -e "$tmpdir/lib/firmware" ]; then
 	mv "$tmpdir/lib/firmware" "$fwdir/lib/"
@@ -291,7 +291,11 @@ Description: Linux support headers for userspace development
  are used by the installed headers for GNU glibc and other system libraries.
 EOF
 
-create_package "$libc_headers_packagename" "$libc_headers_dir"
+if [ "$ARCH" != "um" ]; then
+	create_package "$kernel_headers_packagename" "$kernel_headers_dir"
+	create_package "$libc_headers_packagename" "$libc_headers_dir"
+fi
+
 create_package "$packagename" "$tmpdir"
 
 exit 0
-- 
1.7.5.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg'
  2012-02-15 16:38 [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Joerg Roedel
  2012-02-15 16:38 ` [PATCH 2/2] kbuild: Only build linux-image package for UML Joerg Roedel
@ 2012-02-16  4:45 ` Ben Hutchings
  2012-02-24 22:56   ` Michal Marek
  1 sibling, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2012-02-16  4:45 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: linux-kernel, Michal Marek, maximilian attems, debian-kernel,
	linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

On Wed, 2012-02-15 at 17:38 +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>
[...]
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>

-- 
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] 7+ messages in thread

* Re: [PATCH 2/2] kbuild: Only build linux-image package for UML
  2012-02-15 16:38 ` [PATCH 2/2] kbuild: Only build linux-image package for UML Joerg Roedel
@ 2012-02-16  4:49   ` Ben Hutchings
  2012-02-16 21:29     ` Mattia Dongili
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2012-02-16  4:49 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: linux-kernel, Michal Marek, maximilian attems, debian-kernel,
	linux-kbuild, user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]

On Wed, 2012-02-15 at 17:38 +0100, Joerg Roedel wrote:
> For user-mode Linux the other packages are not required. So
> only build the package with the linux-image in it.
> 
> 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>
Tested-by: Ben Hutchings <ben@decadent.org.uk>

But I've never touched UML either so we should get confirmation that
this really is the right thing to do.

Ben.

> ---
>  scripts/package/builddeb |   14 +++++++++-----
>  1 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 39e3f30..0db889f 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -130,8 +130,10 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
>  	fi
>  fi
>  
> -make headers_check
> -make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
> +if [ "$ARCH" != "um" ]; then
> +	make headers_check
> +	make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
> +fi
>  
>  # Install the maintainer scripts
>  # Note: hook scripts under /etc/kernel are also executed by official Debian
> @@ -263,8 +265,6 @@ Description: Linux kernel headers for $KERNELRELEASE on $arch
>   This is useful for people who need to build external modules
>  EOF
>  
> -create_package "$kernel_headers_packagename" "$kernel_headers_dir"
> -
>  # Do we have firmware? Move it out of the way and build it into a package.
>  if [ -e "$tmpdir/lib/firmware" ]; then
>  	mv "$tmpdir/lib/firmware" "$fwdir/lib/"
> @@ -291,7 +291,11 @@ Description: Linux support headers for userspace development
>   are used by the installed headers for GNU glibc and other system libraries.
>  EOF
>  
> -create_package "$libc_headers_packagename" "$libc_headers_dir"
> +if [ "$ARCH" != "um" ]; then
> +	create_package "$kernel_headers_packagename" "$kernel_headers_dir"
> +	create_package "$libc_headers_packagename" "$libc_headers_dir"
> +fi
> +
>  create_package "$packagename" "$tmpdir"
>  
>  exit 0
> -- 
> 1.7.5.4
> 
> 
> 

-- 
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] 7+ messages in thread

* Re: [PATCH 2/2] kbuild: Only build linux-image package for UML
  2012-02-16  4:49   ` Ben Hutchings
@ 2012-02-16 21:29     ` Mattia Dongili
  2012-02-24 22:56       ` Michal Marek
  0 siblings, 1 reply; 7+ messages in thread
From: Mattia Dongili @ 2012-02-16 21:29 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Joerg Roedel, linux-kernel, Michal Marek, maximilian attems,
	debian-kernel, linux-kbuild, user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

On Thu, Feb 16, 2012 at 04:49:50AM +0000, Ben Hutchings wrote:
> On Wed, 2012-02-15 at 17:38 +0100, Joerg Roedel wrote:
> > For user-mode Linux the other packages are not required. So
> > only build the package with the linux-image in it.
> > 
> > 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>
> Tested-by: Ben Hutchings <ben@decadent.org.uk>
> 
> But I've never touched UML either so we should get confirmation that
> this really is the right thing to do.

there is a wishlist bug opened ages ago (and pinged not so long ago)
requesting headers to be packaged in debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=186930
Just to say that there is some interest in having headers packaged
somehow.

-- 
mattia
:wq!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] kbuild: Only build linux-image package for UML
  2012-02-16 21:29     ` Mattia Dongili
@ 2012-02-24 22:56       ` Michal Marek
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Marek @ 2012-02-24 22:56 UTC (permalink / raw)
  To: Mattia Dongili
  Cc: Ben Hutchings, Joerg Roedel, linux-kernel, maximilian attems,
	debian-kernel, linux-kbuild, user-mode-linux-devel

On Fri, Feb 17, 2012 at 06:29:27AM +0900, Mattia Dongili wrote:
> On Thu, Feb 16, 2012 at 04:49:50AM +0000, Ben Hutchings wrote:
> > On Wed, 2012-02-15 at 17:38 +0100, Joerg Roedel wrote:
> > > For user-mode Linux the other packages are not required. So
> > > only build the package with the linux-image in it.
> > > 
> > > 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>
> > Tested-by: Ben Hutchings <ben@decadent.org.uk>
> > 
> > But I've never touched UML either so we should get confirmation that
> > this really is the right thing to do.
> 
> there is a wishlist bug opened ages ago (and pinged not so long ago)
> requesting headers to be packaged in debian:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=186930
> Just to say that there is some interest in having headers packaged
> somehow.

As there was no further reaction, I applied the patch now to
kbuild.git#misc.

Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg'
  2012-02-16  4:45 ` [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Ben Hutchings
@ 2012-02-24 22:56   ` Michal Marek
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Marek @ 2012-02-24 22:56 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Joerg Roedel, linux-kernel, maximilian attems, debian-kernel,
	linux-kbuild

On Thu, Feb 16, 2012 at 04:45:21AM +0000, Ben Hutchings wrote:
> On Wed, 2012-02-15 at 17:38 +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>
> [...]
> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>

Applied to kbuild.git#misc.

Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-24 22:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 16:38 [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Joerg Roedel
2012-02-15 16:38 ` [PATCH 2/2] kbuild: Only build linux-image package for UML Joerg Roedel
2012-02-16  4:49   ` Ben Hutchings
2012-02-16 21:29     ` Mattia Dongili
2012-02-24 22:56       ` Michal Marek
2012-02-16  4:45 ` [PATCH 1/2] kbuild: Fix link to headers in 'make deb-pkg' Ben Hutchings
2012-02-24 22:56   ` Michal Marek

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).