summaryrefslogtreecommitdiff
path: root/libre/linux-libre-tools
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre-tools')
-rw-r--r--libre/linux-libre-tools/PKGBUILD61
-rw-r--r--libre/linux-libre-tools/cpupower.service1
-rw-r--r--libre/linux-libre-tools/cpupower.systemd2
-rw-r--r--libre/linux-libre-tools/perf-fix-types.patch22
4 files changed, 47 insertions, 39 deletions
diff --git a/libre/linux-libre-tools/PKGBUILD b/libre/linux-libre-tools/PKGBUILD
index a54342e1b..e68927782 100644
--- a/libre/linux-libre-tools/PKGBUILD
+++ b/libre/linux-libre-tools/PKGBUILD
@@ -1,15 +1,19 @@
-# Maintainer (Arch): Sébastien Luttringer
+# Maintainer (arch:linux-tools): Sébastien Luttringer <seblu@archlinux.org>
# Maintainer: David P. <megver83@parabola.nu>
# Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
+# Contributor: bill-auger <bill-auger@programmer.net>
-# parabola changes and rationale (adapted from core/linux-tools):
-# - changed upstream source url to linux-libre
+
+# parabola changes and rationale:
+# - changed upstream to linux-libre
# - removed hyperV and bpf support
+
pkgbase=linux-libre-tools
pkgname=(
+ 'bootconfig'
'cgroup_event_listener'
'cpupower'
'libtraceevent'
@@ -20,11 +24,10 @@ pkgname=(
'usbip'
)
case "$CARCH" in
- x86_64|i686) pkgname+=('turbostat' 'x86_energy_perf_policy') ;;
armv7h) pkgname+=('gpio-utils' 'iio-utils') ;;
+ i686|x86_64) pkgname+=('turbostat' 'x86_energy_perf_policy') ;;
esac
-
-pkgver=5.6.1
+pkgver=6.1.5
pkgver+=_gnu
pkgrel=1
license=('GPL2')
@@ -37,7 +40,7 @@ makedepends=('git')
# kernel source deps
makedepends+=('asciidoc' 'xmlto')
# perf deps
-makedepends+=('perl' 'python' 'slang' 'elfutils' 'libunwind' 'audit' 'gtk2')
+makedepends+=('perl' 'python' 'slang' 'elfutils' 'libunwind' 'audit' 'zstd' 'libcap')
makedepends_x86_64=('numactl')
makedepends_i686=('numactl')
# cpupower deps
@@ -46,6 +49,9 @@ makedepends+=('pciutils')
makedepends+=('glib2' 'sysfsutils' 'udev')
# tmon deps
makedepends+=('ncurses')
+# turbostat deps
+[[ "$CARCH" =~ 'x86_64|i686' ]] &&
+makedepends+=('libcap')
groups=("$pkgbase")
source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver//_/-}/linux-libre-${pkgver//_/-}.tar.xz"{,.sign}
# "https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/patch-${pkgver%.*}-gnu-${pkgver//_/-}.xz"{,.sign}
@@ -53,14 +59,14 @@ source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver//_/-}/l
'cpupower.systemd'
'cpupower.service'
'usbipd.service'
- 'perf-fix-types.patch')
-sha256sums=('c5f208af2d199e650ce609eb7ac4ece2a6909af679cc0a1de4dd8438f2ee05d8'
+)
+sha256sums=('1d41ec34b7d9741aeebaaf9527d97938c311debe1494950d13df8598a1e8bef6'
'SKIP'
'4fa509949d6863d001075fa3e8671eff2599c046d20c98bb4a70778595cd1c3f'
- 'd2e8e5e8b22c6089a91f573aa1c59e442a1f3b67a2c9f047abe3b57d3d6558cc'
- 'fa2560630576464739ede14c9292249f4007f36a684bc378add174fc88394550'
+ 'b692f4859ed3fd9831a058a450a84d8c409bf7e3e45aac1c2896a14bb83f3d7a'
+ '42d2ec9f1d9cc255ee7945a27301478364ef482f5a6ddfc960189f03725ccec2'
'2e187734d8aec58a3046d79883510d779aa93fb3ab20bd3132c1a607ebe5498f'
- 'ca6b56540e2f8d6931c86978910d47e01bc28516c8b9ce616ecf6de2ba3daf4e')
+)
validpgpkeys=('474402C8C582DAFBE389C427BCB7CF877E7D47A7') # Alexandre Oliva
prepare() {
@@ -90,6 +96,7 @@ build() {
prefix=/usr \
lib=lib/perf \
perfexecdir=lib/perf \
+ EXTRA_CFLAGS=' -Wno-error=bad-function-cast -Wno-error=declaration-after-statement -Wno-error=switch-enum' \
NO_SDT=1 \
PYTHON=python \
PYTHON_CONFIG=python-config \
@@ -112,7 +119,7 @@ fi
echo ':: usbip'
pushd linux-${pkgver%_*}/tools/usb/usbip
# Fix gcc compilation
- sed -i 's,-Wall -Werror -Wextra,,' configure.ac
+ sed -i 's,-Wall -Werror -Wextra,-fcommon,' configure.ac
./autogen.sh
./configure --prefix=/usr --sbindir=/usr/bin
make
@@ -135,6 +142,10 @@ if [[ "$CARCH" == x86_64 ]] || [[ "$CARCH" == i686 ]]; then
popd
fi
+ echo ':: hv'
+ pushd linux/tools/hv
+ CFLAGS+=' -DKVP_SCRIPTS_PATH=\"/usr/lib/hyperv/kvp_scripts/\"' make
+
if [[ "$CARCH" == armv7h ]]; then
echo ':: gpio'
pushd linux-${pkgver%_*}/tools/gpio
@@ -146,12 +157,18 @@ if [[ "$CARCH" == armv7h ]]; then
make -j1
popd
fi
+
+ echo ':: bootconfig'
+ pushd linux/tools/bootconfig
+ make
+ popd
}
package_linux-libre-tools-meta() {
pkgdesc='GNU/Linux-libre kernel tools meta package'
groups=()
depends=(
+ 'bootconfig'
'cgroup_event_listener'
'cpupower'
'libtraceevent'
@@ -183,7 +200,8 @@ package_libtraceevent() {
package_perf() {
pkgdesc='GNU/Linux-libre kernel performance auditing tool'
depends=('glibc' 'perl' 'python' 'slang' 'elfutils' 'libunwind' 'binutils'
- 'audit' 'coreutils' 'glib2' 'xz' 'zlib' 'libelf' 'bash')
+ 'audit' 'coreutils' 'glib2' 'xz' 'zlib' 'libelf' 'bash'
+ 'zstd' 'libcap')
depends_x86_64=('numactl')
depends_i686=('numactl')
optdepends=('gtk2: support GTK2 browser for perf report')
@@ -193,6 +211,7 @@ package_perf() {
prefix=/usr \
lib=lib/perf \
perfexecdir=lib/perf \
+ EXTRA_CFLAGS=' -Wno-error=bad-function-cast -Wno-error=declaration-after-statement -Wno-error=switch-enum' \
NO_SDT=1 \
PYTHON=python \
PYTHON_CONFIG=python-config \
@@ -210,7 +229,6 @@ package_perf() {
find usr/share -type f -exec chmod a-x {} \;
}
-
#package_python-perf(){
# pkgdesc='GNU/Linux-libre kernel performance auditing tool (python bindings)'
# depends=('python')
@@ -220,6 +238,7 @@ package_perf() {
# make install-python_ext PYTHON=python DESTDIR="$pkgdir"
#}
+
package_cpupower() {
pkgdesc='GNU/Linux-libre kernel tool to examine and tune power saving related features of your processor'
backup=('etc/default/cpupower')
@@ -284,7 +303,7 @@ package_cgroup_event_listener() {
package_turbostat() {
pkgdesc='Report processor frequency and idle statistics'
- depends=('glibc')
+ depends=('glibc' 'libcap')
cd linux-${pkgver%_*}/tools/power/x86/turbostat
make install DESTDIR="$pkgdir"
@@ -306,4 +325,12 @@ package_iio-utils() {
make install DESTDIR="$pkgdir"
}
-# vim:set ts=2 sw=2 et:
+package_bootconfig() {
+ pkgdesc='Apply, delete or show boot config to initrd'
+ depends=('glibc')
+
+ cd linux/tools/bootconfig
+ install -dm755 "$pkgdir/usr/bin"
+ make install DESTDIR="$pkgdir"
+}
+
diff --git a/libre/linux-libre-tools/cpupower.service b/libre/linux-libre-tools/cpupower.service
index 06e03e537..dd432daa3 100644
--- a/libre/linux-libre-tools/cpupower.service
+++ b/libre/linux-libre-tools/cpupower.service
@@ -1,5 +1,6 @@
[Unit]
Description=Apply cpupower configuration
+ConditionVirtualization=!container
[Service]
Type=oneshot
diff --git a/libre/linux-libre-tools/cpupower.systemd b/libre/linux-libre-tools/cpupower.systemd
index 5439ad581..c7266f01f 100644
--- a/libre/linux-libre-tools/cpupower.systemd
+++ b/libre/linux-libre-tools/cpupower.systemd
@@ -1,4 +1,6 @@
#!/bin/bash
+# Copyright © 2012, Sébastien Luttringer
+# SPDX-License-Identifier: GPL-2.0-or-later
declare -i fail=0
diff --git a/libre/linux-libre-tools/perf-fix-types.patch b/libre/linux-libre-tools/perf-fix-types.patch
deleted file mode 100644
index cb6688acf..000000000
--- a/libre/linux-libre-tools/perf-fix-types.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- linux-5.4.1/tools/perf/util/session.c.orig 2019-11-29 04:10:32.000000000 -0500
-+++ linux-5.4.1/tools/perf/util/session.c 2020-01-19 16:13:39.628532016 -0500
-@@ -88,7 +88,7 @@
- session->decomp_last = decomp;
- }
-
-- pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
-+ pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size);
-
- return 0;
- }
---- linux-5.4.1/tools/perf/util/zstd.c.orig 2019-11-29 04:10:32.000000000 -0500
-+++ linux-5.4.1/tools/perf/util/zstd.c 2020-01-19 16:45:37.908560221 -0500
-@@ -99,7 +99,7 @@
- while (input.pos < input.size) {
- ret = ZSTD_decompressStream(data->dstream, &output, &input);
- if (ZSTD_isError(ret)) {
-- pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
-+ pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n",
- src_size, output.size, dst_size, ZSTD_getErrorName(ret));
- break;
- }