]> git.pld-linux.org Git - packages/snort.git/blob - snort.spec
- rules update
[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 %define         _rules_ver      2_2
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.2.0
16 Release:        2
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:  6194278217e4e3f733b046256a31f0e6
22 Source1:        http://www.snort.org/dl/rules/snortrules-snapshot-%{_rules_ver}.tar.gz
23 # Source1-md5:  9e224964c113cb007b4beac8f4c3b57c
24 Source2:        %{name}.init
25 Source3:        %{name}.logrotate
26 Source4:        %{name}.conf
27 Patch0:         %{name}-libnet1.patch
28 Patch1:         %{name}-lib64.patch
29 URL:            http://www.snort.org/
30 BuildRequires:  autoconf
31 BuildRequires:  automake
32 BuildRequires:  libnet1-devel = 1.0.2a
33 BuildRequires:  libpcap-devel
34 %{?with_mysql:BuildRequires:    mysql-devel}
35 %{?with_snmp:BuildRequires:     net-snmp-devel >= 5.0.7}
36 BuildRequires:  openssl-devel >= 0.9.7d
37 BuildRequires:  pcre-devel
38 %{?with_pgsql:BuildRequires:    postgresql-devel}
39 BuildRequires:  rpmbuild(macros) >= 1.159
40 BuildRequires:  zlib-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 %description -l pl
73 Snort to bazuj±cy na open source NIDS (network intrusion detection
74 systems) wykonuj±cy w czasie rzeczywistym analizê ruchu oraz logowanie
75 pakietów w sieciach IP. Jego mo¿liwo¶ci to analiza protoko³u oraz
76 zawarto¶ci w poszukiwaniu ró¿nego rodzaju ataków lub prób takich jak
77 przepe³nienia bufora, skanowanie portów typu stealth, ataki CGI,
78 próbkowanie SMB, OS fingerprinting i du¿o wiêcej. Snort u¿ywa
79 elastycznego jêzyka regu³ek do opisu ruchu, który nale¿y
80 przeanalizowaæ jak równie¿ silnika wykrywaj±cego, wykorzystuj±cego
81 modu³ow± architekturê. Snort umo¿liwia alarmowanie w czasie
82 rzeczywistym poprzez sysloga, osobny plik lub jako wiadomo¶æ WinPopup
83 poprzez klienta Samby: smbclient.
84
85 %description -l pt_BR
86 Snort é um sniffer baseado em libpcap que pode ser usado como um
87 pequeno sistema de detecção de intrusos. Tem como característica o
88 registro de pacotes baseado em regras e também pode executar uma
89 análise do protocolo, pesquisa de padrões e detectar uma variedade de
90 assinaturas de ataques, como estouros de buffer, varreduras "stealth"
91 de portas, ataques CGI, pesquisas SMB, tentativas de descobrir o
92 sistema operacional e muito mais. Possui um sistema de alerta em tempo
93 real, com alertas enviados para o syslog, um arquivo de alertas em
94 separado ou como uma mensagem Winpopup.
95
96 %description -l ru
97 Snort - ÜÔÏ ÓÎÉÆÆÅÒ ÐÁËÅÔÏ×, ËÏÔÏÒÙÊ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ËÁË ÓÉÓÔÅÍÁ
98 ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ. Snort ÐÏÄÄÅÒÖÉ×ÁÅÔ
99 ÐÒÏÔÏËÏÌÉÒÏ×ÁÎÉÅ ÐÁËÅÔÏ× ÎÁ ÏÓÎÏ×Å ÐÒÁ×ÉÌ, ÍÏÖÅÔ ×ÙÐÏÌÎÑÔØ ÁÎÁÌÉÚ
100 ÐÒÏÔÏËÏÌÏ×, ÐÏÉÓË × ÓÏÄÅÒÖÉÍÏÍ ÐÁËÅÔÏ×. íÏÖÅÔ ÔÁËÖÅ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ÄÌÑ
101 ÏÂÎÁÒÕÖÅÎÉÑ ÁÔÁË É "ÒÁÚ×ÅÄÏË", ÔÁËÉÈ ËÁË ÐÏÐÙÔËÉ ÁÔÁË ÔÉÐÁ
102 "ÐÅÒÅÐÏÌÎÅÎÉÅ ÂÕÆÅÒÁ", ÓËÒÙÔÏÇÏ ÓËÁÎÉÒÏ×ÁÎÉÑ ÐÏÒÔÏ×, CGI ÁÔÁË, SMB
103 ÒÁÚ×ÅÄÏË, ÐÏÐÙÔÏË ÏÂÎÁÒÕÖÅÎÉÑ ÔÉÐÁ ïó É ÍÎÏÇÏ ÄÒÕÇÏÇÏ. Snort ÍÏÖÅÔ
104 ÉÎÆÏÒÍÉÒÏ×ÁÔØ Ï ÓÏÂÙÔÉÑÈ × ÒÅÁÌØÎÏÍ ×ÒÅÍÅÎÉ, ÐÏÓÙÌÁÑ ÓÏÏÂÝÅÎÉÑ ×
105 syslog, ÏÔÄÅÌØÎÙÊ ÆÁÊÌ ÉÌÉ ËÁË WinPopup ÓÏÏÂÝÅÎÉÑ ÞÅÒÅÚ smbclient.
106
107 %description -l uk
108 Snort - ÃÅ ÓΦÆÅÒ ÐÁËÅÔ¦×, ÝÏ ÍÏÖÅ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÑË ÓÉÓÔÅÍÁ
109 ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎØ × ÍÅÒÅÖÕ. Snort Ð¦ÄÔÒÉÍÕ¤ ÐÒÏÔÏËÏÌÀ×ÁÎÎÑ
110 ÐÁËÅԦנÎÁ ÏÓÎÏצ ÐÒÁ×ÉÌ, ÍÏÖÅ ×ÉËÏÎÕ×ÁÔÉ ÁÎÁ̦ڠÐÒÏÔÏËÏ̦×, ÐÏÛÕË Õ
111 ×ͦÓÔ¦ ÐÁËÅÔ¦×. íÏÖÅ ÔÁËÏÖ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÄÌÑ ×ÉÑ×ÌÅÎÎÑ ÁÔÁË ÔÁ
112 "ÒÏÚצÄÏË", ÔÁËÉÈ ÑË ÓÐÒÏÂÉ ÁÔÁË ÔÉÐÕ "ÐÅÒÅÐÏ×ÎÅÎÎÑ ÂÕÆÅÒÁ",
113 ÐÒÉÈÏ×ÁÎÏÇÏ ÓËÁÎÕ×ÁÎÎÑ ÐÏÒÔ¦×, CGI ÁÔÁË, SMB ÒÏÚצÄÏË, ÓÐÒÏ ×ÉÑ×ÌÅÎÎÑ
114 ÔÉÐÕ ïó ÔÁ ÂÁÇÁÔÏ ¦ÎÛÏÇÏ. Snort ÍÏÖÅ ¦ÎÆÏÒÍÕ×ÁÔÉ ÐÒÏ ÐÏĦ§ × ÒÅÁÌØÎÏÍÕ
115 ÞÁÓ¦, ÎÁÄÓÉÌÁÀÞÉ ÐÏצÄÏÍÌÅÎÎÑ ÄÏ syslog, ÏËÒÅÍÏÇÏ ÆÁÊÌÕ ÞÉ ÑË WinPopup
116 ÐÏצÄÏÍÌÅÎÎÑ ÞÅÒÅÚ smbclient.
117
118 %prep
119 %setup -q -a1
120 %patch0 -p1
121 %if "%{_libdir}" == "%{_prefix}/lib64"
122 %patch1
123 %endif
124
125 %build
126 %{__aclocal}
127 %{__autoconf}
128 %{__automake}
129 # we don't need libnsl, so don't use it
130 %configure \
131         no_libnsl=yes \
132         --enable-smbalerts \
133         --enable-flexresp \
134         --with-libnet-includes=/usr/include/libnet1 \
135         --with%{!?with_snmp:out}-snmp \
136         --without-odbc \
137         --with%{!?with_pgsql:out}-postgresql \
138         --with%{!?with_mysql:out}-mysql
139
140 %{__make}
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},cron.daily,logrotate.d} \
145         $RPM_BUILD_ROOT%{_var}/log/{%{name},archiv/%{name}} \
146         $RPM_BUILD_ROOT%{_datadir}/mibs/site \
147         $RPM_BUILD_ROOT%{_sysconfdir}/rules
148
149 %{__make} install \
150         DESTDIR=$RPM_BUILD_ROOT
151
152 install rules/*.config  $RPM_BUILD_ROOT%{_sysconfdir}
153 install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}
154 install rules/*.rules   $RPM_BUILD_ROOT%{_sysconfdir}/rules
155 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
156 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
157 install %{SOURCE4}      $RPM_BUILD_ROOT%{_sysconfdir}
158
159 %clean
160 rm -rf $RPM_BUILD_ROOT
161
162 %pre
163 if [ -n "`/usr/bin/getgid snort`" ]; then
164         if [ "`/usr/bin/getgid snort`" != "46" ]; then
165                 echo "Error: group snort doesn't have gid=46. Correct this before installing %{name}." 1>&2
166                 exit 1
167         fi
168 else
169         /usr/sbin/groupadd -g 46 -r snort 1>&2
170 fi
171 if [ -n "`/bin/id -u snort 2>/dev/null`" ]; then
172         if [ "`/bin/id -u snort`" != "46" ]; then
173                 echo "Error: user snort doesn't have uid=46. Correct this before installing %{name}." 1>&2
174                 exit 1
175         fi
176 else
177         /usr/sbin/useradd -u 46 -g snort -M -r -d %{_var}/log/snort \
178                 -s /bin/false -c "SNORT" snort 1>&2
179 fi
180
181 %post
182 if [ "$1" = "1" ] ; then
183         /sbin/chkconfig --add snort
184 fi
185 if [ -f /var/lock/subsys/snort ]; then
186         /etc/rc.d/init.d/snort restart 1>&2
187 else
188         echo "Run \"/etc/rc.d/init.d/snort start\" to start Snort daemon."
189 fi
190
191
192 %preun
193 if [ "$1" = "0" ] ; then
194         if [ -f /var/lock/subsys/snort ]; then
195                 /etc/rc.d/init.d/snort stop 1>&2
196         fi
197         /sbin/chkconfig --del snort
198 fi
199
200 %postun
201 if [ "$1" = "0" ] ; then
202         %userremove snort
203         %groupremove snort
204 fi
205
206 %files
207 %defattr(644,root,root,755)
208 %doc doc/{AUTHORS,BUGS,CREDITS,FAQ,NEWS,README*,TODO,USAGE}
209 %doc contrib/create* doc/*.pdf
210 %attr(755,root,root) %{_sbindir}/*
211 %attr(770,root,snort) %dir %{_var}/log/snort
212 %attr(770,root,snort) %dir %{_var}/log/archiv/%{name}
213 %attr(750,root,snort) %dir %{_sysconfdir}
214 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/unicode.map
215 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.config
216 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort.conf
217 %attr(750,root,snort) %dir %{_sysconfdir}/rules
218 %attr(640,root,snort) %{_sysconfdir}/rules/*
219 %attr(750,root,root) /etc/rc.d/init.d/%{name}
220 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
221 %{_mandir}/man?/*
This page took 0.045227 seconds and 4 git commands to generate.