Accepting request 639963 from Base:System
OBS-URL: https://build.opensuse.org/request/show/639963 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/irqbalance?expand=0&rev=50
This commit is contained in:
commit
3a9a3d2914
@ -1,7 +1,8 @@
|
||||
diff -ur irqbalance-1.0.7.orig/misc/irqbalance.service irqbalance-1.0.7/misc/irqbalance.service
|
||||
--- irqbalance-1.0.7.orig/misc/irqbalance.service 2013-09-25 13:32:23.000000000 +0200
|
||||
+++ irqbalance-1.0.7/misc/irqbalance.service 2016-10-14 15:30:11.873319592 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
Index: irqbalance-1.4.0/misc/irqbalance.service
|
||||
===================================================================
|
||||
--- irqbalance-1.4.0.orig/misc/irqbalance.service
|
||||
+++ irqbalance-1.4.0/misc/irqbalance.service
|
||||
@@ -5,6 +5,7 @@ ConditionVirtualization=!container
|
||||
[Service]
|
||||
EnvironmentFile=/path/to/irqbalance.env
|
||||
ExecStart=/usr/sbin/irqbalance --foreground $IRQBALANCE_ARGS
|
||||
|
10
_service
Normal file
10
_service
Normal file
@ -0,0 +1,10 @@
|
||||
<services>
|
||||
<service mode="disabled" name="tar_scm">
|
||||
<param name="url">https://github.com/Irqbalance/irqbalance.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="filename">irqbalance</param>
|
||||
<param name="versionformat">1.4.0</param>
|
||||
</service>
|
||||
</services>
|
||||
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/Irqbalance/irqbalance.git</param>
|
||||
<param name="changesrevision">5a1c7b89f7c9b928f6307ea50fc46fd7ce0cd061</param></service></servicedata>
|
@ -1,104 +0,0 @@
|
||||
From af7523e4891d13c3c06fef056b243faa0547e406 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Tue, 10 Jan 2017 09:44:04 +0200
|
||||
Subject: [PATCH 1/3] Add missing #include <string.h> in user interface files
|
||||
|
||||
Fixes several warnings when compiling under musl, e.g.
|
||||
|
||||
ui/irqbalance-ui.c: In function 'create_credentials_msg':
|
||||
ui/irqbalance-ui.c:32:2: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
|
||||
memset(msg, 0, sizeof(struct msghdr));
|
||||
^~~~~~
|
||||
ui/irqbalance-ui.c:32:2: warning: incompatible implicit declaration of built-in function 'memset'
|
||||
ui/irqbalance-ui.c:32:2: note: include '<string.h>' or provide a declaration of 'memset'
|
||||
ui/irqbalance-ui.c: In function 'init_connection':
|
||||
ui/irqbalance-ui.c:49:2: warning: incompatible implicit declaration of built-in function 'memset'
|
||||
memset(&addr, 0, sizeof(struct sockaddr_un));
|
||||
^~~~~~
|
||||
---
|
||||
ui/irqbalance-ui.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/ui/irqbalance-ui.c b/ui/irqbalance-ui.c
|
||||
index 74ba93c..75fc60f 100644
|
||||
--- a/ui/irqbalance-ui.c
|
||||
+++ b/ui/irqbalance-ui.c
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
From 59f2a0e9bfd5b98bd5671174eb7e32b4e0b3ba2c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Tue, 10 Jan 2017 09:46:17 +0200
|
||||
Subject: [PATCH 2/3] Fix struct msghdr initialization
|
||||
|
||||
musl defines struct msghdr with padding fields to be strictly
|
||||
POSIX compliant. The current code gives following warnings:
|
||||
|
||||
irqbalance.c: In function 'sock_handle':
|
||||
irqbalance.c:333:42: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
|
||||
struct msghdr msg = { NULL, 0, &iov, 1, NULL, 0, 0 };
|
||||
^~~~
|
||||
irqbalance.c:333:42: note: (near initialization for 'msg.__pad1')
|
||||
irqbalance.c:333:9: warning: missing initializer for field '__pad2' of 'struct msghdr' [-Wmissing-field-initializers]
|
||||
struct msghdr msg = { NULL, 0, &iov, 1, NULL, 0, 0 };
|
||||
^~~~~~
|
||||
In file included from /usr/include/sys/socket.h:20:0,
|
||||
from /usr/include/fortify/sys/socket.h:20,
|
||||
from irqbalance.c:34:
|
||||
/usr/include/bits/socket.h:7:28: note: '__pad2' declared here
|
||||
socklen_t msg_controllen, __pad2;
|
||||
^~~~~~
|
||||
|
||||
Fix this by not relying on field ordering. Alternatively
|
||||
designated initializers could be used, but as they are not
|
||||
used elsewhere in the code, I used explicit assignments.
|
||||
---
|
||||
irqbalance.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/irqbalance.c b/irqbalance.c
|
||||
index 35ad4da..95bb80a 100644
|
||||
--- a/irqbalance.c
|
||||
+++ b/irqbalance.c
|
||||
@@ -330,7 +330,9 @@ gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attri
|
||||
int valid_user = 0;
|
||||
|
||||
struct iovec iov = { buff, 500 };
|
||||
- struct msghdr msg = { NULL, 0, &iov, 1, NULL, 0, 0 };
|
||||
+ struct msghdr msg = { 0 };
|
||||
+ msg.msg_iov = &iov;
|
||||
+ msg.msg_iovlen = 1;
|
||||
msg.msg_control = malloc(CMSG_SPACE(sizeof(struct ucred)));
|
||||
msg.msg_controllen = CMSG_SPACE(sizeof(struct ucred));
|
||||
|
||||
|
||||
From 65d71ea5f80b6d56907bd67825981042eaf98d6e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
|
||||
Date: Tue, 10 Jan 2017 09:51:32 +0200
|
||||
Subject: [PATCH 3/3] fix aarch64 compile error due to undefined variable
|
||||
|
||||
fixes #36
|
||||
---
|
||||
procinterrupts.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/procinterrupts.c b/procinterrupts.c
|
||||
index 6b37a88..c5c034c 100644
|
||||
--- a/procinterrupts.c
|
||||
+++ b/procinterrupts.c
|
||||
@@ -148,6 +148,9 @@ GList* collect_full_irq_list()
|
||||
char *line = NULL;
|
||||
size_t size = 0;
|
||||
char *irq_name, *irq_mod, *savedptr, *last_token, *p;
|
||||
+#ifdef AARCH64
|
||||
+ char *tmp;
|
||||
+#endif
|
||||
|
||||
file = fopen("/proc/interrupts", "r");
|
||||
if (!file)
|
24
fix_buffer_overflow_compiler.patch
Normal file
24
fix_buffer_overflow_compiler.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
|
||||
Fix compiler warning
|
||||
|
||||
Avoid:
|
||||
In function ‘snprintf’,
|
||||
inlined from ‘sock_handle’ at irqbalance.c:457:12:
|
||||
/usr/include/bits/stdio2.h:64:3: warning: call to __builtin___snprintf_chk will always overflow destination buffer [enabled by default]
|
||||
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
|
||||
|
||||
|
||||
Index: irqbalance-1.4.0/irqbalance.c
|
||||
===================================================================
|
||||
--- irqbalance-1.4.0.orig/irqbalance.c 2018-05-14 21:06:54.000000000 +0200
|
||||
+++ irqbalance-1.4.0/irqbalance.c 2018-10-04 14:16:54.982803686 +0200
|
||||
@@ -454,7 +454,7 @@ gboolean sock_handle(gint fd, GIOConditi
|
||||
if (!strncmp(buff, "setup", strlen("setup"))) {
|
||||
char banned[512];
|
||||
char *setup = calloc(strlen("SLEEP ") + 11 +1, 1);
|
||||
- snprintf(setup, 2048, "SLEEP %d ", sleep_interval);
|
||||
+ sprintf(setup, "SLEEP %d ", sleep_interval);
|
||||
if(g_list_length(cl_banned_irqs) > 0) {
|
||||
for_each_irq(cl_banned_irqs, get_irq_data, setup);
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
--- Makefile.am
|
||||
+++ Makefile.am
|
||||
@@ -36,7 +36,7 @@
|
||||
irqbalance_ui_SOURCES = $(UI_DIR)/helpers.c $(UI_DIR)/irqbalance-ui.c \
|
||||
$(UI_DIR)/ui.c
|
||||
irqbalance_ui_LDADD = $(GLIB_LIBS) $(CURSES_LIBS)
|
||||
Index: irqbalance-1.4.0/Makefile.am
|
||||
===================================================================
|
||||
--- irqbalance-1.4.0.orig/Makefile.am
|
||||
+++ irqbalance-1.4.0/Makefile.am
|
||||
@@ -46,7 +46,7 @@ irqbalance_ui_SOURCES = $(UI_DIR)/helper
|
||||
irqbalance_ui_LDADD = $(GLIB2_LIBS) $(CURSES_LIBS)
|
||||
endif
|
||||
|
||||
-dist_man_MANS = irqbalance.1
|
||||
+man_MANS = irqbalance.1
|
||||
|
||||
|
@ -1,3 +1,45 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 4 09:51:31 UTC 2018 - trenn@suse.de
|
||||
|
||||
- Allow compilation with SLE-12 and before by:
|
||||
* removing -std=C99 Latest compiler version does not complain
|
||||
anymore, SLE12 SPx and before did.
|
||||
* Fix a possible buffer overflow compiler warning
|
||||
A fix_buffer_overflow_compiler.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 1 09:12:52 UTC 2018 - egotthold@suse.com
|
||||
|
||||
- Removed aarch64-compile-fixes.patch because it is mainline now.
|
||||
|
||||
- Update to version 1.4.0:
|
||||
* Fixed an erroneous calculation of min_load that restricted candidates to a
|
||||
subset of objects
|
||||
* Fixed powerpc hotplug detection
|
||||
* Cleaned up syslog target dependency
|
||||
* Added some self test infrastructure (via make check)
|
||||
|
||||
- Update to version 1.3.0
|
||||
* New features in this release:
|
||||
optimization of platform device irq detection
|
||||
Added sample udev rules to trigger irq rescans on device add/remove
|
||||
Made irqbalance ui an optional compile component
|
||||
Added support for Intel CoD
|
||||
Add -v | --version option to command line
|
||||
* Bug fixes in this release:
|
||||
Misc compiler warning fixes and spelling errors
|
||||
Compilation error fix on aarch64
|
||||
Compilation error fix when using clang in c99 mode
|
||||
Unused variable cleanup
|
||||
Lots of memory leak cleanup in irqbalance-ui
|
||||
Prevent irqbalance from running in a container
|
||||
Fix irq affinity assignment in some cases to wrong numa node
|
||||
Fix oneshot mode
|
||||
exclude legacy irq 255
|
||||
* Deprecations:
|
||||
without-glib2 is removed, we just need it enough that we can't dummy it up
|
||||
anymore
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 23 13:40:17 UTC 2017 - rbrown@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package irqbalance
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -18,31 +18,31 @@
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
Name: irqbalance
|
||||
Version: 1.2.0
|
||||
Version: 1.4.0
|
||||
Release: 0
|
||||
Summary: Balance IRQs on SMP Machines
|
||||
License: GPL-2.0+
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/Daemons
|
||||
Url: https://github.com/Irqbalance/irqbalance
|
||||
Source: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz
|
||||
Source3: sysconfig.irqbalance
|
||||
Patch2: Set-fd-limit.patch
|
||||
Patch3: install-man-pages.patch
|
||||
Patch4: aarch64-compile-fixes.patch
|
||||
Patch1: Set-fd-limit.patch
|
||||
Patch2: install-man-pages.patch
|
||||
Patch3: fix_buffer_overflow_compiler.patch
|
||||
BuildRequires: libcap-ng-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
Requires(pre): coreutils
|
||||
Requires(pre): fillup
|
||||
ExcludeArch: s390 s390x
|
||||
%{?systemd_requires}
|
||||
%ifnarch %arm
|
||||
%ifnarch %{arm}
|
||||
BuildRequires: libnuma-devel
|
||||
%endif
|
||||
|
||||
@ -52,14 +52,12 @@ being used for all IRQs.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch2 -p1
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
%configure
|
||||
make %{?_smp_mflags} LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="%{optflags} -fPIE -pie -std=c99 $(ncurses6-config --cflags)" LDFLAGS="$(ncurses6-config --libs)"
|
||||
make %{?_smp_mflags} LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="%{optflags} -fPIE -pie $(ncurses6-config --cflags)" LDFLAGS="$(ncurses6-config --libs)"
|
||||
cp %{SOURCE3} .
|
||||
|
||||
%install
|
||||
@ -87,12 +85,11 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcirqbalance
|
||||
%service_del_postun irqbalance.service
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_sbindir}/irqbalance
|
||||
%{_sbindir}/irqbalance-ui
|
||||
%{_sbindir}/rcirqbalance
|
||||
%{_unitdir}/irqbalance.service
|
||||
%{_mandir}/man1/irqbalance.1.gz
|
||||
%{_mandir}/man1/irqbalance.1%{?ext_man}
|
||||
%{_fillupdir}/sysconfig.irqbalance
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0efe5d2a0947b54d89c7196a48eca9b3b33c80bc15964e4226a0f7d3fd9535b2
|
||||
size 55618
|
3
v1.4.0.tar.gz
Normal file
3
v1.4.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:62de71510a2496fcf027efb0b288dd48e53e9efc931fa573c95580cad6264d07
|
||||
size 53431
|
Loading…
x
Reference in New Issue
Block a user