]> git.pld-linux.org Git - packages/snort.git/blob - snort.spec
- init perms unified
[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 Summary:        Network intrusion detection system (IDS/IPS)
9 Summary(pl):    System wykrywania intruzów w sieciach (IDS/IPS)
10 Summary(pt_BR): Ferramenta de detecção de intrusos
11 Summary(ru):    Snort - ÓÉÓÔÅÍÁ ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ
12 Summary(uk):    Snort - ÓÉÓÔÅÍÁ ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎÎÑ × ÍÅÒÅÖÕ
13 Name:           snort
14 Version:        2.3.0
15 Release:        1
16 License:        GPL
17 Vendor:         Marty Roesch <roesch@sourcefire.com>
18 Group:          Networking
19 Source0:        http://www.snort.org/dl/%{name}-%{version}.tar.gz
20 # Source0-md5:  89cdc22af9516cbafc359b452819947e
21 Source1:        http://www.snort.org/dl/rules/snortrules-snapshot-2_3.tar.gz
22 # Source1-md5:  d8bace8bd5210d1fbf4eb5c7ac460d70
23 Source2:        %{name}.init
24 Source3:        %{name}.logrotate
25 Source4:        %{name}.conf
26 Patch0:         %{name}-libnet1.patch
27 Patch1:         %{name}-lib64.patch
28 URL:            http://www.snort.org/
29 BuildRequires:  autoconf
30 BuildRequires:  automake
31 BuildRequires:  libnet1-devel = 1.0.2a
32 BuildRequires:  libpcap-devel
33 %{?with_mysql:BuildRequires:    mysql-devel}
34 %{?with_snmp:BuildRequires:     net-snmp-devel >= 5.0.7}
35 BuildRequires:  openssl-devel >= 0.9.7d
36 BuildRequires:  pcre-devel
37 %{?with_pgsql:BuildRequires:    postgresql-devel}
38 BuildRequires:  rpmbuild(macros) >= 1.159
39 BuildRequires:  zlib-devel
40 %{?with_inline:BuildRequires:   iptables-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_inline:--enable-inline } \
135         %{?with_inline:--with-libipq-includes=/usr/include/libipq}  \
136         --with-libnet-includes=/usr/include/libnet1 \
137         --with%{!?with_snmp:out}-snmp \
138         --without-odbc \
139         --with%{!?with_pgsql:out}-postgresql \
140         --with%{!?with_mysql:out}-mysql
141
142 %{__make}
143
144 %install
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},cron.daily,logrotate.d} \
147         $RPM_BUILD_ROOT%{_var}/log/{%{name},archiv/%{name}} \
148         $RPM_BUILD_ROOT%{_datadir}/mibs/site \
149         $RPM_BUILD_ROOT%{_sysconfdir}/rules
150
151 %{__make} install \
152         DESTDIR=$RPM_BUILD_ROOT
153
154 install rules/*.config  $RPM_BUILD_ROOT%{_sysconfdir}
155 install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}
156 install rules/*.rules   $RPM_BUILD_ROOT%{_sysconfdir}/rules
157 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
158 install %{SOURCE3}      $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
159 install %{SOURCE4}      $RPM_BUILD_ROOT%{_sysconfdir}
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %pre
165 if [ -n "`/usr/bin/getgid snort`" ]; then
166         if [ "`/usr/bin/getgid snort`" != "46" ]; then
167                 echo "Error: group snort doesn't have gid=46. Correct this before installing %{name}." 1>&2
168                 exit 1
169         fi
170 else
171         /usr/sbin/groupadd -g 46 -r snort 1>&2
172 fi
173 if [ -n "`/bin/id -u snort 2>/dev/null`" ]; then
174         if [ "`/bin/id -u snort`" != "46" ]; then
175                 echo "Error: user snort doesn't have uid=46. Correct this before installing %{name}." 1>&2
176                 exit 1
177         fi
178 else
179         /usr/sbin/useradd -u 46 -g snort -M -r -d %{_var}/log/snort \
180                 -s /bin/false -c "SNORT" snort 1>&2
181 fi
182
183 %post
184 if [ "$1" = "1" ] ; then
185         /sbin/chkconfig --add snort
186 fi
187 if [ -f /var/lock/subsys/snort ]; then
188         /etc/rc.d/init.d/snort restart 1>&2
189 else
190         echo "Run \"/etc/rc.d/init.d/snort start\" to start Snort daemon."
191 fi
192
193
194 %preun
195 if [ "$1" = "0" ] ; then
196         if [ -f /var/lock/subsys/snort ]; then
197                 /etc/rc.d/init.d/snort stop 1>&2
198         fi
199         /sbin/chkconfig --del snort
200 fi
201
202 %postun
203 if [ "$1" = "0" ] ; then
204         %userremove snort
205         %groupremove snort
206 fi
207
208 %files
209 %defattr(644,root,root,755)
210 %doc doc/{AUTHORS,BUGS,CREDITS,NEWS,PROBLEMS,README*,RULES.todo,TODO,USAGE,WISHLIST,*.pdf}
211 %attr(755,root,root) %{_sbindir}/*
212 %attr(770,root,snort) %dir %{_var}/log/snort
213 %attr(770,root,snort) %dir %{_var}/log/archiv/%{name}
214 %attr(750,root,snort) %dir %{_sysconfdir}
215 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/unicode.map
216 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.config
217 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort.conf
218 %attr(750,root,snort) %dir %{_sysconfdir}/rules
219 %attr(640,root,snort) %{_sysconfdir}/rules/*
220 %attr(754,root,root) /etc/rc.d/init.d/%{name}
221 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
222 %{_mandir}/man?/*
This page took 0.04944 seconds and 4 git commands to generate.