File scsirastools.spec of Package scsirastools

# spec file for package scsirastools
# Copyright (c) 2012 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

Name:           scsirastools
Version:        1.6.4
Release:        17.11
BuildRequires:  automake
Requires:       mdadm
Summary:        Serviceability for SCSI Disks and Arrays
License:        BSD-3-Clause
Group:          Hardware/Other
Patch:          %{name}-1.6.4-SUSE.diff
Patch2:         %{name}-install
Patch3:         %{name}-single-dev.diff
Patch4:         %{name}-stop-using-var-lock-subsys.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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

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.

    Andy Cress <>
    Tariq Shureih <>

%patch -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

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

#test ! -z "$RPM_BUILD_ROOT" -a ! "$RPM_BUILD_ROOT" = "/" && rm -rf $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

%config /etc/init.d/sgraid
%config /etc/init.d/sgdisk
%dir /usr/share/scsirastools
%doc %{_defaultdocdir}/%{name}
#%%files firmware



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