diff --git a/irqbalance-1.0.4-env-file-path.patch b/irqbalance-1.0.4-env-file-path.patch new file mode 100644 index 0000000..6a24e26 --- /dev/null +++ b/irqbalance-1.0.4-env-file-path.patch @@ -0,0 +1,12 @@ +diff -up irqbalance-1.0.4/misc/irqbalance.service.orig irqbalance-1.0.4/misc/irqbalance.service +--- irqbalance-1.0.4/misc/irqbalance.service.orig 2012-08-29 16:24:42.011844627 +0200 ++++ irqbalance-1.0.4/misc/irqbalance.service 2012-08-29 16:24:59.817845765 +0200 +@@ -3,7 +3,7 @@ Description=irqbalance daemon + After=syslog.target + + [Service] +-EnvironmentFile=/path/to/irqbalance.env ++EnvironmentFile=/etc/sysconfig/irqbalance + ExecStart=/usr/sbin/irqbalance --foreground $IRQBALANCE_ARGS + + [Install] diff --git a/irqbalance.spec b/irqbalance.spec index b2acaff..1451a32 100644 --- a/irqbalance.spec +++ b/irqbalance.spec @@ -1,6 +1,6 @@ Name: irqbalance Version: 1.0.4 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 Summary: IRQ balancing daemon @@ -13,7 +13,8 @@ Source1: irqbalance.sysconfig BuildRequires: autoconf automake libtool libcap-ng BuildRequires: glib2-devel pkgconfig libcap-ng-devel %ifnarch %{arm} -BuildRequires: numactl-devel numactl-libs +BuildRequires: numactl-devel +BuildRequires: systemd-units Requires: numactl-libs %endif Requires(post): systemd-units @@ -23,12 +24,15 @@ Requires(preun):systemd-units ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 %{arm} +Patch1: irqbalance-1.0.4-env-file-path.patch + %description irqbalance is a daemon that evenly distributes IRQ load across multiple CPUs for enhanced performance. %prep %setup -q +%patch1 -p1 %build %{configure} @@ -36,7 +40,7 @@ CFLAGS="%{optflags}" make %{?_smp_mflags} %install install -D -p -m 0755 %{name} %{buildroot}%{_sbindir}/%{name} -install -D -p -m 0644 ./misc/irqbalance.service %{buildroot}/lib/systemd/system/irqbalance.service +install -D -p -m 0644 ./misc/irqbalance.service %{buildroot}%{_unitdir}/irqbalance.service install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name} install -d %{buildroot}%{_mandir}/man1/ @@ -46,7 +50,7 @@ install -p -m 0644 ./irqbalance.1 %{buildroot}%{_mandir}/man1/ %defattr(-,root,root) %doc COPYING AUTHORS %{_sbindir}/irqbalance -/lib/systemd/system/irqbalance.service +%{_unitdir}/irqbalance.service %{_mandir}/man1/* %config(noreplace) %{_sysconfdir}/sysconfig/irqbalance @@ -66,6 +70,9 @@ fi /sbin/chkconfig --del irqbalance >/dev/null 2>&1 || : %changelog +* Wed Aug 29 2012 Petr Holasek - 2:1.0.4-2 +- Env file path edited + * Mon Aug 27 2012 Petr Holasek - 2:1.0.4-1 - Rebased to version 1.0.4 diff --git a/irqbalance.sysconfig b/irqbalance.sysconfig index 0ff3939..8ac7a29 100644 --- a/irqbalance.sysconfig +++ b/irqbalance.sysconfig @@ -1,18 +1,28 @@ # irqbalance is a daemon process that distributes interrupts across -# CPUS on SMP systems. The default is to rebalance once every 10 -# seconds. There is one configuration option: +# CPUS on SMP systems. The default is to rebalance once every 10 +# seconds. This is the environment file that is specified to systemd via the +# EnvironmentFile key in the service unit file (or via whatever method the init +# system you're using has. # # ONESHOT=yes -# after starting, wait for a minute, then look at the interrupt -# load and balance it once; after balancing exit and do not change -# it again. -ONESHOT= +# after starting, wait for a minute, then look at the interrupt +# load and balance it once; after balancing exit and do not change +# it again. +#IRQBALANCE_ONESHOT= # -# IRQ_AFFINITY_MASK -# 64 bit bitmask which allows you to indicate which cpu's should -# be skipped when reblancing irqs. Cpu numbers which have their -# corresponding bits set to zero in this mask will not have any -# irq's assigned to them on rebalance +# IRQBALANCE_BANNED_CPUS +# 64 bit bitmask which allows you to indicate which cpu's should +# be skipped when reblancing irqs. Cpu numbers which have their +# corresponding bits set to one in this mask will not have any +# irq's assigned to them on rebalance # -#IRQ_AFFINITY_MASK= +#IRQBALANCE_BANNED_CPUS= + +# +# IRQBALANCE_ARGS +# append any args here to the irqbalance daemon as documented in the man page +# +#IRQBALANCE_ARGS= + +