]> git.pld-linux.org Git - packages/snort.git/blob - snort.spec
- release 0.rc1.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.0
16 %define rcver   rc1
17 Release:        0.%{rcver}.1
18 License:        GPL
19 Vendor:         Marty Roesch <roesch@sourcefire.com>
20 Group:          Networking
21 Source0:        http://www.snort.org/dl/%{name}-%{version}%{rcver}.tar.gz
22 # snort rules from: Sat Oct 26 14:15:30 2002 GMT
23 Source1:        http://www.snort.org/dl/signatures/%{name}rules-stable.tar.gz
24 Source2:        %{name}.init
25 Source3:        %{name}.logrotate
26 URL:            http://www.snort.org/
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  libnet-devel
30 BuildRequires:  libpcap-devel
31 %{!?_without_mysql:BuildRequires:       mysql-devel}
32 %{!?_without_snmp:BuildRequires:        net-snmp-devel >= 5.0.7}
33 BuildRequires:  openssl-devel >= 0.9.7
34 %{!?_without_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 %{!?_without_mysql:Provides:    snort(mysql) = %{version}}
45 %{!?_without_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 -n %{name}-%{version}%{rcver}
112
113 %build
114 rm -f missing
115 %{__aclocal}
116 %{__autoconf}
117 %{__automake}
118 # we don't need libnsl, so don't use it
119 no_libnsl=yes; export no_libnsl
120 %configure \
121         --enable-smbalerts \
122         --enable-flexresp \
123         --with%{?_without_snmp:out}-snmp \
124         --without-odbc \
125         --with%{?_without_pgsql:out}-postgresql \
126         --with%{?_without_mysql:out}-mysql
127
128 %{__make}
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},cron.daily,logrotate.d} \
133         $RPM_BUILD_ROOT%{_var}/log/{%{name},archiv/%{name}} \
134         $RPM_BUILD_ROOT%{_datadir}/mibs/site
135
136 %{__make} install \
137         DESTDIR=$RPM_BUILD_ROOT
138
139 install etc/*MIB*.txt   $RPM_BUILD_ROOT%{_datadir}/mibs/site
140 install etc/snort.conf  $RPM_BUILD_ROOT%{_sysconfdir}
141 install rules/*.{rules,config}          $RPM_BUILD_ROOT%{_sysconfdir}
142 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
143 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %pre
149 if [ -z "`getgid %{name}`" ]; then
150         /usr/sbin/groupadd -g 46 -r snort 2> /dev/null || true
151 fi
152
153 if [ -z "`id -u %{name} 2>/dev/null`" ]; then
154         /usr/sbin/useradd -u 46 -g %{name} -M -r -d %{_var}/log/%{name} -s /bin/false \
155                 -c "SNORT" snort 2> /dev/null || true
156 fi
157
158 %post
159 if [ "$1" = "1" ] ; then
160         /sbin/chkconfig --add snort
161         touch %{_var}/log/%{name} && chown snort.snort %{_var}/log/%{name}
162 fi
163
164 %preun
165 if [ "$1" = "0" ] ; then
166         if [ -f /var/lock/subsys/snort ]; then
167                 /etc/rc.d/init.d/snort stop 1>&2
168         fi
169         /sbin/chkconfig --del snort
170 fi
171
172 %postun
173 if [ "$1" = "0" ] ; then
174         /usr/sbin/userdel snort 2> /dev/null || true
175         /usr/sbin/groupdel snort 2> /dev/null || true
176 fi
177
178 %files
179 %defattr(644,root,root,755)
180 %doc doc/{AUTHORS,BUGS,CREDITS,FAQ,NEWS,README*,RULES*,TODO,USAGE}
181 %doc contrib/create* doc/*.pdf
182 %attr(755,root,root)  %{_sbindir}/*
183 %attr(770,root,snort) %dir %{_var}/log/%{name}
184 %attr(770,root,snort) %dir %{_var}/log/archiv/%{name}
185 %attr(750,root,snort) %dir %{_sysconfdir}
186 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
187 %attr(754,root,root)  /etc/rc.d/init.d/%{name}
188 %attr(640,root,root)  /etc/logrotate.d/*
189 %{_datadir}/mibs/site/*.txt
190 %{_mandir}/man?/*
This page took 0.319812 seconds and 3 git commands to generate.