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