Hello community,

here is the log from the commit of package mt-st for openSUSE:Factory checked 
in at 2017-04-11 09:36:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mt-st (Old)
 and      /work/SRC/openSUSE:Factory/.mt-st.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mt-st"

Tue Apr 11 09:36:13 2017 rev:4 rq:483752 version:1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/mt-st/mt-st.changes      2017-03-17 
15:07:26.438275765 +0100
+++ /work/SRC/openSUSE:Factory/.mt-st.new/mt-st.changes 2017-04-11 
09:36:26.786962214 +0200
@@ -1,0 +2,6 @@
+Thu Mar 17 11:19:21 UTC 2017 - sv...@svalx.net
+
+- Switch binaries to alternatives system
+- Change package description
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mt-st.spec ++++++
--- /var/tmp/diff_new_pack.Lp1nQP/_old  2017-04-11 09:36:29.722547524 +0200
+++ /var/tmp/diff_new_pack.Lp1nQP/_new  2017-04-11 09:36:29.726546959 +0200
@@ -30,18 +30,22 @@
 Source4:        %{name}.keyring
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(udev)
+Provides:       mt
 Requires:       udev
+Requires(post): update-alternatives
 Requires(post): udev
+Requires(postun): update-alternatives
 Requires(postun): udev
 Provides:       mt_st = %{version}-%{release}
 Obsoletes:      mt_st < %{version}-%{release}
 
 %description
-Although this mt program (called mtst) is tailored for SCSI tape
-drives, it can also be used with the QIC-02 driver and hopefully with
-other Linux tape drivers that use the same ioctls (some of the commands
-may not work with all drivers). The stinit program allows the setting
-of some SCSI tape parameters.
+mt-st tools contains two programs: mt and stinit, used for dealing
+with Linux-specific tape-drive handling. mt program is tailored for
+SCSI tape drives, but it can also be used with other Linux tape
+drivers that use the same ioctls. The program stinit is meant for
+initializing of SCSI tape drive modes at system startup, or when
+new tape drivers are added.
 
 %prep
 %setup -q
@@ -55,21 +59,37 @@
   %{buildroot}%{_sysconfdir}/stinit.def
 install -D -p -m 0644 %{SOURCE3} \
   %{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
+%{_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
 
 %postun
+if [ "$1" = 0 ] ; then
+   "%{_sbindir}/update-alternatives" --remove mt %{_bindir}/mtst
+fi
 %udev_rules_update
 
 %files
 %defattr(-,root,root)
 %doc README.md CHANGELOG.md COPYING stinit.def.examples
-%{_bindir}/mt
+%ghost %{_bindir}/mt
+%{_bindir}/mtst
 %{_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}
 %config(noreplace) %{_sysconfdir}/stinit.def
 %{_udevrulesdir}/61-storage-tape-init.rules
+%ghost %{_sysconfdir}/alternatives/mt
+%ghost %{_sysconfdir}/alternatives/mt.1%{ext_man}
 
 %changelog



++++++ stinit.def ++++++
--- /var/tmp/diff_new_pack.Lp1nQP/_old  2017-04-11 09:36:29.814534530 +0200
+++ /var/tmp/diff_new_pack.Lp1nQP/_new  2017-04-11 09:36:29.814534530 +0200
@@ -1,7 +1,7 @@
 # This file contains example definitions for different kinds of tape
 # 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
 # (This is the driver's default)


Reply via email to