Accepting request 94430 from Base:System

- Use systemd macros in pre/post scripts (forwarded request 94398 from elvigia)

OBS-URL: https://build.opensuse.org/request/show/94430
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/irqbalance?expand=0&rev=24
This commit is contained in:
Stephan Kulow 2011-12-06 12:52:08 +00:00 committed by Git OBS Bridge
commit 112688d54f
8 changed files with 44 additions and 141 deletions

View File

@ -1,13 +0,0 @@
Index: Makefile
===================================================================
--- Makefile.orig 2009-06-17 17:43:42.000000000 +0200
+++ Makefile 2009-06-17 17:48:59.000000000 +0200
@@ -6,7 +6,7 @@ all: irqbalance
LIBS=bitmap.o irqbalance.o cputree.o procinterrupts.o irqlist.o placement.o activate.o network.o powermode.o numa.o classify.o
irqbalance: .depend $(LIBS)
- gcc $(CFLAGS) $(LDFLAGS) $(LIBS) -o irqbalance
+ gcc $(CFLAGS) $(LIBS) -o irqbalance $(LDFLAGS)
clean:
rm -f irqbalance *~ *.o .depend

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bfdca6263a7eb78049c0458f6c51137f29dca3c1eebd7845f2444c07ec3e58e3
size 36453

3
irqbalance-1.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3780eb5524d6da55235b0c63eacb069bbf901114947c3edadcbc0407abb1f0cf
size 29689

View File

@ -1,21 +0,0 @@
---
Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- irqbalance-0.55.orig/Makefile
+++ irqbalance-0.55/Makefile
@@ -1,11 +1,12 @@
-CFLAGS+=-g -Os -D_FORTIFY_SOURCE=2 -Wall -W `pkg-config --cflags glib-2.0`
+override CFLAGS+=-g -Os -D_FORTIFY_SOURCE=2 -Wall -W `pkg-config --cflags glib-2.0`
+override LDFLAGS += $(shell pkg-config --libs glib-2.0)
all: irqbalance
LIBS=bitmap.o irqbalance.o cputree.o procinterrupts.o irqlist.o placement.o activate.o network.o powermode.o numa.o classify.o
irqbalance: .depend $(LIBS)
- gcc -g -O2 -D_FORTIFY_SOURCE=2 -Wall `pkg-config --libs glib-2.0` $(LIBS) -o irqbalance
+ gcc $(CFLAGS) $(LDFLAGS) $(LIBS) -o irqbalance
clean:
rm -f irqbalance *~ *.o .depend

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Nov 29 21:11:49 UTC 2011 - crrodriguez@opensuse.org
- Use systemd macros in pre/post scripts
-------------------------------------------------------------------
Mon Oct 17 13:59:37 UTC 2011 - trenn@suse.de
- Update to version 1.0
- Remove files that are upstream: manpage, systemd config file
- Introduction of highest topology level: Numa node
- ...
-------------------------------------------------------------------
Sat Oct 15 04:47:08 UTC 2011 - coolo@suse.com

View File

@ -1,77 +0,0 @@
=head1 NAME
irqbalance - distribute hardware interrupts across
processors on a multiprocessor system
=head1 SYNOPSIS
irqbalance [I<debug> | I<oneshot>]
=head1 DESCRIPTION
irqbalance is a Linux daemon that distributes interrupts over the processors
and cores you have in your computer system. The design goal of irqbalance is to
do find a balance between power savings and optimal performance. To a large
degree, the work irqbalance does is invisible to you; if irqbalance performs
its job right, nobody will ever notice it's there or want to turn it off.
For more information, visit the irqbalance homepage at
I<http://www.irqbalance.org>.
=head1 OPTIONS
=over 7
=item B<debug>
Prints debug messages on stdout.
=item B<oneshot>
Only do a one shot setup.
=back
=head1 ENVIRONMENT
=over 7
=item B<IRQBALANCE_BANNED_CPUS>
Bitmap of CPUs that are banned from IRQ balancing
=item B<IRQBALANCE_ONESHOT>
Same as the oneshot option mentioned above.
=item B<IRQBALANCE_DEBUG>
Same as the debug option mentioned above.
=item B<IRQBALANCE_BANNED_INTERRUPTS>
Interrupt that don't get balanced as list (separation character doesn't
matter). For example broken chipsets don't allow the timer interrupt
to be set to another CPU than the first, and with this option that
policy can be applied.
=back
=head1 SEE ALSO
Homepage: I<http://www.irqbalance.org>
=head1 AUTHOR
irqbalance was written by Arjan van de Ven E<lt>arjan@linux.intel.comE<gt>.
This manpage was written by Bernhard Walle E<lt>bwalle@suse.deE<gt> based on
the original manpage of the old irqbalance package and on the documentation
available from the irqbalance hompage.
=head1 MAINTAINER
Arjan van de Ven <arjan@linux.intel.com>
=cut

View File

@ -1,11 +0,0 @@
[Unit]
Description=irqbalance daemon
After=syslog.target
[Service]
EnvironmentFile=/etc/sysconfig/irqbalance
Type=forking
ExecStart=/usr/sbin/irqbalance $ONESHOT
[Install]
WantedBy=multi-user.target

View File

@ -18,19 +18,17 @@
Name: irqbalance
Version: 0.56_svn201010021305
Version: 1.0
Release: 9
License: GPLv2+
Summary: Balance IRQs on SMP Machines
Url: http://www.irqbalance.org
Url: http://code.google.com/p/irqbalance
Group: System/Daemons
Source: %{name}-%{version}.tar.bz2
Source1: irqbalance.pod
Source2: irq_balancer
Source3: sysconfig.irqbalance
Source4: irqbalance.service
# xorg-x11-util-devel is for gccmakedep
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: libnuma-devel
BuildRequires: libtool
PreReq: coreutils
PreReq: fillup
@ -38,10 +36,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1130
BuildRequires: libcap-ng-devel
%endif
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0: irqbalance-fix-Makefile
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: irqbalance-0.55-as-needed.patch
%if 0%{?suse_version} > 1140
BuildRequires: systemd
%{?systemd_requires}
%define has_systemd 1
%endif
%description
irqbalance dynamically switches the CPUs for IRQs to prevent cpu0 from
@ -49,16 +48,12 @@ being used for all IRQs.
%prep
%setup -q
%patch0 -p1
%patch1
%build
./autogen.sh
%configure
make LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="%{optflags} -fPIE -pie"
cp %{SOURCE1} .
cp %{SOURCE3} .
pod2man --release=0.5.5 --center=irqbalance irqbalance.pod irqbalance.1
gzip irqbalance.1
%install
@ -71,24 +66,41 @@ mkdir -p %{buildroot}%{_mandir}/man1
install -m 0644 irqbalance.1.gz %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/
install -m 0644 sysconfig.irqbalance %{buildroot}%{_localstatedir}/adm/fillup-templates/
mkdir -p %{buildroot}/lib/systemd/system/
install -D -p -m 0644 %{SOURCE4} %{buildroot}/lib/systemd/system/
%if 0%{?has_systemd}
install -D -m 0644 misc/irqbalance.service %{buildroot}%{_unitdir}/irqbalance.service
%endif
%pre
%if 0%{?has_systemd}
%service_add_pre irqbalance.service
%endif
%post
%fillup_only
%if 0%{?has_systemd}
%service_add_post irqbalance.service
%endif
%preun
%stop_on_removal irq_balancer
%if 0%{?has_systemd}
%service_del_preun irqbalance.service
%endif
%postun
%restart_on_update irq_balancer
%insserv_cleanup
%if 0%{?has_systemd}
%service_del_postun irqbalance.service
%endif
%files
%defattr(-,root,root,-)
%{_sbindir}/irqbalance
%{_sysconfdir}/init.d/irq_balancer
/lib/systemd/system/irqbalance.service
%if 0%{?has_systemd}
%{_unitdir}/irqbalance.service
%endif
%{_sbindir}/rcirq_balancer
%{_mandir}/man1/irqbalance.1.gz
%{_localstatedir}/adm/fillup-templates/sysconfig.irqbalance