File ibmrtpkgs.spec of Package ibmrtpkgs

#
# spec file for package ibmrtpkgs (Version 2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#



Name:           ibmrtpkgs
Url:            http://www10.software.ibm.com/developerworks/opensource/linux390
Summary:        IBM Utilities for SLERT
Version:        2
Release:        6
PreReq:         %insserv_prereq %fillup_prereq
License:        GPL v3 only
Group:          System/Management
Source:         ibmrtpkgs-%{version}.tar.gz
Patch1:         kthreadprio_defaults-bnc415750.diff
Patch2:         kthreadprio_autostart-bnc412439.diff
Patch3:         update_rtcheck_to_0_7_4-bnc431066.diff
Patch4:         update_rtcheck_to_0_7_5-bnc431066.diff
Patch5:         make_init_lsb.diff
Patch6:         ibm-prtm_for_ls22-bnc443830.diff
Patch7:         set_nfs_to_rt_per_ibm_testing.diff
Patch8:         fix_rtcheck_patch.diff
Patch9:         rename_ibmconfig.diff
AutoReqProv:    yes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A collection of utilities supplied by IBM to create a real time
environment primarily for RT WebSphere applications deployed on SLERT. 
Also contains a utility called ibm-prtm that removes latencies seen
when running SLERT on IBM hardware due to SMI interrupts.



Authors:
--------
    IBM

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1

%build
export OPT_FLAGS="$RPM_OPT_FLAGS"
cd $RPM_BUILD_DIR/ibmrtpkgs-2
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/sbin $RPM_BUILD_ROOT/usr/sbin
install $RPM_BUILD_DIR/ibmrtpkgs-2/config/ibmconfig.sh $RPM_BUILD_ROOT/sbin
install $RPM_BUILD_DIR/ibmrtpkgs-2/config/ibmconfig $RPM_BUILD_ROOT/etc/init.d/
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/ibmconfig rcibmconfig)
install $RPM_BUILD_DIR/ibmrtpkgs-2/dslimit/dslimit $RPM_BUILD_ROOT/usr/bin
install $RPM_BUILD_DIR/ibmrtpkgs-2/ibm-prtm/ibm-prtmd $RPM_BUILD_ROOT/usr/bin
install $RPM_BUILD_DIR/ibmrtpkgs-2/ibm-prtm/ibm-prtm $RPM_BUILD_ROOT/etc/init.d/ibm-prtm
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/ibm-prtm rcibm-prtm)
install $RPM_BUILD_DIR/ibmrtpkgs-2/irqbindall/irqbindall $RPM_BUILD_ROOT/etc/init.d/irqbindall
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/irqbindall rcirqbindall)
install $RPM_BUILD_DIR/ibmrtpkgs-2/rtcheck/rtcheck $RPM_BUILD_ROOT/sbin
install $RPM_BUILD_DIR/ibmrtpkgs-2/rtcheck/rtcheck.init.suse $RPM_BUILD_ROOT/etc/init.d/rtcheck
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/rtcheck rcrtcheck)
install $RPM_BUILD_DIR/ibmrtpkgs-2/rt-watchdog/rt-watchdog $RPM_BUILD_ROOT/usr/bin
install $RPM_BUILD_DIR/ibmrtpkgs-2/rt-sshd/rt-sshd $RPM_BUILD_ROOT/etc/init.d/rt-sshd
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/rt-sshd rcrt-sshd)
install $RPM_BUILD_DIR/ibmrtpkgs-2/set_kthread_prio/set_kthread_prio.conf $RPM_BUILD_ROOT/etc/set_kthread_prio.conf
install $RPM_BUILD_DIR/ibmrtpkgs-2/set_kthread_prio/set_kthread_prio $RPM_BUILD_ROOT/etc/init.d/set_kthread_prio
(cd $RPM_BUILD_ROOT/usr/sbin ; ln -s ../../etc/init.d/set_kthread_prio rcset_kthread_prio)
for i in `( cd $RPM_BUILD_ROOT ; find * | sort )` ; do
        if ! test -d $RPM_BUILD_ROOT/$i ; then
            echo "/$i"
        fi
done > %{_builddir}/%{name}.list

%post
%{fillup_and_insserv -fy ibm-prtm}
%{fillup_and_insserv -fy irqbindall}
%{fillup_and_insserv -fy rtcheck}
%{fillup_and_insserv -fy set_kthread_prio}
%{fillup_and_insserv -fy ibmconfig}
if test ! -e /.buildenv; then
    /usr/sbin/rcibm-prtm start
    /usr/sbin/rcirqbindall start
    /usr/sbin/rcrtcheck start
    /usr/sbin/rcset_kthread_prio start
    /usr/sbin/rcibmconfig start
fi

%postun
%{restart_on_update ibm-prtm irqbinall rtcheck set_kthread_prio ibmconfig}
%{insserv_cleanup}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{_builddir}/%{name}.list
%defattr(-,root,root)
%doc COPYING README 

%changelog
* Mon Nov 24 2008 alext@suse.de
- Fixed path of rtcheck to be in /sbin
- Renamed config.sh to ibmconfig.sh to avoid confusion
* Tue Nov 11 2008 alext@suse.de
- Upgrade ibm-prtm utility for support for LS22 hardware.
  Patch: ibm-prtm_for_ls22-bnc443830.diff
  Fixes: bnc#443830
- Change nfs kernel threads to rt priority of sirq-net-*+1, this
  fixes nfs hangs that have appeared due to nfs stress tests
  performed at IBM.
  Patch: set_nfs_to_rt_per_ibm_testing.diff
* Thu Nov 06 2008 alext@suse.de
- Deactivate rt-sshd on install as per IBM's request
* Wed Nov 05 2008 alext@suse.de
- Update rtcheck to 0.7.5 as per post in bnc#431066.
- Fix file permissions errors for stable build
- Fix non-LSB of init scripts
- Remove unversioned self-provide
* Tue Oct 28 2008 alext@suse.de
- Add patch from IBM to leave default kthread priority at current
  setting if the kthread is not recognized in set_kthread_prio.conf.
  Patch: kthreadprio_defaults-bnc415750.diff
  Fixes bnc#41570
- Add insserv comment section to init.d/set_kthread_prio so script
  is activated for subsequent reboots; change fillup_and_insserv
  options in spec file to -fy, otherwise it doesn't turn it on.
  Patch: kthreadprio_autostart-bnc412439.diff
  Fixes: bnc#412439
- Update rtcheck to version 0.7-4 as supplied by IBM.  Rename
  rtcheck directory from rtcheck-0.6-5 to rtcheck.
  PAtch: update_rtcheck_to_0_7_4-bnc431066.diff
  Fixes: bnc#431066
* Wed Jun 04 2008 alext@suse.de
- Fixed small problem with sed commandlines
* Fri May 30 2008 alext@suse.de
- Applied patches coming in on rtibm list for ibm-prtmd, ibm-prtm,
  and config.sh.
* Wed May 21 2008 alext@suse.de
- Disable calling of rc scripts in %%post if installed on build
  machine.  Fixes build errors.
* Thu May 15 2008 alext@suse.de
- Fixed ibm-prtm/ibm-prtm script to use start_daemon
- Fixed config.sh script to work on slert/sles; changed to be able
  to run on every boot
- Added ibmconfig sysinit script to call config.sh
- Change NOVELL_README to README and included in doc dir as well
  as COPYING file
- Added common /etc/init.d/functions file for scripts so they work
- Fixed errors in other scripts
- Changed spec file to run rc scripts on install and activate all
  service scripts on boot
- Installation of this package automatically sets up the IBM RT
  environment for the current and subsequent reboots
* Wed May 07 2008 ihno@suse.de
- initial Version
openSUSE Build Service is sponsored by