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: 14-Oct-2003 15:03:20
Branch: HEAD Handle: 2003101414031802
Modified files:
openpkg-src/apache2 apache2.spec rc.apache2
openpkg-web news.txt
Log:
Integrated logging fixes, run command fixes, and new feautures of
ticket #202
Summary:
Revision Changes Path
1.29 +20 -6 openpkg-src/apache2/apache2.spec
1.9 +25 -17 openpkg-src/apache2/rc.apache2
1.6996 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/apache2/apache2.spec
============================================================================
$ cvs diff -u -r1.28 -r1.29 apache2.spec
--- openpkg-src/apache2/apache2.spec 6 Oct 2003 14:46:43 -0000 1.28
+++ openpkg-src/apache2/apache2.spec 14 Oct 2003 13:03:19 -0000 1.29
@@ -33,7 +33,7 @@
Group: Web
License: ASF
Version: 2.0.47
-Release: 20031006
+Release: 20031014
# list of sources
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -47,7 +47,7 @@
PreReq: OpenPKG, openpkg >= 20030718, perl
AutoReq: no
AutoReqProv: no
-Conflicts: apache
+Conflicts: apache, apr
%description
The Apache Project is a collaborative software development effort
@@ -60,10 +60,10 @@
of users have contributed ideas, code, and documentation to the
project.
- NOTICE: This is version 2.0 of Apache, a complete overhauled version
- of the Apache HTTP server. It is mostly Apache 1.3 compatible, but
- is not a direct drop-in replacement. Use with great care and follow
- our recommendation to still not use it on production machines.
+ WARNING! This is version 2.0 of Apache, a completely overhauled version
+ of the Apache HTTP server. Although it is mostly Apache 1.3 compatible,
+ it is not a direct drop-in replacement. This software won't be released
+ by OpenPKG (it is EVAL) until it is fit for use on production machines.
%prep
%setup -q -n httpd-%{version}
@@ -100,4 +100,18 @@
%clean
rm -rf $RPM_BUILD_ROOT
+
+%post
+ # after upgrade, restart service
+ [ $1 -eq 2 ] || exit 0
+ eval `%{l_rc} apache2 status 2>/dev/null`
+ [ ".$apache2_active" = .yes ] && %{l_rc} apache2 restart
+ exit 0
+
+%preun
+ # before erase, stop service and remove log files
+ [ $1 -eq 0 ] || exit 0
+ %{l_rc} apache2 stop 2>/dev/null
+ rm -f $RPM_INSTALL_PREFIX/var/apache2/log/*_log* >/dev/null 2>&1 || true
+ exit 0
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/apache2/rc.apache2
============================================================================
$ cvs diff -u -r1.8 -r1.9 rc.apache2
--- openpkg-src/apache2/rc.apache2 22 Jul 2003 08:10:38 -0000 1.8
+++ openpkg-src/apache2/rc.apache2 14 Oct 2003 13:03:20 -0000 1.9
@@ -5,13 +5,13 @@
%config
apache2_enable="$openpkg_rc_def"
- apache2_log_files="@l_prefix@/var/apache2/log/access.log"
+ apache2_log_files="@l_prefix@/var/apache2/log/access_log"
apache2_log_rotsteps="10"
apache2_log_rotminsize="10M"
apache2_log_rotcomplevel="9"
apache2_log_rotprolog="true"
apache2_log_rotepilog="true"
- apache2_err_files="@l_prefix@/var/apache2/log/error.log"
+ apache2_err_files="@l_prefix@/var/apache2/log/error_log"
apache2_err_rotsteps="10"
apache2_err_rotminsize="1M"
apache2_err_rotcomplevel="9"
@@ -36,32 +36,40 @@
%start -u @l_susr@
rcService apache2 enable yes || exit 0
+ rcService apache2 active yes && exit 0
@l_prefix@/sbin/apachectl start
%stop -u @l_susr@
rcService apache2 enable yes || exit 0
+ rcService apache2 active no && exit 0
@l_prefix@/sbin/apachectl stop
%restart -u @l_susr@
rcService apache2 enable yes || exit 0
+ rcService apache2 active no && exit 0
@l_prefix@/sbin/apachectl restart
%daily -u @l_susr@
rcService apache2 enable yes || exit 0
- if [ ".$apache2_log_files" != . ]; then
- shtool rotate -f \
- -n ${apache2_log_rotsteps} -s ${apache2_log_rotminsize} -d \
- -z ${apache2_log_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
- -P "$apache2_log_rotprolog" \
- -E "@l_prefix@/sbin/apachectl restart; $apache2_log_rotepilog" \
- $apache2_log_files
- fi
- if [ ".$apache2_err_files" != . ]; then
- shtool rotate -f \
- -n ${apache2_err_rotsteps} -s ${apache2_err_rotminsize} -d \
- -z ${apache2_err_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
- -P "$apache2_err_rotprolog" \
- -E "@l_prefix@/sbin/apachectl restart; $apache2_err_rotepilog" \
- $apache2_err_files
+
+ # rotate logfiles
+ rcTmp -i
+ hintfile=`rcTmp -f -n hint`
+ shtool rotate -f \
+ -n ${apache2_log_rotsteps} -s ${apache2_log_rotminsize} -d \
+ -z ${apache2_log_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
+ -P "$apache2_log_rotprolog" \
+ -E "$apache2_log_rotepilog && echo 1 >$hintfile" \
+ ${apache2_log_files}
+ shtool rotate -f \
+ -n ${apache2_err_rotsteps} -s ${apache2_err_rotminsize} -d \
+ -z ${apache2_err_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
+ -P "$apache2_err_rotprolog" \
+ -E "$apache2_err_rotepilog && echo 1 >$hintfile" \
+ ${apache2_err_files}
+
+ if [ -s $hintfile ]; then
+ @l_prefix@/sbin/apachectl restart
fi
+ rcTmp -k
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6995 -r1.6996 news.txt
--- openpkg-web/news.txt 14 Oct 2003 12:39:16 -0000 1.6995
+++ openpkg-web/news.txt 14 Oct 2003 13:03:18 -0000 1.6996
@@ -1,3 +1,4 @@
+14-Oct-2003: Upgraded package: P<apache2-2.0.47-20031014>
14-Oct-2003: Upgraded package: P<apr-0.9.4-20031014>
14-Oct-2003: Upgraded package: P<vim-6.2.121-20031014>
14-Oct-2003: Upgraded package: P<rt-3.0.6-20031014>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]