diff --git a/.gitignore b/.gitignore index 2effa63..866d8ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/powertop-2.12.tar.gz +SOURCES/powertop-2.14.tar.gz diff --git a/.powertop.metadata b/.powertop.metadata index 858f27c..620ece6 100644 --- a/.powertop.metadata +++ b/.powertop.metadata @@ -1 +1 @@ -2b990862b223f81353baeab67c0c616d6122618d SOURCES/powertop-2.12.tar.gz +3783086487352b5b51d4ca36d2c258dfbef6a60f SOURCES/powertop-2.14.tar.gz diff --git a/SOURCES/powertop-2.12-coverity-fixes.patch b/SOURCES/powertop-2.12-coverity-fixes.patch deleted file mode 100644 index 66d3371..0000000 --- a/SOURCES/powertop-2.12-coverity-fixes.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp -index 370b762..8af033b 100644 ---- a/src/cpu/intel_cpus.cpp -+++ b/src/cpu/intel_cpus.cpp -@@ -155,8 +155,10 @@ void intel_util::byt_has_ahci() - if (!dir) - byt_ahci_support=0; - else -+ { - byt_ahci_support=1; -- closedir(dir); -+ closedir(dir); -+ } - } - - int intel_util::get_byt_ahci_support() -diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp -index c958865..0509d0f 100644 ---- a/src/devices/devfreq.cpp -+++ b/src/devices/devfreq.cpp -@@ -229,7 +229,6 @@ static void devfreq_dev_callback(const char *d_name) - - void create_all_devfreq_devices(void) - { -- struct dirent *entry; - int num = 0; - - std::string p = "/sys/class/devfreq/"; -@@ -240,7 +239,7 @@ void create_all_devfreq_devices(void) - return; - } - -- while((entry = readdir(dir)) != NULL) -+ while(readdir(dir) != NULL) - num++; - - if (num == 2) { diff --git a/SOURCES/powertop-2.14-pthread.patch b/SOURCES/powertop-2.14-pthread.patch new file mode 100644 index 0000000..1b10d96 --- /dev/null +++ b/SOURCES/powertop-2.14-pthread.patch @@ -0,0 +1,20 @@ +diff --git a/configure.ac b/configure.ac +index 2571c5d..c913368 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3,6 +3,7 @@ + + AC_PREREQ([2.69]) + AC_INIT([powertop], [2.14], [powertop@lists.01.org], [], [https://01.org/powertop]) ++AC_CANONICAL_TARGET + AM_INIT_AUTOMAKE([ + -Wall + 1.12.2 +@@ -37,6 +38,7 @@ AC_PROG_CC + AC_PROG_INSTALL + AM_PROG_CC_C_O + PKG_PROG_PKG_CONFIG ++AX_PTHREAD + + # Checks for libraries. + diff --git a/SPECS/powertop.spec b/SPECS/powertop.spec index ff131f0..5ec567b 100644 --- a/SPECS/powertop.spec +++ b/SPECS/powertop.spec @@ -1,6 +1,6 @@ Name: powertop -Version: 2.12 -Release: 2%{?dist} +Version: 2.14 +Release: 1%{?dist} Summary: Power consumption monitor Group: Applications/System @@ -11,11 +11,20 @@ Source1: powertop.service # Sent upstream Patch0: powertop-2.7-always-create-params.patch -# https://github.com/fenrus75/powertop/pull/46 -Patch1: powertop-2.12-coverity-fixes.patch -BuildRequires: gettext-devel, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel -BuildRequires: automake, libtool, systemd, autoconf-archive -BuildRequires: gcc, gcc-c++ +# https://github.com/fenrus75/powertop/issues/84 +Patch1: powertop-2.14-pthread.patch +BuildRequires: make +BuildRequires: gettext-devel +BuildRequires: ncurses-devel +BuildRequires: pciutils-devel +BuildRequires: zlib-devel +BuildRequires: libnl3-devel +BuildRequires: automake +BuildRequires: libtool +BuildRequires: systemd +BuildRequires: autoconf-archive +BuildRequires: gcc +BuildRequires: gcc-c++ Requires(post): systemd, coreutils Requires(preun): systemd Requires(postun): systemd @@ -28,7 +37,7 @@ computer use more power than necessary while it is idle. %prep %setup -q %patch0 -p1 -b .always-create-params -%patch1 -p1 -b .coverity-fixes +%patch1 -p1 -b .pthread echo "v%{version}" > version-long echo '"v%{version}"' > version-short @@ -37,7 +46,7 @@ echo '"v%{version}"' > version-short # workaround for rhbz#1826935 autoreconf -fi || autoreconf -fi %configure -make %{?_smp_mflags} CFLAGS="%{optflags}" +make %{?_smp_mflags} CFLAGS="%{optflags}" V=1 %install rm -rf %{buildroot} @@ -61,8 +70,7 @@ install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop} &> /dev/null || : %files -f %{name}.lang -%defattr(-,root,root,-) -%doc COPYING README TODO +%doc COPYING README.md README.traceevent CONTRIBUTE.md TODO %dir %{_localstatedir}/cache/powertop %ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop %ghost %{_localstatedir}/cache/powertop/saved_results.powertop @@ -72,6 +80,10 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results. %{_datadir}/bash-completion/completions/powertop %changelog +* Tue May 11 2021 Jaroslav Škarvada - 2.14-1 +- New version + Resolves: rhbz#1834722 + * Wed May 13 2020 Jaroslav Škarvada - 2.12-2 - Fixed two new issues found by coverity Related: rhbz#1783110