summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmish2020-04-23 19:51:19 +0530
committerAmish2020-04-23 19:51:19 +0530
commit2958eb440d1852ac8ef3e09aad66df3991ff66df (patch)
treec9e31f45d86e43d4fccd224726d7af73905361d4
parent057779e02b5a9465f6a87e2bb536a11d4011ccee (diff)
downloadaur-2958eb440d1852ac8ef3e09aad66df3991ff66df.tar.gz
Provide a systemd.service file
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD6
-rw-r--r--barnyard2.service10
3 files changed, 38 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f05553b5079..b828198e667 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,34 @@
pkgbase = barnyard2
pkgdesc = A dedicated spooler for Snort's unified2 binary output format.
pkgver = 1.13
- pkgrel = 1
+ pkgrel = 2
url = http://www.github.com/firnsy/barnyard2
arch = i686
arch = x86_64
license = GPL
depends = libpcap
- depends = libmariadbclient
- source = https://github.com/firnsy/barnyard2/archive/v2-1.13.tar.gz
- md5sums = 212066058364f18a4806720b271ffd87
+ depends = mariadb-libs
+ depends = postgresql-libs
+ optdepends = snort: for snort unified2 processing
+ provides = barnyard2
+ conflicts = barnyard2-git
+ backup = etc/barnyard2/barnyard2.conf
+ source = barnyard2-1.13.tar.gz::https://github.com/firnsy/barnyard2/archive/v2-1.13.tar.gz
+ source = barnyard2.service
+ source = barnyard2-1.13-free.patch
+ source = barnyard2-1.13-libdir.patch
+ source = barnyard2-1.13-my_bool.patch
+ source = barnyard2-1.13-odbc.patch
+ source = barnyard2-1.13-Werror.patch
+ source = barnyard2-1.13-pcap-1.9.0.patch
+ sha256sums = b9e67f22334b937a59cf808ca20bdcd9c46561a4369979c965a0bb554d7dd09b
+ sha256sums = bea8a4075f2990f092db241d0586a81af71fe1ffdcb1434e49a60165e744418c
+ sha256sums = c6f7be740df98017bcd9f79cf703e493a201adcfbfd45a371cd9b6e0f177fc6b
+ sha256sums = c8ac95cc45a17d548a6331100d3ab26543278ea051a1f7f5f77db025ebd4417f
+ sha256sums = 3fcae69a0e9b49a00d65557a35108b271c8890a7019b87b5f608fbafed2d54fb
+ sha256sums = 3775bcffeaf9588a76006f275ade170b6f87147699fb50e75d2b9b07c8d139a5
+ sha256sums = 3600ad80f463e58a14b66cc9e4d1262853555f74e0bc876b82aaf8b7a567e4e4
+ sha256sums = 3bb6b787c4c66a67307ead1b91ba1ef99940894f825948402cfd6e0d50b893c1
pkgname = barnyard2
diff --git a/PKGBUILD b/PKGBUILD
index 6c0d2174665..ac11a07fc64 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,16 +2,18 @@
# Contributor: skogler
pkgname=barnyard2
pkgver=1.13
-pkgrel=1
+pkgrel=2
pkgdesc="A dedicated spooler for Snort's unified2 binary output format."
arch=('i686' 'x86_64')
url="http://www.github.com/firnsy/barnyard2"
license=('GPL')
depends=('libpcap' 'mariadb-libs' 'postgresql-libs')
+optdepends=('snort: for snort unified2 processing')
provides=('barnyard2')
conflicts=('barnyard2-git')
backup=('etc/barnyard2/barnyard2.conf')
source=("barnyard2-$pkgver.tar.gz::https://github.com/firnsy/$pkgname/archive/v2-$pkgver.tar.gz"
+ 'barnyard2.service'
'barnyard2-1.13-free.patch'
'barnyard2-1.13-libdir.patch'
'barnyard2-1.13-my_bool.patch'
@@ -19,6 +21,7 @@ source=("barnyard2-$pkgver.tar.gz::https://github.com/firnsy/$pkgname/archive/v2
'barnyard2-1.13-Werror.patch'
'barnyard2-1.13-pcap-1.9.0.patch')
sha256sums=('b9e67f22334b937a59cf808ca20bdcd9c46561a4369979c965a0bb554d7dd09b'
+ 'bea8a4075f2990f092db241d0586a81af71fe1ffdcb1434e49a60165e744418c'
'c6f7be740df98017bcd9f79cf703e493a201adcfbfd45a371cd9b6e0f177fc6b'
'c8ac95cc45a17d548a6331100d3ab26543278ea051a1f7f5f77db025ebd4417f'
'3fcae69a0e9b49a00d65557a35108b271c8890a7019b87b5f608fbafed2d54fb'
@@ -62,6 +65,7 @@ package() {
install -D -m644 -t "${pkgdir}"/usr/share/doc/barnyard2 doc/README*
install -D -m644 -t "${pkgdir}"/usr/share/doc/barnyard2/schemas schemas/create_* schemas/SCHEMA_ACCESS
+ install -D -m644 -t "${pkgdir}"/usr/lib/systemd/system "${srcdir}"/barnyard2.service
echo "d /var/log/barnyard2 0750" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
install -D -m644 /dev/stdin "${pkgdir}"/etc/logrotate.d/barnyard2 << 'EOF'
/var/log/barnyard2/*.log {
diff --git a/barnyard2.service b/barnyard2.service
new file mode 100644
index 00000000000..4ca75f3427e
--- /dev/null
+++ b/barnyard2.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Barnyard2 snort unified2 log processor
+After=snort.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/barnyard2 -c /etc/barnyard2/barnyard2.conf -d /var/log/snort -a /var/log/snort/old -f snort_unified.log -l /var/log/barnyard2 -w /var/log/barnyard2/barnyard2.waldo
+
+[Install]
+WantedBy=multi-user.target