public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com, amikan@ilbers.de, jan.kiszka@siemens.com
Cc: henning.schild@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [RFC v2 0/2] package linux-perf-<version> in kernel recipe
Date: Tue, 27 Apr 2021 11:24:56 +0200	[thread overview]
Message-ID: <20210427092458.4261-1-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <4d3f03d0-817a-4815-1a37-ce91388463ab@ilbers.de>

Hi Anton,

there has been some back and forth on how to package perf and its python bindings.
IMO the out-of-tree packaging provides the most promising solution here,
as the kernel versions do not have to match exactly.

Also with debian bullseye things changed again, as an exact-version binding was
introduced between linux-perf and linxu-perf-<KR>. By that, both have to be
build from the same source package. Now, we build and provide that package as well.

Our final goal for all the effort was to get the python bindings of perf packaged.
These are missing in upstream debian. Unfortunately the kernel itself does not
provide any hooks to inject the version "into" the python-binding c source files,
so we have to use patches to inject the version into the c function names.
I already sent that patch to debian but did not get a response yet.
For details, see here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860957

Anyways, we run this patch series on a bunch of images for both
debian-buster and debian-bullseye (both custom and debian kernels) for a while.
In combination with the wrapper in patch 2, even things like
`import perf` work flawlessly.

Best regards,
Felix

Felix Moessbauer (2):
  RFC: Package perf from linux kernel tools
  Add wrapper to load correct python perf module based on kernel

 .../files/debian/linux-base.install           |   6 +
 .../files/lib/python3/dist-packages/perf.py   |  23 ++++
 .../recipes-core/linux-base/linux-base_4.6.bb |  25 ++++
 .../linux-perf/debian/control.tmpl            |  45 ++++++
 .../recipes-kernel/linux-perf/debian/rules    |  59 ++++++++
 .../files/4.19/tools-perf-install.patch       |  58 ++++++++
 .../files/4.19/tools-perf-python.patch        |  55 ++++++++
 .../files/4.19/tools-perf-version.patch       | 119 ++++++++++++++++
 .../files/5.10/tools-perf-install.patch       |  52 +++++++
 .../files/5.10/tools-perf-python.patch        |  56 ++++++++
 .../files/5.10/tools-perf-version.patch       | 128 ++++++++++++++++++
 .../recipes-kernel/linux-perf/files/rules     |  53 ++++++++
 .../linux-perf/files/tools-perf-install.patch |  58 ++++++++
 .../linux-perf/files/tools-perf-python.patch  |  55 ++++++++
 .../linux-perf/files/tools-perf-version.patch | 119 ++++++++++++++++
 .../linux-perf/linux-perf-4.19_4.19.160.bb    |  15 ++
 .../linux-perf/linux-perf-5.10_5.10.26.bb     |  15 ++
 .../recipes-kernel/linux-perf/linux-perf.inc  |  47 +++++++
 18 files changed, 988 insertions(+)
 create mode 100644 meta-isar/recipes-core/linux-base/files/debian/linux-base.install
 create mode 100644 meta-isar/recipes-core/linux-base/files/lib/python3/dist-packages/perf.py
 create mode 100644 meta-isar/recipes-core/linux-base/linux-base_4.6.bb
 create mode 100644 meta-isar/recipes-kernel/linux-perf/debian/control.tmpl
 create mode 100644 meta-isar/recipes-kernel/linux-perf/debian/rules
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/4.19/tools-perf-install.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/4.19/tools-perf-python.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/4.19/tools-perf-version.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/5.10/tools-perf-install.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/5.10/tools-perf-python.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/5.10/tools-perf-version.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/rules
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/tools-perf-install.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/tools-perf-python.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/files/tools-perf-version.patch
 create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf-4.19_4.19.160.bb
 create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf-5.10_5.10.26.bb
 create mode 100644 meta-isar/recipes-kernel/linux-perf/linux-perf.inc

-- 
2.20.1


  reply	other threads:[~2021-04-27  9:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 12:41 [PATCH 0/1] RFC: Package perf from linux kernel tools Felix Moessbauer
2021-01-19 12:41 ` [PATCH 1/1] " Felix Moessbauer
2021-01-19 16:31   ` Baurzhan Ismagulov
2021-01-20 15:23     ` Moessbauer, Felix
2021-01-20 15:26       ` Henning Schild
2021-01-21 10:52       ` [PATCH v2 0/2] " Felix Moessbauer
2021-01-21 11:56         ` Jan Kiszka
2021-01-21 15:00           ` Moessbauer, Felix
2021-01-21 16:35             ` Jan Kiszka
2021-02-09  8:58         ` Anton Mikanovich
2021-02-17 10:18         ` Baurzhan Ismagulov
2021-01-21 10:52       ` [PATCH 1/2] feat: package linux-perf-<version> in kernel recipe Felix Moessbauer
2021-02-17 10:28         ` Baurzhan Ismagulov
2021-02-18  8:01           ` Moessbauer, Felix
2021-02-18  8:28             ` Jan Kiszka
2021-04-22  9:52             ` Anton Mikanovich
2021-04-27  9:24               ` Felix Moessbauer [this message]
2021-04-27  9:24               ` [PATCH v2 1/2] RFC: Package perf from linux kernel tools Felix Moessbauer
2021-04-27  9:24               ` [PATCH v2 2/2] Add wrapper to load correct python perf module based on kernel Felix Moessbauer
2021-01-21 10:52       ` [PATCH 2/2] feat: add and package python bindings for perf Felix Moessbauer
2021-01-20 11:12 ` [PATCH 0/1] RFC: Package perf from linux kernel tools Henning Schild
2021-01-20 11:21 ` Henning Schild

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=20210427092458.4261-1-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /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