packages: prelude-correlator/prelude-correlator.spec (NEW), prelude-correla...
paszczus
paszczus at pld-linux.org
Wed Aug 3 13:34:11 CEST 2011
Author: paszczus Date: Wed Aug 3 11:34:11 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- new, stoll^H^H^H^H^Hborrowed from Fedora
---- Files affected:
packages/prelude-correlator:
prelude-correlator.spec (NONE -> 1.1) (NEW), prelude-correlator.init (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/prelude-correlator/prelude-correlator.spec
diff -u /dev/null packages/prelude-correlator/prelude-correlator.spec:1.1
--- /dev/null Wed Aug 3 13:34:11 2011
+++ packages/prelude-correlator/prelude-correlator.spec Wed Aug 3 13:34:06 2011
@@ -0,0 +1,84 @@
+# $Revision$, $Date$
+Summary: Real time correlator of events received by Prelude Manager
+Name: prelude-correlator
+Version: 1.0.0
+Release: 1
+License: GPL v2+
+Group: Applications/Networking
+URL: http://www.prelude-ids.com/
+Source0: http://www.prelude-ids.com/download/releases/prelude-correlator/%{name}-%{version}.tar.gz
+# Source0-md5: d66135ceba28cd6d06dbb29e2963012b
+Source1: %{name}.init
+BuildRequires: python-devel
+BuildRequires: python-setuptools >= 0.6-2.c11
+Requires(pre): /usr/sbin/useradd
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+Requires(postun): /sbin/service
+Requires: libprelude-python >= 0.9.24
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Prelude-Correlator allows conducting multi-stream correlations thanks
+to a powerful programming language for writing correlation rules. With
+any type of alert able to be correlated, event analysis becomes
+simpler, quicker and more incisive. This correlation alert then
+appears within the Prewikka interface and indicates the potential
+target information via the set of correlation rules.
+
+%prep
+%setup -q
+
+%build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install -O1 --root=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_initrddir}
+install %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post
+/sbin/chkconfig --add %{name}
+
+
+%preun
+if [ $1 = 0 ]; then
+ %service %{name} stop > /dev/null 2>&1 || :
+ /sbin/chkconfig --del %{name}
+fi
+
+
+%postun
+if [ "$1" -ge "1" ]; then
+ %service %{name} condrestart >/dev/null 2>&1 || :
+fi
+
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING NEWS HACKING.README docs/sample-plugin
+%dir %attr(700,root,root) %{_sysconfdir}/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+%{_initrddir}/%{name}
+%attr(755,root,root) %{_bindir}/%{name}
+%dir %{_var}/lib/%{name}
+%{_var}/lib/%{name}/*
+%{py_sitescriptdir}/PreludeCorrelator/
+%{py_sitescriptdir}/prelude_correlator*.egg-info
+
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2011/08/03 11:34:06 paszczus
+- new, stoll^H^H^H^H^Hborrowed from Fedora
+
================================================================
Index: packages/prelude-correlator/prelude-correlator.init
diff -u /dev/null packages/prelude-correlator/prelude-correlator.init:1.1
--- /dev/null Wed Aug 3 13:34:11 2011
+++ packages/prelude-correlator/prelude-correlator.init Wed Aug 3 13:34:06 2011
@@ -0,0 +1,86 @@
+#!/bin/sh
+# Startup script for prelude-correlator
+#
+# chkconfig: - 75 30
+# description: Run prelude-correlator
+# config /etc/prelude-correlator/prelude-correlator.conf
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+prog="prelude-correlator"
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Allow anyone to run status
+if [ "$1" = "status" ] ; then
+ status $prog
+ RETVAL=$?
+ exit $RETVAL
+fi
+
+# Check that we are root ... so non-root users stop here
+test $EUID = 0 || exit 4
+
+RETVAL=0
+
+start() {
+ test -x /usr/bin/$prog || exit 5
+ test -f /etc/$prog/$prog.conf || exit 6
+
+ if test "x`pidof $prog`" != x; then
+ echo "$prog already started"
+ action $"Starting $prog: " /bin/false
+ RETVAL=1
+ return $RETVAL
+ else
+ echo -n $"Starting $prog: "
+ unset HOME MAIL USER USERNAME
+ daemon $prog -d
+ RETVAL=$?
+ if test $RETVAL = 0 ; then
+ touch /var/lock/subsys/$prog
+ fi
+ echo
+ return $RETVAL
+ fi
+}
+
+stop() {
+ if test "x`pidof $prog`" != x; then
+ echo -n $"Stopping $prog: "
+ killproc $prog
+ RETVAL=$?
+ echo
+ fi
+ rm -f /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+
+ stop)
+ stop
+ ;;
+
+ restart|reload)
+ stop
+ sleep 3
+ start
+ ;;
+ condrestart)
+ if test "x`pidof prog`" != x; then
+ stop
+ start
+ fi
+ ;;
+
+ *)
+ echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+ RETVAL=3
+
+esac
+
+exit $RETVAL
================================================================
More information about the pld-cvs-commit
mailing list