diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/prelude-manager/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/prelude-manager/files')
7 files changed, 137 insertions, 0 deletions
diff --git a/app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch b/app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch new file mode 100644 index 000000000000..246ce7d921e5 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager-3.0.0-conf.patch @@ -0,0 +1,11 @@ +--- a/prelude-manager.conf.in ++++ b/prelude-manager.conf.in +@@ -361,7 +361,7 @@ + # (same source, target and classification combination) every 2 minutes + # to reporting plugins (eg. to the database). + [thresholding] +-path = alert.classification.text, alert.source.node.address.address, alert.target.node.address.address ++path = alert.classification.text, alert.source(0).node.address(0).address, alert.target(0).node.address(0).address + limit = 120 + count = 100 + hook = reporting diff --git a/app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch b/app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch new file mode 100644 index 000000000000..bc1949f01510 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager-3.0.0-configure.patch @@ -0,0 +1,57 @@ +When : when you try to use enable with libmaxmind, libpreludedb, xml, libwrap, they are not working +Why : Needed if you want to use useflags +--- a/configure.in ++++ b/configure.in +@@ -110,7 +110,10 @@ + dnl ************************************************** + LIBMAXMINDDB_MIN_VERSION=1.0.0 + +-PKG_CHECK_MODULES([LIBMAXMINDDB], [libmaxminddb >= $LIBMAXMINDDB_MIN_VERSION], enable_libmaxminddb=yes, enable_libmaxminddb=no) ++AC_ARG_ENABLE(libmaxminddb, AC_HELP_STRING(--enable-libmaxminddb, Define whether libmaxminddb is available), , enable_libmaxminddb="yes") ++if test x$enable_libmaxminddb = xyes; then ++ PKG_CHECK_MODULES([LIBMAXMINDDB], [libmaxminddb >= $LIBMAXMINDDB_MIN_VERSION], enable_libmaxminddb=yes, enable_libmaxminddb=no) ++fi + if test x$enable_libmaxminddb = xyes; then + AC_CHECK_HEADER(maxminddb.h, enable_libmaxminddb=yes, enable_libmaxminddb=no) + fi +@@ -126,11 +129,14 @@ + dnl * Check for libpreludedb * + dnl ************************************************** + +-AM_PATH_LIBPRELUDEDB(3.0.0, enable_libpreludedb=yes, enable_libpreludedb=no, no) +-AM_CONDITIONAL(HAVE_LIBPRELUDEDB, test x$enable_libpreludedb = xyes) ++AC_ARG_ENABLE(libpreludedb, AC_HELP_STRING(--enable-libpreludedb, Define whether libpreludedb is available), , enable_libpreludedb="yes") ++if test x$enable_libpreludedb = xyes; then ++ AM_PATH_LIBPRELUDEDB(3.0.0, enable_libpreludedb=yes, enable_libpreludedb=no, no) ++fi + if test x$enable_libpreludedb = xyes; then + AC_DEFINE_UNQUOTED(HAVE_LIBPRELUDEDB, , Define whether libpreludedb is available) + fi ++AM_CONDITIONAL(HAVE_LIBPRELUDEDB, test x$enable_libpreludedb = xyes) + + + +@@ -138,7 +144,10 @@ + dnl * Check for the Libxml2 * + dnl ******************************************************** + +-AM_PATH_XML2(, enable_xmlmod=yes, enable_xmlmod=no) ++AC_ARG_ENABLE(xmlmod, AC_HELP_STRING(--enable-xmlmod, Enable XML), , enable_xmlmod="yes") ++if test x$enable_xmlmod = xyes; then ++ AM_PATH_XML2(, enable_xmlmod=yes, enable_xmlmod=no) ++fi + AM_CONDITIONAL(HAVE_XML2, test x$enable_xmlmod = xyes) + + +@@ -147,9 +156,10 @@ + dnl * TCP WRAPPER CHECK * + dnl ************************************************** + ++AC_ARG_WITH(libwrap, AC_HELP_STRING(--with-libwrap, Compile in libwrap (tcp_wrappers) support.), , with_libwrap="yes") + AC_ARG_WITH(libwrap-prefix, AC_HELP_STRING(--with-libwrap-prefix@<:@=PFX@:>@, + Compile in libwrap (tcp_wrappers) support @<:@default=auto@:>@.), +- libwrap_required=true, with_libwrap="yes") ++ libwrap_required=true, ) + + if test x$with_libwrap != xno; then + LIBWRAP_INCLUDE="tcpd.h" diff --git a/app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch b/app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch new file mode 100644 index 000000000000..ef6d553a3d27 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager-3.0.0-run.patch @@ -0,0 +1,13 @@ +When : everytime +Why : since systemd, run dir has changed +--- a/configure.in ++++ b/configure.in +@@ -304,7 +304,7 @@ + + manager_failover_dir=$LOCALSTATEDIR/spool/prelude-manager/failover + manager_scheduler_dir=$LOCALSTATEDIR/spool/prelude-manager/scheduler +-manager_run_dir=$LOCALSTATEDIR/run/prelude-manager ++manager_run_dir=/run/prelude-manager + + AC_DEFINE_UNQUOTED(REPORT_PLUGIN_DIR, "$report_plugin_dir", Prelude-Manager report plugin directory) + AC_DEFINE_UNQUOTED(DECODE_PLUGIN_DIR, "$decode_plugin_dir", Prelude-Manager decode plugin directory) diff --git a/app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch b/app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch new file mode 100644 index 000000000000..4012c6c4b794 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager-3.1.0-run.patch @@ -0,0 +1,13 @@ +When : everytime +Why : Fix the run dir to comply with the Gentoo FS layout. +--- a/configure.ac ++++ b/configure.ac +@@ -337,7 +337,7 @@ + + manager_failover_dir=$LOCALSTATEDIR/spool/prelude-manager/failover + manager_scheduler_dir=$LOCALSTATEDIR/spool/prelude-manager/scheduler +-manager_run_dir=$LOCALSTATEDIR/run/prelude-manager ++manager_run_dir=/run/prelude-manager + + AC_DEFINE_UNQUOTED(REPORT_PLUGIN_DIR, "$report_plugin_dir", Prelude-Manager report plugin directory) + AC_DEFINE_UNQUOTED(DECODE_PLUGIN_DIR, "$decode_plugin_dir", Prelude-Manager decode plugin directory) diff --git a/app-admin/prelude-manager/files/prelude-manager.initd b/app-admin/prelude-manager/files/prelude-manager.initd new file mode 100644 index 000000000000..14a39ba415e8 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +BIN_MANAGER=/usr/bin/prelude-manager +PID_MANAGER=/run/prelude-manager/prelude-manager.pid + +depend() { + need net +} + +start() { + ebegin "Starting prelude-manager" + checkpath -d -m 0755 -o root:root /run/prelude-manager + start-stop-daemon --start --exec $BIN_MANAGER \ + --pidfile $PID_MANAGER -- -d -P $PID_MANAGER + eend $? +} + +stop() { + ebegin "Stopping prelude-manager" + start-stop-daemon --stop --exec $BIN_MANAGER \ + --pidfile $PID_MANAGER + eend $? +} diff --git a/app-admin/prelude-manager/files/prelude-manager.run b/app-admin/prelude-manager/files/prelude-manager.run new file mode 100644 index 000000000000..739808485129 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager.run @@ -0,0 +1,4 @@ +# Configuration to create /run/prelude-manager directory +# Used as part of systemd's tmpfiles + +d /run/prelude-manager 0755 root root diff --git a/app-admin/prelude-manager/files/prelude-manager.service b/app-admin/prelude-manager/files/prelude-manager.service new file mode 100644 index 000000000000..15eee91b8aa7 --- /dev/null +++ b/app-admin/prelude-manager/files/prelude-manager.service @@ -0,0 +1,14 @@ +[Unit] +Description=Prelude-Manager service +DefaultDependencies=no +After=remote_fs.target +Before=prelude-lml.service prelude-correlator.service + +[Service] +ExecStart=/usr/bin/prelude-manager -d -P /run/prelude-manager/prelude-manager.pid +Type=forking +PIDFile=/run/prelude-manager/prelude-manager.pid +Restart=always + +[Install] +WantedBy=prelude-lml.service prelude-correlator.service multi-user.target |