Sync from SUSE:SLFO:Main cpupower revision 5939a2654629a466ab59d203aae45bf1

This commit is contained in:
Adrian Schröter 2025-01-08 16:28:16 +01:00
parent c721715c39
commit 77cd97076e
3 changed files with 25 additions and 24 deletions

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Oct 4 07:26:19 UTC 2024 - Clemens Famulla-Conrad <cfamullaconrad@suse.com>
- Upstream fixed lib default installation path in 3a5bb5066f4c
[- cpupower_exclude_kernel_Makefile.patch]
-------------------------------------------------------------------
Mon Apr 15 12:57:13 UTC 2024 - Thomas Renninger <trenn@suse.de>
- Parse turbostat and intel-speed-select version from kernel sources and
add them to %description
-------------------------------------------------------------------
Mon Feb 26 10:55:54 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 20 12:34:46 UTC 2023 - Thomas Renninger <trenn@suse.de> Mon Nov 20 12:34:46 UTC 2023 - Thomas Renninger <trenn@suse.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package cpupower # spec file for package cpupower
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -22,6 +22,8 @@
%define ssdir tools/power/x86/intel-speed-select %define ssdir tools/power/x86/intel-speed-select
# Use this as version when things are in mainline kernel # Use this as version when things are in mainline kernel
%define version %(rpm -q --qf '%%{VERSION}' kernel-source) %define version %(rpm -q --qf '%%{VERSION}' kernel-source)
%global turbover %(grep -o "turbostat version [0-9.]*" %{_prefix}/src/linux/tools/power/x86/turbostat/turbostat.c)
%global issver %(grep -o "version_str =.*" %{_prefix}/src/linux/tools/power/x86/intel-speed-select/isst-config.c | grep -o "[0-9]\.[0-9][0-9]")
Name: cpupower Name: cpupower
Version: %{version} Version: %{version}
Release: 0 Release: 0
@ -30,7 +32,6 @@ License: GPL-2.0-only
Group: System/Base Group: System/Base
URL: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git URL: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git
Patch1: cpupower_fix_library_so_name.patch Patch1: cpupower_fix_library_so_name.patch
Patch3: cpupower_exclude_kernel_Makefile.patch
Patch6: amd_do_not_show_amount_of_boost_states_if_zero.patch Patch6: amd_do_not_show_amount_of_boost_states_if_zero.patch
BuildRequires: gettext-tools BuildRequires: gettext-tools
BuildRequires: kernel-source BuildRequires: kernel-source
@ -42,6 +43,9 @@ BuildRequires: pciutils-devel
%description %description
This tool accesses the Linux kernel's processor power subsystems This tool accesses the Linux kernel's processor power subsystems
like CPU frequency switching (cpufreq) or CPU sleep states (cpuidle). like CPU frequency switching (cpufreq) or CPU sleep states (cpuidle).
Also part of the package are:
%turbover
intel-speed-select %issver
%package -n libcpupower1 %package -n libcpupower1
Summary: Processor power related C-library Summary: Processor power related C-library
@ -99,10 +103,9 @@ There is no reason to install this package.
# copy necessary files from kernel-source since we need to modify them # 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 - (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 chmod +x tools/power/cpupower/utils/version-gen.sh
%patch1 -p1 %patch -P 1 -p1
cd %{maindir} cd %{maindir}
%patch3 -p1 %patch -P 6 -p1
%patch6 -p1
%build %build
CONF="PACKAGE_BUGREPORT=https://bugs.opensuse.org mandir=%{_mandir} libdir=%{_libdir} CPUFRQ_BENCH=true" CONF="PACKAGE_BUGREPORT=https://bugs.opensuse.org mandir=%{_mandir} libdir=%{_libdir} CPUFRQ_BENCH=true"

View File

@ -1,19 +0,0 @@
Index: cpupower-5.5/Makefile
===================================================================
--- cpupower-5.5.orig/Makefile 2019-11-28 14:28:51.545762057 +0100
+++ cpupower-5.5/Makefile 2019-11-28 14:29:55.089765481 +0100
@@ -94,14 +94,7 @@ RANLIB = $(CROSS)ranlib
HOSTCC = gcc
MKDIR = mkdir
-# 64bit library detection
-include ../../scripts/Makefile.arch
-
-ifeq ($(IS_64_BIT), 1)
libdir ?= /usr/lib64
-else
-libdir ?= /usr/lib
-endif
# Now we set up the build system
#