mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-30 19:01:25 +02:00
community/linux-tools: upgrade to 6.2
- use kernel _kernvers to allow bare non-patch versions
- clean up to modern style (amove, listify) to make diffs more obvious,
prune empty dirs left behind in packages
- add libtraceevent since perf trace plugins are in external library
now, and not in perf. since the plugins are no longer vendored, depend
on them directly. this also upgrades libtraceevent from 1.1 to 1.7+
because it's external.
- add python/zstd support for perf to increase tool usefulness (python
plugins!)
- add llvm for better bpftool support
🎉
This commit is contained in:
parent
d527e8b78d
commit
11d5200c19
@ -3,8 +3,11 @@
|
||||
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
|
||||
# Maintainer: Milan P. Stanić <mps@arvanta.net>
|
||||
pkgname=linux-tools
|
||||
pkgver=6.1.6
|
||||
_kernver=${pkgver%.*}
|
||||
pkgver=6.2
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=0
|
||||
pkgdesc="Linux kernel tools meta package"
|
||||
url="https://www.kernel.org/"
|
||||
@ -12,12 +15,41 @@ arch="all"
|
||||
license="GPL-2.0-only"
|
||||
depends="perf cpupower $pkgname-gpio $pkgname-iio"
|
||||
depends_dev="pciutils-dev readline-dev gettext-dev"
|
||||
makedepends="$depends_dev elfutils-dev bash linux-headers flex bison diffutils
|
||||
zlib-dev findutils python3 ncurses-dev
|
||||
automake autoconf libtool libudev-zero-dev sysfsutils-dev glib-dev
|
||||
libbpf binutils-dev clang llvm libcap-dev xmlto asciidoc"
|
||||
subpackages="perf perf-bash-completion:perf_bashcomp:noarch
|
||||
cpupower cpupower-openrc cpupower-bash-completion:cpupower_bashcomp:noarch
|
||||
makedepends="
|
||||
$depends_dev
|
||||
asciidoc
|
||||
autoconf
|
||||
automake
|
||||
bash
|
||||
binutils-dev
|
||||
bison
|
||||
clang
|
||||
diffutils
|
||||
elfutils-dev
|
||||
findutils
|
||||
flex
|
||||
glib-dev
|
||||
libbpf-dev
|
||||
libcap-dev
|
||||
libtool
|
||||
libtraceevent-dev
|
||||
libudev-zero-dev
|
||||
linux-headers
|
||||
llvm-dev
|
||||
ncurses-dev
|
||||
numactl-dev
|
||||
python3-dev
|
||||
sysfsutils-dev
|
||||
xmlto
|
||||
zlib-dev
|
||||
zstd-dev
|
||||
"
|
||||
subpackages="
|
||||
perf
|
||||
perf-bash-completion:perf_bashcomp:noarch
|
||||
cpupower
|
||||
cpupower-openrc:cpupower_openrc
|
||||
cpupower-bash-completion:cpupower_bashcomp:noarch
|
||||
$pkgname-dev
|
||||
$pkgname-doc
|
||||
$pkgname-gpio
|
||||
@ -25,10 +57,10 @@ subpackages="perf perf-bash-completion:perf_bashcomp:noarch
|
||||
$pkgname-spi
|
||||
$pkgname-tmon
|
||||
$pkgname-usbip
|
||||
$pkgname-usbip-openrc
|
||||
bpftool bpftool-bash-completion:bpftool_bashcomp:noarch"
|
||||
$pkgname-usbip-openrc:usbip_openrc
|
||||
bpftool bpftool-bash-completion:bpftool_bashcomp:noarch
|
||||
"
|
||||
source="https://kernel.org/pub/linux/kernel/v6.x/linux-$_kernver.tar.xz
|
||||
https://kernel.org/pub/linux/kernel/v6.x/patch-$pkgver.xz
|
||||
cpupower-libs.patch
|
||||
dt_lnk.patch
|
||||
cpupower.initd
|
||||
@ -36,6 +68,17 @@ source="https://kernel.org/pub/linux/kernel/v6.x/linux-$_kernver.tar.xz
|
||||
usbip.initd
|
||||
usbip.confd
|
||||
"
|
||||
# append patch for non .0
|
||||
case $pkgver in
|
||||
*.*.0)
|
||||
;;
|
||||
*.*.*)
|
||||
source="
|
||||
$source
|
||||
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-$pkgver.xz
|
||||
"
|
||||
;;
|
||||
esac
|
||||
|
||||
builddir="$srcdir"/linux-$_kernver
|
||||
|
||||
@ -93,35 +136,42 @@ package() {
|
||||
( cd tools/usb/usbip ;
|
||||
make DESTDIR="$pkgdir" install; )
|
||||
|
||||
# perf completion is wrongly installed in /etc/bash_completion.d
|
||||
# we only support bash completions in usr/share/bash-completion
|
||||
mv "$pkgdir"/etc/bash_completion.d/* "$pkgdir"/usr/share/bash-completion/completions/
|
||||
rmdir "$pkgdir"/etc/bash_completion.d
|
||||
|
||||
install -Dm755 "$srcdir"/cpupower.initd "$pkgdir"/etc/init.d/cpupower
|
||||
install -Dm644 "$srcdir"/cpupower.confd "$pkgdir"/etc/conf.d/cpupower
|
||||
install -Dm755 "$srcdir"/usbip.initd "$pkgdir"/etc/init.d/usbip
|
||||
install -Dm644 "$srcdir"/usbip.confd "$pkgdir"/etc/conf.d/usbip
|
||||
}
|
||||
|
||||
cpupower() {
|
||||
pkgdesc="Linux kernel tool to set CPU power features"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/sbin \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/etc
|
||||
|
||||
mv "$pkgdir"/usr/bin/cpu* "$subpkgdir"/usr/bin/
|
||||
mv "$pkgdir"/usr/sbin/cpu* "$subpkgdir"/usr/sbin/
|
||||
mv "$pkgdir"/usr/lib/libcpu*.so.* "$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/etc/cpu* "$subpkgdir"/etc/
|
||||
install -Dm755 "$srcdir"/$subpkgname.initd \
|
||||
"$pkgdir"/etc/init.d/$subpkgname
|
||||
install -Dm644 "$srcdir"/$subpkgname.confd \
|
||||
"$pkgdir"/etc/conf.d/$subpkgname
|
||||
amove \
|
||||
usr/bin/cpu* \
|
||||
usr/sbin/cpu* \
|
||||
usr/lib/libcpu*.so.* \
|
||||
etc/cpu*
|
||||
}
|
||||
|
||||
cpupower_openrc() {
|
||||
pkgdesc="Linux kernel tool to set CPU power features (OpenRC init scripts)"
|
||||
depends=""
|
||||
install_if="cpupower=$pkgver-r$pkgrel openrc"
|
||||
|
||||
amove \
|
||||
etc/init.d/cpupower \
|
||||
etc/conf.d/cpupower
|
||||
}
|
||||
|
||||
cpupower_bashcomp() {
|
||||
pkgdesc="Bash completion for cpupower"
|
||||
install_if="cpupower=$pkgver-r$pkgrel bash-completion"
|
||||
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
|
||||
mv "$pkgdir"/usr/share/bash-completion/completions/cpupower \
|
||||
"$subpkgdir"/usr/share/bash-completion/completions/
|
||||
|
||||
amove usr/share/bash-completion/completions/cpupower
|
||||
}
|
||||
|
||||
usbip() {
|
||||
@ -129,33 +179,35 @@ usbip() {
|
||||
replaces="usbip-utils"
|
||||
provides="usbip-utils=$pkgver-r$pkgrel"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/sbin \
|
||||
"$subpkgdir"/usr/lib \
|
||||
"$subpkgdir"/usr/include/usbip \
|
||||
"$subpkgdir"/etc
|
||||
mv "$pkgdir"/usr/sbin/usb* "$subpkgdir"/usr/sbin
|
||||
mv "$pkgdir"/usr/lib/libusb* "$subpkgdir"/usr/lib
|
||||
install -Dm755 "$srcdir"/usbip.initd "$pkgdir"/etc/init.d/usbip
|
||||
install -Dm644 "$srcdir"/usbip.confd "$pkgdir"/etc/conf.d/usbip
|
||||
|
||||
amove \
|
||||
usr/sbin/usb* \
|
||||
usr/lib/libusb*
|
||||
}
|
||||
|
||||
usbip_openrc() {
|
||||
pkgdesc="utilities for USB device sharing over IP network (OpenRC init scripts)"
|
||||
depends=""
|
||||
install_if="$pkgname-usbip=$pkgver-r$pkgrel openrc"
|
||||
|
||||
amove \
|
||||
etc/init.d/usbip \
|
||||
etc/conf.d/usbip
|
||||
}
|
||||
|
||||
perf() {
|
||||
pkgdesc="Linux kernel performance auditing tool"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib
|
||||
mv "$pkgdir"/usr/bin/perf \
|
||||
"$pkgdir"/usr/bin/trace \
|
||||
"$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/lib/traceevent \
|
||||
"$pkgdir"/usr/lib/perf \
|
||||
"$subpkgdir"/usr/lib/
|
||||
mv "$pkgdir"/usr/libexec "$subpkgdir"/usr/
|
||||
depends="libtraceevent-plugins"
|
||||
|
||||
amove \
|
||||
usr/bin/perf \
|
||||
usr/bin/trace \
|
||||
usr/lib/perf \
|
||||
usr/libexec
|
||||
|
||||
# /usr/share/perf-core is apprently not installed on all arches
|
||||
if [ -e "$pkgdir"/usr/share/perf-core ]; then
|
||||
mkdir -p "$subpkgdir"/usr/share
|
||||
mv "$pkgdir"/usr/share/perf-core \
|
||||
"$subpkgdir"/usr/share/
|
||||
amove usr/share/perf-core
|
||||
fi
|
||||
}
|
||||
|
||||
@ -163,57 +215,54 @@ perf_bashcomp() {
|
||||
replaces="$pkgname-bash-completion" # Backward compatibility
|
||||
pkgdesc="Bash completion for perf"
|
||||
install_if="perf=$pkgver-r$pkgrel bash-completion"
|
||||
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
|
||||
mv "$pkgdir"/usr/share/bash-completion/completions/perf \
|
||||
"$subpkgdir"/usr/share/bash-completion/completions/
|
||||
|
||||
amove usr/share/bash-completion/completions/perf
|
||||
}
|
||||
|
||||
gpio() {
|
||||
pkgdesc="Linux kernel GPIO tools"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*gpio* "$subpkgdir"/usr/bin
|
||||
|
||||
amove usr/bin/*gpio*
|
||||
}
|
||||
|
||||
iio() {
|
||||
pkgdesc="Linux kernel IIO tools"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/*iio* "$subpkgdir"/usr/bin
|
||||
|
||||
amove usr/bin/*iio*
|
||||
}
|
||||
|
||||
spi() {
|
||||
pkgdesc="Linux kernel SPI tools"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/spi* "$subpkgdir"/usr/bin
|
||||
|
||||
amove usr/bin/spi*
|
||||
}
|
||||
|
||||
tmon() {
|
||||
pkgdesc="Linux kernel thermal monitor tools"
|
||||
replaces="tmon"
|
||||
depends=""
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
mv "$pkgdir"/usr/bin/tmon "$subpkgdir"/usr/bin
|
||||
|
||||
amove usr/bin/tmon
|
||||
}
|
||||
|
||||
bpftool() {
|
||||
pkgdesc="Linux kernel bpf manipulation tool"
|
||||
mkdir -p "$subpkgdir"/usr/sbin
|
||||
mv "$pkgdir"/usr/sbin/bpftool "$subpkgdir"/usr/sbin/
|
||||
|
||||
amove usr/sbin/bpftool
|
||||
}
|
||||
|
||||
bpftool_bashcomp() {
|
||||
pkgdesc="Bash completion for bpftool"
|
||||
install_if="bpftool=$pkgver-r$pkgrel bash-completion"
|
||||
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
|
||||
mv "$pkgdir"/usr/share/bash-completion/completions/bpftool \
|
||||
"$subpkgdir"/usr/share/bash-completion/completions/
|
||||
|
||||
amove usr/share/bash-completion/completions/bpftool
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6ed2a73c2699d0810e54753715635736fc370288ad5ce95c594f2379959b0e418665cd71bc512a0273fe226fe90074d8b10d14c209080a6466498417a4fdda68 linux-6.1.tar.xz
|
||||
e4ad2541e2f4975ca206195f4410c05029091a98f647dd734bca157fcf57829ba13b0021c3dff8b457bea026ac97aa0d5ea4ab6a4aa63e8ca0dfb5fa457f907a patch-6.1.6.xz
|
||||
a01bee0b968b95183934fe3504516be7ef5811944a061f5aed05ecebaa27b5eb64e33232fd0a8dd622b3c8743bfe462ef7e464d381734d111a0ad6a6d9f66ddd linux-6.2.tar.xz
|
||||
a46e3a84b00a39a356618831d0ddfb7f0d10f0a3799d1307ba2cc832e73c01f8d637a4e801a6dd25025f6f13155c6ad8b836422ff72d365e51063ac0bf907f52 cpupower-libs.patch
|
||||
0657b461659e79c1926379aab30e7b7ab2d59eaf3e686f1dce468b79eb1320c188c14a0507361660abd2553bccffa9e149fa5b6e4d770d10c99bf5dafd2e05ee dt_lnk.patch
|
||||
97ecfeaaaa8efca7af585316b843bf7be885e88095bbdfbf52bc9a96b14dc862435482781e205ea022ab208978aaa4aabb317354fab890ed514a5088ae5045c8 cpupower.initd
|
||||
|
Loading…
x
Reference in New Issue
Block a user