Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] powertop: upgrade to 2.16
@ 2026-08-18 12:28 Jaipaul Cheernam
  2026-08-18 12:28 ` [PATCH 1/2] libtracefs: import recipe from meta-oe Jaipaul Cheernam
  2026-08-18 12:28 ` [PATCH 2/2] powertop: upgrade 2.15 -> 2.16 Jaipaul Cheernam
  0 siblings, 2 replies; 3+ messages in thread
From: Jaipaul Cheernam @ 2026-08-18 12:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jaipaul Cheernam

Upgrade powertop from 2.15 to 2.16. This required importing libtracefs
from meta-oe since upstream removed its internal libtraceevent copy and
now links against the external libtracefs library.

The 2.16 release also switches to meson as the default build system [1].
The autotools build is broken (C++11 in configure.ac but the codebase
uses C++20 features throughout). See upstream issue #124 [2] which has
been open since 2025 with no fix.

A corresponding removal patch for meta-openembedded is needed once this
series lands (libtracefs moving from meta-oe to oe-core).

[1] https://github.com/fenrus75/powertop/releases/tag/v2.16
[2] https://github.com/fenrus75/powertop/issues/124

Jaipaul Cheernam (2):
  libtracefs: import recipe from meta-oe
  powertop: upgrade 2.15 -> 2.16

 meta/conf/distro/include/maintainers.inc      |  1 +
 ...not-preserve-ownership-in-cp-command.patch | 28 ++++++++++
 .../libtracefs/libtracefs_1.8.3.bb            | 25 +++++++++
 .../0001-wakeup_xxx.h-include-limits.h.patch  | 55 -------------------
 .../{powertop_2.15.bb => powertop_2.16.bb}    | 14 ++---
 5 files changed, 61 insertions(+), 62 deletions(-)
 create mode 100644 meta/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
 create mode 100644 meta/recipes-kernel/libtracefs/libtracefs_1.8.3.bb
 delete mode 100644 meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch
 rename meta/recipes-kernel/powertop/{powertop_2.15.bb => powertop_2.16.bb} (67%)



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

* [PATCH 1/2] libtracefs: import recipe from meta-oe
  2026-08-18 12:28 [PATCH 0/2] powertop: upgrade to 2.16 Jaipaul Cheernam
@ 2026-08-18 12:28 ` Jaipaul Cheernam
  2026-08-18 12:28 ` [PATCH 2/2] powertop: upgrade 2.15 -> 2.16 Jaipaul Cheernam
  1 sibling, 0 replies; 3+ messages in thread
From: Jaipaul Cheernam @ 2026-08-18 12:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jaipaul Cheernam

powertop 2.16 requires libtracefs (2b133ed [1]). Since powertop is
in oe-core and libtraceevent is already here, bring libtracefs over.

[1] https://github.com/fenrus75/powertop/commit/2b133ed512c6852cf81cb98831bdfd585c0317bf

Changes from meta-oe version:
- fix SUMMARY
- add maintainer entry

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 ...not-preserve-ownership-in-cp-command.patch | 28 +++++++++++++++++++
 .../libtracefs/libtracefs_1.8.3.bb            | 25 +++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
 create mode 100644 meta/recipes-kernel/libtracefs/libtracefs_1.8.3.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index ecba7d0db1..30f3d510df 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -414,6 +414,7 @@ RECIPE_MAINTAINER:pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER:pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER:pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>"
 RECIPE_MAINTAINER:pn-libtraceevent = "Bruce Ashfield <bruce.ashfield@gmail.com>"
+RECIPE_MAINTAINER:pn-libtracefs = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-libtry-tiny-perl = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-libubootenv = "Stefano Babic <sbabic@nabladev.com>"
 RECIPE_MAINTAINER:pn-libucontext = "Khem Raj <raj.khem@gmail.com>"
diff --git a/meta/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/meta/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
new file mode 100644
index 0000000000..7eaf29e4c4
--- /dev/null
+++ b/meta/recipes-kernel/libtracefs/libtracefs/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch
@@ -0,0 +1,28 @@
+From ab6f78bfd6811c648ee71663cfc4dc8be151a519 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 21 Dec 2022 22:50:56 -0800
+Subject: [PATCH] makefile: Do not preserve ownership in cp command
+
+Fixes
+ERROR: libtracefs-1.6.3-r0 do_package_qa: QA Issue: libtracefs: /usr/lib/libtracefs.so is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 7f4f5c3..1ba7b9d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -296,7 +296,7 @@ endif # DESTDIR = ""
+ 
+ install_libs: libs install_pkgconfig
+ 	$(Q)$(call do_install,$(LIBTRACEFS_SHARED),$(libdir_SQ)); \
+-		cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
++		cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
+ 	$(Q)$(call do_install,$(src)/include/tracefs.h,$(includedir_SQ),644)
+ 	$(Q)$(call install_ld_config)
+ 
diff --git a/meta/recipes-kernel/libtracefs/libtracefs_1.8.3.bb b/meta/recipes-kernel/libtracefs/libtracefs_1.8.3.bb
new file mode 100644
index 0000000000..c010555b1f
--- /dev/null
+++ b/meta/recipes-kernel/libtracefs/libtracefs_1.8.3.bb
@@ -0,0 +1,25 @@
+# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library to access the kernel tracefs directory"
+HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
+LICENSE = "GPL-2.0-or-later AND LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
+                    file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"
+SECTION = "libs"
+DEPENDS = "libtraceevent bison-native flex-native"
+
+SRCREV = "6fad6a14ba0d4c4b437d9e4eed7098d4bb07b4fc"
+SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git;branch=${BPN};protocol=https \
+           file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch \
+           "
+
+inherit pkgconfig bash-completion
+
+do_compile:prepend() {
+    touch ${S}/src/sqlhist.tab.c
+}
+
+do_install() {
+    oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig
+}


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

* [PATCH 2/2] powertop: upgrade 2.15 -> 2.16
  2026-08-18 12:28 [PATCH 0/2] powertop: upgrade to 2.16 Jaipaul Cheernam
  2026-08-18 12:28 ` [PATCH 1/2] libtracefs: import recipe from meta-oe Jaipaul Cheernam
@ 2026-08-18 12:28 ` Jaipaul Cheernam
  1 sibling, 0 replies; 3+ messages in thread
From: Jaipaul Cheernam @ 2026-08-18 12:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jaipaul Cheernam

Release: https://github.com/fenrus75/powertop/releases/tag/v2.16

CompareLog: https://github.com/fenrus75/powertop/compare/v2.15...v2.16

- switch to meson (upstream default since 2.16, 6a18fe2 [1])
- add libtracefs to DEPENDS (internal copy removed upstream, 2b133ed [2])
- use --bindir to keep installing to /usr/sbin
- drop autoconf-archive-native and LDFLAGS -pthread
- drop 0001-wakeup_xxx.h-include-limits.h.patch (PATH_MAX no longer
  used in those headers after upstream C++ modernization)

[1] https://github.com/fenrus75/powertop/commit/6a18fe2d933ad0f16ccc64b40e832f571319c518
[2] https://github.com/fenrus75/powertop/commit/2b133ed512c6852cf81cb98831bdfd585c0317bf

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 .../0001-wakeup_xxx.h-include-limits.h.patch  | 55 -------------------
 .../{powertop_2.15.bb => powertop_2.16.bb}    | 14 ++---
 2 files changed, 7 insertions(+), 62 deletions(-)
 delete mode 100644 meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch
 rename meta/recipes-kernel/powertop/{powertop_2.15.bb => powertop_2.16.bb} (67%)

diff --git a/meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch b/meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch
deleted file mode 100644
index 7bfca8abfd..0000000000
--- a/meta/recipes-kernel/powertop/powertop/0001-wakeup_xxx.h-include-limits.h.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 4c24fdd8e0a42359df7308155b2d43c28a5e02fd Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Mon, 20 May 2019 20:25:00 +0200
-Subject: [PATCH] wakeup_xxx.h: include limits.h
-
-limits.h must be included to define PATH_MAX otherwise build will fail
-on:
-
-In file included from wakeup/wakeup_ethernet.cpp:45:0:
-wakeup/wakeup_ethernet.h:35:16: error: 'PATH_MAX' was not declared in this scope
-  char eth_path[PATH_MAX];
-
-In file included from wakeup/wakeup_usb.cpp:45:0:
-wakeup/wakeup_usb.h:35:16: error: 'PATH_MAX' was not declared in this scope
-  char usb_path[PATH_MAX];
-
-Fixes:
- - http://autobuild.buildroot.org/results/a0b3337cf4a827e6566f8b15b6bb180f0dcef7a3
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Submitted [https://lists.01.org/pipermail/powertop/2019-May/002052.html]
----
- src/wakeup/wakeup_ethernet.h | 1 +
- src/wakeup/wakeup_usb.h      | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/wakeup/wakeup_ethernet.h b/src/wakeup/wakeup_ethernet.h
-index 682bf95..e0fa628 100644
---- a/src/wakeup/wakeup_ethernet.h
-+++ b/src/wakeup/wakeup_ethernet.h
-@@ -25,6 +25,7 @@
- #ifndef _INCLUDE_GUARD_ETHERNET_WAKEUP_H
- #define _INCLUDE_GUARD_ETHERNET_WAKEUP_H
- 
-+#include <limits.h>
- #include <vector>
- 
- #include "wakeup.h"
-diff --git a/src/wakeup/wakeup_usb.h b/src/wakeup/wakeup_usb.h
-index f7a1f7e..15898e3 100644
---- a/src/wakeup/wakeup_usb.h
-+++ b/src/wakeup/wakeup_usb.h
-@@ -25,6 +25,7 @@
- #ifndef _INCLUDE_GUARD_USB_WAKEUP_H
- #define _INCLUDE_GUARD_USB_WAKEUP_H
- 
-+#include <limits.h>
- #include <vector>
- 
- #include "wakeup.h"
--- 
-2.20.1
-
diff --git a/meta/recipes-kernel/powertop/powertop_2.15.bb b/meta/recipes-kernel/powertop/powertop_2.16.bb
similarity index 67%
rename from meta/recipes-kernel/powertop/powertop_2.15.bb
rename to meta/recipes-kernel/powertop/powertop_2.16.bb
index 5dceac17d3..674cf67b5a 100644
--- a/meta/recipes-kernel/powertop/powertop_2.15.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.16.bb
@@ -2,21 +2,21 @@ SUMMARY = "Power usage tool"
 DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
 HOMEPAGE = "https://01.org/powertop/"
 BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla"
-DEPENDS = "ncurses libnl pciutils autoconf-archive-native"
+DEPENDS = "ncurses libnl pciutils libtracefs"
 LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
 
-SRC_URI = "git://github.com/fenrus75/powertop;protocol=https;branch=master;tag=v${PV} \
-           file://0001-wakeup_xxx.h-include-limits.h.patch \
-           "
-SRCREV = "d51ad395436d4d1dcc3ca46e1519ffeb475bf651"
+SRC_URI = "git://github.com/fenrus75/powertop;protocol=https;branch=master;tag=v${PV}"
+SRCREV = "6147262e506c607036eaca4182ee491b61d06aa3"
 
-LDFLAGS += "-pthread"
+inherit meson gettext pkgconfig bash-completion
 
-inherit autotools gettext pkgconfig bash-completion
+# meson defaults to /usr/bin, keep /usr/sbin for backward compatibility
+EXTRA_OEMESON = "--bindir=${sbindir}"
 
 inherit update-alternatives
 ALTERNATIVE:${PN} = "powertop"
 ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
 ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
 ALTERNATIVE_PRIORITY = "100"
+


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

end of thread, other threads:[~2026-08-18 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 12:28 [PATCH 0/2] powertop: upgrade to 2.16 Jaipaul Cheernam
2026-08-18 12:28 ` [PATCH 1/2] libtracefs: import recipe from meta-oe Jaipaul Cheernam
2026-08-18 12:28 ` [PATCH 2/2] powertop: upgrade 2.15 -> 2.16 Jaipaul Cheernam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox