aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsyslog/APKBUILD
blob: 68f2452b4875e757b27fb7d1db6d937ef748e3d8 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# Contributor: Francisco Guerreiro <francisg@fnop.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Cameron Banta <cbanta@gmail.com>
# Contributor: Ashley Sommer <ashleysommer@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=rsyslog
pkgver=8.1910.0
pkgrel=0
pkgdesc="Enhanced multi-threaded syslogd with database support and more."
url="https://www.rsyslog.com/"
arch="all !s390x" # limited by czmq
license="Apache-2.0 GPL-3.0-or-later LGPL-3.0-or-later"
options="!check"
makedepends="
	curl-dev
	czmq-dev
	gnutls-dev
	hiredis-dev
	krb5-dev
	libdbi-dev
	libestr-dev
	libfastjson-dev
	libgcrypt-dev
	liblogging-dev
	liblognorm-dev
	libmaxminddb-dev
	libnet-dev
	linux-headers
	librelp-dev
	mariadb-connector-c-dev
	net-snmp-dev
	postgresql-dev
	py-docutils
	rabbitmq-c-dev
	util-linux-dev
	zlib-dev
	"
install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
source="https://www.rsyslog.com/files/download/rsyslog/rsyslog-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.logrotate
	$pkgname.conf
	musl-fix.patch
	queue.patch
	"

# <subpackage>[:<module>...]
_plugins="
	crypto:lmcry_gcry
	elasticsearch:omelasticsearch
	gssapi:lmgssutil:imgssapi:omgssapi
	hiredis:omhiredis
	http:omhttp:fmhttp
	libdbi:omlibdbi
	mmanon
	mmaudit
	mmcount
	mmdblookup
	mmfields
	mmjsonparse
	mmnormalize
	mmpstrucdata
	mmrm1stspace
	mmsequence
	mmsnmptrapd
	mmutf8fix
	mysql:ommysql
	pgsql:ompgsql
	pmaixforwardedfrom
	pmlastmsg
	pmsnare
	rabbitmq:omrabbitmq
	relp:imrelp:omrelp
	snmp:omsnmp
	testing:omtesting
	tls:lmnsd_gtls
	udpspoof:omudpspoof
	uxsock:omuxsock
	zmq:imczmq:omczmq
	"
for _i in $_plugins; do
	subpackages="$subpackages $pkgname-${_i%%:*}:_plugin"
done

# secfixes:
#   8.1908.0-r1:
#     - CVE-2019-17040
#     - CVE-2019-17041
#     - CVE-2019-17042

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		\
		--disable-rfc3195 \
		--enable-largefile \
		--enable-gssapi-krb5 \
		--enable-mysql \
		--enable-pgsql \
		--enable-libdbi \
		--enable-snmp \
		--enable-elasticsearch \
		--enable-omhttp \
		--enable-gnutls \
		--enable-mail \
		--enable-imdiag \
		--enable-mmnormalize \
		--enable-mmjsonparse \
		--enable-mmaudit \
		--enable-mmanon \
		--enable-mmrm1stspace \
		--enable-mmutf8fix \
		--enable-mmcount \
		--enable-mmsequence \
		--enable-mmdblookup \
		--enable-mmfields \
		--enable-mmpstrucdata \
		--enable-relp \
		--enable-imfile \
		--enable-imptcp \
		--enable-impstats \
		--enable-omprog \
		--enable-omudpspoof \
		--enable-omstdout \
		--enable-pmlastmsg \
		--enable-pmaixforwardedfrom \
		--enable-pmsnare \
		--enable-omuxsock \
		--enable-mmsnmptrapd \
		--enable-omrabbitmq \
		--enable-imczmq \
		--enable-omczmq \
		--enable-omhiredis
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	# Remove lib that is used only for testing.
	rm -f "$pkgdir"/usr/lib/rsyslog/imdiag.so

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf

	install -m700 -d "$pkgdir"/var/lib/rsyslog
}

_plugin() {
	local name="${subpkgname#$pkgname-}"
	pkgdesc="$name support for $pkgname"
	depends="$pkgname=$pkgver-r$pkgrel"

	local libnames=$(printf '%s\n' $_plugins | grep "^$name:" | cut -d: -f2- | tr : ' ')
	local libname

	for libname in ${libnames:-$name}; do
		mkdir -p "$subpkgdir"/usr/lib/rsyslog/
		mv "$pkgdir"/usr/lib/rsyslog/$libname.so "$subpkgdir"/usr/lib/rsyslog/
	done

	# Allow people to find plugins by their full name (including prefix;
	# mm, om, im, ...).
	for libname in $libnames; do
		provides="$provides $pkgname-$libname=$pkgver-r$pkgrel"
	done
}

sha512sums="85f5df91a6357ecb38708b4d569d26804a50ca28c928a636ac7749595f1a7105c3450fbd521835a436ebdfdcac33a33986e09a09026745ea4d1a2897406770d5  rsyslog-8.1910.0.tar.gz
bcd63c8df2ac63b80f3cb51ba7f544988df6cd875f4e81020e762dff30d7537f21b72c95a4b1c08baf15f4ed5f03defbf3f061673aabada5841f45ab9f579374  rsyslog.initd
b5cbdcfa601ae8e7617289e7805fe71daa17bd03a7a30e1e1aad7a58a4ad4c1d89c9a203228f15816232ab6ab6d7a2752f7bbf4d259bbd5eccbe9728dc7e8aaa  rsyslog.logrotate
9c9913b3367ac4d0b0f998ffa3aaaf136cf939ed4275f13f79d4c7336d0978007af13cb2c6f35d17ef25a53907fb064705f23c3b3a6a6fcd06ae85c3c51c7e38  rsyslog.conf
ce686b9529cdc74bd633a6fce169c1fdacf5266b4ca6fc731f8cea08080a1106f93dc048af9966cab09947100890170197c59d3f880992001a8ddfd084ffe2aa  musl-fix.patch
ef2e000b1c42cb5beffb26393952c2a692791e78972ee4b6f187ca53e338122b2004cc5216381c042195f12cc58f37f186a04e12a65b5bdfdcdf76b73393efb7  queue.patch"