summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Seichter <github@seichter.de>2019-06-28 19:29:32 +0200
committerMichał Górny <mgorny@gentoo.org>2019-07-05 19:30:26 +0200
commitcc56e191d778f684fd3da1ae45c10e1ff3cd2f9e (patch)
tree32d29fd4c8e63ca3c9468266d89cd2794d36dfba /net-analyzer
parentapp-doc/pms: Remove old. (diff)
downloadgentoo-cc56e191d778f684fd3da1ae45c10e1ff3cd2f9e.tar.gz
gentoo-cc56e191d778f684fd3da1ae45c10e1ff3cd2f9e.tar.bz2
gentoo-cc56e191d778f684fd3da1ae45c10e1ff3cd2f9e.zip
net-analyzer/ossec-hids: Fix build issue, version bump
Added enewgroup to fix bug #688892. Updated to release 3.3.0. Closes: https://bugs.gentoo.org/688892 Signed-off-by: Ralph Seichter <gentoo@seichter.de> Package-Manager: Portage-2.3.66, Repoman-2.3.11 Closes: https://github.com/gentoo/gentoo/pull/12350 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ossec-hids/Manifest1
-rw-r--r--net-analyzer/ossec-hids/files/makefile-3.3.0.patch28
-rw-r--r--net-analyzer/ossec-hids/ossec-hids-3.3.0.ebuild67
3 files changed, 96 insertions, 0 deletions
diff --git a/net-analyzer/ossec-hids/Manifest b/net-analyzer/ossec-hids/Manifest
index 9fd4fe3f66d0..e33470f61e0b 100644
--- a/net-analyzer/ossec-hids/Manifest
+++ b/net-analyzer/ossec-hids/Manifest
@@ -1,2 +1,3 @@
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
+DIST ossec-hids-3.3.0.tar.gz 1900070 BLAKE2B a18a1e55ba44450c634b59099f10b674d27b2079ff456a034dc7bb4bbaf3c89b96f197515f3fb7aa54c248643f333e830a519b04cd4a9402cec2c32597fd96b2 SHA512 97c7e7b21ce88a3f1c89b79ff74b0c13804ba313cf3f30b98bcb4011f422ca050876e780c30624812d399d6b5c59629e52f6772b9ee0cd7cead1d66044dca627
diff --git a/net-analyzer/ossec-hids/files/makefile-3.3.0.patch b/net-analyzer/ossec-hids/files/makefile-3.3.0.patch
new file mode 100644
index 000000000000..810bc077d438
--- /dev/null
+++ b/net-analyzer/ossec-hids/files/makefile-3.3.0.patch
@@ -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.3.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.3.0.ebuild
new file mode 100644
index 000000000000..c9b83c7daa34
--- /dev/null
+++ b/net-analyzer/ossec-hids/ossec-hids-3.3.0.ebuild
@@ -0,0 +1,67 @@
+# 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="dev-libs/libpcre2
+ 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() {
+ enewgroup ossec
+ enewuser ossec -1 -1 /var/ossec 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=(
+ PCRE2_SYSTEM=yes
+ 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}
+ newenvd - 50ossec-hids <<<'CONFIG_PROTECT="/var/ossec/etc"'
+ emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install
+}