[packages/cacti-template-synflood-defender] new, version 0.1.0

glen glen at pld-linux.org
Thu Feb 7 16:35:44 CET 2013


commit 3be969133f2bdc4114f1f6eb1b7480a3c0cd57b1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Feb 7 17:35:08 2013 +0200

    new, version 0.1.0
    
    largely based on cacti-template-snmp_tcp_connection_status.spec

 cacti-template-synflood-defender.spec | 97 +++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
---
diff --git a/cacti-template-synflood-defender.spec b/cacti-template-synflood-defender.spec
new file mode 100644
index 0000000..6a9b68f
--- /dev/null
+++ b/cacti-template-synflood-defender.spec
@@ -0,0 +1,97 @@
+%define		template synflood-defender
+%include	/usr/lib/rpm/macros.php
+Summary:	Template for Cacti - Synflood-Defender
+Name:		cacti-template-%{template}
+Version:	0.1.0
+Release:	1
+License:	GPL v2
+Group:		Applications/WWW
+Source0:	http://synflood-defender.net/_media/download/synflooddefender-%{version}-linux.tar.gz
+# Source0-md5:	d744ae65a69edbf893c86e36498be85a
+Source1:	http://synflood-defender.net/_media/download/synflooddefender_cacti_tpls.tar.gz
+# Source1-md5:	f0002aa57955008dc5e51b11c1c3cdc6
+URL:		http://synflood-defender.net/
+BuildRequires:	rpm-php-pearprov >= 4.4.2-11
+BuildRequires:	rpmbuild(macros) >= 1.554
+Requires:	cacti >= 0.8.7e-8
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		cactidir		/usr/share/cacti
+%define		resourcedir		%{cactidir}/resource
+%define		scriptsdir		%{cactidir}/scripts
+%define		_libdir			%{_prefix}/lib
+%define		snmpdconfdir	/etc/snmp
+%define		snmpdextend		synflooddefender
+
+%description
+Synflood-Defender is an extension for SNMP protocol, which is used for
+monitoring SYN-queue and protection the host if SYN-flood attack
+happens.
+
+Features:
+- monitoring SYN-queue
+- changing TCP kernel parameters "on-the-fly" when threshold is
+  reached
+- 2 protection modes: dynamic and force
+- the ability to specify kernel parameters you want to change
+- templates for Cacti are available for download
+- the ability to integrate with any monitoring system which supports
+  SNMP
+
+%package -n net-snmp-agent-synflood-defender
+Summary:	SNMPd agent to for Synflood Defender
+Group:		Networking/Daemons
+Requires:	net-snmp
+# for netstat
+Requires:	net-tools
+
+%description -n net-snmp-agent-synflood-defender
+SNMPd agent to for Synflood Defender.
+
+%prep
+%setup -qn synflooddefender-%{version}-linux -a1
+mv synflooddefender_cacti_tpls/*.xml .
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir},%{_sysconfdir}/%{template},%{_libdir}}
+cp -p *.xml $RPM_BUILD_ROOT%{resourcedir}
+
+cp -p %{template}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{template}
+cp -p state $RPM_BUILD_ROOT%{_sysconfdir}/%{template}
+cp -p %{template}.sh $RPM_BUILD_ROOT%{_libdir}/%{template}
+
+%post
+%cacti_import_template %{resourcedir}/cacti_data_template_%{template}.xml
+%cacti_import_template %{resourcedir}/cacti_graph_template_%{template}.xml
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n net-snmp-agent-%{template}
+if ! grep -qF %{snmpdextend} %{snmpdconfdir}/snmpd.local.conf; then
+	echo "extend %{snmpdextend} %{_libdir}/%{template}" >> %{snmpdconfdir}/snmpd.local.conf
+
+	%service -q snmpd reload
+fi
+
+%preun -n net-snmp-agent-%{template}
+if [ "$1" = 0 ]; then
+	if [ -f %{snmpdconfdir}/snmpd.local.conf ]; then
+		%{__sed} -i -e "/extend %{snmpdextend}/d" %{snmpdconfdir}/snmpd.local.conf
+		%service -q snmpd reload
+	fi
+fi
+
+%files
+%defattr(644,root,root,755)
+%{resourcedir}/cacti_data_template_%{template}.xml
+%{resourcedir}/cacti_graph_template_%{template}.xml
+
+%files -n net-snmp-agent-%{template}
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/%{template}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{template}/%{template}.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{template}/state
+%attr(755,root,root) %{_libdir}/%{template}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cacti-template-synflood-defender.git/commitdiff/3be969133f2bdc4114f1f6eb1b7480a3c0cd57b1



More information about the pld-cvs-commit mailing list