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