mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 21:51:27 +00:00
Conflicts: Makefile fcst/Makefile iscsi-scst/Makefile iscsi-scst/include/iscsi_scst.h iscsi-scst/include/iscsi_scst_ver.h iscsi-scst/kernel/Makefile iscsi-scst/kernel/config.c iscsi-scst/kernel/conn.c iscsi-scst/kernel/digest.c iscsi-scst/kernel/digest.h iscsi-scst/kernel/event.c iscsi-scst/kernel/iscsi.c iscsi-scst/kernel/iscsi.h iscsi-scst/kernel/iscsi_dbg.h iscsi-scst/kernel/iscsi_hdr.h iscsi-scst/kernel/nthread.c iscsi-scst/kernel/param.c iscsi-scst/kernel/session.c iscsi-scst/kernel/target.c iscsi-scst/usr/Makefile iscsi-scst/usr/chap.c iscsi-scst/usr/config.c iscsi-scst/usr/conn.c iscsi-scst/usr/ctldev.c iscsi-scst/usr/event.c iscsi-scst/usr/iscsi_adm.c iscsi-scst/usr/iscsi_adm.h iscsi-scst/usr/iscsi_hdr.h iscsi-scst/usr/iscsi_scstd.c iscsi-scst/usr/iscsid.c iscsi-scst/usr/iscsid.h iscsi-scst/usr/isns.c iscsi-scst/usr/isns_proto.h iscsi-scst/usr/log.c iscsi-scst/usr/message.c iscsi-scst/usr/misc.c iscsi-scst/usr/misc.h iscsi-scst/usr/param.c iscsi-scst/usr/param.h iscsi-scst/usr/session.c iscsi-scst/usr/target.c iscsi-scst/usr/types.h nightly/conf/nightly.conf qla2x00t/qla2x00-target/Makefile qla2x00t/qla2x00-target/README qla2x00t/qla2x00-target/qla2x00t.c qla2x00t/qla2x00-target/qla2x00t.h qla2x00t/qla2x_tgt.h qla2x00t/qla2x_tgt_def.h qla2x00t/qla_attr.c qla2x00t/qla_init.c qla2x00t/qla_inline.h qla2x00t/qla_isr.c qla2x00t/qla_mbx.c qla2x00t/qla_os.c scripts/generate-release-archive scripts/rebuild-rhel-kernel-rpm scripts/run-regression-tests scst.spec.in scst/Makefile scst/README scst/README_in-tree scst/include/scst.h scst/include/scst_const.h scst/include/scst_debug.h scst/include/scst_sgv.h scst/include/scst_user.h scst/src/Makefile scst/src/dev_handlers/Makefile scst/src/dev_handlers/scst_cdrom.c scst/src/dev_handlers/scst_changer.c scst/src/dev_handlers/scst_disk.c scst/src/dev_handlers/scst_modisk.c scst/src/dev_handlers/scst_processor.c scst/src/dev_handlers/scst_raid.c scst/src/dev_handlers/scst_tape.c scst/src/dev_handlers/scst_user.c scst/src/dev_handlers/scst_vdisk.c scst/src/scst_debug.c scst/src/scst_lib.c scst/src/scst_main.c scst/src/scst_mem.c scst/src/scst_mem.h scst/src/scst_module.c scst/src/scst_pres.c scst/src/scst_pres.h scst/src/scst_priv.h scst/src/scst_proc.c scst/src/scst_sysfs.c scst/src/scst_targ.c scst/src/scst_tg.c scst_local/scst_local.c srpt/Makefile srpt/README srpt/README.ofed srpt/conftest/gid_change/Makefile srpt/src/ib_srpt.c srpt/src/ib_srpt.h usr/fileio/Makefile usr/fileio/common.c usr/fileio/common.h usr/fileio/debug.c usr/fileio/debug.h usr/fileio/fileio.c www/comparison.html www/contributing.html www/downloads.html www/handler_fileio_tgt.html www/index.html www/mc_s.html www/scst_admin.html www/scstvslio.html www/scstvsstgt.html www/solutions.html www/target_emulex.html www/target_fcoe.html www/target_ibmvscsi.html www/target_iscsi.html www/target_local.html www/target_lsi.html www/target_mvsas.html www/target_old.html www/target_qla2x00t.html www/target_srp.html www/targets.html www/users.html
201 lines
7.0 KiB
RPMSpec
201 lines
7.0 KiB
RPMSpec
%define kmod_name scst
|
|
# kversion: Kernel version as it appears under /lib/modules.
|
|
# The algorithm for setting the variable kversion is as follows:
|
|
# - If the variable kversion has been set, use its value.
|
|
# - If an RPM with the name kernel-headers exists (RHEL / CentOS), use the
|
|
# version number of the kernel that package is based on. This provides the
|
|
# version number when building on a koji build server.
|
|
# - Otherwise use the version number of the running kernel.
|
|
%{!?kversion:%define kversion %{expand:%%(
|
|
if rpm --quiet -q kernel-headers; then
|
|
rpm -q --qf '%%%%{version}-%%%%{release}.%%%%{arch}\\n' \\
|
|
kernel-headers | head -n1;
|
|
else
|
|
uname -r;
|
|
fi
|
|
)}}
|
|
%{echo:kversion=%{kversion}
|
|
}
|
|
# kernel_rpm: Name of the kernel RPM if the kernel is available as an RPM.
|
|
%if %{expand:%%(rpm --quiet -q kernel-headers ||
|
|
rpm --quiet -qf /lib/modules/%{kversion}/kernel/arch 2>/dev/null;
|
|
echo $((1-$?)))}
|
|
%define kernel_rpm %{expand:%%(
|
|
if rpm --quiet -q kernel-headers; then
|
|
echo kernel;
|
|
else
|
|
rpm -q --qf '%%%%{name}\\n' \\
|
|
"$(rpm -qf /lib/modules/%%{kversion}/kernel/arch | head -n1)";
|
|
fi
|
|
)}
|
|
%endif
|
|
# krpmver: Version of the kernel RPM. Not necessarily identical to %{kversion}.
|
|
%{?kernel_rpm:%define krpmver %{expand:%%(
|
|
if rpm --quiet -q %%{kernel_rpm}; then
|
|
rpm -q --qf '%%%%{version}-%%%%{release}\\n' "%%{kernel_rpm}";
|
|
else
|
|
rpm -q --qf '%%%%{version}-%%%%{release}\\n' kernel-headers;
|
|
fi |
|
|
head -n1
|
|
)}}
|
|
%{echo:krpmver=%{krpmver}
|
|
}
|
|
# kernel_devel_rpm: Name of the kernel development RPM.
|
|
%{?kernel_rpm:%define kernel_devel_rpm %{kernel_rpm}-devel}
|
|
# Version of the RPM that is being built.
|
|
%define rpm_version @rpm_version@
|
|
# Make command with or without flags.
|
|
%define make %{expand:%%(echo ${MAKE:-make})}
|
|
%define pkgrel 1
|
|
|
|
Name: %{kmod_name}-%{kversion}
|
|
Version: %{rpm_version}
|
|
Release: %{pkgrel}%{?dist}
|
|
Summary: SCST mid-layer kernel drivers
|
|
Group: System/Kernel
|
|
License: GPLv2
|
|
Vendor: http://scst.sourceforge.net/
|
|
URL: http://scst.sourceforge.net/
|
|
%{?kernel_rpm:Requires: %{kernel_rpm} = %{krpmver}}
|
|
# Unfortunately the Red Hat / CentOS kernel-debug-devel RPM provides
|
|
# kernel-devel so a workaround is needed to match the kernel-devel RPM.
|
|
BuildRequires: %{?kernel_rpm:%{kernel_rpm} = %{krpmver} %{kernel_devel_rpm} = %{krpmver}} gcc make
|
|
|
|
Source: %{kmod_name}-%{version}.tar.bz2
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
AutoReqProv: no
|
|
|
|
%description
|
|
A generic SCSI target subsystem for Linux that allows to convert any Linux
|
|
server into a sophisticated storage server. The three layers in SCST are the
|
|
target driver layer; the SCSI target core and the device handler layer. SCST
|
|
target drivers realize communication with an initiator and implement a storage
|
|
protocol like iSCSI, FC or SRP. SCST device handlers implement a SCSI
|
|
interface on top of local storage. Examples of such local storage are SCSI
|
|
RAID controller (dev_disk handler), block device (vdisk_blockio handler), file
|
|
(vdisk_fileio handler) or custom block device behavior implemented in user
|
|
space (scst_user).
|
|
|
|
Authors:
|
|
--------
|
|
Vladislav Bolkhovitin, Bart Van Assche and others
|
|
|
|
%package devel
|
|
Summary: SCST mid-layer kernel driver development package
|
|
Group: Development/Kernel
|
|
BuildArch: noarch
|
|
|
|
%description devel
|
|
A generic SCSI target subsystem for Linux (SCST) that allows to convert
|
|
any Linux server into a sophisticated storage server. SCST target drivers
|
|
implement protocols like iSCSI, FC or SRP. SCST device handlers either
|
|
provide access to a local SCSI RAID controller (dev_disk), block device
|
|
(vdisk_blockio), file (vdisk_fileio) or custom block device behavior
|
|
implemented in user space (scst_user).
|
|
|
|
Authors:
|
|
--------
|
|
Vladislav Bolkhovitin, Bart Van Assche and others
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{kmod_name}-%{version}
|
|
|
|
%build
|
|
export KVER=%{kversion} PREFIX=%{_prefix}
|
|
export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y
|
|
for d in scst fcst iscsi-scst qla2x00t/qla2x00-target scst_local srpt; do
|
|
%{make} -C $d
|
|
done
|
|
|
|
%install
|
|
export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir}
|
|
export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y
|
|
for d in scst; do
|
|
DESTDIR=%{buildroot} %{make} -C $d install
|
|
done
|
|
for d in fcst iscsi-scst qla2x00t/qla2x00-target scst_local srpt; do
|
|
DESTDIR=%{buildroot} INSTALL_MOD_PATH=%{buildroot} %{make} -C $d install
|
|
done
|
|
rm -f %{buildroot}/lib/modules/%{kversion}/[Mm]odule*
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%pre
|
|
# Remove any existing ib_srpt.ko kernel modules
|
|
find /lib/modules/%{kversion} -name ib_srpt.ko -exec rm {} \;
|
|
# Remove files installed by "make install"
|
|
rm -f /usr/local/man/man5/iscsi-scstd.conf.5
|
|
rm -f /usr/local/man/man8/iscsi-scst-adm.8
|
|
rm -f /usr/local/man/man8/iscsi-scstd.8
|
|
rm -f /usr/local/sbin/iscsi-scst-adm
|
|
rm -f /usr/local/sbin/iscsi-scstd
|
|
rm -rf /usr/local/include/scst
|
|
rm -f /usr/local/man/man5/iscsi-scstd.conf.5
|
|
rm -f /usr/local/man/man8/iscsi-scst-adm.8
|
|
rm -f /usr/local/man/man8/iscsi-scstd.8
|
|
rm -f /usr/local/sbin/iscsi-scst-adm
|
|
rm -f /usr/local/sbin/iscsi-scstd
|
|
rm -rf /usr/local/include/scst
|
|
|
|
%post
|
|
/sbin/depmod -a %{kversion}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%dir /lib/modules/%{kversion}/extra
|
|
/lib/modules/%{kversion}/extra/fcst.ko
|
|
/lib/modules/%{kversion}/extra/ib_srpt.ko
|
|
/lib/modules/%{kversion}/extra/iscsi-scst.ko
|
|
/lib/modules/%{kversion}/extra/isert-scst.ko
|
|
/lib/modules/%{kversion}/extra/qla2x00tgt.ko
|
|
/lib/modules/%{kversion}/extra/qla2xxx_scst.ko
|
|
/lib/modules/%{kversion}/extra/scst.ko
|
|
/lib/modules/%{kversion}/extra/scst_local.ko
|
|
%dir /lib/modules/%{kversion}/extra/dev_handlers
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_cdrom.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_changer.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_disk.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_modisk.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_processor.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_raid.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_tape.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_user.ko
|
|
/lib/modules/%{kversion}/extra/dev_handlers/scst_vdisk.ko
|
|
%{_mandir}/man5/iscsi-scstd.conf.5.gz
|
|
%{_mandir}/man8/iscsi-scst-adm.8.gz
|
|
%{_mandir}/man8/iscsi-scstd.8.gz
|
|
%{_sbindir}/iscsi-scst-adm
|
|
%{_sbindir}/iscsi-scstd
|
|
%dir /var/lib/scst/pr
|
|
%dir /var/lib/scst/vdev_mode_pages
|
|
%{_mandir}/man5/iscsi-scstd.conf.5.gz
|
|
%{_mandir}/man8/iscsi-scst-adm.8.gz
|
|
%{_mandir}/man8/iscsi-scstd.8.gz
|
|
%{_sbindir}/iscsi-scst-adm
|
|
%{_sbindir}/iscsi-scstd
|
|
%dir /var/lib/scst/pr
|
|
%dir /var/lib/scst/vdev_mode_pages
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%dir /usr/include/scst
|
|
/usr/include/scst/Module.symvers
|
|
/usr/include/scst/scst.h
|
|
/usr/include/scst/scst_const.h
|
|
/usr/include/scst/scst_debug.h
|
|
/usr/include/scst/scst_itf_ver.h
|
|
/usr/include/scst/scst_sgv.h
|
|
/usr/include/scst/scst_user.h
|
|
|
|
%changelog
|
|
* Mon May 4 2015 Bart Van Assche <bart.vanassche@sandisk.com>
|
|
- Added iSER target driver.
|
|
* Mon Feb 23 2015 Bart Van Assche <bart.vanassche@sandisk.com>
|
|
- Split spec file into a non-DKMS and a DKMS spec file.
|
|
* Fri Jan 16 2015 Bart Van Assche <bart.vanassche@sandisk.com>
|
|
- Added DKMS support.
|
|
* Fri Nov 22 2013 Bart Van Assche <bvanassche@acm.org>
|
|
- Initial spec file.
|