sg3_utils/sg3_utils.spec

167 lines
5.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package sg3_utils
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: sg3_utils
Version: 1.48~20221101+1.142dace
Accepting request 1033169 from home:mwilck:branches:Base:System - Update to new upstream version 1.48~20221101.6d3bd26: (pre-release sg3_utils-1.48 [20221101] [svn: r978]) * sg_read_block_limits: fix granularity value, add --mloi option; sg_lib: add sg_ll_read_block_limits_v2(); sg_logs: json work * sg_stream_ctl: --get fix better; sg_rem_rest_elem: cleanup * sg_stream_ctl: fix --get indexing; fix some './configure --enable-debug' issues * sg_inq+sg_vpd: JSON updates * rescan-scsi-bus: speed large multipath scans * rescan-scsi-bus.sh speed testonline() * rescan-scsi-bus.sh: add option --no-lip-scan * rescan-scsi-bus: sgdevice26: do not traverse sg class if scsi_device isnot added * rescan-scsi-bus.sh: fix handling of '-I <secs>' option * Prepare for removing /proc/scsi from the Linux kernel * sg_inq+sg_vpd: merge VPD page processing * sg_get_elem_status: change '--maxlen=' option default to 1056 (was 32), other cleanups * sg_rep_zones: add experimental --json[=JO] option and generation * sg_logs: add --exclude and --undefined options * zoned disk man page improvements * sg_rep_zones: add --statistics option * sg_read_buffer: add --eh_code= and --no_output options * sg_format: allow disk formats on ZBC (zoned) disks * sg_rep_zones: add --brief option and --find ZT option * sg_rep_density: new utility for decoding the response of Report density support command [ssc (tape)] * Zoned block device characteristics VPD page support OBS-URL: https://build.opensuse.org/request/show/1033169 OBS-URL: https://build.opensuse.org/package/show/Base:System/sg3_utils?expand=0&rev=99
2022-11-04 10:50:38 +01:00
%global lname libsgutils2-%(echo %{version} | sed 's/[~+].*//;y/./_/')-2
Release: 0
Summary: A collection of tools that send SCSI commands to devices
Accepting request 886932 from home:polslinux:branches:Base:System - Update to version 1.46: * sg_rep_pip: new utility: report provisioning initialization pattern command * sg_turs: estimated time-to-ready [spc6r03] - add --delay=MS option * sg_requests: substantial cleanup * sg_vpd: add Format presets and Concurrent positioning ranges - add hot-pluggable field in standard Inquiry [spc6r05] - fix vendor struct opts_t alignment * sg_inq: add hot-pluggable field in standard Inquiry * sg_dd: --verify : separate category for miscompare errors - --verify : oflag=coe continue on miscompares, counts them - add cdl= operand for command duration limit indexes - add oflag=nocreat and conv=nocreat : OFILE must exist - add iflag=00, ff, random flags - setup conditional auto rule for getrandom() - add command timeout after comma in time= operand * sg_get_elem_status: add ralwd bit sbc4r20a * sg_write_x: add dld bits to write(32) [sbc4r19a] * sg_rep_zones: print invalid write pointer LBA as -1 rather than 16 "f"s * sg_opcodes: improve handling of RWCDLP field * sg_ses: use fan speed factor field for calculation [ses4r04] - add --all (-a) option, same action as --join * sg_compare_and_write: add examples section to its manpage * sg_modes: document '-s' option (same as '-6') * sg_sanitize + sg_format: when --verbose given once report probable success; without --verbose 'no news is good news' * sg_zone: add Remove element and modify zones command * sg_raw: increase maximum data-in and data-out buffer size from 64 KB to 1 MB - fix --cmdfile= handling - add --nvm option to send commands from the NVM command set - add --cmdset option to bypass cdb heuristic - add --scan= first_opcode,last_opcode * sg_pt_freebsd: allow device names without leading /dev/ thus fix for regression introduced in rev 731 (ver: 1.43) * sg_pt_solaris+sg_pt_osf1: fix problem with clear_scsi_pt_obj() which needs to remember is_nvme and dev_fd values * sg_lib: add ZBC (2020) feature set entries * sg_lib: restore elements and rebuild command added * sg_lib,sg_pt: add partial_clear_scsi_pt_obj(), get_scsi_pt_cdb_len() and get_scsi_pt_cdb_buf() - add do_nvm_pt() for the NVM (sub-)command set - tweak transport error handling in Linux * sg_lib: Linux NVMe SNTL: add read, write and verify; synchronize cache and write same translations - add dummy start stop unit and test unit ready commands - wire cache mpage's WCE to nvme 'volatile write cache' - fix crash in sg_f2hex_arr() when fname not found * sg_lib: reprint cdb with illegal request sense key - asc/ascq match asc-num.txt @t10 20200708 [spc6r02] * gcc-10: suppress warnings * autoconf: upgrade version 2.69 to 2.70 * remove space from end of source lines for git-svn * testing/sg_mrq_testing: new, for blocking mrq usage * testing/sgs_dd: add evfd flags and eventfd processing * testing: remove master-slave terminology for sgv4 * examples: add nvme_read_ctl.hex and nvme_write_ctl.hex OBS-URL: https://build.opensuse.org/request/show/886932 OBS-URL: https://build.opensuse.org/package/show/Base:System/sg3_utils?expand=0&rev=87
2021-04-20 14:32:13 +02:00
License: BSD-3-Clause AND GPL-2.0-or-later
Group: Hardware/Other
Accepting request 886932 from home:polslinux:branches:Base:System - Update to version 1.46: * sg_rep_pip: new utility: report provisioning initialization pattern command * sg_turs: estimated time-to-ready [spc6r03] - add --delay=MS option * sg_requests: substantial cleanup * sg_vpd: add Format presets and Concurrent positioning ranges - add hot-pluggable field in standard Inquiry [spc6r05] - fix vendor struct opts_t alignment * sg_inq: add hot-pluggable field in standard Inquiry * sg_dd: --verify : separate category for miscompare errors - --verify : oflag=coe continue on miscompares, counts them - add cdl= operand for command duration limit indexes - add oflag=nocreat and conv=nocreat : OFILE must exist - add iflag=00, ff, random flags - setup conditional auto rule for getrandom() - add command timeout after comma in time= operand * sg_get_elem_status: add ralwd bit sbc4r20a * sg_write_x: add dld bits to write(32) [sbc4r19a] * sg_rep_zones: print invalid write pointer LBA as -1 rather than 16 "f"s * sg_opcodes: improve handling of RWCDLP field * sg_ses: use fan speed factor field for calculation [ses4r04] - add --all (-a) option, same action as --join * sg_compare_and_write: add examples section to its manpage * sg_modes: document '-s' option (same as '-6') * sg_sanitize + sg_format: when --verbose given once report probable success; without --verbose 'no news is good news' * sg_zone: add Remove element and modify zones command * sg_raw: increase maximum data-in and data-out buffer size from 64 KB to 1 MB - fix --cmdfile= handling - add --nvm option to send commands from the NVM command set - add --cmdset option to bypass cdb heuristic - add --scan= first_opcode,last_opcode * sg_pt_freebsd: allow device names without leading /dev/ thus fix for regression introduced in rev 731 (ver: 1.43) * sg_pt_solaris+sg_pt_osf1: fix problem with clear_scsi_pt_obj() which needs to remember is_nvme and dev_fd values * sg_lib: add ZBC (2020) feature set entries * sg_lib: restore elements and rebuild command added * sg_lib,sg_pt: add partial_clear_scsi_pt_obj(), get_scsi_pt_cdb_len() and get_scsi_pt_cdb_buf() - add do_nvm_pt() for the NVM (sub-)command set - tweak transport error handling in Linux * sg_lib: Linux NVMe SNTL: add read, write and verify; synchronize cache and write same translations - add dummy start stop unit and test unit ready commands - wire cache mpage's WCE to nvme 'volatile write cache' - fix crash in sg_f2hex_arr() when fname not found * sg_lib: reprint cdb with illegal request sense key - asc/ascq match asc-num.txt @t10 20200708 [spc6r02] * gcc-10: suppress warnings * autoconf: upgrade version 2.69 to 2.70 * remove space from end of source lines for git-svn * testing/sg_mrq_testing: new, for blocking mrq usage * testing/sgs_dd: add evfd flags and eventfd processing * testing: remove master-slave terminology for sgv4 * examples: add nvme_read_ctl.hex and nvme_write_ctl.hex OBS-URL: https://build.opensuse.org/request/show/886932 OBS-URL: https://build.opensuse.org/package/show/Base:System/sg3_utils?expand=0&rev=87
2021-04-20 14:32:13 +02:00
URL: http://sg.danny.cz/sg/sg3_utils.html
Source: sg3_utils-%{version}.tar.gz
Source1: dracut.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libtool
BuildRequires: systemd-rpm-macros
BuildRequires: xz
Requires(post): coreutils
Provides: scsi = %{version}
Provides: sg_utils
Supplements: modalias(scsi:t-0x00*)
Supplements: modalias(scsi:t-0x07*)
Supplements: modalias(scsi:t-0x0e*)
Obsoletes: scsi <= 1.7_2.38_1.25_0.19_1.02_0.93
%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.
%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
Summary: A collection of tools that send SCSI commands to devices
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Requires: %lname = %version
# Added for 13.1
Obsoletes: %name-devel < %version-%release
Provides: %name-devel = %version-%release
%description -n libsgutils-devel
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 libraries and header files for developing
applications that want to make use of libsgutils.
%prep
%setup -q
%build
autoreconf -fi
%configure --disable-static
make %{?_smp_mflags}
%install
%make_install
install -m 644 doc/rescan-scsi-bus.sh.8 %{buildroot}/%{_mandir}/man8
mkdir -p %{buildroot}/%{_udevrulesdir}
install -m 644 scripts/54-before-scsi-sg3_id.rules %{buildroot}/%{_udevrulesdir}
install -m 644 scripts/55-scsi-sg3_id.rules %{buildroot}/%{_udevrulesdir}
install -m 644 scripts/58-scsi-sg3_symlink.rules %{buildroot}/%{_udevrulesdir}
install -m 644 scripts/40-usb-blacklist.rules %{buildroot}/%{_udevrulesdir}
install -m 644 scripts/59-fc-wwpn-id.rules %{buildroot}/%{_udevrulesdir}
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
rm -f %{buildroot}%{_libdir}/*.la
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%pre
%service_add_pre lunmask.service
%post
%service_add_post lunmask.service
%{?regenerate_initrd_post}
%preun
%service_del_preun lunmask.service
%postun
%service_del_postun lunmask.service
%{?regenerate_initrd_post}
%posttrans
%{?regenerate_initrd_posttrans}
%files
%defattr(-,root,root)
%doc README README.sg_start
%doc ChangeLog CREDITS NEWS
%_bindir/sg_*
%_bindir/scsi_*
%_bindir/sginfo
%_bindir/sgp_dd
%_bindir/sgm_dd
%_bindir/rescan-scsi-bus.sh
%_mandir/man8/*.8*
%dir /usr/lib/udev
%dir %{_udevrulesdir}
2016-02-18 12:52:32 +01:00
%{_udevrulesdir}/40-usb-blacklist.rules
%{_udevrulesdir}/54-before-scsi-sg3_id.rules
%{_udevrulesdir}/55-scsi-sg3_id.rules
%{_udevrulesdir}/58-scsi-sg3_symlink.rules
%{_udevrulesdir}/59-fc-wwpn-id.rules
%{_udevrulesdir}/../fc_wwpn_id
%dir /usr/lib/dracut
%dir /usr/lib/dracut/dracut.conf.d
/usr/lib/dracut/dracut.conf.d/50-sg3_utils.conf
%dir %{_unitdir}/../scripts
%{_unitdir}/../scripts/scsi-enable-target-scan.sh
%{_unitdir}/lunmask.service
%files -n %lname
%defattr(-,root,root)
%_libdir/libsgutils2-1.*.so.2*
%files -n libsgutils-devel
%defattr(-,root,root)
%_libdir/libsgutils2.so
%_includedir/scsi/
%changelog