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