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