Author: glen Date: Wed Oct 26 11:45:06 2011 GMT Module: packages Tag: HEAD ---- Log message: - adapter (kill dozen trailing spaces, people should stop copying stuff with mouse) - fix scriptlets to work as expected (add config on initial install, remove on removal, not on each upgrade) - use sed for in place replace, not perl
---- Files affected: packages/emergingthreats: emergingthreats.spec (1.1 -> 1.2) ---- Diffs: ================================================================ Index: packages/emergingthreats/emergingthreats.spec diff -u packages/emergingthreats/emergingthreats.spec:1.1 packages/emergingthreats/emergingthreats.spec:1.2 --- packages/emergingthreats/emergingthreats.spec:1.1 Wed Oct 26 01:22:06 2011 +++ packages/emergingthreats/emergingthreats.spec Wed Oct 26 13:45:01 2011 @@ -1,5 +1,4 @@ -# $Revision$, $Date$ - +# $Revision$, $Date$ Summary: Emerging Threats open rules for Snort IDS/IPS Name: emergingthreats Version: 6947 @@ -9,56 +8,60 @@ Source0: http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz # Source0-md5: 38db422a5b87375c25b8714f42dc8670 URL: http://emergingthreats.net/ +Requires: sed >= 4.0 Requires: snort >= 2.9.0 -Requires: perl-base Provides: snort-rules BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define _sysconfdir /etc/snort + %description Emerging Threats open rules for Snort IDS/IPS. %prep %setup -qn rules -%build - %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysconfdir}/snort/rules -install emerging.conf $RPM_BUILD_ROOT%{_sysconfdir}/snort -install emerging-*.rules $RPM_BUILD_ROOT%{_sysconfdir}/snort/rules -install classification.config $RPM_BUILD_ROOT%{_sysconfdir}/snort/rules -install reference.config $RPM_BUILD_ROOT%{_sysconfdir}/snort/rules +install -d $RPM_BUILD_ROOT%{_sysconfdir}/rules +cp -p emerging.conf $RPM_BUILD_ROOT%{_sysconfdir} +cp -p emerging-*.rules $RPM_BUILD_ROOT%{_sysconfdir}/rules +cp -p classification.config $RPM_BUILD_ROOT%{_sysconfdir}/rules +cp -p reference.config $RPM_BUILD_ROOT%{_sysconfdir}/rules %clean rm -rf $RPM_BUILD_ROOT -%pre - %post -[ -f /etc/snort/snort.conf ] \ - && /bin/echo "include emerging.conf" >> /etc/snort/snort.conf -%service snortd start - -%preun -/usr/bin/perl -i.et_orig -pe 's/^\s*include\s+emerging.conf.*$//' /etc/snort/snort.conf +if [ "$1" = "1" ]; then + if [ -f %{_sysconfdir}/snort.conf ]; then + echo "include emerging.conf" >> %{_sysconfdir}/snort.conf + fi +fi +%service -q snortd restart %postun -%service snortd start +if [ "$1" = "0" ]; then + %{__sed} -i -re 's/^\s*include\s+emerging.conf.*$//' %{_sysconfdir}/snort.conf + %service -q snortd restart +fi %files %defattr(644,root,root,755) %doc LICENSE BSD-License.txt snort-2.9.0-open.txt gpl-2.0.txt compromised-ips.txt rbn-ips.txt rbn-malvertisers-ips.txt -%attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort/emerging.conf -%attr(640,root,snort) %{_sysconfdir}/snort/rules/* +%attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/emerging.conf +%attr(640,root,snort) %{_sysconfdir}/rules/* + +%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) +%changelog +* %{date} PLD Team <[email protected]> +All persons listed below can be reached at <cvs_login>@pld-linux.org -%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) -%changelog -* %{date} PLD Team <[email protected]> -All persons listed below can be reached at <cvs_login>@pld-linux.org - $Log$ +Revision 1.2 2011/10/26 11:45:01 glen +- adapter (kill dozen trailing spaces, people should stop copying stuff with mouse) +- fix scriptlets to work as expected (add config on initial install, remove on removal, not on each upgrade) +- use sed for in place replace, not perl + Revision 1.1 2011/10/25 23:22:06 mguevara - 6947-1 initial release, Emerging Threats open rules for Snort IDS/IPS - - ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/emergingthreats/emergingthreats.spec?r1=1.1&r2=1.2&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
