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