/[packages]/cauldron/snort/current/SPECS/snort.spec
ViewVC logotype

Contents of /cauldron/snort/current/SPECS/snort.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30270 - (show annotations) (download)
Fri Jan 21 20:13:20 2011 UTC (11 years, 5 months ago) by dlucio
File size: 27303 byte(s)
imported package snort
1 Summary: An Intrusion Detection System (IDS)
2 Name: snort
3 Version: 2.9.0.3
4 Release: %mkrel 4
5 License: GPLv2
6 Group: Networking/Other
7 URL: http://www.snort.org/
8 Source0: http://www.snort.org/dl/current/%{name}-%{version}.tar.gz
9 #Source1: http://www.snort.org/dl/current/%{name}-%{version}.tar.gz.sig
10 Source3: snort.init
11 Source4: snort.logrotate
12 Source5: snort.sysconfig
13 Source6: snortdb-extra
14 Patch0: snort-lib64.diff
15 # (oe) http://www.inliniac.net/files/
16 Patch1: snortsam-2.9.0-dlucio.diff
17 Patch2: snort-2.9.0-plugins_fix.diff
18 Patch3: snort-2.8.5-werror_antibork.diff
19 Patch4: snort-2.8.5-missing-header.patch
20 Requires(post): rpm-helper snort-rules
21 Requires(preun): rpm-helper snort-rules
22 Requires(pre): rpm-helper
23 Requires(postun): rpm-helper
24 Requires: pcre
25 Requires: pcap
26 Requires: snort-rules
27 BuildRequires: autoconf2.5
28 BuildRequires: automake
29 BuildRequires: pcap-devel
30 BuildRequires: mysql-devel
31 BuildRequires: openssl-devel
32 BuildRequires: postgresql-devel
33 BuildRequires: texinfo
34 BuildRequires: zlib-devel
35 BuildRequires: pcre-devel
36 BuildRequires: dnet-devel
37 BuildRequires: net1.0-devel
38 BuildRequires: chrpath
39 BuildRequires: iptables-devel
40 BuildRequires: flex
41 BuildRequires: bison
42 BuildRequires: latex2html
43 BuildRequires: gnutls-devel
44 BuildRequires: prelude-devel
45 BuildRequires: iptables-ipq-devel
46 BuildRequires: daq-devel
47 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
48 Suggests: snortsam
49
50 %description
51 Snort is a libpcap-based packet sniffer/logger which can be used as a
52 lightweight network intrusion detection system. It features rules based logging
53 and can perform protocol analysis, content searching/matching and can be used
54 to detect a variety of attacks and probes, such as buffer overflows, stealth
55 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
56 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
57 separate "alert" file, or as a WinPopup message via Samba's smbclient
58
59 This rpm is different from previous rpms and while it will not clobber
60 your current snort file, you will need to modify it.
61
62 There are 9 different packages available
63
64 All of them require the base snort rpm. Additionally, you will need
65 to chose a binary to install.
66
67 %{_sbindir}/snort should end up being a symlink to a binary in one of
68 the following configurations. We use update-alternatives for this.
69 Here are the different packages along with their priorities.
70
71 plain(10) plain+flexresp(11) mysql(12)
72 mysql+flexresp(13) postgresql(14) postgresql+flexresp(15)
73 bloat(16) inline(17) inline+flexresp(18)
74 prelude(19) prelude+flexresp(20)
75
76 Please see the documentation in %{_docdir}/%{name}
77
78 %package plain+flexresp
79 Summary: Snort with Flexible Response
80 Group: Networking/Other
81 Requires: snort >= %{version}
82
83 %description plain+flexresp
84 Snort is a libpcap-based packet sniffer/logger which can be used as a
85 lightweight network intrusion detection system. It features rules based logging
86 and can perform protocol analysis, content searching/matching and can be used
87 to detect a variety of attacks and probes, such as buffer overflows, stealth
88 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
89 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
90 separate "alert" file, or as a WinPopup message via Samba's smbclient
91
92 Snort compiled with flexresp support. FlexResp allows snort to actively close
93 offending connections.
94
95 %package mysql
96 Summary: Snort with MySQL database support
97 Group: Networking/Other
98 Requires: snort >= %{version}
99
100 %description mysql
101 Snort is a libpcap-based packet sniffer/logger which can be used as a
102 lightweight network intrusion detection system. It features rules based logging
103 and can perform protocol analysis, content searching/matching and can be used
104 to detect a variety of attacks and probes, such as buffer overflows, stealth
105 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
106 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
107 separate "alert" file, or as a WinPopup message via Samba's smbclient
108
109 Snort compiled with mysql support.
110
111 %package mysql+flexresp
112 Summary: Snort with MySQL database and Flexible Response support
113 Group: Networking/Other
114 Requires: snort >= %{version}
115
116 %description mysql+flexresp
117 Snort is a libpcap-based packet sniffer/logger which can be used as a
118 lightweight network intrusion detection system. It features rules based logging
119 and can perform protocol analysis, content searching/matching and can be used
120 to detect a variety of attacks and probes, such as buffer overflows, stealth
121 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
122 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
123 separate "alert" file, or as a WinPopup message via Samba's smbclient
124
125 Snort compiled with mysql+flexresp support. FlexResp allows snort to actively
126 close offending connections.
127
128 %package postgresql
129 Summary: Snort with PostgreSQL database support
130 Group: Networking/Other
131 Requires: snort >= %{version}
132
133 %description postgresql
134 Snort is a libpcap-based packet sniffer/logger which can be used as a
135 lightweight network intrusion detection system. It features rules based logging
136 and can perform protocol analysis, content searching/matching and can be used
137 to detect a variety of attacks and probes, such as buffer overflows, stealth
138 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
139 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
140 separate "alert" file, or as a WinPopup message via Samba's smbclient
141
142 Snort compiled with postgresql support.
143
144 %package postgresql+flexresp
145 Summary: Snort with PostgreSQL database and Flexible Response support
146 Group: Networking/Other
147 Requires: snort >= %{version}
148
149 %description postgresql+flexresp
150 Snort is a libpcap-based packet sniffer/logger which can be used as a
151 lightweight network intrusion detection system. It features rules based logging
152 and can perform protocol analysis, content searching/matching and can be used
153 to detect a variety of attacks and probes, such as buffer overflows, stealth
154 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
155 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
156 separate "alert" file, or as a WinPopup message via Samba's smbclient
157
158 Snort compiled with postgresql+flexresp support. FlexResp allows snort to
159 actively close offending connections.
160
161 %package bloat
162 Summary: Snort with flexresp+mysql+postgresql+inline+prelude support
163 Group: Networking/Other
164 Requires: snort >= %{version}
165
166 %description bloat
167 Snort is a libpcap-based packet sniffer/logger which can be used as a
168 lightweight network intrusion detection system. It features rules based logging
169 and can perform protocol analysis, content searching/matching and can be used
170 to detect a variety of attacks and probes, such as buffer overflows, stealth
171 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
172 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
173 separate "alert" file, or as a WinPopup message via Samba's smbclient
174
175 Snort compiled with flexresp+mysql+postgresql+inline+prelude support.
176
177 %package inline
178 Summary: Snort with Inline support
179 Group: Networking/Other
180 Requires: iptables
181 Requires: snort >= %{version}
182
183 %description inline
184 Snort is a libpcap-based packet sniffer/logger which can be used as a
185 lightweight network intrusion detection system. It features rules based logging
186 and can perform protocol analysis, content searching/matching and can be used
187 to detect a variety of attacks and probes, such as buffer overflows, stealth
188 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
189 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
190 separate "alert" file, or as a WinPopup message via Samba's smbclient
191
192 Snort compiled with inline support. Snort-Inline takes packets from iptables
193 instead of libpcap. It then uses new rule types to help iptables make pass or
194 drop decisions based on snort rules.
195
196 %package inline+flexresp
197 Summary: Snort with Inline and Flexible Response support
198 Group: Networking/Other
199 Requires: iptables
200 Requires: snort >= %{version}
201
202 %description inline+flexresp
203 Snort is a libpcap-based packet sniffer/logger which can be used as a
204 lightweight network intrusion detection system. It features rules based logging
205 and can perform protocol analysis, content searching/matching and can be used
206 to detect a variety of attacks and probes, such as buffer overflows, stealth
207 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
208 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
209 separate "alert" file, or as a WinPopup message via Samba's smbclient
210
211 Snort compiled with inline+flexresp support. FlexResp allows snort to actively
212 close offending connections. Snort-Inline takes packets from iptables instead
213 of libpcap. It then uses new rule types to help iptables make pass or drop
214 decisions based on snort rules.
215
216 %package prelude
217 Summary: Snort with Prelude support
218 Group: Networking/Other
219 Requires: snort >= %{version}
220
221 %description prelude
222 Snort is a libpcap-based packet sniffer/logger which can be used as a
223 lightweight network intrusion detection system. It features rules based logging
224 and can perform protocol analysis, content searching/matching and can be used
225 to detect a variety of attacks and probes, such as buffer overflows, stealth
226 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
227 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
228 separate "alert" file, or as a WinPopup message via Samba's smbclient
229
230 Snort compiled with prelude support.
231
232 %package prelude+flexresp
233 Summary: Snort with Prelude and Flexible Response support
234 Group: Networking/Other
235 Requires: snort >= %{version}
236
237 %description prelude+flexresp
238 Snort is a libpcap-based packet sniffer/logger which can be used as a
239 lightweight network intrusion detection system. It features rules based logging
240 and can perform protocol analysis, content searching/matching and can be used
241 to detect a variety of attacks and probes, such as buffer overflows, stealth
242 port scans, CGI attacks, SMB probes, OS fingerprinting attempts, and much more.
243 Snort has a real-time alerting capabilty, with alerts being sent to syslog, a
244 separate "alert" file, or as a WinPopup message via Samba's smbclient
245
246 Snort compiled with prelude+flexresp support. FlexResp allows snort to actively
247 close offending connections.
248
249 %prep
250
251 %setup -q -n %{name}-%{version}
252 %patch0 -p0 -b .lib64
253 %patch1 -p1 -b .snortsam
254 %patch2 -p1 -b .plugins_fix
255 %patch3 -p0 -b .werror_antibork
256 #%patch4 -p1
257
258 # fix pid file path
259 /bin/echo "#define _PATH_VARRUN \"%{_var}/run/%{name}\"" >> acconfig.h
260
261 %{__cp} -a %{SOURCE6} .
262
263 %build
264 %serverbuild
265 export WANT_AUTOCONF_2_5=1
266 rm -f configure
267 libtoolize --automake --copy --force; aclocal -I m4; autoheader; automake --foreign --add-missing --copy; autoconf
268
269 # build snort
270 %{__rm} -rf building && %{__mkdir_p} building && cd building
271 SNORT_BASE_CONFIG="--prefix=%{_prefix} \
272 --libdir=%{_libdir} \
273 --libexecdir=%{_libdir}/%{name} \
274 --mandir=%{_mandir} \
275 --sysconfdir=%{_sysconfdir}/%{name} \
276 --disable-prelude \
277 --enable-shared \
278 --enable-pthread \
279 --enable-dynamicplugin \
280 --enable-perfprofiling \
281 --enable-linux-smp-stats \
282 --disable-static-daq \
283 --enable-ppm \
284 --enable-decoder-preprocessor-rules \
285 --cache-file=../../config.cache \
286 --enable-reload \
287 --enable-reload-error-restart \
288 --enable-zlib \
289 --enable-mpls \
290 --enable-targetbased \
291 --enable-perfprofiling \
292 --enable-active-response \
293 --enable-normalizer \
294 --enable-react \
295 --with-daq-includes=%{_includedir} \
296 --with-daq-libraries=%{_libdir}"
297
298 # there are some strange configure errors
299 # when not doing a distclean between major builds.
300 # plain
301 {
302 %{__mkdir_p} plain; cd plain
303 ../../configure $SNORT_BASE_CONFIG \
304 --without-mysql --disable-mysql \
305 --without-postgresql --disable-postgresql \
306 --without-oracle --disable-oracle \
307 --without-odbc --disable-odbc \
308 --without-inline --disable-inline
309 %{__make}
310 %{__mv} src/%{name} ../%{name}-plain
311 #%{__make} distclean
312 cd ..
313 }
314
315 # plain+flexresp
316 {
317 %{__mkdir_p} plain+flexresp; cd plain+flexresp
318 ../../configure $SNORT_BASE_CONFIG \
319 --without-mysql --disable-mysql \
320 --without-postgresql --disable-postgresql \
321 --without-oracle --disable-oracle \
322 --without-odbc --disable-odbc \
323 --enable-flexresp3 \
324 --with-dnet-includes=%{_includedir} \
325 --with-dnet-libraries=%{_libdir} \
326 --without-inline --disable-inline
327 %{__make}
328 %{__mv} src/%{name} ../%{name}-plain+flexresp
329 # %{__make} distclean
330 cd ..
331 }
332
333 # mysql+flexresp
334 {
335 %{__mkdir_p} mysql+flexresp; cd mysql+flexresp
336 ../../configure $SNORT_BASE_CONFIG \
337 --with-mysql-includes=%{_includedir} \
338 --with-mysql-libraries=%{_libdir} \
339 --without-postgresql --disable-postgresql \
340 --without-oracle --disable-oracle \
341 --without-odbc --disable-odbc \
342 --enable-flexresp3 \
343 --with-dnet-includes=%{_includedir} \
344 --with-dnet-libraries=%{_libdir} \
345 --without-inline --disable-inline
346 %{__make}
347 %{__mv} src/%{name} ../%{name}-mysql+flexresp
348 # %{__make} distclean
349 cd ..
350 }
351
352 # mysql
353 {
354 %{__mkdir_p} mysql; cd mysql
355 ../../configure $SNORT_BASE_CONFIG \
356 --with-mysql-includes=%{_includedir} \
357 --with-mysql-libraries=%{_libdir} \
358 --without-postgresql --disable-postgresql \
359 --without-oracle --disable-oracle \
360 --without-odbc --disable-odbc \
361 --without-inline --disable-inline
362 %{__make}
363 %{__mv} src/%{name} ../%{name}-mysql
364 # %{__make} distclean
365 cd ..
366 }
367
368 # postgresql+flexresp
369 {
370 %{__mkdir_p} postgresql+flexresp; cd postgresql+flexresp
371 ../../configure $SNORT_BASE_CONFIG \
372 --without-mysql --disable-mysql \
373 --with-postgresql=%{_prefix} \
374 --without-oracle --disable-oracle \
375 --without-odbc --disable-odbc \
376 --enable-flexresp3 \
377 --with-dnet-includes=%{_includedir} \
378 --with-dnet-libraries=%{_libdir} \
379 --without-inline --disable-inline
380 %{__make}
381 %{__mv} src/%{name} ../%{name}-postgresql+flexresp
382 # %{__make} distclean
383 cd ..
384 }
385
386 # postgresql
387 {
388 %{__mkdir_p} postgresql; cd postgresql
389 ../../configure $SNORT_BASE_CONFIG \
390 --without-mysql --disable-mysql \
391 --with-postgresql=%{_prefix} \
392 --without-oracle --disable-oracle \
393 --without-odbc --disable-odbc \
394 --without-inline --disable-inline
395 %{__make}
396 %{__mv} src/%{name} ../%{name}-postgresql
397 # %{__make} distclean
398 cd ..
399 }
400
401 # bloat
402 {
403 %{__mkdir_p} bloat; cd bloat
404 ../../configure $SNORT_BASE_CONFIG \
405 --with-mysql-includes=%{_includedir} \
406 --with-mysql-libraries=%{_libdir} \
407 --with-postgresql=%{_prefix} \
408 --without-oracle --disable-oracle \
409 --without-odbc --disable-odbc \
410 --with-openssl=%{_prefix} \
411 --enable-flexresp3 \
412 --with-dnet-includes=%{_includedir} \
413 --with-dnet-libraries=%{_libdir} \
414 --with-inline --enable-inline \
415 --with-libipq-includes=%{_includedir} \
416 --with-libipq-libraries=%{_libdir} \
417 --enable-prelude --with-libprelude-prefix=%{_prefix}
418 %{__make}
419 %{__mv} src/%{name} ../%{name}-bloat
420 # %{__make} distclean
421 cd ..
422 }
423
424 # inline
425 {
426 %{__mkdir_p} inline; cd inline
427 ../../configure $SNORT_BASE_CONFIG \
428 --without-mysql --disable-mysql \
429 --without-postgresql --disable-postgresql \
430 --without-oracle --disable-oracle \
431 --without-odbc --disable-odbc \
432 --with-inline --enable-inline \
433 --with-libipq-includes=%{_includedir} \
434 --with-libipq-libraries=%{_libdir}
435 %{__make}
436 %{__mv} src/%{name} ../%{name}-inline
437 #%{__make} distclean
438 cd ..
439 }
440
441 # inline+flexresp
442 {
443 %{__mkdir_p} inline+flexresp; cd inline+flexresp
444 ../../configure $SNORT_BASE_CONFIG \
445 --without-mysql --disable-mysql \
446 --without-postgresql --disable-postgresql \
447 --without-oracle --disable-oracle \
448 --without-odbc --disable-odbc \
449 --enable-flexresp3 \
450 --with-dnet-includes=%{_includedir} \
451 --with-dnet-libraries=%{_libdir} \
452 --with-inline --enable-inline \
453 --with-libipq-includes=%{_includedir} \
454 --with-libipq-libraries=%{_libdir}
455 %{__make}
456 %{__mv} src/%{name} ../%{name}-inline+flexresp
457 #%{__make} distclean
458 cd ..
459 }
460
461 # prelude+flexresp
462 {
463 %{__mkdir_p} prelude+flexresp; cd prelude+flexresp
464 ../../configure $SNORT_BASE_CONFIG \
465 --enable-prelude --with-libprelude-prefix=%{_prefix} \
466 --without-mysql --disable-mysql \
467 --without-postgresql --disable-postgresql \
468 --without-oracle --disable-oracle \
469 --without-odbc --disable-odbc \
470 --enable-flexresp3 \
471 --with-dnet-includes=%{_includedir} \
472 --with-dnet-libraries=%{_libdir} \
473 --without-inline --disable-inline
474 %{__make}
475 %{__mv} src/%{name} ../%{name}-prelude+flexresp
476 # %{__make} distclean
477 cd ..
478 }
479
480 # prelude
481 {
482 %{__mkdir_p} prelude; cd prelude
483 ../../configure $SNORT_BASE_CONFIG \
484 --enable-prelude --with-libprelude-prefix=%{_prefix} \
485 --without-mysql --disable-mysql \
486 --without-postgresql --disable-postgresql \
487 --without-oracle --disable-oracle \
488 --without-odbc --disable-odbc \
489 --without-inline --disable-inline
490 %{__make}
491 %{__mv} src/%{name} ../%{name}-prelude
492 # %{__make} distclean
493 cd ..
494 }
495
496 cd ..
497
498 ## make the html versions of the faq and manual
499 #pushd doc
500 # latex2html -info 0 -local_icons -show_section_numbers -link +2 -split +1 faq.tex
501 # latex2html -info 0 -local_icons -show_section_numbers -link +2 -split +2 -noaddress snort_manual.tex
502 # # cleanup
503 # %{__rm} -f faq/WARNINGS faq/*.tex faq/*.idx faq/*.log faq/*.aux faq/*.pl
504 # %{__rm} -f snort_manual/WARNINGS snort_manual/*.tex snort_manual/*.aux snort_manual/*.log snort_manual/*.pl
505 #popd
506
507 %install
508 %{__rm} -rf %{buildroot}
509
510 %{__mkdir_p} %{buildroot}%{_sysconfdir}/%{name}/rules
511 %{__mkdir_p} %{buildroot}%{_sysconfdir}/sysconfig
512 %{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d
513 %{__mkdir_p} %{buildroot}/var/log/%{name}/empty
514 %{__mkdir_p} %{buildroot}/var/run/%{name}
515 %{__mkdir_p} %{buildroot}%{_sbindir}
516 %{__mkdir_p} %{buildroot}%{_initrddir}
517 %{__mkdir_p} %{buildroot}%{_mandir}/man8
518
519 %{makeinstall_std} -C building/plain
520
521 # cleanup
522 %{__rm} -f %{buildroot}%{_bindir}/%{name}
523 %{__rm} -rf %{buildroot}%{_prefix}/src
524 %{__rm} -f %{buildroot}%{_libdir}/%{name}/dynamicengine/*.{a,la}
525 %{__rm} -f %{buildroot}%{_libdir}/%{name}/dynamicpreprocessor/*.{a,la}
526 #%{__rm} -f %{buildroot}%{_libdir}/%{name}/dynamicrules/*.{a,la}
527
528 {
529 pushd building
530 %{__install} %{name}-plain %{buildroot}%{_sbindir}/%{name}-plain
531 %{__install} %{name}-plain+flexresp %{buildroot}%{_sbindir}/%{name}-plain+flexresp
532 %{__install} %{name}-mysql %{buildroot}%{_sbindir}/%{name}-mysql
533 %{__install} %{name}-mysql+flexresp %{buildroot}%{_sbindir}/%{name}-mysql+flexresp
534 %{__install} %{name}-postgresql %{buildroot}%{_sbindir}/%{name}-postgresql
535 %{__install} %{name}-postgresql+flexresp %{buildroot}%{_sbindir}/%{name}-postgresql+flexresp
536 %{__install} %{name}-bloat %{buildroot}%{_sbindir}/%{name}-bloat
537 %{__install} %{name}-inline %{buildroot}%{_sbindir}/%{name}-inline
538 %{__install} %{name}-inline+flexresp %{buildroot}%{_sbindir}/%{name}-inline+flexresp
539 %{__install} %{name}-prelude %{buildroot}%{_sbindir}/%{name}-prelude
540 %{__install} %{name}-prelude+flexresp %{buildroot}%{_sbindir}/%{name}-prelude+flexresp
541 popd
542 }
543
544 %{__install} %{name}.8* %{buildroot}%{_mandir}/man8
545 %{__perl} -pi -e "s|var RULE_PATH ../rules|var RULE_PATH rules|" etc/%{name}.conf
546
547 %{__install} -m0644 etc/*.conf %{buildroot}%{_sysconfdir}/%{name}/
548 %{__install} -m0644 etc/*.config %{buildroot}%{_sysconfdir}/%{name}/
549 %{__install} -m0644 etc/*.map %{buildroot}%{_sysconfdir}/%{name}/
550
551 %{__install} -m0755 %{SOURCE3} %{buildroot}%{_initrddir}/snort
552 %{__install} -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
553 %{__install} -m0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
554
555 # strip rpath
556 chrpath -d %{buildroot}%{_sbindir}/%{name}-*
557
558 # fix libexecdir
559 %{__perl} -pi -e "s|/usr/local/lib/snort_|%{_libdir}/%{name}/|g" %{buildroot}%{_sysconfdir}/%{name}/snort.conf
560
561 %pre
562 %_pre_useradd snort /var/log/snort /bin/false
563
564 %post
565 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-plain 10
566 %_post_service snort
567
568 %preun
569 %_preun_service snort
570
571 %postun
572 %_postun_userdel snort
573 # remove the link if not upgrade
574 if [ $1 = 0 ]; then
575 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-plain
576 fi
577
578 %post plain+flexresp
579 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-plain+flexresp 11
580
581 %postun plain+flexresp
582 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-plain+flexresp
583
584 %post mysql
585 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-mysql 12
586
587 %postun mysql
588 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-mysql
589
590 %post mysql+flexresp
591 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-mysql+flexresp 13
592
593 %postun mysql+flexresp
594 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-mysql+flexresp
595
596 %post postgresql
597 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-postgresql 14
598
599 %postun postgresql
600 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-postgresql
601
602 %post postgresql+flexresp
603 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-postgresql+flexresp 15
604
605 %postun postgresql+flexresp
606 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-postgresql+flexresp
607
608 %post bloat
609 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-bloat 16
610
611 %postun bloat
612 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-bloat
613
614 %post inline
615 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-inline 17
616
617 %postun inline
618 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-inline
619
620 %post inline+flexresp
621 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-inline+flexresp 18
622
623 %postun inline+flexresp
624 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-inline+flexresp
625
626 %post prelude
627 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-prelude 19
628
629 %postun prelude
630 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-prelude
631
632 %post prelude+flexresp
633 %{_sbindir}/update-alternatives --install %{_sbindir}/%{name} %{name} %{_sbindir}/%{name}-prelude+flexresp 20
634
635 %postun prelude+flexresp
636 %{_sbindir}/update-alternatives --remove %{name} %{_sbindir}/%{name}-prelude+flexresp
637
638 %clean
639 %{__rm} -rf %{buildroot}
640
641 %files
642 %defattr(-,root,root)
643 %doc COPYING ChangeLog RELEASE.NOTES
644 %doc doc/AUTHORS doc/BUGS doc/CREDITS doc/generators doc/INSTALL doc/NEWS doc/PROBLEMS doc/README
645 %doc doc/README.alert_order doc/README.ARUBA doc/README.asn1 doc/README.csv doc/README.database
646 %doc doc/README.dcerpc2 doc/README.decode doc/README.dns doc/README.event_queue
647 %doc doc/README.flowbits doc/README.frag3 doc/README.daq doc/README.decoder_preproc_rules doc/README.reload
648 %doc doc/README.ftptelnet doc/README.gre doc/README.http_inspect doc/README.ipip doc/README.filters
649 %doc doc/README.ipv6 doc/README.pcap_readmode doc/README.PerfProfiling doc/README.PLUGINS doc/README.ppm
650 %doc doc/README.sfportscan doc/README.SMTP doc/README.ssh doc/README.ssl doc/README.multipleconfigs
651 %doc doc/README.stream5 doc/README.tag doc/README.thresholding doc/README.UNSOCK doc/README.variables
652 %doc doc/README.WIN32 doc/TODO doc/USAGE doc/WISHLIST doc/README.active
653 %doc doc/README.sensitive_data
654 %doc doc/*.pdf doc/*.tex
655 #%doc %doc doc/CRYPTIX-LICENSE.TXT doc/README.sam
656 # latex2html is borked...
657 #%doc doc/snort_manual doc/faq
658 %attr(0755,root,root) %{_sbindir}/%{name}-plain
659 %attr(0755,root,root) %{_bindir}/u2boat
660 %attr(0755,root,root) %{_bindir}/u2spewfoo
661 %attr(0755,root,root) %{_mandir}/man8/%{name}.8*
662 %attr(0755,snort,snort) %dir /var/log/%{name}
663 %attr(0755,snort,snort) %dir /var/log/%{name}/empty
664 %attr(0755,snort,snort) %dir /var/run/%{name}
665 %attr(0755,root,root) %dir %{_sysconfdir}/%{name}
666 %attr(0755,root,root) %dir %{_sysconfdir}/%{name}/rules
667 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/*.config
668 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/threshold.conf
669 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/*.map
670 %attr(0640,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
671 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
672 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
673 %attr(0755,root,root) %{_initrddir}/snort
674 %attr(0755,root,root) %dir %{_libdir}/pkgconfig
675 %attr(0644,root,root) %{_libdir}/pkgconfig/snort.pc
676 %attr(0755,root,root) %dir %{_libdir}/%{name}
677 %attr(0755,root,root) %dir %{_libdir}/%{name}/dynamicengine
678 %attr(0755,root,root) %dir %{_libdir}/%{name}/dynamicpreprocessor
679 #%attr(0755,root,root) %dir %{_libdir}/%{name}/dynamicrules
680 %attr(0755,root,root) %{_libdir}/%{name}/dynamicengine/libsf_engine.so
681 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_dce2_preproc.so
682 #attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_dcerpc_preproc.so
683 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_dns_preproc.so
684 #%attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/lib_sfdynamic_preprocessor_example.so
685 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_ftptelnet_preproc.so
686 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_smtp_preproc.so
687 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_ssh_preproc.so
688 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_ssl_preproc.so
689 #%attr(0755,root,root) %{_libdir}/%{name}/dynamicrules/lib_sfdynamic_example_rule.so
690 %attr(0755,root,root) %{_libdir}/%{name}/dynamicpreprocessor/libsf_sdf_preproc.so
691
692
693 %files plain+flexresp
694 %defattr(-,root,root)
695 %attr(0755,root,root) %{_sbindir}/%{name}-plain+flexresp
696
697 %files mysql
698 %defattr(-,root,root)
699 %doc schemas/create_mysql
700 %attr(0755,root,root) %{_sbindir}/%{name}-mysql
701
702 %files mysql+flexresp
703 %defattr(-,root,root)
704 %doc schemas/create_mysql
705 %attr(0755,root,root) %{_sbindir}/%{name}-mysql+flexresp
706
707 %files postgresql
708 %defattr(-,root,root)
709 %doc schemas/create_postgresql
710 %attr(0755,root,root) %{_sbindir}/%{name}-postgresql
711
712 %files postgresql+flexresp
713 %defattr(-,root,root)
714 %doc schemas/create_postgresql
715 %attr(0755,root,root) %{_sbindir}/%{name}-postgresql+flexresp
716
717 %files bloat
718 %defattr(-,root,root)
719 %attr(0755,root,root) %{_sbindir}/%{name}-bloat
720
721 %files inline
722 %defattr(-,root,root)
723 %attr(0755,root,root) %{_sbindir}/%{name}-inline
724
725 %files inline+flexresp
726 %defattr(-,root,root)
727 %attr(0755,root,root) %{_sbindir}/%{name}-inline+flexresp
728
729 %files prelude
730 %defattr(-,root,root)
731 %attr(0755,root,root) %{_sbindir}/%{name}-prelude
732
733 %files prelude+flexresp
734 %defattr(-,root,root)
735 %attr(0755,root,root) %{_sbindir}/%{name}-prelude+flexresp
736
737
738

  ViewVC Help
Powered by ViewVC 1.1.28