]> git.pld-linux.org Git - packages/snort.git/blob - snort.spec
- 2.4.4 rel 1
[packages/snort.git] / snort.spec
1 #
2 # TODO: - snort rules - fix description
3 #
4 # Conditional build:
5 %bcond_without  pgsql   # build without PostgreSQL storage support
6 %bcond_without  mysql   # build without MySQL storage support
7 %bcond_without  snmp    # build without SNMP support
8 %bcond_without  inline  # build without inline support
9 %bcond_without  prelude # build without prelude support
10 #
11 Summary:        Network intrusion detection system (IDS/IPS)
12 Summary(pl):    System wykrywania intruzów w sieciach (IDS/IPS)
13 Summary(pt_BR): Ferramenta de detecção de intrusos
14 Summary(ru):    Snort - ÓÉÓÔÅÍÁ ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ
15 Summary(uk):    Snort - ÓÉÓÔÅÍÁ ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎÎÑ × ÍÅÒÅÖÕ
16 Name:           snort
17 Version:        2.4.4
18 Release:        1
19 License:        GPL v2
20 Group:          Networking
21 Source0:        http://www.snort.org/dl/current/%{name}-%{version}.tar.gz
22 # Source0-md5:  9dc9060d1f2e248663eceffadfc45e7e
23 Source1:        http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/%{name}rules-pr-2.4.tar.gz
24 # Source1-md5:  35d9a2486f8c0280bb493aa03c011927
25 Source2:        %{name}.init
26 Source3:        %{name}.logrotate
27 Source4:        %{name}.conf
28 Patch0:         %{name}-libnet1.patch
29 Patch1:         %{name}-lib64.patch
30 URL:            http://www.snort.org/
31 BuildRequires:  autoconf
32 BuildRequires:  automake
33 %{?with_inline:BuildRequires:   iptables-devel}
34 BuildRequires:  libnet1-devel = 1.0.2a
35 BuildRequires:  libpcap-devel
36 %{?with_prelude:BuildRequires:  libprelude-devel}
37 %{?with_mysql:BuildRequires:    mysql-devel}
38 %{?with_snmp:BuildRequires:     net-snmp-devel >= 5.0.7}
39 BuildRequires:  openssl-devel >= 0.9.7d
40 BuildRequires:  pcre-devel
41 %{?with_pgsql:BuildRequires:    postgresql-devel}
42 BuildRequires:  rpmbuild(macros) >= 1.202
43 BuildRequires:  rpmbuild(macros) >= 1.268
44 BuildRequires:  zlib-devel
45 Requires(post,preun):   /sbin/chkconfig
46 Requires(postun):       /usr/sbin/groupdel
47 Requires(postun):       /usr/sbin/userdel
48 Requires(pre):  /bin/id
49 Requires(pre):  /usr/bin/getgid
50 Requires(pre):  /usr/sbin/groupadd
51 Requires(pre):  /usr/sbin/useradd
52 Requires:       libnet1 = 1.0.2a
53 Requires:       rc-scripts >= 0.2.0
54 Provides:       group(snort)
55 %{?with_mysql:Provides: snort(mysql) = %{version}}
56 %{?with_pgsql:Provides: snort(pgsql) = %{version}}
57 Provides:       user(snort)
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define         _sysconfdir     /etc/snort
61 %define         _bindir         %{_sbindir}
62
63 %description
64 Snort is an open source network intrusion detection system, capable of
65 performing real-time traffic analysis and packet logging on IP
66 networks. It can perform protocol analysis and content
67 searching/matching in order to detect a variety of attacks and probes,
68 such as buffer overflows, stealth port scans, CGI attacks, SMB probes,
69 OS fingerprinting attempts, and much more. Snort uses a flexible rules
70 language to describe traffic that it should collect or pass, as well
71 as a detection engine that utilizes a modular plugin architecture.
72 Snort has a real- time alerting capability as well, incorporating
73 alerting mechanisms for syslog, user specified files, a UNIX socket,
74 or WinPopup messages to Windows clients using Samba's smbclient.
75
76 Sourcefire VRT Certified Rules requires registration.
77 https://www.snort.org/pub-bin/register.cgi
78
79 %description -l pl
80 Snort to bazuj±cy na open source NIDS (network intrusion detection
81 systems) wykonuj±cy w czasie rzeczywistym analizê ruchu oraz logowanie
82 pakietów w sieciach IP. Jego mo¿liwo¶ci to analiza protoko³u oraz
83 zawarto¶ci w poszukiwaniu ró¿nego rodzaju ataków lub prób takich jak
84 przepe³nienia bufora, skanowanie portów typu stealth, ataki CGI,
85 próbkowanie SMB, OS fingerprinting i du¿o wiêcej. Snort u¿ywa
86 elastycznego jêzyka regu³ek do opisu ruchu, który nale¿y
87 przeanalizowaæ jak równie¿ silnika wykrywaj±cego, wykorzystuj±cego
88 modu³ow± architekturê. Snort umo¿liwia alarmowanie w czasie
89 rzeczywistym poprzez sysloga, osobny plik lub jako wiadomo¶æ WinPopup
90 poprzez klienta Samby: smbclient.
91
92 Regu³y certyfikowane poprzez Sourcefire wymagaj± rejestracji.
93 https://www.snort.org/pub-bin/register.cgi
94
95 %description -l pt_BR
96 Snort é um sniffer baseado em libpcap que pode ser usado como um
97 pequeno sistema de detecção de intrusos. Tem como característica o
98 registro de pacotes baseado em regras e também pode executar uma
99 análise do protocolo, pesquisa de padrões e detectar uma variedade de
100 assinaturas de ataques, como estouros de buffer, varreduras "stealth"
101 de portas, ataques CGI, pesquisas SMB, tentativas de descobrir o
102 sistema operacional e muito mais. Possui um sistema de alerta em tempo
103 real, com alertas enviados para o syslog, um arquivo de alertas em
104 separado ou como uma mensagem Winpopup.
105
106 %description -l ru
107 Snort - ÜÔÏ ÓÎÉÆÆÅÒ ÐÁËÅÔÏ×, ËÏÔÏÒÙÊ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ËÁË ÓÉÓÔÅÍÁ
108 ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ. Snort ÐÏÄÄÅÒÖÉ×ÁÅÔ
109 ÐÒÏÔÏËÏÌÉÒÏ×ÁÎÉÅ ÐÁËÅÔÏ× ÎÁ ÏÓÎÏ×Å ÐÒÁ×ÉÌ, ÍÏÖÅÔ ×ÙÐÏÌÎÑÔØ ÁÎÁÌÉÚ
110 ÐÒÏÔÏËÏÌÏ×, ÐÏÉÓË × ÓÏÄÅÒÖÉÍÏÍ ÐÁËÅÔÏ×. íÏÖÅÔ ÔÁËÖÅ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ÄÌÑ
111 ÏÂÎÁÒÕÖÅÎÉÑ ÁÔÁË É "ÒÁÚ×ÅÄÏË", ÔÁËÉÈ ËÁË ÐÏÐÙÔËÉ ÁÔÁË ÔÉÐÁ
112 "ÐÅÒÅÐÏÌÎÅÎÉÅ ÂÕÆÅÒÁ", ÓËÒÙÔÏÇÏ ÓËÁÎÉÒÏ×ÁÎÉÑ ÐÏÒÔÏ×, CGI ÁÔÁË, SMB
113 ÒÁÚ×ÅÄÏË, ÐÏÐÙÔÏË ÏÂÎÁÒÕÖÅÎÉÑ ÔÉÐÁ ïó É ÍÎÏÇÏ ÄÒÕÇÏÇÏ. Snort ÍÏÖÅÔ
114 ÉÎÆÏÒÍÉÒÏ×ÁÔØ Ï ÓÏÂÙÔÉÑÈ × ÒÅÁÌØÎÏÍ ×ÒÅÍÅÎÉ, ÐÏÓÙÌÁÑ ÓÏÏÂÝÅÎÉÑ ×
115 syslog, ÏÔÄÅÌØÎÙÊ ÆÁÊÌ ÉÌÉ ËÁË WinPopup ÓÏÏÂÝÅÎÉÑ ÞÅÒÅÚ smbclient.
116
117 %description -l uk
118 Snort - ÃÅ ÓΦÆÅÒ ÐÁËÅÔ¦×, ÝÏ ÍÏÖÅ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÑË ÓÉÓÔÅÍÁ
119 ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎØ × ÍÅÒÅÖÕ. Snort Ð¦ÄÔÒÉÍÕ¤ ÐÒÏÔÏËÏÌÀ×ÁÎÎÑ
120 ÐÁËÅԦנÎÁ ÏÓÎÏצ ÐÒÁ×ÉÌ, ÍÏÖÅ ×ÉËÏÎÕ×ÁÔÉ ÁÎÁ̦ڠÐÒÏÔÏËÏ̦×, ÐÏÛÕË Õ
121 ×ͦÓÔ¦ ÐÁËÅÔ¦×. íÏÖÅ ÔÁËÏÖ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÄÌÑ ×ÉÑ×ÌÅÎÎÑ ÁÔÁË ÔÁ
122 "ÒÏÚצÄÏË", ÔÁËÉÈ ÑË ÓÐÒÏÂÉ ÁÔÁË ÔÉÐÕ "ÐÅÒÅÐÏ×ÎÅÎÎÑ ÂÕÆÅÒÁ",
123 ÐÒÉÈÏ×ÁÎÏÇÏ ÓËÁÎÕ×ÁÎÎÑ ÐÏÒÔ¦×, CGI ÁÔÁË, SMB ÒÏÚצÄÏË, ÓÐÒÏ ×ÉÑ×ÌÅÎÎÑ
124 ÔÉÐÕ ïó ÔÁ ÂÁÇÁÔÏ ¦ÎÛÏÇÏ. Snort ÍÏÖÅ ¦ÎÆÏÒÍÕ×ÁÔÉ ÐÒÏ ÐÏĦ§ × ÒÅÁÌØÎÏÍÕ
125 ÞÁÓ¦, ÎÁÄÓÉÌÁÀÞÉ ÐÏצÄÏÍÌÅÎÎÑ ÄÏ syslog, ÏËÒÅÍÏÇÏ ÆÁÊÌÕ ÞÉ ÑË WinPopup
126 ÐÏצÄÏÍÌÅÎÎÑ ÞÅÒÅÚ smbclient.
127
128 %package rules
129 Summary:        Snort rules
130 Summary(pl):    Regu³ki snorta
131 Group:          Networking
132 Requires:       %{name} = %{version}-%{release}
133
134 %description rules
135 Snort rules.
136
137 %description rules -l pl
138 Regu³ki snorta.
139
140 %prep
141 %setup -q -a1
142 %patch0 -p1
143 %if "%{_lib}" == "lib64"
144 %patch1 -p1
145 %endif
146
147 %build
148 %{__aclocal}
149 %{__autoconf}
150 %{__automake}
151 # we don't need libnsl, so don't use it
152 %configure \
153         no_libnsl=yes \
154         --enable-smbalerts \
155         --enable-flexresp \
156         %{?with_inline:--enable-inline } \
157         %{?with_inline:--with-libipq-includes=%{_includedir}/libipq }  \
158         --with-libnet-includes=%{_includedir} \
159         --with%{!?with_snmp:out}-snmp \
160         --without-odbc \
161         --enable-perfmonitor \
162         --with%{!?with_pgsql:out}-postgresql \
163         --with%{!?with_mysql:out}-mysql \
164         %{?with_prelude:--enable-prelude }
165
166 %{__make}
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},cron.daily,logrotate.d} \
171         $RPM_BUILD_ROOT%{_var}/log/{%{name},archiv/%{name}} \
172         $RPM_BUILD_ROOT%{_datadir}/mibs/site \
173         $RPM_BUILD_ROOT%{_sysconfdir}/rules
174
175 %{__make} install \
176         DESTDIR=$RPM_BUILD_ROOT
177
178 install rules/*.config  $RPM_BUILD_ROOT%{_sysconfdir}
179 install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}
180 install rules/*.rules   $RPM_BUILD_ROOT%{_sysconfdir}/rules
181 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
182 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
183 install %{SOURCE4}      $RPM_BUILD_ROOT%{_sysconfdir}
184
185 mv schemas/create_mysql schemas/create_mysql.sql
186 mv schemas/create_postgresql schemas/create_postgresql.sql
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %pre
192 %groupadd -g 46 -r snort
193 %useradd -u 46 -g snort -M -r -d %{_var}/log/snort -s /bin/false -c "SNORT IDS/IPS" snort
194
195 %post
196 /sbin/chkconfig --add snort
197 %service snort restart
198 if [ "$1" = 1 ]; then
199         %banner -e %{name} <<-EOF
200         To run snort you must download and install snort rules.
201         poldek -u snort-rules or download from http://www.snort.org/
202 EOF
203 fi
204
205
206 %preun
207 if [ "$1" = "0" ] ; then
208         %service snort stop
209         /sbin/chkconfig --del snort
210 fi
211
212 %postun
213 if [ "$1" = "0" ] ; then
214         %userremove snort
215         %groupremove snort
216 fi
217
218 %files
219 %defattr(644,root,root,755)
220 %doc doc/{AUTHORS,BUGS,CREDITS,NEWS,PROBLEMS,README*,RULES.todo,TODO,USAGE,WISHLIST,*.pdf}
221 %doc schemas/create_{mysql,postgresql}.sql
222 %attr(755,root,root) %{_sbindir}/*
223 %attr(770,root,snort) %dir %{_var}/log/snort
224 %attr(770,root,snort) %dir %{_var}/log/archiv/%{name}
225 %attr(750,root,snort) %dir %{_sysconfdir}
226 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/unicode.map
227 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.config
228 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort.conf
229 %attr(750,root,snort) %dir %{_sysconfdir}/rules
230 %attr(754,root,root) /etc/rc.d/init.d/%{name}
231 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
232 %{_mandir}/man?/*
233
234 %files rules
235 %defattr(644,root,root,755)
236 %attr(640,root,snort) %{_sysconfdir}/rules/*
This page took 0.739301 seconds and 3 git commands to generate.