aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsyslog/APKBUILD
blob: 951e275384bed0b3dadc32578453b7fe1ac33306 (plain) (blame)
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
186
187
188
189
190
191
192
193
194
195
# 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.2006.0
pkgrel=1
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="
	autoconf
	automake
	byacc
	curl-dev
	czmq-dev
	flex
	gnutls-dev
	hiredis-dev
	krb5-dev
	libdbi-dev
	libestr-dev
	libfastjson-dev
	libgcrypt-dev
	liblogging-dev
	liblognorm-dev
	libmaxminddb-dev
	libnet-dev
	librelp-dev
	libtool
	linux-headers
	mariadb-connector-c-dev
	net-snmp-dev
	postgresql-dev
	py3-docutils
	rabbitmq-c-dev
	util-linux-dev
	zlib-dev
	"
install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rsyslog/rsyslog/archive/v$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
	imdocker
	clickhouse:omclickhouse
	"
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

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./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-clickhouse \
		--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 \
		--enable-imdocker
	make
}

package() {
	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="33d4d9d729d690803e2b02106d7e0f930be78c10fb6c7d05ded739472b5534d5ea66c870b2b7bd348ff107eced68b3d4e34ed53779eadfaf8456cac1d81373b3  rsyslog-8.2006.0.tar.gz
bcd63c8df2ac63b80f3cb51ba7f544988df6cd875f4e81020e762dff30d7537f21b72c95a4b1c08baf15f4ed5f03defbf3f061673aabada5841f45ab9f579374  rsyslog.initd
198ad8f617b9edb93c9231118a9b3bb80b1e00e6517d2a79c393cbfef4417b8f0d08f231fb33843f8e9b09c7f9bc69dd501057ffe9eef583108af34996fee59d  rsyslog.logrotate
517e3c9fced414d397ce946eed50534ea821cd1a7aee2e873d5ffa4c4df3b4433b4f2a2e063825641ce6aaeddd5bd1fd2508ad34099fe30d0d3d615d25121f67  rsyslog.conf
15745c8cdb730ae548d038ca4c04f9f48ef55c6e04949a8e86df356877563c0fcb9660445e47d3f9530925092d6dd80b2b2fc3f64a114ee85103d137327524cb  musl-fix.patch
ef2e000b1c42cb5beffb26393952c2a692791e78972ee4b6f187ca53e338122b2004cc5216381c042195f12cc58f37f186a04e12a65b5bdfdcdf76b73393efb7  queue.patch"