summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2019-02-07 16:26:06 -0500
committerBrian Evans <grknight@gentoo.org>2019-02-07 16:26:06 -0500
commit11bf36377f51303256cc2b4d363b147dfda80bea (patch)
tree934a03b83b2155db223c3f5930a68f676b60a438
parentapp-crypt/dieharder: fix random on 64bit (diff)
downloadgentoo-11bf36377f51303256cc2b4d363b147dfda80bea.tar.gz
gentoo-11bf36377f51303256cc2b4d363b147dfda80bea.tar.bz2
gentoo-11bf36377f51303256cc2b4d363b147dfda80bea.zip
app-admin/sagan: Fix mysql dependencies
Bug: https://bugs.gentoo.org/665814 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r--app-admin/sagan/files/mysql_check.patch4
-rw-r--r--app-admin/sagan/sagan-0.2.3-r1.ebuild85
-rw-r--r--app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild94
3 files changed, 181 insertions, 2 deletions
diff --git a/app-admin/sagan/files/mysql_check.patch b/app-admin/sagan/files/mysql_check.patch
index d2247aab571e..37f7d61fa0c8 100644
--- a/app-admin/sagan/files/mysql_check.patch
+++ b/app-admin/sagan/files/mysql_check.patch
@@ -16,8 +16,8 @@ rename to configure.ac
- AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!
-If you're not interested in MySQL support use the --disable-mysql flag.))
- fi
-+ LIBS=$(mysql_config --libs_r)
-+ AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!))
++ LIBS=$(mysql_config --libs)
++ AC_CHECK_LIB(mysqlclient, main,,AC_MSG_ERROR(The MySQL library libmysqlclient is missing!))
+fi
+LIBS="$save_LIBS $LIBS"
+
diff --git a/app-admin/sagan/sagan-0.2.3-r1.ebuild b/app-admin/sagan/sagan-0.2.3-r1.ebuild
new file mode 100644
index 000000000000..99142b741816
--- /dev/null
+++ b/app-admin/sagan/sagan-0.2.3-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils user
+
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system"
+HOMEPAGE="http://sagan.quadrantsec.com/"
+SRC_URI="http://sagan.quadrantsec.com/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+libdnet +lognorm mysql +pcap postgres smtp snort"
+
+RDEPEND="dev-libs/libpcre
+ app-admin/sagan-rules[lognorm?]
+ smtp? ( net-libs/libesmtp )
+ pcap? ( net-libs/libpcap )
+ mysql? ( dev-db/mysql-connector-c:= )
+ postgres? ( dev-db/postgresql:* )
+ lognorm? ( dev-libs/liblognorm )
+ libdnet? ( dev-libs/libdnet )
+ snort? ( >=net-analyzer/snortsam-2.50 )
+ "
+
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL README NEWS TODO )
+PATCHES=( "${FILESDIR}"/mysql_check.patch )
+
+pkg_setup() {
+ enewgroup sagan
+ enewuser sagan -1 -1 /dev/null sagan
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable mysql)
+ $(use_enable postgres postgresql)
+ $(use_enable smtp esmtp)
+ $(use_enable lognorm)
+ $(use_enable libdnet)
+ $(use_enable pcap libpcap)
+ $(use_enable snort snortsam)
+ --disable-prelude
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ diropts -g sagan -o sagan -m 775
+
+ dodir /var/log/sagan
+
+ keepdir /var/log/sagan
+
+ touch "${ED}"/var/log/sagan/sagan.log
+ chown sagan.sagan "${ED}"/var/log/sagan/sagan.log
+
+ newinitd "${FILESDIR}"/sagan.init sagan
+ newconfd "${FILESDIR}"/sagan.confd sagan
+
+ insinto /usr/share/doc/${PF}/examples
+ doins -r extra/*
+}
+
+pkg_postinst() {
+ if use smtp; then
+ ewarn "You have enabled smtp use flag. If you plan on using Sagan with"
+ ewarn "email, create valid writable home directory for user 'sagan'"
+ ewarn "For security reasons it was created with /dev/null home directory"
+ fi
+
+ einfo "For configuration assistance see"
+ einfo "http://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO"
+}
diff --git a/app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild b/app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild
new file mode 100644
index 000000000000..4156492fe77b
--- /dev/null
+++ b/app-admin/sagan/sagan-1.0.0_rc3-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils user
+
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system"
+HOMEPAGE="http://sagan.quadrantsec.com/"
+SRC_URI="http://sagan.quadrantsec.com/download/sagan-1.0.0RC3.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="geoip +libdnet +lognorm mysql +pcap smtp snort"
+
+RDEPEND="dev-libs/libpcre
+ app-admin/sagan-rules[lognorm?]
+ smtp? ( net-libs/libesmtp )
+ pcap? ( net-libs/libpcap )
+ lognorm? (
+ dev-libs/liblognorm
+ dev-libs/json-c:=
+ dev-libs/libee
+ dev-libs/libestr
+ )
+ libdnet? ( dev-libs/libdnet )
+ snort? ( >=net-analyzer/snortsam-2.50 )
+ geoip? ( dev-libs/geoip )
+ "
+
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+# Package no longer logs directly to a database
+# and relies on Unified2 format to accomplish it
+RDEPEND="${RDEPEND} mysql? ( net-analyzer/barnyard2[mysql] )"
+
+REQUIRED_USE="mysql? ( libdnet )"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL README NEWS TODO )
+PATCHES=( "${FILESDIR}"/${PN}-1.0.0-liblognorm-json-c.patch )
+S="${WORKDIR}/sagan-1.0.0RC3/"
+
+pkg_setup() {
+ enewgroup sagan
+ enewuser sagan -1 -1 /dev/null sagan
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable smtp esmtp)
+ $(use_enable lognorm)
+ $(use_enable libdnet)
+ $(use_enable pcap libpcap)
+ $(use_enable snort snortsam)
+ $(use_enable geoip)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ diropts -g sagan -o sagan -m 775
+
+ dodir /var/log/sagan
+
+ keepdir /var/log/sagan
+
+ touch "${ED}"/var/log/sagan/sagan.log
+ chown sagan.sagan "${ED}"/var/log/sagan/sagan.log
+
+ newinitd "${FILESDIR}"/sagan.init-r1 sagan
+ newconfd "${FILESDIR}"/sagan.confd sagan
+
+ insinto /usr/share/doc/${PF}/examples
+ doins -r extra/*
+}
+
+pkg_postinst() {
+ if use smtp; then
+ ewarn "You have enabled smtp use flag. If you plan on using Sagan with"
+ ewarn "email, create valid writable home directory for user 'sagan'"
+ ewarn "For security reasons it was created with /dev/null home directory"
+ fi
+
+ einfo "For configuration assistance see"
+ einfo "http://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO"
+}