- 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:
parent
f1ac755c3e
commit
e1bb04f02b
11
aide-test.sh
Normal file
11
aide-test.sh
Normal 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
|
@ -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
|
Wed Jan 15 14:11:14 UTC 2014 - meissner@suse.com
|
||||||
|
|
||||||
|
20
aide.spec
20
aide.spec
@ -35,6 +35,7 @@ Group: Productivity/Security
|
|||||||
Source0: http://www.cs.tut.fi/~rammer/aide-%{version}.tar.bz2
|
Source0: http://www.cs.tut.fi/~rammer/aide-%{version}.tar.bz2
|
||||||
Source1: aide.conf
|
Source1: aide.conf
|
||||||
Source2: aide-cron_daily.sh
|
Source2: aide-cron_daily.sh
|
||||||
|
Source3: aide-test.sh
|
||||||
Patch1: aide-%{version}-as-needed.patch
|
Patch1: aide-%{version}-as-needed.patch
|
||||||
Patch2: aide-no_m4_dir.patch
|
Patch2: aide-no_m4_dir.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -43,6 +44,13 @@ Url: http://sourceforge.net/projects/aide/
|
|||||||
%description
|
%description
|
||||||
AIDE is an intrusion detection system that checks file integrity.
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
@ -67,11 +75,14 @@ make %{?_smp_mflags}
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
install -m 700 -d $RPM_BUILD_ROOT/var/lib/aide
|
install -m 700 -d $RPM_BUILD_ROOT/var/lib/aide
|
||||||
install -m 700 -d $RPM_BUILD_ROOT/etc
|
install -m 700 -d $RPM_BUILD_ROOT/etc
|
||||||
install -m 600 %{S:1} $RPM_BUILD_ROOT/etc/aide.conf
|
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/
|
mkdir -p doc/examples/etc/cron.daily/
|
||||||
cp -a %{S:2} doc/examples/etc/cron.daily/aide.sh
|
cp -a %{S:2} doc/examples/etc/cron.daily/aide.sh
|
||||||
|
|
||||||
|
%check
|
||||||
mkdir /var/tmp/aide-test
|
mkdir /var/tmp/aide-test
|
||||||
export TESTDIR=/var/tmp/aide-test
|
export TESTDIR=/var/tmp/aide-test
|
||||||
make DESTDIR=$TESTDIR install
|
make DESTDIR=$TESTDIR install
|
||||||
@ -98,4 +109,7 @@ rm -rf $TESTDIR
|
|||||||
/var/lib/aide
|
/var/lib/aide
|
||||||
%config(noreplace) /etc/aide.conf
|
%config(noreplace) /etc/aide.conf
|
||||||
|
|
||||||
|
%files test
|
||||||
|
/usr/bin/aide-test.sh
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user