summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLászló Várady2019-03-16 12:37:57 +0100
committerLászló Várady2019-03-16 12:51:09 +0100
commit7ae963b15c5053c1d1fb3bdf5fd50cfe4f5a21f3 (patch)
tree37c555e2c0479bd391b33e672bf7ce71277b367d
downloadaur-7ae963b15c5053c1d1fb3bdf5fd50cfe4f5a21f3.tar.gz
Initial commit
-rw-r--r--.SRCINFO65
-rw-r--r--PKGBUILD74
-rw-r--r--syslog-ng.logrotate7
3 files changed, 146 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1b601241bfac
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,65 @@
+pkgbase = syslog-ng-git
+ pkgdesc = Enhanced system logging daemon
+ pkgver = 3.20.1.r173.gb21d85690
+ pkgrel = 1
+ url = https://www.syslog-ng.com/products/open-source-log-management/
+ arch = x86_64
+ license = GPL2
+ license = LGPL2.1
+ checkdepends = criterion
+ checkdepends = python-nose
+ checkdepends = python-pylint
+ checkdepends = python-ply
+ checkdepends = python-pep8
+ makedepends = git
+ makedepends = autoconf-archive
+ makedepends = libxslt
+ makedepends = docbook-xsl
+ makedepends = json-c
+ makedepends = curl
+ makedepends = libdbi
+ makedepends = libesmtp
+ makedepends = hiredis
+ makedepends = librabbitmq-c
+ makedepends = riemann-c-client
+ makedepends = geoip
+ makedepends = libmaxminddb
+ makedepends = mongo-c-driver
+ makedepends = java-environment=8
+ makedepends = gradle
+ makedepends = python
+ depends = systemd-libs
+ depends = awk
+ depends = glib2
+ depends = ivykis
+ depends = json-c
+ depends = curl
+ depends = libnet
+ optdepends = logrotate: for rotating log files
+ optdepends = json-c: for the JSON plugin
+ optdepends = curl: for the HTTP plugin
+ optdepends = libdbi: for the SQL plugin
+ optdepends = libesmtp: for the SMTP plugin
+ optdepends = hiredis: for the Redis plugin
+ optdepends = librabbitmq-c: for the AMQP plugin
+ optdepends = riemann-c-client: for the Riemann plugin
+ optdepends = geoip: for the GeoIP plugin
+ optdepends = libmaxminddb: for the GeoIP2 plugin
+ optdepends = mongo-c-driver: for the MongoDB plugin
+ optdepends = java-runtime-headless: for Java-based plugins
+ optdepends = python: for Python-based plugins
+ provides = syslog-ng
+ conflicts = syslog-ng
+ conflicts = eventlog
+ replaces = eventlog
+ backup = etc/syslog-ng/scl.conf
+ backup = etc/syslog-ng/syslog-ng.conf
+ backup = etc/logrotate.d/syslog-ng
+ backup = etc/default/syslog-ng@default
+ source = syslog-ng::git+https://github.com/balabit/syslog-ng.git
+ source = syslog-ng.logrotate
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = syslog-ng-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..818338b98dac
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,74 @@
+# Maintainer: László Várady <laszlo.varady93@gmail.com>
+# Contributor: Eric Bélanger <eric@archlinux.org>
+
+pkgname=syslog-ng-git
+_pkgname=syslog-ng
+pkgver=3.20.1.r173.gb21d85690
+pkgrel=1
+pkgdesc="Enhanced system logging daemon"
+arch=('x86_64')
+url="https://www.syslog-ng.com/products/open-source-log-management/"
+license=('GPL2' 'LGPL2.1')
+depends=('systemd-libs' 'awk' 'glib2' 'ivykis' 'json-c' 'curl' 'libnet')
+makedepends=('git' 'autoconf-archive' 'libxslt' 'docbook-xsl' 'json-c' 'curl' 'libdbi' 'libesmtp'
+ 'hiredis' 'librabbitmq-c' 'riemann-c-client' 'geoip' 'libmaxminddb' 'mongo-c-driver'
+ 'java-environment=8' 'gradle' 'python')
+checkdepends=('criterion' 'python-nose' 'python-pylint' 'python-ply' 'python-pep8')
+optdepends=('logrotate: for rotating log files'
+ 'json-c: for the JSON plugin'
+ 'curl: for the HTTP plugin'
+ 'libdbi: for the SQL plugin'
+ 'libesmtp: for the SMTP plugin'
+ 'hiredis: for the Redis plugin'
+ 'librabbitmq-c: for the AMQP plugin'
+ 'riemann-c-client: for the Riemann plugin'
+ 'geoip: for the GeoIP plugin'
+ 'libmaxminddb: for the GeoIP2 plugin'
+ 'mongo-c-driver: for the MongoDB plugin'
+ 'java-runtime-headless: for Java-based plugins'
+ 'python: for Python-based plugins')
+provides=("$_pkgname")
+conflicts=("$_pkgname" 'eventlog')
+replaces=('eventlog')
+backup=('etc/syslog-ng/scl.conf'
+ 'etc/syslog-ng/syslog-ng.conf'
+ 'etc/logrotate.d/syslog-ng'
+ 'etc/default/syslog-ng@default')
+source=("$_pkgname::git+https://github.com/balabit/syslog-ng.git"
+ 'syslog-ng.logrotate')
+sha256sums=('SKIP' 'SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ printf "%s" "$(git describe --long --tags --match "syslog-ng-*" \
+ | sed 's/^syslog-ng-//; s/\([^-]*-g\)/r\1/; s/-/./g')"
+}
+
+prepare() {
+ cd "$_pkgname"
+ sed -i -e 's,/bin/,/usr/bin/,' -e 's,/sbin/,/bin/,' contrib/systemd/syslog-ng@.service
+ sed -i -e 's|etc|etc/syslog-ng|g' -e 's|/var/run|/run|g' contrib/systemd/syslog-ng@default
+}
+
+build() {
+ cd "$_pkgname"
+ skip_submodules=1 ./autogen.sh
+ ./configure --prefix=/usr --sysconfdir=/etc/syslog-ng --libexecdir=/usr/lib \
+ --sbindir=/usr/bin --localstatedir=/var/lib/syslog-ng --datadir=/usr/share \
+ --with-pidfile-dir=/run --with-jsonc=system --with-ivykis=system \
+ --enable-all-modules --enable-ipv6 --enable-pacct --enable-manpages \
+ --enable-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system
+ make
+}
+
+check() {
+ cd "$_pkgname"
+ make --keep-going check || /usr/bin/true
+}
+
+package() {
+ make -C $_pkgname DESTDIR="$pkgdir/" install
+ install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
+ install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
+ install -Dm644 "$srcdir/$_pkgname/contrib/systemd/syslog-ng@default" -t "$pkgdir/etc/default"
+}
diff --git a/syslog-ng.logrotate b/syslog-ng.logrotate
new file mode 100644
index 000000000000..3509f29702fc
--- /dev/null
+++ b/syslog-ng.logrotate
@@ -0,0 +1,7 @@
+/var/log/messages.log /var/log/auth.log /var/log/mail.log /var/log/kernel.log /var/log/errors.log /var/log/daemon.log /var/log/user.log /var/log/iptables.log /var/log/everything.log /var/log/syslog.log /var/log/acpid.log /var/log/crond.log /var/log/lpr.log /var/log/uucp.log /var/log/news.log /var/log/ppp.log /var/log/debug.log {
+ missingok
+ sharedscripts
+ postrotate
+ /bin/kill -HUP $(cat /run/syslog-ng.pid 2>/dev/null) 2>/dev/null || true
+ endscript
+}