SHA256
1
0
forked from pool/aide

- seperate a -test package to help with externalized testing.

OBS-URL: https://build.opensuse.org/package/show/security/aide?expand=0&rev=22
This commit is contained in:
Marcus Meissner 2014-01-23 08:33:25 +00:00 committed by Git OBS Bridge
parent f1ac755c3e
commit e1bb04f02b
3 changed files with 33 additions and 3 deletions

11
aide-test.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
export TESTDIR=`mktemp -d /tmp/aide.XXXXXX`
install -m 700 -d $TESTDIR/var/lib/aide
install -m 700 -d $TESTDIR/etc
install -m 600 /etc/aide.conf $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
/usr/bin/aide -c $TESTDIR/etc/aide.conf --init
mv $TESTDIR/var/lib/aide/aide.db.new $TESTDIR/var/lib/aide/aide.db
/usr/bin/aide -c $TESTDIR/etc/aide.conf --check --verbose
rm -rf $TESTDIR

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 23 08:33:09 UTC 2014 - meissner@suse.com
- seperate a -test package to help with externalized testing.
-------------------------------------------------------------------
Wed Jan 15 14:11:14 UTC 2014 - meissner@suse.com

View File

@ -35,6 +35,7 @@ Group: Productivity/Security
Source0: http://www.cs.tut.fi/~rammer/aide-%{version}.tar.bz2
Source1: aide.conf
Source2: aide-cron_daily.sh
Source3: aide-test.sh
Patch1: aide-%{version}-as-needed.patch
Patch2: aide-no_m4_dir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -43,6 +44,13 @@ 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
@ -67,11 +75,14 @@ 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 -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
@ -98,4 +109,7 @@ rm -rf $TESTDIR
/var/lib/aide
%config(noreplace) /etc/aide.conf
%files test
/usr/bin/aide-test.sh
%changelog