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