pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/prelude-correlator Update to 0.9.0-beta6. Rew...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/22252e24be69
branches:  trunk
changeset: 398123:22252e24be69
user:      hasso <hasso%pkgsrc.org@localhost>
date:      Mon Aug 24 12:30:09 2009 +0000

description:
Update to 0.9.0-beta6. Rewritten from scratch in Python instead of lua.
>From Rumko via PR 41763.

diffstat:

 security/prelude-correlator/Makefile         |  42 +++++++--------------
 security/prelude-correlator/PLIST            |  53 ++++++++++++++++++++++-----
 security/prelude-correlator/distinfo         |  12 ++---
 security/prelude-correlator/patches/patch-aa |  37 ++++++++++++++----
 security/prelude-correlator/patches/patch-ab |  23 ------------
 security/prelude-correlator/patches/patch-ac |  19 ----------
 6 files changed, 91 insertions(+), 95 deletions(-)

diffs (255 lines):

diff -r d3896d226310 -r 22252e24be69 security/prelude-correlator/Makefile
--- a/security/prelude-correlator/Makefile      Mon Aug 24 11:53:42 2009 +0000
+++ b/security/prelude-correlator/Makefile      Mon Aug 24 12:30:09 2009 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2009/05/20 00:58:27 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2009/08/24 12:30:09 hasso Exp $
 #
 
-DISTNAME=      prelude-correlator-0.9.0-beta3
+DISTNAME=      prelude-correlator-0.9.0-beta6
 PKGNAME=       prelude-correlator-${DISTNAME:S/-beta/beta/:C/.*-//}
-PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  http://www.prelude-ids.com/download/releases/prelude-correlator/
 
@@ -11,20 +10,15 @@
 HOMEPAGE=      http://www.prelude-ids.com/download/releases/prelude-correlator/
 COMMENT=       Intrusion event correlation engine
 
-USE_LIBTOOL=           yes
-GNU_CONFIGURE=         yes
-USE_TOOLS+=            make
-USE_TOOLS+=            pkg-config
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 BUILD_DEFS+=           VARBASE
-CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
-CONFIGURE_ARGS+=       --localstatedir=${VARBASE:Q}
-CONFIGURE_ARGS+=       --with-libpreludedb-prefix=${BUILDLINK_PREFIX.libpreludedb}
+
 RCD_SCRIPTS=           preludecorrelator
 PRELUDE_CORRELATOR_PID_DIR=    ${VARBASE}/run/prelude-correlator
 PRELUDE_USER?=         _prelude
 PRELUDE_GROUP?=                _prelude
-PRELUDE_HOME?=         ${VARBASE}/prelude-correlator
-
+PRELUDE_HOME?=         ${VARBASE}/db/prelude-correlator
 INSTALLATION_DIRS=     sbin
 
 PKG_GROUPS_VARS+=      PRELUDE_GROUP
@@ -40,22 +34,18 @@
 FILES_SUBST+=   PRELUDE_USER=${PRELUDE_USER:Q}
 FILES_SUBST+=   PRELUDE_GROUP=${PRELUDE_USER:Q}
 
-EGDIR=                 share/examples/prelude-correlator/
-REQD_DIRS=             ${EGDIR}
-REQD_DIRS+=            ${EGDIR}/lua-rules
-CONF_FILES_PERMS+=     ${EGDIR}/prelude-correlator.conf ${PKG_SYSCONFDIR}/prelude-correlator/prelude-correlator.conf \
-                       ${ROOT_USER} ${ROOT_GROUP} 0644
-
 SUBST_CLASSES+=                code
 SUBST_STAGE.code=      post-patch
 SUBST_FILES.code=      run-prelude-correlator.c
+SUBST_FILES.code+=     ${WRKSRC}/*.py
 SUBST_SED.code=                -e 's,@PREFIX@,${PREFIX},g'
 SUBST_SED.code+=       -e 's,@PRELUDE_USER@,${PRELUDE_USER},g'
+SUBST_SED.code+=        -e 's,@PRELUDE_HOME@,${PRELUDE_HOME},g'
 
-SUBST_CLASSES+=                make
-SUBST_STAGE.make=      post-patch
-SUBST_FILES.make=      Makefile.in
-SUBST_SED.make=                -e 's,@EGDIR@,${EGDIR},g'
+REQD_DIRS+=            ${PRELUDE_HOME}
+REQD_DIRS_PERMS+=      ${PRELUDE_HOME} ${PRELUDE_USER} ${PRELUDE_GROUP} 0700
+
+REPLACE_PYTHON=                ${WRKSRC}/*.py
 
 pre-patch:
        ${CP} ${FILESDIR}/run-prelude-correlator.c ${WRKSRC}
@@ -64,10 +54,8 @@
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CC} ${CFLAGS} -o run-prelude-correlator run-prelude-correlator.c
 
 post-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/run-prelude-correlator ${PREFIX}/sbin/run-prelude-correlator
-       ${CHOWN} -R ${PRELUDE_USER}:${PRELUDE_GROUP} ${PRELUDE_HOME}
+       ${INSTALL_PROGRAM} ${WRKSRC}/run-prelude-correlator ${DESTDIR}${PREFIX}/sbin/run-prelude-correlator
 
-.include "../../security/libprelude/buildlink3.mk"
-.include "../../lang/lua/buildlink3.mk"
-.include "../../devel/pcre/buildlink3.mk"
+.include "../../security/libprelude-python/buildlink3.mk"
+.include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r d3896d226310 -r 22252e24be69 security/prelude-correlator/PLIST
--- a/security/prelude-correlator/PLIST Mon Aug 24 11:53:42 2009 +0000
+++ b/security/prelude-correlator/PLIST Mon Aug 24 12:30:09 2009 +0000
@@ -1,13 +1,46 @@
-@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:13:36 joerg Exp $
+@comment $NetBSD: PLIST,v 1.3 2009/08/24 12:30:09 hasso Exp $
 bin/prelude-correlator
 sbin/run-prelude-correlator
-include/prelude-correlator/prelude-correlator.h
-lib/prelude-correlator/lua.la
-share/examples/prelude-correlator/prelude-correlator.conf
+${PYSITELIB}/PreludeCorrelator/__init__.pyc
+${PYSITELIB}/PreludeCorrelator/__init__.pyo
+${PYSITELIB}/PreludeCorrelator/config.pyc
+${PYSITELIB}/PreludeCorrelator/config.pyo
+${PYSITELIB}/PreludeCorrelator/context.pyc
+${PYSITELIB}/PreludeCorrelator/context.pyo
+${PYSITELIB}/PreludeCorrelator/idmef.pyc
+${PYSITELIB}/PreludeCorrelator/idmef.pyo
+${PYSITELIB}/PreludeCorrelator/log.pyc
+${PYSITELIB}/PreludeCorrelator/log.pyo
+${PYSITELIB}/PreludeCorrelator/main.pyc
+${PYSITELIB}/PreludeCorrelator/main.pyo
+${PYSITELIB}/PreludeCorrelator/pluginmanager.pyc
+${PYSITELIB}/PreludeCorrelator/pluginmanager.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/__init__.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/__init__.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/bruteforce.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/bruteforce.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/businesshour.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/businesshour.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/dshield.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/dshield.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/firewall.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/firewall.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/opensshauth.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/opensshauth.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/scan.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/scan.pyo
+${PYSITELIB}/PreludeCorrelator/plugins/worm.pyc
+${PYSITELIB}/PreludeCorrelator/plugins/worm.pyo
+${PYSITELIB}/PreludeCorrelator/require.pyc
+${PYSITELIB}/PreludeCorrelator/require.pyo
+${PYSITELIB}/PreludeCorrelator/siteconfig.py
+${PYSITELIB}/PreludeCorrelator/siteconfig.pyc
+${PYSITELIB}/PreludeCorrelator/siteconfig.pyo
+${PYSITELIB}/PreludeCorrelator/utils.pyc
+${PYSITELIB}/PreludeCorrelator/utils.pyo
+${PYSITELIB}/prelude_correlator-0.9.0_beta6-py2.5.egg-info/PKG-INFO
+${PYSITELIB}/prelude_correlator-0.9.0_beta6-py2.5.egg-info/SOURCES.txt
+${PYSITELIB}/prelude_correlator-0.9.0_beta6-py2.5.egg-info/dependency_links.txt
+${PYSITELIB}/prelude_correlator-0.9.0_beta6-py2.5.egg-info/entry_points.txt
+${PYSITELIB}/prelude_correlator-0.9.0_beta6-py2.5.egg-info/top_level.txt
 share/examples/rc.d/preludecorrelator
-share/examples/prelude-correlator/lua-rules/brute-force.lua
-share/examples/prelude-correlator/lua-rules/business-hour.lua
-share/examples/prelude-correlator/lua-rules/firewall.lua
-share/examples/prelude-correlator/lua-rules/scan.lua
-share/examples/prelude-correlator/lua-rules/worm.lua
-share/prelude-correlator/lua/lib.lua
diff -r d3896d226310 -r 22252e24be69 security/prelude-correlator/distinfo
--- a/security/prelude-correlator/distinfo      Mon Aug 24 11:53:42 2009 +0000
+++ b/security/prelude-correlator/distinfo      Mon Aug 24 12:30:09 2009 +0000
@@ -1,8 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/07/21 12:16:46 shannonjr Exp $
+$NetBSD: distinfo,v 1.2 2009/08/24 12:30:09 hasso Exp $
 
-SHA1 (prelude-correlator-0.9.0-beta3.tar.gz) = fbceb04a42f267bf841bbf1ae501dc01c8ca2544
-RMD160 (prelude-correlator-0.9.0-beta3.tar.gz) = 18a9a566410ac90f957b68a4ee034a2ff94b8a3e
-Size (prelude-correlator-0.9.0-beta3.tar.gz) = 397813 bytes
-SHA1 (patch-aa) = aa4cbb04d5898c91578a36c279b8ca7b216ab695
-SHA1 (patch-ab) = 37d78dfd38965e6d7027a85ae0493f2071398713
-SHA1 (patch-ac) = 755852732c57563792f2ef9ae693a75045d962e7
+SHA1 (prelude-correlator-0.9.0-beta6.tar.gz) = b75784b69e4a28dc71c836633826e98f1b28da55
+RMD160 (prelude-correlator-0.9.0-beta6.tar.gz) = e64a07fb347c41d9791b0c5cbf0219d7cac0e762
+Size (prelude-correlator-0.9.0-beta6.tar.gz) = 193664 bytes
+SHA1 (patch-aa) = cf7f348d4798005376e97a22d2cf9d29174d789d
diff -r d3896d226310 -r 22252e24be69 security/prelude-correlator/patches/patch-aa
--- a/security/prelude-correlator/patches/patch-aa      Mon Aug 24 11:53:42 2009 +0000
+++ b/security/prelude-correlator/patches/patch-aa      Mon Aug 24 12:30:09 2009 +0000
@@ -1,13 +1,32 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/07/21 12:16:46 shannonjr Exp $
+$NetBSD: patch-aa,v 1.2 2009/08/24 12:30:09 hasso Exp $
 
---- configure.orig     2008-06-29 05:41:00.000000000 -0600
-+++ configure
-@@ -25519,7 +25519,7 @@ fi
- PRELUDE_CORRELATOR_CONF=$SYSCONFDIR/prelude-correlator/prelude-correlator.conf
+--- setup.py.orig      2009-07-21 22:44:16 +0200
++++ setup.py   2009-07-21 22:49:52 +0200
+@@ -48,7 +48,8 @@
+ 
+                 root = self.root or ""
+                 for dir, files in data_files:
+-                        dir = os.path.abspath(os.path.join(root, prefix, dir))
++                        if dir != "@PRELUDE_HOME@":
++                                dir = os.path.abspath(os.path.join(root, prefix, dir))
+ 
+                         self.mkpath(dir)
+                         for f in files:
+@@ -71,7 +72,7 @@
+         def init_siteconfig(self, prefix):
+                 config = open("PreludeCorrelator/siteconfig.py", "w")
+                 print >> config, "conf_dir = '%s'" % os.path.abspath(prefix + "/etc/prelude-correlator")
+-                print >> config, "lib_dir = '%s'" % os.path.abspath(prefix + "/var/lib/prelude-correlator")
++                print >> config, "lib_dir = '%s'" % os.path.abspath("@PRELUDE_HOME@")
+                 config.close()
  
  
--PRELUDE_CORRELATOR_CONTEXT_DIR=$LOCALSTATEDIR/lib/prelude-correlator
-+PRELUDE_CORRELATOR_CONTEXT_DIR=$LOCALSTATEDIR/prelude-correlator
+@@ -85,7 +86,7 @@
+ else:
+         package_data = {}
+         data_files = [ ("etc/prelude-correlator", ["prelude-correlator.conf"]),
+-                       ("var/lib/prelude-correlator", ["PreludeCorrelator/plugins/dshield.dat"]) ]
++                       ("@PRELUDE_HOME@", ["PreludeCorrelator/plugins/dshield.dat"]) ]
  
- 
- PRELUDE_CORRELATOR_CONFDIR=$SYSCONFDIR/prelude-correlator
+ setup(
+         name="prelude-correlator",
diff -r d3896d226310 -r 22252e24be69 security/prelude-correlator/patches/patch-ab
--- a/security/prelude-correlator/patches/patch-ab      Mon Aug 24 11:53:42 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2008/07/21 12:16:46 shannonjr Exp $
-
---- Makefile.in.orig   2008-06-27 11:54:12.000000000 -0600
-+++ Makefile.in
-@@ -733,17 +733,7 @@ uninstall-info: uninstall-info-recursive
- 
- install-data-local:
-       $(INSTALL) -m 700 -d $(DESTDIR)$(PRELUDE_CORRELATOR_CONTEXT_DIR)
--      @if test -f $(DESTDIR)$(PRELUDE_CORRELATOR_CONFDIR)/prelude-correlator.conf; then                       \
--              echo "********************************************************************************";        \
--              echo;                                                                                           \
--              echo "$(DESTDIR)$(configdir)/prelude-correlator.conf already exist...";                         \
--              echo "Installing default configuration in $(DESTDIR)$(configdir)/prelude-correlator.conf-dist"; \
--              echo;                                                                                           \
--              echo "********************************************************************************";        \
--              $(INSTALL) -m 600 $(top_srcdir)/prelude-correlator.conf $(DESTDIR)$(PRELUDE_CORRELATOR_CONFDIR)/prelude-correlator.conf-dist;  \
--      else                                                                                                    \
--              $(INSTALL) -m 600 $(top_srcdir)/prelude-correlator.conf $(DESTDIR)$(PRELUDE_CORRELATOR_CONFDIR);                \
--      fi
-+      $(BSD_INSTALL_DATA) $(top_srcdir)/prelude-correlator.conf $(PREFIX)/@EGDIR@
- 
- uninstall-local:
-       rm -f $(DESTDIR)$(configdir)/prelude-correlator.conf;
diff -r d3896d226310 -r 22252e24be69 security/prelude-correlator/patches/patch-ac
--- a/security/prelude-correlator/patches/patch-ac      Mon Aug 24 11:53:42 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2008/07/21 12:16:46 shannonjr Exp $
-
---- ./plugins/lua/ruleset/Makefile.in.orig     2008-07-11 06:41:49.000000000 -0600
-+++ ./plugins/lua/ruleset/Makefile.in
-@@ -321,12 +321,11 @@ distclean-libtool:
- uninstall-info-am:
- install-rulesetDATA: $(ruleset_DATA)
-       @$(NORMAL_INSTALL)
--      test -z "$(rulesetdir)" || $(mkdir_p) "$(DESTDIR)$(rulesetdir)"
-       @list='$(ruleset_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
--        echo " $(rulesetDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(rulesetdir)/$$f'"; \
--        $(rulesetDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(rulesetdir)/$$f"; \
-+        echo " $(rulesetDATA_INSTALL) '$$d$$p' '$(PREFIX)/share/examples/prelude-correlator/lua-rules/$$f'"; \
-+        $(rulesetDATA_INSTALL) "$$d$$p" "$(PREFIX)/share/examples/prelude-correlator/lua-rules/$$f"; \
-       done
- 
- uninstall-rulesetDATA:



Home | Main Index | Thread Index | Old Index