blob: 95cea2d45754f2e07f58a98191fe8deae1cd214c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer: Wolfgang Gehrhardt <gehwolf at freenet dot de>
pkgname=elos
pkgver=0.56.5
pkgrel=1
pkgdesc="An event logging system"
arch=('x86_64')
url="https://github.com/Elektrobit/elos"
license=('MIT')
depends=('glibc' 'safu' 'samconf' 'libmnl' 'sqlite' 'json-c')
makedepends=('cmake' 'jq')
install='elos.install'
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgname-$pkgver.tar.gz")
backup=('etc/elos/elosd.json')
build() {
cd "$pkgname-$pkgname-$pkgver"
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DELOS_BUILD_DEFAULTS=off \
-DINSTALL_UNIT_TESTS=off \
-DELOS_DAEMON=on \
-DELOS_TOOLS=on \
-DELOS_PLUGINS=on \
.
make -C build
}
_editConfig() {
_CONFIG=$(jq "$1" "$pkgdir/etc/elos/elosd.json")
echo "${_CONFIG}" > "$pkgdir/etc/elos/elosd.json"
}
package() {
cd "$pkgname-$pkgname-$pkgver"
make -C build DESTDIR="$pkgdir/" install
install -Dm644 'LICENSE' "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 'src/components/config/elosd.json' "$pkgdir/etc/elos/elosd.json"
# No need to override plugin search path, use compile default /usr/lib/elos/
_editConfig 'del(.root.elos.ClientInputs.PluginSearchPath)'
_editConfig 'del(.root.elos.EventLogging.PluginSearchPath)'
_editConfig 'del(.root.elos.Scanner.Path)'
# Don't need demo dummy storage backend
_editConfig 'del(.root.elos.EventLogging.Plugins.Dummy)'
# Don't need DLT storage backend
_editConfig 'del(.root.elos.EventLogging.Plugins.DLT)'
# log everything with json backend
_editConfig '.root.elos.EventLogging.Plugins.JsonBackend.Filter = ["1 1 EQ"]'
# Set log storage path
_editConfig '.root.elos.EventLogging.Plugins.JsonBackend.Config.StoragePath = "/var/log/elos/elos.json"'
# Default log level is Debug , reduce verbosity
_editConfig '.root.elos.LogLevel = "ERROR"'
# set default syslog mapping rule
_editConfig '.root.elos.Scanner.SyslogScanner.MappingRules.MessageCodes = {"1003":"1 1 EQ"}'
# elos currently can't forward syslog messages on the syslog socket, thus
# don't acquire /dev/log to not conflict with other syslog daemons
_editConfig '.root.elos.Scanner.SyslogScanner.SyslogPath = "/run/elos/dev-log"'
}
md5sums=('0ad4c40c75ce58f44e154259dbe5e1af')
|