From a995557204fc947b0076d06b385f4d511d8618377e023f976d6cabee4f399674 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Mon, 11 Apr 2022 06:23:50 +0000 Subject: [PATCH] Accepting request 967866 from home:dirkmueller:Factory - add rebuild subpackage to trigger rebuild on kernel updates OBS-URL: https://build.opensuse.org/request/show/967866 OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=121 --- cpupower.changes | 5 +++++ cpupower.spec | 25 +++++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/cpupower.changes b/cpupower.changes index a28f387..a773aba 100644 --- a/cpupower.changes +++ b/cpupower.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 8 14:57:24 UTC 2022 - Dirk Müller + +- add rebuild subpackage to trigger rebuild on kernel updates + ------------------------------------------------------------------- Fri Feb 18 15:56:24 UTC 2022 - Callum Farmer diff --git a/cpupower.spec b/cpupower.spec index e931ee7..054154f 100644 --- a/cpupower.spec +++ b/cpupower.spec @@ -1,8 +1,7 @@ # # spec file for package cpupower # -# Copyright (c) 2021 SUSE LLC -# Author: Thomas Renninger +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,14 +15,14 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %define maindir tools/power/cpupower %define tsdir tools/power/x86/turbostat %define pbdir tools/power/x86/x86_energy_perf_policy %define ssdir tools/power/x86/intel-speed-select - -Name: cpupower # Use this as version when things are in mainline kernel %define version %(rpm -q --qf '%%{VERSION}' kernel-source) +Name: cpupower Version: %{version} Release: 0 Summary: Tools to determine and set CPU Power related Settings @@ -34,8 +33,8 @@ Patch1: cpupower_rapl.patch Patch2: rapl_monitor.patch Patch3: cpupower_exclude_kernel_Makefile.patch Patch6: amd_do_not_show_amount_of_boost_states_if_zero.patch -BuildRequires: kernel-source BuildRequires: gettext-tools +BuildRequires: kernel-source BuildRequires: libcap-devel BuildRequires: pciutils BuildRequires: pciutils-devel @@ -72,13 +71,24 @@ governor (e.g. ondemand, userspace, conservative) and the cpufreq HW driver For that purpose, it compares the performance governor to a configured powersave module. +%package rebuild +Summary: Empty package to ensure rebuilding cpupower in OBS +Group: System/Monitoring +%requires_eq kernel-source + +%description rebuild +This is empty package that ensures cpupower is rebuilt every time +kernel-default is rebuilt in OBS. + +There is no reason to install this package. + %lang_package %prep # copy necessary files from kernel-source since we need to modify them (cd %{_prefix}/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} lib) | tar -xf - chmod +x tools/power/cpupower/utils/version-gen.sh -cd %maindir +cd %{maindir} %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -147,4 +157,7 @@ mv %{buildroot}//%{_docdir}/%{name}/cpufreq-bench_script.sh %{buildroot}/%{_docd %files lang -f %{name}.lang +%files rebuild +%license COPYING + %changelog