]> git.pld-linux.org Git - packages/snort.git/blame - snort.spec
- up to 2.9.18.1
[packages/snort.git] / snort.spec
CommitLineData
946f7ae3 1#
2# TODO: - snort rules - fix description
cb19b407 3# - snort_inline - prepare separate sets of config-files, rules
9d61ae4f 4# and startup script, adds some docs
01f3f79b 5#
e817c488 6# Conditional build:
12e2e783 7%bcond_with registered # build with rules available for registered users
01f3f79b 8#
92ea8dee 9Summary: Network intrusion detection system (IDS/IPS)
cbf82e1d
ER
10Summary(pl.UTF-8): System wykrywania intruzów w sieciach (IDS/IPS)
11Summary(pt_BR.UTF-8): Ferramenta de detecção de intrusos
12Summary(ru.UTF-8): Snort - система обнаружения попыток вторжения в сеть
13Summary(uk.UTF-8): Snort - система виявлення спроб вторгнення в мережу
8775223f 14Name: snort
4cb4516c
JR
15Version: 2.9.18.1
16Release: 1
12e2e783 17License: GPL v2 (vrt rules on VRT-License)
b3907a72 18Group: Networking
2c40db26 19Source0: http://www.snort.org/downloads/snort/%{name}-%{version}.tar.gz
4cb4516c 20# Source0-md5: 2b4e30300ef6feca1f60c267e727c6c0
57c9b91b
AM
21Source1: http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/%{name}rules-pr-2.4.tar.gz
22# Source1-md5: 35d9a2486f8c0280bb493aa03c011927
12e2e783 23%if %{with registered}
0e511834 24Source2: http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_os/%{name}rules-snapshot-2.6.tar.gz
25# NoSource2-md5: 0405ec828cf9ad85a03cbf670818f690
12e2e783 26NoSource: 2
27%endif
28Source3: http://www.snort.org/pub-bin/downloads.cgi/Download/comm_rules/Community-Rules-2.4.tar.gz
0e511834 29# Source3-md5: f236b8a4ac12e99d3e7bd81bf3b5a482
12e2e783 30Source4: %{name}.init
31Source5: %{name}.logrotate
2c40db26 32Patch0: %{name}-link.patch
652a37bc 33Patch1: %{name}-libdir.patch
5ad2f8a8 34URL: http://www.snort.org/
08df69e6
JB
35BuildRequires: autoconf
36BuildRequires: automake
2c40db26
JR
37BuildRequires: daq-static
38BuildRequires: libdnet-devel
4cb4516c 39BuildRequires: libnetfilter_queue-devel
f479ddcb 40BuildRequires: libnet-devel
5d617823 41BuildRequires: libnet1-devel = 1.0.2a
b3907a72 42BuildRequires: libpcap-devel
4cb4516c 43BuildRequires: libtirpc-devel
48886295 44BuildRequires: libtool
95620817 45BuildRequires: openssl-devel >= 0.9.7d
2cc2dce2 46BuildRequires: pcre-devel
31126327 47BuildRequires: rpmbuild(macros) >= 1.202
2fa6d1a5 48BuildRequires: rpmbuild(macros) >= 1.268
d87f0eb8 49BuildRequires: zlib-devel
27fdff69 50Requires(post,preun): /sbin/chkconfig
51Requires(postun): /usr/sbin/groupdel
52Requires(postun): /usr/sbin/userdel
08df69e6 53Requires(pre): /bin/id
d9c3717f 54Requires(pre): /usr/bin/getgid
08df69e6
JB
55Requires(pre): /usr/sbin/groupadd
56Requires(pre): /usr/sbin/useradd
5d617823 57Requires: libnet1 = 1.0.2a
27fdff69 58Requires: rc-scripts >= 0.2.0
d9c3717f 59Provides: group(snort)
d9c3717f 60Provides: user(snort)
cb19b407 61Obsoletes: snort-rules
c40a7757 62Conflicts: logrotate < 3.7-4
5ad2f8a8 63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
5ad2f8a8 65%define _bindir %{_sbindir}
ab81a4d5 66
67%description
99fed451
AM
68Snort is an open source network intrusion detection system, capable of
69performing real-time traffic analysis and packet logging on IP
70networks. It can perform protocol analysis and content
71searching/matching in order to detect a variety of attacks and probes,
72such as buffer overflows, stealth port scans, CGI attacks, SMB probes,
73OS fingerprinting attempts, and much more. Snort uses a flexible rules
74language to describe traffic that it should collect or pass, as well
75as a detection engine that utilizes a modular plugin architecture.
76Snort has a real- time alerting capability as well, incorporating
77alerting mechanisms for syslog, user specified files, a UNIX socket,
78or WinPopup messages to Windows clients using Samba's smbclient.
b3907a72 79
67a06db2 80Sourcefire VRT Certified Rules requires registration.
81https://www.snort.org/pub-bin/register.cgi
82
27666db8
JR
83%description -l pl.UTF-8
84Snort to bazujący na open source NIDS (network intrusion detection
85systems) wykonujący w czasie rzeczywistym analizę ruchu oraz logowanie
86pakietów w sieciach IP. Jego możliwości to analiza protokołu oraz
87zawartości w poszukiwaniu różnego rodzaju ataków lub prób takich jak
88przepełnienia bufora, skanowanie portów typu stealth, ataki CGI,
89próbkowanie SMB, OS fingerprinting i dużo więcej. Snort używa
90elastycznego języka regułek do opisu ruchu, który należy
91przeanalizować jak również silnika wykrywającego, wykorzystującego
92modułową architekturę. Snort umożliwia alarmowanie w czasie
93rzeczywistym poprzez sysloga, osobny plik lub jako wiadomość WinPopup
99fed451
AM
94poprzez klienta Samby: smbclient.
95
27666db8 96Reguły certyfikowane poprzez Sourcefire wymagają rejestracji.
67a06db2 97https://www.snort.org/pub-bin/register.cgi
98
27666db8
JR
99%description -l pt_BR.UTF-8
100Snort é um sniffer baseado em libpcap que pode ser usado como um
101pequeno sistema de detecção de intrusos. Tem como característica o
102registro de pacotes baseado em regras e também pode executar uma
103análise do protocolo, pesquisa de padrões e detectar uma variedade de
0955b0c3 104assinaturas de ataques, como estouros de buffer, varreduras "stealth"
105de portas, ataques CGI, pesquisas SMB, tentativas de descobrir o
106sistema operacional e muito mais. Possui um sistema de alerta em tempo
107real, com alertas enviados para o syslog, um arquivo de alertas em
108separado ou como uma mensagem Winpopup.
ab81a4d5 109
27666db8
JR
110%description -l ru.UTF-8
111Snort - это сниффер пакетов, который может использоваться как система
112обнаружения попыток вторжения в сеть. Snort поддерживает
113протоколирование пакетов на основе правил, может выполнять анализ
114протоколов, поиск в содержимом пакетов. Может также использоваться для
115обнаружения атак и "разведок", таких как попытки атак типа
116"переполнение буфера", скрытого сканирования портов, CGI атак, SMB
117разведок, попыток обнаружения типа ОС и много другого. Snort может
118информировать о событиях в реальном времени, посылая сообщения в
119syslog, отдельный файл или как WinPopup сообщения через smbclient.
cd357cee 120
27666db8
JR
121%description -l uk.UTF-8
122Snort - це сніфер пакетів, що може використовуватись як система
123виявлення спроб вторгнень в мережу. Snort підтримує протоколювання
124пакетів на основі правил, може виконувати аналіз протоколів, пошук у
125вмісті пакетів. Може також використовуватись для виявлення атак та
126"розвідок", таких як спроби атак типу "переповнення буфера",
127прихованого сканування портів, CGI атак, SMB розвідок, спроб виявлення
128типу ОС та багато іншого. Snort може інформувати про події в реальному
129часі, надсилаючи повідомлення до syslog, окремого файлу чи як WinPopup
130повідомлення через smbclient.
cd357cee 131
ab81a4d5 132%prep
12e2e783 133%setup -q %{!?with_registered:-a1} %{?with_registered:-a2} -a3
2eb1dd1f 134%patch0 -p1
652a37bc 135%patch1 -p1
ab81a4d5 136
6a0c25e4 137sed -i "s#var\ RULE_PATH.*#var RULE_PATH /etc/snort/rules#g" rules/snort.conf
138_DIR=$(pwd)
139cd rules
140for I in community-*.rules; do
141 echo "include \$RULE_PATH/$I" >> snort.conf
142done
143cd $_DIR
144
ab81a4d5 145%build
4cb4516c 146export CFLAGS="%{rpmcflags} -I/usr/include/tirpc"
e0b76e62 147%{__libtoolize}
4529e62c 148%{__aclocal} -I m4
89e97d3b 149%{__autoconf}
150%{__automake}
e1df464a 151# we don't need libnsl, so don't use it
b3907a72 152%configure \
af18b2c0 153 no_libnsl=yes \
2c40db26
JR
154 --enable-pthread \
155 --enable-so-with-static-lib \
156 --enable-control-socket \
157 --enable-side-channel \
158 --enable-build-dynamic-examples
99fed451 159
4cb4516c
JR
160%{__make}
161%{__make} -C src/dynamic-plugins/sf_engine/examples
ab81a4d5 162
163%install
164rm -rf $RPM_BUILD_ROOT
48886295 165install -d $RPM_BUILD_ROOT%{_initrddir} \
96b7be9c 166 $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},cron.daily,logrotate.d} \
aad71c3c 167 $RPM_BUILD_ROOT%{_var}/log/{%{name},archive/%{name}} \
75d3e2a6 168 $RPM_BUILD_ROOT%{_datadir}/mibs/site \
48886295 169 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/rules
ab81a4d5 170
5ad2f8a8 171%{__make} install \
172 DESTDIR=$RPM_BUILD_ROOT
2917f470 173
48886295 174install rules/*.config $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
175install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
176install rules/*.rules $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/rules
177install %{SOURCE4} $RPM_BUILD_ROOT%{_initrddir}/%{name}
178install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
179install rules/snort.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
6a0c25e4 180
b3907a72
AM
181%clean
182rm -rf $RPM_BUILD_ROOT
2917f470 183
b3907a72 184%pre
31126327 185%groupadd -g 46 -r snort
946f7ae3 186%useradd -u 46 -g snort -M -r -d %{_var}/log/snort -s /bin/false -c "SNORT IDS/IPS" snort
7e9750d1 187
b3907a72 188%post
2fa6d1a5
ER
189/sbin/chkconfig --add snort
190%service snort restart
2917f470
MP
191
192%preun
51402fe7 193if [ "$1" = "0" ] ; then
2fa6d1a5 194 %service snort stop
51402fe7 195 /sbin/chkconfig --del snort
196fi
2917f470
MP
197
198%postun
51402fe7 199if [ "$1" = "0" ] ; then
d9c3717f 200 %userremove snort
201 %groupremove snort
51402fe7 202fi
ab81a4d5 203
204%files
b3907a72 205%defattr(644,root,root,755)
48886295 206%doc doc/{AUTHORS,BUGS,CREDITS,INSTALL,NEWS,PROBLEMS,README*,TODO,USAGE,WISHLIST,generators,*.pdf}
980aa956 207%attr(755,root,root) %{_sbindir}/*
48886295 208%attr(770,root,snort) %dir %{_var}/log/%{name}
51d7d44e 209%attr(770,root,snort) %dir %{_var}/log/archive/%{name}
48886295 210%attr(750,root,snort) %dir %{_sysconfdir}/%{name}
211%attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/unicode.map
212%attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.config
213%attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
214%attr(750,root,snort) %dir %{_sysconfdir}/%{name}/rules
96b7be9c 215%attr(640,root,snort) %{_sysconfdir}/%{name}/rules/*
48886295 216%attr(754,root,root) %{_initrddir}/%{name}
96b7be9c 217%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
99fed451 218%{_mandir}/man?/*
48886295 219%dir %{_libdir}/snort_dynamicengine
220%dir %{_libdir}/snort_dynamicpreprocessor
652a37bc 221%dir %{_libdir}/snort_dynamicrules
48886295 222%attr(755,root,root) %{_libdir}/snort_dynamicengine/libsf_engine.so*
223%attr(755,root,root) %{_libdir}/snort_dynamicpreprocessor/*.so*
652a37bc 224%attr(755,root,root) %{_libdir}/snort_dynamicrules/lib_sfdynamic_example_rule.so*
This page took 0.160902 seconds and 4 git commands to generate.