OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 06-Oct-2003 16:07:39
Branch: HEAD Handle: 2003100615073701
Modified files:
openpkg-src/amavisd amavisd.spec rc.amavisd
openpkg-web news.txt
Log:
Added nonstandard (non-fsl) perl logging through more accurate
configuration, corrected path in configuration, and moved
substitutions together into prep section for better overview and
organization
Summary:
Revision Changes Path
1.23 +24 -16 openpkg-src/amavisd/amavisd.spec
1.10 +25 -9 openpkg-src/amavisd/rc.amavisd
1.6870 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/amavisd/amavisd.spec
============================================================================
$ cvs diff -u -r1.22 -r1.23 amavisd.spec
--- openpkg-src/amavisd/amavisd.spec 18 Sep 2003 13:47:41 -0000 1.22
+++ openpkg-src/amavisd/amavisd.spec 6 Oct 2003 14:07:38 -0000 1.23
@@ -37,7 +37,7 @@
Group: Mail
License: GPL
Version: %{V_major}%{V_minor}
-Release: 20030918
+Release: 20031006
# package options
%option with_milter no
@@ -70,6 +70,28 @@
%prep
%setup -q -n amavisd-new-%{V_major}
+ %{l_shtool} subst \
+ -e "s;'clamscan';%{l_prefix}/bin/clamscan;g" \
+ -e "s;'uvscan';%{l_prefix}/bin/uvscan;g" \
+ -e 's;/var/amavis/clamd;%{l_prefix}/var/clamav/clamd.sock;g' \
+ -e 's;/var/amavis;%{l_prefix}/var/amavisd;g' \
+ -e 's;/var/virusmails;%{l_prefix}/var/amavisd/virusmails;g' \
+ -e 's;/usr/bin/sendmail;%{l_prefix}/sbin/sendmail;g' \
+ -e 's; -C/etc/sendmail.orig.cf ;;g' \
+ -e 's;/usr/bin/exim;%{l_prefix}/bin/exim;g' \
+ -e 's;/usr/local/sbin;%{l_prefix}/sbin;g' \
+ -e 's;/usr/local/bin;%{l_prefix}/bin;g' \
+ -e 's;\(daemon_user *= \)[^;]*;\1q{%{l_rusr}};' \
+ -e 's;\(daemon_group *= \)[^;]*;\1q{%{l_rgrp}};' \
+ -e 's;\(\$DO_SYSLOG *= \)[^;]*;\10;' \
+ -e 's;\(\$LOGFILE *=.*\)amavis.log\([^ \t]*\) \(.*\);\1amavisd.log\2\3;' \
+ -e 's;\(\$path
*=.*\)/usr/local/sbin\(.*\);\1%{l_prefix}/sbin:%{l_prefix}/bin:/usr/local/sbin\2;' \
+ amavisd.conf
+ %{l_shtool} subst \
+ -e '1s;/usr/bin/perl;%{l_prefix}/bin/perl;' \
+ -e 's;/var/amavis;%{l_prefix}/var/amavisd;g' \
+ -e 's;/etc/amavisd.conf;%{l_prefix}/etc/amavisd/amavisd.conf;g' \
+ amavisd
%build
%if "%{with_milter}" == "yes"
@@ -100,25 +122,10 @@
$RPM_BUILD_ROOT%{l_prefix}/var/amavisd/virusmails
%{l_shtool} install -c -m 755 \
- -e '1s;/usr/bin/perl;%{l_prefix}/bin/perl;' \
- -e 's;/var/amavis;%{l_prefix}/var/amavisd;g' \
- -e 's;/etc/amavisd.conf;%{l_prefix}/etc/amavisd/amavisd.conf;g' \
amavisd \
$RPM_BUILD_ROOT%{l_prefix}/sbin/
%{l_shtool} install -c -m 644 \
- -e "s;'clamscan';%{l_prefix}/bin/clamscan;g" \
- -e "s;'uvscan';%{l_prefix}/bin/uvscan;g" \
- -e 's;/var/amavis/clamd;%{l_prefix}/var/clamav/clamd.sock;g' \
- -e 's;/var/amavis;%{l_prefix}/var/amavisd;g' \
- -e 's;/var/virusmails;%{l_prefix}/var/amavisd/virusmails;g' \
- -e 's;/usr/bin/sendmail;%{l_prefix}/sbin/sendmail;g' \
- -e 's; -C/etc/sendmail.orig.cf ;;g' \
- -e 's;/usr/bin/exim;%{l_prefix}/bin/exim;g' \
- -e 's;/usr/local/sbin;%{l_prefix}/sbin;g' \
- -e 's;/usr/local/bin;%{l_prefix}/bin;g' \
- -e 's;\(daemon_user *= \)[^;]*;\1q{%{l_rusr}};' \
- -e 's;\(daemon_group *= \)[^;]*;\1q{%{l_rgrp}};' \
amavisd.conf \
$RPM_BUILD_ROOT%{l_prefix}/etc/amavisd/
@@ -165,5 +172,6 @@
# before erase, stop service
[ $1 -eq 0 ] || exit 0
%{l_rc} amavisd stop 2>/dev/null
+ rm -f $RPM_INSTALL_PREFIX/var/amavisd/*.log* >/dev/null 2>&1 || true
exit 0
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/amavisd/rc.amavisd
============================================================================
$ cvs diff -u -r1.9 -r1.10 rc.amavisd
--- openpkg-src/amavisd/rc.amavisd 18 Sep 2003 13:47:41 -0000 1.9
+++ openpkg-src/amavisd/rc.amavisd 6 Oct 2003 14:07:38 -0000 1.10
@@ -5,15 +5,20 @@
%config
amavisd_enable="$openpkg_rc_def"
- amavisd_config="@l_prefix@/etc/amavisd/amavisd.conf"
+ amavisd_log_prolog="true"
+ amavisd_log_epilog="true"
+ amavisd_log_numfiles="10"
+ amavisd_log_minsize="1M"
+ amavisd_log_complevel="9"
%common
amavisd_pidfile="@l_prefix@/var/amavisd/amavisd.pid"
+ amavisd_cfgfile="@l_prefix@/etc/amavisd/amavisd.conf"
amavisd_signal () {
[ -f $amavisd_pidfile ] && kill -$1 `cat $amavisd_pidfile`
}
-%status -u @l_rusr@ -o
+%status -u @l_susr@ -o
amavisd_usable="unknown"
amavisd_active="no"
rcService amavisd enable yes && \
@@ -22,19 +27,30 @@
echo "amavisd_usable=\"$amavisd_usable\""
echo "amavisd_active=\"$amavisd_active\""
-%start -u @l_rusr@
+%start -u @l_susr@
rcService amavisd enable yes || exit 0
rcService amavisd active yes && exit 0
- @l_prefix@/sbin/amavisd -c $amavisd_config
+ @l_prefix@/sbin/amavisd -c $amavisd_cfgfile
-%stop -u @l_rusr@
+%stop -u @l_susr@
rcService amavisd enable yes || exit 0
rcService amavisd active no && exit 0
- @l_prefix@/sbin/amavisd -c $amavisd_config stop
+ @l_prefix@/sbin/amavisd -c $amavisd_cfgfile stop
-%restart -u @l_rusr@
+%restart -u @l_susr@
rcService amavisd enable yes || exit 0
rcService amavisd active no && exit 0
- @l_prefix@/sbin/amavisd -c $amavisd_config stop
- @l_prefix@/sbin/amavisd -c $amavisd_config
+ @l_prefix@/sbin/amavisd -c $amavisd_cfgfile stop
+ @l_prefix@/sbin/amavisd -c $amavisd_cfgfile
+
+%daily -u @l_susr@
+ rcService amavisd enable yes || exit 0
+
+ # rotate logfile
+ shtool rotate -f \
+ -n ${amavisd_log_numfiles} -s ${amavisd_log_minsize} -d \
+ -z ${amavisd_log_complevel} -o @l_rusr@ -g @l_mgrp@ -m 644 \
+ -P "${amavisd_log_prolog}" \
+ -E "${amavisd_log_epilog} && rc amavisd restart" \
+ @l_prefix@/var/amavisd/amavisd.log
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6869 -r1.6870 news.txt
--- openpkg-web/news.txt 6 Oct 2003 13:52:08 -0000 1.6869
+++ openpkg-web/news.txt 6 Oct 2003 14:07:37 -0000 1.6870
@@ -1,3 +1,4 @@
+06-Oct-2003: Upgraded package: P<amavisd-20030616p5-20031006>
06-Oct-2003: New package: P<elm-2.4.107-20031006>
06-Oct-2003: Upgraded package: P<openpkg-import-20031006-20031006>
06-Oct-2003: New package: P<openpkg-import-20031006-20031006>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]