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