irqbalance/irqbalance.spec
2019-09-30 10:53:30 -04:00

142 lines
4.6 KiB
RPMSpec

Summary: A dynamic adaptive IRQ balancing daemon
Name: irqbalance
Version: 1.4.0
Release: 6
Epoch: 3
License: GPLv2
Source0: https://github.com/Irqbalance/irqbalance/archive/irqbalance-%{version}.tar.gz
Source1: irqbalance.sysconfig
Source2: irqbalance.rules
Source3: irq_balancer
Url: https://github.com/Irqbalance/irqbalance
BuildRequires: autoconf automake libtool libcap-ng systemd
BuildRequires: glib2-devel pkgconf libcap-ng-devel ncurses-devel
Requires: ncurses-libs
%ifnarch %{arm}
BuildRequires: numactl-devel
Requires: numactl-libs
%endif
%define _hardened_build 1
ExcludeArch: s390 s390x
Patch0: add-a-catchall-guessing-mechanis.patch
Patch1: irq_db-don-t-fail-entirely-if-we-don-t-have-a-pci-bu.patch
Patch2: cputree-adjust-snprintf-sizes-to-avoid-gcc-warnings.patch
Patch3: classify-remove-unused-label.patch
Patch4: parse_proc_interrupts-ensure-that-buffer-is-long-eno.patch
Patch5: Fix-some-string-copy-limitations.patch
Patch6: irqbalance-Add-support-for-file-based-socket-for-IPC.patch
Patch7: Fix-several-memleak-problems-found-by-covscan.patch
Patch8: Fix-an-possible-overflow-error.patch
Patch9: procinterrupts-check-xen-dyn-event-more-flexible.patch
Patch10:Fix-ambiguous-parsing-of-node-entries-in-sys.patch
Patch11:Don-t-leak-socket-fd-on-connection-error.patch
Patch12:Fix-string-truncation-issues-detected-by-GCC-8.patch
Patch13:fix-balancing-when-numa-information-isn-t-available.patch
Patch9000: irqbalance-1.0.4-env-file-path.patch
Patch9001: bugfix-fix-a-hole-that-flees-hotplug-event.patch
Patch9002: bugfix-use-policy-prior-to-the-default-values.patch
Patch9003: bugfix-force-irq-into-rebalance-list-when-irq-removed-and-reinserted.patch
Patch9004: feature-introduce-verifyhint-to-detect-hint-variation.patch
Patch9005: bugfix-fix-two-same-irq-insert-to-list.patch
Patch9006: feature-irqbalance-aarch64-add-the-regular-to-get-th.patch
Patch9007: feature-irqbalance-arm64-Add-irq-aff-change-check.patch
Patch9008: feature-irqbalance-auto-banned-pci-assigned-irq.patch
Patch9009: bugfix-irqbalance-fix-wrong-pid-value-in-pid-file.patch
Patch9010: feature-supplement-irqbalance-service-config.patch
Patch9011: feature-irqbalance-Add-ability-for-socket-communicat.patch
Patch9012: bugfix-fgets-will-get-a-redundant-new-line.patch
Patch9013: bugfix-prevent-inserting-a-duplicate-entry-to-avoid-list-ch.patch
Patch9014: bugfix-guess_arm_irq_hints.patch
Patch9015: feature-add-new-user-irq-policy-config-rule.patch
%description
Irqbalance is a daemon to help balance the cpu load generated by
interrupts across all of a systems cpus. Irqbalance identifies the
highest volume interrupt sources, and isolates each of them to a
single unique cpu, so that load is spread as much as possible over
an entire processor set, while minimizing cache miss rates for irq
handlers.
%prep
%autosetup -p1
%build
./autogen.sh
%configure
CFLAGS="%{optflags}" %make_build CFLAGS+='-fstack-protector-strong '
%install
install -D -p -m 0755 %{name} %{buildroot}%{_sbindir}/%{name}
install -D -p -m 0644 ./misc/%{name}.service %{buildroot}/%{_unitdir}/%{name}.service
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -D -p -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}.rules
install -D -p -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}/irq_balancer
install -d %{buildroot}%{_mandir}/man1/
install -p -m 0644 ./%{name}.1 %{buildroot}%{_mandir}/man1/
%check
make check
%files
%doc COPYING AUTHORS
%{_sbindir}/%{name}
%{_unitdir}/%{name}.service
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_sysconfdir}/sysconfig/%{name}.rules
%{_sbindir}/irq_balancer
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%triggerun -- %{name} < 2:0.56-3
if /sbin/chkconfig --level 3 %{name} ; then
/bin/systemctl enable %{name}.service >/dev/null 2>&1 || :
fi
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
%changelog
* Mon Sep 23 2019 hejingxian<hejingxian@huawei.com> - 3:1.4.0-6
- Type: enhancement
- ID:NA
- SUG:NA
- DESC: add avoid duplicate-entry insert, guess_arm_irq_hints and new config rule patches
* Thu Sep 12 2019 caomeng<caomeng5@huawei.com> - 3:1.4.0-5
- Type:other
- ID:NA
- SUG:NA
- DESC: fix make in parallel way
* Fri Aug 30 2019 caomeng<caomeng5@huawei.com> - 3:1.4.0-4
- Type:other
- ID:NA
- SUG:NA
- DESC: fix SP comile option
* Thu Aug 29 2019 caomeng<caomeng5@huawei.com> - 3:1.4.0-3
- Type:other
- ID:NA
- SUG:NA
- DESC: openeuler rewrite spec file
* Thu Aug 29 2019 caomeng<caomeng5@huawei.com> - 3:1.4.0-2
- Package init