Hello community,

here is the log from the commit of package arptables for openSUSE:Factory 
checked in at 2018-09-13 12:10:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/arptables (Old)
 and      /work/SRC/openSUSE:Factory/.arptables.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "arptables"

Thu Sep 13 12:10:50 2018 rev:24 rq:634278 version:0.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/arptables/arptables.changes      2017-02-09 
11:18:44.372558616 +0100
+++ /work/SRC/openSUSE:Factory/.arptables.new/arptables.changes 2018-09-13 
12:10:53.934335620 +0200
@@ -1,0 +2,6 @@
+Fri Aug 24 10:20:05 UTC 2018 - [email protected]
+
+- Move arptables to arptables-legacy and use update-alternatives to
+  offer a selection mechanism.
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ arptables.spec ++++++
--- /var/tmp/diff_new_pack.6vH7lg/_old  2018-09-13 12:10:54.326335179 +0200
+++ /var/tmp/diff_new_pack.6vH7lg/_new  2018-09-13 12:10:54.326335179 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package arptables
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 Name:           arptables
 Summary:        User Space Tool to Set Up and Maintain ARP Filtering Tables
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Productivity/Networking/Security
 Version:        0.0.4
 Release:        0
@@ -28,9 +28,11 @@
 #Git-Clone:    git://git.netfilter.org/arptables
 Source:         http://downloads.sf.net/ebtables/arptables-v0.0.4.tar.gz
 Source1:        COPYING
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  coreutils
 BuildRequires:  perl
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 
 %description
 arptables is a user space tool used to set up and maintain the tables
@@ -50,8 +52,30 @@
 # This is a RH-specific init script
 rm -Rf "%buildroot/etc/rc.d"
 
+b="%buildroot"
+mv "$b/%_sbindir/arptables" "$b/%_sbindir/arptables-legacy"
+mv "$b/%_sbindir/arptables-restore" "$b/%_sbindir/arptables-legacy-restore"
+mv "$b/%_sbindir/arptables-save" "$b/%_sbindir/arptables-legacy-save"
+for i in arptables arptables-restore arptables-save; do
+       ln -fs "/etc/alternatives/$i" "$b/%_sbindir/$i"
+done
+
+%post
+update-alternatives --force \
+       --install "%_sbindir/arptables" arptables "%_sbindir/arptables-legacy" 
1 \
+       --slave "%_sbindir/arptables-restore" arptables-restore 
"%_sbindir/arptables-legacy-restore" \
+       --slave "%_sbindir/arptables-save" arptables-save 
"%_sbindir/arptables-legacy-save"
+
+%postun
+if test "$1" = 0; then
+       update-alternatives --remove arptables "%_sbindir/arptables-legacy"
+fi
+
 %files
 %defattr(-,root,root)
+%ghost %_sysconfdir/alternatives/arptables
+%ghost %_sysconfdir/alternatives/arptables-restore
+%ghost %_sysconfdir/alternatives/arptables-save
 %_sbindir/arptables*
 %_mandir/*/arptables*
 %doc COPYING


Reply via email to