irqbalance/irqbalance.spec

108 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package irqbalance
#
Accepting request 878217 from home:trenn:branches:Base:System - Update to version 1.7.0+git20210222.9db8d5c: * ui: fix cpu/irq menu off by one * fix uint64_t printf format (use PRIu64) * Also fetch node info for non-PCI devices * Add hot pull method for irqbalance * Add log for hotplug appropriately * add irq hotplug feature for irqbalance * Remove some unused constant macros in constants.h * Add a deprecation notice for IRQBALANCE_BANNED_CPUS * Add IRQBALANCE_BANNED_CPULIST to env file * log correctly for isolated and nohz_full cpus * Update README.md * Add some examples for IRQBALANCE_BANNED_CPUS * Adjust how we determine if a cpu is online * activate_mapping: activate only online CPUs * add env variable to ban cpus using cpulist syntax * put arg parsing detail into parse_command_line() * Updating configure script to version 1.7.0 * Add strlen checking for IRQBALANCE_BANNED_CPUS * remove redundant "/" in SOCKET_TMPFS * Fix typo in service unit file * arm64: Add irq aff change check For aarch64, the PPIs format in /proc/interrputs can be parsed and add to interrupt db, and next, the number of interrupts is counted and used to calculate the load. Finally these interrupts maybe scheduled between the NUMA domains. * Correct typos in irqbalance.c * free cpu_ban_string when the next request come * improve irq migrate rule to avoid high irq load * make the option 'V' closer to the option with no arg OBS-URL: https://build.opensuse.org/request/show/878217 OBS-URL: https://build.opensuse.org/package/show/Base:System/irqbalance?expand=0&rev=86
2021-03-11 09:21:24 +01:00
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
Name: irqbalance
Version: 1.8.0.8.gbd5aaf5
Release: 0
Summary: Daemon to balance IRQs on SMP machines
License: GPL-2.0-or-later
Group: System/Daemons
URL: https://github.com/Irqbalance/irqbalance
Accepting request 878217 from home:trenn:branches:Base:System - Update to version 1.7.0+git20210222.9db8d5c: * ui: fix cpu/irq menu off by one * fix uint64_t printf format (use PRIu64) * Also fetch node info for non-PCI devices * Add hot pull method for irqbalance * Add log for hotplug appropriately * add irq hotplug feature for irqbalance * Remove some unused constant macros in constants.h * Add a deprecation notice for IRQBALANCE_BANNED_CPUS * Add IRQBALANCE_BANNED_CPULIST to env file * log correctly for isolated and nohz_full cpus * Update README.md * Add some examples for IRQBALANCE_BANNED_CPUS * Adjust how we determine if a cpu is online * activate_mapping: activate only online CPUs * add env variable to ban cpus using cpulist syntax * put arg parsing detail into parse_command_line() * Updating configure script to version 1.7.0 * Add strlen checking for IRQBALANCE_BANNED_CPUS * remove redundant "/" in SOCKET_TMPFS * Fix typo in service unit file * arm64: Add irq aff change check For aarch64, the PPIs format in /proc/interrputs can be parsed and add to interrupt db, and next, the number of interrupts is counted and used to calculate the load. Finally these interrupts maybe scheduled between the NUMA domains. * Correct typos in irqbalance.c * free cpu_ban_string when the next request come * improve irq migrate rule to avoid high irq load * make the option 'V' closer to the option with no arg OBS-URL: https://build.opensuse.org/request/show/878217 OBS-URL: https://build.opensuse.org/package/show/Base:System/irqbalance?expand=0&rev=86
2021-03-11 09:21:24 +01:00
# Source: https://github.com/Irqbalance/irqbalance/archive/v%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz
Source: %{name}-%{version}.tar.gz
Source3: sysconfig.irqbalance
Patch1: Set-fd-limit.patch
BuildRequires: libcap-ng-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(glib-2.0)
Requires(pre): %fillup_prereq
Recommends: %{name}-ui
ExcludeArch: s390 s390x
%{?systemd_requires}
%ifnarch %{arm}
BuildRequires: libnuma-devel
%endif
%description
irqbalance dynamically switches the CPUs for IRQs to prevent cpu0 from
being used for all IRQs.
%package ui
Summary: UI for IRQ balance Daemon
Group: System/Daemons
Requires: %{name} = %{version}
%description ui
Text UI for the IRQ balance daemon.
%prep
%setup -q
%autopatch -p1
%build
NOCONFIGURE=1 ./autogen.sh
%configure
%make_build LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="%{optflags} -fPIE -pie $(ncurses6-config --cflags)" LDFLAGS="$(ncurses6-config --libs)"
cp %{SOURCE3} .
%install
%make_install
mkdir -p %{buildroot}%{_fillupdir}/
install -m 0644 sysconfig.irqbalance %{buildroot}%{_fillupdir}/
sed -ie "s|EnvironmentFile=.*|EnvironmentFile=%{_sysconfdir}/sysconfig/irqbalance|g" misc/irqbalance.service
# Remove syslog.target in systemd service file; not provided by systemd anymore
sed -ie "s|After=syslog.target||g" misc/irqbalance.service
install -D -m 0644 misc/irqbalance.service %{buildroot}%{_unitdir}/irqbalance.service
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcirqbalance
%pre
%service_add_pre irqbalance.service
%post
%fillup_only %{name}
%service_add_post irqbalance.service
%preun
%service_del_preun irqbalance.service
%postun
%service_del_postun irqbalance.service
%files
%license COPYING
%doc AUTHORS README.md
%{_sbindir}/irqbalance
%{_sbindir}/rcirqbalance
%{_unitdir}/irqbalance.service
%{_mandir}/man1/irqbalance.1%{?ext_man}
%{_fillupdir}/sysconfig.irqbalance
%files ui
%{_sbindir}/irqbalance-ui
%{_mandir}/man1/irqbalance-ui.1%{?ext_man}
%changelog