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