Accepting request 482518 from home:svalx

OBS-URL: https://build.opensuse.org/request/show/482518
OBS-URL: https://build.opensuse.org/package/show/Base:System/mt-st?expand=0&rev=8
This commit is contained in:
Marcus Meissner 2017-03-30 08:26:04 +00:00 committed by Git OBS Bridge
parent 4b05562981
commit 9f919edb44
3 changed files with 34 additions and 8 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 17 11:19:21 UTC 2017 - svalx@svalx.net
- Switch binaries to alternatives system
- Change package description
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 16 11:29:23 UTC 2017 - mpluskal@suse.com Thu Mar 16 11:29:23 UTC 2017 - mpluskal@suse.com

View File

@ -30,18 +30,22 @@ Source3: 61-storage-tape-init.rules
Source4: %{name}.keyring Source4: %{name}.keyring
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(udev) BuildRequires: pkgconfig(udev)
Provides: mt
Requires: udev Requires: udev
Requires(post): update-alternatives
Requires(post): udev Requires(post): udev
Requires(postun): update-alternatives
Requires(postun): udev Requires(postun): udev
Provides: mt_st = %{version}-%{release} Provides: mt_st = %{version}-%{release}
Obsoletes: mt_st < %{version}-%{release} Obsoletes: mt_st < %{version}-%{release}
%description %description
Although this mt program (called mtst) is tailored for SCSI tape mt-st tools contains two programs: mt and stinit, used for dealing
drives, it can also be used with the QIC-02 driver and hopefully with with Linux-specific tape-drive handling. mt program is tailored for
other Linux tape drivers that use the same ioctls (some of the commands SCSI tape drives, but it can also be used with other Linux tape
may not work with all drivers). The stinit program allows the setting drivers that use the same ioctls. The program stinit is meant for
of some SCSI tape parameters. initializing of SCSI tape drive modes at system startup, or when
new tape drivers are added.
%prep %prep
%setup -q %setup -q
@ -55,21 +59,37 @@ install -D -p -m 0644 %{SOURCE2} \
%{buildroot}%{_sysconfdir}/stinit.def %{buildroot}%{_sysconfdir}/stinit.def
install -D -p -m 0644 %{SOURCE3} \ install -D -p -m 0644 %{SOURCE3} \
%{buildroot}%{_udevrulesdir}/61-storage-tape-init.rules %{buildroot}%{_udevrulesdir}/61-storage-tape-init.rules
#For alternatives
mv %{buildroot}%{_bindir}/mt %{buildroot}%{_bindir}/mtst
mv %{buildroot}%{_mandir}/man1/mt.1 %{buildroot}%{_mandir}/man1/mtst.1
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -s -f %{_sysconfdir}/alternatives/mt %{buildroot}%{_bindir}/mt
ln -s -f %{_sysconfdir}/alternatives/mt.1%{ext_man} %{buildroot}%{_mandir}/man1/mt.1%{ext_man}
%post %post
%{_sbindir}/update-alternatives --force \
--install %{_bindir}/mt mt %{_bindir}/mtst 30 \
--slave %{_mandir}/man1/mt.1%{ext_man} mt.1%{ext_man} %{_mandir}/man1/mtst.1%{ext_man}
%udev_rules_update %udev_rules_update
%postun %postun
if [ "$1" = 0 ] ; then
"%{_sbindir}/update-alternatives" --remove mt %{_bindir}/mtst
fi
%udev_rules_update %udev_rules_update
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc README.md CHANGELOG.md COPYING stinit.def.examples %doc README.md CHANGELOG.md COPYING stinit.def.examples
%{_bindir}/mt %ghost %{_bindir}/mt
%{_bindir}/mtst
%{_sbindir}/stinit %{_sbindir}/stinit
%{_mandir}/man1/mt.1%{ext_man} %ghost %{_mandir}/man1/mt.1%{ext_man}
%{_mandir}/man1/mtst.1%{ext_man}
%{_mandir}/man8/stinit.8%{ext_man} %{_mandir}/man8/stinit.8%{ext_man}
%config(noreplace) %{_sysconfdir}/stinit.def %config(noreplace) %{_sysconfdir}/stinit.def
%{_udevrulesdir}/61-storage-tape-init.rules %{_udevrulesdir}/61-storage-tape-init.rules
%ghost %{_sysconfdir}/alternatives/mt
%ghost %{_sysconfdir}/alternatives/mt.1%{ext_man}
%changelog %changelog

View File

@ -1,7 +1,7 @@
# This file contains example definitions for different kinds of tape # This file contains example definitions for different kinds of tape
# devices. # devices.
# #
# You can find some examples in /usr/share/doc/packages/mt_st/stinit.def.examples. # You can find some examples in /usr/share/doc/packages/mt-st/stinit.def.examples.
# #
# Common definitions to be applied to all tape devices # Common definitions to be applied to all tape devices
# (This is the driver's default) # (This is the driver's default)