summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-07-29 14:42:12 +0200
committerJeroen Roovers <jer@gentoo.org>2020-07-29 14:52:54 +0200
commitcc52b1b632c5369cad5a9e8287cf3d0a62faa375 (patch)
treebb3decdeb092606f9a337ab6a4ebde6744b5228a /net-analyzer/barnyard
parentprofiles: Drop obsolete net-irc/quasselgrep mask (diff)
downloadgentoo-cc52b1b632c5369cad5a9e8287cf3d0a62faa375.tar.gz
gentoo-cc52b1b632c5369cad5a9e8287cf3d0a62faa375.tar.bz2
gentoo-cc52b1b632c5369cad5a9e8287cf3d0a62faa375.zip
net-analyzer/barnyard: Fix previous EAPI=7 porting/improvement
- Clean up patches - Add FILESDIR stored patch to the patchset - Apply patchset unconditionally - Store patchset at a specific URI - Set AR (patch, tc-export) Package-Manager: Portage-3.0.1, Repoman-2.3.23 Bug: https://bugs.gentoo.org/663906 Closes: https://bugs.gentoo.org/734550 Fixes: cc4aa450aa077fb503990d986c840469df42ec06 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer/barnyard')
-rw-r--r--net-analyzer/barnyard/Manifest1
-rw-r--r--net-analyzer/barnyard/barnyard-0.2.0-r6.ebuild93
2 files changed, 94 insertions, 0 deletions
diff --git a/net-analyzer/barnyard/Manifest b/net-analyzer/barnyard/Manifest
index c81bf30f726e..ad150713fd81 100644
--- a/net-analyzer/barnyard/Manifest
+++ b/net-analyzer/barnyard/Manifest
@@ -1,2 +1,3 @@
DIST barnyard-0.2.0-patches.tar.bz2 12911 BLAKE2B 06215ec8cc8c2fb7ff8e57cfd2f02456180263778722001442faf8f32445fc7fa7fc0da5d00644dbf239949d5e02dd76025428c14c6c1bae8b6565ddf6edf08a SHA512 e8e5243d49b71dd76e3274e27116f99ea6c674983cb18499889c9d27a83740a6b17aa6d30c8a9acdb46103da8314679f4eba8bf1cd252d7fb6b8a34afac46b21
+DIST barnyard-0.2.0-patches.tar.xz 13152 BLAKE2B d68aa5298938e50bb1102628cd8ebc0fae55c12fd4094e86306a86aeab3786a096906e4b0612b3dbb0a2de6a8aeba8161fdcfccf3a6915f5492401892eaa8b57 SHA512 9ff4f45e12d12a6b33f22f32be5f258cc9352a53c91d4415c292231ee5e5b03d58ed988011df5d3f13ac0046dd02ff36e0f92b4b0044181f695856118bb9228a
DIST barnyard-0.2.0.tar.gz 161543 BLAKE2B 07f5fa6b2e01e1b421ea772b8ea0c72b6c8f66569caf176a57d3f4fce438c2dd4b2a8a61dddc4faf27c85b15d002205f1cc3627fe88d523fd25d716cc78747e7 SHA512 73424acf2e0c620b2f8f2f407d74812f7740234ce523e37557273998108c131311fffb16cfc2cea0f652d6b21072431081bad35b045f5654e2245786d27568e6
diff --git a/net-analyzer/barnyard/barnyard-0.2.0-r6.ebuild b/net-analyzer/barnyard/barnyard-0.2.0-r6.ebuild
new file mode 100644
index 000000000000..4658d4eb7c65
--- /dev/null
+++ b/net-analyzer/barnyard/barnyard-0.2.0-r6.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Fast output system for Snort"
+HOMEPAGE="https://sourceforge.net/projects/barnyard"
+SRC_URI="
+ mirror://sourceforge/barnyard/barnyard-${PV/_/-}.tar.gz
+ https://dev.gentoo.org/~jer/${P}-patches.tar.xz
+"
+
+SLOT="0"
+LICENSE="QPL GPL-2"
+KEYWORDS="~amd64 -sparc ~x86"
+IUSE="mysql postgres sguil"
+
+DEPEND="
+ net-libs/libpcap
+ mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql:*[server] )
+ sguil? ( dev-lang/tcl:0 )
+"
+RDEPEND="
+ ${DEPEND}
+ net-analyzer/snort
+"
+
+S=${WORKDIR}/${P/_/-}
+
+DOCS="AUTHORS README docs/*"
+PATCHES=(
+ "${WORKDIR}"/${P}-64bit.patch
+ "${WORKDIR}"/${P}-canonical-ar.patch
+ "${WORKDIR}"/${P}-configure-in.patch
+ "${WORKDIR}"/${P}-op_plugbase.c.patch
+ "${WORKDIR}"/${P}-sguil_files.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export AR
+
+ econf \
+ $(use_enable mysql) \
+ $(use_enable postgres) \
+ $(use_enable sguil tcl) \
+ --sysconfdir=/etc/snort
+}
+
+src_install() {
+ default
+
+ keepdir /var/log/snort
+ keepdir /var/log/snort/archive
+
+ insinto /etc/snort
+ newins etc/barnyard.conf barnyard.conf
+ newconfd "${FILESDIR}"/barnyard.confd barnyard
+ newinitd "${FILESDIR}"/barnyard.rc6 barnyard
+
+ if use sguil ; then
+ sed -i -e "/config hostname:/s%snorthost%$(hostname)%" \
+ -e "/config interface/s:fxp0:eth0:" \
+ -e "s:output alert_fast:#output alert_fast:" \
+ -e "s:output log_dump:#output log_dump:" \
+ "${D}/etc/snort/barnyard.conf" || die "sed failed"
+
+ sed -i -e s:/var/log/snort:/var/lib/sguil/$(hostname): \
+ -e s:/var/run/barnyard.pid:/var/run/sguil/barnyard.pid: \
+ "${D}/etc/conf.d/barnyard" || die "sed failed"
+
+ sed -i -e "/start-stop-daemon --start/s:--exec:-c sguil --exec:" \
+ "${D}/etc/init.d/barnyard" || die "sed failed"
+ fi
+}
+
+pkg_postinst() {
+ if use sguil ; then
+ elog
+ elog "Make sure to edit /etc/snort/barnyard.conf and uncomment the"
+ elog "sguil section along with supplying the appropriate database"
+ elog "information."
+ elog
+ fi
+}