2010-05-19 01:34:49 +02:00
|
|
|
%define name shorewall-init
|
2011-02-06 01:41:34 +01:00
|
|
|
%define version 4.4.18
|
2011-03-13 15:56:12 +01:00
|
|
|
%define release 1
|
2010-05-19 01:34:49 +02:00
|
|
|
|
2010-05-21 16:17:16 +02:00
|
|
|
Summary: Shorewall-init adds functionality to Shoreline Firewall (Shorewall).
|
2010-05-19 01:34:49 +02:00
|
|
|
Name: %{name}
|
|
|
|
Version: %{version}
|
|
|
|
Release: %{release}
|
|
|
|
License: GPLv2
|
|
|
|
Packager: Tom Eastep <teastep@shorewall.net>
|
|
|
|
Group: Networking/Utilities
|
|
|
|
Source: %{name}-%{version}.tgz
|
|
|
|
URL: http://www.shorewall.net/
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
2010-05-21 21:22:41 +02:00
|
|
|
Requires: shoreline_firewall >= 4.4.10
|
2010-05-19 01:34:49 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
|
|
|
|
(iptables) based firewall that can be used on a dedicated firewall system,
|
|
|
|
a multi-function gateway/ router/server or on a standalone GNU/Linux system.
|
|
|
|
|
|
|
|
Shorewall Init is a companion product to Shorewall that allows for tigher
|
2010-05-21 16:17:16 +02:00
|
|
|
control of connections during boot and that integrates Shorewall with
|
|
|
|
ifup/ifdown and NetworkManager.
|
2010-05-19 01:34:49 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
%setup
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2010-06-01 16:18:37 +02:00
|
|
|
export DESTDIR=$RPM_BUILD_ROOT ; \
|
2010-05-19 01:34:49 +02:00
|
|
|
export OWNER=`id -n -u` ; \
|
|
|
|
export GROUP=`id -n -g` ;\
|
|
|
|
./install.sh
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
|
|
if [ -x /sbin/insserv ]; then
|
|
|
|
/sbin/insserv /etc/rc.d/shorewall-init
|
|
|
|
elif [ -x /sbin/chkconfig ]; then
|
|
|
|
/sbin/chkconfig --add shorewall-init;
|
|
|
|
fi
|
2010-05-27 15:49:49 +02:00
|
|
|
fi
|
2010-05-19 01:34:49 +02:00
|
|
|
|
2010-05-27 15:49:49 +02:00
|
|
|
if [ -f /etc/SuSE-release ]; then
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-up.d/shorewall
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/sysconfig/network/if-down.d/shorewall
|
2010-12-05 18:11:08 +01:00
|
|
|
if [ -d /etc/ppp ]; then
|
|
|
|
for directory in ip-up.d ip-down.d ipv6-up.d ipv6-down.d; do
|
2010-12-05 18:34:39 +01:00
|
|
|
mkdir -p /etc/ppp/$directory
|
2010-12-05 18:11:08 +01:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/ppp/$directory/shorewall
|
|
|
|
done
|
|
|
|
fi
|
2010-05-27 15:49:49 +02:00
|
|
|
else
|
|
|
|
if [ -f /sbin/ifup-local -o -f /sbin/ifdown-local ]; then
|
|
|
|
if ! grep -q Shorewall /sbin/ifup-local || ! grep -q Shorewall /sbin/ifdown-local; then
|
2010-05-21 19:12:37 +02:00
|
|
|
echo "WARNING: /sbin/ifup-local and/or /sbin/ifdown-local already exist; ifup/ifdown events will not be handled" >&2
|
2010-05-19 01:34:49 +02:00
|
|
|
else
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
2010-05-27 01:45:09 +02:00
|
|
|
fi
|
2010-05-27 15:49:49 +02:00
|
|
|
else
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifup-local
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /sbin/ifdown-local
|
2010-05-27 15:49:49 +02:00
|
|
|
fi
|
2010-05-27 01:45:09 +02:00
|
|
|
|
2010-12-05 18:11:08 +01:00
|
|
|
if [ -d /etc/ppp ]; then
|
|
|
|
if [ -f /etc/ppp/ip-up.local -o -f /etc/ppp/ip-down.local ]; then
|
|
|
|
if ! grep -q Shorewall-based /etc/ppp/ip-up.local || ! grep -q Shorewall-based /etc/ppp//ip-down.local; then
|
2010-12-05 18:22:19 +01:00
|
|
|
echo "WARNING: /etc/ppp/ip-up.local and/or /etc/ppp/ip-down.local already exist; ppp devices will not be handled" >&2
|
|
|
|
fi
|
2010-12-05 18:11:08 +01:00
|
|
|
else
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/ppp/ip-up.local
|
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/ppp/ip-down.local
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2010-05-27 15:49:49 +02:00
|
|
|
if [ -d /etc/NetworkManager/dispatcher.d/ ]; then
|
2010-05-28 19:20:19 +02:00
|
|
|
cp -pf /usr/share/shorewall-init/ifupdown /etc/NetworkManager/dispatcher.d/01-shorewall
|
2010-05-27 15:49:49 +02:00
|
|
|
fi
|
2010-05-19 01:34:49 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
if [ -x /sbin/insserv ]; then
|
|
|
|
/sbin/insserv -r /etc/init.d/shorewall-init
|
|
|
|
elif [ -x /sbin/chkconfig ]; then
|
|
|
|
/sbin/chkconfig --del shorewall-init
|
|
|
|
fi
|
2010-05-19 15:29:28 +02:00
|
|
|
|
2010-05-27 15:49:49 +02:00
|
|
|
[ -f /sbin/ifup-local ] && grep -q Shorewall /sbin/ifup-local && rm -f /sbin/ifup-local
|
|
|
|
[ -f /sbin/ifdown-local ] && grep -q Shorewall /sbin/ifdown-local && rm -f /sbin/ifdown-local
|
2010-05-19 15:29:28 +02:00
|
|
|
|
2010-12-05 18:11:08 +01:00
|
|
|
[ -f /etc/ppp/ip-up.local ] && grep -q Shorewall-based /etc/ppp/ip-up.local && rm -f /etc/ppp/ip-up.local
|
|
|
|
[ -f /etc/ppp/ip-down.local ] && grep -q Shorewall-based /etc/ppp/ip-down.local && rm -f /etc/ppp/ip-down.local
|
|
|
|
|
2010-05-24 16:46:01 +02:00
|
|
|
rm -f /etc/NetworkManager/dispatcher.d/01-shorewall
|
2010-05-19 01:34:49 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/shorewall-init
|
2010-05-23 21:53:56 +02:00
|
|
|
|
2010-05-19 01:34:49 +02:00
|
|
|
%attr(0544,root,root) /etc/init.d/shorewall-init
|
|
|
|
%attr(0755,root,root) %dir /usr/share/shorewall-init
|
|
|
|
|
|
|
|
%attr(0644,root,root) /usr/share/shorewall-init/version
|
2010-05-27 02:04:58 +02:00
|
|
|
%attr(0544,root,root) /usr/share/shorewall-init/ifupdown
|
2010-05-19 01:34:49 +02:00
|
|
|
|
|
|
|
%doc COPYING changelog.txt releasenotes.txt
|
|
|
|
|
|
|
|
%changelog
|
2011-03-13 15:56:12 +01:00
|
|
|
* Sun Mar 13 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-1
|
2011-03-02 16:43:03 +01:00
|
|
|
* Wed Mar 02 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-0base
|
2011-03-01 00:24:04 +01:00
|
|
|
* Mon Feb 28 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-0RC1
|
2011-02-20 18:20:43 +01:00
|
|
|
* Sun Feb 20 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-0Beta4
|
2011-02-19 17:55:28 +01:00
|
|
|
* Sat Feb 19 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-0Beta3
|
2011-02-13 20:43:37 +01:00
|
|
|
* Sun Feb 13 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-0Beta2
|
2011-02-06 01:41:34 +01:00
|
|
|
* Sat Feb 05 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.18-0Beta1
|
2011-02-04 15:44:02 +01:00
|
|
|
* Fri Feb 04 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.17-0base
|
2011-01-30 20:30:45 +01:00
|
|
|
* Sun Jan 30 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.17-0RC1
|
2011-01-29 01:52:22 +01:00
|
|
|
* Fri Jan 28 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.17-0Beta3
|
2011-01-20 00:38:51 +01:00
|
|
|
* Wed Jan 19 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.17-0Beta2
|
2011-01-08 17:00:56 +01:00
|
|
|
* Sat Jan 08 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.17-0Beta1
|
2011-01-03 18:00:39 +01:00
|
|
|
* Mon Jan 03 2011 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.16-0base
|
2010-12-30 16:32:30 +01:00
|
|
|
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
|
2010-12-27 16:49:52 +01:00
|
|
|
- Updated to 4.4.16-0RC1
|
2010-12-30 19:02:39 +01:00
|
|
|
* Thu Dec 30 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.16-0Beta8
|
2010-12-27 16:49:52 +01:00
|
|
|
* Sun Dec 26 2010 Tom Eastep tom@shorewall.net
|
2010-12-26 18:01:15 +01:00
|
|
|
- Updated to 4.4.16-0Beta7
|
2010-12-20 22:17:35 +01:00
|
|
|
* Mon Dec 20 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.16-0Beta6
|
2010-12-10 15:53:36 +01:00
|
|
|
* Fri Dec 10 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.16-0Beta5
|
2010-12-04 20:40:34 +01:00
|
|
|
* Sat Dec 04 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.16-0Beta4
|
2010-12-03 18:17:26 +01:00
|
|
|
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
|
2010-12-03 22:43:46 +01:00
|
|
|
- Updated to 4.4.16-0Beta3
|
|
|
|
* Fri Dec 03 2010 Tom Eastep tom@shorewall.net
|
2010-12-03 18:17:26 +01:00
|
|
|
- Updated to 4.4.16-0Beta2
|
2010-12-01 02:30:11 +01:00
|
|
|
* Tue Nov 30 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.16-0Beta1
|
2010-11-26 18:49:40 +01:00
|
|
|
* Fri Nov 26 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.15-0base
|
2010-11-22 22:01:12 +01:00
|
|
|
* Mon Nov 22 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.15-0RC1
|
2010-11-16 00:09:22 +01:00
|
|
|
* Mon Nov 15 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.15-0Beta2
|
2010-10-30 16:12:03 +02:00
|
|
|
* Sat Oct 30 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.15-0Beta1
|
2010-10-24 06:40:22 +02:00
|
|
|
* Sat Oct 23 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.14-0base
|
2010-10-07 01:16:37 +02:00
|
|
|
* Wed Oct 06 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.14-0RC1
|
2010-10-01 18:31:11 +02:00
|
|
|
* Fri Oct 01 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.14-0Beta4
|
2010-09-26 17:15:32 +02:00
|
|
|
* Sun Sep 26 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.14-0Beta3
|
2010-09-24 04:33:37 +02:00
|
|
|
* Thu Sep 23 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.14-0Beta2
|
2010-09-21 20:34:26 +02:00
|
|
|
* Tue Sep 21 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.14-0Beta1
|
2010-09-17 17:23:24 +02:00
|
|
|
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net
|
2010-09-17 18:14:56 +02:00
|
|
|
- Updated to 4.4.13-0RC1
|
|
|
|
* Fri Sep 17 2010 Tom Eastep tom@shorewall.net
|
2010-09-17 17:23:24 +02:00
|
|
|
- Updated to 4.4.13-0Beta6
|
2010-09-13 22:51:25 +02:00
|
|
|
* Mon Sep 13 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.13-0Beta5
|
2010-09-05 00:30:02 +02:00
|
|
|
* Sat Sep 04 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.13-0Beta4
|
2010-08-30 21:33:10 +02:00
|
|
|
* Mon Aug 30 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.13-0Beta3
|
2010-08-25 18:58:07 +02:00
|
|
|
* Wed Aug 25 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.13-0Beta2
|
2010-08-18 21:40:34 +02:00
|
|
|
* Wed Aug 18 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.13-0Beta1
|
2010-08-15 17:50:45 +02:00
|
|
|
* Sun Aug 15 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.12-0base
|
2010-08-07 04:31:36 +02:00
|
|
|
* Fri Aug 06 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.12-0RC1
|
2010-08-02 01:10:32 +02:00
|
|
|
* Sun Aug 01 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.12-0Beta4
|
2010-07-31 22:23:53 +02:00
|
|
|
* Sat Jul 31 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.12-0Beta3
|
2010-07-25 17:11:49 +02:00
|
|
|
* Sun Jul 25 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.12-0Beta2
|
2010-07-22 05:35:36 +02:00
|
|
|
* Wed Jul 21 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.12-0Beta1
|
2010-07-09 18:01:08 +02:00
|
|
|
* Fri Jul 09 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.11-0base
|
2010-07-05 16:08:06 +02:00
|
|
|
* Mon Jul 05 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.11-0RC1
|
2010-07-03 19:54:39 +02:00
|
|
|
* Sat Jul 03 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.11-0Beta3
|
2010-07-01 16:08:11 +02:00
|
|
|
* Thu Jul 01 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.11-0Beta2
|
2010-06-06 22:36:45 +02:00
|
|
|
* Sun Jun 06 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.11-0Beta1
|
2010-06-06 00:58:23 +02:00
|
|
|
* Sat Jun 05 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0base
|
2010-06-05 01:19:15 +02:00
|
|
|
* Fri Jun 04 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0RC2
|
2010-05-28 02:21:11 +02:00
|
|
|
* Thu May 27 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0RC1
|
2010-05-27 01:47:49 +02:00
|
|
|
* Wed May 26 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0Beta4
|
2010-05-25 16:17:57 +02:00
|
|
|
* Tue May 25 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0Beta3
|
2010-05-20 23:13:38 +02:00
|
|
|
* Thu May 20 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Updated to 4.4.10-0Beta2
|
2010-05-19 01:34:49 +02:00
|
|
|
* Tue May 18 2010 Tom Eastep tom@shorewall.net
|
|
|
|
- Initial version
|
|
|
|
|
|
|
|
|
|
|
|
|