All of lore.kernel.org
 help / color / mirror / Atom feed
From: maximilian attems <max@stro.at>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Michal Marek <mmarek@suse.cz>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: create linux-headers package in deb-pkg
Date: Sat, 25 Dec 2010 11:20:26 +0000	[thread overview]
Message-ID: <20101225112026.GF20262@vostochny.stro.at> (raw)
In-Reply-To: <1293201730-1583-1-git-send-email-tytso@mit.edu>

On Fri, Dec 24, 2010 at 09:42:10AM -0500, Theodore Ts'o wrote:
> Create a linux-headers-$KVER.deb package which can be used to build
> external modules without having the source tree around.

thanks that's great.


fjp had back a year ago asked for a bindeb-pkg once we add more things
to deb-pkg. I had submitted linux-libc-dev built out of deb-pkg
http://marc.info/?l=linux-kbuild&m=125737390700914&w=2

It's an orthogonal issue, but just to clear it up.

-- 
maks

> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> ---
>  scripts/package/builddeb |   28 +++++++++++++++++++++++++++-
>  1 files changed, 27 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 49b74e1..cb5b29d 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -40,15 +40,17 @@ else
>  fi
>  tmpdir="$objtree/debian/tmp"
>  fwdir="$objtree/debian/fwtmp"
> +hdrdir="$objtree/debian/hdrtmp"
>  packagename=linux-image-$version
>  fwpackagename=linux-firmware-image
> +hdrpackagename=linux-headers-$version
>  
>  if [ "$ARCH" = "um" ] ; then
>  	packagename=user-mode-linux-$version
>  fi
>  
>  # Setup the directory structure
> -rm -rf "$tmpdir" "$fwdir"
> +rm -rf "$tmpdir" "$fwdir" "$hdrdir"
>  mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
>  mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
>  if [ "$ARCH" = "um" ] ; then
> @@ -188,6 +190,30 @@ EOF
>  
>  fi
>  
> +# Build header package
> +find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
> +find arch/x86/include include scripts -type f >> /tmp/files$$
x86 centric?
> +(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
> +destdir=$hdrdir/usr/src/linux-headers-$version
> +mkdir -p "$destdir" "$hdrdir/DEBIAN" "$hdrdir/usr/share/doc/$hdrpackagename"
could move up to the other mkdir calls.
> +tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
> +(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
> +rm -f /tmp/files$$ /tmp/objfiles$$
> +arch=$(dpkg --print-architecture)
> +
> +cat <<EOF >> debian/control
> +
> +Package: $hdrpackagename
> +Provides: linux-headers, linux-headers-2.6
> +Architecture: $arch
not sure if that will interfere with the new crosscompile feature
of deb-pkg in linux-next.
> +Description: Linux kernel headers for $KERNELRELEASE on $arch
> + This package provides kernel header files for $KERNELRELEASE on $arch
> + .
> + This is useful for people who need to build external modules
> +EOF
> +
> +create_package "$hdrpackagename" "$hdrdir"
> +
>  # 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/"

  reply	other threads:[~2010-12-25 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-24 14:42 [PATCH] kbuild: create linux-headers package in deb-pkg Theodore Ts'o
2010-12-25 11:20 ` maximilian attems [this message]
2010-12-29 13:07   ` Michal Marek
2011-01-10 17:46   ` maximilian attems
2011-01-13 13:55     ` Michal Marek
2011-01-13 14:38       ` maximilian attems
2011-01-18 19:52         ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101225112026.GF20262@vostochny.stro.at \
    --to=max@stro.at \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.