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