aide/aide.spec
Alexander Naumov 0fa141628d Accepting request 451228 from home:msmeissn:branches:security
- Updated to 0.16
  - lots of bugfixes 
  - including regexp matching within subdirectories of expressions
- aide-0.16-as-needed.patch: replaces aide-0.15.1-as-needed.patch
- aide-no_m4_dir.patch: upstream
- aide.keyring: added from keyserver, cross checked key id on
  http://aide.sourceforge.net/ and a signature from someone
  I signed.

OBS-URL: https://build.opensuse.org/request/show/451228
OBS-URL: https://build.opensuse.org/package/show/security/aide?expand=0&rev=30
2017-01-18 19:13:42 +00:00

120 lines
3.4 KiB
RPMSpec

#
# spec file for package aide
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: aide
BuildRequires: automake
BuildRequires: bison
BuildRequires: curl-devel
BuildRequires: flex
BuildRequires: libacl-devel
BuildRequires: libgcrypt-devel
BuildRequires: libselinux-devel
BuildRequires: pkg-config
BuildRequires: zlib-devel
Version: 0.16
Release: 0
Summary: Advanced Intrusion Detection Environment
License: GPL-2.0+
Group: Productivity/Security
Source0: https://downloads.sourceforge.net/project/aide/aide/%version/aide-%version.tar.gz
Source42: https://downloads.sourceforge.net/project/aide/aide/%version/aide-%version.tar.gz.asc
Source43: aide.keyring
Source1: aide.conf
Source2: aide-cron_daily.sh
Source3: aide-test.sh
Patch1: aide-%{version}-as-needed.patch
Patch3: aide-xattr-in-libc.patch
Patch4: aide-dynamic.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://sourceforge.net/projects/aide/
%description
AIDE is an intrusion detection system that checks file integrity.
%package test
Summary: Simple AIDE testing
Group: Productivity/Security
%description test
Simple AIDE test script for externalized testing.
%prep
%setup -q
%patch1 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf -fiv
%configure \
--with-config_file=/etc/aide.conf \
--with-dbhmactype=md5 \
--disable-static \
--enable-lfs \
--with-posix-acl \
--with-xattr \
--with-selinux \
--with-curl \
--with-zlib \
--with-gcrypt \
--without-mhash
# --enable-forced_configmd
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
install -m 700 -d $RPM_BUILD_ROOT/var/lib/aide
install -m 700 -d $RPM_BUILD_ROOT/etc
install -m 600 %{S:1} $RPM_BUILD_ROOT/etc/aide.conf
install -m 700 %{S:3} $RPM_BUILD_ROOT/usr/bin/
mkdir -p doc/examples/etc/cron.daily/
cp -a %{S:2} doc/examples/etc/cron.daily/aide.sh
%check
mkdir /var/tmp/aide-test
export TESTDIR=/var/tmp/aide-test
make DESTDIR=$TESTDIR install
install -m 700 -d $TESTDIR/var/lib/aide
install -m 700 -d $TESTDIR/etc
install -m 600 %{S:1} $TESTDIR/etc/aide.conf.new
sed -e "s#/var/lib/aide#$TESTDIR/var/lib/aide#g" <$TESTDIR/etc/aide.conf.new >$TESTDIR/etc/aide.conf
sleep 2
sync
sleep 2
$TESTDIR/usr/bin/aide -c $TESTDIR/etc/aide.conf --init
mv $TESTDIR/var/lib/aide/aide.db.new $TESTDIR/var/lib/aide/aide.db
$TESTDIR/usr/bin/aide -c $TESTDIR/etc/aide.conf --check --verbose
rm -rf $TESTDIR
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README doc/manual* aide.* doc/examples
%{_prefix}/bin/aide
/%{_mandir}/man1/aide.1.gz
/%{_mandir}/man5/aide.conf.5.gz
/var/lib/aide
%config(noreplace) /etc/aide.conf
%files test
%defattr(-,root,root)
/usr/bin/aide-test.sh
%changelog