X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=shorewall.spec;h=70c35387078110dd58a0c0597bde7ca9d65107f2;hb=8fd038b2624d7b5f14f0831ed4b5ab1dd13e5674;hp=938f8fcf7c9aa6ef4e20ddba10bdd98136747608;hpb=f3eeaed2a3dfea5313a482d1641731be4a3477e9;p=packages%2Fshorewall.git diff --git a/shorewall.spec b/shorewall.spec index 938f8fc..70c3538 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: 3 License: GPL Group: Networking/Utilities Source0: http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-%{version}.tar.bz2 @@ -23,18 +23,23 @@ Source4: http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-init Source5: http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-core-%{version}.tar.bz2 # Source5-md5: be73e2f76b2438e7813f62873a50c203 Source10: %{name}.init +Source11: %{name}.logrotate Patch0: %{name}-config.patch -Patch1: tld.patch -Patch2: man.patch -Patch3: init.patch +Patch1: %{name}-logging.patch +Patch2: tld.patch +Patch3: man.patch +Patch4: init.patch +Patch5: 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) @@ -104,6 +109,7 @@ rule compiler installed. %package core Summary: Core libraries for Shorewall Group: Applications/System +Requires: logrotate %description core This package contains the core libraries for Shorewall. @@ -139,6 +145,8 @@ done %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 # Remove hash-bang from files which are not directly executed as shell # scripts. This silences some rpmlint errors. @@ -146,8 +154,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,16 +168,30 @@ 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 +install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/shorewall + %clean rm -rf $RPM_BUILD_ROOT +%post +/sbin/chkconfig --add shorewall +%service shorewall restart "Shorewall" + +%preun +if [ "$1" = "0" ]; then + %service shorewall stop + /sbin/chkconfig --del shorewall +fi + %files %defattr(644,root,root,755) %doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples} %attr(755,root,root) %{_sbindir}/shorewall %dir %{_sysconfdir}/shorewall %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall/* -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-init %{_datadir}/shorewall/action.* %{_datadir}/shorewall/actions.std %{_datadir}/shorewall/configfiles/ @@ -203,7 +223,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_sbindir}/shorewall-lite %dir %{_sysconfdir}/shorewall-lite %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall-lite/shorewall-lite.conf -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-lite +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-lite-init %{_datadir}/shorewall-lite %{_libexecdir}/shorewall-lite %{_mandir}/man5/shorewall-lite* @@ -217,7 +237,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_sbindir}/shorewall6 %dir %{_sysconfdir}/shorewall6 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall6/* -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6 +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6-init %{_mandir}/man5/shorewall6* %exclude %{_mandir}/man5/shorewall6-lite* %{_mandir}/man8/shorewall6* @@ -232,7 +252,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_sbindir}/shorewall6-lite %dir %{_sysconfdir}/shorewall6-lite %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall6-lite/shorewall6-lite.conf -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6-lite +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6-lite-init %{_mandir}/man5/shorewall6-lite* %{_mandir}/man8/shorewall6-lite* %{_datadir}/shorewall6-lite @@ -244,6 +264,7 @@ rm -rf $RPM_BUILD_ROOT %files core %defattr(644,root,root,755) %doc shorewall-core-%{version}/{COPYING,changelog.txt,releasenotes.txt} +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall %dir %{_datadir}/shorewall/ %{_datadir}/shorewall/coreversion %{_datadir}/shorewall/functions @@ -260,7 +281,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_sbindir}/shorewall-init %attr(755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/01-shorewall %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/shorewall-init -/etc/logrotate.d/shorewall-init +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-ifupdown %{_mandir}/man8/shorewall-init.8.* %{_datadir}/shorewall-init %dir %{_libexecdir}/shorewall-init