public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: linux-kernel@vger.kernel.org, Michal Marek <mmarek@suse.cz>,
	maximilian attems <max@stro.at>,
	debian-kernel@lists.debian.org, linux-kbuild@vger.kernel.org,
	Ubuntu kernel team <kernel-team@lists.ubuntu.com>
Subject: Re: [RFC PATCH] kbuild: Build linux-tools package with 'make deb-pkg'
Date: Fri, 17 Feb 2012 03:16:37 +0000	[thread overview]
Message-ID: <1329448597.3258.28.camel@deadeye> (raw)
In-Reply-To: <1329418664-1750-1-git-send-email-joerg.roedel@amd.com>

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

On Thu, 2012-02-16 at 19:57 +0100, Joerg Roedel wrote:
> Also build a linux-tools package for installation so that
> common tools run without issues (e.g. perf).
> 
> [RFC note: This may break with x-compilation when the
>            x-compilation environment is not set up to
> 	   compile user-space programs. Is that acceptable?
> 	   I also thought about a compile-time parameter
> 	   such as 'make TOOLS=1 deb-pkg' or a special
> 	   'make deb-tools-pkg' target.	Opinions? ]
> 
> 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 |   55 +++++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 54 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index eee5f8e..8466380 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -78,17 +78,19 @@ tmpdir="$objtree/debian/tmp"
>  fwdir="$objtree/debian/fwtmp"
>  kernel_headers_dir="$objtree/debian/hdrtmp"
>  libc_headers_dir="$objtree/debian/headertmp"
> +tools_dir="$objtree/debian/toolstmp"
>  packagename=linux-image-$version
>  fwpackagename=linux-firmware-image
>  kernel_headers_packagename=linux-headers-$version
>  libc_headers_packagename=linux-libc-dev
> +tools_packagename=linux-tools-$version

The advice I got from one of the perf developers - possibly Peter
Zijlstra - was that changes to the perf kernel interface are backward-
compatible but newer versions of the perf tool may depend on newer
kernel features.  New features involve a bump to the 2nd (at the time,
it was the 3rd) version component unless you're building from a perf
development branch.

So to avoid package proliferation the package name should be
linux-tools-$VERSION.$PATCHLEVEL and the executable filenames should be
something like perf_$VERSION.$PATCHLEVEL-$subcommand.  This is what we
do in Debian.

However, Ubuntu uses the full kernel release string (as do several
RPM-based distributions).  So at the moment you can't build a versioned
perf that's going to work in both.  But that is fixable if one of the
perf wrappers is changed to fall back to the alternate naming scheme.

[...]
> +# Build the tools
> +num_tools="0"
> +tools_flavour_abi=${version#*-}
> +tools_flavour=${tools_flavour_abi#*-}
> +tools_version=${version%-$tools_flavour}
> +if grep -q '^CONFIG_PERF_EVENTS=y' .config ; then
> +	# Build perf
> +	(
> +	 mkdir -p $objtree/tools/perf
> +	 cd "$srctree/tools/perf"
> +	 $MAKE LDFLAGS= O=$O/tools/perf
> +	 cp $objtree/tools/perf/perf "$tools_dir/usr/bin/perf_$tools_version"
[...]

What about the manual pages and scripting support?

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 --]

  reply	other threads:[~2012-02-17  3:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 18:57 [RFC PATCH] kbuild: Build linux-tools package with 'make deb-pkg' Joerg Roedel
2012-02-17  3:16 ` Ben Hutchings [this message]
2012-02-17  3:46   ` Ben Hutchings
2012-02-23 11:17     ` Joerg Roedel
  -- strict thread matches above, loose matches on Subject: below --
2013-04-10  7:41 Sedat Dilek
2013-04-10  7:57 ` Joerg Roedel

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=1329448597.3258.28.camel@deadeye \
    --to=ben@decadent.org.uk \
    --cc=debian-kernel@lists.debian.org \
    --cc=joerg.roedel@amd.com \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@stro.at \
    --cc=mmarek@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox