From cd96c6dbd4d7ed0e4d6ba7d36b4fd60fdf21e110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Thu, 22 Feb 2024 07:36:00 +0100 Subject: [PATCH 1/2] upgpkg: tuned 2.22.0-3: split package * Split package to make ppd service optional since it conflicts with power-profiles-daemon package * Added missing backup files for tuned so that config files may not be overwritten on update --- .SRCINFO | 26 +++++++++++++++++++++----- PKGBUILD | 51 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 701e700..9f308e1 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,9 +1,8 @@ pkgbase = tuned pkgdesc = Daemon that performs monitoring and adaptive configuration of devices in the system pkgver = 2.22.0 - pkgrel = 2 + pkgrel = 3 url = https://github.com/redhat-performance/tuned - install = tuned.install arch = any license = GPL makedepends = desktop-file-utils @@ -18,10 +17,27 @@ pkgbase = tuned depends = python-linux-procfs depends = python-perf depends = python-pyudev - optdepends = virt-what: virtual machine detection - optdepends = systemtap: detailed system monitoring - backup = etc/tuned/active_profile + options = !emptydirs source = https://github.com/redhat-performance/tuned/archive/v2.22.0/tuned-2.22.0.tar.gz sha512sums = 653f946e8eff57eaa7e26b05c9215d60c8dcec6760b4a41a2855328e86b65f4dcbc0b2fd7d9f9355d00aae93f601c035a38d4e1611f30cb5003b417e31bea4dc pkgname = tuned + install = tuned.install + optdepends = virt-what: virtual machine detection + optdepends = systemtap: detailed system monitoring + optdepends = tuned-ppd: power-profiles-daemon api translation + backup = etc/tuned/active_profile + backup = etc/tuned/bootcmdline + backup = etc/tuned/cpu-partitioning-powersave-variables.conf + backup = etc/tuned/cpu-partitioning-variables.conf + backup = etc/tuned/post_loaded_profile + backup = etc/tuned/realtime-variables.conf + backup = etc/tuned/realtime-virtual-guest-variables.conf + backup = etc/tuned/realtime-virtual-host-variables.conf + backup = etc/tuned/tuned-main.conf + +pkgname = tuned-ppd + pkgdesc = Daemon that allows applications to easily transition to TuneD from power-profiles-daemon (PPD) + depends = tuned + conflicts = power-profiles-daemon + backup = etc/tuned/ppd.conf diff --git a/PKGBUILD b/PKGBUILD index d71e4c4..62194d7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,38 +3,59 @@ # Contributor: Timothée Ravier # Contributor: Tom -pkgname=tuned +pkgbase=tuned +pkgname=("${pkgbase}" "${pkgbase}-ppd") pkgver=2.22.0 -pkgrel=2 +pkgrel=3 pkgdesc='Daemon that performs monitoring and adaptive configuration of devices in the system' arch=('any') -url="https://github.com/redhat-performance/${pkgname}" +url="https://github.com/redhat-performance/${pkgbase}" license=('GPL') depends=('dbus-glib' 'ethtool' 'gawk' 'hdparm' 'polkit' 'python-configobj' 'python-dbus' 'python-gobject' 'python-linux-procfs' 'python-perf' 'python-pyudev') -optdepends=('virt-what: virtual machine detection' - 'systemtap: detailed system monitoring') makedepends=('desktop-file-utils') -backup=('etc/tuned/active_profile') -install="${pkgname}.install" -source=("https://github.com/redhat-performance/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz") +options=('!emptydirs') +source=("https://github.com/redhat-performance/${pkgbase}/archive/v${pkgver}/${pkgbase}-${pkgver}.tar.gz") sha512sums=('653f946e8eff57eaa7e26b05c9215d60c8dcec6760b4a41a2855328e86b65f4dcbc0b2fd7d9f9355d00aae93f601c035a38d4e1611f30cb5003b417e31bea4dc') prepare() { - cd "${pkgname}-${pkgver}" + cd "${pkgbase}-${pkgver}" mv libexec lib sed -i 's/libexec/lib/g' Makefile sed -i 's/sbin/bin/g' Makefile + sed -i 's/install-ppd: install$/install-ppd: install-dirs/' Makefile } -package() { - cd "${pkgname}-${pkgver}" +package_tuned() { + optdepends=('virt-what: virtual machine detection' + 'systemtap: detailed system monitoring' + 'tuned-ppd: power-profiles-daemon api translation') + backup=('etc/tuned/active_profile' + 'etc/tuned/bootcmdline' + 'etc/tuned/cpu-partitioning-powersave-variables.conf' + 'etc/tuned/cpu-partitioning-variables.conf' + 'etc/tuned/post_loaded_profile' + 'etc/tuned/realtime-variables.conf' + 'etc/tuned/realtime-virtual-guest-variables.conf' + 'etc/tuned/realtime-virtual-host-variables.conf' + 'etc/tuned/tuned-main.conf') + install="${pkgbase}.install" - make DESTDIR="${pkgdir}" install install-ppd - rm -r "${pkgdir}"/{run,var} + cd "${pkgbase}-${pkgver}" + + make DESTDIR="${pkgdir}" install python -m compileall -d /usr/lib "${pkgdir}/usr/lib" python -O -m compileall -d /usr/lib "${pkgdir}/usr/lib" - - install -Dm644 tuned.service "${pkgdir}/usr/lib/systemd/system/" +} + +package_tuned-ppd() { + pkgdesc='Daemon that allows applications to easily transition to TuneD from power-profiles-daemon (PPD)' + depends=('tuned') + conflicts=('power-profiles-daemon') + backup=('etc/tuned/ppd.conf') + + cd "${pkgbase}-${pkgver}" + + make DESTDIR="${pkgdir}" install-ppd } From bc2f5024db4e503d873e266429e07a53b49e7b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Thu, 22 Feb 2024 14:26:00 +0100 Subject: [PATCH 2/2] upgpkg: tuned 2.22.1-1 upstream release --- .SRCINFO | 8 ++++---- PKGBUILD | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 9f308e1..0462747 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = tuned pkgdesc = Daemon that performs monitoring and adaptive configuration of devices in the system - pkgver = 2.22.0 - pkgrel = 3 + pkgver = 2.22.1 + pkgrel = 1 url = https://github.com/redhat-performance/tuned arch = any license = GPL @@ -18,8 +18,8 @@ pkgbase = tuned depends = python-perf depends = python-pyudev options = !emptydirs - source = https://github.com/redhat-performance/tuned/archive/v2.22.0/tuned-2.22.0.tar.gz - sha512sums = 653f946e8eff57eaa7e26b05c9215d60c8dcec6760b4a41a2855328e86b65f4dcbc0b2fd7d9f9355d00aae93f601c035a38d4e1611f30cb5003b417e31bea4dc + source = https://github.com/redhat-performance/tuned/archive/v2.22.1/tuned-2.22.1.tar.gz + sha512sums = 160b1cab5477d84a0da89f584fe646b32162527a138d9b5957799c5f26598b98449733040710133a1c5bdd5588eee72549131ff163e777a105fc24e92edc6d8f pkgname = tuned install = tuned.install diff --git a/PKGBUILD b/PKGBUILD index 62194d7..41a2468 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,8 +5,8 @@ pkgbase=tuned pkgname=("${pkgbase}" "${pkgbase}-ppd") -pkgver=2.22.0 -pkgrel=3 +pkgver=2.22.1 +pkgrel=1 pkgdesc='Daemon that performs monitoring and adaptive configuration of devices in the system' arch=('any') url="https://github.com/redhat-performance/${pkgbase}" @@ -15,7 +15,7 @@ depends=('dbus-glib' 'ethtool' 'gawk' 'hdparm' 'polkit' 'python-configobj' 'pyth makedepends=('desktop-file-utils') options=('!emptydirs') source=("https://github.com/redhat-performance/${pkgbase}/archive/v${pkgver}/${pkgbase}-${pkgver}.tar.gz") -sha512sums=('653f946e8eff57eaa7e26b05c9215d60c8dcec6760b4a41a2855328e86b65f4dcbc0b2fd7d9f9355d00aae93f601c035a38d4e1611f30cb5003b417e31bea4dc') +sha512sums=('160b1cab5477d84a0da89f584fe646b32162527a138d9b5957799c5f26598b98449733040710133a1c5bdd5588eee72549131ff163e777a105fc24e92edc6d8f') prepare() { cd "${pkgbase}-${pkgver}"