[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events



On Mon, 2019-11-04 at 21:44 +0000, Sudip Mukherjee wrote:
[...]
> The code for libtracevent lives in the kernel tree at
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
> And so, it will be great if kernel team will like to package and maintain it, if not, then I will
> be happy to do it. But, if I am doing it then I will need a sponsor to upload it.

If kernel.org's kernel source repository is the canonical location for
this code, not just a convenience copy, then the binary package should
be built from src:linux and not a separate source package.

I think src:linux already builds the library, but only as a static
library that's linked into perf.

I don't know exactly what changes you would need to make, but they
should be roughly along these lines:

1. Add debian/rules.d/tools/lib/traceevent/Makefile with a default
   target that calls the upstream build system.  This must build in
   the current directory (somewhere under debian/build) and not the
   source directory.  It must enable printing of all build comamnds
   by default.

2. Define the new binary packages and their build-dependencies in
   debian/templates/control.tools-unversioned.in.  These packages
   must have "Build-Profiles: <!stage1 !pkg.linux.notools>".

3. Define build-libtraceevent and install-libtraceevent targets in 
   debian/rules.real, similarly to those for libcpupower.
   Add those to the dependencies of the build-arch-arch and
   binary-arch-arch targets, using the if_package macro to check
   whether the packages should be built.

4. Generate the debian/libtraceevent<soversion>.symbols file recording
   the shared library's exported symbols.

5. (Not sure if this is needed.)  Modify
   debian/rules.d/tools/perf/Makefile to make perf use the shared
   library.  Add libtraceevent<soversion> to the dependencies of
   linux-perf-<version> in debian/templates/control.tools-versioned.in.

Ben.

-- 
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: