Accepting request 874872 from home:polslinux:branches:security
- Update default config file to match v0.17 OBS-URL: https://build.opensuse.org/request/show/874872 OBS-URL: https://build.opensuse.org/package/show/security/aide?expand=0&rev=40
This commit is contained in:
parent
f6cb70b2bb
commit
4a50fc21e6
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 24 13:45:59 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
- Update default config file to match v0.17
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 24 11:01:03 UTC 2021 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
|
@ -11,9 +11,8 @@
|
||||
#
|
||||
# Configuration parameters
|
||||
#
|
||||
database=file:/var/lib/aide/aide.db
|
||||
database_in=file:/var/lib/aide/aide.db
|
||||
database_out=file:/var/lib/aide/aide.db.new
|
||||
verbose=1
|
||||
report_url=stdout
|
||||
warn_dead_symlinks=yes
|
||||
|
||||
|
@ -81,10 +81,12 @@ mkdir -p doc/examples%{_sysconfdir}/cron.daily/
|
||||
cp -a %{SOURCE2} doc/examples%{_sysconfdir}/cron.daily/aide.sh
|
||||
|
||||
%post
|
||||
if ! grep -q "database_in" %{_sysconfdir}/aide.conf ; then
|
||||
# with the 0.17 update some backward incompatible changes were made to the config file. Therefore, we have to adapt those parameters, otherwise the program will fail
|
||||
sed -i 's/database=/database_in=/' %{_sysconfdir}/aide.conf
|
||||
sed -i '/verbose=/d' %{_sysconfdir}/aide.conf
|
||||
sed -i 's/\t/ /g' %{_sysconfdir}/aide.conf
|
||||
fi
|
||||
|
||||
%check
|
||||
rm -rf %{_localstatedir}/tmp/aide-test
|
||||
@ -95,10 +97,12 @@ install -m 700 -d $TESTDIR%{_localstatedir}/lib/aide
|
||||
install -m 700 -d $TESTDIR%{_sysconfdir}
|
||||
install -m 600 %{SOURCE1} $TESTDIR%{_sysconfdir}/aide.conf.new
|
||||
sed -e "s#%{_localstatedir}/lib/aide#$TESTDIR%{_localstatedir}/lib/aide#g" <$TESTDIR%{_sysconfdir}/aide.conf.new >$TESTDIR%{_sysconfdir}/aide.conf
|
||||
# with the 0.17 update, the config file changed a bit. Wwe have to adapt those parameters, otherwise the program will fail
|
||||
if ! grep -q "database_in" %{_sysconfdir}/aide.conf ; then
|
||||
# with the 0.17 update some backward incompatible changes were made to the config file. Therefore, we have to adapt those parameters, otherwise the program will fail
|
||||
sed -i 's/database=/database_in=/' $TESTDIR%{_sysconfdir}/aide.conf
|
||||
sed -i '/verbose=/d' $TESTDIR%{_sysconfdir}/aide.conf
|
||||
sed -i 's/\t/ /g' $TESTDIR%{_sysconfdir}/aide.conf
|
||||
fi
|
||||
$TESTDIR/usr/bin/aide -D -c $TESTDIR%{_sysconfdir}/aide.conf
|
||||
sleep 2
|
||||
sync
|
||||
|
Loading…
x
Reference in New Issue
Block a user