File scsirastools.spec of Package scsirastools

#
# spec file for package scsirastools (Version 1.5.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#Copyright:    intel
#
# 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/
#

# norootforbuild


Name:           scsirastools
Version:        1.5.8
Release:        1
License:        BSD 3-Clause
Group:          Hardware/Other
#Provides:     
Requires:       mdadm
AutoReqProv:    on
Summary:        Serviceability for SCSI Disks and Arrays
Source:         http://belnet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Patch:          %{name}-1.4.9-SuSE.diff
Patch2:         %{name}-install
Patch3:         %{name}-single-dev.diff
Url:            http://scsirastools.sourceforge.net/
#Prefix:         /usr
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Hard disks are the most commonly replaced system elements, and are
therefore a critical consideration for improving availability. Root
Disk Mirroring (RAID-1) is the technique of using redundant disks to
record multiple copies of the data so that one disk failure will not
cause data loss.

This project includes changes that enhance the Reliability,
Availability, and Serviceability (RAS) of the drivers that are commonly
used in a Linux software RAID-1 configuration. Other efforts have been
made to enable various common hardware RAID adapters and their drivers
on Linux.

The tools in this project were designed to add to the serviceability of
SCSI devices under Linux so that the system does not have to be
rebooted or taken out of service to perform common maintenance or
service functions. This project has user-space and kernel level
components:

sgraidmon - a tool to monitor software RAID disks for
hot-insertion/removal; Note that this uses raidtools like mdadm to
re-configure the new disk. sgdefects - a tool to read the primary and
grown defect lists sgdskfl - a tool to load disk firmware to SCSI disks
under Linux; some sample firmware images are included in the package
sgmode - a tool to get and set SCSI device mode pages; some sample mode
page definition files are included in the package sgdiag - a tool to
perform format and other diagnostic functions

The scsiras patches are not currently included in our kernel.



Authors:
--------
    Andy Cress <arcress@users.sourceforge.net>
    Tariq Shureih <tariqx@users.sourceforge.net>

%prep
%setup
%patch -p1
#%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS" ./configure  --with-infodir=%{_infodir} \
	--with-mandir=%{_mandir}  --libdir=%{_libdir} --sysconfdir=/etc \
	--with-docdir=%{_defaultdocdir} --datadir=/usr/share \
	--prefix=/usr --sharedstatedir=/var
make 

%install
#test ! -z "$RPM_BUILD_ROOT" -a ! "$RPM_BUILD_ROOT" = "/" && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
#mv $RPM_BUILD_ROOT/usr/share/scsirastools/mdadm $RPM_BUILD_ROOT/sbin/mdadm_srt
#mv $RPM_BUILD_ROOT/usr/share/scsirastools/mdadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8/mdadm_srt.8
%ifnarch %ix86
rm -f $RPM_BUILD_ROOT/usr/share/scsirastools/alarms
%endif

%files
%defattr(-,root,root)
/sbin/sg*
/sbin/md*
/sbin/getmd
%config /etc/init.d/sgraid
%config /etc/init.d/sgdisk
%{_mandir}/man8/sg*.8.gz
#%{_mandir}/man8/md*.8.gz
%dir /usr/share/scsirastools
/usr/share/scsirastools/*.mdf
/usr/share/scsirastools/rescan-scsi-bus.sh
%ifarch %ix86
/usr/share/scsirastools/alarms
%endif
%doc %{_defaultdocdir}/%{name}
#%files firmware
#/usr/share/scsirastools/*.lod
#/usr/share/scsirastools/*.tms

%clean
test ! -z "RPM_BUILD_ROOT" -a ! "$RPM_BUILD_ROOT" = "/" && rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}

%changelog
* Sat Aug 23 2008 garloff@suse.de
- Adapt init scripts (more needed)
- Update to 1.5.8:
  * Various bug fixes
  * Support for larger device lists
  * Fujitsu disk fw bug workarounds
  * SES enclosure slot status support
  * Docu updates
  * New: sgdiskmon
* Thu Jul 20 2006 schwab@suse.de
- Use autoreconf.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Jan 23 2005 garloff@suse.de
- Correct add-single-device syntax. [#46815]
- Update to scsirastools-1.4.10:
  * sgraidmon: start_unit for sense 2:4:1 before reset
* Fri Sep 10 2004 schwab@suse.de
- Remove useless binary from shared data dir.
* Sat Aug 21 2004 garloff@suse.de
- Don't remove files from source dir when installing.
* Mon Aug 16 2004 garloff@suse.de
- Update to scsirastools-1.4.9:
  * sgdiag: Document -t option, default format timeout 150min now.
- Update to scsirastools-1.4.8:
  * sgraidmon: mdevt and mdevents log docu
- Update to scsirastools-1.4.6:
  * mdevt: fix mBMC disk fault LED logic
- Update to scsirastools-1.4.5:
  alarms: mew tool, sets disk fault LEDs
* Thu Mar 18 2004 garloff@suse.de
- Fix permissions (#36336).
* Tue Feb 17 2004 garloff@suse.de
- Update to scsirastools-1.4.4:
  * Various improvements to sgraidmon.
* Wed Oct 15 2003 garloff@suse.de
- Update to scsirastools-1.4.3:
  * 64 bit cleanliness
  * Docu updates
- Update to scsirastools-1.4.2:
  * sgmode: adjust format dev page if block size changes
  * sgraidmon: return value, debug log, check for last dev in raid
  (#30603)
  * sgafte: new util
  * mdevt: grub boot images are in menu.lst
- Update to scsirastools-1.4.1: Support for 12byte serial numbers.
- Update to scsirastools-1.4.0: SUSE patches have been incor-
  porated :-)
* Sun Apr 13 2003 garloff@suse.de
- Fix devfs detection in sgraidmon as well.
* Thu Apr 10 2003 garloff@suse.de
- Fix devfs detection.
* Thu Apr 03 2003 garloff@suse.de
- Include errno.h in getmd
* Thu Apr 03 2003 garloff@suse.de
- Update to 1.3.9 which comes without the firmwares (whose license
  is unclear).
* Wed Apr 02 2003 garloff@suse.de
- Fix init script.
* Wed Apr 02 2003 garloff@suse.de
- Split package into scsirastools and scsirastools-firmware
* Wed Apr 02 2003 garloff@suse.de
- Initial creation of scsirastools-1.3.8
- Disabled build of mdadm (it's provided by an own package)
- Fixed paths to be LSB compliant
- Fixed init script to be UL compliant
openSUSE Build Service is sponsored by