2008-05-01 04:53:49 +02:00
|
|
|
#
|
2012-01-18 23:40:48 +01:00
|
|
|
# spec file for package sg3_utils
|
2008-05-01 04:53:49 +02:00
|
|
|
#
|
2023-01-27 16:47:27 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2008-05-01 04:53:49 +02:00
|
|
|
#
|
2008-08-14 02:37:47 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-04-18 08:15:41 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-05-01 04:53:49 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: sg3_utils
|
2023-09-21 22:53:45 +02:00
|
|
|
Version: 1.48
|
2022-11-04 10:50:38 +01:00
|
|
|
%global lname libsgutils2-%(echo %{version} | sed 's/[~+].*//;y/./_/')-2
|
2012-04-20 09:23:07 +02:00
|
|
|
Release: 0
|
2008-05-01 04:53:49 +02:00
|
|
|
Summary: A collection of tools that send SCSI commands to devices
|
2021-04-20 14:32:13 +02:00
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later
|
2012-04-20 09:23:07 +02:00
|
|
|
Group: Hardware/Other
|
2021-04-20 14:32:13 +02:00
|
|
|
URL: http://sg.danny.cz/sg/sg3_utils.html
|
2021-11-12 09:27:37 +01:00
|
|
|
Source: sg3_utils-%{version}.tar.gz
|
2018-02-09 14:00:49 +01:00
|
|
|
Source1: dracut.conf
|
2013-06-13 16:33:49 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-02-24 16:53:49 +01:00
|
|
|
BuildRequires: libtool
|
2019-04-18 08:15:41 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2013-06-11 14:48:06 +02:00
|
|
|
BuildRequires: xz
|
2017-12-18 12:19:06 +01:00
|
|
|
Requires(post): coreutils
|
2019-04-18 08:15:41 +02:00
|
|
|
Provides: scsi = %{version}
|
2012-04-22 13:59:00 +02:00
|
|
|
Provides: sg_utils
|
2017-12-18 12:19:06 +01:00
|
|
|
Supplements: modalias(scsi:t-0x00*)
|
|
|
|
Supplements: modalias(scsi:t-0x07*)
|
|
|
|
Supplements: modalias(scsi:t-0x0e*)
|
2012-04-22 13:59:00 +02:00
|
|
|
Obsoletes: scsi <= 1.7_2.38_1.25_0.19_1.02_0.93
|
2023-09-27 18:21:26 +02:00
|
|
|
# For regenerate_initrd_posttrans
|
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
BuildRequires: suse-module-tools
|
|
|
|
%else
|
|
|
|
BuildRequires: rpm-config-SUSE
|
|
|
|
%endif
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The sg3_utils package contains utilities that send SCSI commands to
|
|
|
|
devices. As well as devices on transports traditionally associated with
|
|
|
|
SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI
|
|
|
|
Parallel Interface(SPI)) many other devices use SCSI command sets.
|
|
|
|
ATAPI cd/dvd drives and SATA disks that connect via a translation layer
|
|
|
|
or a bridge device are examples of devices that use SCSI command sets.
|
|
|
|
|
2013-06-13 16:33:49 +02:00
|
|
|
%package -n %lname
|
|
|
|
Summary: Library to hold functions common to the SCSI utilities
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
The sg3_utils package contains utilities that send SCSI commands to
|
|
|
|
devices. As well as devices on transports traditionally associated with
|
|
|
|
SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI
|
|
|
|
Parallel Interface(SPI)) many other devices use SCSI command sets.
|
|
|
|
ATAPI cd/dvd drives and SATA disks that connect via a translation layer
|
|
|
|
or a bridge device are examples of devices that use SCSI command sets.
|
|
|
|
|
|
|
|
This subpackage contains the library of common sg_utils code, such as
|
|
|
|
SCSI error processing.
|
|
|
|
|
|
|
|
%package -n libsgutils-devel
|
2008-05-01 04:53:49 +02:00
|
|
|
Summary: A collection of tools that send SCSI commands to devices
|
2013-06-13 16:33:49 +02:00
|
|
|
License: BSD-3-Clause
|
2008-09-13 12:13:23 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2013-06-13 16:33:49 +02:00
|
|
|
Requires: %lname = %version
|
|
|
|
# Added for 13.1
|
|
|
|
Obsoletes: %name-devel < %version-%release
|
|
|
|
Provides: %name-devel = %version-%release
|
2008-05-01 04:53:49 +02:00
|
|
|
|
2013-06-13 16:33:49 +02:00
|
|
|
%description -n libsgutils-devel
|
2008-05-01 04:53:49 +02:00
|
|
|
The sg3_utils package contains utilities that send SCSI commands to
|
|
|
|
devices. As well as devices on transports traditionally associated with
|
|
|
|
SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI
|
|
|
|
Parallel Interface(SPI)) many other devices use SCSI command sets.
|
|
|
|
ATAPI cd/dvd drives and SATA disks that connect via a translation layer
|
|
|
|
or a bridge device are examples of devices that use SCSI command sets.
|
|
|
|
|
2013-06-13 16:33:49 +02:00
|
|
|
This subpackage contains libraries and header files for developing
|
|
|
|
applications that want to make use of libsgutils.
|
|
|
|
|
2008-05-01 04:53:49 +02:00
|
|
|
%prep
|
2014-06-20 14:36:29 +02:00
|
|
|
%setup -q
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
%build
|
2015-02-24 16:53:49 +01:00
|
|
|
autoreconf -fi
|
|
|
|
%configure --disable-static
|
2013-11-04 11:21:17 +01:00
|
|
|
make %{?_smp_mflags}
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
%install
|
2015-02-24 16:53:49 +01:00
|
|
|
%make_install
|
2019-04-30 22:21:17 +02:00
|
|
|
install -m 644 doc/rescan-scsi-bus.sh.8 %{buildroot}/%{_mandir}/man8
|
|
|
|
mkdir -p %{buildroot}/%{_udevrulesdir}
|
2023-09-27 22:47:58 +02:00
|
|
|
install -m 644 scripts/*.rules %{buildroot}/%{_udevrulesdir}
|
2019-04-30 22:21:17 +02:00
|
|
|
install -m 755 scripts/fc_wwpn_id %{buildroot}/%{_udevrulesdir}/..
|
|
|
|
mkdir -p %{buildroot}/usr/lib/dracut/dracut.conf.d
|
|
|
|
install -m 644 %{SOURCE1} %{buildroot}/usr/lib/dracut/dracut.conf.d/50-sg3_utils.conf
|
|
|
|
mkdir -p %{buildroot}/%{_unitdir}
|
|
|
|
install -m 644 scripts/lunmask.service %{buildroot}/%{_unitdir}
|
|
|
|
mkdir -p %{buildroot}/%{_unitdir}/../scripts
|
|
|
|
install -m 755 scripts/scsi-enable-target-scan.sh %{buildroot}/%{_unitdir}/../scripts
|
2014-06-20 14:36:29 +02:00
|
|
|
rm -f %{buildroot}%{_libdir}/*.la
|
2008-05-01 04:53:49 +02:00
|
|
|
|
2019-04-18 08:15:41 +02:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre lunmask.service
|
|
|
|
|
2017-12-18 12:19:06 +01:00
|
|
|
%post
|
2019-04-18 08:15:41 +02:00
|
|
|
%service_add_post lunmask.service
|
2017-12-18 12:19:06 +01:00
|
|
|
%{?regenerate_initrd_post}
|
2008-05-01 04:53:49 +02:00
|
|
|
|
2019-04-18 08:15:41 +02:00
|
|
|
%preun
|
|
|
|
%service_del_preun lunmask.service
|
2017-12-18 12:19:06 +01:00
|
|
|
|
|
|
|
%postun
|
2019-04-18 08:15:41 +02:00
|
|
|
%service_del_postun lunmask.service
|
2017-12-18 12:19:06 +01:00
|
|
|
%{?regenerate_initrd_post}
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
%{?regenerate_initrd_posttrans}
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-04-12 23:29:53 +02:00
|
|
|
%doc README README.sg_start
|
2008-11-03 14:22:33 +01:00
|
|
|
%doc ChangeLog CREDITS NEWS
|
2013-06-13 16:33:49 +02:00
|
|
|
%_bindir/sg_*
|
|
|
|
%_bindir/scsi_*
|
|
|
|
%_bindir/sginfo
|
|
|
|
%_bindir/sgp_dd
|
|
|
|
%_bindir/sgm_dd
|
|
|
|
%_bindir/rescan-scsi-bus.sh
|
|
|
|
%_mandir/man8/*.8*
|
2019-04-18 08:15:41 +02:00
|
|
|
%dir /usr/lib/udev
|
|
|
|
%dir %{_udevrulesdir}
|
2023-09-27 22:47:58 +02:00
|
|
|
%{_udevrulesdir}/00-scsi-sg3_config.rules
|
2018-02-09 14:00:49 +01:00
|
|
|
%{_udevrulesdir}/54-before-scsi-sg3_id.rules
|
2014-04-12 23:29:53 +02:00
|
|
|
%{_udevrulesdir}/55-scsi-sg3_id.rules
|
|
|
|
%{_udevrulesdir}/58-scsi-sg3_symlink.rules
|
2019-04-18 08:15:41 +02:00
|
|
|
%{_udevrulesdir}/59-fc-wwpn-id.rules
|
|
|
|
%{_udevrulesdir}/../fc_wwpn_id
|
2018-02-09 14:00:49 +01:00
|
|
|
%dir /usr/lib/dracut
|
|
|
|
%dir /usr/lib/dracut/dracut.conf.d
|
|
|
|
/usr/lib/dracut/dracut.conf.d/50-sg3_utils.conf
|
2019-04-18 08:15:41 +02:00
|
|
|
%dir %{_unitdir}/../scripts
|
|
|
|
%{_unitdir}/../scripts/scsi-enable-target-scan.sh
|
|
|
|
%{_unitdir}/lunmask.service
|
2013-06-13 16:33:49 +02:00
|
|
|
|
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
2015-02-24 16:53:49 +01:00
|
|
|
%_libdir/libsgutils2-1.*.so.2*
|
2013-06-13 16:33:49 +02:00
|
|
|
|
|
|
|
%files -n libsgutils-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libsgutils2.so
|
|
|
|
%_includedir/scsi/
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
%changelog
|