[packages/irqbalance] Up to 1.8.0.
arekm
arekm at pld-linux.org
Thu Jan 27 22:04:54 CET 2022
commit a73bb7fbdff2dd8b7c5b4cc03f95689cab72faaf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Jan 27 22:04:05 2022 +0100
Up to 1.8.0.
build.patch | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
irqbalance.spec | 6 +++--
2 files changed, 81 insertions(+), 2 deletions(-)
---
diff --git a/irqbalance.spec b/irqbalance.spec
index 29a580f..fb7b81f 100644
--- a/irqbalance.spec
+++ b/irqbalance.spec
@@ -6,16 +6,17 @@
Summary: Balancing of IRQs between multiple CPUs
Summary(pl.UTF-8): Rozdzielanie IRQ pomiędzy wiele procesorów
Name: irqbalance
-Version: 1.7.0
+Version: 1.8.0
Release: 1
License: GPL v2
Group: Daemons
#Source0Download: https://github.com/Irqbalance/irqbalance/releases
Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 621117212f6e7ed33d70a25e917e3e0d
+# Source0-md5: 6265b8e7933978fb4bc7bf2ffb88bb70
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.service
+Patch0: build.patch
URL: https://irqbalance.github.io/irqbalance/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -46,6 +47,7 @@ celu zwiększenia wydajności systemu.
%prep
%setup -q
+%patch0 -p1
%build
%{__libtoolize}
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..4bb3fe6
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,77 @@
+From f8bdd0e64284d841544fd3ebe22f4652902ba8d2 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich at gmail.com>
+Date: Tue, 9 Nov 2021 22:24:17 +0000
+Subject: [PATCH] ui/ui.c: always use "%s"-style format for printf()-style
+ functions
+
+`ncuses-6.3` added printf-style function attributes and now makes
+it easier to catch cases when user input is used in palce of format
+string when built with CFLAGS=-Werror=format-security:
+
+ ui/ui.c:714:16: error: format not a string literal and no format arguments [-Werror=format-security]
+ 714 | printw(copy_to);
+ | ^~~~~~~
+
+Let's wrap all the missing places with "%s" format.
+---
+ ui/ui.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/ui/ui.c b/ui/ui.c
+index 1be8f95..6ff3305 100644
+--- a/ui/ui.c
++++ b/ui/ui.c
+@@ -26,7 +26,7 @@ void show_frame()
+ while(strlen(top) != (size_t)COLS - 1) {
+ snprintf(top + strlen(top), COLS - strlen(top), " ");
+ }
+- mvprintw(0, 0, top);
++ mvprintw(0, 0, "%s", top);
+ for(i = 0; i < LINES; i++) {
+ mvprintw(i, 0, " ");
+ mvprintw(i, COLS - 1, " ");
+@@ -42,7 +42,7 @@ void show_footer()
+ snprintf(footer + strlen(footer), COLS - strlen(footer), " ");
+ }
+ attrset(COLOR_PAIR(4));
+- mvprintw(LINES - 1, 0, footer);
++ mvprintw(LINES - 1, 0, "%s", footer);
+ }
+
+ char * check_control_in_sleep_input(int max_len, int column_offest, int line_offset)
+@@ -331,7 +331,7 @@ void print_assigned_objects_string(irq_t *irq, int *line_offset)
+ char assigned_to[128] = "\0";
+ for_each_int(irq->assigned_to, copy_assigned_obj, assigned_to);
+ assigned_to[strlen(assigned_to) - 2] = '\0';
+- mvprintw(*line_offset, 36, assigned_to);
++ mvprintw(*line_offset, 36, "%s", assigned_to);
+ }
+
+ void print_irq_line(irq_t *irq, void *data)
+@@ -566,7 +566,7 @@ void settings()
+ uint8_t sleep_input_offset = strlen(info) + 3;
+ snprintf(info + strlen(info), 128 - strlen(info), "%" PRIu64 "\n", setup.sleep);
+ attrset(COLOR_PAIR(1));
+- mvprintw(2, 3, info);
++ mvprintw(2, 3, "%s", info);
+ print_all_cpus();
+
+ int user_input = 1;
+@@ -664,7 +664,7 @@ void display_tree_node_irqs(irq_t *irq, void *data)
+ char indent[32] = " \0";
+ snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", (char *)data);
+ attrset(COLOR_PAIR(3));
+- printw("%sIRQ %lu, IRQs since last rebalance %lu\n",
++ printw("%sIRQ %u, IRQs since last rebalance %lu\n",
+ indent, irq->vector, irq->diff);
+ }
+
+@@ -711,7 +711,7 @@ void display_tree_node(cpu_node_t *node, void *data)
+ default:
+ break;
+ }
+- printw(copy_to);
++ printw("%s", copy_to);
+ if(g_list_length(node->irqs) > 0) {
+ for_each_irq(node->irqs, display_tree_node_irqs, indent);
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/irqbalance.git/commitdiff/a73bb7fbdff2dd8b7c5b4cc03f95689cab72faaf
More information about the pld-cvs-commit
mailing list