From 07148100e50825866e8fcad0350fa861cbeabd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 4 Aug 2022 15:17:46 +0200 Subject: [PATCH] Fixed FTBFS Resolves: rhbz#2113602 --- powertop-2.14-format-security-fix.patch | 13 +++++++++++++ powertop.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 powertop-2.14-format-security-fix.patch diff --git a/powertop-2.14-format-security-fix.patch b/powertop-2.14-format-security-fix.patch new file mode 100644 index 0000000..bf454d4 --- /dev/null +++ b/powertop-2.14-format-security-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib.cpp b/src/lib.cpp +index 5e48f37..1fd3fa6 100644 +--- a/src/lib.cpp ++++ b/src/lib.cpp +@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *frmt, ...) + * buffer */ + vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list); + va_end(list); +- mvprintw(1, 0, notify); ++ mvprintw(1, 0, "%s", notify); + attroff(COLOR_PAIR(1)); + } + diff --git a/powertop.spec b/powertop.spec index 5deba81..2e87054 100644 --- a/powertop.spec +++ b/powertop.spec @@ -1,6 +1,6 @@ Name: powertop Version: 2.14 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Power consumption monitor License: GPLv2 @@ -12,6 +12,7 @@ Source1: powertop.service Patch0: powertop-2.7-always-create-params.patch # https://github.com/fenrus75/powertop/issues/84 Patch1: powertop-2.14-pthread.patch +Patch2: powertop-2.14-format-security-fix.patch BuildRequires: make BuildRequires: gettext-devel BuildRequires: ncurses-devel @@ -37,6 +38,7 @@ computer use more power than necessary while it is idle. %setup -q %patch0 -p1 -b .always-create-params %patch1 -p1 -b .pthread +%patch2 -p1 -b .format-security-fix echo "v%{version}" > version-long echo '"v%{version}"' > version-short @@ -79,6 +81,10 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results. %{_datadir}/bash-completion/completions/powertop %changelog +* Thu Aug 4 2022 Jaroslav Škarvada - 2.14-5 +- Fixed FTBFS + Resolves: rhbz#2113602 + * Fri Jul 22 2022 Fedora Release Engineering - 2.14-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild