From: Marcin Krol <hawk@tld-linux.org>
Date: Wed, 20 Jun 2018 12:36:48 +0000 (+0000)
Subject: - added shell fix for params parsing
X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=57e209e375cd16e5a599c9c681c42ec743d31603;p=packages%2Fshorewall.git

- added shell fix for params parsing
- fixed init script being overwritten with default one
- added missing perl-modules R and also bash R just to be sure
---

diff --git a/shorewall.spec b/shorewall.spec
index 938f8fc..8fb11f0 100644
--- a/shorewall.spec
+++ b/shorewall.spec
@@ -7,7 +7,7 @@ Summary:	Shoreline Firewall - an iptables-based firewall for Linux systems
 Summary(pl.UTF-8):	Shoreline Firewall - zapora sieciowa oparta na iptables
 Name:		shorewall
 Version:	5.2.0.4
-Release:	0.1
+Release:	0.2
 License:	GPL
 Group:		Networking/Utilities
 Source0:	http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-%{version}.tar.bz2
@@ -27,14 +27,17 @@ Patch0:		%{name}-config.patch
 Patch1:		tld.patch
 Patch2:		man.patch
 Patch3:		init.patch
+Patch4:		shell-fix.patch
 URL:		http://www.shorewall.net/
 BuildRequires:	perl
 BuildRequires:	perl(Digest::SHA)
 BuildRequires:	bash >= 4.0
 BuildRequires:	sed
+Requires:	bash >= 4.0
 Requires:	%{name}-core = %{version}-%{release}
 Requires:	iproute2
 Requires:	iptables
+Requires:	perl-modules
 Requires(post):	/sbin/chkconfig
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -139,6 +142,7 @@ done
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 # Remove hash-bang from files which are not directly executed as shell
 # scripts. This silences some rpmlint errors.
@@ -146,8 +150,6 @@ find -name 'lib.*' | xargs sed -i -e '/\#\!\/bin\/sh/d'
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/shorewall
 
 targets="shorewall-core shorewall shorewall-lite shorewall6 shorewall6-lite shorewall-init"
 for i in $targets; do
@@ -162,6 +164,9 @@ for i in $targets; do
 	cd -
 done
 
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/shorewall
+
 %clean
 rm -rf $RPM_BUILD_ROOT