forked from pool/cpupower
Accepting request 482047 from hardware
1 OBS-URL: https://build.opensuse.org/request/show/482047 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cpupower?expand=0&rev=28
This commit is contained in:
commit
52d151031f
3
cpupower-4.10.tar.bz2
Normal file
3
cpupower-4.10.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d983bc8688b0f708e3d24c4e012c9cb60a68e45944b84278f68570b8e2e6fca2
|
||||||
|
size 71930
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:45560da27bf61e7be1f9835f1fc2648edd1b341568b0f1f093eb9f4224a9d5ed
|
|
||||||
size 71450
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 22 19:00:17 UTC 2017 - trenn@suse.de
|
||||||
|
|
||||||
|
- Update cpupower and turbostat to latest kernel v4.10 sources
|
||||||
|
D library_cleanup.patch
|
||||||
|
- Change .c file header file modification, modify in Makefile instead:
|
||||||
|
D turbostat_set_asm_header_fixed.patch
|
||||||
|
A turbostat_makefile_fix_asm_header.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 28 12:28:09 UTC 2016 - trenn@suse.de
|
Thu Apr 28 12:28:09 UTC 2016 - trenn@suse.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cpupower
|
# spec file for package cpupower
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# Author: Thomas Renninger <trenn@suse.de>
|
# Author: Thomas Renninger <trenn@suse.de>
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -20,9 +20,9 @@
|
|||||||
Name: cpupower
|
Name: cpupower
|
||||||
# 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)
|
||||||
Version: 4.6
|
Version: 4.10
|
||||||
Release: 0
|
Release: 0
|
||||||
%define tsversion 4.12
|
%define tsversion 4.16
|
||||||
Summary: Tools to determine and set CPU Power related Settings
|
Summary: Tools to determine and set CPU Power related Settings
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
@ -31,9 +31,8 @@ Source: %{name}-%{version}.tar.bz2
|
|||||||
Source1: turbostat-%{tsversion}.tar.bz2
|
Source1: turbostat-%{tsversion}.tar.bz2
|
||||||
Source2: cpupower_export_tarball_from_git.sh
|
Source2: cpupower_export_tarball_from_git.sh
|
||||||
|
|
||||||
Patch1: library_cleanup.patch
|
|
||||||
Patch20: turbostat_fix_man_perm.patch
|
Patch20: turbostat_fix_man_perm.patch
|
||||||
Patch22: turbostat_set_asm_header_fixed.patch
|
Patch22: turbostat_makefile_fix_asm_header.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: gettext-tools
|
BuildRequires: gettext-tools
|
||||||
BuildRequires: pciutils
|
BuildRequires: pciutils
|
||||||
@ -78,7 +77,6 @@ powersave module.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -D -b 1
|
%setup -D -b 1
|
||||||
%patch1 -p1
|
|
||||||
cd ../turbostat-%{tsversion}
|
cd ../turbostat-%{tsversion}
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
%patch22 -p1
|
%patch22 -p1
|
||||||
|
@ -18,7 +18,7 @@ function usage(){
|
|||||||
echo "export GIT_DIR= environment variable if the git repo is not the current directory"
|
echo "export GIT_DIR= environment variable if the git repo is not the current directory"
|
||||||
echo "For example: GIT_DIR=/path_to_git_repo/.git"
|
echo "For example: GIT_DIR=/path_to_git_repo/.git"
|
||||||
}
|
}
|
||||||
|
set -x
|
||||||
if [ $# -gt 0 ];then
|
if [ $# -gt 0 ];then
|
||||||
if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
|
if [ "$1" = "-h" ] || [ "$1" == "--help" ];then
|
||||||
usage
|
usage
|
||||||
@ -58,11 +58,15 @@ TDIR=`mktemp -d`
|
|||||||
pushd "$TDIR"
|
pushd "$TDIR"
|
||||||
|
|
||||||
git archive --format=tar $GIT_TAG tools/power/x86/turbostat |tar -x
|
git archive --format=tar $GIT_TAG tools/power/x86/turbostat |tar -x
|
||||||
TURBOSTAT_VERSION=$(grep "turbostat version" tools/power/x86/turbostat/turbostat.c |grep fprintf |sed 's/.*turbostat version \([0-9].[0-9][0-9]\).*/\1/')
|
if [ "$TURBOSTAT_VERSION"x == ""x ];then
|
||||||
|
TURBOSTAT_VERSION=$(grep "turbostat version" tools/power/x86/turbostat/turbostat.c |grep fprintf |sed 's/.*turbostat version \([0-9][0-9].[0-9][0-9].[0-9][0-9]\).*/\1/')
|
||||||
|
fi
|
||||||
TURBOSTAT_VERSION=$(echo "-$TURBOSTAT_VERSION")
|
TURBOSTAT_VERSION=$(echo "-$TURBOSTAT_VERSION")
|
||||||
mv tools/power/x86/turbostat turbostat${TURBOSTAT_VERSION}
|
mv tools/power/x86/turbostat turbostat${TURBOSTAT_VERSION}
|
||||||
[ ! -e "$GIT_DIR"/../arch/x86/include/asm/msr-index.h ] && echo "msr-index.h does not exist" && exit 1
|
git checkout $GIT_TAG arch/x86/include/asm/msr-index.h
|
||||||
cp "$GIT_DIR"/../arch/x86/include/asm/msr-index.h turbostat${TURBOSTAT_VERSION}
|
git checkout $GIT_TAG arch/x86/include/asm/intel-family.h
|
||||||
|
cp arch/x86/include/asm/intel-family.h turbostat${TURBOSTAT_VERSION}
|
||||||
|
cp arch/x86/include/asm/msr-index.h turbostat${TURBOSTAT_VERSION}
|
||||||
tar -cvjf turbostat${TURBOSTAT_VERSION}.tar.bz2 turbostat${TURBOSTAT_VERSION}
|
tar -cvjf turbostat${TURBOSTAT_VERSION}.tar.bz2 turbostat${TURBOSTAT_VERSION}
|
||||||
popd
|
popd
|
||||||
mv "$DIR/cpupower${VERSION}".tar.bz2 .
|
mv "$DIR/cpupower${VERSION}".tar.bz2 .
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c4fe79a9334bd0737c8e821c2e187b66aacc5dcdda00017778f406112a99f019
|
|
||||||
size 30242
|
|
3
turbostat-4.16.tar.bz2
Normal file
3
turbostat-4.16.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:37ef8ef1ac6c0eb18bb90ea6acafa05ab9c41924bc4cab5a7ac8f1df6b04d0ac
|
||||||
|
size 32104
|
@ -1,8 +1,8 @@
|
|||||||
Index: turbostat-4.8/Makefile
|
Index: turbostat-4.16/Makefile
|
||||||
===================================================================
|
===================================================================
|
||||||
--- turbostat-4.8.orig/Makefile 2016-01-21 12:41:36.053333345 +0100
|
--- turbostat-4.16.orig/Makefile 2017-02-19 23:34:00.000000000 +0100
|
||||||
+++ turbostat-4.8/Makefile 2016-01-26 18:25:57.334212372 +0100
|
+++ turbostat-4.16/Makefile 2017-03-22 19:21:43.638618401 +0100
|
||||||
@@ -23,4 +23,4 @@ install : turbostat
|
@@ -24,4 +24,4 @@ install : turbostat
|
||||||
install -d $(DESTDIR)$(PREFIX)/bin
|
install -d $(DESTDIR)$(PREFIX)/bin
|
||||||
install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat
|
install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat
|
||||||
install -d $(DESTDIR)$(PREFIX)/share/man/man8
|
install -d $(DESTDIR)$(PREFIX)/share/man/man8
|
||||||
|
15
turbostat_makefile_fix_asm_header.patch
Normal file
15
turbostat_makefile_fix_asm_header.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Index: turbostat-4.16/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- turbostat-4.16.orig/Makefile 2017-03-22 19:36:31.329182164 +0100
|
||||||
|
+++ turbostat-4.16/Makefile 2017-03-22 19:38:04.762500669 +0100
|
||||||
|
@@ -9,8 +9,8 @@ endif
|
||||||
|
|
||||||
|
turbostat : turbostat.c
|
||||||
|
CFLAGS += -Wall
|
||||||
|
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
|
||||||
|
-CFLAGS += -DINTEL_FAMILY_HEADER='"../../../../arch/x86/include/asm/intel-family.h"'
|
||||||
|
+CFLAGS += -DMSRHEADER='"msr-index.h"'
|
||||||
|
+CFLAGS += -DINTEL_FAMILY_HEADER='"intel-family.h"'
|
||||||
|
|
||||||
|
%: %.c
|
||||||
|
@mkdir -p $(BUILD_OUTPUT)
|
@ -1,13 +0,0 @@
|
|||||||
Index: turbostat-3.19/turbostat.c
|
|
||||||
===================================================================
|
|
||||||
--- turbostat-3.19.orig/turbostat.c 2015-01-28 04:12:38.000000000 +0100
|
|
||||||
+++ turbostat-3.19/turbostat.c 2015-01-28 18:07:29.404133704 +0100
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
-#include MSRHEADER
|
|
||||||
+#include "msr-index.h"
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <err.h>
|
|
Loading…
Reference in New Issue
Block a user