]> git.pld-linux.org Git - packages/snort.git/blob - snort.spec
- disable open-appid on x32
[packages/snort.git] / snort.spec
1 #
2 # TODO: - snort rules - fix description
3 #       - snort_inline - prepare separate sets of config-files, rules
4 #         and startup script, adds some docs
5 #
6 # Conditional build:
7 %bcond_with     registered      # build with rules available for registered users
8 %bcond_without  open_appid      # build without application identification support
9 #
10 %ifarch x32
11 %undefine       with_open_appid
12 %endif
13 Summary:        Network intrusion detection system (IDS/IPS)
14 Summary(pl.UTF-8):      System wykrywania intruzów w sieciach (IDS/IPS)
15 Summary(pt_BR.UTF-8):   Ferramenta de detecção de intrusos
16 Summary(ru.UTF-8):      Snort - система обнаружения попыток вторжения в сеть
17 Summary(uk.UTF-8):      Snort - система виявлення спроб вторгнення в мережу
18 Name:           snort
19 Version:        2.9.18.1
20 Release:        1
21 License:        GPL v2 (vrt rules on VRT-License)
22 Group:          Networking
23 Source0:        http://www.snort.org/downloads/snort/%{name}-%{version}.tar.gz
24 # Source0-md5:  2b4e30300ef6feca1f60c267e727c6c0
25 Source1:        http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/%{name}rules-pr-2.4.tar.gz
26 # Source1-md5:  35d9a2486f8c0280bb493aa03c011927
27 %if %{with registered}
28 Source2:        http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_os/%{name}rules-snapshot-2.6.tar.gz
29 # NoSource2-md5:        0405ec828cf9ad85a03cbf670818f690
30 NoSource:       2
31 %endif
32 Source3:        http://www.snort.org/pub-bin/downloads.cgi/Download/comm_rules/Community-Rules-2.4.tar.gz
33 # Source3-md5:  f236b8a4ac12e99d3e7bd81bf3b5a482
34 Source4:        %{name}.init
35 Source5:        %{name}.logrotate
36 Patch0:         %{name}-link.patch
37 Patch1:         %{name}-libdir.patch
38 URL:            http://www.snort.org/
39 BuildRequires:  autoconf
40 BuildRequires:  automake
41 BuildRequires:  daq-static
42 BuildRequires:  libdnet-devel
43 BuildRequires:  libnetfilter_queue-devel
44 BuildRequires:  libnet-devel
45 BuildRequires:  libnet1-devel = 1.0.2a
46 BuildRequires:  libpcap-devel
47 BuildRequires:  libtirpc-devel
48 BuildRequires:  libtool
49 %{?with_open_appid:BuildRequires:       luajit-devel}
50 BuildRequires:  openssl-devel >= 0.9.7d
51 BuildRequires:  pcre-devel
52 BuildRequires:  rpmbuild(macros) >= 1.202
53 BuildRequires:  rpmbuild(macros) >= 1.268
54 BuildRequires:  zlib-devel
55 Requires(post,preun):   /sbin/chkconfig
56 Requires(postun):       /usr/sbin/groupdel
57 Requires(postun):       /usr/sbin/userdel
58 Requires(pre):  /bin/id
59 Requires(pre):  /usr/bin/getgid
60 Requires(pre):  /usr/sbin/groupadd
61 Requires(pre):  /usr/sbin/useradd
62 Requires:       libnet1 = 1.0.2a
63 Requires:       rc-scripts >= 0.2.0
64 Provides:       group(snort)
65 Provides:       user(snort)
66 Obsoletes:      snort-rules
67 Conflicts:      logrotate < 3.7-4
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 %define         _bindir         %{_sbindir}
71
72 %description
73 Snort is an open source network intrusion detection system, capable of
74 performing real-time traffic analysis and packet logging on IP
75 networks. It can perform protocol analysis and content
76 searching/matching in order to detect a variety of attacks and probes,
77 such as buffer overflows, stealth port scans, CGI attacks, SMB probes,
78 OS fingerprinting attempts, and much more. Snort uses a flexible rules
79 language to describe traffic that it should collect or pass, as well
80 as a detection engine that utilizes a modular plugin architecture.
81 Snort has a real- time alerting capability as well, incorporating
82 alerting mechanisms for syslog, user specified files, a UNIX socket,
83 or WinPopup messages to Windows clients using Samba's smbclient.
84
85 Sourcefire VRT Certified Rules requires registration.
86 https://www.snort.org/pub-bin/register.cgi
87
88 %description -l pl.UTF-8
89 Snort to bazujący na open source NIDS (network intrusion detection
90 systems) wykonujący w czasie rzeczywistym analizę ruchu oraz logowanie
91 pakietów w sieciach IP. Jego możliwości to analiza protokołu oraz
92 zawartości w poszukiwaniu różnego rodzaju ataków lub prób takich jak
93 przepełnienia bufora, skanowanie portów typu stealth, ataki CGI,
94 próbkowanie SMB, OS fingerprinting i dużo więcej. Snort używa
95 elastycznego języka regułek do opisu ruchu, który należy
96 przeanalizować jak również silnika wykrywającego, wykorzystującego
97 modułową architekturę. Snort umożliwia alarmowanie w czasie
98 rzeczywistym poprzez sysloga, osobny plik lub jako wiadomość WinPopup
99 poprzez klienta Samby: smbclient.
100
101 Reguły certyfikowane poprzez Sourcefire wymagają rejestracji.
102 https://www.snort.org/pub-bin/register.cgi
103
104 %description -l pt_BR.UTF-8
105 Snort é um sniffer baseado em libpcap que pode ser usado como um
106 pequeno sistema de detecção de intrusos. Tem como característica o
107 registro de pacotes baseado em regras e também pode executar uma
108 análise do protocolo, pesquisa de padrões e detectar uma variedade de
109 assinaturas de ataques, como estouros de buffer, varreduras "stealth"
110 de portas, ataques CGI, pesquisas SMB, tentativas de descobrir o
111 sistema operacional e muito mais. Possui um sistema de alerta em tempo
112 real, com alertas enviados para o syslog, um arquivo de alertas em
113 separado ou como uma mensagem Winpopup.
114
115 %description -l ru.UTF-8
116 Snort - это сниффер пакетов, который может использоваться как система
117 обнаружения попыток вторжения в сеть. Snort поддерживает
118 протоколирование пакетов на основе правил, может выполнять анализ
119 протоколов, поиск в содержимом пакетов. Может также использоваться для
120 обнаружения атак и "разведок", таких как попытки атак типа
121 "переполнение буфера", скрытого сканирования портов, CGI атак, SMB
122 разведок, попыток обнаружения типа ОС и много другого. Snort может
123 информировать о событиях в реальном времени, посылая сообщения в
124 syslog, отдельный файл или как WinPopup сообщения через smbclient.
125
126 %description -l uk.UTF-8
127 Snort - це сніфер пакетів, що може використовуватись як система
128 виявлення спроб вторгнень в мережу. Snort підтримує протоколювання
129 пакетів на основі правил, може виконувати аналіз протоколів, пошук у
130 вмісті пакетів. Може також використовуватись для виявлення атак та
131 "розвідок", таких як спроби атак типу "переповнення буфера",
132 прихованого сканування портів, CGI атак, SMB розвідок, спроб виявлення
133 типу ОС та багато іншого. Snort може інформувати про події в реальному
134 часі, надсилаючи повідомлення до syslog, окремого файлу чи як WinPopup
135 повідомлення через smbclient.
136
137 %prep
138 %setup -q %{!?with_registered:-a1} %{?with_registered:-a2} -a3
139 %patch0 -p1
140 %patch1 -p1
141
142 sed -i "s#var\ RULE_PATH.*#var RULE_PATH /etc/snort/rules#g" rules/snort.conf
143 _DIR=$(pwd)
144 cd rules
145 for I in community-*.rules; do
146         echo "include \$RULE_PATH/$I" >> snort.conf
147 done
148 cd $_DIR
149
150 %build
151 export CFLAGS="%{rpmcflags} -I/usr/include/tirpc"
152 %{__libtoolize}
153 %{__aclocal} -I m4
154 %{__autoconf}
155 %{__automake}
156 # we don't need libnsl, so don't use it
157 %configure \
158         no_libnsl=yes \
159         %{!?with_open_appid:--disable-open-appid} \
160         --enable-pthread \
161         --enable-so-with-static-lib \
162         --enable-control-socket \
163         --enable-side-channel \
164         --enable-build-dynamic-examples
165
166 %{__make}
167 %{__make} -C src/dynamic-plugins/sf_engine/examples
168
169 %install
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT%{_initrddir} \
172         $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},cron.daily,logrotate.d} \
173         $RPM_BUILD_ROOT%{_var}/log/{%{name},archive/%{name}} \
174         $RPM_BUILD_ROOT%{_datadir}/mibs/site \
175         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/rules
176
177 %{__make} install \
178         DESTDIR=$RPM_BUILD_ROOT
179
180 install rules/*.config  $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
181 install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
182 install rules/*.rules   $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/rules
183 install %{SOURCE4}      $RPM_BUILD_ROOT%{_initrddir}/%{name}
184 install %{SOURCE5}      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
185 install rules/snort.conf        $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %pre
191 %groupadd -g 46 -r snort
192 %useradd -u 46 -g snort -M -r -d %{_var}/log/snort -s /bin/false -c "SNORT IDS/IPS" snort
193
194 %post
195 /sbin/chkconfig --add snort
196 %service snort restart
197
198 %preun
199 if [ "$1" = "0" ] ; then
200         %service snort stop
201         /sbin/chkconfig --del snort
202 fi
203
204 %postun
205 if [ "$1" = "0" ] ; then
206         %userremove snort
207         %groupremove snort
208 fi
209
210 %files
211 %defattr(644,root,root,755)
212 %doc doc/{AUTHORS,BUGS,CREDITS,INSTALL,NEWS,PROBLEMS,README*,TODO,USAGE,WISHLIST,generators,*.pdf}
213 %attr(755,root,root) %{_sbindir}/*
214 %attr(770,root,snort) %dir %{_var}/log/%{name}
215 %attr(770,root,snort) %dir %{_var}/log/archive/%{name}
216 %attr(750,root,snort) %dir %{_sysconfdir}/%{name}
217 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unicode.map
218 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.config
219 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
220 %attr(750,root,snort) %dir %{_sysconfdir}/%{name}/rules
221 %attr(640,root,snort) %{_sysconfdir}/%{name}/rules/*
222 %attr(754,root,root) %{_initrddir}/%{name}
223 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
224 %{_mandir}/man?/*
225 %dir %{_libdir}/snort_dynamicengine
226 %dir %{_libdir}/snort_dynamicpreprocessor
227 %dir %{_libdir}/snort_dynamicrules
228 %attr(755,root,root) %{_libdir}/snort_dynamicengine/libsf_engine.so*
229 %attr(755,root,root) %{_libdir}/snort_dynamicpreprocessor/*.so*
230 %attr(755,root,root) %{_libdir}/snort_dynamicrules/lib_sfdynamic_example_rule.so*
This page took 0.205661 seconds and 4 git commands to generate.