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