]>
Commit | Line | Data |
---|---|---|
5aa38709 | 1 | # |
cec64641 | 2 | # TODO: |
cc1675a4 JB |
3 | # - relies on libs in /usr which is wrong |
4 | # (well, for modules bringing additional functionality it's acceptable IMO --q) | |
cec64641 | 5 | # |
8eca2e89 | 6 | # Conditional build: |
cc1675a4 | 7 | %bcond_with dynamic # link dynamically with glib, eventlog, pcre (modules are always linked dynamically) |
306cd2c9 | 8 | %if "%{pld_release}" == "ac" |
544d8db5 | 9 | %bcond_with sql # build with support for logging to SQL DB |
306cd2c9 | 10 | %else |
808ca97e | 11 | %bcond_without sql # build without support for logging to SQL DB |
306cd2c9 | 12 | %endif |
8fd1a6f4 | 13 | %bcond_without tests # do not perform "make check" |
18bd7ab6 JK |
14 | %bcond_without json # build without support for JSON template formatting |
15 | %bcond_without mongodb # build without support for mongodb destination | |
24e8f380 | 16 | %bcond_without smtp # build without support for logging into SMTP |
b2e460d3 | 17 | %bcond_with system_libivykis # use system libivykis |
8fd1a6f4 | 18 | %bcond_with system_rabbitmq # use system librabbitmq [not supported yet] |
5461d50b | 19 | |
306cd2c9 | 20 | %if "%{pld_release}" == "ac" |
4c650c71 | 21 | %define glib2_ver 1:2.16.0 |
306cd2c9 | 22 | %else |
4c650c71 | 23 | %define glib2_ver 1:2.24.0 |
306cd2c9 | 24 | %endif |
80a87a81 | 25 | Summary: Syslog-ng - new generation of the system logger |
cc1675a4 | 26 | Summary(pl.UTF-8): Syslog-ng - systemowy demon logujący nowej generacji |
f7affeae | 27 | Summary(pt_BR.UTF-8): Daemon de log nova geração |
db55bc6c | 28 | Name: syslog-ng |
2ddf1f86 | 29 | Version: 3.5.2 |
5cbf7cba | 30 | Release: 1 |
4c650c71 | 31 | License: GPL v2+ with OpenSSL exception |
db55bc6c | 32 | Group: Daemons |
5fe1f11f | 33 | Source0: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/%{name}_%{version}.tar.gz |
2ddf1f86 | 34 | # Source0-md5: a54cbbe077363f112e5f6ff1ffd34fdb |
70c1937a | 35 | Source1: %{name}.init |
36 | Source2: %{name}.conf | |
e0f9b227 | 37 | Source3: %{name}.logrotate |
2ddf1f86 AM |
38 | Source4: http://www.balabit.com/support/documentation/syslog-ng-ose-3.5-guides/en/syslog-ng-ose-v3.5-guide-admin/pdf/%{name}-ose-v3.5-guide-admin.pdf |
39 | # Source4-md5: 4c3c7f679e430373375752534e61abee | |
0872fe7c | 40 | Source5: %{name}-simple.conf |
c3d7f31f | 41 | Source6: %{name}.upstart |
35907845 | 42 | Patch0: %{name}-datadir.patch |
5fe1f11f | 43 | Patch1: cap_syslog-vserver-workaround.patch |
38883b2f | 44 | Patch2: %{name}-nolibs.patch |
17524264 | 45 | Patch3: %{name}-systemd.patch |
cd31ca9b | 46 | Patch4: man-paths.patch |
34c905de | 47 | URL: http://www.balabit.com/products/syslog_ng/ |
db1b62f6 | 48 | BuildRequires: GeoIP-devel >= 1.5.1 |
96ef1ac7 | 49 | BuildRequires: autoconf >= 2.53 |
53500332 | 50 | BuildRequires: automake |
4a7ca8b7 | 51 | BuildRequires: bison >= 2.4 |
cd31ca9b | 52 | BuildRequires: docbook-style-xsl |
cc1675a4 | 53 | BuildRequires: eventlog-devel >= 0.2.12 |
b7fea326 | 54 | %{?with_tests:BuildRequires: findutils} |
ac9ca8e0 | 55 | BuildRequires: flex |
4c650c71 | 56 | BuildRequires: glib2-devel >= %{glib2_ver} |
18bd7ab6 | 57 | %{?with_json:BuildRequires: json-c-devel >= 0.7} |
cc1675a4 JB |
58 | BuildRequires: libcap-devel |
59 | %{?with_sql:BuildRequires: libdbi-devel >= 0.8.3-2} | |
af6a2653 | 60 | %{?with_smtp:BuildRequires: libesmtp-devel} |
c6011c69 | 61 | %{?with_system_libivykis:BuildRequires: libivykis-devel >= 0.36.1} |
887b46ca | 62 | %{?with_mongodb:BuildRequires: libmongo-client-devel >= 0.1.6} |
cc1675a4 | 63 | BuildRequires: libnet-devel >= 1:1.1.2.1-3 |
4a7ca8b7 | 64 | BuildRequires: libtool >= 2:2.0 |
cc1675a4 JB |
65 | BuildRequires: libwrap-devel |
66 | BuildRequires: openssl-devel >= 0.9.8 | |
67 | BuildRequires: pcre-devel >= 6.1 | |
bf8c4b27 | 68 | BuildRequires: pkgconfig |
8fd1a6f4 | 69 | %{?with_system_rabbitmq:BuildRequires: rabbitmq-c-devel >= 0.0.1} |
306cd2c9 | 70 | BuildRequires: rpm >= 4.4.9-56 |
6d708cb5 | 71 | BuildRequires: rpmbuild(macros) >= 1.623 |
24642adc | 72 | BuildRequires: which |
bc708ef6 | 73 | %if %{with tests} |
306cd2c9 | 74 | %{?with_sql:BuildRequires: libdbi-drivers-sqlite3} |
24642adc | 75 | BuildRequires: python |
76 | BuildRequires: python-modules | |
bc708ef6 AF |
77 | BuildRequires: tzdata |
78 | %endif | |
cc1675a4 | 79 | %if %{without dynamic} |
d132f512 | 80 | BuildRequires: eventlog-static >= 0.2.12 |
4c650c71 | 81 | BuildRequires: glib2-static >= %{glib2_ver} |
c6011c69 | 82 | %{?with_system_libivykis:BuildRequires: libivykis-static >= 0.36.1} |
585ae33b | 83 | BuildRequires: pcre-static >= 6.1 |
808ca97e | 84 | BuildRequires: zlib-static |
8eca2e89 | 85 | %endif |
768882cc | 86 | Requires(post): fileutils |
cc4597b5 | 87 | Requires(post,preun): /sbin/chkconfig |
b3030031 | 88 | Requires(post,preun,postun): systemd-units >= 38 |
cc1675a4 JB |
89 | Requires: %{name}-libs = %{version}-%{release} |
90 | Requires: eventlog >= 0.2.12 | |
4c650c71 | 91 | Requires: glib2 >= %{glib2_ver} |
cc1675a4 | 92 | Requires: pcre >= 6.1 |
0471c4e3 | 93 | Requires: psmisc >= 20.1 |
8fd1a6f4 | 94 | %{?with_system_rabbitmq:Requires: rabbitmq-c >= 0.0.1} |
622aa91c | 95 | Requires: rc-scripts >= 0.4.3.0 |
b3030031 | 96 | Requires: systemd-units >= 38 |
ceea8d15 JB |
97 | # for afsocket |
98 | Requires: libnet >= 1:1.1.2.1-7 | |
99 | # for afsocket and dbparser | |
100 | Requires: openssl >= 0.9.8 | |
34031399 JR |
101 | Provides: service(klogd) |
102 | Provides: service(syslog) | |
18a2d4ea | 103 | Provides: syslogdaemon |
ceea8d15 JB |
104 | Obsoletes: syslog-ng-module-afsocket |
105 | Obsoletes: syslog-ng-module-dbparser | |
c0bb099a | 106 | Obsoletes: syslog-ng-systemd |
5db3c127 | 107 | Conflicts: klogd |
1a409b7d | 108 | Conflicts: msyslog |
240bc451 | 109 | Conflicts: rsyslog |
0baee825 | 110 | Conflicts: syslog |
8a78073d | 111 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
db55bc6c | 112 | |
cd31ca9b ER |
113 | %define xsl_stylesheets_dir /usr/share/sgml/docbook/xsl-stylesheets |
114 | ||
35907845 AM |
115 | # syslog-ng has really crazy linking rules (see their bugzilla). |
116 | # Some rules, according to syslog-ng devs, are like this: | |
117 | # - libsyslog-ng.so has undefined symbols for third party libraries | |
118 | # and these symbols should go via main syslog-ng binary | |
119 | # - same applies for modules | |
cc1675a4 JB |
120 | # In dynamic case tests are forcily linked with dynamic modules, which doesn't work with as-needed. |
121 | %define filterout_ld -Wl,--as-needed -Wl,--no-copy-dt-needed-entries | |
db1b62f6 | 122 | |
bb38cad4 JR |
123 | %if %{without dynamic} |
124 | %define no_install_post_check_so 1 | |
125 | %define _sbindir /sbin | |
126 | %define _libdir /%{_lib} | |
127 | %endif | |
128 | ||
db55bc6c | 129 | %description |
a42dcc7c | 130 | syslog-ng is a syslogd replacement for Unix and Unix-like systems. It |
70c1937a | 131 | has been tested on Solaris, BSDi and Linux, and were found to run |
132 | reliably. syslog-ng gives you a much enhanced configuration scheme, | |
133 | which lets you filter messages based on not only priority/facility | |
134 | pairs, but also on message content. You can use regexps to direct log | |
135 | stream to different destinations. A destination can be anything from a | |
136 | simple file to a network connection. syslog-ng supports TCP | |
137 | logforwarding, together with hashing to prevent unauthorized | |
138 | modification on the line. | |
db55bc6c | 139 | |
6ab9000c JR |
140 | %description -l pl.UTF-8 |
141 | Syslog-ng jest zamiennikiem dla standardowo używanych programów typu | |
a42dcc7c | 142 | syslog. Działa w systemie SunOS, BSD, Linux. Daje znacznie większe |
6ab9000c | 143 | możliwości logowania i kontrolowania zbieranych informacji. |
db55bc6c | 144 | |
6ab9000c JR |
145 | %description -l pt_BR.UTF-8 |
146 | Syslog-ng é um substituto para o syslog tradicional, mas com diversas | |
02e7b20a | 147 | melhorias, como, por exemplo, a habilidade de filtrar mensagens de log |
6ab9000c | 148 | por seu conteúdo (usando expressões regulares) e não apenas pelo par |
02e7b20a | 149 | facility/prioridade como o syslog original. |
150 | ||
c3d7f31f JK |
151 | %package upstart |
152 | Summary: Upstart job description for syslog-ng | |
4a7ca8b7 | 153 | Summary(pl.UTF-8): Opis zadania Upstart dla demona syslog-ng |
c3d7f31f JK |
154 | Group: Daemons |
155 | Requires: %{name} = %{version}-%{release} | |
156 | Requires: upstart >= 0.6 | |
528e8fc2 JK |
157 | Conflicts: avahi-upstart < 0.6.30-2 |
158 | Conflicts: openssh-server-upstart < 2:5.8p2-2 | |
159 | Conflicts: postgresql-upstart < 9.0.4-2 | |
c3d7f31f JK |
160 | |
161 | %description upstart | |
162 | Upstart job description for syslog-ng. | |
163 | ||
164 | %description upstart -l pl.UTF-8 | |
4a7ca8b7 | 165 | Opis zadania Upstart dla demona syslog-ng. |
c3d7f31f | 166 | |
4c650c71 JB |
167 | %package module-afmongodb |
168 | Summary: MongoDB destination support module for syslog-ng | |
169 | Summary(pl.UTF-8): Moduł sysloga-ng do obsługi zapisu logów w bazie MongoDB | |
170 | Group: Libraries | |
171 | Requires: %{name} = %{version}-%{release} | |
06e66789 | 172 | Requires: libmongo-client >= 0.1.6 |
4c650c71 JB |
173 | |
174 | %description module-afmongodb | |
175 | MongoDB destination support module for syslog-ng. | |
176 | ||
177 | %description module-afmongodb -l pl.UTF-8 | |
178 | Moduł sysloga-ng do obsługi zapisu logów w bazie MongoDB. | |
179 | ||
24e8f380 MK |
180 | %package module-afsmtp |
181 | Summary: SMTP output support module for syslog-ng | |
182 | Summary(pl.UTF-8): Moduł sysloga-ng do obsługi wysyłania logów do serwerów SMTP | |
183 | Group: Libraries | |
184 | Requires: %{name} = %{version}-%{release} | |
24e8f380 MK |
185 | Requires: openssl >= 0.9.8 |
186 | ||
187 | %description module-afsmtp | |
af6a2653 | 188 | SMTP output support module for syslog-ng. |
24e8f380 MK |
189 | |
190 | %description module-afsmtp -l pl.UTF-8 | |
af6a2653 | 191 | Moduł sysloga-ng do obsługi wysyłania logów do serwerów SMTP. |
24e8f380 | 192 | |
4c650c71 JB |
193 | %package module-afsql |
194 | Summary: SQL destination support module for syslog-ng | |
195 | Summary(pl.UTF-8): Moduł sysloga-ng do obsługi zapisu logów w bazach SQL | |
196 | Group: Libraries | |
197 | Requires: %{name} = %{version}-%{release} | |
198 | Requires: libdbi >= 0.8.3-2 | |
199 | Requires: openssl >= 0.9.8 | |
200 | ||
201 | %description module-afsql | |
202 | SQL destination support module for syslog-ng (via libdbi). | |
203 | ||
204 | %description module-afsql -l pl.UTF-8 | |
205 | Moduł sysloga-ng do obsługi zapisu logów w bazach SQL (poprzez | |
206 | libdbi). | |
207 | ||
24e8f380 | 208 | %package module-json-plugin |
4c650c71 JB |
209 | Summary: JSON formatting template function for syslog-ng |
210 | Summary(pl.UTF-8): Moduł sysloga-ng do obsługi szablonów z formatowaniem JSON | |
211 | Group: Libraries | |
212 | Requires: %{name} = %{version}-%{release} | |
887b46ca MK |
213 | Requires: json-c >= 0.9 |
214 | Obsoletes: syslog-ng-module-tfjson | |
4c650c71 | 215 | |
24e8f380 | 216 | %description module-json-plugin |
4c650c71 JB |
217 | JSON formatting template function for syslog-ng. |
218 | ||
24e8f380 | 219 | %description module-json-plugin -l pl.UTF-8 |
4c650c71 JB |
220 | Moduł sysloga-ng do obsługi szablonów z formatowaniem JSON. |
221 | ||
06e66789 JB |
222 | %package module-tfgeoip |
223 | Summary: syslog-ng template function module to get GeoIP info from an IPv4 addresses | |
224 | Summary(pl.UTF-8): Moduł funkcji szablonu sysloga-ng do pobierania informacji GeoIP z adresów IPv4 | |
225 | Group: Libraries | |
226 | Requires: %{name} = %{version}-%{release} | |
227 | Requires: GeoIP-libs >= 1.5.1 | |
228 | ||
229 | %description module-tfgeoip | |
230 | syslog-ng template function module to get GeoIP info from an IPv4 | |
231 | addresses. | |
232 | ||
233 | %description module-tfgeoip -l pl.UTF-8 | |
234 | Moduł funkcji szablonu sysloga-ng do pobierania informacji GeoIP z | |
235 | adresów IPv4. | |
236 | ||
cc1675a4 JB |
237 | %package libs |
238 | Summary: Shared library for syslog-ng | |
239 | Summary(pl.UTF-8): Biblioteka współdzielona sysloga-ng | |
240 | Group: Libraries | |
241 | %if %{with dynamic} | |
242 | Requires: eventlog >= 0.2.12 | |
4c650c71 | 243 | Requires: glib2 >= %{glib2_ver} |
c6011c69 | 244 | %{?with_system_libivykis:Requires: libivykis >= 0.36.1} |
cc1675a4 JB |
245 | Requires: pcre >= 6.1 |
246 | %endif | |
247 | Conflicts: syslog-ng < 3.3.1-3 | |
248 | ||
249 | %description libs | |
250 | Shared library for syslog-ng. | |
251 | ||
252 | %description libs -l pl.UTF-8 | |
253 | Biblioteka współdzielona sysloga-ng. | |
254 | ||
255 | %package devel | |
256 | Summary: Header files for syslog-ng modules development | |
257 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia modułów dla sysloga-ng | |
258 | Group: Development/Libraries | |
259 | Requires: %{name}-libs = %{version}-%{release} | |
260 | %if %{with dynamic} | |
261 | Requires: eventlog-devel >= 0.2.12 | |
4c650c71 | 262 | Requires: glib2-devel >= %{glib2_ver} |
c6011c69 | 263 | %{?with_system_libivykis:Requires: libivykis-devel >= 0.36.1} |
cc1675a4 JB |
264 | Requires: pcre-devel >= 6.1 |
265 | %endif | |
266 | ||
267 | %description devel | |
268 | Header files for syslog-ng modules development. | |
269 | ||
270 | %description devel -l pl.UTF-8 | |
271 | Pliki nagłówkowe do tworzenia modułów dla sysloga-ng. | |
272 | ||
db55bc6c | 273 | %prep |
40b3220e | 274 | %setup -q |
489ceddf | 275 | %patch0 -p1 |
3b8a2194 | 276 | %patch1 -p1 |
38883b2f | 277 | %patch2 -p1 |
17524264 | 278 | %patch3 -p1 |
cd31ca9b | 279 | %patch4 -p1 |
db1b62f6 ER |
280 | cp -p %{SOURCE4} doc |
281 | cp -p %{SOURCE5} contrib/syslog-ng.conf.simple | |
b6fee34c | 282 | |
cec64641 JR |
283 | %{__sed} -i -e 's|/usr/bin/awk|/bin/awk|' scl/syslogconf/convert-syslogconf.awk |
284 | ||
db55bc6c | 285 | %build |
5fe1f11f AM |
286 | for i in . lib/ivykis; do |
287 | cd $i | |
288 | %{__libtoolize} | |
4b94cfad | 289 | %{__aclocal} `[ -d m4 ] && echo '-I m4'` |
5fe1f11f | 290 | %{__autoconf} |
585ae33b | 291 | %{__autoheader} |
5fe1f11f AM |
292 | %{__automake} |
293 | cd - | |
294 | done | |
c67bc54f | 295 | %configure \ |
8eca2e89 | 296 | --sysconfdir=%{_sysconfdir}/syslog-ng \ |
303be384 | 297 | --datadir=%{_datadir}/syslog-ng \ |
db1b62f6 | 298 | --disable-silent-rules \ |
7e54a951 | 299 | --with-default-modules=affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat \ |
18bd7ab6 JK |
300 | %if %{with mongodb} |
301 | --enable-mongodb \ | |
752e2969 | 302 | --with-libmongo-client=system \ |
18bd7ab6 JK |
303 | %else |
304 | --disable-mongodb \ | |
305 | %endif | |
c6011c69 | 306 | %if %{with system_libivykis} |
4c3de3cf | 307 | --with-ivykis=system \ |
c6011c69 MK |
308 | %else |
309 | --with-ivykis=internal \ | |
310 | %endif | |
8fd1a6f4 | 311 | %{?with_system_rabbitmq:--with-librabbitmq-client=system} \ |
bb38cad4 | 312 | --with-module-dir=%{_libdir}/syslog-ng \ |
808ca97e | 313 | --with-pidfile-dir=/var/run \ |
4a7ca8b7 | 314 | --with-timezone-dir=%{_datadir}/zoneinfo \ |
17524264 | 315 | --enable-systemd \ |
6d708cb5 | 316 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
887b46ca | 317 | --enable-amqp \ |
24e8f380 | 318 | --enable-geoip \ |
808ca97e | 319 | --enable-ipv6 \ |
06e66789 | 320 | --enable-json%{!?with_json:=no} \ |
808ca97e | 321 | --enable-linux-caps \ |
1fe2e76c | 322 | --enable-pacct \ |
4a7ca8b7 | 323 | --enable-pcre \ |
06e66789 | 324 | --enable-smtp%{!?with_smtp:=no} \ |
4a7ca8b7 JB |
325 | --enable-spoof-source \ |
326 | --enable-ssl \ | |
327 | --enable-tcp-wrapper \ | |
808ca97e JR |
328 | %if %{with sql} |
329 | --enable-sql \ | |
330 | %endif | |
8eca2e89 JB |
331 | %if %{with dynamic} |
332 | --enable-dynamic-linking | |
bb38cad4 JR |
333 | %else |
334 | --enable-mixed-linking | |
8eca2e89 | 335 | %endif |
4298f6c0 | 336 | |
cd31ca9b ER |
337 | %{__make} \ |
338 | XSL_STYLESHEET=%{xsl_stylesheets_dir}/manpages/docbook.xsl | |
db55bc6c | 339 | |
cc1675a4 | 340 | %if %{with tests} |
b7fea326 AM |
341 | LD_LIBRARY_PATH=$(find $PWD -name '*.so*' -printf "%h:") |
342 | PYTHONPATH=$(pwd)/tests/functional | |
343 | export LD_LIBRARY_PATH PYTHONPATH | |
cc1675a4 JB |
344 | %{__make} check |
345 | %endif | |
f3688193 | 346 | |
db55bc6c | 347 | %install |
db55bc6c | 348 | rm -rf $RPM_BUILD_ROOT |
db1b62f6 | 349 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,logrotate.d,rc.d/init.d,init} \ |
303be384 | 350 | $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/patterndb.d \ |
cd6284ba | 351 | $RPM_BUILD_ROOT/var/{log,lib/%{name}/xsd} |
db55bc6c | 352 | |
1fe2e76c | 353 | %{__make} -j1 install \ |
80a5deba | 354 | pkgconfigdir=%{_pkgconfigdir} \ |
4d7c194a | 355 | DESTDIR=$RPM_BUILD_ROOT |
db55bc6c | 356 | |
544d8db5 | 357 | %{__sed} -e 's|@@SBINDIR@@|%{_sbindir}|g' %{SOURCE1} > $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng |
db1b62f6 ER |
358 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/syslog-ng/syslog-ng.conf |
359 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/syslog-ng | |
db55bc6c | 360 | |
306cd2c9 | 361 | for n in daemon debug iptables kernel lpr maillog messages secure spooler syslog user xferlog; do |
3fb60e3b JR |
362 | > $RPM_BUILD_ROOT/var/log/$n |
363 | done | |
2a14aff2 | 364 | touch $RPM_BUILD_ROOT/etc/sysconfig/%{name} |
db55bc6c | 365 | |
04316877 | 366 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
bb38cad4 | 367 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/syslog-ng/*.la |
f2972fae | 368 | |
306cd2c9 | 369 | %if "%{pld_release}" == "th" |
59aab0b4 | 370 | %{__sed} -e 's|@@SBINDIR@@|%{_sbindir}|g' %{SOURCE6} > $RPM_BUILD_ROOT/etc/init/%{name}.conf |
306cd2c9 | 371 | %endif |
c3d7f31f | 372 | |
80a87a81 JB |
373 | %clean |
374 | rm -rf $RPM_BUILD_ROOT | |
375 | ||
db55bc6c | 376 | %post |
1519c9ad ER |
377 | if [ "$1" = "1" ]; then |
378 | # disable /proc/kmsg from config on first install on vserver | |
379 | { | |
380 | while read f ctx; do | |
381 | [ "$f" = "VxID:" -o "$f" = "s_context:" ] && break | |
382 | done </proc/self/status | |
383 | } 2>/dev/null | |
384 | if [ -z "$ctx" -o "$ctx" = "0" ]; then | |
385 | VSERVER=no | |
386 | else | |
387 | VSERVER=yes | |
388 | fi | |
389 | if [ "$VSERVER" = "yes" ]; then | |
390 | %{__sed} -i -e '/\/proc\/kmsg/ s/^[^#]/#&/' %{_sysconfdir}/%{name}/%{name}.conf | |
391 | fi | |
392 | fi | |
393 | ||
0b833f9b | 394 | /sbin/chkconfig --add syslog-ng |
da4f5bde | 395 | %service syslog-ng restart "syslog-ng daemon" |
db55bc6c | 396 | |
34031399 JR |
397 | %systemd_post syslog-ng.service |
398 | ||
db55bc6c | 399 | %preun |
0b833f9b | 400 | if [ "$1" = "0" ]; then |
da4f5bde | 401 | %service syslog-ng stop |
0b833f9b | 402 | /sbin/chkconfig --del syslog-ng |
403 | fi | |
34031399 JR |
404 | %systemd_preun syslog-ng.service |
405 | ||
406 | %postun | |
407 | %systemd_reload | |
408 | ||
409 | %triggerpostun -- syslog-ng < 3.3.4-3 | |
410 | %systemd_trigger syslog-ng.service | |
db55bc6c | 411 | |
31446e62 | 412 | %triggerun -- syslog-ng < 3.0 |
60bdc15a | 413 | sed -i -e 's#sync(\(.*\))#flush_lines(\1)#g' /etc/syslog-ng/syslog-ng.conf |
31446e62 AM |
414 | sed -i -e 's#pipe ("/proc/kmsg"#file ("/proc/kmsg"#g' /etc/syslog-ng/syslog-ng.conf |
415 | sed -i -e 's#log_prefix#program_override#g' /etc/syslog-ng/syslog-ng.conf | |
416 | sed -i -e 's#^destination #destination d_#g' /etc/syslog-ng/syslog-ng.conf | |
417 | sed -i -e 's#destination(#destination(d_#g' /etc/syslog-ng/syslog-ng.conf | |
01113c19 | 418 | sed -i -e 's,\bstats\b,stats_freq,' /etc/syslog-ng/syslog-ng.conf |
31446e62 AM |
419 | sed -i -e 's#match("IN\=\[A-Za-z0-9\]\* OUT=\[A-Za-z0-9\]\*");#match("IN=[A-Za-z0-9]* OUT=[A-Za-z0-9]*" value("MESSAGE"));#g' /etc/syslog-ng/syslog-ng.conf |
420 | sed -i -e "1 s#\(.*\)\$#@version: 3.0\n\1#g" /etc/syslog-ng/syslog-ng.conf | |
421 | rm -f %{_var}/lib/%{name}/syslog-ng.persist | |
e3a52627 | 422 | %service -q syslog-ng restart |
31446e62 AM |
423 | exit 0 |
424 | ||
cc1675a4 JB |
425 | %post upstart |
426 | %upstart_post %{name} | |
427 | ||
428 | %postun upstart | |
429 | %upstart_postun %{name} | |
430 | ||
431 | %triggerun upstart -- syslog-ng-upstart < 3.2.4-3 | |
432 | # use SERVICE_syslog=y in upstart job environment instead of SERVICE=syslog | |
433 | %{__sed} -i -e 's,SERVICE=syslog,SERVICE_syslog=y,' /etc/init/*.conf || : | |
434 | ||
435 | %post libs -p /sbin/ldconfig | |
436 | %postun libs -p /sbin/ldconfig | |
437 | ||
db55bc6c | 438 | %files |
a25388f3 | 439 | %defattr(644,root,root,755) |
db1b62f6 | 440 | %doc AUTHORS NEWS debian/syslog-ng.conf* contrib/relogger.pl |
04316877 | 441 | %doc contrib/syslog-ng.conf.{doc,simple,RedHat} |
2ddf1f86 | 442 | %doc contrib/{apparmor,selinux,syslog2ng} doc/syslog-ng-ose-v3.5-guide-admin.pdf |
2a14aff2 | 443 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
a25388f3 | 444 | %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng |
303be384 | 445 | %attr(750,root,root) %dir %{_sysconfdir}/syslog-ng/patterndb.d |
bb38cad4 | 446 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/scl.conf |
cc4597b5 ER |
447 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf |
448 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng | |
a25388f3 | 449 | %attr(754,root,root) /etc/rc.d/init.d/syslog-ng |
34031399 | 450 | %{systemdunitdir}/syslog-ng.service |
bb38cad4 | 451 | %dir %{_libdir}/syslog-ng |
887b46ca | 452 | %attr(755,root,root) %{_libdir}/syslog-ng/libafamqp.so |
4c650c71 JB |
453 | %attr(755,root,root) %{_libdir}/syslog-ng/libaffile.so |
454 | %attr(755,root,root) %{_libdir}/syslog-ng/libafprog.so | |
ceea8d15 JB |
455 | %attr(755,root,root) %{_libdir}/syslog-ng/libafsocket.so |
456 | %attr(755,root,root) %{_libdir}/syslog-ng/libafsocket-notls.so | |
457 | %attr(755,root,root) %{_libdir}/syslog-ng/libafsocket-tls.so | |
2ddf1f86 | 458 | %attr(755,root,root) %{_libdir}/syslog-ng/libafstomp.so |
4c650c71 JB |
459 | %attr(755,root,root) %{_libdir}/syslog-ng/libafuser.so |
460 | %attr(755,root,root) %{_libdir}/syslog-ng/libbasicfuncs.so | |
461 | %attr(755,root,root) %{_libdir}/syslog-ng/libconfgen.so | |
887b46ca | 462 | %attr(755,root,root) %{_libdir}/syslog-ng/libcryptofuncs.so |
4c650c71 | 463 | %attr(755,root,root) %{_libdir}/syslog-ng/libcsvparser.so |
ceea8d15 | 464 | %attr(755,root,root) %{_libdir}/syslog-ng/libdbparser.so |
2ddf1f86 | 465 | %attr(755,root,root) %{_libdir}/syslog-ng/liblinux-kmsg-format.so |
4c650c71 | 466 | %attr(755,root,root) %{_libdir}/syslog-ng/libpacctformat.so |
2ddf1f86 | 467 | %attr(755,root,root) %{_libdir}/syslog-ng/libredis.so |
4c650c71 JB |
468 | %attr(755,root,root) %{_libdir}/syslog-ng/libsyslog-ng-crypto.so |
469 | %attr(755,root,root) %{_libdir}/syslog-ng/libsyslogformat.so | |
887b46ca | 470 | %attr(755,root,root) %{_libdir}/syslog-ng/libsystem-source.so |
302dff3f | 471 | %attr(755,root,root) %{_sbindir}/syslog-ng |
bb38cad4 | 472 | %attr(755,root,root) %{_sbindir}/syslog-ng-ctl |
31da20fc | 473 | %attr(755,root,root) %{_bindir}/loggen |
ceea8d15 | 474 | %attr(755,root,root) %{_bindir}/pdbtool |
303be384 | 475 | %attr(755,root,root) %{_bindir}/update-patterndb |
a0237816 | 476 | |
a0237816 JR |
477 | %dir %{_datadir}/syslog-ng/include |
478 | %dir %{_datadir}/syslog-ng/include/scl | |
479 | %dir %{_datadir}/syslog-ng/include/scl/pacct | |
480 | %{_datadir}/syslog-ng/include/scl/pacct/plugin.conf | |
2ddf1f86 AM |
481 | %dir %{_datadir}/syslog-ng/include/scl/rewrite |
482 | %{_datadir}/syslog-ng/include/scl/rewrite/cc-mask.conf | |
a0237816 JR |
483 | %dir %{_datadir}/syslog-ng/include/scl/syslogconf |
484 | %{_datadir}/syslog-ng/include/scl/syslogconf/README | |
485 | %attr(755,root,root) %{_datadir}/syslog-ng/include/scl/syslogconf/convert-syslogconf.awk | |
486 | %{_datadir}/syslog-ng/include/scl/syslogconf/plugin.conf | |
487 | %dir %{_datadir}/syslog-ng/include/scl/system | |
a0237816 JR |
488 | %{_datadir}/syslog-ng/include/scl/system/plugin.conf |
489 | %dir %{_datadir}/syslog-ng/xsd | |
490 | %{_datadir}/syslog-ng/xsd/patterndb-*.xsd | |
491 | ||
4d910d4c | 492 | %dir %{_var}/lib/%{name} |
cd6284ba | 493 | %dir %{_var}/lib/%{name}/xsd |
31da20fc | 494 | %{_mandir}/man1/loggen.1* |
ceea8d15 | 495 | %{_mandir}/man1/pdbtool.1* |
bb38cad4 | 496 | %{_mandir}/man1/syslog-ng-ctl.1* |
81f47e04 JB |
497 | %{_mandir}/man5/syslog-ng.conf.5* |
498 | %{_mandir}/man8/syslog-ng.8* | |
822b8fbf | 499 | |
cc1675a4 JB |
500 | %attr(640,root,root) %ghost /var/log/daemon |
501 | %attr(640,root,root) %ghost /var/log/debug | |
502 | %attr(640,root,root) %ghost /var/log/iptables | |
503 | %attr(640,root,root) %ghost /var/log/kernel | |
504 | %attr(640,root,root) %ghost /var/log/lpr | |
505 | %attr(640,root,root) %ghost /var/log/maillog | |
506 | %attr(640,root,root) %ghost /var/log/messages | |
507 | %attr(640,root,root) %ghost /var/log/secure | |
508 | %attr(640,root,root) %ghost /var/log/spooler | |
509 | %attr(640,root,root) %ghost /var/log/syslog | |
510 | %attr(640,root,root) %ghost /var/log/user | |
511 | %attr(640,root,root) %ghost /var/log/xferlog | |
c3d7f31f | 512 | |
306cd2c9 | 513 | %if "%{pld_release}" == "th" |
c3d7f31f JK |
514 | %files upstart |
515 | %defattr(644,root,root,755) | |
516 | %config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf | |
306cd2c9 | 517 | %endif |
cc1675a4 | 518 | |
18bd7ab6 | 519 | %if %{with mongodb} |
4c650c71 JB |
520 | %files module-afmongodb |
521 | %defattr(644,root,root,755) | |
4c650c71 | 522 | %attr(755,root,root) %{_libdir}/syslog-ng/libafmongodb.so |
18bd7ab6 | 523 | %endif |
4c650c71 | 524 | |
24e8f380 MK |
525 | %if %{with smtp} |
526 | %files module-afsmtp | |
527 | %defattr(644,root,root,755) | |
528 | %attr(755,root,root) %{_libdir}/syslog-ng/libafsmtp.so | |
529 | %endif | |
530 | ||
5f709b4d | 531 | %if %{with sql} |
4c650c71 JB |
532 | %files module-afsql |
533 | %defattr(644,root,root,755) | |
534 | %attr(755,root,root) %{_libdir}/syslog-ng/libafsql.so | |
5f709b4d | 535 | %endif |
4c650c71 | 536 | |
18bd7ab6 | 537 | %if %{with json} |
24e8f380 | 538 | %files module-json-plugin |
4c650c71 | 539 | %defattr(644,root,root,755) |
887b46ca | 540 | %attr(755,root,root) %{_libdir}/syslog-ng/libjson-plugin.so |
18bd7ab6 | 541 | %endif |
4c650c71 | 542 | |
06e66789 JB |
543 | %files module-tfgeoip |
544 | %defattr(644,root,root,755) | |
545 | %attr(755,root,root) %{_libdir}/syslog-ng/libtfgeoip.so | |
546 | ||
cc1675a4 JB |
547 | %files libs |
548 | %defattr(644,root,root,755) | |
549 | %attr(755,root,root) %{_libdir}/libsyslog-ng-%{version}.so | |
550 | %dir %{_datadir}/syslog-ng | |
551 | ||
552 | %files devel | |
553 | %defattr(644,root,root,755) | |
554 | %attr(755,root,root) %{_libdir}/libsyslog-ng.so | |
555 | %{_includedir}/syslog-ng | |
556 | %{_datadir}/syslog-ng/tools | |
557 | %{_pkgconfigdir}/syslog-ng.pc |