Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aevseev
tgt
_service:set_version:tgt.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:set_version:tgt.spec of Package tgt
%define realname tgt %define srcext tar.bz2 # turn off the generation of debuginfo rpm (RH9) ?? %global debug_package %{nil} %if ! 0%{?_fillupdir:1} %global _fillupdir /var/adm/fillup-templates %endif # Common info Name: %{realname} Version: 1.0.79 Release: 0%{?extraver:0.}1%{?dist} License: GPL-2.0+ Group: System/Daemons URL: http://stgt.sourceforge.net/ Summary: Linux SCSI target framework # Install-time parameters Requires: perl(Config::General) sg3_utils %{?suse_version:%fillup_prereq} # Build-time parameters BuildRequires: pkg-config BuildRequires: librbd-devel librados-devel BuildRequires: libaio-devel BuildRequires: libibverbs-devel librdmacm-devel BuildRequires: kernel-headers %if 0%{?suse_version} BuildRequires: fdupes %endif # For documentation BuildRequires: xmlto libxml2%{?suse_version:-tools} %if 0%{?suse_version} BuildRequires: docbook-xsl-stylesheets docbook_4 %else BuildRequires: docbook-style-xsl %endif # GlusterFs backend %if 0%{?suse_version} >= 1230 || 0%{?rhel} >= 7 BuildRequires: glusterfs-devel %endif # Packages needed to define _unitdir %if 0%{?suse_version} >= 1230 || 0%{?rhel} >= 7 BuildRequires: systemd-devel Requires: systemd %endif BuildRoot: %{_tmppath}/%{name}-root Source0: %{name}-%{version}.%{srcext} Source1: tgtd.initd Source2: tgtd.sysconfig # Fix libs for current systemd linker name Patch1: https://github.com/fujita/tgt/commit/580cf2d9c041ede11c66b9a3dfa3dcbd9b35db69.patch %description Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. Our key goals are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space. %package glusterfs Group: System/Daemons Summary: GlusterFS backing-store driver for tgt Provides: %{name}-glfs = %{version}-%{release} Requires: %{name} = %{version}-%{release} %description glusterfs The 'glfs' backing-store driver provides block access to a file within the gluster distributed file system (www.gluster.org). The file represents a LUN visible to the initiator (the file may be a regular file in gluster's underlying XFS filesystem, or a gluster "block device"). This configuration gives gluster support for any access method supported by the target driver, such as iSCSI. %package rbd Group: System/Daemons Summary: RADOS block devices (Ceph) backing-store driver for tgt Provides: %{name}-ceph = %{version}-%{release} Requires: %{name} = %{version}-%{release} %description rbd The 'rbd' backing-store driver provides access to Ceph (http://ceph.com) 'RADOS block devices (rbd)" through tgtd. The bs_rbd backing-store driver allows tgtd to use rbd images as backing storage without requiring the 'rbd' kernel block device driver, and so avoids kernel version dependencies and the extra context switching between kernel and userland. It also allows for userland caching of block images, managed by librbd. # Preparation step (unpackung and patching if necessary) %prep %setup -q -n %{name}-%{version}%{?extraver} %{__chmod} a-x doc/* %{__sed} -ri 's/(\$\(CFLAGS\) )/\1$(EXTRA_CFLAGS) /' usr/Makefile if [ $(pkg-config --modversion libsystemd-daemon) -lt 210 ]; then %patch1 -R -p1 fi # Build step %build %{__make} %{?_smp_mflags} programs conf scripts \ PREFIX=%{_prefix} \ sysconfdir=%{_sysconfdir} \ sbindir=%{_sbindir} \ libdir=%{_libdir}/tgt \ mandir=%{_mandir} \ docdir=%{_defaultdocdir}/%{name} \ ISCSI_RDMA=1 \ CEPH_RBD=1 \ %if 0%{?suse_version} >= 1230 || 0%{?rhel} >= 7 GLFS_BD=1 \ %endif %if 0%{?_unitdir:1} SD_NOTIFY=1 \ %endif EXTRA_CFLAGS="%{optflags} %{?gcc_lto}" \ LDFLAGS="-Wl,--strip-all -Wl,--as-needed %{?gcc_lto}" cd doc for xml in *.xml; do xmlto --skip-validation man ${xml} done cd - %install %{__make} install-programs install-conf install-scripts DESTDIR=%{buildroot} \ PREFIX=%{_prefix} \ sysconfdir=%{_sysconfdir} \ sbindir=%{_sbindir} \ libdir=%{_libdir}/tgt \ mandir=%{_mandir} \ docdir=%{_defaultdocdir}/%{name} \ %if 0%{?suse_version} >= 1230 || 0%{?rhel} >= 7 GLFS_BD=1 \ %endif CEPH_RBD=1 %{__install} -d -m 755 %{buildroot}%{_sysconfdir}/tgt/conf.d %if 0%{?_unitdir:1} %{__install} -D -m 644 scripts/tgtd.service %{buildroot}%{_unitdir}/tgtd.service %else %{__install} -D -m755 %{S:1} %{buildroot}%{_initrddir}/tgtd %if "%{expand:%_vendor}" == "suse" %{__ln_s} %{_initrddir}/tgtd %{buildroot}%{_sbindir}/rctgtd %endif %endif %if 0%{?suse_version} %{__install} -D -m644 %{S:2} %{buildroot}%{_fillupdir}/sysconfig.tgt %else %{__install} -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/sysconfig/tgt %endif cd doc %{__install} -D -m 644 targets.conf.5 %{buildroot}%{_mandir}/man5/targets.conf.5 for man in *.8 do %{__install} -D -m 644 ${man} %{buildroot}%{_mandir}/man8/${man} done cd - %if "%{expand:%_vendor}" == "suse" %fdupes %{buildroot}%{_defaultdocdir}/%{name} %endif %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc README doc/README.* %dir %{_sysconfdir}/tgt/conf.d %dir %{_sysconfdir}/tgt/examples %dir %{_sysconfdir}/tgt %config(noreplace) %{_sysconfdir}/tgt/targets.conf %config %{_sysconfdir}/tgt/examples/* %{_sbindir}/* %dir %{_libdir}/tgt/backing-store %dir %{_libdir}/tgt %if 0%{?suse_version} %{_fillupdir}/sysconfig.tgt %else %{_sysconfdir}/sysconfig/tgt %endif %if 0%{?_unitdir:1} %{_unitdir}/tgtd.service %else %{_initrddir}/tgtd %endif %doc %{_mandir}/man5/* %doc %{_mandir}/man8/* %files glusterfs %doc README doc/README.glfs %dir %{_libdir}/tgt/backing-store %{_libdir}/tgt/backing-store/bs_glfs.so %files rbd %doc README doc/README.rbd %dir %{_libdir}/tgt/backing-store %{_libdir}/tgt/backing-store/bs_rbd.so %if 0%{?suse_version} %if 0%{?_unitdir:1} %pre %{service_add_pre tgtd.service} %endif %post %if 0%{?_unitdir:1} %{fillup_only tgt} %{service_add_post tgtd.service} %else %{fillup_and_insserv -n tgt tgtd} %endif %preun %if 0%{?_unitdir:1} %{service_del_preun tgtd.service} %else %{stop_on_removal tgtd} %endif %postun %if 0%{?_unitdir:1} %{service_del_postun tgtd.service} %else %{restart_on_update tgtd} %endif %{insserv_cleanup} %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor