summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasso <hasso@pkgsrc.org>2009-08-24 12:30:09 +0000
committerhasso <hasso@pkgsrc.org>2009-08-24 12:30:09 +0000
commitc113000e61e55c5fb037c17a98ade4db9deea872 (patch)
tree0bac15f5722654e9278b90f413df8f76f9f5bc24
parent1ec1992c931e337ff9092b1f461bafebabef95ca (diff)
downloadpkgsrc-c113000e61e55c5fb037c17a98ade4db9deea872.tar.gz
Update to 0.9.0-beta6. Rewritten from scratch in Python instead of lua.
From Rumko via PR 41763.
-rw-r--r--security/prelude-correlator/Makefile42
-rw-r--r--security/prelude-correlator/PLIST53
-rw-r--r--security/prelude-correlator/distinfo12
-rw-r--r--security/prelude-correlator/patches/patch-aa35
-rw-r--r--security/prelude-correlator/patches/patch-ab23
-rw-r--r--security/prelude-correlator/patches/patch-ac19
6 files changed, 90 insertions, 94 deletions
diff --git a/security/prelude-correlator/Makefile b/security/prelude-correlator/Makefile
index df92eeefbea..40e75e0d83f 100644
--- a/security/prelude-correlator/Makefile
+++ b/security/prelude-correlator/Makefile
@@ -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 @@ MAINTAINER= shannonjr@NetBSD.org
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_CORRELATOR_PID_DIR=${PRELUDE_CORRELATOR_PID_DIR:Q}
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'
+
+REQD_DIRS+= ${PRELUDE_HOME}
+REQD_DIRS_PERMS+= ${PRELUDE_HOME} ${PRELUDE_USER} ${PRELUDE_GROUP} 0700
-SUBST_CLASSES+= make
-SUBST_STAGE.make= post-patch
-SUBST_FILES.make= Makefile.in
-SUBST_SED.make= -e 's,@EGDIR@,${EGDIR},g'
+REPLACE_PYTHON= ${WRKSRC}/*.py
pre-patch:
${CP} ${FILESDIR}/run-prelude-correlator.c ${WRKSRC}
@@ -64,10 +54,8 @@ post-build:
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 --git a/security/prelude-correlator/PLIST b/security/prelude-correlator/PLIST
index 883b499aab2..1f600d7b046 100644
--- a/security/prelude-correlator/PLIST
+++ b/security/prelude-correlator/PLIST
@@ -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 --git a/security/prelude-correlator/distinfo b/security/prelude-correlator/distinfo
index 21e17fb5ab0..78f6382af69 100644
--- a/security/prelude-correlator/distinfo
+++ b/security/prelude-correlator/distinfo
@@ -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 --git a/security/prelude-correlator/patches/patch-aa b/security/prelude-correlator/patches/patch-aa
index a2352be720f..d00f3125ec9 100644
--- a/security/prelude-correlator/patches/patch-aa
+++ b/security/prelude-correlator/patches/patch-aa
@@ -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))
--PRELUDE_CORRELATOR_CONTEXT_DIR=$LOCALSTATEDIR/lib/prelude-correlator
-+PRELUDE_CORRELATOR_CONTEXT_DIR=$LOCALSTATEDIR/prelude-correlator
+ 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_CONFDIR=$SYSCONFDIR/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"]) ]
+
+ setup(
+ name="prelude-correlator",
diff --git a/security/prelude-correlator/patches/patch-ab b/security/prelude-correlator/patches/patch-ab
deleted file mode 100644
index 1027cb2121e..00000000000
--- a/security/prelude-correlator/patches/patch-ab
+++ /dev/null
@@ -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 --git a/security/prelude-correlator/patches/patch-ac b/security/prelude-correlator/patches/patch-ac
deleted file mode 100644
index e4af1054449..00000000000
--- a/security/prelude-correlator/patches/patch-ac
+++ /dev/null
@@ -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: