Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 911920493d55bfbbf8714d8e4adbd9c1 > files > 4

aide-0.10-2mdk.src.rpm

%define name aide
%define version 0.10
%define release 2mdk

Summary:     Advanced Intrusion Detection Environment
Name:        %{name}
Version:     %{version}
Release:     %{release}
Source0:     http://prdownloads.sourceforge.net/aide/%{name}-%{version}.tar.bz2
Source1:     %{name}.extra-0.7.tar.bz2
Patch0:	     %name-useless_includes.patch.bz2
BuildRoot:   %{_tmppath}/%{name}-buildroot
License:   GPL
URL:         http://sourceforge.net/projects/aide
Group:       Networking/Other
Buildrequires: flex glibc-devel glibc-static-devel
BuildPreReq: libmhash-devel zlib-devel bison

%description

  AIDE (Advanced Intrusion Detection Environment) is a free replacement for
  Tripwire. It does the same things as the semi-free Tripwire and more.

  There are other free replacements available so why build a new one? All the
  other replacements do not achieve the level of Tripwire. And I wanted a
  program that would exceed the limitations of Tripwire.

  The idea is that for an intruder to get in, certain files on the system must
  change - configuration files, for example. And once an intruder is in, in
  order to do much useful, the intruder must gain root access - something else
  that requires changing files. aide ensures that you (root) can be notified of
  ANY changes to a configurable list of properties (modification date, size,
  various hash-values) of a configurable list files.

  Aide should be installed right after the OS installation, and before
  you have connected your system to a network (i.e., before any
  possibility exists that someone could alter files on your system).

%prep
    [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != / ] \
    && rm -rf ${RPM_BUILD_ROOT}/

%setup -T -b 0
%setup -T -D -a 1

%patch -p1
%configure 	--prefix=%{_prefix} \
			--sysconfdir=/etc \
            --with-config_file=/etc/aide.conf \
            --with-zlib \
            --with-mhash \
            --enable-mhash 

    grep -v "#define DEFAULT_DB" config.h                      > config.h.tmp
    echo '#define DEFAULT_DB "/var/lib/aide/aide.db"'         >> config.h.tmp
    echo '#define DEFAULT_DB_OUT "/var/lib/aide/aide.db.new"' >> config.h.tmp
    mv -f config.h.tmp config.h

%build
    make

%install
    mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
    mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/sbin
    mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 
    mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man5 

    make prefix=$RPM_BUILD_ROOT%{_prefix} \
	 bindir=${RPM_BUILD_ROOT}%{_sbindir} \
	 mandir=${RPM_BUILD_ROOT}%{_mandir} \
	 install-strip

    mkdir -p -m 700 ${RPM_BUILD_ROOT}/var/lib/aide

    install -m 700 ./extra/aide.check $RPM_BUILD_ROOT/etc/cron.daily

    chmod 700 $RPM_BUILD_ROOT/var/lib/aide
    chmod 700 $RPM_BUILD_ROOT/usr/sbin/*

%post
    echo "****************************************************************"
    echo "* You should now set up an /etc/aide.conf to your              *"
    echo "* system and run '/usr/sbin/aide --init'                       *"
    echo "* (there is an example in /usr/share/doc/aide-0.9/aide.conf.in *"
    echo "*                                                              *"
    echo "* Then copy /etc/aide.conf, /usr/sbin/aide,                    *"
    echo "* and aide.db.new to a secure location                         *"
    echo "* (preferably read-only media)                                 *"
    echo "****************************************************************"

%clean
  [ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != / ] \
  && rm -rf ${RPM_BUILD_ROOT}/

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README ./doc/manual.html ./extra/aide.html
%doc doc/aide.conf.in
%{_sbindir}/aide
%{_mandir}/man1/*
%{_mandir}/man5/*
/var/lib/aide
%defattr(0644,root,root,755)
%config(noreplace) /etc/cron.daily/aide.check

%changelog
* Tue Jul 05 2005 Lenny Cartier <lenny@mandriva.com> 0.10-2mdk
- rebuild

* Thu Apr 22 2004 Michael Scherer <misc@mandrake.org> 0.10-1mdk 
- 0.10
- rpmbuildupdate

* Mon Sep 01 2003  Lenny Cartier <lenny@mandrakesoft.com> 0.9-8mdk
- we can't build a aide.conf for each system so the post message 
  will be more explicit (fix Bug[3905])

* Mon Sep 01 2003  Lenny Cartier <lenny@mandrakesoft.com> 0.9-7mdk
- Bug[3905]: fixed post message.

* Mon Sep 01 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9-6mdk
- Bug[3906]: remove /etc/aide.conf from 0.7. Add aide.conf.in in docdir
  as an example.

* Sat Apr 26 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.9-5mdk
- adjust buildrequires

* Sun Dec 29 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 0.9-4mdk
- rebuild for rpm and glibc

* Wed Jul 10 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.9-3mdk
- update buildrequires

* Fri Jul 05 2002  Lenny Cartier <lenny@mandrakesoft.com> 0.9-2mdk
- buildrequires flex

* Thu Jun 06 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.9-1mdk
- 0.9
- remove useless includes (gcc3.1 saga)

* Wed Nov 14 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.7-5mdk
- rebuild to be sure from where sources are coming from
- fix files permission

* Mon Jun 11 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.7-4mdk
- fix requires & buildrequires ( thanks to Stephane Lentz )

* Thu Jan 04 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.7-3mdk
- rebuild

* Thu Jul 27 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.7-2mdk
- BM
- macros

* Mon Jul 17 2000 Max Heijndijk <cchq@wanadoo.nl> 0.7-1mdk
- Integrated tripwire.spec from Michael Maher <mike@redhat.com>
- Integrated spec from Kyle Wheeler <memoryhole@penguinpowered.com>
- Added cron job
- Added sample aide.conf file with comments written by Jay Beale
  <jay@bastille-linux.org>
- Added manual.html to %doc
- Removed aide* from %doc
- Made relocatable
- Added aide.html

* Wed Jan 26 2000 Matthew Kirkwood <weejock@ferret.lmh.ox.ac.uk>
- Fixes for RH 6.1 and sysconfdir changed to /etc and /var/lib/aide added

* Sun Sep 12 1999 Rami Lehti <rammer@cs.tut.fi>
- Some small changes to make this autogeneratable by configure.

* Sat Sep 11 1999 Zach Brown <zab@redhat.com>
- First go