net-analyzer/ossec-hids: upstream release 3.2.0.
authorRalph Seichter <github@seichter.de>
Sat, 9 Mar 2019 15:40:47 +0000 (16:40 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Sun, 10 Mar 2019 22:35:17 +0000 (23:35 +0100)
Extended JSON output support and more, see
https://github.com/ossec/ossec-hids/releases/tag/3.2.0
for the official release notes.

Signed-off-by: Ralph Seichter <gentoo@seichter.de>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/11320
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
net-analyzer/ossec-hids/Manifest
net-analyzer/ossec-hids/files/makefile-3.2.0.patch [new file with mode: 0644]
net-analyzer/ossec-hids/ossec-hids-3.2.0.ebuild [new file with mode: 0644]

index f36a96f0d3e36b5a6595943cb807345a72496f11..9fd4fe3f66d048bdfe3c7af9614b9dccb0abc1c9 100644 (file)
@@ -1 +1,2 @@
 DIST ossec-hids-3.1.0.tar.gz 1886469 BLAKE2B c175c8659a8b5d0d269a5cb6bf142276f29e6f676afc6029accf854d68299d71147ba65a667601e77c6db8ca49a29afa49534e5683369f420f6389059ae61fc3 SHA512 fe55f82ac354d9fcd767d8379a492279644308788535780bb029d46688c93f259771686462570137555b40082c6756daad44bbdd1ddc953ed0bb22b65c6cb566
+DIST ossec-hids-3.2.0.tar.gz 1896977 BLAKE2B d77cff3a3a72287ad2235f346c7d07cfdad83872d956f57877ed44ad21bb717e4b4ddcfd0e8b2ce45cb90160bb63a28a7d06bc6225b53cc5ed42f7a97c5a1765 SHA512 40b25b97c43a66b8a145914ab0badd9d4f7de7d2168aa7a49abdf778c620a4b533ce3de0883d26c4c39816cf78674a053788a57c5f9c38fbea7cd8b13a35d18f
diff --git a/net-analyzer/ossec-hids/files/makefile-3.2.0.patch b/net-analyzer/ossec-hids/files/makefile-3.2.0.patch
new file mode 100644 (file)
index 0000000..810bc07
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/Makefile 2019-03-09 16:33:13.465947636 +0100
++++ b/Makefile 2019-03-09 16:32:57.105946856 +0100
+@@ -370,7 +370,6 @@
+ install-server: install-server-generic
+ 
+ install-common: build
+-      ./init/adduser.sh ${OSSEC_USER} ${OSSEC_USER_MAIL} ${OSSEC_USER_REM} ${OSSEC_GROUP} ${PREFIX}
+       $(call INSTALL_CMD,0550,root,${OSSEC_GROUP}) -d ${PREFIX}/
+       $(call INSTALL_CMD,0750,${OSSEC_USER},${OSSEC_GROUP}) -d ${PREFIX}/logs
+       $(call INSTALL_CMD,0660,${OSSEC_USER},${OSSEC_GROUP}) /dev/null ${PREFIX}/logs/ossec.log
+@@ -1160,7 +1159,7 @@
+ #### test ##########
+ ####################
+ 
+-CFLAGS_TEST = -g -O0 --coverage
++CFLAGS_TEST = -g -O0
+ 
+ LDFLAGS_TEST = -lcheck -lm -pthread -lrt
+ 
+@@ -1171,7 +1170,7 @@
+ 
+ test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared
+ 
+-.PHONY: test run_tests build_tests test_valgrind test_coverage
++.PHONY: test run_tests build_tests test_valgrind
+ 
+ test: build_tests
+       ${MAKE} run_tests
diff --git a/net-analyzer/ossec-hids/ossec-hids-3.2.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.2.0.ebuild
new file mode 100644 (file)
index 0000000..417ebde
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user
+
+DESCRIPTION="Open Source Host-based Intrusion Detection System"
+HOMEPAGE="https://www.ossec.net/"
+SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="agent hybrid local mysql postgres server sqlite"
+REQUIRED_USE="^^ ( agent hybrid local server )
+       ?? ( mysql postgres )"
+
+DEPEND="mysql? ( virtual/mysql )
+       sqlite? ( dev-db/sqlite:3 )
+       postgres? ( dev-db/postgresql:= )"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${P}/src"
+PATCHES=( "${FILESDIR}/makefile-${PV}.patch" )
+
+declare -a MY_OPT
+
+pkg_setup() {
+       enewuser ossec -1 -1 /var/ossec
+       enewuser ossecm -1 -1 -1 ossec
+       enewuser ossecr -1 -1 -1 ossec
+}
+
+src_configure() {
+       local target="local"
+       use agent && target="agent"
+       use hybrid && target="hybrid"
+       use server && target="server"
+       MY_OPT=(
+               TARGET=${target}
+               USE_SQLITE=$(usex sqlite)
+               V=0
+               ZLIB_SYSTEM=yes
+       )
+       use mysql && MY_OPT+=( DATABASE=mysql )
+       use postgres && MY_OPT+=( DATABASE=pgsql )
+}
+
+src_compile() {
+       emake "${MY_OPT[@]}" PREFIX=/var/ossec
+}
+
+src_test() {
+       emake "${MY_OPT[@]}" PREFIX=/var/ossec test
+}
+
+src_install() {
+       keepdir /var/ossec/logs/{alerts,archives,firewall}
+       keepdir /var/ossec/lua/{compiled,native}
+       keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck}
+       keepdir /var/ossec/{.ssh,stats,tmp,var/run}
+       emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install
+}