3 %bcond_with prelude # enables samhain working as a prelude sensor
5 Summary: Samhain data integrity / intrusion detection system
6 Summary(pl.UTF-8): System kontroli integralności danych i wykrywania intruzów Samhain
11 Group: Applications/System
12 Source0: http://www.la-samhna.de/samhain/%{name}-current.tar.gz
13 # Source0-md5: 9885c093ab7e8d63be9ed6aaedf28138
16 Patch0: %{name}-configure.patch
17 URL: http://www.la-samhna.de/samhain/
18 BuildRequires: automake
19 %{!?with_prelude:BuildRequires: libprelude-devel >= 0.9.6}
21 Requires(post,preun): /sbin/chkconfig
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Samhain works by creating a "snapshot" of your system, i.e. a database
26 of cryptographic checksums of all critical files, and comparing these
27 files regularly against this database.
29 %description -l pl.UTF-8
30 Samhain działa tworząc "obraz" twojego systemu, tj. bazę danych sum
31 kontrolnych wszystkich krytycznych plików, a następnie regularnie
32 porównuje te pliki z bazą.
36 tar zxf %{name}-%{version}.tar.gz -C ..
40 cp -f /usr/share/automake/config.sub .
42 --enable-login-watch \
43 --enable-mounts-check \
46 --with%{!?with_prelude:out}-prelude \
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
56 $RPM_BUILD_ROOT%{_var}/lib/%{name} \
57 $RPM_BUILD_ROOT%{_localstatedir}/log
60 DESTDIR=$RPM_BUILD_ROOT
61 %{__make} install-man \
62 DESTDIR=$RPM_BUILD_ROOT
64 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
65 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
67 touch $RPM_BUILD_ROOT%{_localstatedir}/log/samhain_log
70 rm -rf $RPM_BUILD_ROOT
73 /sbin/chkconfig --add %{name}
74 if [ -f /var/lock/subsys/%{name} ]; then
75 /etc/rc.d/init.d/%{name} restart 1>&2
77 %banner -e %{name} <<EOF
79 Register samhain sensor before first run:
80 prelude-adduser register <profile> "imdef:w" <manager host> --uid 0 --gid 0
83 Run %{_sbindir}/samhain -t init\ to initialize database
84 %if %{without samhain}
89 %service samhain restart "Samhain"
92 if [ "$1" = "0" ]; then
93 if [ -f /var/lock/subsys/%{name} ]; then
94 /etc/rc.d/init.d/%{name} stop 1>&2
96 /sbin/chkconfig --del %{name}
100 %defattr(644,root,root,755)
101 %doc README docs/{BUGS,Changelog,FAQ.html,HOWTO-*,README.UPGRADE,MANUAL-2_3.pdf}
102 %attr(750,root,bin) %{_sbindir}/samhain
103 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/samhainrc
104 %attr(700,root,root) %dir %{_var}/lib/%{name}
105 %attr(754,root,root) /etc/rc.d/init.d/%{name}
106 %attr(640,root,root) %ghost %{_localstatedir}/log/samhain_log